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


Message #8 received at 25482 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 25482 <at> debbugs.gnu.org
Subject: Re: bug#25482: 26.0.50;
 Allow setting `query-replace-from-to-separator` to nil
Date: Thu, 19 Jan 2017 18:01:12 +0200
> From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
> Date: Thu, 19 Jan 2017 09:18:07 +0100
> 
> 
> Actually it is not possible to customize easily
> `query-replace-from-to-separator` and it is impossible to set it to nil.
> 
> If I use `setq`, `custom-reevaluate-setting` reevaluate the original
> sexp from `query-replace-from-to-separator` and if I use customize I can
> add a string or a sexp, nothing else.
> But the code in `query-replace-read-from` is checking if
> `query-replace-from-to-separator` is non-nil, which is impossible
> actually.
> Thus it adds difficulties to load such sexp when dumping emacs.
> 
> I would expect setting `query-replace-from-to-separator` to nil to
> retrieve same behavior as emacs-24.5 and not have unicode strings in my
> minibuffer-history.

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.  So why did you need the value of
nil?

> +    (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.

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.

Thanks.




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.