unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* cd command on PC version (Emacs 20.7.1)
@ 2005-08-18 19:55 Edward M. Reingold
  2005-08-19  8:31 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Edward M. Reingold @ 2005-08-18 19:55 UTC (permalink / raw)


When I use C-c C-f in a LaTeX file, the *tex-shell* buffer is generated and a
change directory command is given; on my PC it looks like

  c:\ed\bin>cd c:/ed/
  cd c:/ed/
  The system cannot find the path specified.

The problem being that the slashes should be backslashes.  Is there a simpel
fix to this--the directory name is given by file-name-directory which should
be smart enough to get it right for the PC!

Do I have to write my own PC version, or has this been done?

-- 

Professor Edward M. Reingold                Email: reingold@iit.edu
Chairman, Department of Computer Science    Voice: (312) 567-3309
Illinois Institute of Technology            Assistant: (312) 567-5152
Stuart Building                             Fax:   (312) 567-5067
10 West 31st Street, Suite 236
Chicago, IL  60616-3729  U.S.A.

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

* Re: cd command on PC version (Emacs 20.7.1)
  2005-08-18 19:55 cd command on PC version (Emacs 20.7.1) Edward M. Reingold
@ 2005-08-19  8:31 ` Eli Zaretskii
  2005-08-19 17:42   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2005-08-19  8:31 UTC (permalink / raw)


> From: reingold@emr.cs.iit.edu (Edward M. Reingold)
> Date: 18 Aug 2005 14:55:03 -0500
> 
> When I use C-c C-f in a LaTeX file, the *tex-shell* buffer is generated and a
> change directory command is given; on my PC it looks like
> 
>   c:\ed\bin>cd c:/ed/
>   cd c:/ed/
>   The system cannot find the path specified.
> 
> The problem being that the slashes should be backslashes.

It's a bug.  Please try the following patch:


--- lisp/textmodes/tex-mode.el.~0	2005-08-12 12:49:17.000000000 +0300
+++ lisp/textmodes/tex-mode.el	2005-08-19 11:30:38.021873500 +0300
@@ -1942,7 +1942,8 @@
                                       default-directory))))
 	      (not dir))
     (let (shell-dirtrack-verbose)
-      (tex-send-command tex-shell-cd-command dir)))
+      (tex-send-command tex-shell-cd-command
+			(convert-standard-filename (concat "\"" dir "\"")))))
   (with-current-buffer (process-buffer (tex-send-command cmd))
     (setq compilation-last-buffer (current-buffer))
     (compilation-forget-errors)
@@ -2307,7 +2308,8 @@
 	(tex-out-file
          (tex-append (file-name-nondirectory (buffer-file-name)) ""))
 	(file-dir (file-name-directory (buffer-file-name))))
-    (tex-send-command tex-shell-cd-command file-dir)
+    (tex-send-command tex-shell-cd-command
+		      (convert-standard-filename (concat "\"" file-dir "\"")))
     (tex-send-command tex-bibtex-command tex-out-file))
   (tex-display-shell))
 \f

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

* Re: cd command on PC version (Emacs 20.7.1)
  2005-08-19  8:31 ` Eli Zaretskii
@ 2005-08-19 17:42   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2005-08-19 17:42 UTC (permalink / raw)


> Date: Fri, 19 Aug 2005 11:31:56 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> >   c:\ed\bin>cd c:/ed/
> >   cd c:/ed/
> >   The system cannot find the path specified.
> > 
> > The problem being that the slashes should be backslashes.
> 
> It's a bug.  Please try the following patch:

Oops! sorry, bad patch.  Try this one instead:

--- lisp/textmodes/tex-mode.el.~0	2005-08-12 12:49:17.000000000 +0300
+++ lisp/textmodes/tex-mode.el	2005-08-19 20:39:39.796875000 +0300
@@ -1942,7 +1942,8 @@
                                       default-directory))))
 	      (not dir))
     (let (shell-dirtrack-verbose)
-      (tex-send-command tex-shell-cd-command dir)))
+      (tex-send-command tex-shell-cd-command
+			(concat "\"" (convert-standard-filename dir) "\""))))
   (with-current-buffer (process-buffer (tex-send-command cmd))
     (setq compilation-last-buffer (current-buffer))
     (compilation-forget-errors)
@@ -2307,7 +2308,8 @@
 	(tex-out-file
          (tex-append (file-name-nondirectory (buffer-file-name)) ""))
 	(file-dir (file-name-directory (buffer-file-name))))
-    (tex-send-command tex-shell-cd-command file-dir)
+    (tex-send-command tex-shell-cd-command
+		      (concat "\"" (convert-standard-filename file-dir) "\""))
     (tex-send-command tex-bibtex-command tex-out-file))
   (tex-display-shell))
 \f

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

end of thread, other threads:[~2005-08-19 17:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-18 19:55 cd command on PC version (Emacs 20.7.1) Edward M. Reingold
2005-08-19  8:31 ` Eli Zaretskii
2005-08-19 17:42   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).