all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] eshell show nil when cd a non-absolute direcory
@ 2009-06-22  5:59 Wang Diancheng
  2009-06-22 17:50 ` Andreas Schwab
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Diancheng @ 2009-06-22  5:59 UTC (permalink / raw
  To: emacs-devel

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


(setq eshell-cd-shows-directory t)

when change to a non-absolute directory(eg. cd ..), eshell will show
"nil", not the directory name, following patch fixed it.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 443 bytes --]


diff -u -r1.29 em-dirs.el
--- em-dirs.el	5 Jan 2009 03:21:43 -0000	1.29
+++ em-dirs.el	22 Jun 2009 05:47:11 -0000
@@ -393,7 +393,7 @@
 	  (eshell-add-to-dir-ring curdir))
 	(let ((result (cd dired-directory)))
 	  (and eshell-cd-shows-directory
-	       (eshell-printn result)))
+	       (eshell-printn (eshell/pwd))))
 	(run-hooks 'eshell-directory-change-hook)
 	(if eshell-list-files-after-cd
 	    (throw 'eshell-replace-command
</#part>

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

* Re: [PATCH] eshell show nil when cd a non-absolute direcory
  2009-06-22  5:59 [PATCH] eshell show nil when cd a non-absolute direcory Wang Diancheng
@ 2009-06-22 17:50 ` Andreas Schwab
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2009-06-22 17:50 UTC (permalink / raw
  To: Wang Diancheng; +Cc: emacs-devel

Wang Diancheng <dianchengwang@gmail.com> writes:

> diff -u -r1.29 em-dirs.el
> --- em-dirs.el	5 Jan 2009 03:21:43 -0000	1.29
> +++ em-dirs.el	22 Jun 2009 05:47:11 -0000
> @@ -393,7 +393,7 @@
>  	  (eshell-add-to-dir-ring curdir))
>  	(let ((result (cd dired-directory)))
>  	  (and eshell-cd-shows-directory
> -	       (eshell-printn result)))
> +	       (eshell-printn (eshell/pwd))))

This makes result now unused and can be removed (the return value of cd
was never documented anyway).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




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

end of thread, other threads:[~2009-06-22 17:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-22  5:59 [PATCH] eshell show nil when cd a non-absolute direcory Wang Diancheng
2009-06-22 17:50 ` Andreas Schwab

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.