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: Wed, 22 Oct 2014 08:58:14 -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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1413983408 15743 80.91.229.3 (22 Oct 2014 13:10:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2014 13:10:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 22 15:10:01 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 1Xgvfr-0003uD-8o for ged-emacs-devel@m.gmane.org; Wed, 22 Oct 2014 15:09:59 +0200 Original-Received: from localhost ([::1]:57185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgvfq-0002XB-Od for ged-emacs-devel@m.gmane.org; Wed, 22 Oct 2014 09:09:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgvUf-0001Fx-Ud for emacs-devel@gnu.org; Wed, 22 Oct 2014 08:58:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgvUX-0006mY-9r for emacs-devel@gnu.org; Wed, 22 Oct 2014 08:58:25 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:13747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgvUX-0006ly-5h for emacs-devel@gnu.org; Wed, 22 Oct 2014 08:58:17 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFpY87/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBJy8jBQsLNBIUGA0kiAQI0hkXjnoHhDgEqRmBaoNMIQ X-IPAS-Result: ArUGAIDvNVNFpY87/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBJy8jBQsLNBIUGA0kiAQI0hkXjnoHhDgEqRmBaoNMIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="94823181" 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; 22 Oct 2014 08:58:14 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id A25F243AB; Wed, 22 Oct 2014 08:58:14 -0400 (EDT) In-Reply-To: <87iojduj9n.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 22 Oct 2014 01:53:40 +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:175689 Archived-At: >> - You still have access to the "TO-history" in the FROM case, indirectly >> (by browsing the corresponding FROM/TO pair and erasing the FROM and >> the separator). > The only problematic part is that if the user will be able > to erase the separator, then the user rightfully might want > to insert it back, but it's not straightforward to type a string > with text properties. `undo' should do it. > Perhaps using the Widget library is too heavy to implement this, > so it should be possible to have two fields in the minibuffer > by putting the properties `field' and `read-only' on the separator. The widget library is definitely too heavy. And I don't like the idea of making it read-only either. Just use a special character/string, and give it a special appearance via text-properties (make sure the user can't delete just a part of it, so a single char is best, probably with a display property), so that the user can tell it's not just text and so that Elisp can reliably recognize it as well. E.g. (propertize "\0" 'display (propertize " -> " 'face 'my-face)) Stefan