all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#8321: 23.1; emerge error diff extra operand
@ 2011-03-22 15:52 Mark H. David
  2011-03-22 19:02 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Mark H. David @ 2011-03-22 15:52 UTC (permalink / raw)
  To: 8321


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@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]






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#8321: 23.1; emerge error diff extra operand
  2011-03-22 15:52 bug#8321: 23.1; emerge error diff extra operand Mark H. David
@ 2011-03-22 19:02 ` Eli Zaretskii
       [not found]   ` <4D88F91F.8020109@yv.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2011-03-22 19:02 UTC (permalink / raw)
  To: Mark H. David; +Cc: 8321

> Date: Tue, 22 Mar 2011 11:52:44 -0400
> From: "Mark H. David" <mhd@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?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#8321: 23.1; emerge error diff extra operand
       [not found]   ` <4D88F91F.8020109@yv.org>
@ 2011-03-22 19:48     ` Eli Zaretskii
       [not found]       ` <4D892EE0.2020103@yv.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2011-03-22 19:48 UTC (permalink / raw)
  To: Mark H. David; +Cc: 8321

> Date: Tue, 22 Mar 2011 15:31:43 -0400
> From: "Mark H. David" <mhd@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)
 





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#8321: 23.1; emerge error diff extra operand
       [not found]       ` <4D892EE0.2020103@yv.org>
@ 2011-03-23  5:29         ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2011-03-23  5:29 UTC (permalink / raw)
  To: Mark H. David; +Cc: 8321-done

> Date: Tue, 22 Mar 2011 19:21:04 -0400
> From: "Mark H. David" <mhd@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-23  5:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22 15:52 bug#8321: 23.1; emerge error diff extra operand Mark H. David
2011-03-22 19:02 ` Eli Zaretskii
     [not found]   ` <4D88F91F.8020109@yv.org>
2011-03-22 19:48     ` Eli Zaretskii
     [not found]       ` <4D892EE0.2020103@yv.org>
2011-03-23  5:29         ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.