From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: History for query replace pairs Date: Sat, 25 Oct 2014 22:29:22 -0400 Message-ID: References: <87a97ejxuo.fsf@mail.jurta.org> <87lhovik5c.fsf@lifelogs.com> <87wq8egh3r.fsf@lifelogs.com> <87ppe4zv0t.fsf@mail.jurta.org> <87k34ba5sn.fsf@mail.jurta.org> <87siiq4gpv.fsf@mail.jurta.org> <87iojduj9n.fsf@mail.jurta.org> <87k33nyirh.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1414290599 12187 80.91.229.3 (26 Oct 2014 02:29:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Oct 2014 02:29:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 26 03:29:52 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XiDaZ-0007JP-L7 for ged-emacs-devel@m.gmane.org; Sun, 26 Oct 2014 03:29:51 +0100 Original-Received: from localhost ([::1]:55132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiDaZ-0007ef-8k for ged-emacs-devel@m.gmane.org; Sat, 25 Oct 2014 22:29:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiDaG-0007eO-NJ for emacs-devel@gnu.org; Sat, 25 Oct 2014 22:29:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiDa9-0007kl-7A for emacs-devel@gnu.org; Sat, 25 Oct 2014 22:29:32 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:13811) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiDa9-0007kh-3z for emacs-devel@gnu.org; Sat, 25 Oct 2014 22:29:25 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFpY87/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArUGAIDvNVNFpY87/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="95208697" Original-Received: from 69-165-143-59.dsl.teksavvy.com (HELO pastel.home) ([69.165.143.59]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Oct 2014 22:29:23 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id EC1983292; Sat, 25 Oct 2014 22:29:22 -0400 (EDT) In-Reply-To: <87k33nyirh.fsf@mail.jurta.org> (Juri Linkov's message of "Sat, 25 Oct 2014 23:52:18 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175845 Archived-At: > Below is a preliminary implementation. However, there is a problem > that after saving it to the desktop or savehist, and restoring back > FROM-TO string pairs in the history lose text-properties. > If there is no way to save text properties then perhaps we should have > two history variables: one with cons pairs (FROM . TO) to save > in the desktop, and another with a list of strings "FROMTO" > to use in `read-from-minibuffer', and keep these two variables in sync. We definitely shouldn't store the pairs as a single string. But do we really need to change the history vars at all? I mean, we currently manage to extract "the last pair" from the current history vars, so can't we extend this hack? Stefan