From: Drew Adams <drew.adams@oracle.com>
To: 27465@debbugs.gnu.org
Subject: bug#27465: 24.5; `dired-mark-unmarked-files' with non-nil UNFLAG-P
Date: Fri, 23 Jun 2017 15:44:21 -0700 (PDT) [thread overview]
Message-ID: <a7c4437f-0707-4cfd-9382-fe59c8f1c0b7@default> (raw)
AFAICT this could never have worked.
1. Prior to Emacs 24, the interactive spec was just "P", which could of
course not work interactively. In Emacs 24 it was changed to read
the REGEXP and use the prefix arg for UNFLAG-P. That "P" was an
indication that the command never worked interactively and was
probably ill-conceived for that. And that "P" remained from Emacs
20 (if not before) through 23.
2. There are no occurrences in the Elisp sources that use non-nil
UNFLAG-P.
3. Non-nil UNFLAG-P does nothing, AFAICT. It _cannot_ do anything.
Certainly it cannot unflag, which means change a deletion flag (`D')
to a space char. Why? Because the replacement is applied only to
lines that already have a space char (not a `D').
Its effect in that case is indeed to post a space char. But it does
so only for lines that already have a space char!
This is the call:
(dired-mark-if
(and
(looking-at-p " ") ; <=== Mark (with a SPC) only if already there!
(let ((fn (dired-get-filename localp t)))
(and fn (string-match-p regexp fn))))
msg)
What to do? I suggest NOT trying to have any "unflag" behavior here.
If it were fixed, so that it actually replaced `D' with ` ' when there
is a prefix arg, I think that behavior would be confusing. IOW, better
not to fix the implementation to fix an awful design. Mark-if-unmarked
should not mean unflag sometimes.
But if you really want to fix this so that it does what the doc says,
that's OK by me. Something should be done about it, anyway.
(BTW, the comment "uninteresting" is backward wrt the comment "not
already marked". The files that are checked are those that are not
already marked and are interesting, i.e, match.)
In GNU Emacs 24.5.1 (i686-pc-mingw32)
of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --prefix=/c/usr --host=i686-pc-mingw32'
next reply other threads:[~2017-06-23 22:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-23 22:44 Drew Adams [this message]
2019-07-21 15:41 ` bug#27465: 24.5; `dired-mark-unmarked-files' with non-nil UNFLAG-P Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a7c4437f-0707-4cfd-9382-fe59c8f1c0b7@default \
--to=drew.adams@oracle.com \
--cc=27465@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.