all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: dick.r.chiang@gmail.com
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: defadvice bug or something else?
Date: Thu, 29 Apr 2021 14:55:42 +1000	[thread overview]
Message-ID: <CAC=50j_uhyk01BK+MKzp+YXG2Tstv84vyb71u5TKf=JvYD0syA@mail.gmail.com> (raw)
In-Reply-To: <87h7jp4tnp.fsf@dick>

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

On Thu, 29 Apr 2021 at 14:11, <dick.r.chiang@gmail.com> wrote:

> You make it so hard to help you, what with the syntactically erroneous
> code,
> the hand-wavy minimum reproducible example, the verbiage, and the
> transposition
> of up versus down (C-v is scroll-up, not scroll-down).
>

I don't believe the code I posted was syntactically erroneous at all. It
might be the older style for defining advice, but it is still syntactically
correct.

As to hand wavy minimal reproducible example, I find it far easier to read
than what you have presented, plus your code seems heavy handed with
multiple calls to force redisplay when all that was actually required was
to add the 'update switch to the call to window-end.

Yes, I did refer to scroll down when talking about both C-v
(scroll-up-command) and pgDown (yes, formally it is called 'next' in Emacs,
but on the keyboard the key is labelled pgDown). However, this is really
just another example of how terminology has changed. At any rate, I'm sure
my 'verbiage' made the intention clear. Besides, the direction was
irrelevant - the issue existed when scrolling in either direction and most
people these days talk about scrolling down when moving to the end and
scrolling up when moving to the beginning.

Should you find any of my future posts as frustrating, you can of course
just ignore them. I really don't. mind

 emacs -Q --eval
       \

> "(dolist (f (quote (scroll-up-command scroll-down-command)))
>         \
>   (add-function
>        \
>    :after (symbol-function f)
>        \
>    (lambda (&rest _args)
>         \
>      (redisplay)
>         \
>      (princ (format \"wstart = %d,  wend = %d\n\" (window-start)
> (window-end))    \
>             (function external-debugging-output)))))"
>        \
> --eval "(save-excursion (apply (function insert) (mapcar (apply-partially
>        \
>            (function format) \"%d\n\") (number-sequence 1 1000))))"
>        \
> --eval "(progn (scroll-up-command) (scroll-up-command)
> (scroll-down-command)      \
>            (scroll-down-command))"
>         \
> --eval "(kill-emacs)"
>
> emacs -Q --eval
>        \
> "(defun tx-window ()
>         \
>    (redisplay)
>         \
>    (princ (format \"wstart = %d,  wend = %d\n\" (window-start)
> (window-end))      \
>      (function external-debugging-output)))"
>         \
> --eval "(save-excursion (apply (function insert) (mapcar (apply-partially
>        \
>            (function format) \"%d\n\") (number-sequence 1 1000))))"
>        \
> --eval "(progn (scroll-up-command) (tx-window) (scroll-up-command)
> (tx-window)    \
>             (scroll-down-command) (tx-window) (scroll-down-command)
> (tx-window))" \
> --eval "(kill-emacs)"
>


-- 
regards,

Tim

--
Tim Cross

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

      reply	other threads:[~2021-04-29  4:55 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
2021-04-29  4:11 ` dick.r.chiang
2021-04-29  4:55   ` Tim Cross [this message]

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='CAC=50j_uhyk01BK+MKzp+YXG2Tstv84vyb71u5TKf=JvYD0syA@mail.gmail.com' \
    --to=theophilusx@gmail.com \
    --cc=dick.r.chiang@gmail.com \
    --cc=emacs-devel@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.