From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.help Subject: Re: how can tell emacs not to load desktop when invoked by mutt? Date: Sat, 26 Apr 2003 18:07:31 +0100 Organization: None Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <2sznmdrxv0.fsf@xpc21.ast.cam.ac.uk> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1051377018 31539 80.91.224.249 (26 Apr 2003 17:10:18 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 26 Apr 2003 17:10:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 26 19:10:09 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 199TBg-0008Bf-00 for ; Sat, 26 Apr 2003 19:10:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 199TCC-0001Ih-05 for gnu-help-gnu-emacs@m.gmane.org; Sat, 26 Apr 2003 13:10:40 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!news-mue1.dfn.de!news-koe1.dfn.de!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: xpc21.ast.cam.ac.uk X-Attribution: GM Mail-Copies-To: never User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/directory/emacs.html) Cancel-Lock: sha1:VZ7QdSXjkbhid4l/j4BLO3Z05rA= Original-Xref: shelby.stanford.edu gnu.emacs.help:112374 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:8873 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8873 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))