[Top][All Lists]

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

bug#7665: Emacs: add command line option -L to set more paths toload-pat

From: Drew Adams
Subject: bug#7665: Emacs: add command line option -L to set more paths toload-path
Date: Sat, 18 Dec 2010 12:12:33 -0800

> | 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.

reply via email to

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