unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 22457@debbugs.gnu.org
Subject: bug#22457: 24.5; [PATCH] `dired-mark-if' should not count non-changes
Date: Tue, 25 Jun 2019 16:42:27 +0200	[thread overview]
Message-ID: <m3ef3h7mlo.fsf@gnus.org> (raw)
In-Reply-To: <2a6ff247-2b75-4f85-9a4c-889576ed7b34@default> (Drew Adams's message of "Sun, 24 Jan 2016 10:05:44 -0800 (PST)")

Drew Adams <drew.adams@oracle.com> writes:

> `dired-mark-if' marks, unmarks, or flags Dired lines that satisfy its
> PREDICATE argument.
>
> But it should do nothing if a given line is already so marked, unmarked,
> or flagged.  More importantly, it should not count that line as having
> been marked, unmarked, or flagged.  The message that echoes the count of
> changes should not take such non-changes into account.

That sounds like a sensible change, and a cursory look at the code seems
to say that nothing uses the return value, anyway.  (So it shouldn't
break anything.)  (But my look was very cursory; this should be
confirmed by looking at the code closer.)

> Here is a fixed version of the macro.  The diff is trivial.

No diff was included, which, as usual, is a shame, because the macro has
changed slightly in the meantime.

>                           (cond ((eq dired-marker-char ?\040)            "Unmarking")

?\040 isn't the recommended way of saying "space".

>                                 ((eq dired-del-marker dired-marker-char) "Flagging")
>                                 (t                                       "Marking"))

Your lines are also too wide; they should be less than 80 characters
wide.

Could you re-spin your change and submit a patch?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2019-06-25 14:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-24 18:05 bug#22457: 24.5; [PATCH] `dired-mark-if' should not count non-changes Drew Adams
2019-06-25 14:42 ` Lars Ingebrigtsen [this message]
2019-06-25 15:33   ` Drew Adams
2019-06-25 15:44     ` Lars Ingebrigtsen
2019-06-25 22:47       ` Michael Heerdegen
2019-06-25 22:53         ` Lars Ingebrigtsen
2019-06-25 23:02           ` Michael Heerdegen
2019-06-25 23:12             ` Lars Ingebrigtsen
2019-06-25 23:26             ` Drew Adams
2019-06-25 23:30               ` Michael Heerdegen
2019-06-26  0:00                 ` Drew Adams
2019-06-26  8:50               ` Andreas Schwab
2019-06-26 13:32                 ` Drew Adams
2019-06-25 23:17         ` Drew Adams
2019-06-25 23:28           ` Michael Heerdegen
2019-06-25 15:46     ` Lars Ingebrigtsen
2019-06-25 16:06       ` Drew Adams

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=m3ef3h7mlo.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=22457@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /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).