viewmail-info
[Top][All Lists]
Advanced

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

Re: [VM] Keeping track of the last save-folder name?


From: Uday Reddy
Subject: Re: [VM] Keeping track of the last save-folder name?
Date: Fri, 14 Nov 2014 17:43:17 +0000

Daniel Barrett writes:

> 
> I'm trying to keep track of the last folder name that received a saved
> message, so I can restore it after a save:
> 
> (setq default vm-last-save-folder)
> (vm-save-message 'my-other-folder)
> (setq vm-last-save-folder default)

Indeed, as Piet said it is a buffer-local variable that is only set in the
folder buffer (which is called `vm-mail-buffer' for some reason).  So, the
correct way to do this is:

(setq default (with-current-buffer vm-mail-buffer vm-last-save-folder))
(vm-save-message 'my-other-folder)
(with-current-buffer vm-mail-buffer (setq vm-last-save-folder default))

or more simply

(with-current-buffer vm-mail-buffer
  (setq default vm-last-save-folder)
  (vm-save-message 'my-other-folder)
  (setq vm-last-save-folder default))

Cheers,
Uday



reply via email to

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