help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how can tell emacs not to load desktop when invoked by mutt?


From: Glenn Morris
Subject: Re: how can tell emacs not to load desktop when invoked by mutt?
Date: Sat, 26 Apr 2003 18:07:31 +0100
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/directory/emacs.html)

wang yin wrote:

> Can you tell me how can I use regexp to match the file name that mutt
> tell emacs to edit: /tmp/mutt-mylogin-date in elisp?
>
> Then I can use the following elisp(in pseudo-code):
>
> (or (regexp-match ("/tmp/mutt-[^-]+-[0-9-]+", file-name))
>         (progn
>            (load "desktop")
>            (desktop-load-default)
>            (desktop-read)))

Do you really need to be that precise about the mutt file name?
Surely "/tmp/mutt-" is good enough...

(unless
    (catch 'found
      (dolist (arg command-line-args)
        (if (string-match "^/tmp/mutt-" arg)
            (throw 'found t))))
  (load "desktop")
  (dekstop-load-default)
  (desktop-read))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]