From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: Saving/Recalling Shell Commands History?
Date: Mon, 21 Aug 2006 15:32:46 -0600 [thread overview]
Message-ID: <ecd8rd$dot$1@sea.gmane.org> (raw)
In-Reply-To: <A56A24D6-70C0-4FD6-BECF-2C1727F915B4@web.DE>
Peter Dyballa wrote:
>
> Am 21.08.2006 um 22:17 schrieb Drew Adams:
>
>> Although I have set comint-input-ring-file-name, this file never gets
>> written.
>>
>> Did you set it locally in the shell buffer (mode)? The doc string says
>> this:
>>
>> "This variable is buffer-local, and is a good thing to
>> set in mode hooks."
>
> No. I found it in a *customise* buffer and set it there first.
>
>>
>> What is the value of comint-input-ring-file-name in your shell buffer
>> if you don't ever explicitly set it?
>>
>
> Now, edited to fit into a system of a handful Emacsen, it is set as:
>
> '(comint-input-ring-file-name (concat desktop-dirname "/history"))
>
> Desktop-dirname is defined in .emacs. In recent GNU Emacs 23 the
> variable's value is described as:
>
> comint-input-ring-file-name is a variable defined in `comint.el'.
> Its value is "~/.history"
> Local in buffer *shell*; global value is
> "~/.emacs.d/PDesktop-23/history"
So you have managed to change its global value, but not the value in
the *shell* buffer.
> Documentation:
> *If non-nil, name of the file to read/write input history.
> See also `comint-read-input-ring' and `comint-write-input-ring'.
>
> This variable is buffer-local, and is a good thing to set in mode
> hooks.
>
> You can /customize/ this variable.
>
> When I comment the comint-input-ring-file-name setting line, its value
> is simply "~/.history."
So leave it commented out, and put this in your ~/.emacs file:
(add-hook 'shell-mode-hook
(lambda ()
(setq comint-input-ring-file-name ; buffer-local
(expand-file-name "history" desktop-dirname))))
> I retrieved the values by pasting comint-input-ring-file-name into
> *shell* buffer and pressing C-h v.
OK.
--
Kevin
next prev parent reply other threads:[~2006-08-21 21:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-21 15:07 Saving/Recalling Shell Commands History? gamename
2006-08-21 16:35 ` Drew Adams
2006-08-21 20:09 ` Peter Dyballa
2006-08-21 20:17 ` Drew Adams
2006-08-21 21:08 ` Peter Dyballa
2006-08-21 21:30 ` Drew Adams
2006-08-21 21:32 ` Kevin Rodgers [this message]
2006-08-21 22:14 ` Peter Dyballa
2006-08-22 23:13 ` Peter Dyballa
2006-08-23 14:20 ` Kevin Rodgers
2006-08-23 15:20 ` Peter Dyballa
2006-08-21 20:19 ` Jesse Alama
2006-08-21 21:11 ` Peter Dyballa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ecd8rd$dot$1@sea.gmane.org' \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).