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#2495: 23.0.91; regression in M-x flush-lines Date: Wed, 05 Aug 2009 23:14:18 +0300 Organization: JURTA Message-ID: <87tz0mf279.fsf@mail.jurta.org> References: <874oyg8198.fsf@gate450.dyndns.org> Reply-To: Juri Linkov , 2495@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249505229 13748 80.91.229.12 (5 Aug 2009 20:47:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Aug 2009 20:47:09 +0000 (UTC) To: 2495@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 05 22:47:02 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MYnO1-00045R-Lx for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Aug 2009 22:47:01 +0200 Original-Received: from localhost ([127.0.0.1]:41356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYnO1-0005UR-6T for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Aug 2009 16:47:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYnNv-0005On-3x for bug-gnu-emacs@gnu.org; Wed, 05 Aug 2009 16:46:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYnNq-0005G3-9Y for bug-gnu-emacs@gnu.org; Wed, 05 Aug 2009 16:46:54 -0400 Original-Received: from [199.232.76.173] (port=48486 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYnNq-0005Fq-3h for bug-gnu-emacs@gnu.org; Wed, 05 Aug 2009 16:46:50 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:49295) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MYnNp-0003sE-Kl for bug-gnu-emacs@gnu.org; Wed, 05 Aug 2009 16:46:49 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n75Kklia017133; Wed, 5 Aug 2009 13:46:47 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n75Kj4Ud016860; Wed, 5 Aug 2009 13:45:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Juri Linkov Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 05 Aug 2009 20:45:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2495 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 2495-submit@emacsbugs.donarmstrong.com id=B2495.124950482216749 (code B ref 2495); Wed, 05 Aug 2009 20:45:04 +0000 Original-Received: (at 2495) by emacsbugs.donarmstrong.com; 5 Aug 2009 20:40:22 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n75KeGIp016685 for <2495@emacsbugs.donarmstrong.com>; Wed, 5 Aug 2009 13:40:18 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.69.104.cable.starman.ee [82.131.69.104]) by mx1.starman.ee (Postfix) with ESMTP id 17CC33F41A3 for <2495@emacsbugs.donarmstrong.com>; Wed, 5 Aug 2009 23:40:11 +0300 (EEST) X-Draft-From: ("nnml:list.bug-gnu-emacs" 10121) In-Reply-To: (Glenn Morris's message of "Fri, 27 Feb 2009 16:41:10 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) Original-Lines: 47 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 05 Aug 2009 16:46:54 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29907 Archived-At: >> emacs -Q >> M-< ; beginning of *scratch* buffer >> M-x flush-lines RET RET > > In 22.3, this used read-from-minibuffer, which returns the empty > string in case of no input. > > Now it used read-regexp, which returns nil in case of no input (if no > default is supplied). That doesn't seem right. > > Perhaps this: > > *** replace.el 9 Jan 2009 05:01:00 -0000 1.282 > --- replace.el 27 Feb 2009 21:41:59 -0000 > *************** > *** 556,562 **** > (format "%s: " prompt)) > nil nil nil 'regexp-history defaults t))) > (if (equal input "") > ! default-value > (prog1 input > (add-to-history 'regexp-history input))))) > > --- 556,562 ---- > (format "%s: " prompt)) > nil nil nil 'regexp-history defaults t))) > (if (equal input "") > ! (or default-value input) > (prog1 input > (add-to-history 'regexp-history input))))) Currently flush-lines always displays the misleading prompt Flush lines containing match for regexp (default ): ========== where default is empty that makes no sense without a real default value. I think Glenn provided the correct patch for this bug (seen above). -- Juri Linkov http://www.jurta.org/emacs/