|
From: | Peter Dyballa |
Subject: | Re: Saving/Recalling Shell Commands History? |
Date: | Wed, 23 Aug 2006 17:20:37 +0200 |
Am 23.08.2006 um 16:20 schrieb Kevin Rodgers:
I don't understand why it needs to be so complicated. What do you mean by "separate the different Emacs versions [you] are using"? None of your code references emacs-version, emacs-major-version, or emacs-minor-version.Here is my extended hook: (add-hook 'shell-mode-hook (lambda () (setq comint-input-ring-file-name (expand-file-name "history" desktop-dirname)) (setq histfile_cmd (format "echo \"set histfile = %s\" > .emacs_tcsh-init" comint-input-ring-file-name)) (shell-command histfile_cmd) ))
Desktop-dirname points to the different emacs-major-versions. My purpose is to have the history files unchanged while I launch a Carbon Emacs or an Emacs.app, which otherwise would write /their/ history into the same file. And when I'll start to have an intel based Mac with Vanderpool built-in I also could run some Losedows, Linux, Solaris, or other BSD Emacsen ...
What I wonder is whether GNU Emacs caches the contents of the history file. If the contents of the history file changes by interaction of some other shell, /my/ Emacs shell would find the other's history if it would re-read the history file.
(BTW, it worked in Emacs shell with the default ~/.tcsh_history file, although comint-input-ring-file-name pointed to some completely different file. Could be shell-mode could not find a command from the history file, but then tcsh would succeed.)
-- Greetings Pete Well done is better than well said. -- Benjamin Franklin
[Prev in Thread] | Current Thread | [Next in Thread] |