From: "Drew Adams" <drew.adams@oracle.com>
To: "Markus Dehmann" <markus.dehmann@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: Restore minibuffer history, e.g. for compile commands, after restart?
Date: Sun, 9 Dec 2007 10:39:33 -0800 [thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICMEOEEBAA.drew.adams@oracle.com> (raw)
In-Reply-To: <655ccf70-6a77-4e8d-a4ad-7624435466d9@d61g2000hsa.googlegroups.com>
> On Dec 9, 12:22 am, "Drew Adams" <drew.ad...@oracle.com> wrote:
> > > > How can I keep the history of minibuffer commands, e.g. the compile
> > > > commands?
> >
> > > The package is called `savehist'.
> > > Emacs-22 bundles it so you can just add (savehist-mode 1) to
> > > your .emacs.
> >
> > And here is the same thing (CVS from 2007-11-28), but fixed so
> > it also works with Emacs versions prior to 22.1, if you should
> > need that: http://www.emacswiki.org/cgi-bin/wiki/savehist-20%2b.el
>
> Thanks! I have emacs 21.3.1. I installed the package and it works!
>
> There is just one bug,
Never say that. ;-)
> and I thought I'd share it here, maybe others
> experience the same: If I do M-x compile and go arrow-up to get the
> most recent command it says "no preceding item", then I go "arrow-
> down" and "arrow-up" again, and there it is, the most recent compile
> command, from my last emacs run. Or, once I have several in the list
> it won't show the most recent one on "arrow-up", but the next-to-last
> one, then after pressing "arrow-down" it shows the most recent one.
Sorry, I can't reproduce that.
My guess is that it might be a problem with vanilla `savehist.el' as well,
because I don't think I changed any of the code concerning that. Or it might
be a problem with Emacs 21's treatment of `compile-history' - that is, it
might be completely unrelated to savehist.
La petite histoire : `savehist-20+.el' is only a trivially modified
`savehist.el': it just doesn't rely upon features that older Emacs versions
don't have. Emacs developers didn't want to make the trivial changes that
would let `savehist.el' play well with other versions - they don't care
about that. So I posted `savehist-20+.el' at Emacs Wiki.
Perhaps someone else can reproduce the problem you see? Either using
`savehist-20+.el' or `savehist.el' (with Emacs 22 or later).
Try testing with a .emacs that contains only (require 'save-hist-20+). And
perhap try starting over by deleting your file `savehist-file' (default:
`~/.emacs-history').
I think you're saying that this is what you see:
1. Open Emacs, then `M-x compile RET foobar'.
2. Close and reopen Emacs.
3. `M-x compile RET <up>' shows message "no preceding item".
4. <down> shows ? (what does it show?)
5. <up> shows `foobar'.
Is that right? I don't see that. At step 3, I see `foobar'.
After step 2, visit `savehist-file'. What do you see recorded for
`compile-history'? You should see something like (setq compile-history
'("foobar")).
next prev parent reply other threads:[~2007-12-09 18:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.4784.1197177791.18990.help-gnu-emacs@gnu.org>
2007-12-09 17:38 ` Restore minibuffer history, e.g. for compile commands, after restart? Markus Dehmann
2007-12-09 18:39 ` Drew Adams [this message]
[not found] <mailman.4805.1197225563.18990.help-gnu-emacs@gnu.org>
2007-12-13 15:11 ` Markus Dehmann
2007-12-13 18:17 ` Drew Adams
2007-12-08 6:07 Markus Dehmann
2007-12-09 3:28 ` Stefan Monnier
2007-12-09 5:22 ` Drew Adams
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=DNEMKBNJBGPAOPIJOOICMEOEEBAA.drew.adams@oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=markus.dehmann@gmail.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).