all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* annoying shell problem in GNU Emacs 22
@ 2008-05-19 12:05 rocksong23
  2008-05-19 21:17 ` Glenn Morris
  2008-05-21 17:36 ` Ivan Kanis
  0 siblings, 2 replies; 7+ messages in thread
From: rocksong23 @ 2008-05-19 12:05 UTC (permalink / raw
  To: help-gnu-emacs

Hi all,

I'm having an annoying problem with the shell mode in GNU emacs 22.1.1
which I haven't had in earlier versions (including emacs 21): if I
have more than a screenful in my shell buffer, then whenever I execute
a command, my window re-aligns so that the bottom of the buffer is at
the
bottom of the window.

In other words: I go to the command line at the end of the buffer, hit
ctrl-L (so that my command line is in the middle of my screen, where I
like it). Then when I hit return or execute a command, my command line
is suddenly at the bottom of my screen (where I don't like it).

Does that make sense? Like I said, it is really annoying. So if anyone
can point me to a setting to fix this, it'd be much appreciated.

--
Thanks, Peter


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

* Re: annoying shell problem in GNU Emacs 22
  2008-05-19 12:05 annoying shell problem in GNU Emacs 22 rocksong23
@ 2008-05-19 21:17 ` Glenn Morris
  2008-05-21 17:36 ` Ivan Kanis
  1 sibling, 0 replies; 7+ messages in thread
From: Glenn Morris @ 2008-05-19 21:17 UTC (permalink / raw
  To: help-gnu-emacs

rocksong23@fastmail.fm wrote:

> In other words: I go to the command line at the end of the buffer, hit
> ctrl-L (so that my command line is in the middle of my screen, where I
> like it). Then when I hit return or execute a command, my command line
> is suddenly at the bottom of my screen (where I don't like it).

Set the (buffer-local) variable comint-scroll-show-maximum-output to nil.


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

* Re: annoying shell problem in GNU Emacs 22
  2008-05-19 12:05 annoying shell problem in GNU Emacs 22 rocksong23
  2008-05-19 21:17 ` Glenn Morris
@ 2008-05-21 17:36 ` Ivan Kanis
  2008-05-22  2:13   ` Kevin Rodgers
       [not found]   ` <mailman.11991.1211422445.18990.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 7+ messages in thread
From: Ivan Kanis @ 2008-05-21 17:36 UTC (permalink / raw
  To: help-gnu-emacs

rocksong23@fastmail.fm writes:

> Does that make sense? Like I said, it is really annoying. So if anyone
> can point me to a setting to fix this, it'd be much appreciated.

Remove the function comint-postoutput-scroll-to-bottom from the list
in the variable comint-output-filter-functions:

(setq comint-output-filter-functions '(comint-watch-for-password-prompt))
-- 
Ivan
http://kanis.fr

There's no correct way to write Perl. A Perl script is correct if it's
halfway readable and gets the job done before your boss fires you.
    -- Anonymous , Programming Perl 





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

* Re: annoying shell problem in GNU Emacs 22
  2008-05-21 17:36 ` Ivan Kanis
@ 2008-05-22  2:13   ` Kevin Rodgers
       [not found]   ` <mailman.11991.1211422445.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Kevin Rodgers @ 2008-05-22  2:13 UTC (permalink / raw
  To: help-gnu-emacs

Ivan Kanis wrote:
> rocksong23@fastmail.fm writes:
> 
>> Does that make sense? Like I said, it is really annoying. So if anyone
>> can point me to a setting to fix this, it'd be much appreciated.
> 
> Remove the function comint-postoutput-scroll-to-bottom from the list
> in the variable comint-output-filter-functions:
> 
> (setq comint-output-filter-functions '(comint-watch-for-password-prompt))

Argh.

(remove-hook 'comint-output-filter-functions 
'comint-postoutput-scroll-to-bottom)

-- 
Kevin Rodgers
Denver, Colorado, USA





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

* Re: annoying shell problem in GNU Emacs 22
       [not found]   ` <mailman.11991.1211422445.18990.help-gnu-emacs@gnu.org>
@ 2008-05-22 13:16     ` rocksong23
  2008-05-22 23:54       ` rocksong23
  0 siblings, 1 reply; 7+ messages in thread
From: rocksong23 @ 2008-05-22 13:16 UTC (permalink / raw
  To: help-gnu-emacs

On May 22, 11:13 am, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote:
> Ivan Kanis wrote:
> > rockson...@fastmail.fm writes:
>
> >> Does that make sense? Like I said, it is really annoying. So if anyone
> >> can point me to a setting to fix this, it'd be much appreciated.
>
> > Remove the function comint-postoutput-scroll-to-bottom from the list
> > in the variable comint-output-filter-functions:
>
> > (setq comint-output-filter-functions '(comint-watch-for-password-prompt))
>
> Argh.
>
> (remove-hook 'comint-output-filter-functions
> 'comint-postoutput-scroll-to-bottom)
>
> --
> Kevin Rodgers
> Denver, Colorado, USA



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

* Re: annoying shell problem in GNU Emacs 22
  2008-05-22 13:16     ` rocksong23
@ 2008-05-22 23:54       ` rocksong23
  2008-05-23  4:00         ` Kevin Rodgers
  0 siblings, 1 reply; 7+ messages in thread
From: rocksong23 @ 2008-05-22 23:54 UTC (permalink / raw
  To: help-gnu-emacs

Not sure what happened with my last reply, but Kevin's fix worked
best, i.e.:

(remove-hook 'comint-output-filter-functions
'comint-postoutput-scroll-to-bottom)

(Glenn's fix [Set the (buffer-local) variable comint-scroll-show-
maximum-output to nil] worked but had to be applied to every shell
buffer).

Thanks to all who replied.

--
Peter


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

* Re: annoying shell problem in GNU Emacs 22
  2008-05-22 23:54       ` rocksong23
@ 2008-05-23  4:00         ` Kevin Rodgers
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin Rodgers @ 2008-05-23  4:00 UTC (permalink / raw
  To: help-gnu-emacs

rocksong23@fastmail.fm wrote:
> Not sure what happened with my last reply, but Kevin's fix worked
> best, i.e.:
> 
> (remove-hook 'comint-output-filter-functions
> 'comint-postoutput-scroll-to-bottom)
> 
> (Glenn's fix [Set the (buffer-local) variable comint-scroll-show-
> maximum-output to nil] worked but had to be applied to every shell
> buffer).

That's what shell-mode-hook is for.

Applying that selectivity to Ivan's solution (which I modified):

(add-hook 'shell-mode-hook
	  (lambda ()
	    (remove-hook 'comint-output-filter-functions
			 'comint-postoutput-scroll-to-bottom
			 t)))		; LOCAL

-- 
Kevin Rodgers
Denver, Colorado, USA





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

end of thread, other threads:[~2008-05-23  4:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-19 12:05 annoying shell problem in GNU Emacs 22 rocksong23
2008-05-19 21:17 ` Glenn Morris
2008-05-21 17:36 ` Ivan Kanis
2008-05-22  2:13   ` Kevin Rodgers
     [not found]   ` <mailman.11991.1211422445.18990.help-gnu-emacs@gnu.org>
2008-05-22 13:16     ` rocksong23
2008-05-22 23:54       ` rocksong23
2008-05-23  4:00         ` Kevin Rodgers

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.