Re: [O] BUG: Newest org-mode interferes with desktop save
On Thu, Jun 16, 2011 at 12:40 AM, Nick Dokos nicholas.do...@hp.com wrote: Rainer M Krug r.m.k...@gmail.com wrote: I created the attached init.el file. In my setup, ~/.emacs.d/org-mode is a symbolic link. If I set it to org-7.7, everything works as expected desktop is loaded and saved without question), but when linking it to the git version, the desktop is loaded, but when closing it giveas me the above mentioned question: Current desktop was not loaded from a file. Overwrite this desktop file? As I said, the desktop *is* loaded. Hope you can reproduce it with this setup, Here's a caution: when desktop.el is loaded, it adds to after-init-hook a function that reads the desktop file. However, after-init-hook gets called at the end of initialization: if you try to reproduce using something like emacs -q -l init.el it's not going to work - after-init-hook gets runs between the -q and -l so to speak, whereas desktop.el does not get loaded until init.el is loaded: that initializes the hook too late to do any good. Probably the best way to do it is to create a dummy user foo, copy init.el to /home/foo/.emacs and then invoke emacs as emacs -u foo Using this method, I cannot reproduce the problem with or without org in the init file: here's the one that I used which also sets a couple of desktop hooks that make some noise which is recorded in the *Messages* buffer - that helps to verify that things work according to expectations: --8---cut here---start-8--- ;;; -*- mode: emacs-lisp -*- (setq debug-on-error t) (require 'desktop) (desktop-save-mode 1) (add-to-list 'desktop-after-read-hook (function (lambda () (message got a desktop file (add-to-list 'desktop-no-desktop-file-hook (function (lambda () (message no desktop file read ;;; I tried with and without the following five lines ;;; I also tried with them placed *before* the desktop stuff (add-to-list 'load-path (expand-file-name ~nick/src/emacs/org/org-mode/lisp)) (add-to-list 'auto-mode-alist '(\\.\\(org\\|org_archive\\|txt\\)$ . org-mode)) (require 'org-install) (global-set-key \C-cl 'org-store-link) (global-set-key \C-ca 'org-agenda) --8---cut here---end---8--- Nick There seems to be a problem with my .emacs.desktop files in combination with the new org - if I close all buffer, quit, answer the question with yes, re-open emacs, open the same file again, close emacs (no questions asked), open emacs again, desktop file is read, close, no questions asked. So I know how to fix it. I attach one .emacs.desktop which shows this behavior. Cheers and thanks for your patience, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug .emacs.desktop Description: Binary data
Re: [O] BUG: Newest org-mode interferes with desktop save
There seems to be a problem with my .emacs.desktop files in combination with the new org It might help to try to narrow down the problem to one of the buffers - starting with the org buffers to begin with. Start nuking the buffers till you hit the problem or the problem disappears. It may not be buffers it could also be one of the other states (whatever that means) that the desktop persists across sessions. Jambunathan K.
Re: [O] BUG: Newest org-mode interferes with desktop save
On Thu, Jun 16, 2011 at 9:29 AM, Jambunathan K kjambunat...@gmail.comwrote: There seems to be a problem with my .emacs.desktop files in combination with the new org It might help to try to narrow down the problem to one of the buffers - starting with the org buffers to begin with. Start nuking the buffers till you hit the problem or the problem disappears. OK - I hope I did what you suggested. My setup now: a) created user foo b) changed ownership of /home/foo recursively to me (rkrug:rkrug) c) copied the attached .emacs file into foo's home directory d) created directory ~foo/tmp e) copied test.org, .emacs.desktop.error .emacs.desktop.noerror f) cd ~/foo/tmp cp -f .emacs.desktop.error .emacs.desktop emacs -u foo quit emacs -- question there g) cp -f .emacs.desktop.noerror .emacs.desktop emacs -u foo quit emacs -- question not there In the .emacs file, the load paths are set to the git version of org-mode. If I set them to 7.5, no question at all. Hope you can reproduce it now and it helps to pinpoint the problem, Cheers, Rainer It may not be buffers it could also be one of the other states (whatever that means) that the desktop persists across sessions. Jambunathan K. -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug .emacs Description: Binary data test.org Description: Binary data .emacs.desktop.error Description: Binary data .emacs.desktop.noerror Description: Binary data
Re: [O] BUG: Newest org-mode interferes with desktop save
Hi Rainer, I was able to reproduce this query-on-close behavior with the following minimal config. #+begin_src sh emacs -Q -l ~/.emacs.d/src/org/lisp/org.el --eval (desktop-save-mode 1) #+end_src however, I think this prompting behavior is expected, and when I switched to the following alternative #+begin_src sh emacs -Q -l ~/.emacs.d/src/org/lisp/org.el --eval '(desktop-read ~/Desktop/)' #+end_src I received no prompt on exit. As far as I can tell there is not an Org-mode bug here, however I could very well have missed something. Cheers -- Eric Rainer M Krug r.m.k...@gmail.com writes: Hi when using the newest version of org-mode (Org-mode version 7.5 (release_7.5.391.gfacc)), I get the following warning when closing emacs, Current desktop was not loaded from a file. Overwrite this desktop file? although it has loaded the desktop file. When I use 7.5 (and te one from I guess yesterday), the message did not occur. I have (desktop-save-mode 1) on my emacs.org. Cheers, Rainer -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] BUG: Newest org-mode interferes with desktop save
Eric Schulte schulte.e...@gmail.com wrote: I was able to reproduce this query-on-close behavior with the following minimal config. #+begin_src sh emacs -Q -l ~/.emacs.d/src/org/lisp/org.el --eval (desktop-save-mode 1) #+end_src however, I think this prompting behavior is expected, and when I switched to the following alternative #+begin_src sh emacs -Q -l ~/.emacs.d/src/org/lisp/org.el --eval '(desktop-read ~/Desktop/)' #+end_src I received no prompt on exit. As far as I can tell there is not an Org-mode bug here, however I could very well have missed something. Rainer M Krug r.m.k...@gmail.com writes: when using the newest version of org-mode (Org-mode version 7.5 (release_7.5.391.gfacc)), I get the following warning when closing emacs, Current desktop was not loaded from a file. Overwrite this desktop file? although it has loaded the desktop file. When I use 7.5 (and te one from I guess yesterday), the message did not occur. I have (desktop-save-mode 1) on my emacs.org. Maybe this will help? , | desktop-save is a variable defined in `desktop.el'. | Its value is ask-if-new | | Documentation: | Specifies whether the desktop should be saved when it is killed. | A desktop is killed when the user changes desktop or quits Emacs. | Possible values are: |t -- always save. |ask -- always ask. |ask-if-new-- ask if no desktop file exists, otherwise just save. |ask-if-exists -- ask if desktop file exists, otherwise don't save. |if-exists -- save if desktop file exists, otherwise don't save. |nil -- never save. | The desktop is never saved when `desktop-save-mode' is nil. | The variables `desktop-dirname' and `desktop-base-file-name' | determine where the desktop is saved. ` Nick
Re: [O] BUG: Newest org-mode interferes with desktop save
I can not reproduce your example, as I am getting an can not open org-entities, but have you tried it with org-mode 7.5 as well as the newest git? My point is, that up to a recent git version (probably yesterday), this question was *not* there, but it is there at with the newest git version. I have only tried to reproduce this with the newest version of org-mode, and with that minimal setup I posted in my previous email. With that setup there was *no* prompt when exiting Emacs if the desktop configuration had been loaded from a file -- i.e., the correct behavior. I'd suggest trying to run from a similar minimal configuration, and then see if the problem persists? If so, then it is due to something else on your systems aside form the Org-mode version (e.g., OS or Emacs), and if not then it is due to interaction with something else in your config. Sorry, I can't be of more help without the ability to reproduce the problem. Cheers -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] BUG: Newest org-mode interferes with desktop save
On Wed, Jun 15, 2011 at 8:31 PM, Eric Schulte schulte.e...@gmail.comwrote: I can not reproduce your example, as I am getting an can not open org-entities, but have you tried it with org-mode 7.5 as well as the newest git? My point is, that up to a recent git version (probably yesterday), this question was *not* there, but it is there at with the newest git version. I have only tried to reproduce this with the newest version of org-mode, and with that minimal setup I posted in my previous email. With that setup there was *no* prompt when exiting Emacs if the desktop configuration had been loaded from a file -- i.e., the correct behavior. I'd suggest trying to run from a similar minimal configuration, and then see if the problem persists? If so, then it is due to something else on your systems aside form the Org-mode version (e.g., OS or Emacs), and if not then it is due to interaction with something else in your config. Sorry, I can't be of more help without the ability to reproduce the I completely understand. I created the attached init.el file. In my setup, ~/.emacs.d/org-mode is a symbolic link. If I set it to org-7.7, everything works as expected desktop is loaded and saved without question), but when linking it to the git version, the desktop is loaded, but when closing it giveas me the above mentioned question: Current desktop was not loaded from a file. Overwrite this desktop file? As I said, the desktop *is* loaded. Hope you can reproduce it with this setup, Rainer problem. Cheers -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/ -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug ;;; init.el --- Where all the magic begins ;; ;; This file loads both ;; - Org-mode : http://orgmode.org/ and ;; - Org-babel: http://orgmode.org/worg/org-contrib/babel/org-babel.php#library-of-babel ;; ;; It then loads the rest of our Emacs initialization from Emacs lisp ;; embedded in literate Org-mode files. ;; Load up Org Mode and Org Babel for elisp embedded in Org Mode files (add-to-list 'load-path ~/.emacs.d/org-mode/lisp) (add-to-list 'load-path ~/.emacs.d/org-mode/contrib/lisp) ;; load up Org-mode and Org-babel (require 'org-install) (desktop-save-mode 1) ;; load up the main file ;; (org-babel-load-file ~/.emacs.d/emacs.org)
Re: [O] BUG: Newest org-mode interferes with desktop save
On Wed, Jun 15, 2011 at 7:35 PM, Nick Dokos nicholas.do...@hp.com wrote: Eric Schulte schulte.e...@gmail.com wrote: I was able to reproduce this query-on-close behavior with the following minimal config. #+begin_src sh emacs -Q -l ~/.emacs.d/src/org/lisp/org.el --eval (desktop-save-mode 1) #+end_src however, I think this prompting behavior is expected, and when I switched to the following alternative #+begin_src sh emacs -Q -l ~/.emacs.d/src/org/lisp/org.el --eval '(desktop-read ~/Desktop/)' #+end_src I received no prompt on exit. As far as I can tell there is not an Org-mode bug here, however I could very well have missed something. Rainer M Krug r.m.k...@gmail.com writes: when using the newest version of org-mode (Org-mode version 7.5 (release_7.5.391.gfacc)), I get the following warning when closing emacs, Current desktop was not loaded from a file. Overwrite this desktop file? although it has loaded the desktop file. When I use 7.5 (and te one from I guess yesterday), the message did not occur. I have (desktop-save-mode 1) on my emacs.org. Maybe this will help? , | desktop-save is a variable defined in `desktop.el'. | Its value is ask-if-new | | Documentation: | Specifies whether the desktop should be saved when it is killed. | A desktop is killed when the user changes desktop or quits Emacs. | Possible values are: |t -- always save. |ask -- always ask. |ask-if-new-- ask if no desktop file exists, otherwise just save. |ask-if-exists -- ask if desktop file exists, otherwise don't save. |if-exists -- save if desktop file exists, otherwise don't save. |nil -- never save. | The desktop is never saved when `desktop-save-mode' is nil. | The variables `desktop-dirname' and `desktop-base-file-name' | determine where the desktop is saved. ` Might be, but my point is, that the behaviour has changed in org-mode - and that should not be. Cheers, Rainer Nick -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug
Re: [O] BUG: Newest org-mode interferes with desktop save
Rainer M Krug r.m.k...@gmail.com wrote: I created the attached init.el file. In my setup, ~/.emacs.d/org-mode is a symbolic link. If I set it to org-7.7, everything works as expected desktop is loaded and saved without question), but when linking it to the git version, the desktop is loaded, but when closing it giveas me the above mentioned question: Current desktop was not loaded from a file. Overwrite this desktop file? As I said, the desktop *is* loaded. Hope you can reproduce it with this setup, Here's a caution: when desktop.el is loaded, it adds to after-init-hook a function that reads the desktop file. However, after-init-hook gets called at the end of initialization: if you try to reproduce using something like emacs -q -l init.el it's not going to work - after-init-hook gets runs between the -q and -l so to speak, whereas desktop.el does not get loaded until init.el is loaded: that initializes the hook too late to do any good. Probably the best way to do it is to create a dummy user foo, copy init.el to /home/foo/.emacs and then invoke emacs as emacs -u foo Using this method, I cannot reproduce the problem with or without org in the init file: here's the one that I used which also sets a couple of desktop hooks that make some noise which is recorded in the *Messages* buffer - that helps to verify that things work according to expectations: --8---cut here---start-8--- ;;; -*- mode: emacs-lisp -*- (setq debug-on-error t) (require 'desktop) (desktop-save-mode 1) (add-to-list 'desktop-after-read-hook (function (lambda () (message got a desktop file (add-to-list 'desktop-no-desktop-file-hook (function (lambda () (message no desktop file read ;;; I tried with and without the following five lines ;;; I also tried with them placed *before* the desktop stuff (add-to-list 'load-path (expand-file-name ~nick/src/emacs/org/org-mode/lisp)) (add-to-list 'auto-mode-alist '(\\.\\(org\\|org_archive\\|txt\\)$ . org-mode)) (require 'org-install) (global-set-key \C-cl 'org-store-link) (global-set-key \C-ca 'org-agenda) --8---cut here---end---8--- Nick