Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
934eeab5
Commit
934eeab5
authored
Jul 24, 2014
by
Michael Albinus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* net/tramp-cache.el (tramp-flush-file-function): Wrap the code
with `save-match-data'. Fixes: debbugs:18095
parent
d6a393dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/net/tramp-cache.el
lisp/net/tramp-cache.el
+10
-8
No files found.
lisp/ChangeLog
View file @
934eeab5
2014-07-24 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-cache.el (tramp-flush-file-function): Wrap the code
with `save-match-data'. (Bug#18095)
2014-07-21 Vincent Belaïche <vincentb1@users.sourceforge.net>
* ses.el (ses-truncate-cell): Use cl-progv instead of eval in
...
...
lisp/net/tramp-cache.el
View file @
934eeab5
...
...
@@ -201,17 +201,19 @@ Remove also properties of all files in subdirectories."
;; Reverting or killing a buffer should also flush file properties.
;; They could have been changed outside Tramp. In eshell, "ls" would
;; not show proper directory contents when a file has been copied or
;; deleted before.
;; deleted before. We must apply `save-match-data', because it would
;; corrupt other packages otherwise (reported from org).
(
defun
tramp-flush-file-function
()
"Flush all Tramp cache properties from `buffer-file-name'.
This is suppressed for temporary buffers."
(
unless
(
string-match
"^ \\*temp\\*"
(
or
(
buffer-name
)
""
))
(
let
((
bfn
(
if
(
stringp
(
buffer-file-name
))
(
buffer-file-name
)
default-directory
)))
(
when
(
tramp-tramp-file-p
bfn
)
(
with-parsed-tramp-file-name
bfn
nil
(
tramp-flush-file-property
v
localname
))))))
(
save-match-data
(
unless
(
string-match
"^ \\*temp\\*"
(
or
(
buffer-name
)
""
))
(
let
((
bfn
(
if
(
stringp
(
buffer-file-name
))
(
buffer-file-name
)
default-directory
)))
(
when
(
tramp-tramp-file-p
bfn
)
(
with-parsed-tramp-file-name
bfn
nil
(
tramp-flush-file-property
v
localname
)))))))
(
add-hook
'before-revert-hook
'tramp-flush-file-function
)
(
add-hook
'eshell-pre-command-hook
'tramp-flush-file-function
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment