unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: defadvice bug or something else?
Date: Thu, 29 Apr 2021 14:22:45 +1000	[thread overview]
Message-ID: <CAC=50j9CB4Bga-8bo5vUXN02xhZnHKcYQ0g4xWprREp85aV1hw@mail.gmail.com> (raw)
In-Reply-To: <jwvfsz9g827.fsf-monnier+emacs@gnu.org>

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

On Thu, 29 Apr 2021 at 12:07, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> >   `(defadvice ,f (after emacspeak pre act comp)
> >      (message "scroll advice: start = %d end = %d diff = %d"
> >               (window-start)
> >               (window-end)
> >               (- (window-end) (window-start))))))
>
> I think this may return outdated values for `window-end` because it is
> run before the window end position has been recomputed by redisplay.
> If that's not what you want, then you need to pass non-nil value for the
> `update` argument.
>
>
Thanks Stefan, you nailed it. That was exactly the problem. I should have
spotted it when I checked the docs for window-end.

regards,

Tim

--
Tim Cross

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

  parent reply	other threads:[~2021-04-29  4:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29  1:17 defadvice bug or something else? Tim Cross
2021-04-29  2:07 ` Stefan Monnier
2021-04-29  3:15   ` T.V Raman
2021-04-29  4:22   ` Tim Cross [this message]
2021-04-29  4:11 ` dick.r.chiang
2021-04-29  4:55   ` Tim Cross

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CAC=50j9CB4Bga-8bo5vUXN02xhZnHKcYQ0g4xWprREp85aV1hw@mail.gmail.com' \
    --to=theophilusx@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 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).