From: Reuben Thomas <rrt@sc3d.org>
To: 18716@debbugs.gnu.org
Subject: bug#18716: Patch for this bug
Date: Tue, 8 Nov 2016 17:51:26 +0000 [thread overview]
Message-ID: <CAOnWdojYHT5OskgfCKz+GTPRsS0g7poS9mXLa6o_S=msCO69uw@mail.gmail.com> (raw)
In-Reply-To: <8761fm903w.fsf@sc3d.org>
[-- Attachment #1.1: Type: text/plain, Size: 628 bytes --]
I attach a patch for this bug.
It makes dired-mark-unmarked-files act case-insensitively. This seems
reasonable, as there's nothing to suggest it does otherwise.
Also, it is better than Stefan's suggestion to use auto-mode-case-fold, as
when visiting files, the user will quickly see if a file has been e.g.
visited in the wrong major mode owing to an uppercase filename being
treated as a lowercase one; whereas in dired-omit-mode, files can be hidden
counter to the user's expectation, as happened to me with COPYING.LIB, yet
it is not obvious (because the file is hidden!).
Is this OK to install?
--
http://rrt.sc3d.org
[-- Attachment #1.2: Type: text/html, Size: 1203 bytes --]
[-- Attachment #2: 0001-Match-files-case-insensitively-in-dired-x.patch --]
[-- Type: text/x-patch, Size: 1306 bytes --]
From 3e6e0d9acbb518f0d84866c6e28b27d049b6e474 Mon Sep 17 00:00:00 2001
From: Reuben Thomas <rrt@sc3d.org>
Date: Tue, 8 Nov 2016 17:42:24 +0000
Subject: [PATCH] Match files case-insensitively in dired-x
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* lisp/dired-x.el (dired-mark-unmarked-files): Match the regex
case-insensitively (Bug#18716). Do not use auto-mode-case-fold, as the
principle is different: with find-file, it’s reasonable to treat
upper-case filenames like lower-case ones, as the user will quickly see
if anything is wrong, and often it’s convenient; but with
dired-omit-mode, it is a bad idea to hide files that the user might
expect to see, as the omission will, by the nature of omission, not be
obvious!
---
lisp/dired-x.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 8313905..a5d1e49 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -594,7 +594,8 @@ dired-mark-unmarked-files
;; not already marked
(looking-at-p " ")
;; uninteresting
- (let ((fn (dired-get-filename localp t)))
+ (let ((fn (dired-get-filename localp t))
+ (case-fold-search nil))
(and fn (string-match-p regexp fn))))
msg)))
--
2.7.4
next prev parent reply other threads:[~2016-11-08 17:51 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-14 14:50 bug#18716: 24.3; dired-omit-extensions's default value omits COPYING.LIB Reuben Thomas
2014-10-14 23:41 ` Stefan Monnier
2014-10-14 23:51 ` Reuben Thomas
2014-10-15 7:56 ` Andreas Schwab
2014-10-15 14:21 ` Stefan Monnier
2014-10-15 14:26 ` Reuben Thomas
2014-10-15 14:27 ` Reuben Thomas
2014-10-15 17:59 ` Stefan Monnier
2014-10-15 19:05 ` Reuben Thomas
2014-10-15 22:42 ` Stefan Monnier
2014-10-15 23:00 ` Reuben Thomas
2014-10-16 3:10 ` Stefan Monnier
2014-10-15 14:26 ` Andreas Schwab
2014-10-15 17:57 ` Stefan Monnier
2014-10-15 20:57 ` Andreas Schwab
2014-10-15 22:44 ` Stefan Monnier
2014-10-15 22:54 ` Glenn Morris
2014-10-16 3:06 ` Stefan Monnier
2014-10-16 7:13 ` Andreas Schwab
2014-10-16 13:15 ` Stefan Monnier
2014-10-16 2:01 ` Richard Stallman
2014-10-16 3:09 ` Stefan Monnier
2014-10-16 18:14 ` Richard Stallman
2014-10-16 20:17 ` Stefan Monnier
2016-11-08 17:51 ` Reuben Thomas [this message]
2016-11-08 20:04 ` bug#18716: Patch for this bug Eli Zaretskii
2016-11-08 22:16 ` Reuben Thomas
2016-11-09 19:36 ` Eli Zaretskii
2016-11-09 22:00 ` Reuben Thomas
2016-11-09 22:52 ` Drew Adams
2016-11-09 23:29 ` Reuben Thomas
2016-11-10 17:38 ` Eli Zaretskii
2016-11-26 17:54 ` Reuben Thomas
2016-11-26 18:29 ` Ken Brown
2016-11-28 21:32 ` Reuben Thomas
2016-12-02 9:40 ` Eli Zaretskii
2016-12-02 16:10 ` Reuben Thomas
2016-12-02 16:16 ` Eli Zaretskii
2016-12-02 16:31 ` Reuben Thomas
2016-12-03 0:22 ` bug#18716: Reuben Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOnWdojYHT5OskgfCKz+GTPRsS0g7poS9mXLa6o_S=msCO69uw@mail.gmail.com' \
--to=rrt@sc3d.org \
--cc=18716@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).