unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Going to line n, column m
@ 2008-10-07 17:08 Mauricio
  2008-10-07 20:32 ` Nikolaj Schumacher
       [not found] ` <mailman.498.1223411586.25473.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 24+ messages in thread
From: Mauricio @ 2008-10-07 17:08 UTC (permalink / raw
  To: help-gnu-emacs

Hi,

I think this is simple, but I wasn't able
to find it anywhere: how can I tell emacs
I want to go to line x, column y?

Sorry for the really basic question. Thanks,
Maurício





^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
       [not found] <mailman.476.1223399312.25473.help-gnu-emacs@gnu.org>
@ 2008-10-07 17:23 ` Pascal J. Bourguignon
  2008-10-07 18:43   ` Lennart Borgman (gmail)
       [not found]   ` <mailman.485.1223405182.25473.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 24+ messages in thread
From: Pascal J. Bourguignon @ 2008-10-07 17:23 UTC (permalink / raw
  To: help-gnu-emacs

Mauricio <briqueabraque@yahoo.com> writes:
> I think this is simple, but I wasn't able
> to find it anywhere: how can I tell emacs
> I want to go to line x, column y?

Usually, x is the column, and y is the line.

(defun goto-xy (column line)
  (interactive "nColumn: 
nLine: ")
  (let ((lines (count-lines (point-min) (point-max))))
    (cond
      ((< line 0)     (error "Cannot go before the beginning of buffer."))
      ((< line lines) (beginning-of-buffer) (forward-line line))
      (t (end-of-buffer) (insert (make-string (- line lines) 10))))
    (let ((columns (- (progn (end-of-line)       (point))
                      (progn (beginning-of-line) (point)))))
      (cond ((< column 0) (error "Cannot go before the beginning of line"))
            ((< column columns) (forward-char column))
            (t (end-of-line) (insert (make-string (- column columns) 32)))))))


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"Our users will know fear and cower before our software! Ship it!
Ship it and let them flee like the dogs they are!"


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-07 17:23 ` Pascal J. Bourguignon
@ 2008-10-07 18:43   ` Lennart Borgman (gmail)
       [not found]   ` <mailman.485.1223405182.25473.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 24+ messages in thread
From: Lennart Borgman (gmail) @ 2008-10-07 18:43 UTC (permalink / raw
  To: Pascal J. Bourguignon; +Cc: help-gnu-emacs

Pascal J. Bourguignon wrote:
> Mauricio <briqueabraque@yahoo.com> writes:
>> I think this is simple, but I wasn't able
>> to find it anywhere: how can I tell emacs
>> I want to go to line x, column y?
> 
> Usually, x is the column, and y is the line.
> 
> (defun goto-xy (column line)
>   (interactive "nColumn: 
> nLine: ")
>   (let ((lines (count-lines (point-min) (point-max))))
>     (cond
>       ((< line 0)     (error "Cannot go before the beginning of buffer."))
>       ((< line lines) (beginning-of-buffer) (forward-line line))

I think you need to use (widen) above. Please see `goto-line' - and why
not use goto-line?

>       (t (end-of-buffer) (insert (make-string (- line lines) 10))))
>     (let ((columns (- (progn (end-of-line)       (point))
>                       (progn (beginning-of-line) (point)))))
>       (cond ((< column 0) (error "Cannot go before the beginning of line"))
>             ((< column columns) (forward-char column))
>             (t (end-of-line) (insert (make-string (- column columns) 32)))))))
> 
> 




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
       [not found]   ` <mailman.485.1223405182.25473.help-gnu-emacs@gnu.org>
@ 2008-10-07 18:58     ` Pascal J. Bourguignon
  0 siblings, 0 replies; 24+ messages in thread
From: Pascal J. Bourguignon @ 2008-10-07 18:58 UTC (permalink / raw
  To: help-gnu-emacs

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> Pascal J. Bourguignon wrote:
>> Mauricio <briqueabraque@yahoo.com> writes:
>>> I think this is simple, but I wasn't able
>>> to find it anywhere: how can I tell emacs
>>> I want to go to line x, column y?
>> 
>> Usually, x is the column, and y is the line.
>> 
>> (defun goto-xy (column line)
>>   (interactive "nColumn: 
>> nLine: ")
>>   (let ((lines (count-lines (point-min) (point-max))))
>>     (cond
>>       ((< line 0)     (error "Cannot go before the beginning of buffer."))
>>       ((< line lines) (beginning-of-buffer) (forward-line line))
>
> I think you need to use (widen) above. Please see `goto-line' - and why
> not use goto-line?

I didn't think about it, but now that you ask, goto-line is an
interactive function that does much more than going to some line.  And
it will eventuall call forward-line, so I think it's a good idea to
call it directly. 

Otherwise, you're correct about widen, but there must be a good reason
why the user narrowed, I'd guess.

The point is that, obviously, my command lacks a good documentation
string.  Sorry about that.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

This is a signature virus.  Add me to your signature and help me to live.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-07 17:08 Going to line n, column m Mauricio
@ 2008-10-07 20:32 ` Nikolaj Schumacher
       [not found] ` <mailman.498.1223411586.25473.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 24+ messages in thread
From: Nikolaj Schumacher @ 2008-10-07 20:32 UTC (permalink / raw
  To: Mauricio; +Cc: help-gnu-emacs

Mauricio <briqueabraque@yahoo.com> wrote:

> I think this is simple, but I wasn't able
> to find it anywhere: how can I tell emacs
> I want to go to line x, column y?

`goto-line' and `move-to-column'

regards,
Nikolaj Schumacher




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
       [not found] ` <mailman.498.1223411586.25473.help-gnu-emacs@gnu.org>
@ 2008-10-07 20:38   ` Pascal J. Bourguignon
  2008-10-07 20:52     ` Joost Kremers
                       ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Pascal J. Bourguignon @ 2008-10-07 20:38 UTC (permalink / raw
  To: help-gnu-emacs

Nikolaj Schumacher <me@nschum.de> writes:

> Mauricio <briqueabraque@yahoo.com> wrote:
>
>> I think this is simple, but I wasn't able
>> to find it anywhere: how can I tell emacs
>> I want to go to line x, column y?
>
> `goto-line' and `move-to-column'

They don't work ;-)

If you don't believe me, try:

RET C-u 40 M-x move-to-column RET


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Grace personified,
I leap into the window.
I meant to do that.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-07 20:38   ` Pascal J. Bourguignon
@ 2008-10-07 20:52     ` Joost Kremers
  2008-10-07 20:54     ` Lennart Borgman (gmail)
       [not found]     ` <mailman.501.1223412938.25473.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 24+ messages in thread
From: Joost Kremers @ 2008-10-07 20:52 UTC (permalink / raw
  To: help-gnu-emacs

Pascal J. Bourguignon wrote:
>> `goto-line' and `move-to-column'
>
> They don't work ;-)
>
> If you don't believe me, try:
>
> RET C-u 40 M-x move-to-column RET

works just fine. it's just that move-to-column won't move the cursor beyond
the newline at the end of the line. so to move to column 40, you actually
need to have at least forty characters on the current line.


-- 
Joost Kremers                                      joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-07 20:38   ` Pascal J. Bourguignon
  2008-10-07 20:52     ` Joost Kremers
@ 2008-10-07 20:54     ` Lennart Borgman (gmail)
  2008-10-08  0:00       ` Xavier Maillard
       [not found]     ` <mailman.501.1223412938.25473.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 24+ messages in thread
From: Lennart Borgman (gmail) @ 2008-10-07 20:54 UTC (permalink / raw
  To: Pascal J. Bourguignon; +Cc: help-gnu-emacs

Pascal J. Bourguignon wrote:
> Nikolaj Schumacher <me@nschum.de> writes:
> 
>> Mauricio <briqueabraque@yahoo.com> wrote:
>>
>>> I think this is simple, but I wasn't able
>>> to find it anywhere: how can I tell emacs
>>> I want to go to line x, column y?
>> `goto-line' and `move-to-column'
> 
> They don't work ;-)
> 
> If you don't believe me, try:
> 
> RET C-u 40 M-x move-to-column RET

To increase your credibility please show how to reproduce it ;-)

More seriously, this might be a bug, but it works for me using CVS Emacs 23.




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
       [not found]     ` <mailman.501.1223412938.25473.help-gnu-emacs@gnu.org>
@ 2008-10-07 23:20       ` Pascal J. Bourguignon
  2008-10-07 23:54         ` Lennart Borgman (gmail)
                           ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Pascal J. Bourguignon @ 2008-10-07 23:20 UTC (permalink / raw
  To: help-gnu-emacs

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> Pascal J. Bourguignon wrote:
>> Nikolaj Schumacher <me@nschum.de> writes:
>> 
>>> Mauricio <briqueabraque@yahoo.com> wrote:
>>>
>>>> I think this is simple, but I wasn't able
>>>> to find it anywhere: how can I tell emacs
>>>> I want to go to line x, column y?
>>> `goto-line' and `move-to-column'
>> 
>> They don't work ;-)
>> 
>> If you don't believe me, try:
>> 
>> RET C-u 40 M-x move-to-column RET
>
> To increase your credibility please show how to reproduce it ;-)

Yes of course.  Just type again:

RET C-u 40 M-x move-to-column RET

and once more the cursor will stay on column 1.


Want to reproduce it yet another time?  No problem, just type again:

RET C-u 40 M-x move-to-column RET

and once more the cursor will stay on column 1.


> More seriously, this might be a bug, but it works for me using CVS Emacs 23.

It's not a bug, it's a feature of move-to-column.  Hence my
implementation of goto-xy.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"Remember, Information is not knowledge; Knowledge is not Wisdom;
Wisdom is not truth; Truth is not beauty; Beauty is not love;
Love is not music; Music is the best." -- Frank Zappa


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-07 23:20       ` Pascal J. Bourguignon
@ 2008-10-07 23:54         ` Lennart Borgman (gmail)
       [not found]         ` <mailman.512.1223423709.25473.help-gnu-emacs@gnu.org>
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 24+ messages in thread
From: Lennart Borgman (gmail) @ 2008-10-07 23:54 UTC (permalink / raw
  To: Pascal J. Bourguignon; +Cc: help-gnu-emacs

Pascal J. Bourguignon wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> 
>> Pascal J. Bourguignon wrote:
>>> Nikolaj Schumacher <me@nschum.de> writes:
>>>
>>>> Mauricio <briqueabraque@yahoo.com> wrote:
>>>>
>>>>> I think this is simple, but I wasn't able
>>>>> to find it anywhere: how can I tell emacs
>>>>> I want to go to line x, column y?
>>>> `goto-line' and `move-to-column'
>>> They don't work ;-)
>>>
>>> If you don't believe me, try:
>>>
>>> RET C-u 40 M-x move-to-column RET
>> To increase your credibility please show how to reproduce it ;-)
> 
> Yes of course.  Just type again:
> 
> RET C-u 40 M-x move-to-column RET
> 
> and once more the cursor will stay on column 1.

It does not for me, even if the line is shorter than 40 chars. But I am
using the latest CVS version.

> Want to reproduce it yet another time?  No problem, just type again:
> 
> RET C-u 40 M-x move-to-column RET
> 
> and once more the cursor will stay on column 1.
> 
> 
>> More seriously, this might be a bug, but it works for me using CVS Emacs 23.
> 
> It's not a bug, it's a feature of move-to-column.  Hence my
> implementation of goto-xy.
> 
> 




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-07 20:54     ` Lennart Borgman (gmail)
@ 2008-10-08  0:00       ` Xavier Maillard
  0 siblings, 0 replies; 24+ messages in thread
From: Xavier Maillard @ 2008-10-08  0:00 UTC (permalink / raw
  To: Lennart Borgman (gmail); +Cc: pjb, help-gnu-emacs


   More seriously, this might be a bug, but it works for me using CVS Emacs 23.

Works too here with pretty recent CVS Emacs 23.

	Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
       [not found]         ` <mailman.512.1223423709.25473.help-gnu-emacs@gnu.org>
@ 2008-10-08  2:29           ` Chetan
  0 siblings, 0 replies; 24+ messages in thread
From: Chetan @ 2008-10-08  2:29 UTC (permalink / raw
  To: help-gnu-emacs

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> Pascal J. Bourguignon wrote:
>> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>> 
>>> Pascal J. Bourguignon wrote:
>>>> Nikolaj Schumacher <me@nschum.de> writes:
>>>>
>>>>> Mauricio <briqueabraque@yahoo.com> wrote:
>>>>>
>>>>>> I think this is simple, but I wasn't able
>>>>>> to find it anywhere: how can I tell emacs
>>>>>> I want to go to line x, column y?
>>>>> `goto-line' and `move-to-column'
>>>> They don't work ;-)
>>>>
>>>> If you don't believe me, try:
>>>>
>>>> RET C-u 40 M-x move-to-column RET
>>> To increase your credibility please show how to reproduce it ;-)
>> 
>> Yes of course.  Just type again:
>> 
>> RET C-u 40 M-x move-to-column RET
>> 
>> and once more the cursor will stay on column 1.
>
> It does not for me, even if the line is shorter than 40 chars. But I am
> using the latest CVS version.
>
>> Want to reproduce it yet another time?  No problem, just type again:
>> 
>> RET C-u 40 M-x move-to-column RET
>> 
>> and once more the cursor will stay on column 1.
>> 
>> 
>>> More seriously, this might be a bug, but it works for me using CVS Emacs 23.
>> 
>> It's not a bug, it's a feature of move-to-column.  Hence my
>> implementation of goto-xy.
>> 
I only have the released 22.3 and I find that it works as
advertised. The described behavior is what is expected, isn't it?
It looks like it may be possible to make it work the way it is
desired.

I don't know if there are any changes in 23.

Chetan


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-07 23:20       ` Pascal J. Bourguignon
  2008-10-07 23:54         ` Lennart Borgman (gmail)
       [not found]         ` <mailman.512.1223423709.25473.help-gnu-emacs@gnu.org>
@ 2008-10-08 14:22         ` Nikolaj Schumacher
       [not found]         ` <mailman.566.1223475737.25473.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 24+ messages in thread
From: Nikolaj Schumacher @ 2008-10-08 14:22 UTC (permalink / raw
  To: Pascal J. Bourguignon; +Cc: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
       [not found]         ` <mailman.566.1223475737.25473.help-gnu-emacs@gnu.org>
@ 2008-10-08 17:32           ` Pascal J. Bourguignon
  2008-10-08 18:54             ` Nikolaj Schumacher
                               ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Pascal J. Bourguignon @ 2008-10-08 17:32 UTC (permalink / raw
  To: help-gnu-emacs

Nikolaj Schumacher <me@nschum.de> writes:

> 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.

To me, it seems unlikely that the OP is using CVS emacs, given he had
to ask such a question.


> 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.

By now, it should be clear that it IS NOT, RIGHT NOW capable of doing
so, but WILL BE able to do it, when emacs 23.0 will be released.

In the current circumstances, what can be called a RE-IMPLEMENTATION
is actually the implementation of move-to-column found in CVS since it
obviously redo the same thing that the goto-xy I implemented years
ago.



Since  the OP didn't precise the version of his emacs, we're left with
an old implementation of goto-xy that worked on old emacs, current emacs and will
obviously continue working in future emacs, 

vs.

a new implementation of goto-xy that doesn't work on old emacs, and
current emacs.  Granted some time in the future it will work on emacs
23, but the OP didn't say he needed this function in six months either.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we. -- Georges W. Bush


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-08 17:32           ` Pascal J. Bourguignon
@ 2008-10-08 18:54             ` Nikolaj Schumacher
  2008-10-08 19:57             ` Mauricio
       [not found]             ` <mailman.605.1223492071.25473.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 24+ messages in thread
From: Nikolaj Schumacher @ 2008-10-08 18:54 UTC (permalink / raw
  To: Pascal J. Bourguignon; +Cc: help-gnu-emacs

pjb@informatimago.com (Pascal J. Bourguignon) wrote:

>> 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.
>
> By now, it should be clear that it IS NOT, RIGHT NOW capable of doing
> so, but WILL BE able to do it, when emacs 23.0 will be released.

What are you talking about?  I'm using Emacs 22 and it works "right
now".  Why would you even assume I'm talking about Emacs 23?


regards,
Nikolaj Schumacher




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-08 17:32           ` Pascal J. Bourguignon
  2008-10-08 18:54             ` Nikolaj Schumacher
@ 2008-10-08 19:57             ` Mauricio
       [not found]             ` <mailman.605.1223492071.25473.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 24+ messages in thread
From: Mauricio @ 2008-10-08 19:57 UTC (permalink / raw
  To: help-gnu-emacs

>>> 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.
> 
> To me, it seems unlikely that the OP is using CVS emacs, given he had
> to ask such a question.
> 

Actually, the OP is satisfied with 'goto-line' and
its binding M-g g that I found using Ctrl-h f :) But
I learned from this discussion, and thank for that.

Best,
Maurício





^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
       [not found]             ` <mailman.605.1223492071.25473.help-gnu-emacs@gnu.org>
@ 2008-10-08 20:00               ` Pascal J. Bourguignon
  2008-10-08 21:08                 ` Andreas Politz
                                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Pascal J. Bourguignon @ 2008-10-08 20:00 UTC (permalink / raw
  To: help-gnu-emacs

Nikolaj Schumacher <me@nschum.de> writes:

> pjb@informatimago.com (Pascal J. Bourguignon) wrote:
>
>>> 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.
>>
>> By now, it should be clear that it IS NOT, RIGHT NOW capable of doing
>> so, but WILL BE able to do it, when emacs 23.0 will be released.
>
> What are you talking about?  I'm using Emacs 22 and it works "right
> now".  Why would you even assume I'm talking about Emacs 23?

emacs-version "22.2.1"
             ^ C-u C-x C-e
(progn (move-to-column 79)(insert "x"))x
                                       ^ C-x C-e
It just doesn't work here.
Perhaps it depends on the major-mode, but I've never seen it work as
you say.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

PLEASE NOTE: Some quantum physics theories suggest that when the
consumer is not directly observing this product, it may cease to
exist or will exist only in a vague and undetermined state.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-08 20:00               ` Pascal J. Bourguignon
@ 2008-10-08 21:08                 ` Andreas Politz
  2008-10-08 21:15                 ` Nikolaj Schumacher
       [not found]                 ` <mailman.618.1223500557.25473.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 24+ messages in thread
From: Andreas Politz @ 2008-10-08 21:08 UTC (permalink / raw
  To: help-gnu-emacs

Pascal J. Bourguignon wrote:
> Nikolaj Schumacher <me@nschum.de> writes:
> 
>> pjb@informatimago.com (Pascal J. Bourguignon) wrote:
>>
>>>> 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.
>>> By now, it should be clear that it IS NOT, RIGHT NOW capable of doing
>>> so, but WILL BE able to do it, when emacs 23.0 will be released.
>> What are you talking about?  I'm using Emacs 22 and it works "right
>> now".  Why would you even assume I'm talking about Emacs 23?
> 
> emacs-version "22.2.1"
>              ^ C-u C-x C-e
> (progn (move-to-column 79)(insert "x"))x
>                                        ^ C-x C-e
> It just doesn't work here.
> Perhaps it depends on the major-mode, but I've never seen it work as
> you say.
> 

It depends on the second argument.

-ap


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-08 20:00               ` Pascal J. Bourguignon
  2008-10-08 21:08                 ` Andreas Politz
@ 2008-10-08 21:15                 ` Nikolaj Schumacher
       [not found]                 ` <mailman.618.1223500557.25473.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 24+ messages in thread
From: Nikolaj Schumacher @ 2008-10-08 21:15 UTC (permalink / raw
  To: Pascal J. Bourguignon; +Cc: help-gnu-emacs

pjb@informatimago.com (Pascal J. Bourguignon) wrote:

> emacs-version "22.2.1"
>              ^ C-u C-x C-e
> (progn (move-to-column 79)(insert "x"))x
>                                        ^ C-x C-e
> It just doesn't work here.
> Perhaps it depends on the major-mode, but I've never seen it work as
> you say.

Have you read or tried my code?

(progn (move-to-column 79 t) (insert "x"))
                          ^!

regards,
Nikolaj Schumacher




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
       [not found]                 ` <mailman.618.1223500557.25473.help-gnu-emacs@gnu.org>
@ 2008-10-08 21:36                   ` Pascal J. Bourguignon
  2008-10-09  2:42                   ` stan
  1 sibling, 0 replies; 24+ messages in thread
From: Pascal J. Bourguignon @ 2008-10-08 21:36 UTC (permalink / raw
  To: help-gnu-emacs

Nikolaj Schumacher <me@nschum.de> writes:

> pjb@informatimago.com (Pascal J. Bourguignon) wrote:
>
>> emacs-version "22.2.1"
>>              ^ C-u C-x C-e
>> (progn (move-to-column 79)(insert "x"))x
>>                                        ^ C-x C-e
>> It just doesn't work here.
>> Perhaps it depends on the major-mode, but I've never seen it work as
>> you say.
>
> Have you read or tried my code?
>
> (progn (move-to-column 79 t) (insert "x"))
>                           ^!

Ah! Right, it works better like this! :-)

Thanks,
-- 
__Pascal Bourguignon__                     http://www.informatimago.com/


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
       [not found]                 ` <mailman.618.1223500557.25473.help-gnu-emacs@gnu.org>
  2008-10-08 21:36                   ` Pascal J. Bourguignon
@ 2008-10-09  2:42                   ` stan
  2008-10-09  6:38                     ` Pascal J. Bourguignon
  1 sibling, 1 reply; 24+ messages in thread
From: stan @ 2008-10-09  2:42 UTC (permalink / raw
  To: help-gnu-emacs

Nikolaj Schumacher wrote:
>
>
> pjb@informatimago.com (Pascal J. Bourguignon) wrote:
>
>> emacs-version "22.2.1"
>>              ^ C-u C-x C-e
>> (progn (move-to-column 79)(insert "x"))x
>>                                        ^ C-x C-e
>> It just doesn't work here.
>> Perhaps it depends on the major-mode, but I've never seen it work as
>> you say.
>
> Have you read or tried my code?
>
> (progn (move-to-column 79 t) (insert "x"))

Just for another info point, that also works in 22.1.1. I don't know how
long it's been that way but I remember it from a couple of years ago. SO
it's not really a new feature.

** Posted from http://www.teranews.com **


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-09  2:42                   ` stan
@ 2008-10-09  6:38                     ` Pascal J. Bourguignon
  2008-10-09 22:49                       ` stan
  0 siblings, 1 reply; 24+ messages in thread
From: Pascal J. Bourguignon @ 2008-10-09  6:38 UTC (permalink / raw
  To: help-gnu-emacs

stan <smoore@exis.net> writes:

> Nikolaj Schumacher wrote:
>>
>>
>> pjb@informatimago.com (Pascal J. Bourguignon) wrote:
>>
>>> emacs-version "22.2.1"
>>>              ^ C-u C-x C-e
>>> (progn (move-to-column 79)(insert "x"))x
>>>                                        ^ C-x C-e
>>> It just doesn't work here.
>>> Perhaps it depends on the major-mode, but I've never seen it work as
>>> you say.
>>
>> Have you read or tried my code?
>>
>> (progn (move-to-column 79 t) (insert "x"))
>
> Just for another info point, that also works in 22.1.1. I don't know how
> long it's been that way but I remember it from a couple of years ago. SO
> it's not really a new feature.

Yes, it just a reminder to always read _entirely_ the doc of each
function, not just the first paragraph.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

COMPONENT EQUIVALENCY NOTICE: The subatomic particles (electrons,
protons, etc.) comprising this product are exactly the same in every
measurable respect as those used in the products of other
manufacturers, and no claim to the contrary may legitimately be
expressed or implied.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-09  6:38                     ` Pascal J. Bourguignon
@ 2008-10-09 22:49                       ` stan
  2008-10-09 23:43                         ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 24+ messages in thread
From: stan @ 2008-10-09 22:49 UTC (permalink / raw
  To: help-gnu-emacs

Pascal J. Bourguignon wrote:
>
>
> stan <smoore@exis.net> writes:
>
>> Nikolaj Schumacher wrote:
>>>
>>>
>>> pjb@informatimago.com (Pascal J. Bourguignon) wrote:
>>>
>>>> emacs-version "22.2.1"
>>>>              ^ C-u C-x C-e
>>>> (progn (move-to-column 79)(insert "x"))x
>>>>                                        ^ C-x C-e
>>>> It just doesn't work here.
>>>> Perhaps it depends on the major-mode, but I've never seen it work as
>>>> you say.
>>>
>>> Have you read or tried my code?
>>>
>>> (progn (move-to-column 79 t) (insert "x"))
>>
>> Just for another info point, that also works in 22.1.1. I don't know how
>> long it's been that way but I remember it from a couple of years ago. SO
>> it's not really a new feature.
>
> Yes, it just a reminder to always read _entirely_ the doc of each
> function, not just the first paragraph.

Been there, done that :) I'm almost ashamed to say how many times I saw
something on a man page that I would have bet cash money didn't exist.
As much as I want to say it's age related, the truth is less flattering.
>
** Posted from http://www.teranews.com **


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Going to line n, column m
  2008-10-09 22:49                       ` stan
@ 2008-10-09 23:43                         ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 24+ messages in thread
From: Lennart Borgman (gmail) @ 2008-10-09 23:43 UTC (permalink / raw
  To: stan; +Cc: help-gnu-emacs

>> Yes, it just a reminder to always read _entirely_ the doc of each
>> function, not just the first paragraph.
> 
> Been there, done that :) I'm almost ashamed to say how many times I saw
> something on a man page that I would have bet cash money didn't exist.
> As much as I want to say it's age related, the truth is less flattering.

Maybe use imagination like when learning new words in a foreign
language. "If it behaves like that I can use it for that and that ..."




^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2008-10-09 23:43 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-07 17:08 Going to line n, column m Mauricio
2008-10-07 20:32 ` Nikolaj Schumacher
     [not found] ` <mailman.498.1223411586.25473.help-gnu-emacs@gnu.org>
2008-10-07 20:38   ` Pascal J. Bourguignon
2008-10-07 20:52     ` Joost Kremers
2008-10-07 20:54     ` Lennart Borgman (gmail)
2008-10-08  0:00       ` Xavier Maillard
     [not found]     ` <mailman.501.1223412938.25473.help-gnu-emacs@gnu.org>
2008-10-07 23:20       ` Pascal J. Bourguignon
2008-10-07 23:54         ` Lennart Borgman (gmail)
     [not found]         ` <mailman.512.1223423709.25473.help-gnu-emacs@gnu.org>
2008-10-08  2:29           ` Chetan
2008-10-08 14:22         ` Nikolaj Schumacher
     [not found]         ` <mailman.566.1223475737.25473.help-gnu-emacs@gnu.org>
2008-10-08 17:32           ` Pascal J. Bourguignon
2008-10-08 18:54             ` Nikolaj Schumacher
2008-10-08 19:57             ` Mauricio
     [not found]             ` <mailman.605.1223492071.25473.help-gnu-emacs@gnu.org>
2008-10-08 20:00               ` Pascal J. Bourguignon
2008-10-08 21:08                 ` Andreas Politz
2008-10-08 21:15                 ` Nikolaj Schumacher
     [not found]                 ` <mailman.618.1223500557.25473.help-gnu-emacs@gnu.org>
2008-10-08 21:36                   ` Pascal J. Bourguignon
2008-10-09  2:42                   ` stan
2008-10-09  6:38                     ` Pascal J. Bourguignon
2008-10-09 22:49                       ` stan
2008-10-09 23:43                         ` Lennart Borgman (gmail)
     [not found] <mailman.476.1223399312.25473.help-gnu-emacs@gnu.org>
2008-10-07 17:23 ` Pascal J. Bourguignon
2008-10-07 18:43   ` Lennart Borgman (gmail)
     [not found]   ` <mailman.485.1223405182.25473.help-gnu-emacs@gnu.org>
2008-10-07 18:58     ` Pascal J. Bourguignon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).