GNU bug report logs -
#18850
smerge-mode: use diff-check-labels
Previous Next
Reported by: Ivan Shmakov <ivan <at> siamics.net>
Date: Mon, 27 Oct 2014 10:26:01 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 18850 in the body.
You can then email your comments to 18850 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#18850
; Package
emacs
.
(Mon, 27 Oct 2014 10:26: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
.
(Mon, 27 Oct 2014 10:26: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
Control: block -1 by 18824
>>>>> Stefan Monnier <monnier <at> iro.umontreal.ca> 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.
> Sounds fine. While you're at it, you might like to use this for
> smerge-mode (which uses "-L" rather than "--label").
I assume you mean something along the lines of the (untested)
patch MIMEd.
Curiously, I don’t usually use the merge facility proper,
resolving merge conflicts afterwards. Instead, I save the diff
against the current revision, switch to a newer one, apply the
diff saved, and deal with the ‘.rej’ files, if any. Like:
$ (umask 0222 && git diff > +patch-$(date +%s).diff)
$ git reset origin/master \
&& patch -bVt -p1 -R < <(git diff)
…
$ patch -bVt -p1 < +patch-1414405170.diff
…
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
[Message part 2 (text/diff, inline)]
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -44,6 +44,7 @@
;;; Code:
(eval-when-compile (require 'cl-lib))
+(require 'diff) ; for diff-check-labels
(require 'diff-mode) ;For diff-auto-refine-mode.
(require 'newcomment)
@@ -1162,10 +1163,13 @@ smerge-diff (n1 n2)
(erase-buffer)
(let ((status
(apply 'call-process diff-command nil t nil
- (append smerge-diff-switches
- (list "-L" (concat name1 "/" file)
- "-L" (concat name2 "/" file)
- file1 file2)))))
+ (nconc (and (diff-check-labels)
+ (list "--label"
+ (concat name1 "/" file)
+ "--label"
+ (concat name2 "/" file)))
+ smerge-diff-switches)
+ file1 file2)))))
(if (eq status 0) (insert "No differences found.\n"))))
(goto-char (point-min))
(diff-mode)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18850
; Package
emacs
.
(Mon, 27 Oct 2014 10:34:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 18850 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
block 18850 by 18824
thanks
Another try.
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
[Message part 2 (text/diff, inline)]
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -44,6 +44,7 @@
;;; Code:
(eval-when-compile (require 'cl-lib))
+(require 'diff) ; for diff-check-labels
(require 'diff-mode) ;For diff-auto-refine-mode.
(require 'newcomment)
@@ -1163,9 +1164,12 @@ repeating the command will highlight other two parts."
(let ((status
(apply 'call-process diff-command nil t nil
(append smerge-diff-switches
- (list "-L" (concat name1 "/" file)
- "-L" (concat name2 "/" file)
- file1 file2)))))
+ (and (diff-check-labels)
+ (list "--label"
+ (concat name1 "/" file)
+ "--label"
+ (concat name2 "/" file)))
+ (list file1 file2)))))
(if (eq status 0) (insert "No differences found.\n"))))
(goto-char (point-min))
(diff-mode)
Added blocking bug(s) 18824
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#18850
; Package
emacs
.
(Mon, 27 Oct 2014 13:33:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 18850 <at> debbugs.gnu.org (full text, mbox):
> @@ -1163,9 +1164,12 @@ repeating the command will highlight other two parts."
> (let ((status
> (apply 'call-process diff-command nil t nil
> (append smerge-diff-switches
> - (list "-L" (concat name1 "/" file)
> - "-L" (concat name2 "/" file)
> - file1 file2)))))
> + (and (diff-check-labels)
> + (list "--label"
> + (concat name1 "/" file)
> + "--label"
> + (concat name2 "/" file)))
> + (list file1 file2)))))
> (if (eq status 0) (insert "No differences found.\n"))))
> (goto-char (point-min))
> (diff-mode)
That looks OK, yes. Tho you don't need to change -L to --label.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18850
; Package
emacs
.
(Mon, 27 Oct 2014 13:37:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 18850 <at> debbugs.gnu.org (full text, mbox):
>>>>> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
[…]
> That looks OK, yes. Tho you don't need to change -L to --label.
The point is that, strictly speaking, (diff-check-labels) only
checks for the --label option proper, not for its aliases.
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18850
; Package
emacs
.
(Mon, 27 Oct 2014 17:13:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 18850 <at> debbugs.gnu.org (full text, mbox):
>> That looks OK, yes. Tho you don't need to change -L to --label.
> The point is that, strictly speaking, (diff-check-labels) only
> checks for the --label option proper, not for its aliases.
Of course, part of the question, then is: are there diff commands that
handle one of the two but not the other. If there are, then we should
use the one that's more often supported, and if there aren't then it
doesn't matter.
So far, smerge-mode hasn't even bothered to check, so maybe the check
isn't that important any more (IIRC it was added for Solaris's diff,
tho I'd suspect that current derivatives of Solaris woujld accept
either -L or --label or both).
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18850
; Package
emacs
.
(Tue, 28 Oct 2014 09:20:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 18850 <at> debbugs.gnu.org (full text, mbox):
>>>>> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>> That looks OK, yes. Tho you don't need to change -L to --label.
>> The point is that, strictly speaking, (diff-check-labels) only
>> checks for the --label option proper, not for its aliases.
> Of course, part of the question, then is: are there diff commands
> that handle one of the two but not the other. If there are, then we
> should use the one that's more often supported, and if there aren't
> then it doesn't matter.
I have no reason to insist on doing it either way. However, it
still feels inconsistent to check for a specific option, and
then use its alias.
Then, however, there’s the following in diffutils/NEWS:
> User-visible changes in version 2.8:
[…]
> * The following diff options are still accepted, but are no longer documented.
> They may be withdrawn in future releases.
> -h (omit; it has no effect)
> -H (use --speed-large-files instead)
> -L (use --label instead)
(Version 2.8 was apparently released March, 2002.)
> So far, smerge-mode hasn't even bothered to check, so maybe the check
> isn't that important any more (IIRC it was added for Solaris's diff,
> tho I'd suspect that current derivatives of Solaris woujld accept
> either -L or --label or both).
Again, I have no reason to argue for retaining the check,
especially given that none of my systems seem to have diff(1)
versions other than the one from Diffutils, as of 3.0, or a
later version.
Also to note:
> User-visible changes in version 2.0:
[…]
> * diff options renamed:
> --label renamed from --file-label
Now, given that 2.7 – the oldest version available from
http://ftp.gnu.org/gnu/diffutils/ – dates back to 1994…
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18850
; Package
emacs
.
(Tue, 28 Oct 2014 13:45:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 18850 <at> debbugs.gnu.org (full text, mbox):
>> -L (use --label instead)
OK, then let's switch to --label everywhere, thanks,
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18850
; Package
emacs
.
(Fri, 21 Nov 2014 10:59:04 GMT)
Full text and
rfc822 format available.
Message #28 received at 18850 <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#18850
; Package
emacs
.
(Tue, 23 Feb 2016 12:05:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 18850 <at> debbugs.gnu.org (full text, mbox):
Ivan Shmakov <ivan <at> siamics.net> writes:
> block 18850 by 18824
> thanks
>
> Another try.
The patch looks OK to me, and according to the discussion it sounds like
it was ready to be applied, but since that's more than a year ago, and
I'm not an smerge user, I wanted to ask whether the patch is still
something that should go in.
--
(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:23:01 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 27.1, send any further explanations to
18850 <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:23:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18850
; Package
emacs
.
(Tue, 25 Jun 2019 21:24:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 18850 <at> debbugs.gnu.org (full text, mbox):
Ivan Shmakov <ivan <at> siamics.net> writes:
> block 18850 by 18824
> thanks
>
> Another try.
OK; applied.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
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:08 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.