From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: remember buffer gets lost too easy Date: Thu, 24 Jan 2008 09:33:33 +0100 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v915) Content-Type: multipart/mixed; boundary="===============0604332579==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JHxWp-0003B9-2k for emacs-orgmode@gnu.org; Thu, 24 Jan 2008 03:33:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JHxWm-0003AI-KY for emacs-orgmode@gnu.org; Thu, 24 Jan 2008 03:33:41 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JHxWl-00039u-AZ for emacs-orgmode@gnu.org; Thu, 24 Jan 2008 03:33:39 -0500 Received: from ug-out-1314.google.com ([66.249.92.173]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JHxWk-0001QK-L7 for emacs-orgmode@gnu.org; Thu, 24 Jan 2008 03:33:38 -0500 Received: by ug-out-1314.google.com with SMTP id a2so260265ugf.48 for ; Thu, 24 Jan 2008 00:33:38 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rainer Stengele Cc: emacs-orgmode@gnu.org --===============0604332579== Content-Type: multipart/alternative; boundary=Apple-Mail-1--481885885 --Apple-Mail-1--481885885 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit 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 --Apple-Mail-1--481885885 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
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
= --Apple-Mail-1--481885885-- --===============0604332579== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0604332579==--