emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: --no-desktop broken?


From: Ken Raeburn
Subject: Re: --no-desktop broken?
Date: Sat, 21 Jan 2006 18:53:09 -0500

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]