help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Going to line n, column m


From: Nikolaj Schumacher
Subject: Re: Going to line n, column m
Date: Wed, 08 Oct 2008 16:22:12 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]