unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Keith David Bershatsky <esq@lawlist.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22637@debbugs.gnu.org
Subject: bug#22637: 25.1.50; `mode-line` face `:height` incompatible with `scroll-conservatively 101`.
Date: Mon, 15 Feb 2016 18:51:26 -0800	[thread overview]
Message-ID: <m2io1pfjv5.wl%esq@lawlist.com> (raw)
In-Reply-To: <m21t8ioevq.wl%esq@lawlist.com>

The same situation mentioned in my email earlier today (02/15/2016) is also present in the first test case that we looked at for #22637.   I.e., after an insertion in the first test case, the `window-scroll-functions` hook never fires after `window-start` is corrected.  So a user seeking to use the `window-scroll-functions` hook following a large insertion (e.g., a large yank, and so forth) is out of luck in that situation in terms of using a correct `window-start`.  I have already dealt with it for the `window-start-end-hook` by forcing a call every command loop thereby bypassing "optimization 3"; however, the WSF has no fix at this time.

The difference between the first and second test case is as follows:  The first test case deals with a straight insertion.  The second test case uses insertion merely to populate the buffer with some text so that we can then see what happens when using `goto-char`.  I commented out the two lines of `goto-char` in the `test` function below to replicate the first test case scenario.  The prior email is the second test case scenario.


(face-spec-set 'mode-line
'((((class color) (min-colors 88))
   :box (:line-width -1 :style released-button)
   :background "grey75" :foreground "black" :height 120)
  (t
   :inverse-video t)))

(setq scroll-conservatively 101)
(global-eldoc-mode -1)
(global-font-lock-mode -1)
(blink-cursor-mode -1)

(defun test ()
 (interactive)
 (switch-to-buffer (get-buffer-create "*foo*"))
 (add-hook 'window-scroll-functions 'wsf-test-fn nil 'local)
 (buffer-disable-undo)
 (setq undo-auto-current-boundary-timer t
	timer-list (delq 'undo-auto--boundary-timer timer-list))
 (dotimes (i 200)
   (insert (format "I will not obey absurd orders %d.\n" i)))
 ;; (goto-char (point-min))
 ;; (goto-char (- (point-max) 1000))
  )

(defun wsf-test-fn (win start)
  (let* (
      (end (window-end nil t))
      (pos-visible (pos-visible-in-window-p nil win nil)) )
    (message "window-start: %s | window-end: %s | pos-visible: %s"
      start end pos-visible)))

(global-set-key [f1] 'test)





  parent reply	other threads:[~2016-02-16  2:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-12  2:12 bug#22637: 25.1.50; `mode-line` face `:height` incompatible with `scroll-conservatively 101` Keith David Bershatsky
2016-02-12  8:17 ` Eli Zaretskii
2016-02-12 16:17 ` Keith David Bershatsky
2016-02-12 19:40   ` Eli Zaretskii
2016-02-14  3:40 ` Keith David Bershatsky
2016-02-14  6:05   ` Eli Zaretskii
2016-02-14  7:55 ` Keith David Bershatsky
2016-02-14 19:26   ` Eli Zaretskii
2016-02-16  2:00 ` Keith David Bershatsky
2016-02-16  2:51 ` Keith David Bershatsky [this message]
2016-02-16 15:51   ` Eli Zaretskii
2022-02-10  8:09     ` Lars Ingebrigtsen
2022-02-10 12:33       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

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

  git send-email \
    --in-reply-to=m2io1pfjv5.wl%esq@lawlist.com \
    --to=esq@lawlist.com \
    --cc=22637@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).