🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: sent buffer-auto-save-file-name has spaces & too long on some systems

#9422
From: Dan_Jacobson
Date: Sat, 12 Oct 1991 23:42
33 lines
2022 bytes
>>>>> On Sat, 12 Oct 91 12:22:07 -0400, kyle@uunet.UU.NET (Kyle Jones) said:

Kyle> The function you should be fixing is make-auto-save-file-name.
Kyle> VM is not responsible for creating palatable auto-save file
Kyle> names.

OK, I'll try this for a while...

(defun make-auto-save-file-name ()
  "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.
For buffers not associated with a file: if filename will be longer then
our guess as to what the filesystem can handle, then an autosave name is
made with a random number, instead of the buffer name. [For 14 char.
filename limit machines]"
  (if buffer-file-name
      (concat (file-name-directory buffer-file-name)
	      "#"
	      (file-name-nondirectory buffer-file-name)
	      "#")
;;  (expand-file-name (concat "#%" (buffer-name) "#"))
    (expand-file-name
     (concat
      "#%"
      (or
       (and (memq system-type '(usg-unix-v)) ;all of them?
	    (> (length (buffer-name)) 11)
	    (int-to-string (random t)))
       (buffer-name))
      "#"))))
Technical Details
Message-ID: <1991Oct12Sa1941490n.Dan_Jacobson@ATT.COM>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!mips!pacbell.com!att!cbnewse!danj1
References: <1991Oct12Sa0901160z.Dan_Jacobson@ATT.COM> <9110121615.AA10934@rodan.UU.NET>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6829,518123e9d4514bca,start
X-Google-Attributes: gidf6829,public
X-Google-ArrivalTime: 1991-10-13 02:56:34 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!mips!pacbell.com!att!cbnewse!danj1
From: Dan_Jacobson@ATT.COM
Newsgroups: gnu.emacs.vm.bug
Subject: Re: sent buffer-auto-save-file-name has spaces & too long on some systems
Message-ID: <1991Oct12Sa1941490n.Dan_Jacobson@ATT.COM>
Date: 12 Oct 91 23:42:05 GMT
References: <1991Oct12Sa0901160z.Dan_Jacobson@ATT.COM> <9110121615.AA10934@rodan.UU.NET>
Sender: danj1@cbnewse.cb.att.com (daniel.jacobson)
Reply-To: Dan_Jacobson@ihlpz.ATT.COM
Organization: AT&T-BL, Naperville IL, USA
Lines: 33
In-Reply-To: kyle@uunet.UU.NET's message of Sat, 12 Oct 91 12: 22:07 -0400