GNU bug report logs - #8321
23.1; emerge error diff extra operand

Previous Next

Package: emacs;

Reported by: "Mark H. David" <mhd <at> yv.org>

Date: Tue, 22 Mar 2011 16:54:02 UTC

Severity: normal

Found in version 23.1

Done: Eli Zaretskii <eliz <at> gnu.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 8321 in the body.
You can then email your comments to 8321 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8321; Package emacs. (Tue, 22 Mar 2011 16:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Mark H. David" <mhd <at> yv.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 22 Mar 2011 16:54:02 GMT) Full text and rfc822 format available.

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

From: "Mark H. David" <mhd <at> yv.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1; emerge error diff extra operand
Date: Tue, 22 Mar 2011 11:52:44 -0400
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

M-x emerge-files [RET] file1 [RET] file2 [RET]

produces a buffer with name *emerge-diff-errors* whose contents is as
follows:

diff: extra operand
diff: Try `diff --help' for more information.


At the bottom of the window, in the minibuffer, the following text
appears:

Errors found in diff/diff3 output. Merge buffer is *merge*.


Normally, I'd be put right into the merge buffer (typically named
*merge* or some variant).  If I go to that buffer manually, the
merge/diff seems to have failed. E.g., even though the files are quite
different, typing 'n' for the command to go to the next difference,
does nothing.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
c:/Program Files/emacs-23.1/etc/DEBUG for instructions.


In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
 of 2009-07-30 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4)'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: Shell

Minor modes in effect:
  shell-dirtrack-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
M-x e m e r g e SPC f i l SPC <return> A - <tab> <return>
e x p - n o <tab> l <tab> <return> C-x b * m e r <tab>
<return> n M-x C-y <return>

Recent messages:
Loading vc-git...done
Auto-saving...
Errors found in diff/diff3 output.  Merge buffer is *merge*.
Mark set
Quit
~/my documents/expsrc/A-exp-notation.lisp and c:/documents and 
settings/mhd/My Documents/expsrc/A-exp-notation.lisp are the same file
~/my documents/expsrc/exp-notation.lisp and c:/documents and 
settings/mhd/My Documents/expsrc/exp-notation.lisp are the same file
Auto-saving...
Errors found in diff/diff3 output.  Merge buffer is *merge*.
Mark set [2 times]





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8321; Package emacs. (Tue, 22 Mar 2011 19:03:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Mark H. David" <mhd <at> yv.org>
Cc: 8321 <at> debbugs.gnu.org
Subject: Re: bug#8321: 23.1; emerge error diff extra operand
Date: Tue, 22 Mar 2011 21:02:50 +0200
> Date: Tue, 22 Mar 2011 11:52:44 -0400
> From: "Mark H. David" <mhd <at> yv.org>
> Cc: 
> 
> M-x emerge-files [RET] file1 [RET] file2 [RET]
> 
> produces a buffer with name *emerge-diff-errors* whose contents is as
> follows:
> 
> diff: extra operand
> diff: Try `diff --help' for more information.
> 
> 
> At the bottom of the window, in the minibuffer, the following text
> appears:
> 
> Errors found in diff/diff3 output. Merge buffer is *merge*.

I cannot reproduce this with 2 randomly chosen files, neither in Emacs
23.1 nor in the latest Emacs 23.3.

Does this happen for _any_ 2 files?  If not, can you tell what's
different about these two, or show two files that trigger this?

Could it be that the problem is with the white space embedded in the
file names?  Can you try using the 8+3 short aliases of those parts
that include white space?

> Normally, I'd be put right into the merge buffer (typically named
> *merge* or some variant).

This "normally" means that it generally works, but not this time?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8321; Package emacs. (Tue, 22 Mar 2011 19:49:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Mark H. David" <mhd <at> yv.org>
Cc: 8321 <at> debbugs.gnu.org
Subject: Re: bug#8321: 23.1; emerge error diff extra operand
Date: Tue, 22 Mar 2011 21:48:27 +0200
> Date: Tue, 22 Mar 2011 15:31:43 -0400
> From: "Mark H. David" <mhd <at> yv.org>
> 
> Thanks for checking on this so fast!
> 
> Wow, actually having a full pathname with no spaces worked.

If so, I think this is already fixed in the development sources.  Can
you try the patch below?


--- lisp/emerge.el~0	2011-03-10 19:56:29.093750000 +0200
+++ lisp/emerge.el	2011-03-18 23:48:44.187500000 +0200
@@ -3187,21 +3187,26 @@
 
 ;; Metacharacters that have to be protected from the shell when executing
 ;; a diff/diff3 command.
-(defcustom emerge-metachars "[ \t\n!\"#$&'()*;<=>?[\\^`{|~]"
-  "Characters that must be quoted with \\ when used in a shell command line.
+(defcustom emerge-metachars
+  (if (memq system-type '(ms-dos windows-nt))
+      "[ \t\"<>|?*^&=]"
+    "[ \t\n!\"#$&'()*;<=>?[\\^`{|~]")
+  "Characters that must be quoted when used in a shell command line.
 More precisely, a [...] regexp to match any one such character."
   :type 'regexp
   :group 'emerge)
 
 ;; Quote metacharacters (using \) when executing a diff/diff3 command.
 (defun emerge-protect-metachars (s)
-  (let ((limit 0))
-    (while (string-match emerge-metachars s limit)
-      (setq s (concat (substring s 0 (match-beginning 0))
-		      "\\"
-		      (substring s (match-beginning 0))))
-      (setq limit (1+ (match-end 0)))))
-  s)
+  (if (memq system-type '(ms-dos windows-nt))
+      (shell-quote-argument s)
+    (let ((limit 0))
+      (while (string-match emerge-metachars s limit)
+	(setq s (concat (substring s 0 (match-beginning 0))
+			"\\"
+			(substring s (match-beginning 0))))
+	(setq limit (1+ (match-end 0)))))
+    s))
 
 (provide 'emerge)
 




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 23 Mar 2011 05:30:04 GMT) Full text and rfc822 format available.

Notification sent to "Mark H. David" <mhd <at> yv.org>:
bug acknowledged by developer. (Wed, 23 Mar 2011 05:30:04 GMT) Full text and rfc822 format available.

Message #16 received at 8321-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Mark H. David" <mhd <at> yv.org>
Cc: 8321-done <at> debbugs.gnu.org
Subject: Re: bug#8321: 23.1; emerge error diff extra operand
Date: Wed, 23 Mar 2011 01:29:48 -0400
> Date: Tue, 22 Mar 2011 19:21:04 -0400
> From: "Mark H. David" <mhd <at> yv.org>
> 
> Hi. Yes, that worked. Thank you!
> Note that I put the patch on 23.2.1 Emacs, after verifying the bug was 
> present in that version.

It is present even in 23.3, sadly.

I'm closing this bug, since it is already fixed for the next release.
Thanks for your report and feedback.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 20 Apr 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 65 days ago.

Previous Next


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