GNU bug report logs - #2495
23.0.91; regression in M-x flush-lines

Previous Next

Package: emacs;

Reported by: Andreas Seltenreich <seltenreich <at> gmx.de>

Date: Fri, 27 Feb 2009 13:25:07 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 2495 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: 2495 <at> debbugs.gnu.org
Subject: Re: bug#2495: 23.0.91; regression in M-x flush-lines
Date: Wed, 05 Aug 2009 23:14:18 +0300
>> 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/



This bug report was last modified 15 years and 290 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.