GNU bug report logs -
#7665
Emacs: add command line option -L to set more paths to load-path
Previous Next
Reported by: Jari Aalto <jari.aalto <at> cante.net>
Date: Fri, 17 Dec 2010 17:44:01 UTC
Severity: wishlist
Found in version 23.2+1-5.1
Fixed in version 19.29
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 7665 <at> debbugs.gnu.org (full text, mbox):
> | The question is: why do you need to do that?
> | Hence "What are these directories and how are they related
> | to my-test.el?" And "Why ~/elisp/package and ~/.emacs.d/downloaded?"
>
> Users download packages for Emas from emacswiki etc. and
> those packages are put either under: ~/elisp/ or ~/.emacs.d/
>
> To set the load-path to include more directories at command line is
> typically needed for
> - To test new features (as in above: my-test.el does
> something with 'require' commands).
> - To be able to set load-path for byte compiling packages
And I was thinking mainly of another use case: analyzing and reporting bugs.
I typically have many things open/loaded when I first detect a bug, and I use
lots of soft-`require's: (require 'foo nil t).
To narrow down the problem, I sometimes copy suspect files to a separate
directory, open `emacs -Q' and add just that directory to `load-path'. I use a
Windows shortcut to launch Emacs, and it would be handy to just put the -L into
the run command for the shortcut. This is also convenient if there are a couple
such directories that provide alternatives I want to compare.
Granted, this is all just convenience stuff - you can always modify `load-path'
using Lisp. But I think it could be useful.
IMO (without too much thought, so I could be wrong), the order of switch
processing should be just left to right. That way, you could use -L followed by
-l then a different -L followed by another -l etc. Assuming that each -L pushes
a directory to `load-path', the second -L would shadow the first, in case the -l
library is in both directories. Etc.
The real point of the last paragraph is that we should think over how we want
these switches to be processed, because the order can make a difference. The
processing order should anyway be (deterministic and) documented for users.
This bug report was last modified 12 years and 87 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.