unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* leim-list.el and registering input methods
@ 2009-10-21  7:08 Dan Nicolaescu
  2009-10-21 17:59 ` Stefan Monnier
  2009-10-22  1:10 ` Kenichi Handa
  0 siblings, 2 replies; 8+ messages in thread
From: Dan Nicolaescu @ 2009-10-21  7:08 UTC (permalink / raw)
  To: emacs-devel


Is there a reason that input methods are not registered in the dumped image?
Instead they are registered at run time, even in batch mode: 

$ strace -o out.strace /usr/bin/emacs-23.1 -Q -batch -f kill-emacs
$ grep leim-list.el out.strace
stat64("/usr/share/emacs/23.1/site-lisp/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/site-lisp/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/site-lisp/site-start.d/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/url/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/textmodes/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/progmodes/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/play/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/org/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/nxml/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/net/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/mh-e/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/mail/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/language/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/international/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/gnus/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/eshell/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/erc/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/emulation/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/emacs-lisp/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/calendar/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/calc/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/lisp/obsolete/leim-list.el", 0xbfee0dc8) = -1 ENOENT (No such file or directory)
stat64("/usr/share/emacs/23.1/leim/leim-list.el", {st_mode=S_IFREG|0644, st_size=26950, ...}) = 0
open("/usr/share/emacs/23.1/leim/leim-list.el", O_RDONLY|O_LARGEFILE) = 3
read(3, ";;; leim-list.el -- list of LEIM "..., 511) = 511
stat64("/usr/share/emacs/23.1/leim/leim-list.el", {st_mode=S_IFREG|0644, st_size=26950, ...}) = 0
open("/usr/share/emacs/23.1/leim/leim-list.el", O_RDONLY|O_LARGEFILE) = 3
stat64("/usr/share/emacs/23.1/leim/leim-list.el", {st_mode=S_IFREG|0644, st_size=26950, ...}) = 0
open("/usr/share/emacs/23.1/leim/leim-list.el", O_RDONLY|O_LARGEFILE) = 3
read(3, ";;; leim-list.el -- list of LEIM "..., 26950) = 26950
readlink("/usr/share/emacs/23.1/leim/leim-list.el", 0x85489d0, 100) = -1 EINVAL (Invalid argument)

Wouldn't it be better if all these things where done before dumping?






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: leim-list.el and registering input methods
  2009-10-21  7:08 leim-list.el and registering input methods Dan Nicolaescu
@ 2009-10-21 17:59 ` Stefan Monnier
  2009-10-21 18:26   ` Dan Nicolaescu
  2009-11-04  6:30   ` Dan Nicolaescu
  2009-10-22  1:10 ` Kenichi Handa
  1 sibling, 2 replies; 8+ messages in thread
From: Stefan Monnier @ 2009-10-21 17:59 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

> Is there a reason that input methods are not registered in the dumped image?

