all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sean Whitton <spwhitton@spwhitton.name>
To: Eli Zaretskii <eliz@gnu.org>
Cc: dgutov@yandex.ru, 73407@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
Subject: bug#73407: [PATCH v4] bug#73407: 31.0.50; Add diff-discard-hunk
Date: Wed, 25 Sep 2024 07:36:42 +0100	[thread overview]
Message-ID: <87cyks1bph.fsf@zephyr.silentflame.com> (raw)
In-Reply-To: <86o74dc4cx.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Sep 2024 21:07:42 +0300")

Hello,

On Tue 24 Sep 2024 at 09:07pm +03, Eli Zaretskii wrote:

>> From: Juri Linkov <juri@linkov.net>
>> Cc: Eli Zaretskii <eliz@gnu.org>,  dgutov@yandex.ru,  73407@debbugs.gnu.org
>> Date: Tue, 24 Sep 2024 19:59:04 +0300
>>
>> >>> -           (message "%d hunks failed; no buffers changed" failures)))))
>> >>> +           (message "%d hunks failed; no buffers changed" failures)
>> >>> +           failures))))
>> >>
>> >> This comes from existing text, but still: what does the above say when
>> >> there's only 1 failure? does it say "1 hunks failed"?  If so, can we
>> >> improve the handling of singular/plural here?
>> >
>> > I've installed a fix for that.
>>
>> Another variant would be to use 'ngettext'.
>
> That's what I had in mind...

Do you mean like this?

diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index be3d94db011..9677fbb9175 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -2083,7 +2083,7 @@ diff-apply-buffer
            (message "Saved %d buffers" (length buffer-edits)))
           (t
            (message "%d %s failed; no buffers changed"
-                    failures (if (> failures 1) "hunks" "hunk"))))))
+                    failures (ngettext "hunk" "hunks" failures))))))

 (defalias 'diff-mouse-goto-source #'diff-goto-source)

-- 
Sean Whitton





  reply	other threads:[~2024-09-25  6:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-21 10:19 bug#73407: 31.0.50; Add diff-discard-hunk Sean Whitton
2024-09-23 22:52 ` Dmitry Gutov
2024-09-24  7:53   ` Sean Whitton
2024-09-24 12:27     ` Dmitry Gutov
2024-09-24 15:48       ` Sean Whitton
2024-09-24  6:36 ` Juri Linkov
2024-09-24  8:07   ` Sean Whitton
2024-09-24  8:40   ` Sean Whitton
2024-09-24  8:42     ` Sean Whitton
2024-09-24 12:22       ` Dmitry Gutov
2024-09-24 12:21     ` Eli Zaretskii
2024-09-24 12:23       ` Dmitry Gutov
2024-09-24 14:33         ` Óscar Fuentes
2024-09-24 15:43       ` bug#73407: [PATCH v4] " Sean Whitton
2024-09-24 16:59         ` Juri Linkov
2024-09-24 17:56           ` Sean Whitton
2024-09-24 18:07           ` Eli Zaretskii
2024-09-25  6:36             ` Sean Whitton [this message]
2024-09-25 12:17               ` Eli Zaretskii
2024-09-25 19:33                 ` Sean Whitton
2024-09-24 12:20   ` Dmitry Gutov
2024-09-26 10:52 ` bug#73407: 31.0.50; Add diff-revert-and-kill-hunk Sean Whitton

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=87cyks1bph.fsf@zephyr.silentflame.com \
    --to=spwhitton@spwhitton.name \
    --cc=73407@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.net \
    /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.