GNU bug report logs - #44617
26.3; diff-mode ignores diff-switches

Previous Next

Package: emacs;

Reported by: Francesco Potortì <pot <at> gnu.org>

Date: Fri, 13 Nov 2020 12:12:01 UTC

Severity: normal

Tags: moreinfo

Found in version 26.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 44617 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Francesco Potortì <pot <at> gnu.org>
Cc: 44617 <at> debbugs.gnu.org
Subject: Re: bug#44617: 26.3; diff-mode ignores diff-switches
Date: Sat, 14 Nov 2020 17:25:17 +0100
Francesco Potortì <pot <at> gnu.org> writes:

> diff-mode relies on the diff-command variables defined in diff.el, but
> ignores diff-switches
>
> I think this is a bug

Do you mean the `diff-refresh-hunk' command?  I does indeed ignore
`diff-switches', but that's because it tries to keep the style of the
diff consistent:

(defun diff-refresh-hunk (&optional ignore-whitespace)
  "Re-diff the current hunk."
  (interactive)
  (let* ((char-offset (- (point) (diff-beginning-of-hunk t)))
	 (opt-type (pcase (char-after)
                     (?@ "-u")
                     (?* "-c")))

Which I think sounds like the correct design.  What's the use case you
have for diff-switches where you'd want this command to heed diff-switches?

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




This bug report was last modified 4 years and 171 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.