From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#25482: 26.0.50; Allow setting `query-replace-from-to-separator` to nil Date: Fri, 20 Jan 2017 12:35:29 +0100 Message-ID: <87y3y6ezge.fsf@gmail.com> References: <871svzzcn4.fsf@gmail.com> <83lgu76nuf.fsf@gnu.org> <87vatac0a2.fsf@gmail.com> <83a8am6u6q.fsf@gnu.org> 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 1484912354 16997 195.159.176.226 (20 Jan 2017 11:39:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2017 11:39:14 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 24.5.1 Cc: 25482@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 20 12:39:10 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 1cUXWx-0002zK-SO for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jan 2017 12:38:56 +0100 Original-Received: from localhost ([::1]:53855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUXX2-00080m-LS for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jan 2017 06:39:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUXUE-000607-JB for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2017 06:36:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUXUA-0006IJ-HT for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2017 06:36:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37865) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cUXUA-0006I6-ED for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2017 06:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cUXUA-0000Zi-6D for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2017 06:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Thierry Volpiatto Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jan 2017 11:36: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.14849121552198 (code B ref 25482); Fri, 20 Jan 2017 11:36:02 +0000 Original-Received: (at 25482) by debbugs.gnu.org; 20 Jan 2017 11:35:55 +0000 Original-Received: from localhost ([127.0.0.1]:36064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUXU3-0000ZO-Ck for submit@debbugs.gnu.org; Fri, 20 Jan 2017 06:35:55 -0500 Original-Received: from mail-wm0-f42.google.com ([74.125.82.42]:37878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUXU1-0000ZA-Rz for 25482@debbugs.gnu.org; Fri, 20 Jan 2017 06:35:54 -0500 Original-Received: by mail-wm0-f42.google.com with SMTP id c206so39176697wme.0 for <25482@debbugs.gnu.org>; Fri, 20 Jan 2017 03:35:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=Lp59q0RXELCRce+Piwcyjd14zFsl8Nuy2ZdRd1bjpkQ=; b=guhjhvoHVH+KPTBsVc8T4SIECXDdtjeuiM05koe6u8sOhkBX3wTG1N/hd7Kxq8J/eA vYBjcF8j3uieW/Yn99wlw5M8fsLzqA5Ye8SQViS51wz07yQdehary8DP0XKMitxKNrLB HKk6LtNqivgPjwN3TAxjzmNvBOrw4WLOvSNzwdBZeedpqtOZPaJKJwxLXespc27LutBk iT0D9lwnISZbEEPNs9itk0YmGAaELE9xdpEORg4nqwWm1/3XZgW4iq11zBHMSMW1h2BC 0Xnnx67dmNMJh0gzqodSwmsGVbk1ZbByYt/Sb/zhDXRUX/vZTfNKGN6wdcGN3GWEBrI5 S/jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=Lp59q0RXELCRce+Piwcyjd14zFsl8Nuy2ZdRd1bjpkQ=; b=cay7qPHZeDLLwbbODSOfsCMTh2oLrq7kJowVybgB+PXhPzWI6Aa+FgRb5kHJ+D/Pic 3PnLHbVXn9VEAmkGisKEnyAORsZ9kjD8KtmjFXq8hBTRgrMjlFxJl3YP6ltZwAVue0Ku 3huoY8sXzGmjZO9pAsysbZEg9DKfevP3/g56YFIaoQu+bovz9B6RClworvmTd64H7Zb0 9TFNLFWOsgExcf41UuDL5WwOtyxZNVaECSE8vsNIWHFPTh/zSLEMg5sGZa71eMXS+Lf4 eM2UsoOO074r5rhot1jCuQwhz96GmV8QAkgycZZ+NR+EkBqvw1E/v8Qd0OJj2CpIHfvl Kuyw== X-Gm-Message-State: AIkVDXKHgIjAqBpYYbe2jkvUfvSc17IDBV1iJ3sbXO9t0M9kau2LQcSPrNZwdoNU5mIfgQ== X-Received: by 10.223.173.183 with SMTP id w52mr13648743wrc.164.1484912147898; Fri, 20 Jan 2017 03:35:47 -0800 (PST) Original-Received: from MM061 (lbe83-2-78-243-104-167.fbx.proxad.net. [78.243.104.167]) by smtp.gmail.com with ESMTPSA id a13sm5573277wma.0.2017.01.20.03.35.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jan 2017 03:35:46 -0800 (PST) In-reply-to: <83a8am6u6q.fsf@gnu.org> 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:128273 Archived-At: Eli Zaretskii writes: > [You've replied only to me.] Yes sorry, I am so used to github that I sometimes forget to reply to all. > So you are saying that even setting the string to " -> " gets " → " > into the history? No even if you set the string to " -> " the string is not a plain string but "\0" with 'display property " -> ". > If so, that's the bug that we should solve, I think. The patch is fixing this. > Is it a problem to have the ASCII " -> " in the history? It is not ASCII but ^@. > Assuming we solve this part of the problem, would you still need to > disable adding the string to the history? No that would be ok as long as we use a plain string for " -> ". But note that the fix I provided make the defcustom simpler and easier to maintain both from user and developer side, thus it allow to use both custom and setq which is not the case with actual code. So to resume, With actual code: 1) Using (setq query-replace-from-to-separator " -> ") is not working. 2) Using (customize-set-variable query-replace-from-to-separator " -> ") is working but " -> " will not be a plain ascii string and will be added to history. 3) Setting query-replace-from-to-separator to nil is not possible, apart perhaps using a sexp that evaluate to nil, which is not obvious and in which case do not add a prompt with a default value like in 24.5 (regression). With the patch: 1) and 2) are working and preserve the actual behavior, which is adding "fromto" to history. 3) Is working and provide the exact behavior as 24.5, that is use a plain ascii string " -> " as separator and do not add "fromto" to history. The default setting is the same as the actual code, no change. Unrelated, I also fixed this block of code: (if regexp-flag (read-regexp prompt nil 'minibuffer-history) (read-from-minibuffer prompt nil nil nil nil (car (if regexp-flag regexp-search-ring search-ring)) t)) -- Thierry