GNU bug report logs -
#910
leim-list.el is looked up in too many places at startup
Previous Next
Reported by: Dan Nicolaescu <dann <at> ics.uci.edu>
Date: Sun, 7 Sep 2008 11:35:04 UTC
Severity: wishlist
Tags: notabug
Merged with 4789,
4881
Fixed in version 24.4
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 910 in the body.
You can then email your comments to 910 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#910
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Dan Nicolaescu <dann <at> ics.uci.edu>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
strace emacs -Q
shows that leim-list.el is looked up in 32 locations at startup. We
only have it in a single place.
Is this a leftover from the time when leim was distributed separately
from emacs?
It would be good if this redundant work would be avoided.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#910
; Package
emacs
.
Full text and
rfc822 format available.
Message #8 received at 910 <at> emacsbugs.donarmstrong.com (full text, mbox):
Dan Nicolaescu wrote:
> strace emacs -Q
>
> shows that leim-list.el is looked up in 32 locations at startup. We
> only have it in a single place. Is this a leftover from the time
> when leim was distributed separately from emacs?
>
> It would be good if this redundant work would be avoided.
It does seem superfluous. This works for me:
*** startup.el 23 Aug 2008 16:59:19 -0000 1.503
--- startup.el 10 Sep 2008 02:03:52 -0000
***************
*** 478,496 ****
;; Look in each dir in load-path for a subdirs.el file.
;; If we find one, load it, which will add the appropriate subdirs
;; of that dir into load-path,
- ;; Look for a leim-list.el file too. Loading it will register
- ;; available input methods.
(let ((tail load-path) dir)
(while tail
(setq dir (car tail))
(let ((default-directory dir))
(load (expand-file-name "subdirs.el") t t t))
- (let ((default-directory dir))
- (load (expand-file-name "leim-list.el") t t t))
;; We don't use a dolist loop and we put this "setq-cdr" command at
;; the end, because the subdirs.el files may add elements to the end
;; of load-path and we want to take it into account.
(setq tail (cdr tail))))
;; If the PWD environment variable isn't accurate, delete it.
(let ((pwd (getenv "PWD")))
(and (stringp pwd)
--- 478,501 ----
;; Look in each dir in load-path for a subdirs.el file.
;; If we find one, load it, which will add the appropriate subdirs
;; of that dir into load-path,
(let ((tail load-path) dir)
(while tail
(setq dir (car tail))
(let ((default-directory dir))
(load (expand-file-name "subdirs.el") t t t))
;; We don't use a dolist loop and we put this "setq-cdr" command at
;; the end, because the subdirs.el files may add elements to the end
;; of load-path and we want to take it into account.
(setq tail (cdr tail))))
+ ;; Look for a leim-list.el file. Loading it will register
+ ;; available input methods.
+ (let ((leim (expand-file-name "../leim/leim-list.el" data-directory)))
+ (condition-case nil
+ (load leim nil t t)
+ (error
+ (display-warning 'initialization
+ (format "Unable to load LEIM file `%s'" leim)
+ :error))))
;; If the PWD environment variable isn't accurate, delete it.
(let ((pwd (getenv "PWD")))
(and (stringp pwd)
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#910
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Dan Nicolaescu <dann <at> ics.uci.edu>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #13 received at 910 <at> emacsbugs.donarmstrong.com (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> Dan Nicolaescu wrote:
>
> > strace emacs -Q
> >
> > shows that leim-list.el is looked up in 32 locations at startup. We
> > only have it in a single place. Is this a leftover from the time
> > when leim was distributed separately from emacs?
> >
> > It would be good if this redundant work would be avoided.
>
>
> It does seem superfluous. This works for me:
Thanks!
> *** startup.el 23 Aug 2008 16:59:19 -0000 1.503
> --- startup.el 10 Sep 2008 02:03:52 -0000
> ***************
> *** 478,496 ****
> ;; Look in each dir in load-path for a subdirs.el file.
> ;; If we find one, load it, which will add the appropriate subdirs
> ;; of that dir into load-path,
> - ;; Look for a leim-list.el file too. Loading it will register
> - ;; available input methods.
> (let ((tail load-path) dir)
> (while tail
> (setq dir (car tail))
> (let ((default-directory dir))
> (load (expand-file-name "subdirs.el") t t t))
> - (let ((default-directory dir))
> - (load (expand-file-name "leim-list.el") t t t))
> ;; We don't use a dolist loop and we put this "setq-cdr" command at
> ;; the end, because the subdirs.el files may add elements to the end
> ;; of load-path and we want to take it into account.
> (setq tail (cdr tail))))
> ;; If the PWD environment variable isn't accurate, delete it.
> (let ((pwd (getenv "PWD")))
> (and (stringp pwd)
> --- 478,501 ----
> ;; Look in each dir in load-path for a subdirs.el file.
> ;; If we find one, load it, which will add the appropriate subdirs
> ;; of that dir into load-path,
> (let ((tail load-path) dir)
> (while tail
> (setq dir (car tail))
> (let ((default-directory dir))
> (load (expand-file-name "subdirs.el") t t t))
> ;; We don't use a dolist loop and we put this "setq-cdr" command at
> ;; the end, because the subdirs.el files may add elements to the end
> ;; of load-path and we want to take it into account.
> (setq tail (cdr tail))))
> + ;; Look for a leim-list.el file. Loading it will register
> + ;; available input methods.
> + (let ((leim (expand-file-name "../leim/leim-list.el" data-directory)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This won't work when building in a separate directory:
leim-list.el is generated in the build tree, not the
source tree (unlike what happens for .elc files...)
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#910
; Package
emacs
.
Full text and
rfc822 format available.
Message #16 received at 910 <at> emacsbugs.donarmstrong.com (full text, mbox):
Dan Nicolaescu wrote:
> > + (let ((leim (expand-file-name "../leim/leim-list.el" data-directory)))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> This won't work when building in a separate directory:
> leim-list.el is generated in the build tree, not the
> source tree (unlike what happens for .elc files...)
Looks like I can just use doc-directory instead of data-directory
here, and all will be well.
The only question is, if people are supposed to be able to have
multiple leim-list files, or to be able to add their own. I guess not?
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#910
; Package
emacs
.
Full text and
rfc822 format available.
Message #19 received at 910 <at> emacsbugs.donarmstrong.com (full text, mbox):
The original was also binding default-directory for some reason, so
here is a revised patch in case that matters.
Without having thought about it much, if leim-list is always loaded,
why isn't it dumped?
*** startup.el 23 Aug 2008 16:59:19 -0000 1.503
--- startup.el 10 Sep 2008 06:49:37 -0000
***************
*** 478,496 ****
;; Look in each dir in load-path for a subdirs.el file.
;; If we find one, load it, which will add the appropriate subdirs
;; of that dir into load-path,
- ;; Look for a leim-list.el file too. Loading it will register
- ;; available input methods.
(let ((tail load-path) dir)
(while tail
(setq dir (car tail))
(let ((default-directory dir))
(load (expand-file-name "subdirs.el") t t t))
- (let ((default-directory dir))
- (load (expand-file-name "leim-list.el") t t t))
;; We don't use a dolist loop and we put this "setq-cdr" command at
;; the end, because the subdirs.el files may add elements to the end
;; of load-path and we want to take it into account.
(setq tail (cdr tail))))
;; If the PWD environment variable isn't accurate, delete it.
(let ((pwd (getenv "PWD")))
(and (stringp pwd)
--- 478,505 ----
;; Look in each dir in load-path for a subdirs.el file.
;; If we find one, load it, which will add the appropriate subdirs
;; of that dir into load-path,
(let ((tail load-path) dir)
(while tail
(setq dir (car tail))
(let ((default-directory dir))
(load (expand-file-name "subdirs.el") t t t))
;; We don't use a dolist loop and we put this "setq-cdr" command at
;; the end, because the subdirs.el files may add elements to the end
;; of load-path and we want to take it into account.
(setq tail (cdr tail))))
+ ;; Load leim-list.el to register available input methods.
+ ;; Bug#910. We used to look for it in each directory in load-path.
+ ;; This is no longer necessary since leim is distributed with Emacs.
+ ;; doc-directory is used rather than data-directory for
+ ;; non-source-directory builds running uninstalled.
+ (let* ((leim (expand-file-name "../leim/leim-list.el" doc-directory))
+ (default-directory (file-name-directory leim)))
+ (condition-case nil
+ (load leim nil t t)
+ (error
+ (display-warning 'initialization
+ (format "Unable to load LEIM file `%s'" leim)
+ :error))))
;; If the PWD environment variable isn't accurate, delete it.
(let ((pwd (getenv "PWD")))
(and (stringp pwd)
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#910
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Andreas Schwab <schwab <at> suse.de>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #24 received at 910 <at> emacsbugs.donarmstrong.com (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> Dan Nicolaescu wrote:
>
>> strace emacs -Q
>>
>> shows that leim-list.el is looked up in 32 locations at startup. We
>> only have it in a single place. Is this a leftover from the time
>> when leim was distributed separately from emacs?
>>
>> It would be good if this redundant work would be avoided.
>
>
> It does seem superfluous.
Extensions can and do add their own leim-list.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab <at> suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Tags added: notabug, wontfix
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Thu, 11 Sep 2008 23:25:04 GMT)
Full text and
rfc822 format available.
Severity set to `wishlist' from `normal'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Thu, 11 Sep 2008 23:25:04 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#910
; Package
emacs
.
(Fri, 23 Oct 2009 05:45:04 GMT)
Full text and
rfc822 format available.
Message #31 received at 910 <at> emacsbugs.donarmstrong.com (full text, mbox):
tags 910 - wontfix
quit
See http://permalink.gmane.org/gmane.emacs.devel/116301
for Handa-san's opinion on how this should be handled.
Removed tag(s) wontfix.
Request was from
Dan Nicolaescu <dann <at> ics.uci.edu>
to
control <at> emacsbugs.donarmstrong.com
.
(Fri, 23 Oct 2009 05:45:06 GMT)
Full text and
rfc822 format available.
Forcibly Merged 910 4789 4881.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sat, 16 Jul 2011 23:39:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 24 Dec 2013 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 137 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.