Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!att!cbnewsh!ho5cad!wjc From: wjc@ho5cad.ATT.COM (Bill Carpenter) Newsgroups: gnu.emacs Subject: Re: save-context-predicate in saveconf.el Message-ID: Date: 25 Jul 89 20:26:34 GMT References: Sender: bill@cbnewsh.ATT.COM Distribution: na Organization: AT&T Bell Laboratories Lines: 33 In-reply-to: ghh@cognito.princeton.edu's message of 25 Jul 89 00:12:45 GMT In article ghh@cognito.princeton.edu (Gilbert Harman) writes: > I have been using the recently posted version of saveconf.el .... > Except that I would like not to have my RMAIL file load as a text > file. I don't use saveconf.el any more, but when I did, I had the same problem. Here is how I got around it (see below). I found this non-intuitive enough that I saved it as a comment in my ~/.emacs even after I stopped using it. In addition to protecting RMAIL, it also protected my directory of mail folders. -- Bill Carpenter att!ho5cad!wjc or attmail!bill ;; save context stuff ;; The original "saveconf.el" didn't apply the predicate to buffers ;; that weren't currently displayed in a window (they were saved ;; unconditionally. That was trouble if you had an RMAIL file because ;; it got visited on startup and so was not configured correctly when ;; visited via "rmail" later. ;(setq save-context-predicate ; (function (lambda (w) ; (and ; (buffer-file-name (if (bufferp w) w (window-buffer w))) ; (not (string-match "RMAIL" ; (buffer-file-name (if (bufferp w) w (window-buffer w))))) ; (not (string-match "/mail/" ; (buffer-file-name (if (bufferp w) w (window-buffer w))))) ; (not (string-match "^\\(/usr\\)?/tmp/" ; (buffer-file-name (if (bufferp w) w (window-buffer w))))) ;)))) ;