emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] remember buffer gets lost too easy


From: Carsten Dominik
Subject: Re: [Orgmode] remember buffer gets lost too easy
Date: Thu, 24 Jan 2008 09:33:33 +0100


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]