unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [patch] make shell-process-popd aware of comint-file-name-prefix
@ 2010-11-06  7:55 Christian Millour
  2010-11-06 12:14 ` Michael Albinus
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Millour @ 2010-11-06  7:55 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

Hi, 

shell-process-popd (in lisp/shell.el) is currently unaware of
comint-file-name-prefix. This is inconsistent with the behavior of
shell-process-pushd and shell-process-cd, and hampers proper directory
tracking in tramp remote shells (see
http://lists.gnu.org/archive/html/tramp-devel/2010-11/msg00013.html
). The attached patch should correct this oversight. 

This is my first stab at contributing to emacs so please be patient and
forgiving if I did not do it right or missed something. 

Best regards, Christian. 


[-- Attachment #2: patch for shell-process-popd --]
[-- Type: text/plain, Size: 2812 bytes --]

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: cm@abtela.com-20101105220137-bduzxgtomx5jp9v1
# target_branch: bzr://bzr.savannah.gnu.org/emacs/trunk
# testament_sha1: 1ce7f8dbd3b9f0db2d32864b787c1cf3b5322fe6
# timestamp: 2010-11-06 00:02:22 +0200
# base_revision_id: eliz@gnu.org-20101105175206-v6fev500bp2ap9mo
# 
# Begin patch
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2010-11-05 12:11:12 +0000
+++ lisp/ChangeLog	2010-11-05 22:01:37 +0000
@@ -1,3 +1,7 @@
+2010-11-05  Christian Millour  <cm@abtela.com>
+
+	* shell.el (shell-process-popd): made aware of comint-file-name-prefix
+
 2010-11-05  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* mouse.el (mouse-yank-primary): Update comment (Bug#6802).

=== modified file 'lisp/shell.el'
--- lisp/shell.el	2010-10-10 23:12:30 +0000
+++ lisp/shell.el	2010-11-05 22:01:37 +0000
@@ -700,7 +700,7 @@
 (defun shell-process-popd (arg)
   (let ((num (or (shell-extract-num arg) 0)))
     (cond ((and num (= num 0) shell-dirstack)
-	   (shell-cd (car shell-dirstack))
+	   (shell-cd (shell-prefixed-directory-name (car shell-dirstack)))
 	   (setq shell-dirstack (cdr shell-dirstack))
 	   (shell-dirstack-message))
 	  ((and num (> num 0) (<= num (length shell-dirstack)))

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWfLslQQAAhbfgAAwUHP/91oG
AAC////wUARbt53s7NPbqdE7tASSEjUxhHoU8TQU8NR6kPQJptBJQjCaMk9TUZo0p5QyHqAANBpM
KmamTQ9EAaANAADQGJEmmgaNpAGgBoAAASSTCTNExDFNMmp5qj1PU09QNqDRwkdgrREKPqomtmcI
IUGiV5EL1DWHKEM47U3hKpVq6QFIuIoLryA8vkrpNBQqNBzMrMqrCXih1+zaZhFIxGhueFtpNZ2p
H1nLP1B7CIowraNG3Po+gmJz5H1PXgCguAjU3He3lq9uwrP4PpUcVnGfsIq5UhZrVtmZthbrKOfO
KB1BwovE9M9hmBMheBnAXuaTE6guDAFOhUAogHsAYeFLY82kOsSoCMlcNLdnBLzZeC4HPty3vBW2
FFJxCNrt9fCxSVnT8WPgt2Am3GoB2LScF445XVDxjUa13n1wFArNqp+Zj5URvjRcz7RbuzkKIEBX
KOJ5weA8q0bPftKI39SkrZq3IvIK5UEM0XaDWUj1uwkugzClyfO80sSTE45IzOlznPVd5ArviyIr
huInGlRS6K08XwNTKFJ3sVzXpsDJ5MoZRDkpuDFMA4TOlJkhsDfl0/oq+4GYsJXugnWzHqZfLAvJ
ZM3HPdkFZUsDbQBXDiwyv65GazMChSgSvMcxUUtSExo6N+6TyzYwn2aLQUOL6EZjbG4u87FKF8eq
0YB3phV7M2bVxc8E7kzrbizAKNPMhFSNPvjSdtXAVd2BFy3ZOgYkflGEdTMwzN4pr6wHDSmOF6/W
gOAjhN4uXoYllksoa3HwI3zSFVNOSOMQzvefbtijoVGzvOlOrOvIxLQ0ORyOkZ65FpIp7gOXB4js
LmKMp/ImWHiqfb1OOGPSTWQgQTEv+Owi5+bnaxg1nPhMZ6AkDq7xgib0m0+Gre5yrJZK7wHCo48P
M6VOgxL60cv35Sais9DQVQbJmzxGI712+pXlEWxTTET82NwNpBCWzJftpuEeKzQazSskwY+Fkt2/
d4lxGpaUSohZ5GW+8cKUZlSJskTLzxOfUxNu1ovHlKiv1jmZDH8TwL+l3NsBfTjU9A8oRDApqoeN
PPs7oaTgo2pdyBZ8Io49r64Vo++R5I1NDCqcoDJc+wGGqw8EahFAwJIa0S1S8vsOXViC152cQXIR
iI46KQWkP0Z3V96Y4BEwZI5VQJA+Ih9tnGJTgutApAUljgojBlMpse+BDAFIDUjTVrGejRTT6Avq
My38LYvuBfiwwRHpmmdjLi0IQ4CuJkVJFcrpzGpYa5KKlz+Q5Ulb3VRgi8yk5+6YYVHSxhjj+WsR
ArOjFBWt7OK0XN125EXONAwGyEV3B5yxkWzOfwAeiebEGiwXw5hsYevSjfdylaQAtA2rX5rQU09H
fZV3yFWLDoAw7QCypG4IKpla/QD/i7kinChIeXZKggA=

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

* Re: [patch] make shell-process-popd aware of comint-file-name-prefix
  2010-11-06  7:55 [patch] make shell-process-popd aware of comint-file-name-prefix Christian Millour
@ 2010-11-06 12:14 ` Michael Albinus
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Albinus @ 2010-11-06 12:14 UTC (permalink / raw)
  To: Christian Millour; +Cc: emacs-devel

Christian Millour <cm@abtela.com> writes:

> Hi, 

Hi,

> shell-process-popd (in lisp/shell.el) is currently unaware of
> comint-file-name-prefix. This is inconsistent with the behavior of
> shell-process-pushd and shell-process-cd, and hampers proper directory
> tracking in tramp remote shells (see
> http://lists.gnu.org/archive/html/tramp-devel/2010-11/msg00013.html
> ). The attached patch should correct this oversight. 

Thanks, I've committed your patch. It is less than 15 lines, it can be
regarded as tiny patch, therefore.

> This is my first stab at contributing to emacs so please be patient and
> forgiving if I did not do it right or missed something. 

If you intend to submit further patches to Emacs and/or Tramp, it would
be necessary to register at FSF (and sign the legal papers). Just
contact me in case of.

> Best regards, Christian. 

Best regards, Michael.



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

end of thread, other threads:[~2010-11-06 12:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-06  7:55 [patch] make shell-process-popd aware of comint-file-name-prefix Christian Millour
2010-11-06 12:14 ` Michael Albinus

Code repositories for project(s) associated with this public inbox

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

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).