GNU bug report logs - #25482
26.0.50; Allow setting `query-replace-from-to-separator` to nil

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Thu, 19 Jan 2017 08:41:01 UTC

Severity: minor

Found in version 26.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: 25482 <at> debbugs.gnu.org
Subject: bug#25482: Fwd: Re: bug#25482: 26.0.50; Allow setting `query-replace-from-to-separator` to nil
Date: Fri, 20 Jan 2017 06:42:10 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>> Sorry, I don't think I follow: you should be able to set this variable
>> to " -> ", a string, to get the old behavior and avoid non-ASCII
>> strings in your minibuffer-history.
>
> No, you don't have the same behavior, you endup with a non ascii string
> which goes to minibuffer-history, so the behavior is not as emacs-24.5
> if you set this variable to " -> ".
>
>> So why did you need the value of nil?
>
> Because when it is nil the string is not added to history, just like in
> 24.5.
>
>>> +    (when (stringp query-replace-from-to-separator)
>>> +      (setq query-replace-from-to-separator
>>> +            (propertize (if (char-displayable-p
>>> +                             (string-to-char query-replace-from-to-separator))
>>
>> This doesn't look right: string-to-char will return the blank
>> character, which is the first character of " → ", and I don't think
>> you meant that.
>
> Yes, you are right, thanks, however see how the actual code is wrong,
> what if someone set the separator to another unicode string.
>
>> In any case, this looks more complex than it has to be, because you
>> for some reason want to have the nil value.  Please elaborate on the
>> need for that.
>
> To retrieve the same behavior as in emacs-24.5, see above.


-- 
Thierry




This bug report was last modified 8 years and 174 days ago.

Previous Next


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