From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jiri Pejchal Newsgroups: gmane.emacs.help Subject: Re: how can tell emacs not to load desktop when invoked by mutt? Date: Thu, 24 Apr 2003 18:36:34 GMT Organization: unknown Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1051209918 18134 80.91.224.249 (24 Apr 2003 18:45:18 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 24 Apr 2003 18:45:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 24 20:45:12 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 198liZ-0004hy-00 for ; Thu, 24 Apr 2003 20:45:12 +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 198lj4-0000UX-02 for gnu-help-gnu-emacs@m.gmane.org; Thu, 24 Apr 2003 14:45:42 -0400 Original-Newsgroups: gnu.emacs.help Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-FFM2.ecrc.net!news.cesnet.cz!crax.cesnet.cz!news.vutbr.cz!news.muni.cz!news User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Lines: 24 X-Nntp-Posting-Host: nymfe04.fi.muni.cz Original-Xref: shelby.stanford.edu gnu.emacs.help:112286 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:8784 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8784 "Ehud Karni" writes: > > Can anyone give an example how to set a conditional? Thanks! > > I think the other replies to this post (emacsclient) are good but > there was no direct answer to the question. Here is my proposal: > > 1. Run the `mutt' command through a script. > 2. Add an environment variable MUTT=ON. > 3. Wrap your desktop loading in ~/.emcas : > > (or (string-equal (or (getenv "MUTT") "-") "ON") > (progn > (load "desktop") > (desktop-load-default) > (desktop-read))) Can emacs somehow test the command it was invoked with emacs -nw /tmp/mutt-... contains the string mutt? Jiri Pejchal