From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Suggestion: Mapping of M-g should be goto-line Date: 31 Mar 2004 11:30:23 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1080721980 18972 80.91.224.253 (31 Mar 2004 08:33:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 31 Mar 2004 08:33:00 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Mar 31 10:32:51 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B8b9X-0000ny-00 for ; Wed, 31 Mar 2004 10:32:51 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B8b9X-0004tL-00 for ; Wed, 31 Mar 2004 10:32:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B8b8A-0005vo-OD for emacs-devel@quimby.gnus.org; Wed, 31 Mar 2004 03:31:26 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B8b85-0005vF-FG for emacs-devel@gnu.org; Wed, 31 Mar 2004 03:31:21 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B8b7W-0005nR-Cx for emacs-devel@gnu.org; Wed, 31 Mar 2004 03:31:19 -0500 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.30) id 1B8b7V-0005mH-JQ for emacs-devel@gnu.org; Wed, 31 Mar 2004 03:30:45 -0500 Original-Received: (qmail 78756 invoked from network); 31 Mar 2004 08:30:41 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 31 Mar 2004 08:30:41 -0000 Original-To: jari.aalto@poboxes.com (Jari Aalto+mail.emacs) In-Reply-To: Original-Lines: 35 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21121 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21121 jari.aalto@poboxes.com (Jari Aalto+mail.emacs) writes: > The "de facto" situation for long has been that everybody maps > M-g to goto-line. People advice that in newsgroups, because it > is indeed the most logical key. > > If we would take a poll in Emacs newsgroups, presumably the > "yes" votes for goto-line would win in great majority. > > It would be better if Emacs supported this 99 % daily usage of > M-g, instead of current not-so-useful binding. It occurred to me that you can have your cake and eat it too: Try this little trick: (defun goto-line-piggyback () (interactive) (goto-line (string-to-int (read-string "Goto line: " (substring (this-command-keys) -1))))) (dolist (digit '(?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9)) (define-key facemenu-keymap (vector digit) 'goto-line-piggyback)) Eval and try M-g 123 RET Or course, the feedback in the minibuffer when you hit M-g is far from perfect, and C-h k M-g still gives odd results... -- Kim F. Storm http://www.cua.dk