From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: inputting characters by hexadigit Date: Wed, 23 Jul 2008 19:15:28 +0900 Message-ID: References: <868ww3vydn.fsf@lifelogs.com> <87tzeokrku.fsf@jurta.org> <87tzeogih6.fsf@catnip.gol.com> <488020A4.4060601@harpegolden.net> <873am6rb8k.fsf@jurta.org> <87r69oqojm.fsf@jurta.org> <4886A7D0.8070007@harpegolden.net> <87wsjdgd6r.fsf@jurta.org> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1216808706 2823 80.91.229.12 (23 Jul 2008 10:25:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Jul 2008 10:25:06 +0000 (UTC) Cc: David De La Harpe Golden , lekktu@gmail.com, tzz@lifelogs.com, Kenichi Handa , emacs-devel@gnu.org, Stefan Monnier To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 23 12:25:51 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KLbXa-00049m-AP for ged-emacs-devel@m.gmane.org; Wed, 23 Jul 2008 12:25:50 +0200 Original-Received: from localhost ([127.0.0.1]:46019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLbWe-0003nn-T2 for ged-emacs-devel@m.gmane.org; Wed, 23 Jul 2008 06:24:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLbNk-0001r4-C0 for emacs-devel@gnu.org; Wed, 23 Jul 2008 06:15:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLbNh-0001pz-VX for emacs-devel@gnu.org; Wed, 23 Jul 2008 06:15:38 -0400 Original-Received: from [199.232.76.173] (port=38429 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLbNh-0001pf-GY for emacs-devel@gnu.org; Wed, 23 Jul 2008 06:15:37 -0400 Original-Received: from tyo201.gate.nec.co.jp ([202.32.8.193]:48925) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KLbNd-000691-Ad; Wed, 23 Jul 2008 06:15:33 -0400 Original-Received: from relay11.aps.necel.com ([10.29.19.46]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id m6NAFTbB012640; Wed, 23 Jul 2008 19:15:29 +0900 (JST) Original-Received: from relay31.aps.necel.com ([10.29.19.16] [10.29.19.16]) by relay11.aps.necel.com with ESMTP; Wed, 23 Jul 2008 19:15:28 +0900 Original-Received: from dhapc248.dev.necel.com ([10.114.112.215] [10.114.112.215]) by relay31.aps.necel.com with ESMTP; Wed, 23 Jul 2008 19:15:28 +0900 Original-Received: by dhapc248.dev.necel.com (Postfix, from userid 31295) id 5DD115B5; Wed, 23 Jul 2008 19:15:28 +0900 (JST) System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: <87wsjdgd6r.fsf@jurta.org> (Juri Linkov's message of "Wed, 23 Jul 2008 12:03:35 +0300") Original-Lines: 28 X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:101301 Archived-At: Juri Linkov writes: > Another drawback (that C-q currently has too) is an inability to edit > incomplete input. This pushes us back to the era of dumb calculators > without the backspace key. > > A more convenient method is to use the minibuffer to input the number. We could have C-x 8 prompt using the minibuffer, with pre-stuffed into it... (defun read-and-insert-numeric-char (initial-input) (interactive (list (string last-command-char))) (insert (string-to-number (read-from-minibuffer "Character code (hex): " initial-input) 16))) (dolist (ch '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?a ?b ?c ?d ?e ?f)) (global-set-key (vector ?\C-x ?8 ch) 'read-and-insert-numeric-char)) [This is not entirely correct, since I'm not sure where the C-x 8 keymap is located, so I'm just using the global map...] -Miles -- Somebody has to do something, and it's just incredibly pathetic that it has to be us. -- Jerry Garcia