Article View: gnu.emacs.vm.bug
Article #9188Re: tiny feature request
From: Noah Friedman
Date: Sat, 22 Feb 1992 21:33
Date: Sat, 22 Feb 1992 21:33
42 lines
2579 bytes
2579 bytes
In article <KPC.92Feb21205037@zog.arc.nasa.gov> kpc@pluto.arc.nasa.gov (k p c) writes:
>maybe a variable to specify how many numeric backup copies to keep of
>the vm inbox would be nice.
A new variable isn't really needed for this. I do something like the
following. You could easily adapt it to change the number of backup
versions kept for VM folders as well by making the standard variables that
handle version control buffer-local.
;; I generally make numbered backups of files, but mail isn't one of
;; those cases where I want to do that.
(setq vm-mode-hooks
(function
(lambda ()
(make-local-variable 'version-control)
(setq version-control nil))))
If you did something like
(setq vm-mode-hooks
(lambda ()
(mapcar
'(lambda (varval-list)
(let ((var (car varval-list))
(val (car (cdr varval-list))))
(make-local-variable var)
(set var (eval val))))
'((version-control t)
(kept-old-versions moby-bignum)
(kept-new-versions moby-bignum)
(trim-versions-without-asking t)
(backup-by-copying nil)
(backup-by-copying-when-linked t)))))
You'd probably get pretty much what you want. (This isn't very efficient
in terms of consing, but at least it saves you the bother of sticking in
hundreds of (make-local-variable ...) and (setq ...) forms). In any case,
consult the documentation for the `version-control', `kept-old-versions',
and `kept-new-versions' variables if you're not familiar with them already.
Kyle, this is why I like hooks so much. Add more hooks! Add more
hooks! :-)
Technical Details
Message-ID:
<FRIEDMAN.92Feb22163312@nutrimat.gnu.ai.mit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!bu.edu!ai-lab!life.ai.mit.edu!friedmanReferences:
<KPC.92Feb21205037@zog.arc.nasa.gov>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6829,9a17112bd1e4f8e2 X-Google-Attributes: gidf6829,public X-Google-ArrivalTime: 1992-02-22 13:48:49 PST Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!bu.edu!ai-lab!life.ai.mit.edu!friedman From: friedman@nutrimat.gnu.ai.mit.edu (Noah Friedman) Newsgroups: gnu.emacs.vm.bug Subject: Re: tiny feature request Message-ID: <FRIEDMAN.92Feb22163312@nutrimat.gnu.ai.mit.edu> Date: 22 Feb 92 21:33:12 GMT References: <KPC.92Feb21205037@zog.arc.nasa.gov> Sender: news@ai.mit.edu Organization: Free Software Foundation, 675 Mass Ave. Cambridge, MA 02139 Lines: 42 In-reply-to: kpc@pluto.arc.nasa.gov's message of 22 Feb 92 04:50:37 GMT