unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* shell-mode: point left in the wrong place after output
@ 2008-06-20  1:25 T. V. Raman
  2008-06-20  2:06 ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: T. V. Raman @ 2008-06-20  1:25 UTC (permalink / raw)
  To: emacs-devel

This is using the latest CVS  snapshot.

It looks like point gets left at the front of the inserted
outputfrom frm a shell command, rther than at the end.

Test:

See output below:
echo foo
foo
After the above, point is left before the 'f' of foo, rather than
after the subsequent shell prompt.

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs




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

* Re: shell-mode: point left in the wrong place after output
  2008-06-20  1:25 shell-mode: point left in the wrong place after output T. V. Raman
@ 2008-06-20  2:06 ` Stefan Monnier
  2008-06-20  3:40   ` T. V. Raman
  2008-06-20  8:15   ` Stephen Berman
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Monnier @ 2008-06-20  2:06 UTC (permalink / raw)
  To: raman; +Cc: emacs-devel

> This is using the latest CVS  snapshot.

I don't know what you mean by "CVS snapshot", but I'll assume you mean
that you recently updated your CVS check out.

> It looks like point gets left at the front of the inserted
> outputfrom frm a shell command, rther than at the end.

> Test:

> See output below:
> echo foo
> foo

I tried:

   emacs -Q
   M-x shell-mode RET
   echo foo RET

and it worked just fine, with point ending right after the prompt.
Can you provide a more precise recipe?


        Stefan




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

* Re: shell-mode: point left in the wrong place after output
  2008-06-20  2:06 ` Stefan Monnier
@ 2008-06-20  3:40   ` T. V. Raman
  2008-06-20 13:55     ` Stefan Monnier
  2008-06-20  8:15   ` Stephen Berman
  1 sibling, 1 reply; 7+ messages in thread
From: T. V. Raman @ 2008-06-20  3:40 UTC (permalink / raw)
  To: monnier; +Cc: raman, emacs-devel

Stephane --
cvs snapshot == latest checkout.

I'm seeing the problem with emacspeak running; the fact that you
dont see it in a vanilla session suggests that the new mods to
comint.el where you use copy-marker may be triggering a bug on
the emacspeak side.

I advice comint-output-filter to process the output -- but at
first check I didn't spot any reason why it should be breaking.



>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:
    >> This is using the latest CVS snapshot.
    Stefan> I don't know what you mean by "CVS snapshot", but
    Stefan> I'll assume you mean that you recently updated your
    Stefan> CVS check out.
    Stefan> 
    >> It looks like point gets left at the front of the inserted
    >> outputfrom frm a shell command, rther than at the end.
    Stefan> 
    >> Test:
    Stefan> 
    >> See output below: echo foo foo
    Stefan> 
    Stefan> I tried:
    Stefan> 
    Stefan>    emacs -Q M-x shell-mode RET echo foo RET
    Stefan> 
    Stefan> and it worked just fine, with point ending right
    Stefan> after the prompt.  Can you provide a more precise
    Stefan> recipe?
    Stefan> 
    Stefan> 
    Stefan>         Stefan

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs




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

* Re: shell-mode: point left in the wrong place after output
  2008-06-20  2:06 ` Stefan Monnier
  2008-06-20  3:40   ` T. V. Raman
@ 2008-06-20  8:15   ` Stephen Berman
  2008-06-20 13:12     ` T. V. Raman
  1 sibling, 1 reply; 7+ messages in thread
From: Stephen Berman @ 2008-06-20  8:15 UTC (permalink / raw)
  To: emacs-devel

On Thu, 19 Jun 2008 22:06:53 -0400 Stefan Monnier <monnier@iro.umontreal.ca> wrote:

>> This is using the latest CVS  snapshot.
>
> I don't know what you mean by "CVS snapshot", but I'll assume you mean
> that you recently updated your CVS check out.
>
>> It looks like point gets left at the front of the inserted
>> outputfrom frm a shell command, rther than at the end.
>
>> Test:
>
>> See output below:
>> echo foo
>> foo
>
> I tried:
>
>    emacs -Q
>    M-x shell-mode RET
>    echo foo RET
>
> and it worked just fine, with point ending right after the prompt.
> Can you provide a more precise recipe?

It happens with `C-u M-! echo foo'.  But IIUC this is supposed to
happen: in shell-command the mark is set before the output and after the
output is inserted point returns to the mark.  I suppose this is to
facilitate editing the shell command output?

Steve Berman





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

* Re: shell-mode: point left in the wrong place after output
  2008-06-20  8:15   ` Stephen Berman
@ 2008-06-20 13:12     ` T. V. Raman
  0 siblings, 0 replies; 7+ messages in thread
From: T. V. Raman @ 2008-06-20 13:12 UTC (permalink / raw)
  To: stephen.berman; +Cc: emacs-devel


So the behavior I'm seeing in the shell-mode buffer is identical
to what you report. 
I've not chased down the cause yet.

