all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ndame via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 49774@debbugs.gnu.org
Subject: bug#49774: 27.1; if diff commands finds no differences then do not pop up a window
Date: Fri, 30 Jul 2021 18:28:11 +0000	[thread overview]
Message-ID: <s4zd4P1uDdOsRMOZsQrqWQi7T1sQCybO0QM5HjHg1JbUeY45QBe2KZGBQ6hCz6sFmMkROkn3MKHGzKZzEIKPUVsDZCyiloxyCYkpNSavmvU=@protonmail.com> (raw)
In-Reply-To: <6-jIgEjC-M3zdDQDysoGtRzEjthWPAJ2umfoWDGcAvubl3DvWEFvWaLPStFKSxTJW-Vy0_PQ8Gsnu9u7hAuK040bA-ooxQwB9wLJNA7sUm0=@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

> If there are no differences then emacs should just show this in a message instead of popping up a window with not useful content.

Just a simple implementation with advices for the time being for those who prefer this:

(advice-add 'diff :around 'my-diff)

(defun my-diff (orig-fun &rest args)
(flet ((display-buffer (buf) buf))
(apply orig-fun args)))

(advice-add 'diff-sentinel :after 'my-diff-sentinel)

(defun my-diff-sentinel (code &rest args)
(if (equal code 0)
(message "No differences.")
(display-buffer (current-buffer))))

[-- Attachment #2: Type: text/html, Size: 1025 bytes --]

  parent reply	other threads:[~2021-07-30 18:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29 16:59 bug#49774: 27.1; if diff commands finds no differences then do not pop up a window ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-30  1:18 ` Dmitry Gutov
2021-07-30  4:18   ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-30 10:03     ` Lars Ingebrigtsen
2021-07-30 11:19       ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-30 11:24         ` Lars Ingebrigtsen
2021-07-30 11:47           ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-30 11:48             ` Lars Ingebrigtsen
2021-07-30 11:58               ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-30 12:44                 ` Dmitry Gutov
2021-07-30 13:19                   ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-30 18:47                   ` Lars Ingebrigtsen
2021-07-31 21:06                     ` Juri Linkov
2021-07-31 22:11                       ` Lars Ingebrigtsen
2021-08-02  1:07                     ` Richard Stallman
2022-08-22 10:30                       ` Lars Ingebrigtsen
2021-07-30 18:28 ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-08-16 18:29   ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors

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='s4zd4P1uDdOsRMOZsQrqWQi7T1sQCybO0QM5HjHg1JbUeY45QBe2KZGBQ6hCz6sFmMkROkn3MKHGzKZzEIKPUVsDZCyiloxyCYkpNSavmvU=@protonmail.com' \
    --to=bug-gnu-emacs@gnu.org \
    --cc=49774@debbugs.gnu.org \
    --cc=laszlomail@protonmail.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 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.