[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using emerge on windows? Funky errors with Temp files
From: |
Eli Zaretskii |
Subject: |
Re: Using emerge on windows? Funky errors with Temp files |
Date: |
Fri, 18 Mar 2011 23:48:09 +0200 |
> From: fork <forkandwait@gmail.com>
> Date: Fri, 18 Mar 2011 21:23:07 +0000 (UTC)
>
> diff: c:/DOCUME\~1/webbs/LOCALS\~1/Temp/emergeA4208Vv8: No such file or
> directory
> diff: c:/DOCUME\~1/webbs/LOCALS\~1/Temp/emergeB4208e2I: No such file or
> directory
The patch below should set you up. (Don't forget to recompile
emerge.el, and then load it or restart Emacs.)
--- lisp/emerge.el~ 2011-03-10 19:56:29.093750000 +0200
+++ lisp/emerge.el 2011-03-18 23:42:32.078125000 +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)
- Using emerge on windows? Funky errors with Temp files, fork, 2011/03/18
- Re: Using emerge on windows? Funky errors with Temp files, Stefan Monnier, 2011/03/18
- Re: Using emerge on windows? Funky errors with Temp files, David Kastrup, 2011/03/19
- Re: Using emerge on windows? Funky errors with Temp files, Stefan Monnier, 2011/03/21
- Re: Using emerge on windows? Funky errors with Temp files, David Kastrup, 2011/03/22
- Re: Using emerge on windows? Funky errors with Temp files, Kevin Rodgers, 2011/03/22
- Message not available
- Re: Using emerge on windows? Funky errors with Temp files, David Kastrup, 2011/03/23
- Re: Using emerge on windows? Funky errors with Temp files, Kevin Rodgers, 2011/03/24