From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25482: 26.0.50; Allow setting `query-replace-from-to-separator` to nil Date: Thu, 19 Jan 2017 18:01:12 +0200 Message-ID: <83lgu76nuf.fsf@gnu.org> References: <871svzzcn4.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1484841755 22060 195.159.176.226 (19 Jan 2017 16:02:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2017 16:02:35 +0000 (UTC) Cc: 25482@debbugs.gnu.org To: Thierry Volpiatto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 19 17:02:24 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUFAK-0004ff-6r for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Jan 2017 17:02:20 +0100 Original-Received: from localhost ([::1]:49233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUFAP-0004Kj-1R for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Jan 2017 11:02:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUFA7-0004Fw-LV for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2017 11:02:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUFA2-0005gu-Q2 for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2017 11:02:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37489) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cUFA2-0005gq-N5 for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2017 11:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cUFA2-0006Po-Fn for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2017 11:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Jan 2017 16:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25482 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25482-submit@debbugs.gnu.org id=B25482.148484169924631 (code B ref 25482); Thu, 19 Jan 2017 16:02:02 +0000 Original-Received: (at 25482) by debbugs.gnu.org; 19 Jan 2017 16:01:39 +0000 Original-Received: from localhost ([127.0.0.1]:35688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUF9e-0006PD-Ve for submit@debbugs.gnu.org; Thu, 19 Jan 2017 11:01:39 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUF9d-0006P0-Kp for 25482@debbugs.gnu.org; Thu, 19 Jan 2017 11:01:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUF9T-0005ST-I0 for 25482@debbugs.gnu.org; Thu, 19 Jan 2017 11:01:32 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUF9T-0005SP-F9; Thu, 19 Jan 2017 11:01:27 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3363 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cUF9R-0002Xx-Qf; Thu, 19 Jan 2017 11:01:27 -0500 In-reply-to: <871svzzcn4.fsf@gmail.com> (message from Thierry Volpiatto on Thu, 19 Jan 2017 09:18:07 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128238 Archived-At: > From: Thierry Volpiatto > 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.