Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.misc > #23654

Re: on Gnus

From Julieta Shem <jshem@yaxenu.org>
Newsgroups comp.misc
Subject Re: on Gnus
Date 2023-12-10 13:19 -0300
Organization A noiseless patient Spider
Message-ID <875y16jait.fsf@yaxenu.org> (permalink)
References (12 earlier) <87y1e68qj0.fsf@enoch.nodomain.nowhere> <87edfxmtnp.fsf@yaxenu.org> <87bkazlnye.fsf@jmertens.eternal-september.org> <87cyvek05a.fsf@yaxenu.org> <8734wal344.fsf@jmertens.eternal-september.org>

Show all headers | View raw


Joerg Mertens <joerg-mertens@t-online.de> writes:

> Julieta Shem <jshem@yaxenu.org> writes:
>
>> Joerg Mertens <joerg-mertens@t-online.de> writes:
>>
>>> Julieta Shem <jshem@yaxenu.org> writes:
>>>
>>>> Speaking of which, here's something very annoying about the Python
>>>> REPL
>>>> on the GNU EMACS --- it keeps the prompt at the bottom of the
>>>> window.
>>>> If you C-l so that you move it to the middle of the screen, it goes
>>>> there, but type another expression and RET and it moves again to
>>>> the
>>>> bottom.  (``Who told you to scroll?'')
>>>
>>> There are two variables with which you can change this behaviour:
>>>
>>> comint-scroll-to-bottom-on-output and
>>> comint-scroll-to-bottom-on-input
>>>
>>> I guess you want to setq them to nil.
>>
>> It does look like I want to set them to nil, but so far no effect on
>> the
>> *Python* buffer, having closed it restarted it.  (Thanks!)
>
> You're right. The variables that works here (for shell mode, at least) is
>
> comint-scroll-show-maximum-output
>
> I also set the other two but they default to nil anyway so
> they dont't change anything.

A little reflection shows that the motion is relative to the window.
It's seems more like the effect of (recenter -1).  Evaluate this
function on your GNU EMACS.  It'll recenter your buffer moving your
point to the base of the window.

We could now read the Python mode and see whether it recenters at any
point in the code.  Indeed, we find...

--8<---------------cut here---------------start------------->8---
(defun python-comint-postoutput-scroll-to-bottom (output)
  "Faster version of `comint-postoutput-scroll-to-bottom'.
Avoids `recenter' calls until OUTPUT is completely sent."
  (when (and (not (string= "" output))
             (python-shell-comint-end-of-output-p
              (ansi-color-filter-apply output)))
    (comint-postoutput-scroll-to-bottom output))
  output)

(defun comint-postoutput-scroll-to-bottom (_string)
  "Go to the end of buffer in some or all windows showing it.
Do not scroll if the current line is the last line in the buffer.
Depends on the value of `comint-move-point-for-output' and
`comint-scroll-show-maximum-output'.

This function should be in the list `comint-output-filter-functions'."
  (let* ((current (current-buffer))
	 (process (get-buffer-process current)))
    (unwind-protect
	(cond
	 ((null process))
	 ((bound-and-true-p follow-mode)
	  (follow-comint-scroll-to-bottom))
	 (t
          (dolist (w (get-buffer-window-list current nil t))
            (comint-adjust-window-point w process)
            ;; Optionally scroll to the bottom of the window.
            (and comint-scroll-show-maximum-output
                 (eq (window-point w) (point-max))
                 (with-selected-window w
                   (recenter (- -1 scroll-margin)))))))
      (set-buffer current))))
--8<---------------cut here---------------end--------------->8---

So the culprit is comint-scroll-show-maximum-output.  I get what I like
with

  (setq comint-scroll-show-maximum-output nil).

Thank you so much.