>>>>> "Stephen" == Stephen Berman <stephen.berman@gmx.net> writes:
    Stephen> On Thu, 19 Jun 2008 22:06:53 -0400 Stefan Monnier
    Stephen> <monnier@iro.umontreal.ca> wrote:
    >>> This is using the latest CVS snapshot.
    >> 
    >> I don't know what you mean by "CVS snapshot", but I'll
    >> assume you mean that you recently updated your CVS check
    >> out.
    >> 
    >>> It looks like point gets left at the front of the
    >>> inserted outputfrom frm a shell command, rther than at
    >>> the end.
    >> 
    >>> Test:
    >> 
    >>> See output below: echo foo foo
    >> 
    >> I tried:
    >> 
    >> emacs -Q M-x shell-mode RET echo foo RET
    >> 
    >> and it worked just fine, with point ending right after the
    >> prompt.  Can you provide a more precise recipe?
    Stephen> 
    Stephen> It happens with `C-u M-! echo foo'.  But IIUC this
    Stephen> is supposed to happen: in shell-command the mark is
    Stephen> set before the output and after the output is
    Stephen> inserted point returns to the mark.  I suppose this
    Stephen> is to facilitate editing the shell command output?
    Stephen> 
    Stephen> Steve Berman
    Stephen> 
    Stephen> 

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs




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

* Re: shell-mode: point left in the wrong place after output
  2008-06-20  3:40   ` T. V. Raman
@ 2008-06-20 13:55     ` Stefan Monnier
  2008-06-21  2:43       ` T. V. Raman
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2008-06-20 13:55 UTC (permalink / raw)
  To: raman; +Cc: emacs-devel

> I advice comint-output-filter to process the output -- but at
> first check I didn't spot any reason why it should be breaking.

The main change is that comint-output-filter does not use
insert-before-markers any more.  So if you use `save-excursion' around
it, point will now stay in front of the insertion.


        Stefan


>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> This is using the latest CVS snapshot.
Stefan> I don't know what you mean by "CVS snapshot", but
Stefan> I'll assume you mean that you recently updated your
Stefan> CVS check out.
Stefan> 
>>> It looks like point gets left at the front of the inserted
>>> outputfrom frm a shell command, rther than at the end.
Stefan> 
>>> Test:
Stefan> 
>>> See output below: echo foo foo
Stefan> 
Stefan> I tried:
Stefan> 
Stefan> emacs -Q M-x shell-mode RET echo foo RET
Stefan> 
Stefan> and it worked just fine, with point ending right
Stefan> after the prompt.  Can you provide a more precise
Stefan> recipe?
Stefan> 
Stefan> 
Stefan> Stefan

> -- 
> Best Regards,
> --raman

      
> Email:  raman@users.sf.net
> WWW:    http://emacspeak.sf.net/raman/
> AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
> PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
> Google: tv+raman 
> IRC:    irc://irc.freenode.net/#emacs





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

* Re: shell-mode: point left in the wrong place after output
  2008-06-20 13:55     ` Stefan Monnier
@ 2008-06-21  2:43       ` T. V. Raman
  0 siblings, 0 replies; 7+ messages in thread
From: T. V. Raman @ 2008-06-21  2:43 UTC (permalink / raw)
  To: monnier; +Cc: raman, emacs-devel

thanks for the tip, I definitely think this is the problem.

>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:
    >> I advice comint-output-filter to process the output -- but
    >> at first check I didn't spot any reason why it should be
    >> breaking.
    Stefan> 
    Stefan> The main change is that comint-output-filter does not
    Stefan> use insert-before-markers any more.  So if you use
    Stefan> `save-excursion' around it, point will now stay in
    Stefan> front of the insertion.
    Stefan> 
    Stefan> 
    Stefan>         Stefan
    Stefan> 
    Stefan> 
    >>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca>
    >>>>>> writes:
    >>>> This is using the latest CVS snapshot.
    Stefan> I don't know what you mean by "CVS snapshot", but
    Stefan> I'll assume you mean that you recently updated your
    Stefan> CVS check out.
    Stefan> 
    >>>> It looks like point gets left at the front of the
    >>>> inserted outputfrom frm a shell command, rther than at
    >>>> the end.
    Stefan> 
    >>>> Test:
    Stefan> 
    >>>> See output below: echo foo foo
    Stefan> 
    Stefan> I tried:
    Stefan> 
    Stefan> emacs -Q M-x shell-mode RET echo foo RET
    Stefan> 
    Stefan> and it worked just fine, with point ending right
    Stefan> after the prompt.  Can you provide a more precise
    Stefan> recipe?
    Stefan> 
    Stefan> 
    Stefan> Stefan
    Stefan> 
    >> -- 
> Best Regards, --raman
    Stefan> 
    Stefan>       
    >> Email: raman@users.sf.net WWW:
    >> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk:
    >> tv.raman.tv@gmail.com PGP:
    >> http://emacspeak.sf.net/raman/raman-almaden.asc Google:
    >> tv+raman IRC: irc://irc.freenode.net/#emacs

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs




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

end of thread, other threads:[~2008-06-21  2:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-20  1:25 shell-mode: point left in the wrong place after output T. V. Raman
2008-06-20  2:06 ` Stefan Monnier
2008-06-20  3:40   ` T. V. Raman
2008-06-20 13:55     ` Stefan Monnier
2008-06-21  2:43       ` T. V. Raman
2008-06-20  8:15   ` Stephen Berman
2008-06-20 13:12     ` T. V. Raman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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