From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: defadvice bug or something else? Date: Thu, 29 Apr 2021 14:55:42 +1000 Message-ID: References: <87fsz9swcf.fsf@gmail.com> <87h7jp4tnp.fsf@dick> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006b3bde05c1154fcf" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33474"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: dick.r.chiang@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 29 06:56:34 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lbyj3-0008cL-LE for ged-emacs-devel@m.gmane-mx.org; Thu, 29 Apr 2021 06:56:33 +0200 Original-Received: from localhost ([::1]:33970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbyj2-0003rt-Na for ged-emacs-devel@m.gmane-mx.org; Thu, 29 Apr 2021 00:56:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbyiT-0003Od-V6 for emacs-devel@gnu.org; Thu, 29 Apr 2021 00:55:57 -0400 Original-Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]:41606) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbyiS-0002Rl-09 for emacs-devel@gnu.org; Thu, 29 Apr 2021 00:55:57 -0400 Original-Received: by mail-oo1-xc2c.google.com with SMTP id d16-20020a4a3c100000b02901f0590a614eso6588418ooa.8 for ; Wed, 28 Apr 2021 21:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SzwrKoZKS+FN3lCMSlf599kTrcypoI0VaJiwWipIUfE=; b=bX5bRxdNPcFGSLC9I1z35AZI/Io735hPVttNP1utYTCW0TXQYqGEaDJskCL2LWSBwP ZYBvCGndYsTxiO4W33znvj2KPZTW8zGcqBgVI9pETups4Ojkj8dXARSkqpOtLB58xFBm FUma9PIZV8/WgyKV9NxBWnVrfVmsyBBt/iW8i1YfGxd1FUwClavcDg/358EONVckiaWZ U21kOQfkLcDcBDj+z8c3Bb090f6sP0Az5jr9R1VuQLMCU+0YTNrLsEU9xdd5BNy+ZfLx 8ymhxgfyAYE0OQWj0VMTp1mTM9CEUJAOusNNOCCj+y+BQyv2cG2zksV6TjwnmoUzvFoH 1xrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SzwrKoZKS+FN3lCMSlf599kTrcypoI0VaJiwWipIUfE=; b=RAbRY2pof9QrabWXdYWo7XI/cjsqTZPlFO5bT7j82saoaxk/W+AxoXMY4WOGmaUicL WZLshtEwmxoAspTmHPih5zkZFp7R9s761mIcb9o/iN6Gh4Sg4ulv5pQXiJ9fcEUPWy5/ hrUV05KQLzIjjK9me37L+XzlE5iOGQ+/oXw1t/SkI6+ELVMyNWmODzs2kyBUSVP4Rhau FclXIeC2tzGkKK74FDpjaT5Zo/A1YmDCS09mfbj91DpFoBx8h258+LDNJh/bzYjK5Sjl mMUhZNH5TBqJACk8ufGoWsmGyESaFbE1SnScjpFRB1rpVDu5OwjQF/M9DOhKe4hooZuR q8Mg== X-Gm-Message-State: AOAM532/KM0SLQ+WYXHywEEus4FyoodlYqThA7BESX96aU6LJbznLaNk 5PiEdf/gh324MuV825GigEllyXW0pmf9X96o0qs= X-Google-Smtp-Source: ABdhPJxLhfNeRGQUC3rn7RwnRfeCiFrOTezE3OsGw7YtfXURX/W57JkHvPFv7TCmalhAq31sOYdwPxPLBLp9NIg8geI= X-Received: by 2002:a4a:dc4e:: with SMTP id q14mr25817160oov.43.1619672154453; Wed, 28 Apr 2021 21:55:54 -0700 (PDT) In-Reply-To: <87h7jp4tnp.fsf@dick> Received-SPF: pass client-ip=2607:f8b0:4864:20::c2c; envelope-from=theophilusx@gmail.com; helo=mail-oo1-xc2c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:268600 Archived-At: --0000000000006b3bde05c1154fcf Content-Type: text/plain; charset="UTF-8" On Thu, 29 Apr 2021 at 14:11, 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 --0000000000006b3bde05c1154fcf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, 29 Apr 2021 at 14:11, <dick.r.chiang@gmail.com> wro= te:
You make it = so hard to help you, what with the syntactically erroneous code,
the hand-wavy minimum reproducible example, the verbiage, and the transposi= tion
of up versus down (C-v is scroll-up, not scroll-down).

I don't believe the code I posted was syntactically err= oneous at all. It might be the older style for defining advice, but it is s= till syntactically correct.=C2=A0

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

Yes, I did= refer to scroll down when talking about both C-v (scroll-up-command) and p= gDown (yes, formally it is called 'next' in Emacs, but on the keybo= ard the key is labelled pgDown). However, this is really just another examp= le of how terminology has changed. At any rate, I'm sure my 'verbia= ge' made the intention clear. Besides, the direction was irrelevant - t= he issue existed when scrolling in either direction and most people these d= ays talk about scrolling down when moving to the end and scrolling up when = moving to the beginning.=C2=A0

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

=C2=A0emacs -Q --eval=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0\
"(dolist (f (quote (scroll-up-command scroll-down-command)))=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \
=C2=A0 (add-function=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\
=C2=A0 =C2=A0:after (symbol-function f)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0\
=C2=A0 =C2=A0(lambda (&rest _args)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 \
=C2=A0 =C2=A0 =C2=A0(redisplay)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \
=C2=A0 =C2=A0 =C2=A0(princ (format \"wstart =3D %d,=C2=A0 wend =3D %d\= n\" (window-start) (window-end))=C2=A0 =C2=A0 \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (function external-debugging-outp= ut)))))"=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\
--eval "(save-excursion (apply (function insert) (mapcar (apply-partia= lly=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(function format) \"%d\n\&quo= t;) (number-sequence 1 1000))))"=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0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2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \
=C2=A0 =C2=A0(princ (format \"wstart =3D %d,=C2=A0 wend =3D %d\n\"= ; (window-start) (window-end))=C2=A0 =C2=A0 =C2=A0 \
=C2=A0 =C2=A0 =C2=A0(function external-debugging-output)))"=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \
--eval "(save-excursion (apply (function insert) (mapcar (apply-partia= lly=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(function format) \"%d\n\&quo= t;) (number-sequence 1 1000))))"=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0\
--eval "(progn (scroll-up-command) (tx-window) (scroll-up-command) (tx= -window)=C2=A0 =C2=A0 \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (scroll-down-command) (tx-window)= (scroll-down-command) (tx-window))" \
--eval "(kill-emacs)"


--
regards,

Tim

--
Tim Cross

--0000000000006b3bde05c1154fcf--