* Disable agenda file autoload? @ 2009-05-28 5:34 Russell Adams 2009-05-28 5:43 ` Carsten Dominik 0 siblings, 1 reply; 6+ messages in thread From: Russell Adams @ 2009-05-28 5:34 UTC (permalink / raw) To: Org Mode List I tend to run multiple emacs sessions and I've noticed that if I load Org (no I do not require it on each load), that I get lock contention on agenda files. Only one of these emacs instances is used for Org, I keep an Org session up separate from my coding... Is there a way that I can configure Org to not load the agenda files until the first time the agenda is called? Perhaps just by delaying setting the agenda file list until the agenda is called by hook? My only other option would be to use a separate config for the Org window vs the others. I welcome suggestions. Thanks. ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Disable agenda file autoload? 2009-05-28 5:34 Disable agenda file autoload? Russell Adams @ 2009-05-28 5:43 ` Carsten Dominik 2009-05-28 6:38 ` Russell Adams 0 siblings, 1 reply; 6+ messages in thread From: Carsten Dominik @ 2009-05-28 5:43 UTC (permalink / raw) To: Russell Adams; +Cc: Org Mode List On May 28, 2009, at 7:34 AM, Russell Adams wrote: > I tend to run multiple emacs sessions and I've noticed that if I load > Org (no I do not require it on each load), that I get lock contention > on agenda files. > > Only one of these emacs instances is used for Org, I keep an Org > session up separate from my coding... > > Is there a way that I can configure Org to not load the agenda files > until the first time the agenda is called? > > Perhaps just by delaying setting the agenda file list until the agenda > is called by hook? > > My only other option would be to use a separate config for the Org > window vs the others. > > I welcome suggestions. I believe the agenda files are only loaded for agenda and related commands, i.e. commands that also need to access the agenda files. It is definitely not so that loading the Org package will load the agenda files. Or am I wrong here??? Maybe you are running org-agenda-to-appt or something like this? - Carsten ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Disable agenda file autoload? 2009-05-28 5:43 ` Carsten Dominik @ 2009-05-28 6:38 ` Russell Adams 2009-05-28 9:31 ` Carsten Dominik 0 siblings, 1 reply; 6+ messages in thread From: Russell Adams @ 2009-05-28 6:38 UTC (permalink / raw) To: Org Mode List I just tried an example, here's what happens. - Start first emacs session for Org, call agenda to build my agenda - Change anything in any buffer that is in the agenda list - Open another emacs - Because I don't have org set to require, it only loads on demand, no issues yet - Open another .org file that is not on the agenda list, which triggers the load of org-mode - I get a popup warning me that another emacs session has the agenda file locked Notice I wasn't trying to build the agenda on opening the other file. I'm inclined to believe that Org is autoloading all the agenda files during initialization. If it didn't load the agenda files until the agenda was called interactively, that'd fix the problem. I may cause this again with another issue, I have a timed job that rebuilds the agenda at midnight because I leave my sessions open for days at a time. If that calls at the midnight boundary, it should cause this problem. I may still have to use a separate config, or a hook for agenda that I set the load list just prior to invoking agenda. Carsten, if you'd like I can send you my .emacs file direct to verify that isn't causing the problem. Thanks. On Thu, May 28, 2009 at 07:43:32AM +0200, Carsten Dominik wrote: > > On May 28, 2009, at 7:34 AM, Russell Adams wrote: > >> I tend to run multiple emacs sessions and I've noticed that if I load >> Org (no I do not require it on each load), that I get lock contention >> on agenda files. >> >> Only one of these emacs instances is used for Org, I keep an Org >> session up separate from my coding... >> >> Is there a way that I can configure Org to not load the agenda files >> until the first time the agenda is called? >> >> Perhaps just by delaying setting the agenda file list until the agenda >> is called by hook? >> >> My only other option would be to use a separate config for the Org >> window vs the others. >> >> I welcome suggestions. > > I believe the agenda files are only loaded for agenda > and related commands, i.e. commands that also need to access > the agenda files. It is definitely not so that loading the Org > package will load the agenda files. Or am I wrong here??? > Maybe you are running org-agenda-to-appt or something like this? > > - Carsten > ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Disable agenda file autoload? 2009-05-28 6:38 ` Russell Adams @ 2009-05-28 9:31 ` Carsten Dominik 2009-05-28 16:42 ` Russell Adams 0 siblings, 1 reply; 6+ messages in thread From: Carsten Dominik @ 2009-05-28 9:31 UTC (permalink / raw) To: Russell Adams; +Cc: Org Mode List You can try this: Find the org.el file, and in it the definition of the function (defun org-get-agenda-file-buffer As the first ting after the documentation string, enter (debug), like this: (defun org-get-agenda-file-buffer (file) "Get a buffer visiting FILE. If the buffer needs to be created, add it to the list of buffers which might be released later." (debug) (let ((buf (org-find-base-buffer-visiting file))) (if buf buf ; just return it ;; Make a new buffer and remember it (setq buf (find-file-noselect file)) (if buf (push buf org-agenda-new-buffers)) buf))) Make sure there is no compiled version of org.el on the path. Then run your first instance of Emacs. During startup, I would expect that Org Emacs will stop with a backtrace buffer. Show me that buffer, it will tell us which command loads agenda files.... - Carsten On May 28, 2009, at 8:38 AM, Russell Adams wrote: > I just tried an example, here's what happens. > > - Start first emacs session for Org, call agenda to build my agenda > - Change anything in any buffer that is in the agenda list > - Open another emacs > - Because I don't have org set to require, it only loads on demand, > no issues yet > - Open another .org file that is not on the agenda list, which > triggers the load of org-mode > - I get a popup warning me that another emacs session has the agenda > file locked > > Notice I wasn't trying to build the agenda on opening the other file. > > I'm inclined to believe that Org is autoloading all the agenda files > during initialization. If it didn't load the agenda files until the > agenda was called interactively, that'd fix the problem. > > I may cause this again with another issue, I have a timed job that > rebuilds the agenda at midnight because I leave my sessions open for > days at a time. If that calls at the midnight boundary, it should > cause this problem. I may still have to use a separate config, or a > hook for agenda that I set the load list just prior to invoking > agenda. > > Carsten, if you'd like I can send you my .emacs file direct to verify > that isn't causing the problem. > > Thanks. > > On Thu, May 28, 2009 at 07:43:32AM +0200, Carsten Dominik wrote: >> >> On May 28, 2009, at 7:34 AM, Russell Adams wrote: >> >>> I tend to run multiple emacs sessions and I've noticed that if I >>> load >>> Org (no I do not require it on each load), that I get lock >>> contention >>> on agenda files. >>> >>> Only one of these emacs instances is used for Org, I keep an Org >>> session up separate from my coding... >>> >>> Is there a way that I can configure Org to not load the agenda files >>> until the first time the agenda is called? >>> >>> Perhaps just by delaying setting the agenda file list until the >>> agenda >>> is called by hook? >>> >>> My only other option would be to use a separate config for the Org >>> window vs the others. >>> >>> I welcome suggestions. >> >> I believe the agenda files are only loaded for agenda >> and related commands, i.e. commands that also need to access >> the agenda files. It is definitely not so that loading the Org >> package will load the agenda files. Or am I wrong here??? >> Maybe you are running org-agenda-to-appt or something like this? >> >> - Carsten >> > > > ------------------------------------------------------------------ > Russell Adams RLAdams@AdamsInfoServ.com > > PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ > > Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Disable agenda file autoload? 2009-05-28 9:31 ` Carsten Dominik @ 2009-05-28 16:42 ` Russell Adams 2009-05-28 17:13 ` Carsten Dominik 0 siblings, 1 reply; 6+ messages in thread From: Russell Adams @ 2009-05-28 16:42 UTC (permalink / raw) To: Org Mode List To all, Turns out this was a local configuration problem. My ~/.emacs has the agenda to appt integration with kdialog/zenity code in it, and each time org loaded this code would call the agenda to create the list of appointments. I commented out one line in my config file which would call that, but left the agenda hook in place (comment out the call to function my-org-agenda-to-appt immediately following the definition). That way the list will be populated the first time the agenda is called, but otherwise it is well behaved. Carsten, as always, thanks for your insight! On Thu, May 28, 2009 at 11:31:33AM +0200, Carsten Dominik wrote: > You can try this: > > Find the org.el file, and in it the definition of the function > > (defun org-get-agenda-file-buffer > > As the first ting after the documentation string, enter (debug), like > this: > > (defun org-get-agenda-file-buffer (file) > "Get a buffer visiting FILE. If the buffer needs to be created, add > it to the list of buffers which might be released later." > (debug) > (let ((buf (org-find-base-buffer-visiting file))) > (if buf > buf ; just return it > ;; Make a new buffer and remember it > (setq buf (find-file-noselect file)) > (if buf (push buf org-agenda-new-buffers)) > buf))) > > Make sure there is no compiled version of org.el on the path. > > Then run your first instance of Emacs. During startup, I would expect > that Org Emacs will stop with a backtrace buffer. Show me that buffer, > it will tell us which command loads agenda files.... > > - Carsten > > On May 28, 2009, at 8:38 AM, Russell Adams wrote: > >> I just tried an example, here's what happens. >> >> - Start first emacs session for Org, call agenda to build my agenda >> - Change anything in any buffer that is in the agenda list >> - Open another emacs >> - Because I don't have org set to require, it only loads on demand, >> no issues yet >> - Open another .org file that is not on the agenda list, which >> triggers the load of org-mode >> - I get a popup warning me that another emacs session has the agenda >> file locked >> >> Notice I wasn't trying to build the agenda on opening the other file. >> >> I'm inclined to believe that Org is autoloading all the agenda files >> during initialization. If it didn't load the agenda files until the >> agenda was called interactively, that'd fix the problem. >> >> I may cause this again with another issue, I have a timed job that >> rebuilds the agenda at midnight because I leave my sessions open for >> days at a time. If that calls at the midnight boundary, it should >> cause this problem. I may still have to use a separate config, or a >> hook for agenda that I set the load list just prior to invoking >> agenda. >> >> Carsten, if you'd like I can send you my .emacs file direct to verify >> that isn't causing the problem. >> >> Thanks. >> >> On Thu, May 28, 2009 at 07:43:32AM +0200, Carsten Dominik wrote: >>> >>> On May 28, 2009, at 7:34 AM, Russell Adams wrote: >>> >>>> I tend to run multiple emacs sessions and I've noticed that if I >>>> load >>>> Org (no I do not require it on each load), that I get lock >>>> contention >>>> on agenda files. >>>> >>>> Only one of these emacs instances is used for Org, I keep an Org >>>> session up separate from my coding... >>>> >>>> Is there a way that I can configure Org to not load the agenda files >>>> until the first time the agenda is called? >>>> >>>> Perhaps just by delaying setting the agenda file list until the >>>> agenda >>>> is called by hook? >>>> >>>> My only other option would be to use a separate config for the Org >>>> window vs the others. >>>> >>>> I welcome suggestions. >>> >>> I believe the agenda files are only loaded for agenda >>> and related commands, i.e. commands that also need to access >>> the agenda files. It is definitely not so that loading the Org >>> package will load the agenda files. Or am I wrong here??? >>> Maybe you are running org-agenda-to-appt or something like this? >>> >>> - Carsten >>> >> >> >> ------------------------------------------------------------------ >> Russell Adams RLAdams@AdamsInfoServ.com >> >> PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ >> >> Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Disable agenda file autoload? 2009-05-28 16:42 ` Russell Adams @ 2009-05-28 17:13 ` Carsten Dominik 0 siblings, 0 replies; 6+ messages in thread From: Carsten Dominik @ 2009-05-28 17:13 UTC (permalink / raw) To: Russell Adams; +Cc: Org Mode List On May 28, 2009, at 6:42 PM, Russell Adams wrote: > To all, > > Turns out this was a local configuration problem. My ~/.emacs has the > agenda to appt integration with kdialog/zenity code in it, and each > time org loaded this code would call the agenda to create the list of > appointments. > > I commented out one line in my config file which would call that, but > left the agenda hook in place (comment out the call to function > my-org-agenda-to-appt immediately following the definition). That way > the list will be populated the first time the agenda is called, but > otherwise it is well behaved. > > Carsten, as always, thanks for your insight! You are most welcome. - Carsten > > On Thu, May 28, 2009 at 11:31:33AM +0200, Carsten Dominik wrote: >> You can try this: >> >> Find the org.el file, and in it the definition of the function >> >> (defun org-get-agenda-file-buffer >> >> As the first ting after the documentation string, enter (debug), like >> this: >> >> (defun org-get-agenda-file-buffer (file) >> "Get a buffer visiting FILE. If the buffer needs to be created, add >> it to the list of buffers which might be released later." >> (debug) >> (let ((buf (org-find-base-buffer-visiting file))) >> (if buf >> buf ; just return it >> ;; Make a new buffer and remember it >> (setq buf (find-file-noselect file)) >> (if buf (push buf org-agenda-new-buffers)) >> buf))) >> >> Make sure there is no compiled version of org.el on the path. >> >> Then run your first instance of Emacs. During startup, I would >> expect >> that Org Emacs will stop with a backtrace buffer. Show me that >> buffer, >> it will tell us which command loads agenda files.... >> >> - Carsten >> >> On May 28, 2009, at 8:38 AM, Russell Adams wrote: >> >>> I just tried an example, here's what happens. >>> >>> - Start first emacs session for Org, call agenda to build my agenda >>> - Change anything in any buffer that is in the agenda list >>> - Open another emacs >>> - Because I don't have org set to require, it only loads on demand, >>> no issues yet >>> - Open another .org file that is not on the agenda list, which >>> triggers the load of org-mode >>> - I get a popup warning me that another emacs session has the agenda >>> file locked >>> >>> Notice I wasn't trying to build the agenda on opening the other >>> file. >>> >>> I'm inclined to believe that Org is autoloading all the agenda files >>> during initialization. If it didn't load the agenda files until the >>> agenda was called interactively, that'd fix the problem. >>> >>> I may cause this again with another issue, I have a timed job that >>> rebuilds the agenda at midnight because I leave my sessions open for >>> days at a time. If that calls at the midnight boundary, it should >>> cause this problem. I may still have to use a separate config, or a >>> hook for agenda that I set the load list just prior to invoking >>> agenda. >>> >>> Carsten, if you'd like I can send you my .emacs file direct to >>> verify >>> that isn't causing the problem. >>> >>> Thanks. >>> >>> On Thu, May 28, 2009 at 07:43:32AM +0200, Carsten Dominik wrote: >>>> >>>> On May 28, 2009, at 7:34 AM, Russell Adams wrote: >>>> >>>>> I tend to run multiple emacs sessions and I've noticed that if I >>>>> load >>>>> Org (no I do not require it on each load), that I get lock >>>>> contention >>>>> on agenda files. >>>>> >>>>> Only one of these emacs instances is used for Org, I keep an Org >>>>> session up separate from my coding... >>>>> >>>>> Is there a way that I can configure Org to not load the agenda >>>>> files >>>>> until the first time the agenda is called? >>>>> >>>>> Perhaps just by delaying setting the agenda file list until the >>>>> agenda >>>>> is called by hook? >>>>> >>>>> My only other option would be to use a separate config for the Org >>>>> window vs the others. >>>>> >>>>> I welcome suggestions. >>>> >>>> I believe the agenda files are only loaded for agenda >>>> and related commands, i.e. commands that also need to access >>>> the agenda files. It is definitely not so that loading the Org >>>> package will load the agenda files. Or am I wrong here??? >>>> Maybe you are running org-agenda-to-appt or something like this? >>>> >>>> - Carsten >>>> >>> >>> >>> ------------------------------------------------------------------ >>> Russell Adams RLAdams@AdamsInfoServ.com >>> >>> PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ >>> >>> Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 >>> >>> >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Remember: use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> > > > ------------------------------------------------------------------ > Russell Adams RLAdams@AdamsInfoServ.com > > PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ > > Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-05-28 17:14 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-05-28 5:34 Disable agenda file autoload? Russell Adams 2009-05-28 5:43 ` Carsten Dominik 2009-05-28 6:38 ` Russell Adams 2009-05-28 9:31 ` Carsten Dominik 2009-05-28 16:42 ` Russell Adams 2009-05-28 17:13 ` Carsten Dominik
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.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).