* recover-session doesn't @ 2002-07-10 17:03 Edward Welbourne 2002-07-11 12:01 ` Richard Stallman 0 siblings, 1 reply; 19+ messages in thread From: Edward Welbourne @ 2002-07-10 17:03 UTC (permalink / raw) This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.2.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars) of 2002-03-22 on raven, modified by Debian configured using `configure i386-debian-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --with-x=yes --with-x-toolkit=athena --without-gif' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: C locale-coding-system: nil default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: So, having been forced to exit, I thought I'd have another go, in my new session, at using a lovely feature that I've never yet known to do anything useful: M-x recover-session. The first item in the buffer is the one I want, C-c C-c like the instructions say, oh, but "No files can be recovered from this session now". This despite several files being in an unsaved state when I had to exit, because attempting to save them merely caused me to be told my elisp stack was over-full. Recent input: <return> g q C-x o C-x k <return> C-x C-f <M-backspace> <M-backspace> <M-backspace> <return> C-s e m a c s C-n f f C-e M-b M-b M-b M-b M-b M-b C-l C-a C-n C-n C-n C-x k <return> C-x k <return> C-x k <return> M-x r e c o <tab> s e <tab> <return> C-c C-c C-x b * M <tab> <return> M-x M-p M-p C-k r e p o <tab> r <tab> <return> Recent messages: Loading dired...done Reading directory /home/eddy/...done Mark saved where search started Reading directory /home/eddy/.emacs.d/...done Reading directory /home/eddy/.emacs.d/auto-save-list/...done Reading directory /home/eddy/.emacs.d/auto-save-list/.saves-*...done No files can be recovered from this session now Making completion list... Loading view...done Loading emacsbug...done ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-07-10 17:03 recover-session doesn't Edward Welbourne @ 2002-07-11 12:01 ` Richard Stallman 2002-07-30 16:30 ` Edward Welbourne 0 siblings, 1 reply; 19+ messages in thread From: Richard Stallman @ 2002-07-11 12:01 UTC (permalink / raw) Cc: bug-gnu-emacs So, having been forced to exit, I thought I'd have another go, in my new session, at using a lovely feature that I've never yet known to do anything useful: M-x recover-session. The first item in the buffer is the one I want, C-c C-c like the instructions say, oh, but "No files can be recovered from this session now". If you can tell us how to reproduce this problem, we will investigate. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-07-11 12:01 ` Richard Stallman @ 2002-07-30 16:30 ` Edward Welbourne 2002-07-31 5:55 ` Richard Stallman 0 siblings, 1 reply; 19+ messages in thread From: Edward Welbourne @ 2002-07-30 16:30 UTC (permalink / raw) Cc: bug-gnu-emacs > If you can tell us how to reproduce this problem, we will investigate. So this afternoon emacs hung terminally and had to be shot down. Once I'd done failing to reproduce problems with customize, I duly had a go at trying to reproduce problems with recover-session. I turned my ~/.emacs into <quote src="~/.emacs"> ;; -*- lisp -*- (setq eddy-home-dir (or (getenv "HOME") "/home/eddy") eddy-elisp-dir (concat eddy-home-dir "/.sys/elisp")) (add-to-list 'load-path eddy-elisp-dir) ;;(load "init") ; recursively inlined below ;; see /usr/share/doc/emacs21/etc/NEWS for lots of neato features (server-start) ;; emacsclient [ +line[:column] ] filename (setq server-kill-new-buffers t) ;; server-temp-file-regexp (tool-bar-mode 0) ;; worthless *junk* buttons (menu-bar-mode 0) ;; +ve value to get menus (mouse-wheel-mode t) ;; configure: mouse-wheel-follow-mouse, mouse-wheel-scroll-amount (auto-compression-mode 1) (global-font-lock-mode 1) (set-language-environment "Latin-9") ;; want UTF-8 as encoding (setq next-line-add-newlines t require-final-newline "ask" default-indicate-empty-lines "red") ;; also NB region command: M-x delete-trailing-whitespace RET (setq-default show-trailing-whitespace t) (set-face-background 'trailing-whitespace "grey18") (setenv "QTDIR") ;; i.e. unset it (set 'rmail-file-name "/home/eddy/mail/pending/primary") (set 'rmail-primary-inbox-list (list "/var/mail/eddy" "po:eddy")) (set 'rmail-user-mail-address-regexp "eddy\(\|@opera.\(no\|com\)\|@chaos.org.uk\)") (set 'rmail-confirm-expunge nil) (set 'rmail-pop-password-required t) (set 'rmail-delete-after-output t) (autoload 'html-mode "sgml-mode" "Edit HTML docs" t) (setq auto-mode-alist (cons (cons "\\.html?$" 'html-mode) auto-mode-alist)) ;; testing ... (open-dribble-file "~/e-session") </quote> and fired up a new session, <quote src="~/e-session"> 0x8000078reco<tab>se<tab><return> \x03\x03yyes<return> \x18\x02\x18\x06<backspace><return> \x18o 0x800003c 0x800003e 0x8000077\x18\x17BufferList<return> \x18\x03y </quote> (all one line, no newline at end, newlines added to quote after each <return>, plus blank lines at start and end, for legibility and kindness to mailers). I don't know what the dribble-file thinks it's saying at the start: I clicked on the window furniture for maximising both vertically and horizontally, then typed M-x reco TAB and the rest went as reported, up to the subsequent 0x800... bits, which again flummox me. This achieved more than I've ever seen before from M-x recover-session: I didn't get the message I reported previously, "No files can be recovered from this session now". However, all I did get was <quote src="~/BufferList"> MR Buffer Size Mode File -- ------ ---- ---- ---- .* *ecma glitches*#386g1R 258 Fundamental ~/*ecma glitches*#386g1R *% .saves-* 319 Dired by date ~/.emacs.d/auto-save-list/.saves-* *scratch* 191 Lisp Interaction * *Messages* 839 Fundamental % *Directory* 152 Help </quote> where the session being recovered from had lots of files open, along with several (renamed) compilation buffers, one of which was still running (or, perhaps, something had gone so wrong with it as to be the cause of emacs' hang). The save file said: <quote src="~/.emacs.d/auto-save-list/.saves-386-whorl.intern.opera.no~"> /home/eddy/work/c2-stb/Makefile.config /home/eddy/work/c2-stb/#Makefile.config# /home/eddy/work/notes.c2 /home/eddy/work/#notes.c2# /home/eddy/work/qte-release6/Makefile.config /home/eddy/work/qte-release6/#Makefile.config# /home/eddy/work/qt-embed/Makefile.config /home/eddy/work/qt-embed/#Makefile.config# /home/eddy/work/i3-release/Makefile.config /home/eddy/work/i3-release/#Makefile.config# /home/eddy/work/qt-desktop/Makefile.config /home/eddy/work/qt-desktop/#Makefile.config# /home/eddy/work/notes /home/eddy/work/#notes# /home/eddy/work/qt-embed/linux/embed/example2/package.sh /home/eddy/work/qt-embed/linux/embed/example2/#package.sh# /home/eddy/#*ecma glitches*#386g1R# /home/eddy/#*mail*#386jND# </quote> so it clearly *did* know about the assorted files I had open, albeit I had no #...# files open (I assume those are artefacts, aside from the two open #*...*# mail buffers). [Each Makefile.config's buffer was re-named to Makefile.config/* for some project-specific *.] Recovering from it didn't open them: then again, I believe I'd saved all of them before starting the last compile, during which emacs hung. So all I lost was the session state ... which is what I wanted to recover. Hope this is some help, even though it doesn't reproduce the problem I originally reported. Eddy. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-07-30 16:30 ` Edward Welbourne @ 2002-07-31 5:55 ` Richard Stallman 2002-07-31 8:27 ` Edward Welbourne 2002-08-16 14:26 ` Edward Welbourne 0 siblings, 2 replies; 19+ messages in thread From: Richard Stallman @ 2002-07-31 5:55 UTC (permalink / raw) Cc: bug-gnu-emacs Once you select a saved session and type C-c C-c, recover-session is supposed to ask you questions, "Recover file foo?" It sounds like it asked you this question about the buffer *ecma glitches*#386g1R, but not about any of the files. Is that correct? Could you try stepping through the command recover-session-finish and see why it did not ask you about the files? ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-07-31 5:55 ` Richard Stallman @ 2002-07-31 8:27 ` Edward Welbourne 2002-08-01 5:26 ` Eli Zaretskii 2002-08-01 16:51 ` Richard Stallman 2002-08-16 14:26 ` Edward Welbourne 1 sibling, 2 replies; 19+ messages in thread From: Edward Welbourne @ 2002-07-31 8:27 UTC (permalink / raw) Cc: bug-gnu-emacs > recover-session is supposed to ask you questions, "Recover file > foo?" It sounds like it asked you this question about the buffer > *ecma glitches*#386g1R, but not about any of the files. Is that > correct? yes. > Could you try stepping through the command recover-session-finish > and see why it did not ask you about the files? I'd be happy to, next time I'm trying to recover a session (I tidied away the previous recovery file once I'd hand-loaded the buffers it told me I'd had open). Is this stepping through elisp execution in the elisp debugger ? How do I do that ? i.e., how do I invoke the elisp debugger ... does that come up in a gud- buffer ? I take it I then set a break point on recover-session-finish, before invoking recover-session ? Eddy. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-07-31 8:27 ` Edward Welbourne @ 2002-08-01 5:26 ` Eli Zaretskii 2002-08-01 8:58 ` Edward Welbourne 2002-08-01 16:51 ` Richard Stallman 1 sibling, 1 reply; 19+ messages in thread From: Eli Zaretskii @ 2002-08-01 5:26 UTC (permalink / raw) Cc: rms, bug-gnu-emacs On Wed, 31 Jul 2002, Edward Welbourne wrote: > > Could you try stepping through the command recover-session-finish > > and see why it did not ask you about the files? > > I'd be happy to, next time I'm trying to recover a session (I tidied > away the previous recovery file once I'd hand-loaded the buffers it > told me I'd had open). Is this stepping through elisp execution in > the elisp debugger ? Yes. > How do I do that ? Please read the "Debugger" node of the ELisp manual, it explains how to use the ELisp debugger called Edebug. In a nutshell, you instrument the function you want to debug with edebug-defun, then use Edebug commands to step through the code. > I take it I > then set a break point on recover-session-finish, before invoking > recover-session ? No, you simply instrument only recover-session-finish. Then, when it's called, Edebug will kick in automatically. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-08-01 5:26 ` Eli Zaretskii @ 2002-08-01 8:58 ` Edward Welbourne 2002-08-01 16:20 ` Eli Zaretskii 2002-08-02 6:12 ` Richard Stallman 0 siblings, 2 replies; 19+ messages in thread From: Edward Welbourne @ 2002-08-01 8:58 UTC (permalink / raw) Cc: rms, bug-gnu-emacs > In a nutshell, you instrument the function you want to debug with > edebug-defun, then use Edebug commands to step through the code. thanks. Some notes on the Help here ... the help on edebug-defun didn't make it clear *how* to select the top-level form on which it acts; the xref to eval-defun did help me out, but it'd be worth using eval-defun's more helpful wording Evaluate the top-level form containing point, or after point. in the edebug-defun text. Now all I have to do is find the definition of recover-session-finish; help tells me it's in `files'. Is there a convenient elisp mechanism for discovering the path of the file (load '...) actually reads ? I resorted to "locate files.el" and discover that the file I need is /usr/share/emacs/21.2/lisp/files.elc, so this isn't urgent ... I take it I *can* use the debugger, in particular edebug-defun, on a compiled .elc file ? Not that I'm going to understand the results *at all* ... but I can probably manage to report them. Eddy. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-08-01 8:58 ` Edward Welbourne @ 2002-08-01 16:20 ` Eli Zaretskii 2002-08-02 6:12 ` Richard Stallman 2002-08-02 6:12 ` Richard Stallman 1 sibling, 1 reply; 19+ messages in thread From: Eli Zaretskii @ 2002-08-01 16:20 UTC (permalink / raw) Cc: bug-gnu-emacs On Thu, 1 Aug 2002, Edward Welbourne wrote: > Now all I have to do is find the definition of recover-session-finish; > help tells me it's in `files'. Is there a convenient elisp mechanism > for discovering the path of the file (load '...) actually reads ? You shouldn't need that: click the mouse on the `files' thing in the *Help* buffer, and you will land on the first line of the function's definition. > I take it I *can* use the debugger, in particular edebug-defun, on a > compiled .elc file ? No. You need to manually "M-x load-file" files.el, and _then_ instrument the function. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-08-01 16:20 ` Eli Zaretskii @ 2002-08-02 6:12 ` Richard Stallman 2002-08-02 8:25 ` Edward Welbourne 0 siblings, 1 reply; 19+ messages in thread From: Richard Stallman @ 2002-08-02 6:12 UTC (permalink / raw) Cc: eddy, bug-gnu-emacs No. You need to manually "M-x load-file" files.el, and _then_ instrument the function. There is no need to load the entire file files.el in interpreted form. That would be rather undesirable, I'd think. It should work fine to instrument a single function while the rest of the file runs compiled. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-08-02 6:12 ` Richard Stallman @ 2002-08-02 8:25 ` Edward Welbourne 2002-08-02 9:03 ` Andreas Schwab ` (2 more replies) 0 siblings, 3 replies; 19+ messages in thread From: Edward Welbourne @ 2002-08-02 8:25 UTC (permalink / raw) Cc: eliz, bug-gnu-emacs RMS> Have you read the chapter on Debugging in the Emacs Lisp Manual? Intro and 1st three sections (as advocated by intro); I only skimmed the rest. Eli> No. You need to manually "M-x load-file" files.el, and _then_ Eli> instrument the function. RMS> There is no need to load the entire file files.el in interpreted RMS> form. That would be rather undesirable, I'd think. It should RMS> work fine to instrument a single function while the rest of the RMS> file runs compiled. but I need the source file, files.el - the files.elc won't do ? My installation is the current Debian package for emacs21, which only contains .elc, no .el files (that I can see). Is there a handy site with an un-packed source tree on it that I can browse to find this ? Or an anon CVS repository (I'll need an exact command line I can type - never used one yet) ? Or do I need to fetch and unpack an entire emacs source distribution to fish this one file out of it ? Eddy. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-08-02 8:25 ` Edward Welbourne @ 2002-08-02 9:03 ` Andreas Schwab 2002-08-02 13:52 ` Edward Welbourne 2002-08-02 11:21 ` fabrice bauzac 2002-08-02 13:44 ` Paul D. Smith 2 siblings, 1 reply; 19+ messages in thread From: Andreas Schwab @ 2002-08-02 9:03 UTC (permalink / raw) Cc: bug-gnu-emacs Edward Welbourne <eddy@opera.no> writes: |> Is there a handy site with an un-packed source tree on it that I can |> browse to find this ? Or an anon CVS repository http://savannah.gnu.org/cgi-bin/viewcvs/emacs/ Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-08-02 9:03 ` Andreas Schwab @ 2002-08-02 13:52 ` Edward Welbourne 0 siblings, 0 replies; 19+ messages in thread From: Edward Welbourne @ 2002-08-02 13:52 UTC (permalink / raw) Cc: bug-gnu-emacs > http://savannah.gnu.org/cgi-bin/viewcvs/emacs/ thanks - loading emacs/emacs/lisp/ stalled, but stopping it showed enough of the page and let me download files.el - far more commodious than pulling down all the elisp in the whole of emacs :-) Eddy. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-08-02 8:25 ` Edward Welbourne 2002-08-02 9:03 ` Andreas Schwab @ 2002-08-02 11:21 ` fabrice bauzac 2002-08-02 13:44 ` Paul D. Smith 2 siblings, 0 replies; 19+ messages in thread From: fabrice bauzac @ 2002-08-02 11:21 UTC (permalink / raw) On Fri, Aug 02, 2002 at 10:25:03AM +0200, Edward Welbourne wrote: > My installation is the current Debian package for emacs21, which only > contains .elc, no .el files (that I can see). The emacs21-el Debian package contains the .el files corresponding to the .elc files you have on your computer. -- fabrice bauzac Software should be free. http://www.gnu.org/philosophy/why-free.html ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-08-02 8:25 ` Edward Welbourne 2002-08-02 9:03 ` Andreas Schwab 2002-08-02 11:21 ` fabrice bauzac @ 2002-08-02 13:44 ` Paul D. Smith 2 siblings, 0 replies; 19+ messages in thread From: Paul D. Smith @ 2002-08-02 13:44 UTC (permalink / raw) %% eddy@opera.no (Edward Welbourne) writes: ew> but I need the source file, files.el - the files.elc won't do ? ew> My installation is the current Debian package for emacs21, which only ew> contains .elc, no .el files (that I can see). apt-get install emacs21-el HTH! -- ------------------------------------------------------------------------------- Paul D. Smith <psmith@gnu.org> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-08-01 8:58 ` Edward Welbourne 2002-08-01 16:20 ` Eli Zaretskii @ 2002-08-02 6:12 ` Richard Stallman 1 sibling, 0 replies; 19+ messages in thread From: Richard Stallman @ 2002-08-02 6:12 UTC (permalink / raw) Cc: eliz, bug-gnu-emacs Some notes on the Help here ... the help on edebug-defun didn't make it clear *how* to select the top-level form on which it acts; I will improve that doc string--thanks. I take it I *can* use the debugger, in particular edebug-defun, "The debugger" in Emacs Lisp is not the same thing as Edebug. To step through a function, with Edebug or with the Lisp debugger, you need to evaluate the interpreted (source code) definition of the function. Have you read the chapter on Debugging in the Emacs Lisp Manual? ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-07-31 8:27 ` Edward Welbourne 2002-08-01 5:26 ` Eli Zaretskii @ 2002-08-01 16:51 ` Richard Stallman 1 sibling, 0 replies; 19+ messages in thread From: Richard Stallman @ 2002-08-01 16:51 UTC (permalink / raw) Cc: bug-gnu-emacs > Could you try stepping through the command recover-session-finish > and see why it did not ask you about the files? I'd be happy to, next time I'm trying to recover a session (I tidied away the previous recovery file once I'd hand-loaded the buffers it told me I'd had open). You can use the shell's `kill' command to kill a session at any time. Just make sure you have saved all the files you really care about. Visit some unimportant files and make changes that you don't really want to save, then kill Emacs from outside with `kill', then try recover-session. Is this stepping through elisp execution in the elisp debugger ? How do I do that ? It is in the Emacs Lisp manual. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-07-31 5:55 ` Richard Stallman 2002-07-31 8:27 ` Edward Welbourne @ 2002-08-16 14:26 ` Edward Welbourne 2002-08-17 4:51 ` Richard Stallman 1 sibling, 1 reply; 19+ messages in thread From: Edward Welbourne @ 2002-08-16 14:26 UTC (permalink / raw) Cc: bug-gnu-emacs > Could you try stepping through the command recover-session-finish > and see why it did not ask you about the files? OK, finally did that (got caught out by C-M-delete not being backwards-delete-sexp ... or, at least, not getting through to emacs even if it is, because M is spelt Alt) and all is clear. The problem is that * I nearly always have nearly all files saved (extensive use of M-x compile, plus neurotic tendencies in any case) * I was expecting recover-session to recover my session state, not just the files I had edited without saving - i.e. I expected it to visit the files I was visiting (and ideally restore the buffer names I'd given them, though that's perhaps asking a bit much). So scratch the bug report and substitute a feature request; [at your option, only when given a prefix argument] I'd like recover-session to visit the files for which auto-file is missing, as well as (as at present) doing recover-file on the ones whose auto-file is present. then it would deserve the name recover-session, as opposed to recover-edited-files-from-session, which would better describe its present effect. The desired feature [without support for the prefix aspect] may be implemented by the following: <patch> diff -c /home/eddy/.sys/elisp/files.orig.el /home/eddy/.sys/elisp/files.el *** /home/eddy/.sys/elisp/files.orig.el Fri Aug 2 15:49:36 2002 --- /home/eddy/.sys/elisp/files.el Fri Aug 16 16:15:32 2002 *************** *** 3415,3420 **** --- 3415,3421 ---- ;; Get the name of the session file to recover from. (let ((file (dired-get-filename)) files + visits (buffer (get-buffer-create " *recover*"))) (dired-unmark 1) (dired-do-flagged-delete t) *************** *** 3424,3432 **** (set-buffer buffer) (erase-buffer) (insert-file-contents file) ! ;; Loop thru the text of that file ! ;; and get out the names of the files to recover. (while (not (eobp)) (let (thisfile autofile) (if (eolp) ;; This is a pair of lines for a non-file-visiting buffer. --- 3425,3437 ---- (set-buffer buffer) (erase-buffer) (insert-file-contents file) ! ;; The file contains a pair of line for each auto-saved buffer. ! ;; Loop thru the text of that file and get out the names of ! ;; the files to recover. (while (not (eobp)) + ;; The first line of the pair contains the visited file name + ;; or is empty if the buffer was not visiting a file. + ;; The second line is the auto-save file name. (let (thisfile autofile) (if (eolp) ;; This is a pair of lines for a non-file-visiting buffer. *************** *** 3458,3471 **** (buffer-substring-no-properties (point) (progn (end-of-line) (point)))) (forward-line 1))) ! ;; Ignore a file if its auto-save file does not exist now. (if (file-exists-p autofile) ! (setq files (cons thisfile files))))) (setq files (nreverse files)) - ;; The file contains a pair of line for each auto-saved buffer. - ;; The first line of the pair contains the visited file name - ;; or is empty if the buffer was not visiting a file. - ;; The second line is the auto-save file name. (if files (map-y-or-n-p "Recover %s? " (lambda (file) --- 3463,3474 ---- (buffer-substring-no-properties (point) (progn (end-of-line) (point)))) (forward-line 1))) ! ;; If its auto-save file exists now, recover it; else reload. (if (file-exists-p autofile) ! (setq files (cons thisfile files)) ! (setq visits (cons thisfile visits))))) ! (setq visits (nreverse visits)) (setq files (nreverse files)) (if files (map-y-or-n-p "Recover %s? " (lambda (file) *************** *** 3475,3481 **** "Failed to recover `%s'" file))) files '("file" "files" "recover")) ! (message "No files can be recovered from this session now"))) (kill-buffer buffer)))) (defun kill-some-buffers (&optional list) --- 3478,3493 ---- "Failed to recover `%s'" file))) files '("file" "files" "recover")) ! (message "No files can be recovered from this session now")) ! (if visits ! (map-y-or-n-p "Reload %s? " ! (lambda (file) ! (condition-case nil ! (save-excursion (find-file file)) ! (error ! "Failed to reload `%s'" file))) ! visits ! '("file" "files" "reload")))) (kill-buffer buffer)))) (defun kill-some-buffers (&optional list) </patch> Note that I've repositioned some comment lines - explaining the file format seemed more sensible at the start of parsing rather than just after the end. I note that byte-compiling files.el also produces some grumbles: <quote src="*Compile-Log*"> Compiling file /home/eddy/.sys/elisp/files.el at Fri Aug 16 16:09:23 2002 While compiling read-directory-name: ** read-file-name called with 6 arguments, but accepts only 1-5 While compiling make-auto-save-file-name: ** make-temp-file called with 3 arguments, but accepts only 1-2 While compiling save-buffers-kill-emacs: ** list-processes called with 1 argument, but accepts only 0 While compiling the end of the data: ** The following functions are not known to be defined: msdos-long-file-names, defvaralias, locate-file-internal, test-completion, w32-long-file-name, dos-8+3-filename, file-system-info, vms-read-directory, process-query-on-exit-flag </quote> Eddy. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-08-16 14:26 ` Edward Welbourne @ 2002-08-17 4:51 ` Richard Stallman 2002-08-19 8:29 ` Edward Welbourne 0 siblings, 1 reply; 19+ messages in thread From: Richard Stallman @ 2002-08-17 4:51 UTC (permalink / raw) Cc: bug-gnu-emacs recover-session is meant specificaly for recovering editing that was lost in the crash of a session. If you want to save and restore session status, we already have a package for that: desktop. That works when you exit Emacs. I don't think it makes sense to use recover-session for this job. It would only "work" after a session crashes, which would be inconsistent; and it would only "work" partially, because it would only recover the files, not the other aspects of the session. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: recover-session doesn't 2002-08-17 4:51 ` Richard Stallman @ 2002-08-19 8:29 ` Edward Welbourne 0 siblings, 0 replies; 19+ messages in thread From: Edward Welbourne @ 2002-08-19 8:29 UTC (permalink / raw) Cc: bug-gnu-emacs > If you want to save and restore session status, we already have a > package for that: desktop. Aha ! That'd be what I needed to hear about then. Thanks for the pointer, I'll look into it ... Eddy. ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2002-08-19 8:29 UTC | newest] Thread overview: 19+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-07-10 17:03 recover-session doesn't Edward Welbourne 2002-07-11 12:01 ` Richard Stallman 2002-07-30 16:30 ` Edward Welbourne 2002-07-31 5:55 ` Richard Stallman 2002-07-31 8:27 ` Edward Welbourne 2002-08-01 5:26 ` Eli Zaretskii 2002-08-01 8:58 ` Edward Welbourne 2002-08-01 16:20 ` Eli Zaretskii 2002-08-02 6:12 ` Richard Stallman 2002-08-02 8:25 ` Edward Welbourne 2002-08-02 9:03 ` Andreas Schwab 2002-08-02 13:52 ` Edward Welbourne 2002-08-02 11:21 ` fabrice bauzac 2002-08-02 13:44 ` Paul D. Smith 2002-08-02 6:12 ` Richard Stallman 2002-08-01 16:51 ` Richard Stallman 2002-08-16 14:26 ` Edward Welbourne 2002-08-17 4:51 ` Richard Stallman 2002-08-19 8:29 ` Edward Welbourne
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.