(emacs)Resume Arguments


Next: Display X Prev: Command Example Up: Command Arguments

Resuming Emacs with Arguments
=============================

   You can specify ordinary arguments for Emacs when you resume it after
a suspension.  To prepare for this, put the following code in your
`.emacs' file (Note: Hooks.):

     (add-hook 'suspend-hook 'resume-suspend-hook)

   As further preparation, you must execute the shell script
`emacs.csh' (if you use CSH as your shell) or `emacs.bash' (if you use
BASH as your shell).  These scripts define an alias named `edit', which
will resume Emacs giving it new command line arguments such as files to
visit.

   Only ordinary arguments work properly when you resume Emacs.  Initial
arguments are not recognized.  It's too late to execute them anyway.

   Note that resuming Emacs (with or without arguments) must be done
from within the shell that is the parent of the Emacs job.  This is why
`edit' is an alias rather than a program or a shell script.  It is not
possible to implement a resumption command that could be run from other
subjobs of the shell; no way to define a command that could be made the
value of `EDITOR', for example.  Therefore, this feature does not take
the place of the the Emacs Server feature.  Note: Emacs Server.

   The aliases use the Emacs Server feature if you appear to have a
server Emacs running.  However, they cannot determine this with complete
accuracy.  They may think that a server is still running when in
actuality you have killed that Emacs, because the file `/tmp/.esrv...'
still exists.  If this happens, find that file and delete it.


automatically generated by info2www