From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: --no-desktop broken? Date: Sat, 21 Jan 2006 18:53:09 -0500 Message-ID: <2E5FEB1A-6442-41BC-BDEC-60A1B45C13E6@raeburn.org> References: <1137804521.206430.18968.nullmailer@Update.UU.SE> <43D2012A.8050406@soem.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1137887643 17099 80.91.229.2 (21 Jan 2006 23:54:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 21 Jan 2006 23:54:03 +0000 (UTC) Cc: ams@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 22 00:54:01 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 1F0SYN-0000Pr-3D for ged-emacs-devel@m.gmane.org; Sun, 22 Jan 2006 00:53:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F0Sav-0001an-Hf for ged-emacs-devel@m.gmane.org; Sat, 21 Jan 2006 18:56:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F0Saf-0001Yk-Dz for emacs-devel@gnu.org; Sat, 21 Jan 2006 18:56:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F0Sae-0001XC-Mt for emacs-devel@gnu.org; Sat, 21 Jan 2006 18:56:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F0Sae-0001X3-IL for emacs-devel@gnu.org; Sat, 21 Jan 2006 18:56:16 -0500 Original-Received: from [216.148.227.85] (helo=rwcrmhc12.comcast.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1F0Sf4-0007SK-L1; Sat, 21 Jan 2006 19:00:50 -0500 Original-Received: from raeburn.org (c-65-96-168-237.hsd1.ma.comcast.net[65.96.168.237]) by comcast.net (rwcrmhc12) with ESMTP id <2006012123531201400bg2vie>; Sat, 21 Jan 2006 23:53:12 +0000 Original-Received: from [18.101.0.226] (laptop.raeburn.org [18.101.0.226]) by raeburn.org (8.12.11/8.12.11) with ESMTP id k0LNrAbZ004282; Sat, 21 Jan 2006 18:53:10 -0500 (EST) In-Reply-To: <43D2012A.8050406@soem.dk> Original-To: Lars Hansen X-Mailer: Apple Mail (2.746.2) 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:49367 Archived-At: On Jan 21, 2006, at 04:38, Lars Hansen wrote: > I agree that it is confusing that --no-desktop is documented in --help > but seems to not work. Maybe --help should not list options that > are not > loaded by default. In the long term (i.e., maybe too much to change right now), perhaps we could have arbitrary command-line options handled via Lisp code, with a table or something indicating the file to be loaded or function to be invoked to process the option, and some mechanism akin to loaddefs.el for collecting the options and their help messages from various Lisp files and making them available to be printed out if --help is given. Aside from actually invoking some Lisp code when --help is given, I think this could mostly be done in new Lisp code. One approach, off the top of my head, might be to designate symbols named "command-line-arg:foo" as handlers for command-line argument "-- foo", "--foo=...", and "--no-foo" (pass the function t, "...", or nil respectively); then the existing loaddefs would have all the info we need to make the list of options. If the startup code didn't recognize an option but the corresponding symbol was defined with a function value, that function object would be invoked, and would perhaps have the ability to gobble up additional arguments that might be needed for the option. Some new Lisp function invoked via --help would walk the obarray atoms looking for such name patterns, make sure the autoloads were performed, and then look for 'command-line- arg-help-string in the property list of each symbol. It could even load the user's .emacs after displaying the standard Emacs packages' options, and see if changes to the load path or autoloads provided any additional options, and display them as well. That wouldn't handle pattern-based argument process, though, like turning "--disable-rmail" into "(put 'rmail 'disabled t)" or short "- x" style names, or other random things people might want to do, but it's a starting point. Just a thought... maybe this is too much effort to put into the Emacs command line... :-) Ken