* Tracing what is loading @ 2008-12-07 0:34 Harry Putnam 2008-12-07 9:58 ` Juanma Barranquero 0 siblings, 1 reply; 23+ messages in thread From: Harry Putnam @ 2008-12-07 0:34 UTC (permalink / raw) To: help-gnu-emacs I hope I've used good judgement here. I'm running 23 but the question is so basic I thought better to keep the line noise off the devel list and ask here. How can I ensure that some specific code of my choosing is loaded at the earliest possible point when emacs starts. What I want to do is load something like this: ;;[Tip from Kai G] make loaded files give a message (defadvice load (before debug-log activate) (message "Now loading: %s" (locate-library (ad-get-arg 0)))) That will tell exactly what is loading and in what order. Maybe there is a better or hopefully simpler way like possibly compiling something directly into the binary when it is compiled. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Tracing what is loading 2008-12-07 0:34 Tracing what is loading Harry Putnam @ 2008-12-07 9:58 ` Juanma Barranquero 2008-12-07 11:22 ` speedbar question Maindoor 2008-12-07 23:09 ` Tracing what is loading Harry Putnam 0 siblings, 2 replies; 23+ messages in thread From: Juanma Barranquero @ 2008-12-07 9:58 UTC (permalink / raw) To: Harry Putnam; +Cc: help-gnu-emacs On Sun, Dec 7, 2008 at 00:34, Harry Putnam <reader@newsguy.com> wrote: > ;;[Tip from Kai G] make loaded files give a message > (defadvice load (before debug-log activate) > (message "Now loading: %s" (locate-library (ad-get-arg 0)))) > > That will tell exactly what is loading and in what order. That will skip calls to Fload from C code (defadvice does not work for calls from C). > Maybe there is a better or hopefully simpler way like possibly > compiling something directly into the binary when it is compiled. Not necessarily simpler. If you want to do that on a permanent basis, you can add code to Fload to show a message. If it is just once for some debugging, you can use the trace facilities of GDB. Juanma ^ permalink raw reply [flat|nested] 23+ messages in thread
* speedbar question 2008-12-07 9:58 ` Juanma Barranquero @ 2008-12-07 11:22 ` Maindoor 2008-12-07 15:21 ` Drew Adams 2008-12-07 23:09 ` Tracing what is loading Harry Putnam 1 sibling, 1 reply; 23+ messages in thread From: Maindoor @ 2008-12-07 11:22 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 491 bytes --] I wanted to use mouse-1 single click to do all i want in speedbar instead of use mouse-2 ( scroll button ) click. I couldn't find an easy way so I edited dframe.el and swapped down-mouse-1 event and mouse-2 event. Now I got exactly what I want but the problem is that everytime i move the mouse in speedbar, i always get some highlight as if i am trying to copy something. Is there anyway to get around this or is there a way to solve this correctly ? Thanks, [-- Attachment #2: Type: text/html, Size: 636 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: speedbar question 2008-12-07 11:22 ` speedbar question Maindoor @ 2008-12-07 15:21 ` Drew Adams 2008-12-07 15:34 ` Maindoor 0 siblings, 1 reply; 23+ messages in thread From: Drew Adams @ 2008-12-07 15:21 UTC (permalink / raw) To: sanjeevfiles, help-gnu-emacs > I wanted to use mouse-1 single click to do all i want in > speedbar instead of use mouse-2 ( scroll button ) click. > I couldn't find an easy way so I edited dframe.el and > swapped down-mouse-1 event and mouse-2 event. > Now I got exactly what I want but the problem is > that everytime i move the mouse in speedbar, i always > get some highlight as if i am trying to copy something. > Is there anyway to get around this or is there a way to > solve this correctly ? [Plain text, not HTML mail, please.] What Emacs version are you using? In Emacs 22 or later `mouse-1' should do what you want by default, and the behavior is controlled by option `mouse-1-click-follows-link'. ^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: speedbar question 2008-12-07 15:21 ` Drew Adams @ 2008-12-07 15:34 ` Maindoor 2008-12-07 17:10 ` Drew Adams 0 siblings, 1 reply; 23+ messages in thread From: Maindoor @ 2008-12-07 15:34 UTC (permalink / raw) To: help-gnu-emacs, Drew Adams [-- Attachment #1: Type: text/plain, Size: 1615 bytes --] I'm using 23.0.60.1 which would be the very latest, I'm running ubuntu 8.04. mouse-1 doesn't do anything in speedbar, while clicking the button in scroll wheel( mouse-2) or the middle button in thinkpad selects the buffer or expands etc. I think its a trivial bug. But by customizing i should be able to change it, I'm wondering how. The reason I'm saying its a trivial bug is because, it is not intuitive and because, if you are familiar with dframe.el in speedbar, middle button is mapped to dframe-click event and mouse-1 is mapped to dframe-double-click event in dframe.el which is kind of inverse. Please let me know if you have any ideas on how to customize it. Thanks. --- On Sun, 12/7/08, Drew Adams <drew.adams@oracle.com> wrote: From: Drew Adams <drew.adams@oracle.com> Subject: RE: speedbar question To: sanjeevfiles@yahoo.com, help-gnu-emacs@gnu.org Date: Sunday, December 7, 2008, 8:51 PM > I wanted to use mouse-1 single click to do all i want in > speedbar instead of use mouse-2 ( scroll button ) click. > I couldn't find an easy way so I edited dframe.el and > swapped down-mouse-1 event and mouse-2 event. > Now I got exactly what I want but the problem is > that everytime i move the mouse in speedbar, i always > get some highlight as if i am trying to copy something. > Is there anyway to get around this or is there a way to > solve this correctly ? [Plain text, not HTML mail, please.] What Emacs version are you using? In Emacs 22 or later `mouse-1' should do what you want by default, and the behavior is controlled by option `mouse-1-click-follows-link'. [-- Attachment #2: Type: text/html, Size: 2029 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: speedbar question 2008-12-07 15:34 ` Maindoor @ 2008-12-07 17:10 ` Drew Adams 2008-12-08 5:42 ` Maindoor 2008-12-08 5:46 ` speedbar question Maindoor 0 siblings, 2 replies; 23+ messages in thread From: Drew Adams @ 2008-12-07 17:10 UTC (permalink / raw) To: sanjeevfiles, help-gnu-emacs > > > I wanted to use mouse-1 single click to do all i want in > > > speedbar instead of use mouse-2 ( scroll button ) click. > > > I couldn't find an easy way so I edited dframe.el and > > > swapped down-mouse-1 event and mouse-2 event. > > > Now I got exactly what I want but the problem is > > > that everytime i move the mouse in speedbar, i always > > > get some highlight as if i am trying to copy something. > > > Is there anyway to get around this or is there a way to > > > solve this correctly ? > > > > What Emacs version are you using? In Emacs 22 or later `mouse-1' should > > do what you want by default, and the behavior is controlled by option > > `mouse-1-click-follows-link'. > > I'm using 23.0.60.1 which would be the very latest, I'm running ubuntu > 8.04. mouse-1 doesn't do anything in speedbar, while clicking the > button in scroll wheel( mouse-2) or the middle button in thinkpad > selects the buffer or expands etc. I think its a trivial bug. But by > customizing i should be able to change it, I'm wondering how. > > The reason I'm saying its a trivial bug is because, it is not > intuitive and because, if you are familiar with dframe.el in speedbar, > middle button is mapped to dframe-click event and mouse-1 is mapped to > dframe-double-click event in dframe.el which is kind of > inverse. Please let me know if you have any ideas on how to customize it. [Please don't top-post. Use plain text, not HTML, for this mailing list.] Are you using emacs -Q? If not, perhaps something in your .emacs is causing the problem. What is your value of `mouse-1-click-follows-link'? I don't see the problem, with emacs -Q in this build: In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-11-24 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' If your version is more recent than that, check Emacs NEWS (`C-h n') to see if this change was intentional. If it was not, please file an Emacs bug: `M-x report-emacs-bug'. ^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: speedbar question 2008-12-07 17:10 ` Drew Adams @ 2008-12-08 5:42 ` Maindoor 2008-12-08 7:06 ` Speedbar is messed up Maindoor 2008-12-08 5:46 ` speedbar question Maindoor 1 sibling, 1 reply; 23+ messages in thread From: Maindoor @ 2008-12-08 5:42 UTC (permalink / raw) To: help-gnu-emacs, Drew Adams [-- Attachment #1: Type: text/plain, Size: 2500 bytes --] I tried emacs -Q but the behavior is the same. and some version on windows works fine too. I think this is a bug and I've filed a bug report too. Thanks. --- On Sun, 12/7/08, Drew Adams <drew.adams@oracle.com> wrote: From: Drew Adams <drew.adams@oracle.com> Subject: RE: speedbar question To: sanjeevfiles@yahoo.com, help-gnu-emacs@gnu.org Date: Sunday, December 7, 2008, 10:40 PM > > > I wanted to use mouse-1 single click to do all i want in > > > speedbar instead of use mouse-2 ( scroll button ) click. > > > I couldn't find an easy way so I edited dframe.el and > > > swapped down-mouse-1 event and mouse-2 event. > > > Now I got exactly what I want but the problem is > > > that everytime i move the mouse in speedbar, i always > > > get some highlight as if i am trying to copy something. > > > Is there anyway to get around this or is there a way to > > > solve this correctly ? > > > > What Emacs version are you using? In Emacs 22 or later `mouse-1' should > > do what you want by default, and the behavior is controlled by option > > `mouse-1-click-follows-link'. > > I'm using 23.0.60.1 which would be the very latest, I'm running ubuntu > 8.04. mouse-1 doesn't do anything in speedbar, while clicking the > button in scroll wheel( mouse-2) or the middle button in thinkpad > selects the buffer or expands etc. I think its a trivial bug. But by > customizing i should be able to change it, I'm wondering how. > > The reason I'm saying its a trivial bug is because, it is not > intuitive and because, if you are familiar with dframe.el in speedbar, > middle button is mapped to dframe-click event and mouse-1 is mapped to > dframe-double-click event in dframe.el which is kind of > inverse. Please let me know if you have any ideas on how to customize it. [Please don't top-post. Use plain text, not HTML, for this mailing list.] Are you using emacs -Q? If not, perhaps something in your .emacs is causing the problem. What is your value of `mouse-1-click-follows-link'? I don't see the problem, with emacs -Q in this build: In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-11-24 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' If your version is more recent than that, check Emacs NEWS (`C-h n') to see if this change was intentional. If it was not, please file an Emacs bug: `M-x report-emacs-bug'. [-- Attachment #2: Type: text/html, Size: 3105 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* Speedbar is messed up 2008-12-08 5:42 ` Maindoor @ 2008-12-08 7:06 ` Maindoor 2008-12-08 7:11 ` Maindoor 0 siblings, 1 reply; 23+ messages in thread From: Maindoor @ 2008-12-08 7:06 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 3061 bytes --] Looks like this issue is there for a while: who made it this way ? Its awful. Thanks to Drew Adams for pointing me in the right direction. http://www.nabble.com/New-speedbar-version-td1003419.html Some one fix this. I tried playing with the mouse-1-click-follows-link variable, still nothing. sanjeev. --- On Mon, 12/8/08, Maindoor <sanjeevfiles@yahoo.com> wrote: From: Maindoor <sanjeevfiles@yahoo.com> Subject: RE: speedbar question To: help-gnu-emacs@gnu.org, "Drew Adams" <drew.adams@oracle.com> Date: Monday, December 8, 2008, 11:12 AM I tried emacs -Q but the behavior is the same. and some version on windows works fine too. I think this is a bug and I've filed a bug report too. Thanks. --- On Sun, 12/7/08, Drew Adams <drew.adams@oracle.com> wrote: From: Drew Adams <drew.adams@oracle.com> Subject: RE: speedbar question To: sanjeevfiles@yahoo.com, help-gnu-emacs@gnu.org Date: Sunday, December 7, 2008, 10:40 PM > > > I wanted to use mouse-1 single click to do all i want in > > > speedbar instead of use mouse-2 ( scroll button ) click. > > > I couldn't find an easy way so I edited dframe.el and > > > swapped down-mouse-1 event and mouse-2 event. > > > Now I got exactly what I want but the problem is > > > that everytime i move the mouse in speedbar, i always > > > get some highlight as if i am trying to copy something. > > > Is there anyway to get around this or is there a way to > > > solve this correctly ? > > > > What Emacs version are you using? In Emacs 22 or later `mouse-1' should > > do what you want by default, and the behavior is controlled by option > > `mouse-1-click-follows-link'. > > I'm using 23.0.60.1 which would be the very latest, I'm running ubuntu > 8.04. mouse-1 doesn't do anything in speedbar, while clicking the > button in scroll wheel( mouse-2) or the middle button in thinkpad > selects the buffer or expands etc. I think its a trivial bug. But by > customizing i should be able to change it, I'm wondering how. > > The reason I'm saying its a trivial bug is because, it is not > intuitive and because, if you are familiar with dframe.el in speedbar, > middle button is mapped to dframe-click event and mouse-1 is mapped to > dframe-double-click event in dframe.el which is kind of > inverse. Please let me know if you have any ideas on how to customize it. [Please don't top-post. Use plain text, not HTML, for this mailing list.] Are you using emacs -Q? If not, perhaps something in your .emacs is causing the problem. What is your value of `mouse-1-click-follows-link'? I don't see the problem, with emacs -Q in this build: In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-11-24 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' If your version is more recent than that, check Emacs NEWS (`C-h n') to see if this change was intentional. If it was not, please file an Emacs bug: `M-x report-emacs-bug'. [-- Attachment #2: Type: text/html, Size: 4217 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Speedbar is messed up 2008-12-08 7:06 ` Speedbar is messed up Maindoor @ 2008-12-08 7:11 ` Maindoor 0 siblings, 0 replies; 23+ messages in thread From: Maindoor @ 2008-12-08 7:11 UTC (permalink / raw) To: help-gnu-emacs; +Cc: cyd, romain, dev.null [-- Attachment #1: Type: text/plain, Size: 3332 bytes --] Including some folks who seemed to have worked on this: --- On Mon, 12/8/08, Maindoor <sanjeevfiles@yahoo.com> wrote: From: Maindoor <sanjeevfiles@yahoo.com> Subject: Speedbar is messed up To: help-gnu-emacs@gnu.org Date: Monday, December 8, 2008, 12:36 PM Looks like this issue is there for a while: who made it this way ? Its awful. Thanks to Drew Adams for pointing me in the right direction. http://www.nabble.com/New-speedbar-version-td1003419.html Some one fix this. I tried playing with the mouse-1-click-follows-link variable, still nothing. sanjeev. --- On Mon, 12/8/08, Maindoor <sanjeevfiles@yahoo.com> wrote: From: Maindoor <sanjeevfiles@yahoo.com> Subject: RE: speedbar question To: help-gnu-emacs@gnu.org, "Drew Adams" <drew.adams@oracle.com> Date: Monday, December 8, 2008, 11:12 AM I tried emacs -Q but the behavior is the same. and some version on windows works fine too. I think this is a bug and I've filed a bug report too. Thanks. --- On Sun, 12/7/08, Drew Adams <drew.adams@oracle.com> wrote: From: Drew Adams <drew.adams@oracle.com> Subject: RE: speedbar question To: sanjeevfiles@yahoo.com, help-gnu-emacs@gnu.org Date: Sunday, December 7, 2008, 10:40 PM > > > I wanted to use mouse-1 single click to do all i want in > > > speedbar instead of use mouse-2 ( scroll button ) click. > > > I couldn't find an easy way so I edited dframe.el and > > > swapped down-mouse-1 event and mouse-2 event. > > > Now I got exactly what I want but the problem is > > > that everytime i move the mouse in speedbar, i always > > > get some highlight as if i am trying to copy something. > > > Is there anyway to get around this or is there a way to > > > solve this correctly ? > > > > What Emacs version are you using? In Emacs 22 or later `mouse-1' should > > do what you want by default, and the behavior is controlled by option > > `mouse-1-click-follows-link'. > > I'm using 23.0.60.1 which would be the very latest, I'm running ubuntu > 8.04. mouse-1 doesn't do anything in speedbar, while clicking the > button in scroll wheel( mouse-2) or the middle button in thinkpad > selects the buffer or expands etc. I think its a trivial bug. But by > customizing i should be able to change it, I'm wondering how. > > The reason I'm saying its a trivial bug is because, it is not > intuitive and because, if you are familiar with dframe.el in speedbar, > middle button is mapped to dframe-click event and mouse-1 is mapped to > dframe-double-click event in dframe.el which is kind of > inverse. Please let me know if you have any ideas on how to customize it. [Please don't top-post. Use plain text, not HTML, for this mailing list.] Are you using emacs -Q? If not, perhaps something in your .emacs is causing the problem. What is your value of `mouse-1-click-follows-link'? I don't see the problem, with emacs -Q in this build: In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-11-24 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' If your version is more recent than that, check Emacs NEWS (`C-h n') to see if this change was intentional. If it was not, please file an Emacs bug: `M-x report-emacs-bug'. [-- Attachment #2: Type: text/html, Size: 4985 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: speedbar question 2008-12-07 17:10 ` Drew Adams 2008-12-08 5:42 ` Maindoor @ 2008-12-08 5:46 ` Maindoor 1 sibling, 0 replies; 23+ messages in thread From: Maindoor @ 2008-12-08 5:46 UTC (permalink / raw) To: help-gnu-emacs, Drew Adams [-- Attachment #1: Type: text/plain, Size: 2387 bytes --] mouse-1-click-follows-link value is 450. --- On Sun, 12/7/08, Drew Adams <drew.adams@oracle.com> wrote: From: Drew Adams <drew.adams@oracle.com> Subject: RE: speedbar question To: sanjeevfiles@yahoo.com, help-gnu-emacs@gnu.org Date: Sunday, December 7, 2008, 10:40 PM > > > I wanted to use mouse-1 single click to do all i want in > > > speedbar instead of use mouse-2 ( scroll button ) click. > > > I couldn't find an easy way so I edited dframe.el and > > > swapped down-mouse-1 event and mouse-2 event. > > > Now I got exactly what I want but the problem is > > > that everytime i move the mouse in speedbar, i always > > > get some highlight as if i am trying to copy something. > > > Is there anyway to get around this or is there a way to > > > solve this correctly ? > > > > What Emacs version are you using? In Emacs 22 or later `mouse-1' should > > do what you want by default, and the behavior is controlled by option > > `mouse-1-click-follows-link'. > > I'm using 23.0.60.1 which would be the very latest, I'm running ubuntu > 8.04. mouse-1 doesn't do anything in speedbar, while clicking the > button in scroll wheel( mouse-2) or the middle button in thinkpad > selects the buffer or expands etc. I think its a trivial bug. But by > customizing i should be able to change it, I'm wondering how. > > The reason I'm saying its a trivial bug is because, it is not > intuitive and because, if you are familiar with dframe.el in speedbar, > middle button is mapped to dframe-click event and mouse-1 is mapped to > dframe-double-click event in dframe.el which is kind of > inverse. Please let me know if you have any ideas on how to customize it. [Please don't top-post. Use plain text, not HTML, for this mailing list.] Are you using emacs -Q? If not, perhaps something in your .emacs is causing the problem. What is your value of `mouse-1-click-follows-link'? I don't see the problem, with emacs -Q in this build: In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-11-24 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' If your version is more recent than that, check Emacs NEWS (`C-h n') to see if this change was intentional. If it was not, please file an Emacs bug: `M-x report-emacs-bug'. [-- Attachment #2: Type: text/html, Size: 2981 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Tracing what is loading 2008-12-07 9:58 ` Juanma Barranquero 2008-12-07 11:22 ` speedbar question Maindoor @ 2008-12-07 23:09 ` Harry Putnam 2008-12-08 0:41 ` Juanma Barranquero 1 sibling, 1 reply; 23+ messages in thread From: Harry Putnam @ 2008-12-07 23:09 UTC (permalink / raw) To: help-gnu-emacs "Juanma Barranquero" <lekktu@gmail.com> writes: > On Sun, Dec 7, 2008 at 00:34, Harry Putnam <reader@newsguy.com> wrote: > >> ;;[Tip from Kai G] make loaded files give a message >> (defadvice load (before debug-log activate) >> (message "Now loading: %s" (locate-library (ad-get-arg 0)))) >> >> That will tell exactly what is loading and in what order. > > That will skip calls to Fload from C code (defadvice does not work for > calls from C). > >> Maybe there is a better or hopefully simpler way like possibly >> compiling something directly into the binary when it is compiled. > > Not necessarily simpler. If you want to do that on a permanent basis, > you can add code to Fload to show a message. If it is just once for > some debugging, you can use the trace facilities of GDB. google on `emacs Fload' turns of a big mess of nothing A search on gmane in emacs.help group on `fload' turns up one hit and its just a gush of output from some kind of compile command. find /usr/share/emacs -iname '*fload*' <no hits> I've been using emacs for 10 yrs now (Probably should not admit that..) and I've never heard of `Fload'. So ok, I'll bite.. what is `Fload'? ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Tracing what is loading 2008-12-07 23:09 ` Tracing what is loading Harry Putnam @ 2008-12-08 0:41 ` Juanma Barranquero 2008-12-08 4:46 ` Harry Putnam 0 siblings, 1 reply; 23+ messages in thread From: Juanma Barranquero @ 2008-12-08 0:41 UTC (permalink / raw) To: Harry Putnam; +Cc: help-gnu-emacs On Sun, Dec 7, 2008 at 23:09, Harry Putnam <reader@newsguy.com> wrote: > So ok, I'll bite.. what is `Fload'? Sorry. Fload is the `load' function. If you search the C code, you'll see that emacs lisp functions defined in C are called F + name of function. What I wanted to say is that the load function is defined in C (and called Fload in the C code), so if you advise it you won't get information about the times it is called from other C code (search Fload in the src/ directory to see where does that happen). But you can modify Fload and add code to show what it is loading. Juanma ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Tracing what is loading 2008-12-08 0:41 ` Juanma Barranquero @ 2008-12-08 4:46 ` Harry Putnam 0 siblings, 0 replies; 23+ messages in thread From: Harry Putnam @ 2008-12-08 4:46 UTC (permalink / raw) To: help-gnu-emacs "Juanma Barranquero" <lekktu@gmail.com> writes: > Fload is the `load' function. If you search the C code, you'll see > that emacs lisp functions defined in C are called F + name of > function. > > What I wanted to say is that the load function is defined in C (and > called Fload in the C code), so if you advise it you won't get > information about the times it is called from other C code (search > Fload in the src/ directory to see where does that happen). But you > can modify Fload and add code to show what it is loading. I see, so the more I think about this the more it looks pretty daunting. One thing that should make it easier though is that I don't really need to track the c code.. What I'm after is to get something into the init process ahead of everything else. Something that reports what is loading... (except c code). My aim is to get one jump ahead of the OS developers who think they need to interfere or `direct' emacs for me. To me it can be pretty confusing to determine what is happening as emacs starts up. I'm just trying to see what files get loaded before my own `site-start' file, So I can either head it off or leave it alone depending on what it seems to try to do. The `site' in this case is just a single user machine so no problems dealing with disgruntled users if I do stuff in site-start.el in order to keep .emacs to some sensible size. From Dmitrys' post I got the URL: (info "(elisp) Standard Hooks") And tracked it into this section where I found this: (info "(elisp) Init File") -- Variable: before-init-hook This normal hook is run, once, just before loading all the init files (the user's init file, `default.el', and/or `site-start.el'). (The only way to change it with real effect is before dumping Emacs.) Its not at all clear what it means to say it is `run' once but it doesn't really sound like it can be taken advantage of. If so; Would this involve just a text edit? I'm not at all sure how to take advantage of a `hook'. I have a few in my init files but they are blatantly plagerized here or some other group like the gnus groups. ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <mailman.2095.1228610078.26697.help-gnu-emacs@gnu.org>]
* Re: Tracing what is loading [not found] <mailman.2095.1228610078.26697.help-gnu-emacs@gnu.org> @ 2008-12-07 10:01 ` Dmitry Dzhus 2008-12-07 13:10 ` Michael Heerdegen 1 sibling, 0 replies; 23+ messages in thread From: Dmitry Dzhus @ 2008-12-07 10:01 UTC (permalink / raw) To: help-gnu-emacs Harry Putnam wrote: > I hope I've used good judgement here. I'm running 23 but the question > is so basic I thought better to keep the line noise off the devel list > and ask here. > > How can I ensure that some specific code of my choosing is loaded at > the earliest possible point when emacs starts. > > What I want to do is load something like this: > > ;;[Tip from Kai G] make loaded files give a message > (defadvice load (before debug-log activate) > (message "Now loading: %s" (locate-library (ad-get-arg 0)))) > > That will tell exactly what is loading and in what order. > > Maybe there is a better or hopefully simpler way like possibly > compiling something directly into the binary when it is compiled. > > > See `emacs-startup-hook` and other (info "(elisp) Standard Hooks") -- Happy Hacking. http://sphinx.net.ru む ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Tracing what is loading [not found] <mailman.2095.1228610078.26697.help-gnu-emacs@gnu.org> 2008-12-07 10:01 ` Dmitry Dzhus @ 2008-12-07 13:10 ` Michael Heerdegen 2008-12-08 4:54 ` Harry Putnam [not found] ` <mailman.2193.1228712089.26697.help-gnu-emacs@gnu.org> 1 sibling, 2 replies; 23+ messages in thread From: Michael Heerdegen @ 2008-12-07 13:10 UTC (permalink / raw) To: help-gnu-emacs Maybe the variable `load-history' is interesting for you. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Tracing what is loading 2008-12-07 13:10 ` Michael Heerdegen @ 2008-12-08 4:54 ` Harry Putnam [not found] ` <mailman.2193.1228712089.26697.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 23+ messages in thread From: Harry Putnam @ 2008-12-08 4:54 UTC (permalink / raw) To: help-gnu-emacs Michael Heerdegen <michael_heerdegen@web.de> writes: > Maybe the variable `load-history' is interesting for you. Well that cranked out a whipping 11,000+ lines. (In an emacs that had been up a few hours). But I'll be darned if I could see what to do with it. Starting a fresh emacs like `emacs .' The values start already at dired stuff (wrapped for mail): Value: (("/usr/share/emacs/22.3/lisp/dired.elc" dired-listing-switches dired-subdir-switches dired-chown-program dired-use-ls-dired dired-chmod-program dired-touch-program dired-ls-F-marks-symlinks dired-trivial-filenames dired-keep-marker-rename dired-keep-mark I want to know what happened further back. ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <mailman.2193.1228712089.26697.help-gnu-emacs@gnu.org>]
* Re: Tracing what is loading [not found] ` <mailman.2193.1228712089.26697.help-gnu-emacs@gnu.org> @ 2008-12-08 18:21 ` Michael Heerdegen 2008-12-08 20:09 ` Harry Putnam 2008-12-09 6:30 ` Harry Putnam 0 siblings, 2 replies; 23+ messages in thread From: Michael Heerdegen @ 2008-12-08 18:21 UTC (permalink / raw) To: help-gnu-emacs Please note that there already _is_ a message for every file loaded. But because the *Messages* buffer only shows the last 50 (or so) messages, you can't see them because starting up causes quite more messages. Indeed all you need is `load-history'. Due to the internal structure of lists, the last item belongs to the first load file and vice versa, so you must read it bottom up. I have written a command which only shows the files, in the right order: (defun list-load-files () (interactive) (with-current-buffer (get-buffer-create "*Load History*") (erase-buffer) (insert (format "%s" "Load History\n============\n\n")) (mapc (lambda (x) (insert (format "%s\n" (car x)))) (reverse load-history)) (pop-to-buffer (current-buffer)))) You can eval it with M-:. Call it with M-x list-load-files. The listing should cover all lisp files ever loaded after startup. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Tracing what is loading 2008-12-08 18:21 ` Michael Heerdegen @ 2008-12-08 20:09 ` Harry Putnam 2008-12-09 6:30 ` Harry Putnam 1 sibling, 0 replies; 23+ messages in thread From: Harry Putnam @ 2008-12-08 20:09 UTC (permalink / raw) To: help-gnu-emacs Michael Heerdegen <michael_heerdegen@web.de> writes: > Please note that there already _is_ a message for every file loaded. But > because the *Messages* buffer only shows the last 50 (or so) messages, > you can't see them because starting up causes quite more messages. Very kind of you to take time to explain patiently and write a nice function that does _exactly_ what I was after. Thank you very much. I was suprised to see that ~/.emacs is loaded so far after so much other stuff. and some 118 other things are loaded even before site-start.el which I always thought loaded very early. Thanks again... very helpful ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Tracing what is loading 2008-12-08 18:21 ` Michael Heerdegen 2008-12-08 20:09 ` Harry Putnam @ 2008-12-09 6:30 ` Harry Putnam 2008-12-10 2:56 ` Kevin Rodgers 1 sibling, 1 reply; 23+ messages in thread From: Harry Putnam @ 2008-12-09 6:30 UTC (permalink / raw) To: help-gnu-emacs Michael Heerdegen <michael_heerdegen@web.de> writes: > Please note that there already _is_ a message for every file loaded. But > because the *Messages* buffer only shows the last 50 (or so) messages, > you can't see them because starting up causes quite more messages. Sorry to be back bugging you again but maybe you can add a little more here. Looking at that list, I see some anomalies. The first 105 lines are of this form: /usr/share/emacs/22.3/lisp/term/x-win.elc All are in /usr/share/emacs/22.3* Then comes a line (106): /usr/local/GNUS/lisp/gnus-load.el An address that is not a normal path to be searched. How did emacs know to look there? That is the address to gnus but not the one in the emacs distribution. This is the cvs version. The information that tells emacs where to look for that lisp directory resides in /usr/local/share/emacs/site-lisp/site-start.el Which according to the list has not yet been loaded. That doesn't show up until line 118 /usr/local/share/emacs/site-lisp/site-start.el So is this listing just not accurate to that degree or is something else going on? I ask because I'm trying to discover when certain init files are loaded. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Tracing what is loading 2008-12-09 6:30 ` Harry Putnam @ 2008-12-10 2:56 ` Kevin Rodgers 2008-12-10 8:47 ` Harry Putnam [not found] ` <mailman.2437.1228898847.26697.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 23+ messages in thread From: Kevin Rodgers @ 2008-12-10 2:56 UTC (permalink / raw) To: help-gnu-emacs Harry Putnam wrote: > Michael Heerdegen <michael_heerdegen@web.de> writes: > >> Please note that there already _is_ a message for every file loaded. But >> because the *Messages* buffer only shows the last 50 (or so) messages, >> you can't see them because starting up causes quite more messages. > > Sorry to be back bugging you again but maybe you can add a little more > here. > > Looking at that list, I see some anomalies. > > The first 105 lines are of this form: > /usr/share/emacs/22.3/lisp/term/x-win.elc > > All are in /usr/share/emacs/22.3* I think those were dumped into the emacs executable. > Then comes a line (106): > > /usr/local/GNUS/lisp/gnus-load.el > > An address that is not a normal path to be searched. > How did emacs know to look there? > > That is the address to gnus but not the one in the emacs > distribution. This is the cvs version. Hmmm, perhaps that directory was in load-path at some point, or the file was loaded using its absolute file name. > The information that tells emacs where to look for that lisp directory > resides in /usr/local/share/emacs/site-lisp/site-start.el > > Which according to the list has not yet been loaded. > > That doesn't show up until line 118 > /usr/local/share/emacs/site-lisp/site-start.el > > So is this listing just not accurate to that degree or is something else > going on? I ask because I'm trying to discover when certain init > files are loaded. Does /usr/local/GNUS/lisp/gnus-load.el show up in the list when you start emacs with -Q? What about the other files between it and /usr/local/share/emacs/site-lisp/site-start.el? -- Kevin Rodgers Denver, Colorado, USA ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Tracing what is loading 2008-12-10 2:56 ` Kevin Rodgers @ 2008-12-10 8:47 ` Harry Putnam [not found] ` <mailman.2437.1228898847.26697.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 23+ messages in thread From: Harry Putnam @ 2008-12-10 8:47 UTC (permalink / raw) To: help-gnu-emacs Kevin Rodgers <kevin.d.rodgers@gmail.com> writes: [...] >> All are in /usr/share/emacs/22.3* > > I think those were dumped into the emacs executable. > >> Then comes a line (106): >> >> /usr/local/GNUS/lisp/gnus-load.el >> >> An address that is not a normal path to be searched. >> How did emacs know to look there? >> >> That is the address to gnus but not the one in the emacs >> distribution. This is the cvs version. > > Hmmm, perhaps that directory was in load-path at some point, > or the file was loaded using its absolute file name. > >> The information that tells emacs where to look for that lisp directory >> resides in /usr/local/share/emacs/site-lisp/site-start.el >> >> Which according to the list has not yet been loaded. >> >> That doesn't show up until line 118 >> /usr/local/share/emacs/site-lisp/site-start.el >> >> So is this listing just not accurate to that degree or is something else >> going on? I ask because I'm trying to discover when certain init >> files are loaded. > > Does /usr/local/GNUS/lisp/gnus-load.el show up in the list when you > start emacs with -Q? What about the other files between it and > /usr/local/share/emacs/site-lisp/site-start.el? No and site-start.el doesn't either but then they shouldn't with -Q Even with -Q though I do see one anomaly. The whole list (108) lines), with the exception of two lines near the end are all in /usr/share/emacs/22.3. and you've suggested how that happens. /usr/share/emacs/site-lisp/subdirs.el (loads at 102) Again that seams normal enough. And this one is a little puzzling: /home/reader/.abbrev_defs (loads at line 106) But of course ~/.emacs is not loaded with the -Q flag so what instructs emacs to load ~/.abbrev_defs? I thought ~/.emacs was doing that. I do have code there about .abbrev_defs, But as you can see, even with -Q something has caused emacs to load ~/.abbrev_defs. I'm beginning to think my initial thought to track things in the *Messages* buffer is a better place to track init files. The history-list shows the cart before the horse in several instances and the list is cluttered with too much stuff that isn't related to init files. Here is a similar example.. loading emacs without -Q: /anex/usr/local/share/emacs/site-lisp/whats_loading.el (line 110) /usr/local/GNUS/lisp/gnus-load.el (line 111) Both of those things are loaded from site-start.el (I'm pretty sure that's the only place. And the `shadow' list bears that out too. /usr/local/share/emacs/site-lisp/site-start.el (line 119) The history list has site-start.el loading 8,9 lines after 2 items that are only loaded from site-start.el. But looking at the *Messages* output.. things appear in the right order. However, I don't see the init files gentoo developers have stuck in /usr/share/emacs/site-lisp. I think they are loading somewhere before my site-start.el file but neither the history-list or *Messages* shows it. I can probably get to the bottom of it by putting a message in those files or something... still the whole init process is pretty confusing. ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <mailman.2437.1228898847.26697.help-gnu-emacs@gnu.org>]
* Re: Tracing what is loading [not found] ` <mailman.2437.1228898847.26697.help-gnu-emacs@gnu.org> @ 2008-12-10 19:14 ` Michael Heerdegen 2008-12-11 1:46 ` Harry Putnam 0 siblings, 1 reply; 23+ messages in thread From: Michael Heerdegen @ 2008-12-10 19:14 UTC (permalink / raw) To: help-gnu-emacs Hello again, ~/.abbrevs is the default value of `abbrev-file-name', defined in `paths.el'. This is set also with emacs -Q. `load-history' is a flat list, so we can't expect that it reflects the recursive load history perfectly. I don't know if file names are added when loading the file starts or when it ends. Maybe interesting for you: There is a variable `message-log-max' which defines how much messages are remembered in the *Messages* buffer. One can set it to `t' which means `no limit', but of course its to late for you to do this after startup. `message-log-max' is defined in `.../emacs/src/xdisp.c', maybe one can simply edit and recompile this file? P.S.: Why do you have to know which files are loaded at which time that exactly? Michael ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Tracing what is loading 2008-12-10 19:14 ` Michael Heerdegen @ 2008-12-11 1:46 ` Harry Putnam 0 siblings, 0 replies; 23+ messages in thread From: Harry Putnam @ 2008-12-11 1:46 UTC (permalink / raw) To: help-gnu-emacs Michael Heerdegen <michael_heerdegen@web.de> writes: > > P.S.: Why do you have to know which files are loaded at which time that > exactly? Sort of a nothing reason really. I started out trying to figure out what OS developers (of gentoo) had inserted in places that would load before my own site-start file. I could have just put (message "here I is") in them and seen if that turned up before site-start.el. So far as having unlimited Messages buffer; I don't find that it gets over run just on a startup, and thats the only time I was concerned with. Gentoo developers put these files in place when you install emacs with their `emerge' tool: /usr/share/emacs/site-lisp/site-gentoo.el This directory: /usr/share/emacs/site-lisp/site-gentoo.d And these files: ls /usr/share/emacs/site-lisp/site-gentoo.d 20emacs-22-gentoo.el 20emacs-cvs-23-gentoo.el 50bbdb-gentoo.el 50git-gentoo.el 50guile-gentoo.el 50libidn-gentoo.el 50librep-gentoo.el 50sawfish-gentoo.el 65emacs-wget-gentoo.el 71emacs-w3m-gentoo.el It appears to be some kind of timed loading. I was trying to figure out what it all did. Sorry to have made so much line noise about this. ^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2008-12-11 1:46 UTC | newest] Thread overview: 23+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-12-07 0:34 Tracing what is loading Harry Putnam 2008-12-07 9:58 ` Juanma Barranquero 2008-12-07 11:22 ` speedbar question Maindoor 2008-12-07 15:21 ` Drew Adams 2008-12-07 15:34 ` Maindoor 2008-12-07 17:10 ` Drew Adams 2008-12-08 5:42 ` Maindoor 2008-12-08 7:06 ` Speedbar is messed up Maindoor 2008-12-08 7:11 ` Maindoor 2008-12-08 5:46 ` speedbar question Maindoor 2008-12-07 23:09 ` Tracing what is loading Harry Putnam 2008-12-08 0:41 ` Juanma Barranquero 2008-12-08 4:46 ` Harry Putnam [not found] <mailman.2095.1228610078.26697.help-gnu-emacs@gnu.org> 2008-12-07 10:01 ` Dmitry Dzhus 2008-12-07 13:10 ` Michael Heerdegen 2008-12-08 4:54 ` Harry Putnam [not found] ` <mailman.2193.1228712089.26697.help-gnu-emacs@gnu.org> 2008-12-08 18:21 ` Michael Heerdegen 2008-12-08 20:09 ` Harry Putnam 2008-12-09 6:30 ` Harry Putnam 2008-12-10 2:56 ` Kevin Rodgers 2008-12-10 8:47 ` Harry Putnam [not found] ` <mailman.2437.1228898847.26697.help-gnu-emacs@gnu.org> 2008-12-10 19:14 ` Michael Heerdegen 2008-12-11 1:46 ` Harry Putnam
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).