unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 24.2.90: Confusion in "Top" "nn%" and "Bot".
@ 2012-11-30 21:45 Alan Mackenzie
  2012-12-01 10:40 ` Dani Moncayo
  2012-12-01 13:06 ` Andreas Schwab
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Mackenzie @ 2012-11-30 21:45 UTC (permalink / raw)
  To: emacs-devel

Hi, Emacs.

Forgive me if this has been discussed already; is it a feature or a bug?

1. Display an info page (e.g. "Special Input for Incremental Search")
which fits entirely on the screen (if only just).

2. Note that "Top" rather than the expected "All" is displayed.

3. Scroll the text upwards 6 lines.

4. Now, "9%" rather than "Bot" is displayed.

5. Scroll the text repeatedly upwards.  "nn%" continues to be displayed,
despite the fact that the bottom of the buffer is visible.

6. When the last visible line is scrolled off the window, finally, "Bot"
is displayed.

I think either this behaviour or the manual is buggy.

-- 
Alan Mackenzie (Nuremberg, Germany).



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

* Re: 24.2.90: Confusion in "Top" "nn%" and "Bot".
  2012-11-30 21:45 24.2.90: Confusion in "Top" "nn%" and "Bot" Alan Mackenzie
@ 2012-12-01 10:40 ` Dani Moncayo
  2012-12-01 13:06 ` Andreas Schwab
  1 sibling, 0 replies; 5+ messages in thread
From: Dani Moncayo @ 2012-12-01 10:40 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

> 1. Display an info page (e.g. "Special Input for Incremental Search")
> which fits entirely on the screen (if only just).

In my laptop, that info node doesn't fit entirely on the screen, but
if I try with its parent node, for example ("(emacs) Incremental
Search") which does fit, I observe the problem you mention: "Top" in
the modeline instead of the expected "All".

> 2. Note that "Top" rather than the expected "All" is displayed.
>
> 3. Scroll the text upwards 6 lines.
>
> 4. Now, "9%" rather than "Bot" is displayed.
>
> 5. Scroll the text repeatedly upwards.  "nn%" continues to be displayed,
> despite the fact that the bottom of the buffer is visible.
>
> 6. When the last visible line is scrolled off the window, finally, "Bot"
> is displayed.
>
> I think either this behaviour or the manual is buggy.

Yes, there is a bug somewhere, and is a regression: the 24.2 release does TRT.

I've tried with another manual (GNU Make) and I see the problem there
too (with the trunk, not with the 24.2  release).

So the problem seems to be in Emacs, not in the manual.

HTH

-- 
Dani Moncayo



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

* Re: 24.2.90: Confusion in "Top" "nn%" and "Bot".
  2012-11-30 21:45 24.2.90: Confusion in "Top" "nn%" and "Bot" Alan Mackenzie
  2012-12-01 10:40 ` Dani Moncayo
@ 2012-12-01 13:06 ` Andreas Schwab
  2012-12-01 13:43   ` Eli Zaretskii
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2012-12-01 13:06 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

This is triggered by the invisible text property at the end of the
narrowed region.  When removing it from the buffer the percentage
display works correctly again.

(with-current-buffer (get-buffer-create "*test*")
  (insert #("a\nb\n" 2 4 (invisible t)))
  (display-buffer (current-buffer)))

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Re: 24.2.90: Confusion in "Top" "nn%" and "Bot".
  2012-12-01 13:06 ` Andreas Schwab
@ 2012-12-01 13:43   ` Eli Zaretskii
  2012-12-02  1:08     ` Juri Linkov
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2012-12-01 13:43 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: acm, emacs-devel

> From: Andreas Schwab <schwab@linux-m68k.org>
> Date: Sat, 01 Dec 2012 14:06:08 +0100
> Cc: emacs-devel@gnu.org
> 
> This is triggered by the invisible text property at the end of the
> narrowed region.  When removing it from the buffer the percentage
> display works correctly again.

A simple fix is not to hide the last newline.  This is from the end of
Info-fontify-node:

      ;; Hide empty lines at the end of the node.
      (goto-char (point-max))
      (skip-chars-backward "\n")
      (when (< (1+ (point)) (1- (point-max)))
	(put-text-property (1+ (point)) (1- (point-max)) 'invisible t))

where I decremented point-max in 2 last instances.



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

* Re: 24.2.90: Confusion in "Top" "nn%" and "Bot".
  2012-12-01 13:43   ` Eli Zaretskii
@ 2012-12-02  1:08     ` Juri Linkov
  0 siblings, 0 replies; 5+ messages in thread
From: Juri Linkov @ 2012-12-02  1:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: acm, Andreas Schwab, emacs-devel

> A simple fix is not to hide the last newline.  This is from the end of
> Info-fontify-node:
>
>       ;; Hide empty lines at the end of the node.
>       (goto-char (point-max))
>       (skip-chars-backward "\n")
>       (when (< (1+ (point)) (1- (point-max)))
> 	(put-text-property (1+ (point)) (1- (point-max)) 'invisible t))
>
> where I decremented point-max in 2 last instances.

This will display 2 empty lines defeating the request of bug#12272.
I'll post another patch to bug#12272.



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

end of thread, other threads:[~2012-12-02  1:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-30 21:45 24.2.90: Confusion in "Top" "nn%" and "Bot" Alan Mackenzie
2012-12-01 10:40 ` Dani Moncayo
2012-12-01 13:06 ` Andreas Schwab
2012-12-01 13:43   ` Eli Zaretskii
2012-12-02  1:08     ` Juri Linkov

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).