From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Robert J. Chassell" Newsgroups: gmane.emacs.devel Subject: Re: Unknown option `--no-desktop' Date: Tue, 16 Nov 2004 13:47:14 +0000 (UTC) Message-ID: References: <23032.217.194.34.123.1100536660.squirrel@wwws.franken.de> <25556.217.194.34.123.1100543413.squirrel@wwws.franken.de> <57659.194.95.226.87.1100558339.squirrel@wwws.franken.de> Reply-To: bob@rattlesnake.com NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1100612874 4248 80.91.229.6 (16 Nov 2004 13:47:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 Nov 2004 13:47:54 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 16 14:47:44 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CU3gN-0005ie-00 for ; Tue, 16 Nov 2004 14:47:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CU3p7-0007lw-Rm for ged-emacs-devel@m.gmane.org; Tue, 16 Nov 2004 08:56:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CU3ow-0007j7-2j for emacs-devel@gnu.org; Tue, 16 Nov 2004 08:56:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CU3ou-0007hH-IW for emacs-devel@gnu.org; Tue, 16 Nov 2004 08:56:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CU3ou-0007gi-DD for emacs-devel@gnu.org; Tue, 16 Nov 2004 08:56:32 -0500 Original-Received: from [69.168.110.189] (helo=rattlesnake.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CU3g1-00058e-II for emacs-devel@gnu.org; Tue, 16 Nov 2004 08:47:21 -0500 Original-Received: by rattlesnake.com via sendmail from stdin id (Debian Smail3.2.0.115) Tue, 16 Nov 2004 13:47:14 +0000 (UTC) Original-To: emacs-devel@gnu.org In-reply-to: <57659.194.95.226.87.1100558339.squirrel@wwws.franken.de> (stahl@eos.franken.de) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29922 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29922 "Stephan Stahl" said ... i do not understand why you have some lines in you .emacs files that cause the desktop to get saved. desktop.el should do that automaticly when emacs is killed. ... This is so I can avoid using the desktop with specifically named instances of Emacs. Here is what I say in my .emacs file: ;; Do not use desktop-save-mode for Short or Experimental Emacs: (if (or (string= (cdr (assq 'name (frame-parameters))) "Bobs Short Emacs") (string= (cdr (assq 'name (frame-parameters))) "Experimental Emacs")) (desktop-save-mode 0) (desktop-save-mode 1)) Here is my proposal for how the start up option should work: 1. Emacs started with emacs -Q --no-desktop -- Do not start a desktop, since there is none; do nothing. -- _Also_, do not say "Unknown option `--no-desktop'" but do nothing since the initial option should be recognized as having nothing to work on. 2. Emacs started with emacs --no-desktop and with a .emacs file that says (desktop-save-mode 1) (and no desktop function called during session) -- Do not start the desktop -- Do not save a desktop when this instance of Emacs is ended 3. Emacs started with emacs --no-desktop and with a .emacs file that says (desktop-save-mode 1) but a desktop function is called during the session after this instance of Emacs has started -- Do whatever the desktop function says 4. Emacs started with emacs --no-desktop and with a .emacs file that says (desktop-read "/user") -- Do not start the desktop -- If a desktop function is called during the session, do whatever it says. A key question is whether the single option --no-desktop should do two different actions, in effect, combine two different options: * --no-desktop-read: prevent starting a desktop when an instance of Emacs starts, but permitting a save when the .emacs file says (desktop-save-mode 1) * --no-desktop-save: prevent saving a desktop when an instance of Emacs ends, but permitting a pre-existing desktop to be read, and not changing it during the session, when the .emacs file says (desktop-save-mode 1) I think there should be just the one option --no-desktop and it should do both actions. Morover the one option should apply only to the start up. If you call a desktop function when running, then that should take effect, just as your .emacs file gets loaded if you load your .emacs after starting with `emacs -Q'. Under no circumstances should the message Unknown option `--no-desktop' appear, as it does with this morning's CVS, of Tue, 2004 Nov 16 12:52 UTC, GNU Emacs 21.3.50.7 (i686-pc-linux-gnu, GTK+ Version 2.4.13) started with emacs -Q --no-desktop -- Robert J. Chassell bob@rattlesnake.com GnuPG Key ID: 004B4AC8 http://www.rattlesnake.com http://www.teak.cc