From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Key binding M-g should really be goto-lineautolearn=noversion=3.0.2 autolearn=no version=3.0.2 Date: Fri, 4 Mar 2005 16:49:13 -0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1109984490 9689 80.91.229.2 (5 Mar 2005 01:01:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 5 Mar 2005 01:01:30 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 05 02:01:29 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D7NfA-0000kn-Dq for ged-emacs-devel@m.gmane.org; Sat, 05 Mar 2005 02:01:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D7NyQ-00079E-VM for ged-emacs-devel@m.gmane.org; Fri, 04 Mar 2005 20:20:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D7Nwy-0006mi-2h for emacs-devel@gnu.org; Fri, 04 Mar 2005 20:19:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D7Nwq-0006hz-CD for emacs-devel@gnu.org; Fri, 04 Mar 2005 20:19:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D7Nwl-0006Zv-HD for emacs-devel@gnu.org; Fri, 04 Mar 2005 20:19:11 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1D7NYg-0002G8-Db for emacs-devel@gnu.org; Fri, 04 Mar 2005 19:54:18 -0500 Original-Received: from agminet01.oracle.com (localhost [127.0.0.1]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j250s3uR014330 for ; Fri, 4 Mar 2005 16:54:04 -0800 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.191.50]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j250nH9T010175 for ; Fri, 4 Mar 2005 16:50:46 -0800 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j250nGfK019698 for ; Fri, 4 Mar 2005 17:49:16 -0700 Original-Received: from dradamslap (dhcp-amer-whq-csvpn-gw3-141-144-82-246.vpn.oracle.com [141.144.82.246]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id j250nEvj019676 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 4 Mar 2005 17:49:15 -0700 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:34198 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34198 > How about making goto-line suggest the number at point > as its default argument? That seems very convenient! I haven't yet received RMS's email, but yes, why not? I think it may also be convenient if, point is not on a number, use the first number on the current line as a default. This is because I think it's common to have point sitting at the beginning of an error line, and this would save users the effort of manually positioning point over the actual line number (the heuristic could fail in some cases if for instance a filename contained digits, but I think it would often be right). BTW, also maybe the prompt in the "use last selected buffer" case should mention the buffer name. FYI - I don't suggest that `goto-line' itself should be changed this way, but the code I sent for `goto-line-at-point' (which picks up a number in a buffer to use as goto-line line number in another buffer), in my version, uses `number-nearest-point' instead of `number-at-point'. That does what you suggest wrt a number at line start. `number-nearest-point' is defined here: http://www.emacswiki.org/elisp/thingatpt-plus.el.