From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help Subject: Re: Going to line n, column m Date: Wed, 08 Oct 2008 16:22:12 +0200 Message-ID: References: <87zllg5ee7.fsf@hubble.informatimago.com> <87vdw456w4.fsf@hubble.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223476298 3774 80.91.229.12 (8 Oct 2008 14:31:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Oct 2008 14:31:38 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: pjb@informatimago.com (Pascal J. Bourguignon) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 08 16:32:26 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KnZx5-00065p-QK for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Oct 2008 16:23:48 +0200 Original-Received: from localhost ([127.0.0.1]:56663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnZw1-0000vB-Rr for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Oct 2008 10:22:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KnZvc-0000uP-Et for help-gnu-emacs@gnu.org; Wed, 08 Oct 2008 10:22:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KnZvb-0000u1-Ts for help-gnu-emacs@gnu.org; Wed, 08 Oct 2008 10:22:16 -0400 Original-Received: from [199.232.76.173] (port=53930 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnZvb-0000tr-Ip for help-gnu-emacs@gnu.org; Wed, 08 Oct 2008 10:22:15 -0400 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:55987) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KnZvb-0005ak-2R for help-gnu-emacs@gnu.org; Wed, 08 Oct 2008 10:22:15 -0400 Original-Received: from thursday (BAHb8d4.bah.pppool.de [77.135.184.212]) by dd18200.kasserver.com (Postfix) with ESMTP id 2FCD11802D864; Wed, 8 Oct 2008 16:22:17 +0200 (CEST) In-Reply-To: <87vdw456w4.fsf@hubble.informatimago.com> (Pascal J. Bourguignon's message of "Wed\, 08 Oct 2008 01\:20\:59 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58539 Archived-At: pjb@informatimago.com (Pascal J. Bourguignon) wrote: > It's not a bug, it's a feature of move-to-column. Hence my > implementation of goto-xy. First of all, I think it's unlikely that the OP wanted to move to a line and column that don't exist. Your comment that it "doesn't work" is misleading at best. But even if he did, move-to-column is capable of doing so. There's no need for an elaborate (and error-prone) re-implementation. (defun goto-xy (column line) (interactive "nColumn: \nnLine: ") (goto-line line) (newline (- line (line-number-at-pos))) (move-to-column column t)) regards, Nikolaj Schumacher