* remember buffer gets lost too easy
@ 2008-01-22 20:49 Rainer Stengele
2008-01-24 8:33 ` Carsten Dominik
0 siblings, 1 reply; 2+ messages in thread
From: Rainer Stengele @ 2008-01-22 20:49 UTC (permalink / raw)
To: emacs-orgmode
Is it possible to tie the remember buffer to a default file name or to
yank it automatically before closing it?
Why? Whatever the reasons were I was able several times to kill or close
the buffer after writing a lot of stuff inside - having it open -
clocked in - for some time - only to find the contents nowhere in any
org file afterwards...
I know that this should never happen - but anyway - if the contents
would be saved somehow automatically I would always be able to recreate
the last entry later on.
rainer
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: remember buffer gets lost too easy
2008-01-22 20:49 remember buffer gets lost too easy Rainer Stengele
@ 2008-01-24 8:33 ` Carsten Dominik
0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2008-01-24 8:33 UTC (permalink / raw)
To: Rainer Stengele; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1123 bytes --]
On Jan 22, 2008, at 9:49 PM, Rainer Stengele wrote:
> Is it possible to tie the remember buffer to a default file name or
> to yank it automatically before closing it?
What do you mean by "yank it"?
How are you loosing the buffer? By just killing it?
Anyway, this might do it, put this into .emacs *after* the remaining
remember setup.
(defadvice remember-finalize (before org-save-and-detach activate)
(when buffer-file-name
(save-buffer)
(setq buffer-file-name nil)))
(add-hook 'remember-mode-hook
(lambda ()
(org-set-local 'change-major-mode-with-file-name nil)
(write-file "~/path/to/remember_backup.org")
(org-set-local 'remember-buffer (buffer-name)))
'append)
I don't think I will add this to org.el because it seems to me
that you are, in some sense, using remember out of its realm by making
is a work buffer instead of a quick capture-or-note buffer. An
alternative work flow would be to use remember to set up an entry,
file it,
go to the location and then work with the entry in place.
Anyway, the above code should do the trick.
Hope this helps.
- Carsten
[-- Attachment #1.2: Type: text/html, Size: 2050 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
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] 2+ messages in thread
end of thread, other threads:[~2008-01-24 8:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-22 20:49 remember buffer gets lost too easy Rainer Stengele
2008-01-24 8:33 ` 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).