unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Francesc Rocher <francesc.rocher@gmail.com>
To: Juri Linkov <juri@jurta.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: Ignoring entries starting with space
Date: Thu, 25 Jun 2009 09:58:57 +0200	[thread overview]
Message-ID: <ade856a30906250058p2d7d851bl39887f2f4c55b54b@mail.gmail.com> (raw)
In-Reply-To: <873a9p5ls2.fsf@mail.jurta.org>

[-- Attachment #1: Type: text/plain, Size: 1111 bytes --]

> >> The same way it is possible to delete duplicates in minibuffer history,
> >> I think it is also very useful to have the possibility to ignore
> >> entries starting with space(s). The new variable `history-ignore-space'
> >> would take care of this, being `nil' its defaut value.
> >
> > Could you explain some use cases?
>
> I have one use case where this will be useful.
>
> In http://thread.gmane.org/gmane.emacs.devel/91359/focus=92106
> I suggested a piece of code for .emacs that removes potentially
> dangerous commands from the minibuffer history.
>
> With a new variable `history-ignore-space'=t this will be unnecessary
> since it's possible to not put dangerous commands to the minibuffer history
> with just prepending a command with a space like e.g. " rm -rf ."
>


Yes, that's the point. In general, any potentially dangerous command won't
be stored
into the history by simply pre-pending an space. Its the same as in Bash,
the source
of inspiration of this patch, especially when you are typing dangerous
commands
as root. It's better not to store them into the history.

-- Francesc Rocher

[-- Attachment #2: Type: text/html, Size: 1571 bytes --]

  reply	other threads:[~2009-06-25  7:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-21 21:20 Ignoring entries starting with space Francesc Rocher
2009-06-21 23:00 ` Juri Linkov
2009-06-24 21:21 ` Stefan Monnier
2009-06-24 22:08   ` Juri Linkov
2009-06-25  7:58     ` Francesc Rocher [this message]
2009-06-25 12:44       ` Stefan Monnier
2009-06-25 20:45         ` Juri Linkov
2009-06-25 22:57           ` Stefan Monnier
2009-06-25 23:03             ` Lennart Borgman
2009-06-26 18:25               ` Francesc Rocher
2009-06-26 19:02                 ` Drew Adams
2009-06-26 22:54                 ` Juri Linkov
2009-06-26 23:42                 ` Stefan Monnier

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=ade856a30906250058p2d7d851bl39887f2f4c55b54b@mail.gmail.com \
    --to=francesc.rocher@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.org \
    --cc=monnier@iro.umontreal.ca \
    /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).