unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Saving minibuffer history
Date: Tue, 25 Oct 2005 10:39:31 -0400	[thread overview]
Message-ID: <jwvhdb5n02v.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87ll0i7y28.fsf@xemacs.org> (Hrvoje Niksic's message of "Tue, 25 Oct 2005 11:20:15 +0200")

> You never informed me about those changes so I missed them.  I did
> notice the changes in the patch you sent me.  Please remember that
> this package is normally also maintained for XEmacs, and as an
> external package (although it probably doesn't have many external
> users).

Sorry.

> I also don't understand why you removed the "*" markers from the
> beginning of docstrings.  Those variables *are* intended to be "set
> and modified by users".

All defcustom vars can be set via M-x set-variable: the * has no effect on
them.

>> E.g. please preserve the arch-tag.
> I don't know what it does and I don't use arch.  Is it always the
> same?  What purpose does it serve?

By its very nature it should never ever change: it represents the identity
of the file, so that if you send it by email, edit it, move it or whatever
else, Arch can still figure out which file is which.

This can even be used for files which live in several repositories (e.g. in
Emacs and in Gnus), since the arch-tag is supposed to be globally unique.

> > It [...] introduces savehist-mode, which would become the main
> > advertized way to turn the feature ON (can also be done via
> > Customize) in place of savehist-load.

> I'm not sure that's a good idea.  savehist-load replaces existing
> minibuffer histories with the loaded ones, which is why it is
> recommended to only call it from `.emacs'.  Since turning on a
> savehist mode calls `savehist-load', it has the nasty side effect of
> ruining existing minibuffer histories.  This is alleviated by the use
> of `savehist-loaded', but it will still ruin the minibuffer histories
> when savehist is first run.

It's a risk, but the same risk exists with savehist-load.  So the same
"solution" should work as well: warn that it should only be used in your
.emacs.

Maybe an alternative is to not do the load immediately, but instead
place it on emacs-startup-hook, so that if it is executed after
emacs-startup-hook was run, it won't be run at all.

> savehist is IMO not a good candidate for a minor mode because turning
> it on and off during an Emacs session does not make much sense.

Yet you provided savehist-uninstall.  To me, the main benefit of making it
a minor mode is that it follows the usual rules of customization.  No need
to read the Commentary, or look through docstrings to find the entry point.
It can even be set via Custom.
Most minor modes are never turned off.

> Also note that XEmacs doesn't support `define-minor-mode', so it would
> complexify the code.

That can be fixed easily.


        Stefan

  parent reply	other threads:[~2005-10-25 14:39 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-14 13:40 Saving minibuffer history Hrvoje Niksic
2005-10-14 23:29 ` Hrvoje Niksic
2005-10-14 23:44   ` Drew Adams
2005-10-15 16:13 ` Richard M. Stallman
2005-10-15 22:28   ` Hrvoje Niksic
2005-10-15 23:29     ` Drew Adams
2005-10-16  7:28       ` David Kastrup
2005-10-16 15:49         ` Drew Adams
2005-10-16 16:16           ` Stefan Monnier
2005-10-16 17:58             ` Drew Adams
2005-10-16 21:52               ` David Kastrup
2005-10-17  1:10               ` Stefan Monnier
2005-10-17  8:25                 ` Hrvoje Niksic
2005-10-16 12:32       ` Hrvoje Niksic
2005-10-16 13:02       ` Stefan Monnier
2005-10-18 14:41         ` Hrvoje Niksic
2005-10-24 16:55           ` Drew Adams
2005-10-24 17:02             ` Drew Adams
2005-10-24 17:48               ` Stefan Monnier
2005-10-16 15:39     ` Stefan Monnier
2005-10-18 14:27       ` Hrvoje Niksic
2005-10-18 16:12         ` Stefan Monnier
2005-10-18 23:34           ` Hrvoje Niksic
2005-10-19 18:51             ` Stefan Monnier
2005-10-20  9:09               ` Hrvoje Niksic
2005-10-20  9:12                 ` Hrvoje Niksic
2005-10-20 16:25                   ` Stefan Monnier
2005-10-20 21:04                     ` Hrvoje Niksic
2005-10-24 16:02       ` Hrvoje Niksic
2005-10-24 17:16         ` Stefan Monnier
2005-10-25  9:04           ` Hrvoje Niksic
2005-10-26 16:46             ` Richard M. Stallman
2005-10-24 22:24         ` Stefan Monnier
2005-10-25  4:37           ` Stefan Monnier
2005-10-25  9:46             ` Hrvoje Niksic
2005-10-25 14:51               ` Stefan Monnier
2005-10-25 21:04             ` Hrvoje Niksic
2005-11-01  6:12               ` Stefan Monnier
2005-10-25  9:20           ` Hrvoje Niksic
2005-10-25 12:34             ` Miles Bader
2005-10-25 13:58               ` Hrvoje Niksic
2005-10-25 14:00                 ` Miles Bader
2005-10-25 14:39             ` Stefan Monnier [this message]
2005-10-25 19:07               ` Hrvoje Niksic
2005-10-25 15:58         ` Richard M. Stallman
2005-10-16 17:36     ` Richard M. Stallman
2005-10-16 20:18       ` Hrvoje Niksic
2005-10-16 21:55       ` David Kastrup

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=jwvhdb5n02v.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /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.
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).