annotate lisp/efs/efs-nos-ve.el @ 189:489f57a838ef r20-3b21

Import from CVS: tag r20-3b21
author cvs
date Mon, 13 Aug 2007 09:57:07 +0200
parents 9f59509498e1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
1 ;; -*-Emacs-Lisp-*-
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
3 ;;
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
4 ;; File: efs-nos-ve.el
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
5 ;; Release: $efs release: 1.15 $
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 22
diff changeset
6 ;; Version: #Revision: 1.2 $
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
7 ;; RCS:
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
8 ;; Description: efs support for NOS/VE
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
9 ;; Authors: Sandy Rutherford <sandy@ibm550.sissa,it>
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
10 ;; Created: Fri Aug 19 04:57:09 1994 by sandy on ibm550
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
11 ;; Modified: Sun Nov 27 18:39:43 1994 by sandy on gandalf
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
12 ;;
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
13 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
14
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
15 ;;; This file is part of efs. See efs.el for copyright
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
16 ;;; (it's copylefted) and warrranty (there isn't one) information.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
17
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
18 (provide 'efs-nos-ve)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
19 (require 'efs)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
20
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
21 ;;; Works for NOS/VE from CDC. NOS/VE runs on Cybers.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
23 ;;; Thank you to Jost Krieger <Jost.Krieger@rz.ruhr-uni-bochum.de> for
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
24 ;;; providing imformation and testing.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
25
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
26 (defconst efs-nos-ve-version
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
27 (concat (substring "$efs release: 1.15 $" 14 -2)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
28 "/"
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 22
diff changeset
29 (substring "#Revision: 1.2 $" 11 -2)))
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
30
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
31 ;;;;---------------------------------------------------------------
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
32 ;;;; NOS/VE support for efs
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
33 ;;;;---------------------------------------------------------------
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
34
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
35 ;;; A legal NOS/VE filename is of the form
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
36 ;;; <family>.<dirname>.<dirname>.<direname>.....<filename>
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
37 ;;; where <family> always starts with the char : and is followed by
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
38 ;;; alphanumeric characters. Each <dirname> or <filename> can be up to 31
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
39 ;;; characters. File names are case insensistive.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
40 ;;; eg. :FOO.DIR_1.DIR_2.BAR
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
41 ;;;
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
42 ;;; The character set consists of (single case) alphabet, the numerals,
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
43 ;;; and the characters "@$_#". (Not the quotes ...) The characters
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
44 ;;; "[\]{|}" will also occur in a misguided attempt at
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
45 ;;; internationalization. A filename may not start with a numeral.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
46
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
47
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
48 ;;; entry points
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
49
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
50 (efs-defun efs-fix-path nos-ve (path &optional reverse)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
51 ;; Convert path from UNIX to NOS/VE.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
52 ;; If REVERSE is non-nil, goes in the opposite direction.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
53 (if reverse
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
54 (let* ((res (concat "." path))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
55 (len (length res))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
56 (n 0))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
57 (while (< n len)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
58 (and (= (aref res n) ?.) (aset res n ?/))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
59 (setq n (1+ n)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
60 res)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
61 (let* ((res (substring (efs-internal-directory-file-name path) 1))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
62 (len (length res))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
63 (n 0))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
64 (while (< n len)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
65 (and (= (aref res n) ?/) (aset res n ?.))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
66 (setq n (1+ n)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
67 res)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
68
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
69 (efs-defun efs-fix-dir-path nos-ve (dir-path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
70 ;; Converts DIR-PATH to NOS/VE format for a directory listing.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
71 (efs-fix-path 'nos-ve dir-path))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
72
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
73 ;;; parser
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
74
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
75 (defconst efs-nos-ve-file-line-regexp
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
76 (concat
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
77 " \\([>0-9,]+\\) bytes \\(in [0-9]+ \\(file\\|catalog\\)s?\\)?\\|"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
78 "\\( -- empty catalog\\)\\| -- device"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
79
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
80 (efs-defun efs-parse-listing nos-ve (host user dir path &optional switches)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
81 ;; Parse the current buffer which is assumed to be a NOS/VE listing.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
82 ;; Returns a hashtable.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
83 (goto-char (point-min))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
84 (efs-save-match-data
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
85 (if (and (re-search-forward efs-nos-ve-file-line-regexp
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
86 (save-excursion (end-of-line) (point)) t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
87 (or (match-beginning 2) (match-beginning 4)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
88 (let ((tbl (efs-make-hashtable))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
89 size dir-p file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
90 (forward-line 1)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
91 (while (re-search-forward efs-nos-ve-file-line-regexp
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
92 (save-excursion (end-of-line) (point)) t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
93 (setq size (and (match-beginning 1)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
94 (buffer-substring
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
95 (match-beginning 1) (match-end 1)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
96 dir-p (null (null (or (match-beginning 2)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
97 (match-beginning 4)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
98 (if size
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
99 (let ((start 0)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
100 res)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
101 (while (string-match "," size start)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
102 (setq res (concat res (substring size start
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
103 (match-beginning 0)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
104 start (match-end 0)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
105 (setq size (string-to-int
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
106 (concat res (substring size start))))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
107 (beginning-of-line)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
108 (forward-char 2)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
109 (setq file (buffer-substring
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
110 (point)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
111 (progn (skip-chars-forward "^ \t\n") (point))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
112 (efs-put-hash-entry file (list dir-p size)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
113 (or tbl (setq tbl (efs-make-hashtable))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
114 (forward-line 1))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
115 (efs-put-hash-entry "." '(t) tbl)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
116 (efs-put-hash-entry ".." '(t) tbl)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
117 tbl))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
118
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
119 (efs-defun efs-allow-child-lookup nos-ve (host user dir file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
120 ;; Returns non-nil if in directory DIR, FILE could possibly be a subdir
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
121 ;; according to its file-name syntax, and therefore a child listing should
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
122 ;; be attempted. Note that DIR is in directory syntax.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
123 ;; i.e. /foo/bar/, not /foo/bar.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
124 ;; Deal with dired. Anything else?
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
125 (not (and (boundp 'dired-local-variables-file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
126 (stringp dired-local-variables-file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
127 (string-equal (downcase dired-local-variables-file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
128 (downcase file)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
129
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
130 ;;; Tree Dired
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
131
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
132 (defconst efs-dired-nos-ve-re-exe "^.[^ \t\n]")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
133 ;; Matches no lines. Should it match something?
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
134
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
135 (or (assq 'nos-ve efs-dired-re-exe-alist)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
136 (setq efs-dired-re-exe-alist
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
137 (cons (cons 'nos-ve efs-dired-nos-ve-re-exe)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
138 efs-dired-re-exe-alist)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
139
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
140 (defconst efs-dired-nos-ve-re-dir " [0-9,]+ bytes in [0-9]+ file")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
141
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
142 (or (assq 'nos-ve efs-dired-re-dir-alist)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
143 (setq efs-dired-re-dir-alist
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
144 (cons (cons 'nos-ve efs-dired-nos-ve-re-dir)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
145 efs-dired-re-dir-alist)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
146
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
147 (efs-defun efs-dired-fixup-listing nos-ve (file path &optional switches
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
148 wildcard)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
149 ;; Need to turn the header line into something to masquerading as a file
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
150 ;; line, and need to remove the indentation. Both upset dired.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
151 (goto-char (point-min))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
152 (while (search-forward "\n " nil t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
153 (delete-char -2))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
154 (goto-char (point-min))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
155 (if (looking-at "\\([^ \n]+ +\\)[0-9,]+ bytes in [0-9]+ file")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
156 (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
157 (delete-region (match-beginning 1) (match-end 1))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
158 (insert " Total of "))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
159
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
160 (defconst efs-dired-nos-ve-file-line-regexp
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
161 (concat
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
162 ".[ \t]+\\([][{}|\\\\a-z0-9@$_#]+\\) +"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
163 "\\([>0-9,]+ bytes\\|-- \\(empty\\|device\\)\\)"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
164
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
165 (efs-defun efs-dired-manual-move-to-filename nos-ve
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
166 (&optional raise-error bol eol)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
167 ;; In dired, move to first char of filename on this line.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
168 ;; Returns position (point) or nil if no filename on this line.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
169 ;; This is the NOS/VE version.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
170 (if bol
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
171 (goto-char bol)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
172 (skip-chars-backward "^\n\r"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
173 (if (looking-at efs-dired-nos-ve-file-line-regexp)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
174 (goto-char (match-beginning 1))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
175 (and raise-error (error "No file on this line"))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
176
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
177 (efs-defun efs-dired-manual-move-to-end-of-filename nos-ve
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
178 (&optional no-error bol eol)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
179 ;; Assumes point is at beginning of filename.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
180 ;; So, it should be called only after (dired-move-to-filename t).
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
181 ;; case-fold-search must be nil, at least for VMS.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
182 ;; On failure, signals an error or returns nil.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
183 ;; This is the NOS/VE version.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
184 (let ((opoint (point)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
185 (and selective-display
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
186 (null no-error)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
187 (eq (char-after
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
188 (1- (or bol (save-excursion
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
189 (skip-chars-backward "^\r\n")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
190 (point)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
191 ?\r)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
192 ;; File is hidden or omitted.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
193 (cond
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
194 ((dired-subdir-hidden-p (dired-current-directory))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
195 (error
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
196 (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
197 "File line is hidden. Type \\[dired-hide-subdir] to unhide.")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
198 ((error
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
199 (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
200 "File line is omitted. Type \\[dired-omit-toggle] to un-omit."
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
201 )))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
202 (skip-chars-forward "_a-z0-9$@#\\\\[]{}|") ; right char set?
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
203 (if (or (= opoint (point)) (/= (following-char) ?\ ))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
204 (if no-error
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
205 nil
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
206 (error "No file on this line"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
207 (point))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
208
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
209 ;;; end of efs-nos-ve.el