all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Morgan Smith <Morgan.J.Smith@outlook.com>
To: Jim Porter <jporterbugs@gmail.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, johnw@gnu.org, 57367@debbugs.gnu.org
Subject: bug#57367: [PATCH] Speed up em-smart
Date: Mon, 05 Sep 2022 17:48:09 -0400	[thread overview]
Message-ID: <DM5PR03MB31639EE4FB0B119C2704444CC57F9@DM5PR03MB3163.namprd03.prod.outlook.com> (raw)
In-Reply-To: <9257e0e5-232e-7e20-f4d1-385066c4337e@gmail.com> (Jim Porter's message of "Mon, 5 Sep 2022 12:01:21 -0700")


Hello,

Jim Porter <jporterbugs@gmail.com> writes:

>   ;; @ While output is being generated from a command, the window will
>   ;;   be constantly reconfigured (until it would otherwise make no
>   ;;   difference) in order to always show you the most output from the
>   ;;   command possible.  This happens if you change window sizes,
>   ;;   scroll, etc.

Yep the window is constantly reconfigured and that remains true even
with all the stuff I removed.  I only removed stuff which forced a
redisplay.  From what I can tell, we don't need to force redisplays as
everything shows up just fine.  If I did my job correctly (which I
didn't, see below) then there is zero change to the logic and user
experience.


That being said I have discovered one bug in my patch.  I use this
little tid bit to determine if I should scroll or not in the
eshell-output-filter-functions hook.

"(when (eq (window-buffer (selected-window)) (current-buffer)) <logic here>)"

Whereas the previous code used this logic in a few hooks:

(walk-windows
 (lambda (wind)
   (with-current-buffer (window-buffer wind)
     (if eshell-mode
         <logic here>)))
 0 frame)


My code prevents the hook from being run on buffers that aren't the
eshell buffer (no clue how but it does) but it doesn't allow the hook to
run if the window isn't selected.  The old code seems very complicated
though and will scroll all eshell buffers.

Is there a good way to ensure a hook is performed only on the buffer
that it was installed to?


Thanks,

Morgan





  reply	other threads:[~2022-09-05 21:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23 20:06 bug#57367: [PATCH] Speed up em-smart Morgan Smith
2022-09-04 21:56 ` Lars Ingebrigtsen
2022-09-05 19:01   ` Jim Porter
2022-09-05 21:48     ` Morgan Smith [this message]
2022-09-05 21:51       ` Lars Ingebrigtsen
     [not found]         ` <DM5PR03MB31639CBC75F62622AC4E70ABC57E9@DM5PR03MB3163.namprd03.prod.outlook.com>
2022-09-06 10:00           ` Lars Ingebrigtsen
2022-09-07  1:30             ` bug#57367: [PATCH V2] " Morgan Smith
2022-09-07 12:55               ` Lars Ingebrigtsen
2022-09-09  4:36               ` Jim Porter
2023-09-06 22:46                 ` bug#57367: [PATCH] " Stefan Kangas
2023-10-18 15:46                   ` bug#57367: [PATCH v3] " Morgan Smith
2023-10-28 22:47                     ` Jim Porter

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=DM5PR03MB31639EE4FB0B119C2704444CC57F9@DM5PR03MB3163.namprd03.prod.outlook.com \
    --to=morgan.j.smith@outlook.com \
    --cc=57367@debbugs.gnu.org \
    --cc=johnw@gnu.org \
    --cc=jporterbugs@gmail.com \
    --cc=larsi@gnus.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.