Back to comp.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Recent spam on  comp.lang.c (was Re: bart again (UCX64)) Spiros Bousbouras <spibou@gmail.com> - 2023-09-08 12:22 +0000
  Re: Recent spam on  comp.lang.c (was Re: bart again (UCX64)) Dan Purgert <dan@djph.net> - 2023-09-08 13:32 +0000
    Re: Recent spam on comp.lang.c (was Re: bart again (UCX64)) candycanearter07 <no@thanks.net> - 2023-09-08 08:36 -0500
      Re: Recent spam on comp.lang.c (was Re: bart again (UCX64)) Dan Purgert <dan@djph.net> - 2023-09-08 14:06 +0000
        Re: Recent spam on comp.lang.c (was Re: bart again (UCX64)) candycanearter07 <no@thanks.net> - 2023-09-08 18:32 -0500
          Re: Recent spam on comp.lang.c snipeco.2@gmail.com (Sn!pe) - 2023-09-09 09:42 +0100
          Re: Recent spam on comp.lang.c (was Re: bart again (UCX64)) Anton Shepelev <anton.txt@gmail.moc> - 2023-09-09 13:54 +0300
            Re: Recent spam on comp.lang.c snipeco.2@gmail.com (Sn!pe) - 2023-09-09 12:10 +0100
              Re: Recent spam on comp.lang.c candycanearter07 <no@thanks.net> - 2023-09-09 16:04 -0500
                Re: Recent spam on comp.lang.c snipeco.2@gmail.com (Sn!pe) - 2023-09-09 22:33 +0100
                Re: Recent spam on comp.lang.c Lafe <lafe@lafes.invalid> - 2023-09-11 03:23 +0000
  How to change the Subject of a Usenet article (Was: Re: Recent spam on  comp.lang.c) snipeco.2@gmail.com (Sn!pe) - 2023-09-08 15:50 +0100
    Re: How to change the Subject of a Usenet article (Was: Re: Recent spam on comp.lang.c) candycanearter07 <no@thanks.net> - 2023-09-08 18:27 -0500
      Re: How to change the Subject of a Usenet article snipeco.2@gmail.com (Sn!pe) - 2023-09-09 09:57 +0100
        Re: How to change the Subject of a Usenet article candycanearter07 <no@thanks.net> - 2023-09-09 15:54 -0500
          Re: How to change the Subject of a Usenet article Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-09-09 22:08 +0100
            Re: How to change the Subject of a Usenet article candycanearter07 <no@thanks.net> - 2023-09-09 16:18 -0500
              Re: How to change the Subject of a Usenet article Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-09-09 22:57 +0100
                Re: How to change the Subject of a Usenet article candycanearter07 <no@thanks.net> - 2023-09-09 17:14 -0500
                Re: How to change the Subject of a Usenet article Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-09-09 23:36 +0100
                Re: How to change the Subject of a Usenet article candycanearter07 <no@thanks.net> - 2023-09-09 17:38 -0500
            on Gnus (Was: Re: How to change the Subject of a Usenet article) Julieta Shem <jshem@yaxenu.org> - 2023-12-03 13:09 -0300
              Re: on Gnus (Was: Re: How to change the Subject of a Usenet article) Mike Spencer <mds@bogus.nodomain.nowhere> - 2023-12-07 02:39 -0400
                Re: on Gnus yeti <yeti@tilde.institute> - 2023-12-07 14:39 +0000
                Re: on Gnus Julieta Shem <jshem@yaxenu.org> - 2023-12-07 21:26 -0300
                Re: on Gnus yeti <yeti@tilde.institute> - 2023-12-08 01:04 +0000
                Re: on Gnus yeti <yeti@tilde.institute> - 2023-12-08 01:43 +0000
                Re: on Gnus Julieta Shem <jshem@yaxenu.org> - 2023-12-07 21:20 -0300
                Re: on Gnus Joerg Mertens <joerg-mertens@t-online.de> - 2023-12-09 10:33 +0100
                Re: on Gnus Julieta Shem <jshem@yaxenu.org> - 2023-12-10 04:05 -0300
                Re: on Gnus Joerg Mertens <joerg-mertens@t-online.de> - 2023-12-10 12:16 +0100
                Re: on Gnus Julieta Shem <jshem@yaxenu.org> - 2023-12-10 13:19 -0300
          Re: How to change the Subject of a Usenet article Rich <rich@example.invalid> - 2023-09-09 21:28 +0000
            Re: How to change the Subject of a Usenet article candycanearter07 <no@thanks.net> - 2023-09-09 16:29 -0500
            Re: How to change the Subject of a Usenet article Spiros Bousbouras <spibou@gmail.com> - 2023-09-10 08:24 +0000
              Re: How to change the Subject of a Usenet article issdr <p_u_n_k_i_n_d@yahoo.it> - 2023-09-10 11:04 +0200
                on noffle and leafnode (Was: Re: How to change the Subject of a Usenet article) Julieta Shem <jshem@yaxenu.org> - 2023-12-03 13:11 -0300
              Re: How to change the Subject of a Usenet article candycanearter07 <no@thanks.net> - 2023-09-10 10:19 -0500
                Re: How to change the Subject of a Usenet article De ongekruisigde <ongekruisigde@news.eternal-september.org> - 2023-09-10 15:49 +0000
                Re: How to change the Subject of a Usenet article Dan Purgert <dan@djph.net> - 2023-09-11 07:46 +0000
            Re: How to change the Subject of a Usenet article rdh <rdh@tilde.institute> - 2023-09-11 11:24 -0500
    Re: How to change the Subject of a Usenet article (Was: Re: Recent spam on  comp.lang.c) Kaz Kylheku <864-117-4973@kylheku.com> - 2023-09-09 03:16 +0000
      Re: How to change the Subject of a Usenet article snipeco.2@gmail.com (Sn!pe) - 2023-09-09 09:57 +0100
        Re: How to change the Subject of a Usenet article Kaz Kylheku <864-117-4973@kylheku.com> - 2023-09-09 15:10 +0000
          Re: How to change the Subject of a Usenet article snipeco.2@gmail.com (Sn!pe) - 2023-09-09 16:26 +0100
  on writing subject lines (Was: Re: Recent spam on comp.lang.c) Julieta Shem <jshem@yaxenu.org> - 2023-12-03 13:01 -0300
    Re: on writing subject lines (Was: Re: Recent spam on comp.lang.c) Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2023-12-03 16:39 +0000
      Re: on writing subject lines Julieta Shem <jshem@yaxenu.org> - 2023-12-03 14:05 -0300
      Re: on writing subject lines (Was: Re: Recent spam on comp.lang.c) candycanearter07 <no@thanks.net> - 2023-12-03 14:42 -0600
        Re: on writing subject lines (Was: Re: Recent spam on comp.lang.c) kludge@panix.com (Scott Dorsey) - 2023-12-04 23:46 +0000
          Re: on writing subject lines (Was: Re: Recent spam on comp.lang.c) Julieta Shem <jshem@yaxenu.org> - 2023-12-05 14:53 -0300
            Re: on writing subject lines Julieta Shem <jshem@yaxenu.org> - 2023-12-05 15:25 -0300
              Re: on writing subject lines scott@slp53.sl.home (Scott Lurndal) - 2023-12-05 19:33 +0000
    Re: on writing subject lines (Was: Re: Recent spam on comp.lang.c) Vir Campestris <vir.campestris@invalid.invalid> - 2023-12-03 21:29 +0000
      Re: on writing subject lines Julieta Shem <jshem@yaxenu.org> - 2023-12-04 20:34 -0300
        Re: on writing subject lines Grant Taylor <gtaylor@tnetconsulting.net> - 2023-12-05 14:18 -0600
          Re: on writing subject lines Julieta Shem <jshem@yaxenu.org> - 2023-12-05 18:22 -0300
            Re: on writing subject lines scott@slp53.sl.home (Scott Lurndal) - 2023-12-05 21:36 +0000
              Re: on writing subject lines Grant Taylor <gtaylor@tnetconsulting.net> - 2023-12-05 15:46 -0600
            Re: on writing subject lines Grant Taylor <gtaylor@tnetconsulting.net> - 2023-12-05 15:45 -0600
              Re: on writing subject lines Julieta Shem <jshem@yaxenu.org> - 2023-12-05 19:10 -0300
                Re: on writing subject lines Julio Di Egidio <julio@diegidio.name> - 2023-12-05 22:15 -0800
            Re: on writing subject lines Dan Purgert <dan@djph.net> - 2023-12-05 21:45 +0000
            Re: on writing subject lines Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-12-05 14:40 -0800
            Re: on writing subject lines Jan van den Broek <balglaas@dds.nl> - 2023-12-06 06:54 +0000
              Re: on writing subject lines Julio Di Egidio <julio@diegidio.name> - 2023-12-05 23:19 -0800

csiph-web