emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 23.0.60; M-x occur no longer uses previous regexp as default


From: Stefan Monnier
Subject: Re: 23.0.60; M-x occur no longer uses previous regexp as default
Date: Tue, 22 Apr 2008 21:47:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> The reason for removing the previous regexp from default was because
> it makes more inconvenient to retrieve more available values from
> the list of default values via M-n.  But maybe we could just display
> the previous regexp in the prompt and accept it when the user types RET
> with the empty string, but don't make it available via M-n, because it is
> available via M-p for inserting into the minibuffer for editing.

Then why not use

   (let ((ret (read-string (format "Regexp (default %s): " foo))))
     (if (equal ret "") foo ret))

> Alternatively, we could change the occur engine to display all lines for
> the "" regexp.  This is not useful, but at least can be expected for "".

Signalling an error in the function's code is better.
Making sure the interactive spec never returns "" is also better (and
not mutually exclusive).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]