From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Why is `C-x 8' limited to Latin-1 for search? Date: Mon, 10 Dec 2012 06:24:24 -0800 Message-ID: <9CE95F039B2A4295BA1273CD98924B43@us.oracle.com> References: <1992681966EA4AE4A56751FA335DD5CE@us.oracle.com><9A96D353A11D47A7A143074DB1E09EE4@us.oracle.com> <8738ze4jid.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1355149494 18337 80.91.229.3 (10 Dec 2012 14:24:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Dec 2012 14:24:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Juri Linkov'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 10 15:25:07 2012 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 1Ti4I7-0002AZ-B8 for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2012 15:25:07 +0100 Original-Received: from localhost ([::1]:43527 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ti4Hu-0006Kb-PR for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2012 09:24:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ti4Hq-0006KL-V8 for emacs-devel@gnu.org; Mon, 10 Dec 2012 09:24:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ti4Hh-0008Pr-95 for emacs-devel@gnu.org; Mon, 10 Dec 2012 09:24:50 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:24245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ti4Hh-0008Pm-1w for emacs-devel@gnu.org; Mon, 10 Dec 2012 09:24:41 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qBAEOcjC023532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 Dec 2012 14:24:39 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qBAEObx4026322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Dec 2012 14:24:38 GMT Original-Received: from abhmt115.oracle.com (abhmt115.oracle.com [141.146.116.67]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qBAEObFg000640; Mon, 10 Dec 2012 08:24:37 -0600 Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Dec 2012 06:24:37 -0800 X-Mailer: Microsoft Office Outlook 11 In-reply-to: <8738ze4jid.fsf@mail.jurta.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Thread-Index: Ac3Wrb4PgYPcGLh0SNe0Lj3EDNCdpQAMeMkg X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 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:155427 Archived-At: > To avoid code duplication, a new macro could be created > with a name like `with-isearch-paused' and the body from > `isearch-edit-string' except the part that changes > `isearch-new-string' and `isearch-new-message'. > It could be used in a new command with a name like > `isearch-insert-char-by-name'. FWIW, I did that yesterday in my own code (isearch+.el). If Emacs adds this or similar then I won't need to do that. I named the macro `isearchp-use-new-search-string' and the new command `isearchp-read-unicode-char'. I bind `isearchp-read-unicode-char' to `C-x 8 RET' in `isearch-mode-map' and `insert-char' to `C-x 8 RET' in `minibuffer-local-isearch-map'. The macro is passed a sexp that is evaluated to produce the new search string. So for `isearchp-read-unicode-char', this is the call: (defun isearchp-read-unicode-char () (interactive) (isearchp-use-new-search-string (concat isearch-string (string (read-char-by-name "Unicode (name or hex): "))))) And for `isearch-edit-string' the sexp passed is just the current `read-from-minibuffer' sexp. But I don't know what you mean by "except the part that changes `isearch-new-string' and `isearch-new-message'. I do change both, to reflect the added char. No doubt you had a slightly different macro in mind. Anyway, FWIW, the code I used is here: http://www.emacswiki.org/emacs-en/download/isearch%2b.el Something else to consider perhaps is whether another (perhaps additional), shorter key sequence should be bound for this. My thinking was that `C-x 8 RET' is enough, since (a) it is what users will remember for this, and (b) reading the char name is anyway an interruption/slowdown, so it would not help much to introduce the reading with a quick key sequence. Another possibility, which I used at first but abandoned, would be to not bind `enable-recursive-minibuffers' to non-nil systematically in the macro, but to bind it to a value passed as an additional (optional) parameter. For my use, at least, I decided this was not necessary/useful - I just bind it to t. HTH.