all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Laurence Warne <laurencewarne@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 60381@debbugs.gnu.org
Subject: bug#60381: [PATCH] Preserve Window Position with Proced
Date: Thu, 29 Dec 2022 12:52:20 +0000	[thread overview]
Message-ID: <CAE2oLqgjM4fd5ns_cC+5fG3RyntE2qm8Bkhpbh+cYaRocrQnPQ@mail.gmail.com> (raw)
In-Reply-To: <83pmc291xe.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1680 bytes --]

I've logged the buffer and window point at certain lines (most important is
before/after erase-buffer on line 1911) in a few run throughs of
proced-update, first when the selected window displays a proced buffer:

before update: window point: 20121, buffer point: 20121
after goto-char min: window point: 1, buffer point: 1
before erase buffer: window point: 1, buffer point: 1
after erase buffer: window point: 1, buffer point: 1
after update: window point: 20121, buffer point: 20121

So this is expected since buffer point always mirrors window point for the
selected window's displayed buffer.  Next, when the selected window doesn't
display a proced buffer, but there does exist a window displaying a proced
buffer (the window point logged corresponds to the window point of the
window containing the proced buffer):

before update: window point: 20235, buffer point: 20235
after goto-char min: window point: 20235, buffer point: 1
before erase buffer: window point: 20235, buffer point: 1
after erase buffer: window point: 1, buffer point: 1
after update: window point: 1, buffer point: 20235

So my understanding is since the selected window does not display a proced
buffer, the window point is not updated in line with the buffer point, but
the erase-buffer call sets the window point to start of the buffer, and so
this is not updated in line with the buffer point in the subsequent
insertion of processes.

The last case (the second issue) where no window shows a proced buffer is
similar to the previous, but erase buffer instead appears to set pos for
the proced buffer's value in (window-prev-buffers) if it's the case a
window has shown a proced buffer previously.

[-- Attachment #2: Type: text/html, Size: 1882 bytes --]

  reply	other threads:[~2022-12-29 12:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28 15:55 bug#60381: [PATCH] Preserve Window Position with Proced Laurence Warne
2022-12-28 17:14 ` Eli Zaretskii
2022-12-28 20:30   ` Laurence Warne
2022-12-29  6:09     ` Eli Zaretskii
2022-12-29 12:52       ` Laurence Warne [this message]
2022-12-29 14:09         ` Eli Zaretskii
     [not found]           ` <CAE2oLqh5i-fFVeYwyRufWhFZzrxDCfO+VrWFpe3tRLW9OJKUbg@mail.gmail.com>
2022-12-29 17:37             ` Eli Zaretskii
2023-01-05 15:59               ` Laurence Warne
2023-01-07  9:28                 ` Eli Zaretskii
2023-01-07 11:58                   ` Laurence Warne
2023-01-07 13:28                     ` Eli Zaretskii
2023-01-07 17:23                       ` Laurence Warne
2023-01-14  8:40                         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAE2oLqgjM4fd5ns_cC+5fG3RyntE2qm8Bkhpbh+cYaRocrQnPQ@mail.gmail.com \
    --to=laurencewarne@gmail.com \
    --cc=60381@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.