Article View: gnu.emacs.vm.bug
Article #9423sent buffer-auto-save-file-name has spaces & too long on some systems
From: Dan_Jacobson
Date: Sat, 12 Oct 1991 14:07
Date: Sat, 12 Oct 1991 14:07
56 lines
3233 bytes
3233 bytes
[VM 5.31] After I send a message, I checked buffer-local-variables and
buffer-auto-save-file-name is
"/z119/danj1/.mail/#%sent reply to Rich Burridge#".
Though one presumably wouldn't do too much in an already sent buffer,
I find that I often come back there and slice and dice and send
again... I think the previous spaces-in-the-filename cleanup a few
versions back neglected already sent buffers.
But mainly, something must be done for the innocent 14 char filename
limit filesystem sufferer peoples. E.g., Stallman has wisely not put
any .el file in GNU Emacs that's longer than 13 characters, to make
room for the c of ".elc" . [OK, there's one 14 char .el filename.
sun-cursors.el, but on a Sun one would expect to be able to use longer
filenames. [However sometimes folks mount short filename disks to
their Sun.] Hopefully one day short filename systems will be extinct,
but for now, I don't want to prolong VM's dangerousness for short
filename system users. Hence Kyle might want to do (if (eq
system-type usg-unix-v) then use the below random number routine or
something..., allowing of course user override, e.g., for a user who,
perish the thought, mounted 14 char filename systems on her Sun [as
system-type then won't tell the whole story.]
[If worst case: no short filename system support is added to VM, what
hook to avoid long auto-save-file-name for "sent "... buffer?]
Anyways, here's where the renaming comes in:
Return value: nil
rename-auto-save-file()
* rename-buffer("sent reply to Rich Burridge<1>")
* byte-code("\306\307\310 \"?\205n^@\311\311\311^Z^Y^X
* vm-rename-current-mail-buffer()
* byte-code("\307\210p^X\310 !\210\212^Hq\210\n\311
* vm-mail-send-and-exit(nil)
* call-interactively(vm-mail-send-and-exit)
% *Backtrace* IHLPZ 8:11am Mail[(Debugger)] All [none]
and here's my workaround, but not for sent buffers, since VM 5.31
doesn't take appropriate measures for 14 char filename limit
filesystems,
(setq mail-mode-hook
(function
(lambda ()
;;;at last: can save the "*mail*" auto-save buffer in a protected
;;;directory, so I don't have to set a restrictive (077) umask.
;;;[idea is thanks to Kyle Jones]
(setq buffer-auto-save-file-name
(concat vm-folder-directory "#%*mail"
(int-to-string (random t)))
;;;VM5: "#_reply_to_Kyle_Jones#" still to long (beyond 14 char limit
;;;on some systems.) maybe "#-5421Kyle_Jones" is cooler. 10/91: what
;;;hook to avoid long auto-save-file-name for "sent "... buffer?
);)
;;(I have a cron job regularly clean out any weeks old mail backups that are
;;produced when i change my mind and dont send a e-mail)
)))
Technical Details
Message-ID:
<1991Oct12Sa0901160z.Dan_Jacobson@ATT.COM>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wendy-fate.uu.net!bug-vmShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6829,518123e9d4514bca X-Google-Attributes: gidf6829,public X-Google-ArrivalTime: 1991-10-13 03:33:20 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wendy-fate.uu.net!bug-vm From: Dan_Jacobson@ATT.COM Newsgroups: gnu.emacs.vm.bug Subject: sent buffer-auto-save-file-name has spaces & too long on some systems Message-ID: <1991Oct12Sa0901160z.Dan_Jacobson@ATT.COM> Date: 12 Oct 91 14:07:31 GMT Sender: bug-vm-request@uunet.uu.net Reply-To: Dan_Jacobson@ihlpz.ATT.COM Lines: 56