Probably a remnant from the days where leim was distributed separately
from Emacs.  It would be good to move it to dump time.  But please be
careful to still make it possible to have additional input-methods
recognized at startup (not sure how it's supposed to work currently, so
maybe there's nothing special to do for that).


        Stefan




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: leim-list.el and registering input methods
  2009-10-21 17:59 ` Stefan Monnier
@ 2009-10-21 18:26   ` Dan Nicolaescu
  2009-11-04  6:30   ` Dan Nicolaescu
  1 sibling, 0 replies; 8+ messages in thread
From: Dan Nicolaescu @ 2009-10-21 18:26 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

  > > Is there a reason that input methods are not registered in the dumped image?
  > 
  > Probably a remnant from the days where leim was distributed separately
  > from Emacs.  It would be good to move it to dump time.  

Good.
I'll open a bug for this, I don't know enough about how this stuff works
to do it myself.

  > But please be
  > careful to still make it possible to have additional input-methods
  > recognized at startup (not sure how it's supposed to work currently, so
  > maybe there's nothing special to do for that).

Currently there's a search for leim-list.el in load-path (see the strace
log in my original message).
Shouldn't this search be more restricted, like what we do for
site-start.el and default.el?




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: leim-list.el and registering input methods
  2009-10-21  7:08 leim-list.el and registering input methods Dan Nicolaescu
  2009-10-21 17:59 ` Stefan Monnier
@ 2009-10-22  1:10 ` Kenichi Handa
  1 sibling, 0 replies; 8+ messages in thread
From: Kenichi Handa @ 2009-10-22  1:10 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

In article <200910210708.n9L78Qkg004553@godzilla.ics.uci.edu>, Dan Nicolaescu <dann@ics.uci.edu> writes:

> Is there a reason that input methods are not registered in the dumped image?
> Instead they are registered at run time, even in batch mode: 

For those having their own input methods.  They can have
their own leim-list.el in somewhere in the load-path.

But, I think there's no reason to search these directories:

/usr/share/emacs/23.1/lisp/url/
/usr/share/emacs/23.1/lisp/textmodes/
/usr/share/emacs/23.1/lisp/progmodes/
/usr/share/emacs/23.1/lisp/play/
/usr/share/emacs/23.1/lisp/org/
/usr/share/emacs/23.1/lisp/nxml/
/usr/share/emacs/23.1/lisp/net/
/usr/share/emacs/23.1/lisp/mh-e/
/usr/share/emacs/23.1/lisp/mail/
/usr/share/emacs/23.1/lisp/language/
/usr/share/emacs/23.1/lisp/international/
/usr/share/emacs/23.1/lisp/gnus/
/usr/share/emacs/23.1/lisp/eshell/
/usr/share/emacs/23.1/lisp/erc/
/usr/share/emacs/23.1/lisp/emulation/
/usr/share/emacs/23.1/lisp/emacs-lisp/
/usr/share/emacs/23.1/lisp/calendar/
/usr/share/emacs/23.1/lisp/calc/
/usr/share/emacs/23.1/lisp/obsolete/

So...

> Currently there's a search for leim-list.el in load-path (see the strace
> log in my original message).
> Shouldn't this search be more restricted, like what we do for
> site-start.el and default.el?

I agree.  But, we must also search the directories added to
load-path by users.

---
Kenichi Handa
handa@m17n.org





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: leim-list.el and registering input methods
  2009-10-21 17:59 ` Stefan Monnier
  2009-10-21 18:26   ` Dan Nicolaescu
@ 2009-11-04  6:30   ` Dan Nicolaescu
  2009-11-04 18:35     ` Stefan Monnier
  1 sibling, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2009-11-04  6:30 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

  > > Is there a reason that input methods are not registered in the dumped image?
  > 
  > Probably a remnant from the days where leim was distributed separately
  > from Emacs.  It would be good to move it to dump time.  But please be
  > careful to still make it possible to have additional input-methods
  > recognized at startup (not sure how it's supposed to work currently, so
  > maybe there's nothing special to do for that).

Here's one way to do this: check in the current emacs/leim/leim-list.el
to emacs/lisp/builtin-leim-list.el (or a better name?), and change the
emacs/leim/Makefile.in to build a file with a different name.

Whenever emacs/leim/* changes, then emacs/leim/builtin-leim-list.el
needs to be updated (like we do with ldefs-boot.el).

OK to check in something like this? 





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: leim-list.el and registering input methods
  2009-11-04  6:30   ` Dan Nicolaescu
@ 2009-11-04 18:35     ` Stefan Monnier
  2009-11-04 19:11       ` Dan Nicolaescu
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2009-11-04 18:35 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

> Here's one way to do this: check in the current emacs/leim/leim-list.el
> to emacs/lisp/builtin-leim-list.el (or a better name?),

Of course not: it's a generated file and there's no reason to keep it
in the CVS.  But renaming it is perfectly fine, yes.


        Stefan




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: leim-list.el and registering input methods
  2009-11-04 18:35     ` Stefan Monnier
@ 2009-11-04 19:11       ` Dan Nicolaescu
  2009-11-04 20:47         ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2009-11-04 19:11 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

  > > Here's one way to do this: check in the current emacs/leim/leim-list.el
  > > to emacs/lisp/builtin-leim-list.el (or a better name?),
  > 
  > Of course not: it's a generated file and there's no reason to keep it
  > in the CVS.  But renaming it is perfectly fine, yes.

The reason to check it in is that there's a bootstrap problem with it:
it gets created after dumping emacs, and we want to put the file in the
dumped image.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: leim-list.el and registering input methods
  2009-11-04 19:11       ` Dan Nicolaescu
@ 2009-11-04 20:47         ` Stefan Monnier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2009-11-04 20:47 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

>> > Here's one way to do this: check in the current emacs/leim/leim-list.el
>> > to emacs/lisp/builtin-leim-list.el (or a better name?),
>> Of course not: it's a generated file and there's no reason to keep it
>> in the CVS.  But renaming it is perfectly fine, yes.
> The reason to check it in is that there's a bootstrap problem with it:
> it gets created after dumping emacs, and we want to put the file in the
> dumped image.

Then we should change the build order so it can be built by
src/bootstrap-emacs.


        Stefan




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-11-04 20:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-21  7:08 leim-list.el and registering input methods Dan Nicolaescu
2009-10-21 17:59 ` Stefan Monnier
2009-10-21 18:26   ` Dan Nicolaescu
2009-11-04  6:30   ` Dan Nicolaescu
2009-11-04 18:35     ` Stefan Monnier
2009-11-04 19:11       ` Dan Nicolaescu
2009-11-04 20:47         ` Stefan Monnier
2009-10-22  1:10 ` Kenichi Handa

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).