Thread View: gnu.emacs.vms
3 messages
3 total messages
Started by Roland Roberts
Tue, 29 Aug 1989 22:57
Fixes to dired.el for VMS
Author: Roland Roberts
Date: Tue, 29 Aug 1989 22:57
Date: Tue, 29 Aug 1989 22:57
15 lines
1282 bytes
1282 bytes
A couple of people (yes, two) have had trouble getting my corrections to dired to work on VMS, in particular marking a file for deletion then typing 'x' gets a "No deletions requested" message. I'm quite puzzled since at this point I've been able to confirm that only dired.el and vmsproc.el are different from the 18.54 distribution. Since quite a few more that two people requested the dired.el fixes, if any of you have been able successfully use these, could you please e-mail to let me know? (particularly on VMS version and emacs version too!) roland-- Roland Roberts BITNET: roberts@uornsrl Nuclear Structure Research Lab INTERNET: rbr4@uhura.cc.rochester.edu 271 East River Road UUCP: rochester!ur-cc!uhura!rbr4 Rochester, NY 14267 AT&T: (716) 275-8962
Patch to files.el for VMS Dired
Author: Roland Roberts
Date: Thu, 31 Aug 1989 20:05
Date: Thu, 31 Aug 1989 20:05
61 lines
3006 bytes
3006 bytes
Several people pointed out that there still existed one additional
problem (at least) with the way VMS dired works. When trying to save
a file which has a version number, e.g. FOO.BAR;3 one typically gets
an error message about an IO error. It turned out to be easier to fix
than I expected, so below is the patch to files.el which will prevent
this.
On VMS, this patch causes a buffer named FOO.BAR;3 associated with
file DISK:[DIR]FOO.BAR;3 to have the suffix dropped both in the buffer
name and its associated file name once an attempt to save is made.
The result is that the file will be saved as the next higher version
number according to customary VMS usage. So if there is are versions
4, 5, and 6, this will now be saved as version 7.
If you don't have the 'patch' program, don't worry. These diff's are
all inserted into a single spot in the expression basic-save-buffer.
It should be quite easy to find.
*** [lisp]files.el
--- files.el
**************
*** 653,658
(interactive)
(if (buffer-modified-p)
(let (setmodes tempsetmodes)
(or buffer-file-name
(progn
(setq buffer-file-name
--- 653,679 -----
(interactive)
(if (buffer-modified-p)
(let (setmodes tempsetmodes)
+ (if (and (eq system-type 'vax-vms)
+ (string= buffer-file-name
+ (file-name-sans-versions buffer-file-name)))
+ (let ((buffer-new-name nil)
+ (buffer-name-list nil))
+ ;; Strip VMS version number before save
+ (setq buffer-file-name
+ (file-name-sans-versions buffer-file-name))
+ ;; Select a buffer name to correspond
+ (setq buffer-new-name
+ (downcase (file-name-nondirectory buffer-file-name)))
+ ;; Check to see if the buffer name is in use
+ (setq buffer-name-list
+ (mapcar (function buffer-name) (buffer-list)))
+ (while (and buffer-name-list
+ (not (string= buffer-new-name
+ (car buffer-name-list))))
+ (setq buffer-name-list (cdr buffer-name-list)))
+ ;; Change the buffer name, if no conflict
+ (if (not buffer-name-list)
+ (rename-buffer buffer-new-name))))
(or buffer-file-name
(progn
(setq buffer-file-name
--
Roland Roberts BITNET: roberts@uornsrl
Nuclear Structure Research Lab INTERNET: rbr4@uhura.cc.rochester.edu
271 East River Road UUCP: rochester!ur-cc!uhura!rbr4
Rochester, NY 14267 AT&T: (716) 275-8962
(Another) Patch to files.el for VMS Dired
Author: Roland Roberts
Date: Fri, 01 Sep 1989 22:14
Date: Fri, 01 Sep 1989 22:14
44 lines
2367 bytes
2367 bytes
Sigh, this should be the last thing that needs to be changed to fix
the trouble with VMS Dired and file versions. I discovered that files
with extensions which are numbers caused trouble with
file-name-sans-versions. For example,
(file-name-sans-versions "DISK:[DIR]FOO.5")
===> "DISK:[DIR]FOO"
The trouble is a small one and the patch is below. If you do not have
the patch program, find the matching section in file-name-sans-version
(in files.el) and simply replace the line from the first section which
is prefaced with an exclamation point with all those prefaced by
exclamation points inthe second section (delete the "!"). Then do an
M-x byte-compile-file before rebuilding emacs.dump. I will also send
this directly to bug-gnu-emacs.
*** files.el;1
--- files.el
**************
*** 547,553
(substring name 0
(if (eq system-type 'vax-vms)
(or (string-match ";[0-9]+\\'" name)
! (string-match ".[0-9]+\\'" name)
(length name))
(or (string-match "\\.~[0-9]+~\\'" name)
(string-match "~\\'" name)
--- 547,557 -----
(substring name 0
(if (eq system-type 'vax-vms)
(or (string-match ";[0-9]+\\'" name)
! (if (string-match "]" name)
! (if (string-match "].*\\..*\\.[0-9]+\\'" name)
! (string-match "\\.[0-9]+\\'" name)
! (length name))
! (length name))
(length name))
(or (string-match "\\.~[0-9]+~\\'" name)
(string-match "~\\'" name)
--
Roland Roberts BITNET: roberts@uornsrl
Nuclear Structure Research Lab INTERNET: rbr4@uhura.cc.rochester.edu
271 East River Road UUCP: rochester!ur-cc!uhura!rbr4
Rochester, NY 14267 AT&T: (716) 275-8962
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads