X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Keith David Bershatsky <esq@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 03 Jun 2014 17:50:01 +0000 Resent-Message-ID: <handler.17678.B.140181776518959 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 17678 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.140181776518959 (code B ref -1); Tue, 03 Jun 2014 17:50:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jun 2014 17:49:25 +0000 Received: from localhost ([127.0.0.1]:42481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1Wrspw-0004vi-7E for submit <at> debbugs.gnu.org; Tue, 03 Jun 2014 13:49:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60803) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <esq@HIDDEN>) id 1Wrsps-0004vJ-KA for submit <at> debbugs.gnu.org; Tue, 03 Jun 2014 13:49:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <esq@HIDDEN>) id 1Wrspg-0000wT-Vc for submit <at> debbugs.gnu.org; Tue, 03 Jun 2014 13:49:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=AC_HTML_NONSENSE_TAGS, BAYES_50, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <esq@HIDDEN>) id 1Wrspg-0000wP-Rh for submit <at> debbugs.gnu.org; Tue, 03 Jun 2014 13:49:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <esq@HIDDEN>) id 1Wrspb-00081Z-62 for bug-gnu-emacs@HIDDEN; Tue, 03 Jun 2014 13:49:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <esq@HIDDEN>) id 1WrspV-0000tR-HQ for bug-gnu-emacs@HIDDEN; Tue, 03 Jun 2014 13:49:03 -0400 Received: from cobb.liquidweb.com ([50.28.13.150]:58630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <esq@HIDDEN>) id 1WrspV-0000tF-83 for bug-gnu-emacs@HIDDEN; Tue, 03 Jun 2014 13:48:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date; bh=OqDUSxByyRAEznRw/PkiSkB57C6vdNpBWQ3dSpt3LHA=; b=4PhqyoiAP1I5lWy0RF9jy5EJAU6Y7x2IpkIQ/7sAEqA7aBNqxbU17V09mrlwPJhEHNa0uubXWwgpat9TI4kXrwJMM25IqTch6Vqpbb0hDHgkN515BpmonywUzOYpANVb; Received: from cpe-75-85-5-102.socal.res.rr.com ([75.85.5.102]:50256 helo=MP.local) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from <esq@HIDDEN>) id 1WrspR-0008Nd-DS for bug-gnu-emacs@HIDDEN; Tue, 03 Jun 2014 13:48:53 -0400 Date: Tue, 03 Jun 2014 10:48:54 -0700 Message-ID: <m2ppiphojd.wl%esq@HIDDEN> From: Keith David Bershatsky <esq@HIDDEN> User-Agent: / () / () APEL/10.8 Emacs/24.4.50 (x86_64-apple-darwin10.8.0) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: lawlist|lawlist.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) At the present time, I do not believe that Emacs has the ability to calculate a new `window-start` and a new `window-end` without a redisplay occurring, because it needs to take into account things like the new cursor position, `visual-line-mode`, `linenum-mode`, etc. Functions assigned to the `post-command-hook` use the `window-start` and `window-end` positions that were previously visible before a new redisplay occurs. Example: * Long buffer of text that exceeds the `window-height`. * Jump interactively from `beginning-of-buffer` to `ending-of-buffer`, or visa-versa. * In the `post-command-hook`, have the following two elements: ** Remove overlays xyz between the *old* `window-start` and *old* `window-end`. ** Add overlays xyz between the *new* `window-start` and *new* `window-end`. The final component above (i.e., ** Add overlays xyz between the *new* . . .) cannot be done correctly without a forced `redisplay` occurring. The result of a forced redisplay is that the user will see a momentary visual representation of the buffer *without* overlays xyz. The forced redisplay permits Emacs to correctly calculate the *new* `window-start` and *new* `window-end`. In a stackoverflow thread regarding this issue, @Stefan suggested that I take a look at the `jit-lock-register`. After combing through the code in `jit-lock.el` and trying some experiments, I believe that `jit-lock.el` is more suited to a situation when buffer *modification* occurs -- it is also suited for situations where one may wish to incrementially act upon an entire buffer in small chunks at a time to increase efficiency of avaialble resources. http://stackoverflow.com/questions/23923371/emacs-calculating-new-window-start-end-without-redisplay I believe that the solution may be to have a `sneak-preview-redisplay` whereby the *new* `window-start` and *new* `window-end` could be correctly calculated without the visual buffer actually being redisplayed. Thanks, Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 24.4.50.1 (x86_64-apple-darwin10.8.0, NS appkit-1038.36 Version 10.6.8 (Build 10K549)) of 2014-06-01 on MP.local Repository revision: 117215 lekktu@HIDDEN Windowing system distributor `Apple', version 10.3.1038 Configured using: `configure --with-ns' Configured features: ACL LIBXML2 ZLIB Important settings: locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: lawlist-scroll-bar-mode: t lawlist-delete-selection-mode: t lawlist-linum-mode: t lawlist-visual-line-mode: t vr-mode: t hr-mode: t flyspell-mode: t desktop-save-mode: t tabbar-mode: t font-lock-mode: t blink-cursor-mode: t transient-mark-mode: t Recent input: <down> <down> <down> <down> <down> <down> <down> <down> <down> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <s-up> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <up> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-right> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <M-left> <wheel-down> <double-wheel-down> <triple-wheel-down> <wheel-down> <double-wheel-down> <triple-wheel-down> <wheel-down> <double-wheel-down> <triple-wheel-down> <wheel-down> <double-wheel-down> <triple-wheel-down> <triple-wheel-down> <wheel-down> <double-wheel-down> <triple-wheel-down> <wheel-down> <double-wheel-down> <triple-wheel-down> <wheel-down> <double-wheel-down> <triple-wheel-down> <wheel-up> <double-wheel-up> <triple-wheel-up> <wheel-up> <wheel-up> <double-wheel-up> <triple-wheel-up> <help-echo> <down-mouse-1> <mouse-1> <wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up> <wheel-up> <double-wheel-up> <triple-wheel-up> <down> <down> <down> <down> <down> <up> <up> <up> <up> <up> <s-up> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <s-right> <left> <left> <left> <left> <left> <left> <left> <left> <left> s-N s-w k <left> <left> <left> <left> <left> <left> <left> <left> <left> s-N s-w k <escape> x e m a c s - b u g <return> <backspace> <backspace> <backspace> <backspace> <backspace> <backspace> <backspace> <backspace> <backspace> r e p o r t - e m a c s - b u g <return> Recent messages: Saving...done Mark set [k]ill or [s]ave draft? Loading msgdb for +/Users/HOME/.0.data/.0.emacs/.0.mail/msgdb/imap/mail.lawlist.com/lawlist/INBOX.Drafts/spool...done Type C-c C-x C-z to exit MIME mode, and type C-c C-x ? to get help. Saving...done Mark set [k]ill or [s]ave draft? Loading msgdb for +/Users/HOME/.0.data/.0.emacs/.0.mail/msgdb/imap/mail.lawlist.com/lawlist/INBOX.Drafts/spool...done *beep* Load-path shadows: /Users/HOME/.0.data/.0.emacs/.0.flim/md4 hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/md4 /Users/HOME/.0.data/.0.emacs/.0.flim/hex-util hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/hex-util /Users/HOME/.0.data/.0.emacs/.0.flim/sasl hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/sasl /Users/HOME/.0.data/.0.emacs/.0.flim/sasl-ntlm hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/sasl-ntlm /Users/HOME/.0.data/.0.emacs/.0.flim/sasl-digest hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/sasl-digest /Users/HOME/.0.data/.0.emacs/.0.flim/sasl-cram hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/sasl-cram /Users/HOME/.0.data/.0.emacs/.0.flim/ntlm hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/ntlm /Users/HOME/.0.data/.0.emacs/.0.flim/hmac-md5 hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/hmac-md5 /Users/HOME/.0.data/.0.emacs/.0.flim/hmac-def hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/hmac-def /Users/HOME/.0.data/.0.emacs/.0.wl/rfc2368 hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/mail/rfc2368 /Users/HOME/.0.data/.0.emacs/.0.wl/utf7 hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/gnus/utf7 /Users/HOME/.0.data/.0.emacs/.0.simi/smime hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/gnus/smime /Users/HOME/.emacs.d/elpa/tabulated-list-20120406.1351/tabulated-list hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/emacs-lisp/tabulated-list /Users/HOME/.0.data/.0.emacs/.0.simi/pgg hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/obsolete/pgg /Users/HOME/.0.data/.0.emacs/.0.simi/pgg-pgp5 hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/obsolete/pgg-pgp5 /Users/HOME/.0.data/.0.emacs/.0.simi/pgg-pgp hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/obsolete/pgg-pgp /Users/HOME/.0.data/.0.emacs/.0.simi/pgg-parse hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/obsolete/pgg-parse /Users/HOME/.0.data/.0.emacs/.0.simi/pgg-gpg hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/obsolete/pgg-gpg /Users/HOME/.0.data/.0.emacs/.0.simi/pgg-def hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/obsolete/pgg-def Features: (shadow emacsbug modb-legacy wl-mime mime-edit pgg-parse pccl pccl-20 signature mime-setup mail-mime-setup semi-setup mime-pgp pgg-def mime-play filename mime-image modb-standard elmo-imap4 disp-table bbdb-autoloads lawlist-wl wl-demo wl-draft eword-encode wl-template sendmail elmo-net elmo-cache elmo-map elmo-dop wl-news wl-address wl-thread wl-folder wl wl-e21 wl-spam wl-action wl-summary wl-refile wl-util pp elmo-flag elmo-localdir wl-message elmo-mime mmelmo-buffer mmelmo-imap mime-view mime-conf calist semi-def mmimap mime-parse mmbuffer mmgeneric elmo-multi elmo-spam elsp-header elsp-generic elmo elmo-signal wl-highlight wl-vars wl-version elmo-msgdb modb modb-generic modb-entity luna mime elmo-util emu invisible inv-23 poem poem-e20 poem-e20_3 eword-decode std11 elmo-date elmo-vars elmo-version w3m-load mime-w3m w3m browse-url doc-view jka-compr image-mode w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util smiley gnus-art mm-uu mml2015 mm-view mml-smime smime savehist lawlist-vr-hr lawlist-whitespace lawlist-github conf-mode log-edit add-log find-lisp package esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-module esh-mode esh-util dired-x view tramp tramp-compat tramp-loaddefs trampver server grep epa epg epg-config diff-mode autorevert filenotify log-view pcvs-util ido time-stamp vc-git vc vc-dispatcher ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff rx ert ewoc debug eieio-base lawlist-calculator ps-print ps-def lpr flyspell ispell bbdb timezone find-func dired-aux lawlist-yasnippet help-mode multiple-cursors mc-separate-operations rectangular-region-mode mc-mark-more thingatpt mc-cycle-cursors mc-edit-lines multiple-cursors-core rect saveplace lawlist-tex-mode pcase compile shell pcomplete comint ansi-color ring skeleton compare-w desktop frameset lawlist-tabbar lawlist-org lawlist-calendar edmacro kmacro derived lawlist-toodledo advice url-http url-auth url-gw url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core password-cache url-vars mailcap json xml noutline outline easy-mmode gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls utf7 mel path-util mime-def alist mcharset mcs-20 mcs-e20 pcustom pces pces-e20 pces-20 broken poe pym static apel-ver product netrc nnoo parse-time gnus-spec gnus-int gnus-range message cl-macs dired format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader gnus-util mail-utils mm-util help-fns mail-prsvr wid-edit cl gv cl-loaddefs cl-lib time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process cocoa ns multi-tty emacs) Memory information: ((conses 16 736782 78749) (symbols 48 55597 0) (miscs 40 501 2390) (strings 32 116279 16804) (string-bytes 1 3864862) (vectors 16 42181) (vector-slots 8 741196 80204) (floats 8 1011 262) (intervals 56 778 234) (buffers 960 13))
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Keith David Bershatsky <esq@HIDDEN> Subject: bug#17678: Acknowledgement (24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay) Message-ID: <handler.17678.B.140181776518959.ack <at> debbugs.gnu.org> References: <m2ppiphojd.wl%esq@HIDDEN> X-Gnu-PR-Message: ack 17678 X-Gnu-PR-Package: emacs Reply-To: 17678 <at> debbugs.gnu.org Date: Tue, 03 Jun 2014 17:50:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 17678 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 17678: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D17678 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 11 Jun 2014 18:01:01 +0000 Resent-Message-ID: <handler.17678.B17678.140250965624589 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Keith David Bershatsky <esq@HIDDEN> Cc: 17678 <at> debbugs.gnu.org Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140250965624589 (code B ref 17678); Wed, 11 Jun 2014 18:01:01 +0000 Received: (at 17678) by debbugs.gnu.org; 11 Jun 2014 18:00:56 +0000 Received: from localhost ([127.0.0.1]:44507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WumpP-0006ON-Md for submit <at> debbugs.gnu.org; Wed, 11 Jun 2014 14:00:56 -0400 Received: from relais.videotron.ca ([24.201.245.36]:58495) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <monnier@HIDDEN>) id 1WumpI-0006O3-TA for 17678 <at> debbugs.gnu.org; Wed, 11 Jun 2014 14:00:49 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from ceviche.home ([24.203.184.39]) by VL-VM-MR004.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0N7000FNTND37D42@HIDDEN> for 17678 <at> debbugs.gnu.org; Wed, 11 Jun 2014 14:00:39 -0400 (EDT) Received: by ceviche.home (Postfix, from userid 20848) id 00AB666159; Wed, 11 Jun 2014 14:00:39 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-id: <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> Date: Wed, 11 Jun 2014 14:00:39 -0400 In-reply-to: <m2ppiphojd.wl%esq@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) > In a stackoverflow thread regarding this issue, @Stefan suggested that > I take a look at the `jit-lock-register`. After combing through the > code in `jit-lock.el` and trying some experiments, I believe that > `jit-lock.el` is more suited to a situation when buffer *modification* > occurs -- it is also suited for situations where one may wish to > incrementially act upon an entire buffer in small chunks at a time to > increase efficiency of avaialble resources. Indeed, jit-lock is designed for features that depend on the buffer's *contents* but not on things like the value of `point'. > I believe that the solution may be to have a `sneak-preview-redisplay` > whereby the *new* `window-start` and *new* `window-end` could be > correctly calculated without the visual buffer actually > being redisplayed. Of course, there's a circularity problem, here: if you need window-start (you can already compute window-end without an actual redisplay) in order to then install things like text-properties properties and overlays that affect the display, then those added properties may end up requiring changing window-start again (because they end up pushing point outside of the window and require a scroll). This said, the request is reasonable, and seems related to the needs of follow-mode as well. IIUC your particular use case (drawing crosshairs to show where the cursor is located) is one where what you really need is to know when window-start changes (just like follow-mode). So, a good feature might be one that runs a hook when redisplay decides that window-start needs to be reset (i.e. that point moved out of the window and we need to scroll). Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 11 Jun 2014 18:46:02 +0000 Resent-Message-ID: <handler.17678.B17678.140251235230210 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org Reply-To: Eli Zaretskii <eliz@HIDDEN> Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140251235230210 (code B ref 17678); Wed, 11 Jun 2014 18:46:02 +0000 Received: (at 17678) by debbugs.gnu.org; 11 Jun 2014 18:45:52 +0000 Received: from localhost ([127.0.0.1]:44566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WunWu-0007r4-Ek for submit <at> debbugs.gnu.org; Wed, 11 Jun 2014 14:45:52 -0400 Received: from mtaout28.012.net.il ([80.179.55.184]:51359) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <eliz@HIDDEN>) id 1WunWp-0007qP-3Z for 17678 <at> debbugs.gnu.org; Wed, 11 Jun 2014 14:45:46 -0400 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0N7000100P73UO00@HIDDEN> for 17678 <at> debbugs.gnu.org; Wed, 11 Jun 2014 21:43:55 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7000K6NPD7GM70@HIDDEN>; Wed, 11 Jun 2014 21:43:55 +0300 (IDT) Date: Wed, 11 Jun 2014 21:45:31 +0300 From: Eli Zaretskii <eliz@HIDDEN> In-reply-to: <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> X-012-Sender: halo1@HIDDEN Message-id: <831tuvz3n8.fsf@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) > From: Stefan Monnier <monnier@HIDDEN> > Date: Wed, 11 Jun 2014 14:00:39 -0400 > Cc: 17678 <at> debbugs.gnu.org > > > I believe that the solution may be to have a `sneak-preview-redisplay` > > whereby the *new* `window-start` and *new* `window-end` could be > > correctly calculated without the visual buffer actually > > being redisplayed. > > Of course, there's a circularity problem, here: if you need window-start > (you can already compute window-end without an actual redisplay) in > order to then install things like text-properties properties and > overlays that affect the display, then those added properties may end up > requiring changing window-start again (because they end up pushing point > outside of the window and require a scroll). Indeed. But if there's a hook that is forbidden from making such changes to buffer text, then this is doable. Otherwise, it's a waste of time having such a hook, since it will be unreliable. > IIUC your particular use case (drawing crosshairs to show where the > cursor is located) is one where what you really need is to know when > window-start changes (just like follow-mode). > > So, a good feature might be one that runs a hook when redisplay decides > that window-start needs to be reset (i.e. that point moved out of the > window and we need to scroll). The display engine changes window-start for several reasons, only one of them being that point moved off screen. I think follow-mode also needs to know when the window-end changes (which could happen with no changes in window-start). This is normally known only at the end of window redisplay, IIRC.
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 11 Jun 2014 21:59:01 +0000 Resent-Message-ID: <handler.17678.B17678.140252389817770 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140252389817770 (code B ref 17678); Wed, 11 Jun 2014 21:59:01 +0000 Received: (at 17678) by debbugs.gnu.org; 11 Jun 2014 21:58:18 +0000 Received: from localhost ([127.0.0.1]:44633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WuqXB-0004cX-WD for submit <at> debbugs.gnu.org; Wed, 11 Jun 2014 17:58:18 -0400 Received: from relais.videotron.ca ([24.201.245.36]:14197) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <monnier@HIDDEN>) id 1WuqX9-0004cM-0U for 17678 <at> debbugs.gnu.org; Wed, 11 Jun 2014 17:58:15 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from ceviche.home ([24.201.151.191]) by VL-VM-MR004.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0N70008PSYD1OVL3@HIDDEN> for 17678 <at> debbugs.gnu.org; Wed, 11 Jun 2014 17:58:13 -0400 (EDT) Received: by ceviche.home (Postfix, from userid 20848) id 45A3366228; Wed, 11 Jun 2014 17:58:11 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-id: <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> Date: Wed, 11 Jun 2014 17:58:11 -0400 In-reply-to: <831tuvz3n8.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) > The display engine changes window-start for several reasons, only one > of them being that point moved off screen. Is there a comment somewhere that documents the cases where it can happen? > I think follow-mode also needs to know when the window-end changes > (which could happen with no changes in window-start). This is > normally known only at the end of window redisplay, IIRC. In the case of follow-mode, I think the best way to handle that is to make it possible for follow-mode to force redisplay to go through the windows in a particular order. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 12 Jun 2014 17:55:01 +0000 Resent-Message-ID: <handler.17678.B17678.140259569110795 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org Reply-To: Eli Zaretskii <eliz@HIDDEN> Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140259569110795 (code B ref 17678); Thu, 12 Jun 2014 17:55:01 +0000 Received: (at 17678) by debbugs.gnu.org; 12 Jun 2014 17:54:51 +0000 Received: from localhost ([127.0.0.1]:45831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1Wv9D9-0002o3-0Z for submit <at> debbugs.gnu.org; Thu, 12 Jun 2014 13:54:51 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:43289) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <eliz@HIDDEN>) id 1Wv9D5-0002nj-QW for 17678 <at> debbugs.gnu.org; Thu, 12 Jun 2014 13:54:49 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0N7200D00HQN8M00@HIDDEN> for 17678 <at> debbugs.gnu.org; Thu, 12 Jun 2014 20:54:40 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7200DKWHR43B60@HIDDEN>; Thu, 12 Jun 2014 20:54:40 +0300 (IDT) Date: Thu, 12 Jun 2014 20:54:27 +0300 From: Eli Zaretskii <eliz@HIDDEN> In-reply-to: <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> X-012-Sender: halo1@HIDDEN Message-id: <83ha3qxbcc.fsf@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) > From: Stefan Monnier <monnier@HIDDEN> > Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org > Date: Wed, 11 Jun 2014 17:58:11 -0400 > > > The display engine changes window-start for several reasons, only one > > of them being that point moved off screen. > > Is there a comment somewhere that documents the cases where it can happen? Not that I know of. In general, there are functions that set the window-start forcibly. > > I think follow-mode also needs to know when the window-end changes > > (which could happen with no changes in window-start). This is > > normally known only at the end of window redisplay, IIRC. > > In the case of follow-mode, I think the best way to handle that is to > make it possible for follow-mode to force redisplay to go through the > windows in a particular order. That'd require some infrastructure that doesn't exist.
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 02:12:01 +0000 Resent-Message-ID: <handler.17678.B17678.140262551010863 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140262551010863 (code B ref 17678); Fri, 13 Jun 2014 02:12:01 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 02:11:50 +0000 Received: from localhost ([127.0.0.1]:46004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvGy5-0002p8-3b for submit <at> debbugs.gnu.org; Thu, 12 Jun 2014 22:11:49 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:4962) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <monnier@HIDDEN>) id 1WvGy2-0002oq-Pc for 17678 <at> debbugs.gnu.org; Thu, 12 Jun 2014 22:11:47 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIxALNAcLFBgNJIgECNIZF456B4Q4AQOUYpQ3gWqBcYFbIQ X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIxALNAcLFBgNJIgECNIZF456B4Q4AQOUYpQ3gWqBcYFbIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="66729695" Received: from 75-119-224-253.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 12 Jun 2014 22:11:40 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id BA63BAE23E; Thu, 12 Jun 2014 22:11:39 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwv7g4lftn7.fsf-monnier+emacsbugs@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> <83ha3qxbcc.fsf@HIDDEN> Date: Thu, 12 Jun 2014 22:11:39 -0400 In-Reply-To: <83ha3qxbcc.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 12 Jun 2014 20:54:27 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.3 (/) >> > The display engine changes window-start for several reasons, only one >> > of them being that point moved off screen. >> Is there a comment somewhere that documents the cases where it can happen? > Not that I know of. > In general, there are functions that set the window-start forcibly. I know of code that does that from outside of redisplay, but within redisplay I only know of the "move point back into view". >> In the case of follow-mode, I think the best way to handle that is to >> make it possible for follow-mode to force redisplay to go through the >> windows in a particular order. > That'd require some infrastructure that doesn't exist. Yes, that's indeed the topic of this thread. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 06:23:01 +0000 Resent-Message-ID: <handler.17678.B17678.140264056411889 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org Reply-To: Eli Zaretskii <eliz@HIDDEN> Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140264056411889 (code B ref 17678); Fri, 13 Jun 2014 06:23:01 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 06:22:44 +0000 Received: from localhost ([127.0.0.1]:46106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvKsu-00035h-G1 for submit <at> debbugs.gnu.org; Fri, 13 Jun 2014 02:22:44 -0400 Received: from mtaout27.012.net.il ([80.179.55.183]:50400) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <eliz@HIDDEN>) id 1WvKss-00035P-5k for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 02:22:43 -0400 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0N7300N00FS97C00@HIDDEN> for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 09:19:34 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7300LLBG8M4I40@HIDDEN>; Fri, 13 Jun 2014 09:19:34 +0300 (IDT) Date: Fri, 13 Jun 2014 09:22:23 +0300 From: Eli Zaretskii <eliz@HIDDEN> In-reply-to: <jwv7g4lftn7.fsf-monnier+emacsbugs@HIDDEN> X-012-Sender: halo1@HIDDEN Message-id: <8361k5xra8.fsf@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> <83ha3qxbcc.fsf@HIDDEN> <jwv7g4lftn7.fsf-monnier+emacsbugs@HIDDEN> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) > From: Stefan Monnier <monnier@HIDDEN> > Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org > Date: Thu, 12 Jun 2014 22:11:39 -0400 > > >> > The display engine changes window-start for several reasons, only one > >> > of them being that point moved off screen. > >> Is there a comment somewhere that documents the cases where it can happen? > > Not that I know of. > > In general, there are functions that set the window-start forcibly. > > I know of code that does that from outside of redisplay, but within > redisplay I only know of the "move point back into view". Why does it matter if the trigger comes from outside redisplay or as part of redisplay? Anyway, one situation of the latter kind is when the text at window-start changed. Another one is when the window-start was in a continuation line, and the window width changed, see compute_window_start_on_continuation_line and its callers.
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 12:36:01 +0000 Resent-Message-ID: <handler.17678.B17678.140266291930890 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140266291930890 (code B ref 17678); Fri, 13 Jun 2014 12:36:01 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 12:35:19 +0000 Received: from localhost ([127.0.0.1]:46275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvQhO-000822-8m for submit <at> debbugs.gnu.org; Fri, 13 Jun 2014 08:35:18 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:1093) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <monnier@HIDDEN>) id 1WvQhH-00081R-6h for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 08:35:12 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQHCxQYDSSIBAjSGReOegeEOASpGYFqgXGBWyE X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQHCxQYDSSIBAjSGReOegeEOASpGYFqgXGBWyE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="66764987" Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 13 Jun 2014 08:35:00 -0400 Received: by pastel.home (Postfix, from userid 20848) id C640260370; Fri, 13 Jun 2014 08:34:59 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwv8up17zym.fsf-monnier+emacsbugs@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> <83ha3qxbcc.fsf@HIDDEN> <jwv7g4lftn7.fsf-monnier+emacsbugs@HIDDEN> <8361k5xra8.fsf@HIDDEN> Date: Fri, 13 Jun 2014 08:34:59 -0400 In-Reply-To: <8361k5xra8.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 13 Jun 2014 09:22:23 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.3 (/) >> I know of code that does that from outside of redisplay, but within >> redisplay I only know of the "move point back into view". > Why does it matter if the trigger comes from outside redisplay or as > part of redisplay? If it's done outside of redisplay, then pre-redisplay-function already gets the right window-start and the problem is already solved. If OTOH redisplay decides to scroll, it won't re-execute pre-redisplay-function, so Elisp doesn't get a chance to react to this new window-start. > Anyway, one situation of the latter kind is when the text at > window-start changed. Another one is when the window-start was in a > continuation line, and the window width changed, see > compute_window_start_on_continuation_line and its callers. Ah, right, that makes sense. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 13:29:01 +0000 Resent-Message-ID: <handler.17678.B17678.14026660975359 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org Reply-To: Eli Zaretskii <eliz@HIDDEN> Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.14026660975359 (code B ref 17678); Fri, 13 Jun 2014 13:29:01 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 13:28:17 +0000 Received: from localhost ([127.0.0.1]:46303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvRWi-0001OK-PD for submit <at> debbugs.gnu.org; Fri, 13 Jun 2014 09:28:17 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:35574) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <eliz@HIDDEN>) id 1WvRWe-0001Nw-IC for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 09:28:13 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N7300600ZWNU900@HIDDEN> for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 16:28:05 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N74006YD02TDT80@HIDDEN>; Fri, 13 Jun 2014 16:28:05 +0300 (IDT) Date: Fri, 13 Jun 2014 16:27:54 +0300 From: Eli Zaretskii <eliz@HIDDEN> In-reply-to: <jwv8up17zym.fsf-monnier+emacsbugs@HIDDEN> X-012-Sender: halo1@HIDDEN Message-id: <83r42tvt0l.fsf@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> <83ha3qxbcc.fsf@HIDDEN> <jwv7g4lftn7.fsf-monnier+emacsbugs@HIDDEN> <8361k5xra8.fsf@HIDDEN> <jwv8up17zym.fsf-monnier+emacsbugs@HIDDEN> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) > From: Stefan Monnier <monnier@HIDDEN> > Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org > Date: Fri, 13 Jun 2014 08:34:59 -0400 > > >> I know of code that does that from outside of redisplay, but within > >> redisplay I only know of the "move point back into view". > > Why does it matter if the trigger comes from outside redisplay or as > > part of redisplay? > > If it's done outside of redisplay, then pre-redisplay-function already > gets the right window-start and the problem is already solved. Not necessarily: there are the w->optional_new_start and w->force_start flags, which determine what redisplay does with window-start in these cases. Also, the window-start could be set to a value that leaves point out of the displayed area, in which case it won't be in effect. > If OTOH redisplay decides to scroll, it won't re-execute > pre-redisplay-function, so Elisp doesn't get a chance to react to this > new window-start. ??? Then what are those calls to run_window_scroll_functions that redisplay issues?
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 14:15:02 +0000 Resent-Message-ID: <handler.17678.B17678.140266886011634 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140266886011634 (code B ref 17678); Fri, 13 Jun 2014 14:15:02 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 14:14:20 +0000 Received: from localhost ([127.0.0.1]:46754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvSFD-00031T-DQ for submit <at> debbugs.gnu.org; Fri, 13 Jun 2014 10:14:20 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:4853) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <monnier@HIDDEN>) id 1WvSF7-00030x-9Z for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 10:14:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgEnLyMFCws0BwsUGA0kiAQI0hkXjnoHhDgBA6kZgWqBcYFbIQ X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgEnLyMFCws0BwsUGA0kiAQI0hkXjnoHhDgBA6kZgWqBcYFbIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="66773853" Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 13 Jun 2014 10:14:03 -0400 Received: by pastel.home (Postfix, from userid 20848) id 281D860117; Fri, 13 Jun 2014 10:14:03 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwv7g4k7wbo.fsf-monnier+emacsbugs@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> <83ha3qxbcc.fsf@HIDDEN> <jwv7g4lftn7.fsf-monnier+emacsbugs@HIDDEN> <8361k5xra8.fsf@HIDDEN> <jwv8up17zym.fsf-monnier+emacsbugs@HIDDEN> <83r42tvt0l.fsf@HIDDEN> Date: Fri, 13 Jun 2014 10:14:03 -0400 In-Reply-To: <83r42tvt0l.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 13 Jun 2014 16:27:54 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.3 (/) > Not necessarily: there are the w->optional_new_start and > w-> force_start flags, which determine what redisplay does with > window-start in these cases. > Also, the window-start could be set to a value that leaves point out > of the displayed area, in which case it won't be in effect. Right, but these fall back into the case where redisplay performs a second pass trough the window/buffer, so it's similar to the scrolling case, right? >> If OTOH redisplay decides to scroll, it won't re-execute >> pre-redisplay-function, so Elisp doesn't get a chance to react to this >> new window-start. > ??? Then what are those calls to run_window_scroll_functions that > redisplay issues? Ah, right, I forgot about this. So maybe window-scroll-functions is the answer to the OP's needs! Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 14:49:01 +0000 Resent-Message-ID: <handler.17678.B17678.140267090915921 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org Reply-To: Eli Zaretskii <eliz@HIDDEN> Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140267090915921 (code B ref 17678); Fri, 13 Jun 2014 14:49:01 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 14:48:29 +0000 Received: from localhost ([127.0.0.1]:46771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvSmH-00048f-8c for submit <at> debbugs.gnu.org; Fri, 13 Jun 2014 10:48:28 -0400 Received: from mtaout27.012.net.il ([80.179.55.183]:41352) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <eliz@HIDDEN>) id 1WvSm9-000486-NV for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 10:48:21 -0400 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0N7400K002X6H100@HIDDEN> for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 17:45:09 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7400LUC3N9HS20@HIDDEN>; Fri, 13 Jun 2014 17:45:09 +0300 (IDT) Date: Fri, 13 Jun 2014 17:47:59 +0300 From: Eli Zaretskii <eliz@HIDDEN> In-reply-to: <jwv7g4k7wbo.fsf-monnier+emacsbugs@HIDDEN> X-012-Sender: halo1@HIDDEN Message-id: <83ha3ox3vk.fsf@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> <83ha3qxbcc.fsf@HIDDEN> <jwv7g4lftn7.fsf-monnier+emacsbugs@HIDDEN> <8361k5xra8.fsf@HIDDEN> <jwv8up17zym.fsf-monnier+emacsbugs@HIDDEN> <83r42tvt0l.fsf@HIDDEN> <jwv7g4k7wbo.fsf-monnier+emacsbugs@HIDDEN> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) > From: Stefan Monnier <monnier@HIDDEN> > Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org > Date: Fri, 13 Jun 2014 10:14:03 -0400 > > > Not necessarily: there are the w->optional_new_start and > > w-> force_start flags, which determine what redisplay does with > > window-start in these cases. > > Also, the window-start could be set to a value that leaves point out > > of the displayed area, in which case it won't be in effect. > > Right, but these fall back into the case where redisplay performs > a second pass trough the window/buffer, so it's similar to the scrolling > case, right? Not necessarily, AFAIR. Sometimes these situations are detected and handled on the fly. > >> If OTOH redisplay decides to scroll, it won't re-execute > >> pre-redisplay-function, so Elisp doesn't get a chance to react to this > >> new window-start. > > ??? Then what are those calls to run_window_scroll_functions that > > redisplay issues? > > Ah, right, I forgot about this. So maybe window-scroll-functions is the > answer to the OP's needs! Or maybe we should call them in more places during redisplay.
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay References: <m2ppiphojd.wl%esq@HIDDEN> In-Reply-To: <m2ppiphojd.wl%esq@HIDDEN> Resent-From: Keith David Bershatsky <esq@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 16:23:02 +0000 Resent-Message-ID: <handler.17678.B17678.140267654527704 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN>,Eli Zaretskii <eliz@HIDDEN> Cc: 17678 <at> debbugs.gnu.org Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140267654527704 (code B ref 17678); Fri, 13 Jun 2014 16:23:02 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 16:22:25 +0000 Received: from localhost ([127.0.0.1]:46865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvUFA-0007Cg-P4 for submit <at> debbugs.gnu.org; Fri, 13 Jun 2014 12:22:24 -0400 Received: from cobb.liquidweb.com ([50.28.13.150]:37604) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <esq@HIDDEN>) id 1WvUF4-0007CH-8V for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 12:22:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Type:MIME-Version:Cc:Subject:To:From:Message-ID:Date; bh=GaVaqqNSJBZ8rZ7aqcsHVz6qEtt/qefPiIPb09KX1HQ=; b=ivLL9vrBH+xLP+riGeo1NRtQjhMzB3RyExPBZCE5Dsq84iAc3+PwYXNoKJpjf203TMG/8lh+RSaSjDPGvx86+vJlGqQpqfWtg27ur4sTJW1N1iilP0fweCMOre4oSKUv; Received: from cpe-75-85-5-102.socal.res.rr.com ([75.85.5.102]:49887 helo=MP.local) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from <esq@HIDDEN>) id 1WvUEw-0002pD-UN; Fri, 13 Jun 2014 12:22:07 -0400 Date: Fri, 13 Jun 2014 09:22:07 -0700 Message-ID: <m2egys7pao.wl%esq@HIDDEN> From: Keith David Bershatsky <esq@HIDDEN> User-Agent: / () / () APEL/10.8 Emacs/24.4.50 (x86_64-apple-darwin10.8.0) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: lawlist|lawlist.com X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.0 (/) The `window-scroll-functions` hook would be more useful if the value of `window-start` could be obtained *before* running the `post-command-hook`. At the present time, it would appear that the `post-command-hook` runs *before* the `window-scroll-functions` hook. Therefore, the `post-command-hook` cannot presently use the `window-start` value produced from the `window-scroll-functions` hook (which occurs *after* the `post-command-hook` has already finished). Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; At Fri, 13 Jun 2014 10:14:03 -0400, Stefan Monnier wrote: * * * > >> If OTOH redisplay decides to scroll, it won't re-execute > >> pre-redisplay-function, so Elisp doesn't get a chance to react to this > >> new window-start. > > ??? Then what are those calls to run_window_scroll_functions that > > redisplay issues? > > Ah, right, I forgot about this. So maybe window-scroll-functions is the > answer to the OP's needs! > > > Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 17:57:01 +0000 Resent-Message-ID: <handler.17678.B17678.14026821736888 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Keith David Bershatsky <esq@HIDDEN> Cc: 17678 <at> debbugs.gnu.org, monnier@HIDDEN Reply-To: Eli Zaretskii <eliz@HIDDEN> Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.14026821736888 (code B ref 17678); Fri, 13 Jun 2014 17:57:01 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 17:56:13 +0000 Received: from localhost ([127.0.0.1]:46894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvVi0-0001n1-Kk for submit <at> debbugs.gnu.org; Fri, 13 Jun 2014 13:56:13 -0400 Received: from mtaout27.012.net.il ([80.179.55.183]:53581) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <eliz@HIDDEN>) id 1WvVhw-0001mg-RU for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 13:56:10 -0400 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0N7400D00BACRA00@HIDDEN> for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 20:53:01 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7400C8GCCCXE50@HIDDEN>; Fri, 13 Jun 2014 20:53:01 +0300 (IDT) Date: Fri, 13 Jun 2014 20:55:51 +0300 From: Eli Zaretskii <eliz@HIDDEN> In-reply-to: <m2egys7pao.wl%esq@HIDDEN> X-012-Sender: halo1@HIDDEN Message-id: <83d2ecwv6g.fsf@HIDDEN> References: <m2egys7pao.wl%esq@HIDDEN> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) > Date: Fri, 13 Jun 2014 09:22:07 -0700 > From: Keith David Bershatsky <esq@HIDDEN> > Cc: 17678 <at> debbugs.gnu.org > > The `window-scroll-functions` hook would be more useful if the value of `window-start` could be obtained *before* running the `post-command-hook`. At the present time, it would appear that the `post-command-hook` runs *before* the `window-scroll-functions` hook. Therefore, the `post-command-hook` cannot presently use the `window-start` value produced from the `window-scroll-functions` hook (which occurs *after* the `post-command-hook` has already finished). Yes, post-command-hook runs before window-scroll-functions. That's because post-command-hook runs immediately after a command execution is finished and Emacs is about to return to the command loop, while window-scroll-functions run as part of redisplay, which is entered whenever Emacs is idle, i.e., after the return to the command loop. Unfortunately, what you are asking for is not possible with the current design of Emacs, because window-start is computed as part of redisplay (it is one of the most important functions of redisplay to compute that). OTOH, I don't understand why do you need what you ask for. For example, why can't you do whatever you need from window-scroll-functions, instead of doing some of it in post-command-hook? Perhaps you should describe the problem you are trying to solve in more detail.
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Keith David Bershatsky <esq@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 18:25:02 +0000 Resent-Message-ID: <handler.17678.B17678.140268385410465 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: 17678 <at> debbugs.gnu.org Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140268385410465 (code B ref 17678); Fri, 13 Jun 2014 18:25:02 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 18:24:14 +0000 Received: from localhost ([127.0.0.1]:46920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvW96-0002ih-Ee for submit <at> debbugs.gnu.org; Fri, 13 Jun 2014 14:24:13 -0400 Received: from cobb.liquidweb.com ([50.28.13.150]:41306) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <esq@HIDDEN>) id 1WvW93-0002iP-R7 for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 14:24:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Content-Type:Mime-Version:Subject; bh=MZvW/iUlkuRTNGsW7TXLwyqPEAJgCif8jBPho9gZHck=; b=GDGtnmUtbxJqeuTi0TS+TFcMu2TtdPoqPiUM+9qDujdSZ0ALezpocog7vxQYGECjKTjpRZ2v0zlCNaOqG4zFU41nYbC+WBynOxnqUdlr2etL2IowyWfjYUBqBLMjWrDJ; Received: from cpe-75-85-5-102.socal.res.rr.com ([75.85.5.102]:50424 helo=[192.168.0.4]) by cobb.liquidweb.com with esmtpa (Exim 4.82) (envelope-from <esq@HIDDEN>) id 1WvW8u-0008LU-CJ; Fri, 13 Jun 2014 14:24:00 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Keith David Bershatsky <esq@HIDDEN> In-Reply-To: <83d2ecwv6g.fsf@HIDDEN> Date: Fri, 13 Jun 2014 11:24:01 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <C6BE1FD6-6F20-4FB2-A650-82E5AC560C72@HIDDEN> References: <m2egys7pao.wl%esq@HIDDEN> <83d2ecwv6g.fsf@HIDDEN> X-Mailer: Apple Mail (2.1084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: authenticated_id: lawlist/from_h X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.0 (/) I believe splitting up the work between the two hooks may be possible -- = I will need to revise the conditions once I identify additional = situations. As far as I can tell, the `window-scroll-functions` hook is = NOT triggered when `point` STAYS between *old* `window-start` and *old* = `window-end`. So when `point` STAYS between *old* `window-start` and = *old* `window-end`, I will need to use the `post-command-hook`. When = point moves BEYOND *old* `window-start` or `*old* `window-end`, then the = `window-scroll-functions` hook can take over -- with a forced new = `(window-end nil t)`. `window-scroll-functions`: (or (< (point) (window-start)) ;; good for things like = `beginning-of-buffer` (> (point) (window-end)) ;; good for things like `end-of-buffer` (> (point) (window-end nil t))) ;; good for things like `yank` `post-comand-hook` (and (not (< (point) (window-start))) (not (> (point) (window-end))) (not (> (point) (window-end nil t)))) I haven't tried it yet, but it appears to make sense based on what I saw = this morning with some `messages` that I set up using each hook. Keith --------------------------------------- On Jun 13, 2014, at 10:55 AM, Eli Zaretskii wrote: >> Date: Fri, 13 Jun 2014 09:22:07 -0700 >> From: Keith David Bershatsky <esq@HIDDEN> >> Cc: 17678 <at> debbugs.gnu.org >>=20 >> The `window-scroll-functions` hook would be more useful if the value = of `window-start` could be obtained *before* running the = `post-command-hook`. At the present time, it would appear that the = `post-command-hook` runs *before* the `window-scroll-functions` hook. = Therefore, the `post-command-hook` cannot presently use the = `window-start` value produced from the `window-scroll-functions` hook = (which occurs *after* the `post-command-hook` has already finished). >=20 > Yes, post-command-hook runs before window-scroll-functions. That's > because post-command-hook runs immediately after a command execution > is finished and Emacs is about to return to the command loop, while > window-scroll-functions run as part of redisplay, which is entered > whenever Emacs is idle, i.e., after the return to the command loop. >=20 > Unfortunately, what you are asking for is not possible with the > current design of Emacs, because window-start is computed as part of > redisplay (it is one of the most important functions of redisplay to > compute that). >=20 > OTOH, I don't understand why do you need what you ask for. For > example, why can't you do whatever you need from > window-scroll-functions, instead of doing some of it in > post-command-hook? Perhaps you should describe the problem you are > trying to solve in more detail.
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 18:48:02 +0000 Resent-Message-ID: <handler.17678.B17678.140268523613400 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140268523613400 (code B ref 17678); Fri, 13 Jun 2014 18:48:02 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 18:47:16 +0000 Received: from localhost ([127.0.0.1]:46938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvWVP-0003U3-I3 for submit <at> debbugs.gnu.org; Fri, 13 Jun 2014 14:47:16 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:46329) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <monnier@HIDDEN>) id 1WvWVL-0003Tl-Ra for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 14:47:12 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgEnLx4FEAs0BwsUGA0kiAQI0hkXjnoHhDgEqRmBaoFxgVsh X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgEnLx4FEAs0BwsUGA0kiAQI0hkXjnoHhDgEqRmBaoFxgVsh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="66801324" Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 13 Jun 2014 14:47:05 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 61B57660D3; Fri, 13 Jun 2014 14:47:05 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwvvbs4ac20.fsf-monnier+emacsbugs@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> <83ha3qxbcc.fsf@HIDDEN> <jwv7g4lftn7.fsf-monnier+emacsbugs@HIDDEN> <8361k5xra8.fsf@HIDDEN> <jwv8up17zym.fsf-monnier+emacsbugs@HIDDEN> <83r42tvt0l.fsf@HIDDEN> <jwv7g4k7wbo.fsf-monnier+emacsbugs@HIDDEN> <83ha3ox3vk.fsf@HIDDEN> Date: Fri, 13 Jun 2014 14:47:05 -0400 In-Reply-To: <83ha3ox3vk.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 13 Jun 2014 17:47:59 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.3 (/) >> > Not necessarily: there are the w->optional_new_start and >> > w-> force_start flags, which determine what redisplay does with >> > window-start in these cases. >> > Also, the window-start could be set to a value that leaves point out >> > of the displayed area, in which case it won't be in effect. >> Right, but these fall back into the case where redisplay performs >> a second pass trough the window/buffer, so it's similar to the scrolling >> case, right? > Not necessarily, AFAIR. Sometimes these situations are detected and > handled on the fly. Aha! Could you add comment somewhere in xdisp.c discussing the above issues about how/when is window-start obeyed and when it's not and when that causes a second pass and when that's handled on the fly? It doesn't have to be exhaustive, but at least mentioning the known cases, and ideally pointing to the corresponding code. >> Ah, right, I forgot about this. So maybe window-scroll-functions is the >> answer to the OP's needs! > Or maybe we should call them in more places during redisplay. Could be. But I already find it hard to know what can be done with window-scroll-functions because it's not clear exactly when it's called, in 2 sense: - it's not clear exactly when it is called and when it is not. - it's not clear exactly at which stage of redisplay it is called (e.g. what has already been processed, what hasn't; will any and all modifications caused by window-scroll-functions be reflected on screen at the end of the current redisplay, or will some of it only be handled by the next redisplay? If so, which do and which don't?) -- Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Keith David Bershatsky <esq@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 20:22:01 +0000 Resent-Message-ID: <handler.17678.B17678.140269087324820 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN> Cc: 17678 <at> debbugs.gnu.org Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140269087324820 (code B ref 17678); Fri, 13 Jun 2014 20:22:01 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 20:21:13 +0000 Received: from localhost ([127.0.0.1]:46982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvXyK-0006SD-34 for submit <at> debbugs.gnu.org; Fri, 13 Jun 2014 16:21:12 -0400 Received: from cobb.liquidweb.com ([50.28.13.150]:45320) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <esq@HIDDEN>) id 1WvXyH-0006Rs-V3 for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 16:21:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Content-Type:Mime-Version:Subject; bh=6aBDThrhdYfnftb0rfVM7/CLE9m2UjJmqSfem5WRH8A=; b=U8udA+JXtHUdA54RN8oIaYg56ZmuMR/dh7Q82yJWb5sq+3CxxqqKNEjwWCxWPTzgflNdaaYuJrBoUKddcBD12r+rVcwKVG/AW7RiMCkqgrM8RUsNsx+stmFO6ug9Seri; Received: from cpe-75-85-5-102.socal.res.rr.com ([75.85.5.102]:51262 helo=[192.168.0.4]) by cobb.liquidweb.com with esmtpa (Exim 4.82) (envelope-from <esq@HIDDEN>) id 1WvXy7-0005qS-A8; Fri, 13 Jun 2014 16:20:59 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=utf-8 From: Keith David Bershatsky <esq@HIDDEN> In-Reply-To: <jwvvbs4ac20.fsf-monnier+emacsbugs@HIDDEN> Date: Fri, 13 Jun 2014 13:21:02 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <982E0AD5-5D0B-43F0-BF17-CDAB88C239BA@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> <83ha3qxbcc.fsf@HIDDEN> <jwv7g4lftn7.fsf-monnier+emacsbugs@HIDDEN> <8361k5xra8.fsf@HIDDEN> <jwv8up17zym.fsf-monnier+emacsbugs@HIDDEN> <83r42tvt0l.fsf@HIDDEN> <jwv7g4k7wbo.fsf-monnier+emacsbugs@HIDDEN> <83ha3ox3vk.fsf@HIDDEN> <jwvvbs4ac20.fsf-monnier+emacsbugs@HIDDEN> X-Mailer: Apple Mail (2.1084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: authenticated_id: lawlist/from_h X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.0 (/) Here is a first draft, which appears to correctly handle common movement = through the buffer using `beginning-of-buffer`, `end-of-buffer`, and = custom paragraph forward / backward function. = ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;;;;;;;;; =20 (defvar old-window-start nil "This local variable is set within the `post-command-hook`; and, is also used by the `window-scroll-functions` hook.") (make-variable-buffer-local 'old-window-start) =20 (defvar old-window-end nil "This local variable is set within the `post-command-hook`; and, is also used by the `window-scroll-functions` hook.") (make-variable-buffer-local 'old-window-end) =20 (defvar old-window-end-forced nil "This local variable is set within the `post-command-hook`; and, is also used by the `window-scroll-functions` hook.") (make-variable-buffer-local 'old-window-end-forced) =20 (defun test-post-command-hook () (when (and (not (minibufferp)) (window-live-p (get-buffer-window (current-buffer)))) (setq old-window-start (window-start)) (setq old-window-end (window-end)) (setq old-window-end-forced (window-end nil t)) (when (and (not (< (point) old-window-start)) (not (> (point) old-window-end)) (not (> (point) old-window-end-forced))) (message (concat "P.C.H. -- `point`: %s | " "`old-window-start`: %s | " "`old-window-end`: %s | " "`old-window-end-forced`: %s") (point) old-window-start old-window-end old-window-end-forced)))) =20 (defun test-window-scroll-functions (win _start) "Good for things like: `beginning-of-buffer`; `end-of-buffer`; = `yank`; etc" (when (and (not (minibufferp)) (window-live-p (get-buffer-window (current-buffer)))) (when (or (< (point) old-window-start) (> (point) old-window-end) (> (point) old-window-end-forced)) (message (concat "W.S.F. -- `point`: %s | " "*new* window-start: %s | " "*new* window-end: %s") (point) _start (window-end win t))))) =20 (define-minor-mode test-mode "A minor-mode for testing `window-start` and `window-end`." :init-value nil :lighter " =F0=9D=93=A3=F0=9D=93=94=F0=9D=93=A2=F0=9D=93=A3" :keymap nil :global nil (cond (test-mode (condition-case error (progn (setq scroll-conservatively 101) (setq scroll-margin 0) (add-hook 'post-command-hook 'test-post-command-hook nil = t) (add-hook 'window-scroll-functions = 'test-window-scroll-functions nil t) (message "Turned ON `test-mode`.")) (error (test-mode 0) (signal (car error) (cdr error))))) ((not test-mode) (remove-hook 'post-command-hook 'test-post-command-hook t) (remove-hook 'window-scroll-functions = 'test-window-scroll-functions t) (message "Turned OFF `test-mode`.") ))) =20 = ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;;;;;;;;;=
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 20:55:02 +0000 Resent-Message-ID: <handler.17678.B17678.140269288229047 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Keith David Bershatsky <esq@HIDDEN> Cc: 17678 <at> debbugs.gnu.org Reply-To: Eli Zaretskii <eliz@HIDDEN> Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140269288229047 (code B ref 17678); Fri, 13 Jun 2014 20:55:02 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 20:54:42 +0000 Received: from localhost ([127.0.0.1]:46997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvYUj-0007YO-Dm for submit <at> debbugs.gnu.org; Fri, 13 Jun 2014 16:54:41 -0400 Received: from mtaout29.012.net.il ([80.179.55.185]:53320) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <eliz@HIDDEN>) id 1WvYUg-0007Y3-5B for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 16:54:39 -0400 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0N7400N00JXI2S00@HIDDEN> for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 23:54:46 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7400J4IKRA8G70@HIDDEN>; Fri, 13 Jun 2014 23:54:46 +0300 (IDT) Date: Fri, 13 Jun 2014 23:54:20 +0300 From: Eli Zaretskii <eliz@HIDDEN> In-reply-to: <C6BE1FD6-6F20-4FB2-A650-82E5AC560C72@HIDDEN> X-012-Sender: halo1@HIDDEN Message-id: <83a99gwmwz.fsf@HIDDEN> References: <m2egys7pao.wl%esq@HIDDEN> <83d2ecwv6g.fsf@HIDDEN> <C6BE1FD6-6F20-4FB2-A650-82E5AC560C72@HIDDEN> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) > From: Keith David Bershatsky <esq@HIDDEN> > Date: Fri, 13 Jun 2014 11:24:01 -0700 > Cc: 17678 <at> debbugs.gnu.org > > I believe splitting up the work between the two hooks may be possible -- I will need to revise the conditions once I identify additional situations. As far as I can tell, the `window-scroll-functions` hook is NOT triggered when `point` STAYS between *old* `window-start` and *old* `window-end`. So when `point` STAYS between *old* `window-start` and *old* `window-end`, I will need to use the `post-command-hook`. When point moves BEYOND *old* `window-start` or `*old* `window-end`, then the `window-scroll-functions` hook can take over -- with a forced new `(window-end nil t)`. Why do you care about the situation where point stays inside the same window limits?
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 21:00:05 +0000 Resent-Message-ID: <handler.17678.B17678.140269319529659 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org Reply-To: Eli Zaretskii <eliz@HIDDEN> Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140269319529659 (code B ref 17678); Fri, 13 Jun 2014 21:00:05 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 20:59:55 +0000 Received: from localhost ([127.0.0.1]:47003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvYZm-0007iI-Am for submit <at> debbugs.gnu.org; Fri, 13 Jun 2014 16:59:54 -0400 Received: from mtaout27.012.net.il ([80.179.55.183]:40536) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <eliz@HIDDEN>) id 1WvYZj-0007hv-3Q for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 16:59:52 -0400 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0N7400000JM1V600@HIDDEN> for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 23:56:43 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7400KNVKUJYF90@HIDDEN>; Fri, 13 Jun 2014 23:56:43 +0300 (IDT) Date: Fri, 13 Jun 2014 23:59:33 +0300 From: Eli Zaretskii <eliz@HIDDEN> In-reply-to: <jwvvbs4ac20.fsf-monnier+emacsbugs@HIDDEN> X-012-Sender: halo1@HIDDEN Message-id: <838up0wmoa.fsf@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> <83ha3qxbcc.fsf@HIDDEN> <jwv7g4lftn7.fsf-monnier+emacsbugs@HIDDEN> <8361k5xra8.fsf@HIDDEN> <jwv8up17zym.fsf-monnier+emacsbugs@HIDDEN> <83r42tvt0l.fsf@HIDDEN> <jwv7g4k7wbo.fsf-monnier+emacsbugs@HIDDEN> <83ha3ox3vk.fsf@HIDDEN> <jwvvbs4ac20.fsf-monnier+emacsbugs@HIDDEN> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) > From: Stefan Monnier <monnier@HIDDEN> > Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org > Date: Fri, 13 Jun 2014 14:47:05 -0400 > > >> > Not necessarily: there are the w->optional_new_start and > >> > w-> force_start flags, which determine what redisplay does with > >> > window-start in these cases. > >> > Also, the window-start could be set to a value that leaves point out > >> > of the displayed area, in which case it won't be in effect. > >> Right, but these fall back into the case where redisplay performs > >> a second pass trough the window/buffer, so it's similar to the scrolling > >> case, right? > > Not necessarily, AFAIR. Sometimes these situations are detected and > > handled on the fly. > > Aha! Could you add comment somewhere in xdisp.c discussing the above > issues about how/when is window-start obeyed and when it's not and > when that causes a second pass and when that's handled on the fly? I will see what I can do. > Could be. But I already find it hard to know what can be done with > window-scroll-functions because it's not clear exactly when it's called, > in 2 sense: > - it's not clear exactly when it is called and when it is not. > - it's not clear exactly at which stage of redisplay it is called > (e.g. what has already been processed, what hasn't; will any and all > modifications caused by window-scroll-functions be reflected on screen > at the end of the current redisplay, or will some of it only be > handled by the next redisplay? If so, which do and which don't?) I'm not sure I follow. Redisplay, at the level we are talking, has no stages. It goes through all the windows on every frame, and does for each window what it thinks has to be done in that window. A process of redisplaying a window is done in one go, there are no stages or phases in it. The window-scroll-functions are called when redisplay thinks it will scroll the window in order to redisplay it. Which modifications in window-scroll-functions did you have in mind?
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Keith David Bershatsky <esq@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 13 Jun 2014 21:20:02 +0000 Resent-Message-ID: <handler.17678.B17678.140269437332096 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN> Cc: 17678 <at> debbugs.gnu.org Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140269437332096 (code B ref 17678); Fri, 13 Jun 2014 21:20:02 +0000 Received: (at 17678) by debbugs.gnu.org; 13 Jun 2014 21:19:33 +0000 Received: from localhost ([127.0.0.1]:47008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvYsm-0008LV-FX for submit <at> debbugs.gnu.org; Fri, 13 Jun 2014 17:19:33 -0400 Received: from cobb.liquidweb.com ([50.28.13.150]:47050) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <esq@HIDDEN>) id 1WvYsj-0008LD-KH for 17678 <at> debbugs.gnu.org; Fri, 13 Jun 2014 17:19:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Content-Type:Mime-Version:Subject; bh=m1Bf6HoEH6aRTrA6oANqtXyCNEOsdL7M0ubIwYoZU88=; b=BECAaLkgnxAAq+5mV6umi1yxyMdVenxuxIy4lo3yiXlz+BHOV7DA4ExeoOy8V739a5PFvSGQ4VmTtLqSDbQFQ8+VHIUUlRzAZ/nBBy/TKWcgOxrBQVsh4jBj2EI06TEP; Received: from cpe-75-85-5-102.socal.res.rr.com ([75.85.5.102]:51488 helo=[192.168.0.4]) by cobb.liquidweb.com with esmtpa (Exim 4.82) (envelope-from <esq@HIDDEN>) id 1WvYsY-0002lP-9s; Fri, 13 Jun 2014 17:19:18 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Keith David Bershatsky <esq@HIDDEN> In-Reply-To: <83a99gwmwz.fsf@HIDDEN> Date: Fri, 13 Jun 2014 14:19:21 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <52D781C2-53C8-4994-8B17-D8232D278F94@HIDDEN> References: <m2egys7pao.wl%esq@HIDDEN> <83d2ecwv6g.fsf@HIDDEN> <C6BE1FD6-6F20-4FB2-A650-82E5AC560C72@HIDDEN> <83a99gwmwz.fsf@HIDDEN> X-Mailer: Apple Mail (2.1084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: authenticated_id: lawlist/from_h X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.0 (/) The custom minor-mode that I am working places overlays between = `window-start` and `window-end`, and is triggered upon a variety of = occurrences. The three general categories that trigger removal / = placement of overlays are: (1) buffer modification; (2) window = modification; (3) cursor movement. The overlays draw three categories: = (1) end of line indicators (e.g., pilcrow, or single-angle [for cursor = eol]); (2) a horizontal line at the current cursor position that spans = the entire window-width (excluding the line numbers and fringes); and, = (3) a vertical line aligned with the cursor stretching from the top to = bottom of the window (excluding the headline where I have Tabbar). To = make the minor mode as efficient as possible (in terms of time needed to = remove / place the overlays), I am limiting the area to only the visible = window. The goal is to have the new overlays placed before the redisplay occurs = -- this avoids a brief glimpse of the naked buffer once the prior = overlays have been removed (and before the new overlays are laid). = Prior to the existence of the `test-mode` that I sent over a short while = ago (based on the help that you and Stefan have so graciously provided), = I was forcing a redisplay (whenever point moved outside of the *old* = visible window limits) in order to obtain the *new* `window-start` and = *new* `window-end`. It looks as if the `test-mode` concept will resolve = the issue by handling the two different conditions separately -- i.e., = point inside the *old* window limits, versus point outside thereof. --------------------------------------- On Jun 13, 2014, at 1:54 PM, Eli Zaretskii wrote: >> From: Keith David Bershatsky <esq@HIDDEN> >> Date: Fri, 13 Jun 2014 11:24:01 -0700 >> Cc: 17678 <at> debbugs.gnu.org >>=20 >> I believe splitting up the work between the two hooks may be possible = -- I will need to revise the conditions once I identify additional = situations. As far as I can tell, the `window-scroll-functions` hook is = NOT triggered when `point` STAYS between *old* `window-start` and *old* = `window-end`. So when `point` STAYS between *old* `window-start` and = *old* `window-end`, I will need to use the `post-command-hook`. When = point moves BEYOND *old* `window-start` or `*old* `window-end`, then the = `window-scroll-functions` hook can take over -- with a forced new = `(window-end nil t)`. >=20 > Why do you care about the situation where point stays inside the same > window limits?
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 14 Jun 2014 09:46:02 +0000 Resent-Message-ID: <handler.17678.B17678.140273914322724 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: monnier@HIDDEN Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org Reply-To: Eli Zaretskii <eliz@HIDDEN> Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140273914322724 (code B ref 17678); Sat, 14 Jun 2014 09:46:02 +0000 Received: (at 17678) by debbugs.gnu.org; 14 Jun 2014 09:45:43 +0000 Received: from localhost ([127.0.0.1]:47192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvkWs-0005uR-JZ for submit <at> debbugs.gnu.org; Sat, 14 Jun 2014 05:45:43 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:34047) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <eliz@HIDDEN>) id 1WvkWl-0005u2-RL for 17678 <at> debbugs.gnu.org; Sat, 14 Jun 2014 05:45:37 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0N7500000JZUNN00@HIDDEN> for 17678 <at> debbugs.gnu.org; Sat, 14 Jun 2014 12:45:28 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N75000L5KFRKB30@HIDDEN>; Sat, 14 Jun 2014 12:45:28 +0300 (IDT) Date: Sat, 14 Jun 2014 12:45:18 +0300 From: Eli Zaretskii <eliz@HIDDEN> In-reply-to: <838up0wmoa.fsf@HIDDEN> X-012-Sender: halo1@HIDDEN Message-id: <834mznx1sh.fsf@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> <83ha3qxbcc.fsf@HIDDEN> <jwv7g4lftn7.fsf-monnier+emacsbugs@HIDDEN> <8361k5xra8.fsf@HIDDEN> <jwv8up17zym.fsf-monnier+emacsbugs@HIDDEN> <83r42tvt0l.fsf@HIDDEN> <jwv7g4k7wbo.fsf-monnier+emacsbugs@HIDDEN> <83ha3ox3vk.fsf@HIDDEN> <jwvvbs4ac20.fsf-monnier+emacsbugs@HIDDEN> <838up0wmoa.fsf@HIDDEN> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) > Date: Fri, 13 Jun 2014 23:59:33 +0300 > From: Eli Zaretskii <eliz@HIDDEN> > Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org > > > From: Stefan Monnier <monnier@HIDDEN> > > Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org > > Date: Fri, 13 Jun 2014 14:47:05 -0400 > > > > >> > Not necessarily: there are the w->optional_new_start and > > >> > w-> force_start flags, which determine what redisplay does with > > >> > window-start in these cases. > > >> > Also, the window-start could be set to a value that leaves point out > > >> > of the displayed area, in which case it won't be in effect. > > >> Right, but these fall back into the case where redisplay performs > > >> a second pass trough the window/buffer, so it's similar to the scrolling > > >> case, right? > > > Not necessarily, AFAIR. Sometimes these situations are detected and > > > handled on the fly. > > > > Aha! Could you add comment somewhere in xdisp.c discussing the above > > issues about how/when is window-start obeyed and when it's not and > > when that causes a second pass and when that's handled on the fly? > > I will see what I can do. Done in emacs-24 revision 117239. Please see if it's good enough.
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Keith David Bershatsky <esq@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 14 Jun 2014 17:11:02 +0000 Resent-Message-ID: <handler.17678.B17678.140276585724704 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: 17678 <at> debbugs.gnu.org, monnier@HIDDEN Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140276585724704 (code B ref 17678); Sat, 14 Jun 2014 17:11:02 +0000 Received: (at 17678) by debbugs.gnu.org; 14 Jun 2014 17:10:57 +0000 Received: from localhost ([127.0.0.1]:47922 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1WvrTj-0006QN-N2 for submit <at> debbugs.gnu.org; Sat, 14 Jun 2014 13:10:56 -0400 Received: from cobb.liquidweb.com ([50.28.13.150]:54070) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <esq@HIDDEN>) id 1WvrTg-0006Q2-Og for 17678 <at> debbugs.gnu.org; Sat, 14 Jun 2014 13:10:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Content-Type:Mime-Version:Subject; bh=8Lfqjk3QX9rCww1znBoegMbtgReeHattwPH84VU4JjQ=; b=GEPHoG9DuyMkULtqxBNh6XO8dxI6HA+np2+7IdrS2LOuI7VW7lP/LZuI7HGhQrgbRwxIeT7Oq/wLLHW3dDpUUkzBHgYGTxZsbxpbJ1/lrupbhS/7236slVIhm7BMxCMV; Received: from cpe-75-85-5-102.socal.res.rr.com ([75.85.5.102]:49531 helo=[192.168.0.4]) by cobb.liquidweb.com with esmtpa (Exim 4.82) (envelope-from <esq@HIDDEN>) id 1WvrTY-0003S6-8P; Sat, 14 Jun 2014 13:10:44 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Keith David Bershatsky <esq@HIDDEN> In-Reply-To: <834mznx1sh.fsf@HIDDEN> Date: Sat, 14 Jun 2014 10:10:44 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <EA23585F-F3A7-45AD-9FAF-9BAADC7053C5@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> <83ha3qxbcc.fsf@HIDDEN> <jwv7g4lftn7.fsf-monnier+emacsbugs@HIDDEN> <8361k5xra8.fsf@HIDDEN> <jwv8up17zym.fsf-monnier+emacsbugs@HIDDEN> <83r42tvt0l.fsf@HIDDEN> <jwv7g4k7wbo.fsf-monnier+emacsbugs@HIDDEN> <83ha3ox3vk.fsf@HIDDEN> <jwvvbs4ac20.fsf-monnier+emacsbugs@HIDDEN> <838up0wmoa.fsf@HIDDEN> <834mznx1sh.fsf@HIDDEN> X-Mailer: Apple Mail (2.1084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: authenticated_id: lawlist/from_h X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.0 (/) Thank you both, Eli and Stefan, for helping me to resolve this issue. = The test minor mode concept is working well, with just a few minor = revisions. I posted the test minor mode as an answer on Stackoverflow = (giving credit to both of you for the key ingredient), and I'll probably = revise it a bit over the next few days. That may help future internet = searchers looking for a solution to similar issues. The custom minor mode project I described (with cross-hairs in the form = of thin lines, and end of line indicators) is now shaping up quite = nicely. Your help is greatly appreciated! Keith=
X-Loop: help-debbugs@HIDDEN Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 15 Jun 2014 02:25:01 +0000 Resent-Message-ID: <handler.17678.B17678.140279908824177 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 17678 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: esq@HIDDEN, 17678 <at> debbugs.gnu.org Received: via spool by 17678-submit <at> debbugs.gnu.org id=B17678.140279908824177 (code B ref 17678); Sun, 15 Jun 2014 02:25:01 +0000 Received: (at 17678) by debbugs.gnu.org; 15 Jun 2014 02:24:48 +0000 Received: from localhost ([127.0.0.1]:48090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1Ww07j-0006Hs-GV for submit <at> debbugs.gnu.org; Sat, 14 Jun 2014 22:24:48 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:22685) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <monnier@HIDDEN>) id 1Ww07h-0006Ha-1U for 17678 <at> debbugs.gnu.org; Sat, 14 Jun 2014 22:24:45 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWHgUFCws0BwsUGA0kiAQI0hkXjnoHhDgElGKUN4FqgXGBWyE X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWHgUFCws0BwsUGA0kiAQI0hkXjnoHhDgElGKUN4FqgXGBWyE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="66890427" Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 14 Jun 2014 22:24:38 -0400 Received: by pastel.home (Postfix, from userid 20848) id 51DBD6047C; Sat, 14 Jun 2014 22:24:38 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwvsin65333.fsf-monnier+emacsbugs@HIDDEN> References: <m2ppiphojd.wl%esq@HIDDEN> <jwv38fbe3ls.fsf-monnier+emacsbugs@HIDDEN> <831tuvz3n8.fsf@HIDDEN> <jwvzjhjaz5x.fsf-monnier+emacsbugs@HIDDEN> <83ha3qxbcc.fsf@HIDDEN> <jwv7g4lftn7.fsf-monnier+emacsbugs@HIDDEN> <8361k5xra8.fsf@HIDDEN> <jwv8up17zym.fsf-monnier+emacsbugs@HIDDEN> <83r42tvt0l.fsf@HIDDEN> <jwv7g4k7wbo.fsf-monnier+emacsbugs@HIDDEN> <83ha3ox3vk.fsf@HIDDEN> <jwvvbs4ac20.fsf-monnier+emacsbugs@HIDDEN> <838up0wmoa.fsf@HIDDEN> Date: Sat, 14 Jun 2014 22:24:38 -0400 In-Reply-To: <838up0wmoa.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 13 Jun 2014 23:59:33 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.3 (/) >> Aha! Could you add comment somewhere in xdisp.c discussing the above >> issues about how/when is window-start obeyed and when it's not and >> when that causes a second pass and when that's handled on the fly? > I will see what I can do. > Done in emacs-24 revision 117239. Please see if it's good enough. Looks great, thank you very much. > I'm not sure I follow. Redisplay, at the level we are talking, has no > stages. It goes through all the windows on every frame, and does for > each window what it thinks has to be done in that window. A process > of redisplaying a window is done in one go, there are no stages or > phases in it. AFAIK window-scroll-functions (as well as jit-lock) is run in the middle of redisplay redisplay, so they get to see "the inside" and so they break the illusion that redisplay happens "in one go". > The window-scroll-functions are called when redisplay > thinks it will scroll the window in order to redisplay it. > Which modifications in window-scroll-functions did you have in mind? For example: - if code in window-scroll-functions affects some data which affects the mode-line, will the mode-line correctly reflect the state after running window-scroll-functions? - if code in window-scroll-functions affects some data which influences the display of other windows (e.g. adds overlays, changes window-start, you name it), will those changes be reflected in the other windows at the end of this redisplay cycle? - if point needs to be changed by redisplay (because window-start was set far away), will window-scroll-functions see the "old" point value or the "new" point value? -- Stefan
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.