From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Ignoring entries starting with space Date: Thu, 25 Jun 2009 14:44:11 +0200 Message-ID: References: <873a9p5ls2.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1245933889 9237 80.91.229.12 (25 Jun 2009 12:44:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Jun 2009 12:44:49 +0000 (UTC) Cc: Juri Linkov , emacs-devel@gnu.org To: Francesc Rocher Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 25 14:44:42 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MJoJX-00052x-Kf for ged-emacs-devel@m.gmane.org; Thu, 25 Jun 2009 14:44:38 +0200 Original-Received: from localhost ([127.0.0.1]:53979 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJoJV-0006gr-W3 for ged-emacs-devel@m.gmane.org; Thu, 25 Jun 2009 08:44:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJoJQ-0006fb-KA for emacs-devel@gnu.org; Thu, 25 Jun 2009 08:44:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJoJL-0006aE-5h for emacs-devel@gnu.org; Thu, 25 Jun 2009 08:44:20 -0400 Original-Received: from [199.232.76.173] (port=58633 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJoJK-0006Zt-VW for emacs-devel@gnu.org; Thu, 25 Jun 2009 08:44:15 -0400 Original-Received: from smtp-02.vtx.ch ([212.147.0.114]:38372) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJoJK-0006LV-AY for emacs-devel@gnu.org; Thu, 25 Jun 2009 08:44:14 -0400 Original-Received: from alfajor.home (dyn.83-228-163-178.dsl.vtx.ch [83.228.163.178]) by smtp-02.vtx.ch (VTX Services SA) with ESMTP id 700655FF5B; Thu, 25 Jun 2009 14:44:11 +0200 (CEST) Original-Received: by alfajor.home (Postfix, from userid 20848) id 4521364343; Thu, 25 Jun 2009 14:44:11 +0200 (CEST) In-Reply-To: (Francesc Rocher's message of "Thu, 25 Jun 2009 09:58:57 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:111716 Archived-At: >> 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. There are many minibuffer history variables. > 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. Most minibuffer input is not commands but just "data" (e.g. file names). So maybe, you should write something more specific that only applies to those cases where the input takes the form of a (shell) command. Having a blanket "throw away anything startign with a space for any minibufffer input" sounds a bit too radical to me. After all, bash only applies this rule to the history of commands, doesn't it? Stefan