annotate lisp/efs/efs-ti-explorer.el @ 98:0d2f883870bc r20-1b1

Import from CVS: tag r20-1b1
author cvs
date Mon, 13 Aug 2007 09:13:56 +0200
parents 8fc7fe29b841
children 8b8b7f3559a2 8619ce7e4c50
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-ti-explorer.el
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
5 ;; Release: $efs release: 1.15 $
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
6 ;; Version: $Revision: 1.1 $
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: Explorer support for efs
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
9 ;; Author: Jamie Zawinski <jwz@lucid.com>
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
10 ;; Created: Thu Dec 17 15:04:14 1992
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
11 ;; Modified: Sun Nov 27 18:42:47 1994 by sandy on gandalf
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
12 ;; Language: Emacs-Lisp
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
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
16 ;;; This file is part of efs. See efs.el for copyright
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
17 ;;; (it's copylefted) and warrranty (there isn't one) information.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
18
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
19 (provide 'efs-ti-explorer)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
20 (require 'efs)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
21
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
22 (defconst efs-ti-explorer-version
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
23 (concat (substring "$efs release: 1.15 $" 14 -2)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
24 "/"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
25 (substring "$Revision: 1.1 $" 11 -2)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
26
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
27 ;;;; ------------------------------------------------------------
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
28 ;;;; Explorer support.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
29 ;;;; ------------------------------------------------------------
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
30
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
31 ;;; efs support for TI Explorer Lisp Machines.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
32 ;;; Symbolics Lispms use a different syntax, but I think that the
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
33 ;;; MIT and LMI Lispms use the same syntax as Explorers.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
34
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
35 (defconst efs-ti-explorer-filename-regexp
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
36 (let* ((excluded-chars ":;<>.#\n\r\ta-z")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
37 (token (concat "[^" excluded-chars "]+"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
38 (token* (concat "[^" excluded-chars "]*")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
39 (concat "\\(" token ": *" "\\)?" ; optional device
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
40 "\\([^ " excluded-chars "]" token* "\\)"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
41 "\\(\\." token "\\)*; *" ; directory
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
42 "\\(" token* "." token* "\\|\\) *" ; name and extension
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
43 "# *-?\\([0-9]+\\|>\\)"))) ; version
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
44
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
45 (efs-defun efs-quote-string ti-explorer (string &optional not-space)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
46 ;; ## This is an EVIL hack. Backslash is not what Explorers use to
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
47 ;; quote magic characters, and in addition, it is *incorrect* to quote
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
48 ;; spaces between the directory and filename: they are not a part of
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
49 ;; the filename, they are ignored. Quoting them would make them be
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
50 ;; significant.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
51 (if not-space
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
52 string
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
53 (concat "\"" string "\"")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
54
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
55 (efs-defun efs-send-pwd ti-explorer (host user &optional xpwd)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
56 ;; TI-EXPLORER output from pwd's needs to be specially parsed because
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
57 ;; the fullpath syntax contains spaces.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
58 (let* ((result (efs-send-cmd host user '(pwd) "Getting EXPLORER PWD"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
59 (line (nth 1 result))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
60 dir)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
61 (if (car result)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
62 (efs-save-match-data
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
63 (and (string-match "^257 " line)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
64 (setq dir (substring line 4)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
65 (cons dir line)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
66
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
67 (efs-defun efs-fix-path ti-explorer (path &optional reverse)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
68 ;; Convert PATH from UNIX-ish to Explorer. If REVERSE given then convert
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
69 ;; from Explorer to UNIX-ish.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
70 (efs-save-match-data
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
71 (if reverse
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
72 (if (string-match
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
73 "^\\([^:]+:\\)? *\\([^:]+:\\)? *\\([^;]*\\); *\\(.*\\)$"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
74 path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
75 (let (dir file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
76 ;; I don't understand how "devices" work, so I'm ignoring them.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
77 ;; (if (match-beginning 2)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
78 ;; (setq device (substring path
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
79 ;; (match-beginning 2)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
80 ;; (1- (match-end 2)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
81 (if (match-beginning 3)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
82 (setq dir
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
83 (substring path (match-beginning 3) (match-end 3))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
84 (if (match-beginning 4)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
85 (setq file
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
86 (substring path (match-beginning 4) (match-end 4))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
87 (cond (dir
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
88 (setq dir (apply (function concat)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
89 (mapcar (function
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
90 (lambda (char)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
91 (if (= char ?.)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
92 (vector ?/)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
93 (vector char))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
94 dir)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
95 (if (string-match "^/" dir)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
96 (setq dir (substring dir 1))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
97 (setq dir (concat "/" dir)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
98 (concat
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
99 ;; (and device ":") device (and device ":")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
100 dir (and dir "/")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
101 file))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
102 (error "path %s didn't match explorer syntax" path))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
103 (let (dir file tmp)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
104 ;; (if (string-match "^/[^:]+:" path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
105 ;; (setq device (substring path 1
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
106 ;; (1- (match-end 0)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
107 ;; path (substring path (match-end 0))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
108 (cond ((setq tmp (file-name-directory path))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
109 (setq dir (apply (function concat)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
110 (mapcar (function
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
111 (lambda (char)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
112 (if (= char ?/)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
113 (vector ?.)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
114 (vector char))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
115 (substring tmp 0 -1))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
116 (if (string-match "^[.]" dir)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
117 (setq dir (substring dir 1))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
118 (error "explorer pathnames can't be relative")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
119 (setq dir (concat "." dir)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
120 (setq file (file-name-nondirectory path))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
121 (concat
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
122 ;; (and device ":") device (and device ":")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
123 dir
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
124 (and dir ";")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
125 file)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
126
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
127 ;; (efs-fix-path-for-explorer "/PUBLIC/ZMACS/ZYMURG.LISP#1")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
128 ;; (efs-fix-path-for-explorer "PUBLIC.ZMACS;ZYMURG.LISP#1" t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
129
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
130 (efs-defun efs-fix-dir-path ti-explorer (dir-path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
131 ;; Convert path from UNIX-ish to Explorer ready for a DIRectory listing.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
132 (cond ((string-equal dir-path "/")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
133 (efs-fix-path 'ti-explorer "/~/" nil))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
134 ((string-match "^/[-A-Z0-9_$]+:/" dir-path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
135 (error "Don't grok Explorer \"devices\" yet."))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
136 ((efs-fix-path 'ti-explorer dir-path nil))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
137
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
138 (defmacro efs-parse-ti-explorer-filename ()
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
139 ;; Extract the next filename from an Explorer dired-like listing.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
140 (` (if (re-search-forward
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
141 efs-ti-explorer-filename-regexp
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
142 nil t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
143 (buffer-substring (match-beginning 0) (match-end 0)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
144
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
145 (efs-defun efs-parse-listing ti-explorer
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
146 (host user dir path &optional switches)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
147 ;; Parse the current buffer which is assumed to be an Explorer directory
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
148 ;; listing, and return a hashtable as the result.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
149 ;; HOST = remote host name
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
150 ;; USER = user name
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
151 ;; DIR = directory in as a full remote path
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
152 ;; PATH = directory in full efs path syntax
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
153 ;; SWITCHES = ls switches (not relevant here)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
154 (let ((tbl (efs-make-hashtable))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
155 file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
156 (goto-char (point-min))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
157 (efs-save-match-data
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
158 (while (setq file (efs-parse-ti-explorer-filename))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
159 ;; Explorer/Twenex listings might come out in absolute form.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
160 (if (string-match "^[^;]*; *" file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
161 (setq file (substring file (match-end 0))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
162 (if (string-match "\\.\\(DIRECTORY\\|directory\\)#[0-9]+$" file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
163 ;; deal with directories
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
164 (efs-put-hash-entry
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
165 (substring file 0 (match-beginning 0)) '(t) tbl)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
166 (efs-put-hash-entry file '(nil) tbl)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
167 (if (string-match "#[0-9]+$" file) ; deal with extension
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
168 ;; sans extension
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
169 (efs-put-hash-entry
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
170 (substring file 0 (match-beginning 0)) '(nil) tbl)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
171 (forward-line 1))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
172 (efs-put-hash-entry "." '(t) tbl)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
173 (efs-put-hash-entry ".." '(t) tbl))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
174 tbl))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
175
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
176 (efs-defun efs-really-file-p ti-explorer (file ent)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
177 ;; Eliminates the version entries
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
178 (or (car ent) ; file-directory-p
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
179 (efs-save-match-data
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
180 (string-match "#[0-9]+$" file))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
181
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
182 (efs-defun efs-delete-file-entry ti-explorer (path &optional dir-p)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
183 (let ((ignore-case (memq 'ti-explorer efs-case-insensitive-host-types)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
184 (if dir-p
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
185 (let ((path (file-name-as-directory path))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
186 files)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
187 (efs-del-hash-entry path efs-files-hashtable ignore-case)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
188 (setq path (directory-file-name path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
189 files (efs-get-hash-entry (file-name-directory path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
190 efs-files-hashtable
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
191 ignore-case))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
192 (if files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
193 (efs-del-hash-entry (efs-get-file-part path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
194 files ignore-case)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
195 (efs-save-match-data
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
196 (let ((file (efs-get-file-part path)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
197 (if (string-match "#[0-9]+$" file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
198 ;; Only delete entries with explicit version numbers.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
199 (let ((files (efs-get-hash-entry
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
200 (file-name-directory path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
201 efs-files-hashtable ignore-case)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
202 (if files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
203 (let ((root (substring file 0
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
204 (match-beginning 0)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
205 (completion-ignore-case ignore-case)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
206 (len (match-beginning 0)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
207 (efs-del-hash-entry file files ignore-case)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
208 ;; Now we need to check if there are any
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
209 ;; versions left. If not, then delete the
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
210 ;; root entry.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
211 (or (all-completions
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
212 root files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
213 (function
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
214 (lambda (sym)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
215 (string-match "#[0-9]+$"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
216 (symbol-name sym) len))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
217 (efs-del-hash-entry root files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
218 ignore-case)))))))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
219 (efs-del-from-ls-cache path t ignore-case)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
220
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
221 (efs-defun efs-add-file-entry ti-explorer
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
222 (path dir-p size owner &optional modes nlinks mdtm)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
223 ;; The ti-explorer version of this function needs to keep track
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
224 ;; of file versions.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
225 (let ((ignore-case (memq 'ti-explorer efs-case-insensitive-host-types))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
226 (ent (let ((dir-p (null (null dir-p))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
227 (if mdtm
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
228 (list dir-p size owner nil nil mdtm)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
229 (list dir-p size owner)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
230 (if dir-p
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
231 (let* ((path (directory-file-name path))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
232 (files (efs-get-hash-entry (file-name-directory path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
233 efs-files-hashtable
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
234 ignore-case)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
235 (if files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
236 (efs-put-hash-entry (efs-get-file-part path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
237 ent files ignore-case)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
238 (let ((files (efs-get-hash-entry
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
239 (file-name-directory path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
240 efs-files-hashtable ignore-case)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
241 (if files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
242 (let ((file (efs-get-file-part path)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
243 (efs-save-match-data
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
244 (if (string-match "#[0-9]+$" file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
245 (efs-put-hash-entry
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
246 (substring file 0 (match-beginning 0))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
247 ent files ignore-case)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
248 ;; Need to figure out what version of the file
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
249 ;; is being added.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
250 (let* ((completion-ignore-case ignore-case)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
251 (len (length file))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
252 (versions (all-completions
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
253 file files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
254 (function
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
255 (lambda (sym)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
256 (string-match "#[0-9]+$"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
257 (symbol-name sym) len)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
258 (N (1+ len))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
259 (max (apply
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
260 'max
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
261 (cons 0 (mapcar
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
262 (function
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
263 (lambda (x)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
264 (string-to-int (substring x N))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
265 versions)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
266 ;; No need to worry about case here.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
267 (efs-put-hash-entry
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
268 (concat file "#" (int-to-string (1+ max))) ent files))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
269 (efs-put-hash-entry file ent files ignore-case)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
270 (efs-del-from-ls-cache path t ignore-case)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
271
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
272 (efs-defun efs-internal-file-name-as-directory ti-explorer (name)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
273 (efs-save-match-data
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
274 (if (string-match "\\.\\(DIRECTORY\\|directory\\)\\(#[0-9>]\\)?$" name)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
275 (setq name (substring name 0 (match-beginning 0))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
276 (let (file-name-handler-alist)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
277 (file-name-as-directory name))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
278
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
279 (efs-defun efs-allow-child-lookup ti-explorer (host user dir file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
280 ;; Returns t if FILE in directory DIR could possibly be a subdir
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
281 ;; according to its file-name syntax, and therefore a child listing should
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
282 ;; be attempted.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
283
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
284 ;; Subdirs in EXPLORER can't have an extension (other than .DIRECTORY,
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
285 ;; which we have truncated).
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
286 (not (string-match "\\." file)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
287
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
288 ;;; Tree Dired
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
289
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
290 (defconst efs-dired-ti-explorer-re-dir
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
291 "^. *[^;\n\r]+;[^;\n\r.]+\\.\\(DIRECTORY\\|directory\\) *#"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
292 "Regular expression to use to search for Explorer directories.")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
293
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
294 (or (assq 'ti-explorer efs-dired-re-dir-alist)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
295 (setq efs-dired-re-dir-alist
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
296 (cons (cons 'ti-explorer efs-dired-ti-explorer-re-dir)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
297 efs-dired-re-dir-alist)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
298
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
299 (efs-defun efs-dired-manual-move-to-filename ti-explorer
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
300 (&optional raise-error bol eol)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
301 ;; In dired, move to first char of filename on this line.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
302 ;; Returns position (point) or nil if no filename on this line.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
303 ;; This is the Explorer version.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
304 (or eol (setq eol (save-excursion (skip-chars-forward "^\n\r") (point))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
305 (let (case-fold-search)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
306 (if bol
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
307 (goto-char bol)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
308 (skip-chars-backward "^\n\r"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
309 (if (re-search-forward efs-ti-explorer-filename-regexp eol t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
310 (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
311 (goto-char (match-beginning 0))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
312 ;; Explorer listings might come out in absolute form.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
313 (if (looking-at "[^;]*; *")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
314 (goto-char (match-end 0))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
315 (point)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
316 (and raise-error (error "No file on this line")))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
317
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
318 (efs-defun efs-dired-manual-move-to-end-of-filename ti-explorer
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
319 (&optional no-error bol eol)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
320 ;; Assumes point is at beginning of filename.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
321 ;; So, it should be called only after (dired-move-to-filename t).
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
322 ;; On failure, signals an error or returns nil.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
323 ;; This is the Explorer version.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
324 (let (case-fold-search)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
325 (and selective-display
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
326 (null no-error)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
327 (eq (char-after
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
328 (1- (or bol (save-excursion
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
329 (skip-chars-backward "^\r\n")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
330 (point)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
331 ?\r)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
332 ;; File is hidden or omitted.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
333 (cond
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
334 ((dired-subdir-hidden-p (dired-current-directory))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
335 (error
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
336 (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
337 "File line is hidden. Type \\[dired-hide-subdir] to unhide.")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
338 ((error
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
339 (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
340 "File line is omitted. Type \\[dired-omit-toggle] to un-omit."
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
341 )))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
342 (if (looking-at efs-ti-explorer-filename-regexp)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
343 (goto-char (match-end 0))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
344 (if no-error
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
345 nil
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
346 (error "No file on this line")))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
347
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
348 (efs-defun efs-dired-ls-trim ti-explorer ()
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
349 (goto-char (point-min))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
350 (let ((case-fold-search nil))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
351 (re-search-forward efs-ti-explorer-filename-regexp))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
352 (beginning-of-line)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
353 (delete-region (point-min) (point))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
354 (forward-line 1)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
355 (delete-region (point) (point-max)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
356
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
357 (efs-defun efs-internal-file-name-sans-versions ti-explorer
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
358 (name &optional keep-backup-version)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
359 (efs-save-match-data
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
360 (if (string-match "#\\([0-9]+\\|>\\)$" name)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
361 (substring name 0 (match-beginning 0))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
362 name)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
363
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
364 ;;; ### still need to ape these from vms:
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
365 ;;; efs-dired-vms-clean-directory
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
366 ;;; efs-dired-vms-collect-file-versions
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
367 ;;; efs-dired-vms-trample-file-versions
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
368 ;;; efs-dired-vms-flag-backup-files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
369 ;;; efs-dired-vms-backup-diff
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
370
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
371 ;;; end of efs-ti-explorer.el