From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: lompik@voila.fr Newsgroups: gmane.emacs.bugs Subject: bug#18545: 24.4.50: Bug - forward-line inside with-selected-window Date: Mon, 29 Sep 2014 02:31:04 +0200 (CEST) Message-ID: <379420908.148791411950664752.JavaMail.www@wwinf7125> References: <1107752996.69181411565675842.JavaMail.www@wwinf7125> Reply-To: lompik@voila.fr NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1411950747 8974 80.91.229.3 (29 Sep 2014 00:32:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Sep 2014 00:32:27 +0000 (UTC) Cc: 18545@debbugs.gnu.org To: Eli Zaretskii , rudalics@gmx.at Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 29 02:32:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XYOt2-0004mS-O4 for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Sep 2014 02:32:20 +0200 Original-Received: from localhost ([::1]:33709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYOt1-0004ut-UD for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Sep 2014 20:32:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYOsu-0004to-0N for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 20:32:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYOsp-0001Eh-Ad for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 20:32:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYOsp-0001EM-7g for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 20:32:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XYOsj-0002k4-QP for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 20:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: lompik@voila.fr Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Sep 2014 00:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18545 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18545-submit@debbugs.gnu.org id=B18545.141195067010466 (code B ref 18545); Mon, 29 Sep 2014 00:32:01 +0000 Original-Received: (at 18545) by debbugs.gnu.org; 29 Sep 2014 00:31:10 +0000 Original-Received: from localhost ([127.0.0.1]:54646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYOrt-0002ij-CE for submit@debbugs.gnu.org; Sun, 28 Sep 2014 20:31:09 -0400 Original-Received: from smtpout1.voila.fr ([193.252.22.125]:42559 helo=smtpout.voila.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYOrq-0002iY-KV for 18545@debbugs.gnu.org; Sun, 28 Sep 2014 20:31:08 -0400 Original-Received: from wwinf7125 ([10.232.48.92]) by mwinf5d64 with ME id woX41o00C1zLhPN03oX4A2; Mon, 29 Sep 2014 02:31:04 +0200 X-ME-Helo: wwinf7125 X-ME-Auth: bG9tcGlrQHZvaWxhLmZy X-ME-Date: Mon, 29 Sep 2014 02:31:04 +0200 X-ME-IP: 108.79.16.77 In-Reply-To: <83oatzmy5h.fsf@gnu.org> X-Originating-IP: [108.79.16.77] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~||~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93845 Archived-At: It still wrong scroll with all the 3 patches.I guess it is configuration sp= ecific + a call to "C-h k a".Fortunately, I had some some time to spend on = it and here's a=20 minimal example: 1. emacs -Q 2. define following settings: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;;;;;;;;;;;;;; ;; scale minibuffer font up on entering (defun my-minibuffer-setup () (set (make-local-variable 'face-remapping-alist) '((default :height 1.8)))) (add-hook 'minibuffer-setup-hook 'my-minibuffer-setup) ;; make *Completions* buffer editable and add header line + insert "hello w= orld" as overlay (global-set-key (kbd "C-!") '(lambda () (interactive) (with-selected-window (get-buffer-window "*Completions*") (blink-cursor-mode -1) (read-only-mode 0) (goto-char 0) (let ((start (point))) (setq header-line-format (propertize "Header line appears here" 'face 'header-line)) (insert "test:") (overlay-put (make-overlay (point-at-bol) (point-at-eol)) 'display "Hello World") (insert "\n") (put-text-property start (point) 'face '(:family "Sans Serif" :foreground "black" :height 1.3 :weight bold) = ))))) ; some key-bindings to navigate *Completion* buffer from minibuffer=20 (global-set-key (kbd "C-`") '(lambda () (interactive) (with-selected-window (get-buffer-window "*Completions*") (forward-line 1)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3. hit the following key sequence: C-x C-f -> in a folder with lots of files [tab]x2 -> open completion buffer C-! -> modify completion buffer C-h k a -> Show help for letter "a" (Important ! skipping this results in n= o bug )=20 C-` until bottom of *Completions* buffer -> no scrolling, I have applied the 3 patches that you supplied on emacs bzr revno 117517. I= have tested this on 24.3.93 as well. Regards, Lompik. > Message du 28/09/14 =C3=A0 19h51 > De : "Eli Zaretskii"=20 > A : rudalics@gmx.at > Copie =C3=A0 : lompik@voila.fr, 18545@debbugs.gnu.org > Objet : Re: bug#18545: 24.4.50: Bug - forward-line inside with-selected-w= indow >=20 > > Date: Sun, 28 Sep 2014 19:29:47 +0300 > > From: Eli Zaretskii=20 > > Cc: lompik@voila.fr, 18545@debbugs.gnu.org > >=20 > > > Date: Sun, 28 Sep 2014 11:34:44 +0200 > > > From: martin rudalics=20 > > > CC: lompik@voila.fr, 18545@debbugs.gnu.org > > >=20 > > > > Hmm... I wonder why did we enter this area of the code, i.e. why di= d > > > > this condition fire: > > > > > > > > /* Handle case where place to start displaying has been specified, > > > > unless the specified location is outside the accessible range. */ > > > > if (w->force_start || window_frozen_p (w)) > > > > > > > > Was w->force_start non-zero, or did window_frozen_p return non-zero= ? > > > > If the former, can you see where was the force_start flag set? (I'd > > > > be surprised if it's the latter, since windows are only frozen when= we > > > > grow the minibuffer, which shouldn't be happening here, I think.) > > > > > > > > In general, if the force_start flag of a window is set, that means = we > > > > shouldn't scroll, so bringing point back into view makes sense. > > >=20 > > > That's likely me. Under certain conditions I do `recenter' with a > > > negative argument in `post-command-hook' which basically looks like > > >=20 > > > (recenter (max 0 (- (window-height) 7))) > > >=20 > > > which triggers w->force_start being set here in xdisp.c: > > >=20 > > > if (IT_CHARPOS (it) =3D=3D PT) > > > w->force_start =3D 1; > >=20 > > That's what I thought. > >=20 > > > So my case _is_ very likely special. Still "bringing point back into > > > view" shouldn't make point appear on a partially visible line. > >=20 > > No, that's likely the bug here. I will look into that. >=20 > Does the patch below help? If not, can you tell where I goofed? >=20 > =3D=3D=3D modified file 'src/xdisp.c' > --- src/xdisp.c 2014-09-25 07:01:35 +0000 > +++ src/xdisp.c 2014-09-28 17:45:22 +0000 > @@ -16179,15 +16179,21 @@ redisplay_window (Lisp_Object window, bo > && CHARPOS (startp) >=3D BEGV > && CHARPOS (startp) <=3D ZV) > { > + ptrdiff_t it_charpos; > + > w->optional_new_start =3D 0; > start_display (&it, w, startp); > move_it_to (&it, PT, 0, it.last_visible_y, -1, > MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); > - if (IT_CHARPOS (it) =3D=3D PT) > - w->force_start =3D 1; > - /* IT may overshoot PT if text at PT is invisible. */ > - else if (IT_CHARPOS (it) > PT && CHARPOS (startp) <=3D PT) > - w->force_start =3D 1; > + it_charpos =3D IT_CHARPOS (it); > + if (line_bottom_y (&it) < it.last_visible_y) > + { > + if (it_charpos =3D=3D PT) > + w->force_start =3D 1; > + /* IT may overshoot PT if text at PT is invisible. */ > + else if (it_charpos > PT && CHARPOS (startp) <=3D PT) > + w->force_start =3D 1; > + } > } >=20 > force_start: >=20 >=20 ___________________________________________________________ Mode, hifi, maison,=E2=80=A6 J'ach=C3=A8te malin. Je compare les prix avec = Voila.fr http://shopping.voila.fr/