-
-
Save priyadarshan/3e43846123ea406e85ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Emacs starter for Emacs mac port | |
# Thanks to Aquamacs Project and David Reitter | |
my $args = ""; | |
my $tmpfiles = ""; | |
for my $f (@ARGV) { | |
$args .= '"'.$f.'" '; | |
$tmpfiles .= '"'.$f.'" ' if (! -e $f); | |
} | |
system("touch $args") if ($tmpfiles); | |
system("open -a /Applications/Emacs.app $args"); | |
# delay deletion because AE drag&drop doesn't work with non-existing documents | |
system("(sleep 3; rm $tmpfiles) &") if ($tmpfiles); | |
exit; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you mind deleting this fork? It has not changes from the original and is distracting for others reading about creating a cli starter for railwaycat's Emacs mac port