Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
40714e3d
Commit
40714e3d
authored
Oct 17, 2012
by
Glenn Morris
Browse files
* dired.el (dired-sort-toggle): Some ls implementations only allow
a single option string. Fixes: debbugs:12666
parent
281c9d2b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
lisp/ChangeLog
lisp/ChangeLog
+3
-0
lisp/dired.el
lisp/dired.el
+8
-1
No files found.
lisp/ChangeLog
View file @
40714e3d
2012-10-18 Glenn Morris <rgm@gnu.org>
* dired.el (dired-sort-toggle): Some ls implementations only allow
a single option string. (Bug#12666)
* minibuffer.el (completion-cycle-threshold): Doc fix.
2012-10-17 Kenichi Handa <handa@gnu.org>
...
...
lisp/dired.el
View file @
40714e3d
...
...
@@ -3546,8 +3546,15 @@ With a prefix argument, edit the current listing switches instead."
(setq dired-actual-switches
(replace-match "" t t dired-actual-switches 3))))
;; Now, if we weren't sorting by date before, add the -t switch.
;; Some simple-minded ls implementations (eg ftp servers) only
;; allow a single option string, so try not to add "
-t
" if possible.
(unless sorting-by-date
(setq dired-actual-switches (concat dired-actual-switches "
-t
"))))
(setq dired-actual-switches
(concat dired-actual-switches
(if (string-match-p "
\\
`
-[[:alnum:]]+\\
'
"
dired-actual-switches)
"
t
"
"
-t
")))))
(dired-sort-set-mode-line)
(revert-buffer))
...
...
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