unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Guilhem Bichot <guilhem.bichot@wanadoo.fr>
Cc: 45016@debbugs.gnu.org
Subject: bug#45016: 26.3; when in ediff-current-file, 'D' (view diff) shows empty diff
Date: Sun, 24 Jan 2021 00:27:19 +0100	[thread overview]
Message-ID: <87im7nqlns.fsf@gnus.org> (raw)
In-Reply-To: <d8511480-4240-b124-6b00-5cc32380d1d8@wanadoo.fr> (Guilhem Bichot's message of "Wed, 2 Dec 2020 21:52:56 +0100")

Guilhem Bichot <guilhem.bichot@wanadoo.fr> writes:

> * start emacs -Q
> * create a file named, for example, /tmp/a
> * put a line of text in it, save it
> * add some characters to this line, don't save
> * launch M-x ediff-current-file
> * press D to view the diff
> * a buffer opens to show the diff but it is empty. I expected to see a
> non-empty diff (a context diff, as ediff-custom-diff-options is at its
> default "-c").
> * if instead of D I press C-u D then I do get a non-empty plain diff
> (non-context, non-unified).

This bug is still present in Emacs 28.

This is how the `D' command starts:

(defun ediff-show-diff-output (arg)
  (interactive "P")
[...]
  (let ((buf (cond ((and arg (ediff-buffer-live-p ediff-diff-buffer))
		    ediff-diff-buffer)
		   ((ediff-buffer-live-p ediff-custom-diff-buffer)
		    ediff-custom-diff-buffer)

There's helpfully no doc string here (or comments) about what `arg' is
meant to express, but if we have `arg', we work on `ediff-diff-buffer'
(and this works), and if we don't have `arg', then
`ediff-custom-diff-buffer' is used (and this doesn't work).

I'm pretty unfamiliar with ediff -- does anybody know what the intention
here is for the prefix arg?

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





  parent reply	other threads:[~2021-01-23 23:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02 20:52 bug#45016: 26.3; when in ediff-current-file, 'D' (view diff) shows empty diff Guilhem Bichot
2020-12-03 11:19 ` bug#45016: additional information Guilhem Bichot
2021-01-23 23:27 ` Lars Ingebrigtsen [this message]
2022-05-09 12:07   ` bug#45016: 26.3; when in ediff-current-file, 'D' (view diff) shows empty diff 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

  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=87im7nqlns.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=45016@debbugs.gnu.org \
    --cc=guilhem.bichot@wanadoo.fr \
    /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).