GNU bug report logs -
#18824
split diff-check-labels off diff-no-select
Previous Next
Reported by: Ivan Shmakov <ivan <at> siamics.net>
Date: Sat, 25 Oct 2014 09:19:02 UTC
Severity: wishlist
Tags: fixed, patch
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18824 in the body.
You can then email your comments to 18824 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18824
; Package
emacs
.
(Sat, 25 Oct 2014 09:19:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ivan Shmakov <ivan <at> siamics.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 25 Oct 2014 09:19:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Package: emacs
Severity: wishlist
Tags: patch
Please provide a separate diff-check-labels function to allow
for the code calling diff.el facilities to supply its own
--label= arguments to diff in place of diff.el-generated ones.
Possible patch, as well as the example usage, are MIMEd.
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
[Message part 2 (text/diff, inline)]
--- a/lisp/vc/diff.el
+++ b/lisp/vc/diff.el
@@ -121,6 +121,15 @@ Possible values are:
nil -- no, it does not
check -- try to probe whether it does")
+(defun diff-check-labels (&optional force)
+ (if (not (or force (eq 'check diff-use-labels)))
+ diff-use-labels
+ (setq diff-use-labels
+ (with-temp-buffer
+ (when (ignore-errors
+ (call-process diff-command nil t nil "--help"))
+ (if (search-backward "--label" nil t) t))))))
+
(defun diff-no-select (old new &optional switches no-async buf)
;; Noninteractive helper for creating and reverting diff buffers
(unless (bufferp new) (setq new (expand-file-name new)))
@@ -128,11 +137,7 @@ diff-no-select (old new &optional switches no-async buf)
(or switches (setq switches diff-switches)) ; If not specified, use default.
(unless (listp switches) (setq switches (list switches)))
(or buf (setq buf (get-buffer-create "*Diff*")))
- (when (eq 'check diff-use-labels)
- (setq diff-use-labels
- (with-temp-buffer
- (when (ignore-errors (call-process diff-command nil t nil "--help"))
- (if (search-backward "--label" nil t) t)))))
+ (diff-check-labels)
(let* ((old-alt (diff-file-local-copy old))
(new-alt (diff-file-local-copy new))
(command
[Message part 3 (text/emacs-lisp, inline)]
(let ((old "old") (new "new")
(target (get-buffer-create "*My Diff*"))
(labels (and (diff-check-labels)
(mapcar 'shell-quote-argument
(list "--label"
"*old revision*"
"--label"
"*new revision*")))))
(if labels
(let ((diff-use-labels nil)
(sw (nconc labels
(if (listp diff-switches)
diff-switches
(list diff-switches)))))
(diff-no-select old new switches nil target))
(diff-no-select old new nil nil target)))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18824
; Package
emacs
.
(Sun, 26 Oct 2014 02:42:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 18824 <at> debbugs.gnu.org (full text, mbox):
> Please provide a separate diff-check-labels function to allow
> for the code calling diff.el facilities to supply its own
> --label= arguments to diff in place of diff.el-generated ones.
Sounds fine. While you're at it, you might like to use this for
smerge-mode (which uses "-L" rather than "--label").
Stefan
Added indication that bug 18824 blocks18850
Request was from
Ivan Shmakov <ivan <at> siamics.net>
to
control <at> debbugs.gnu.org
.
(Mon, 27 Oct 2014 10:34:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18824
; Package
emacs
.
(Fri, 21 Nov 2014 10:59:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 18824 <at> debbugs.gnu.org (full text, mbox):
Stefan, you’ve previously commented on several of the bug
reports I’ve suggested patches for. Could you please revisit
these patches and either commit or explicitly reject them?
(Any suggestion on how, if at all, do I improve them in the
latter case will be appreciated.)
The bug reports in question are as follows.
TIA.
http://debbugs.gnu.org/18175 Use (mapc 'switch-to-buffer …) in
files.el (was: mapcar.)
http://debbugs.gnu.org/18246 Use inhibit-point-motion-hooks
(in addition to inhibit-read-only) in enriched-encode.
http://debbugs.gnu.org/18824 New diff-check-labels function
(split off diff-no-select)
http://debbugs.gnu.org/18850 Use diff-check-labels and the --label
option to diff (was: -L – deprecated) in smerge-mode.el
--
FSF associate member #7257 np. По полям, за рекой — Иллет … B6A0 230E 334A
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18824
; Package
emacs
.
(Tue, 23 Feb 2016 12:06:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 18824 <at> debbugs.gnu.org (full text, mbox):
Ivan Shmakov <ivan <at> siamics.net> writes:
> Package: emacs
> Severity: wishlist
> Tags: patch
>
> Please provide a separate diff-check-labels function to allow
> for the code calling diff.el facilities to supply its own
> --label= arguments to diff in place of diff.el-generated ones.
>
> Possible patch, as well as the example usage, are MIMEd.
I think this patch looks fine. Could you also provide a NEWS entry?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18824
; Package
emacs
.
(Tue, 25 Jun 2019 21:20:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 18824 <at> debbugs.gnu.org (full text, mbox):
Ivan Shmakov <ivan <at> siamics.net> writes:
> Please provide a separate diff-check-labels function to allow
> for the code calling diff.el facilities to supply its own
> --label= arguments to diff in place of diff.el-generated ones.
>
> Possible patch, as well as the example usage, are MIMEd.
I've now applied the patch along with the smerge one.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 25 Jun 2019 21:20:03 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 27.1, send any further explanations to
18824 <at> debbugs.gnu.org and Ivan Shmakov <ivan <at> siamics.net>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 25 Jun 2019 21:20:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 24 Jul 2019 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 271 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.