unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* shell-dir-cookie-re in Emacs 24
@ 2012-01-01 14:57 Chong Yidong
  2012-01-01 23:07 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Chong Yidong @ 2012-01-01 14:57 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Emacs 24 has this in NEWS:

*** New variable `shell-dir-cookie-re'.
If set to an appropriate regexp, Shell mode can track your cwd by
reading it from your prompt.

Could you explain what the purpose of this is?  The docstring says "It
can be used instead of or in addition to `dirtrack-mode'", but what does
it do that dirtrack-mode doesn't already do?



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

* Re: shell-dir-cookie-re in Emacs 24
  2012-01-01 14:57 shell-dir-cookie-re in Emacs 24 Chong Yidong
@ 2012-01-01 23:07 ` Stefan Monnier
  2012-01-02  8:14   ` Chong Yidong
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2012-01-01 23:07 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

> Emacs 24 has this in NEWS:
> *** New variable `shell-dir-cookie-re'.
> If set to an appropriate regexp, Shell mode can track your cwd by
> reading it from your prompt.

> Could you explain what the purpose of this is?  The docstring says "It
> can be used instead of or in addition to `dirtrack-mode'", but what does
> it do that dirtrack-mode doesn't already do?

IIRC it's a poorly designed feature which should really be merged with
dirtrack-mode (it's basically a lighter-weight version of dirtrack-mode,
I think).  The main distinguishing feature is that shell-dir-cookie-re
tries to work even if the prompt does not contain an absolute directory
(e.g. I use it with prompts which only contain the last 2 elements of
the absolute file name).


        Stefan



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

* Re: shell-dir-cookie-re in Emacs 24
  2012-01-01 23:07 ` Stefan Monnier
@ 2012-01-02  8:14   ` Chong Yidong
  0 siblings, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2012-01-02  8:14 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Emacs 24 has this in NEWS:
>> *** New variable `shell-dir-cookie-re'.
>> If set to an appropriate regexp, Shell mode can track your cwd by
>> reading it from your prompt.
>
>> Could you explain what the purpose of this is?  The docstring says "It
>> can be used instead of or in addition to `dirtrack-mode'", but what does
>> it do that dirtrack-mode doesn't already do?
>
> IIRC it's a poorly designed feature which should really be merged with
> dirtrack-mode (it's basically a lighter-weight version of
> dirtrack-mode, I think).  The main distinguishing feature is that
> shell-dir-cookie-re tries to work even if the prompt does not contain
> an absolute directory (e.g. I use it with prompts which only contain
> the last 2 elements of the absolute file name).

OK, I'll merge it into dirtrack-mode and get rid of shell-dir-cookie-re.



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

end of thread, other threads:[~2012-01-02  8:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-01 14:57 shell-dir-cookie-re in Emacs 24 Chong Yidong
2012-01-01 23:07 ` Stefan Monnier
2012-01-02  8:14   ` Chong Yidong

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