all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6385: A slightly less aggressive fit-window-to-buffer
@ 2010-06-09 18:56 Lennart Borgman
  2010-06-11 13:21 ` martin rudalics
  2011-10-11  9:31 ` martin rudalics
  0 siblings, 2 replies; 23+ messages in thread
From: Lennart Borgman @ 2010-06-09 18:56 UTC (permalink / raw)
  To: 6385

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

I believe fit-window-to-buffer has become a bit upset and unnecessary
aggressive because of visual lines. It looks like it need a bit more
feedback from the display system to be really sure that the buffer is
entirely visible.

The attached patch is something I have used to get around the problem.
I am not sure it is the right thing but I am rather sure it does not
hurt.

Too see the problem it tries to fix just call the function with a
buffer larger than window and point below the window bottom (you have
to write a bit elisp code for that).

Of course we need a non-killing version of fit-window-to-buffer, but
for the moment this patch might be useful.

[-- Attachment #2: windows-less-aggressive-fit-1.diff --]
[-- Type: text/x-patch, Size: 612 bytes --]

=== modified file 'lisp/window.el'
--- trunk/lisp/window.el	2010-06-07 18:28:02 +0000
+++ patched/lisp/window.el	2010-06-09 18:48:37 +0000
@@ -1502,10 +1502,12 @@
 			     (forward-line 0))
 			   (point))))
 		(set-window-vscroll window 0)
+                (redisplay t)
 		(while (and (< desired-height max-height)
 			    (= desired-height (window-height))
 			    (not (pos-visible-in-window-p end)))
 		  (enlarge-window 1)
+                  (redisplay t)
 		  (setq desired-height (1+ desired-height))))
 	      ;; Return non-nil only if nothing "bad" happened.
 	      (setq value t)))


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2011-10-11  9:31 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-09 18:56 bug#6385: A slightly less aggressive fit-window-to-buffer Lennart Borgman
2010-06-11 13:21 ` martin rudalics
2010-06-11 17:15   ` Lennart Borgman
2010-06-12  8:00     ` martin rudalics
2010-06-12 13:03       ` Lennart Borgman
2010-06-12 14:16         ` martin rudalics
2010-06-12 14:24           ` Lennart Borgman
2010-06-13  7:51             ` martin rudalics
2010-06-13 15:23               ` Lennart Borgman
2010-06-12 15:21       ` Drew Adams
2010-06-13  7:51         ` martin rudalics
2010-06-13 12:39           ` Drew Adams
2010-06-13 14:34             ` martin rudalics
2010-06-13 15:20               ` Lennart Borgman
2010-06-13 17:44                 ` martin rudalics
2010-06-13 17:48                   ` Lennart Borgman
2010-06-13 16:33               ` Drew Adams
2010-06-13 17:45                 ` martin rudalics
2010-06-13 18:21                   ` Drew Adams
2010-06-13 20:04                     ` Stefan Monnier
2010-06-14  6:49                     ` martin rudalics
2010-06-14  6:57                       ` Drew Adams
2011-10-11  9:31 ` martin rudalics

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.