Comments (1)
Partial solution:
(defun tramp-handle-make-backup-file-name (filename)
"Like `make-backup-file-name' for Tramp files."
(if (tramp-tramp-file-p filename)
(with-parsed-tramp-file-name filename nil
(let ((backup-directory-alist
(if tramp-backup-directory-alist
(mapcar
(lambda (x)
(cons
(car x)
(if (and (stringp (cdr x))
(file-name-absolute-p (cdr x))
(not (tramp-tramp-file-p (cdr x))))
(tramp-make-tramp-file-name v (cdr x))
(cdr x))))
tramp-backup-directory-alist)
backup-directory-alist)))
(tramp-run-real-handler #'make-backup-file-name (list filename))))
(make-backup-file-name filename)))
(defun backup-walker-get-sorted-backups (filename)
"Return version sorted list of backups of the form:
(prefix (list of suffixes))"
;; `make-backup-file-name' will get us the right directory for
;; ordinary or numeric backups. It might create a directory for
;; backups as a side-effect, according to `backup-directory-alist'.
(let* ((filename (file-name-sans-versions
(tramp-handle-make-backup-file-name (expand-file-name filename))))
(file (file-name-nondirectory filename))
(dir (file-name-directory filename))
(comp (remove (concat file "~") (file-name-all-completions file dir)))
(prefix-len (length file)))
(cons filename (mapcar
(lambda (f)
(substring (cdr f) prefix-len))
(sort (mapcar (lambda (f)
(cons (backup-walker-get-version f prefix-len)
f))
comp)
(lambda (f1 f2)
(not (< (car f1) (car f2)))))))))
from quark-emacs.
Related Issues (20)
- Persistent high CPU load while editing LaTeX files HOT 1
- Migrate from advice-add to define-advice
- Prevent TRAMP files from being removed from recentf
- Pressing enter on a PDF in dired should open system PDF viewer
- Don't hang when interacting with the kill-ring after an image has been copied HOT 1
- Better garbage collection strategy
- Make a better "TeX" input method
- Make a faster real-auto-save-mode
- font-locking is slow
- Issues with variable bindings in helm-flx-historian
- magic-latex-buffer is too slow HOT 3
- mypyls on macosx doesn't install HOT 2
- AUCTeX: LaTeX-current-environment ignores envs with numbers
- Remote/server python HOT 1
- Support native-comp
- whitespace-mode faces not visible
- Move punctuation during "mtm" in evil-tex HOT 1
- Use OSC 52 to copy from terminal to system clipboard
- Clarifying questions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quark-emacs.