🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #9083

Re: VM mail-mode buffer file name problem

#9083
From: k p c
Date: Mon, 11 May 1992 23:33
44 lines
2288 bytes
i fix that with this.

;;;
;;;autosave and backup redefinitions with supporting variables and
;;;functions
;;;

(defvar my-auto-save-directory "/dev/null/badfile/" 
  "*See the redefinition of make-auto-save-file-name; try $TRASHDIR.")

(defun make-auto-save-file-name ()
  
  "Redefinition of files.el function.
This version puts the autosave file in my-autosave-directory.  If the
filename or file is bad, you'll see a cryptic error message.

Return file name to use for auto-saves of current buffer.
Does not consider auto-save-visited-file-name; that is checked
before calling this function.  You can redefine this for customization.
See also auto-save-file-name-p."
  
  (let ((dirname my-auto-save-directory)
        (prefix (if buffer-file-name "#" "#%"))
	(suffix "#")
	(basename (clean-basename
		   (if buffer-file-name
		       (file-name-nondirectory buffer-file-name)
		     (buffer-name)))))
    (expand-file-name (concat dirname prefix basename suffix))))

;;put this in functions
(defun clean-basename (name)
  
  "Fix unix-incompatible file basenames by substituting characters."
  
  ;;from functions.el
  (setq name (string-subst-char ?- ?/  name)) ;comma for virgule
  (setq name (string-subst-char ?- ?\  name))
  (setq name (string-subst-char ?- ?\n name))
  (setq name (string-subst-char ?- ?\" name))
  (setq name (string-subst-char ?- ?\' name))
  )
--
o i seek a housemate to share 1ac ~1200sf 2.5br in los altos hills.  email me.
Technical Details
Message-ID: <KPC.92May11153303@zog.arc.nasa.gov>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!kronos.arc.nasa.gov!pluto.arc.nasa.gov!kpc
References: <RATINOX.92May8230104@splinter.coe.northeastern.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6829,849bc7d4d34131b7
X-Google-Attributes: gidf6829,public
X-Google-ArrivalTime: 1992-05-11 10:42:14 PST
Newsgroups: gnu.emacs.vm.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!kronos.arc.nasa.gov!pluto.arc.nasa.gov!kpc
From: kpc@pluto.arc.nasa.gov (k p c)
Subject: Re: VM mail-mode buffer file name problem
In-Reply-To: ratinox@meceng.coe.northeastern.edu's message of 9 May 92 03:01:04 GMT
Message-ID: <KPC.92May11153303@zog.arc.nasa.gov>
Sender: usenet@kronos.arc.nasa.gov (Will Edgington, wedgingt@ptolemy.arc.nasa.gov)
Nntp-Posting-Host: zog.arc.nasa.gov
Organization: NASA Ames Research Center (Sterling)
References: <RATINOX.92May8230104@splinter.coe.northeastern.edu>
Date: Mon, 11 May 1992 23:33:03 GMT
Lines: 44