From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: --no-desktop broken? Date: Mon, 23 Jan 2006 08:18:31 +0200 Organization: JURTA Message-ID: <87fynf32w8.fsf@jurta.org> References: <1137804521.206430.18968.nullmailer@Update.UU.SE> <43D2012A.8050406@soem.dk> <2E5FEB1A-6442-41BC-BDEC-60A1B45C13E6@raeburn.org> <43D36D66.9010108@soem.dk> <87mzhnfykz.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1137997293 26991 80.91.229.2 (23 Jan 2006 06:21:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 Jan 2006 06:21:33 +0000 (UTC) Cc: larsh@soem.dk, ams@gnu.org, raeburn@raeburn.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 23 07:21:31 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F0v4f-00008N-MT for ged-emacs-devel@m.gmane.org; Mon, 23 Jan 2006 07:21:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F0v7G-00043J-I4 for ged-emacs-devel@m.gmane.org; Mon, 23 Jan 2006 01:23:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F0v6P-0003bg-Bl for emacs-devel@gnu.org; Mon, 23 Jan 2006 01:22:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F0v6O-0003bA-EB for emacs-devel@gnu.org; Mon, 23 Jan 2006 01:22:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F0v6N-0003av-Pz for emacs-devel@gnu.org; Mon, 23 Jan 2006 01:22:55 -0500 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1F0vB2-0001ss-K0; Mon, 23 Jan 2006 01:27:44 -0500 Original-Received: from mail.neti.ee (80-235-32-219-dsl.mus.estpak.ee [80.235.32.219]) by Relayhost1.neti.ee (Postfix) with ESMTP id 6B30D6016; Mon, 23 Jan 2006 08:20:04 +0200 (EET) Original-To: Eli Zaretskii In-Reply-To: (Eli Zaretskii's message of "Mon, 23 Jan 2006 07:00:49 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee 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: news.gmane.org gmane.emacs.devel:49438 Archived-At: > ;; We cannot use `command-switch-alist' to process "--no-desktop" because these > ;; functions are processed after `after-init-hook'. > > The above comment explains why this is not a good idea. Yes, I'm already aware of this comment. That's why I haven't proposed to use `command-switch-alist' directly to process "--no-desktop". > All of these solutions will load desktop.el (and what's worse, load it > unconditionally, I think), which I think is not a good design. Only the first solution loads desktop.el, and I agree that it is not a good solution. The remaining two solutions don't load desktop.el. They use the autoload cookie. This means that at the time startup.el starts processing command switches, it already has "--no-desktop" in `command-switch-alist' without loading desktop.el. The effect is exactly the same as adding "--no-desktop" to the local variable `longopts' in `command-line-1'. I think not using package-specific switches in startup.el gives better modularity. -- Juri Linkov http://www.jurta.org/emacs/