From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el(read-regexp): Let-bind `default' to the first Date: Fri, 08 Mar 2013 19:28:09 +0200 Organization: JURTA Message-ID: <87li9xer9u.fsf@mail.jurta.org> References: <877glsyecw.fsf@gmail.com> <87621cfhff.fsf@mail.jurta.org> <87zjykygjk.fsf@mail.jurta.org> <87vc92gi37.fsf@gmail.com> <1751CEB23B214A3AADCCFD9F007425DE@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1362763963 6655 80.91.229.3 (8 Mar 2013 17:32:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Mar 2013 17:32:43 +0000 (UTC) Cc: 'Jambunathan K' , 13687@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 08 18:33:03 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UE1AC-0000kN-96 for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Mar 2013 18:33:00 +0100 Original-Received: from localhost ([::1]:57447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UE19q-0006Ln-DZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Mar 2013 12:32:38 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UE19h-0006G8-JB for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2013 12:32:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UE19b-0001Ba-WC for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2013 12:32:29 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UE19b-0001BU-RI for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2013 12:32:23 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UE1AD-0004ih-Q1 for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2013 12:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Mar 2013 17:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13687-submit@debbugs.gnu.org id=B13687.136276396518121 (code B ref 13687); Fri, 08 Mar 2013 17:33:01 +0000 Original-Received: (at 13687) by debbugs.gnu.org; 8 Mar 2013 17:32:45 +0000 Original-Received: from localhost ([127.0.0.1]:39738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UE19t-0004i9-5O for submit@debbugs.gnu.org; Fri, 08 Mar 2013 12:32:45 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:39333 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UE19n-0004hw-In for 13687@debbugs.gnu.org; Fri, 08 Mar 2013 12:32:40 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 7B432258B92901; Fri, 8 Mar 2013 09:31:55 -0800 (PST) In-Reply-To: <1751CEB23B214A3AADCCFD9F007425DE@us.oracle.com> (Drew Adams's message of "Fri, 8 Mar 2013 07:29:52 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72233 Archived-At: > Let the command decide its own defaulting. Individual commands that read the > minibuffer should control such defaulting, at the point of call. Since when the command commands the user, and not other way round? > They can rely on user options if they want to. But a single user option for > this kind of thing, and especially if it somehow takes control of defaulting > away from the caller (command), is a bad idea. Perhaps you missed the whole thread, but see what the users are forced to use http://stackoverflow.com/questions/15161592/make-emacs-rgrep-default-to-last-search-term-rather-than-word-at-point in the absence of customizable options. > FWIW, in my code I do something that I'm guessing might be similar to the > _effect_ you want, but I stay completely away from command lookup/dispatching. There is no command lookup/dispatching since Jambunathan implements the third variant, and not the second cited above. > I have a user option, `search/replace-default-fn', whose value (a function) > provides the default value(s) for functions `query-replace', `occur', > `how-many', `flush-lines',... Your `search/replace-default-fn' is exactly the same thing as `occur-read-regexp-defaults-function', so why do you object?