unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37941: 26.3.50; Wrong behavior when reverting a tabulated-list-mode buffer with truncated lines
@ 2019-10-27 10:02 Michał Krzywkowski
  2019-10-27 15:09 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Krzywkowski @ 2019-10-27 10:02 UTC (permalink / raw)
  To: 37941

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


When I revert a regular tabulated-list-mode buffer, the point stays the
same, and the displayed buffer boundaries remain the same as well.

However, when the entries in tabulated-list-entries contain strings that
are too long and will be truncated, reverting such buffer will scroll
the screen by one line.

To see this behavior, evaluate in emacs -Q, then type g:

  (with-current-buffer (generate-new-buffer "test")
    (require 'cl-lib)
    (tabulated-list-mode)
    (setq tabulated-list-format [("No." 5) ("Message" 10)])
    (let ((message (make-string 100 ?a)))
      (setq tabulated-list-entries
            (cl-loop for i from 1 to 100
                     collect `(,i [,(number-to-string i) ,message]))))
    (tabulated-list-init-header)
    (revert-buffer)
    (forward-line 50)
    (pop-to-buffer (current-buffer))
    (recenter))

You can also see that if the lines are not truncated, the behavior is
correct.

In GNU Emacs 26.3.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
 of 2019-10-08 built on debian
Repository revision: 55dcd32ad2209dc34bfb6b713bf73be9bf4c4cb2
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description:	Debian GNU/Linux 10 (buster)


--
Michał Krzywkowski
PGP: A5A7 06C4 28EF 8F64 2868 13A1 7BDE C129 F0B8 09A1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* bug#37941: 26.3.50; Wrong behavior when reverting a tabulated-list-mode buffer with truncated lines
  2019-10-27 10:02 bug#37941: 26.3.50; Wrong behavior when reverting a tabulated-list-mode buffer with truncated lines Michał Krzywkowski
@ 2019-10-27 15:09 ` Eli Zaretskii
  2019-10-27 19:12   ` Michał Krzywkowski
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2019-10-27 15:09 UTC (permalink / raw)
  To: Michał Krzywkowski; +Cc: 37941

> From: Michał Krzywkowski <mkrzywkow@gmail.com>
> Date: Sun, 27 Oct 2019 11:02:39 +0100
> 
> When I revert a regular tabulated-list-mode buffer, the point stays the
> same, and the displayed buffer boundaries remain the same as well.
> 
> However, when the entries in tabulated-list-entries contain strings that
> are too long and will be truncated, reverting such buffer will scroll
> the screen by one line.
> 
> To see this behavior, evaluate in emacs -Q, then type g:
> 
>   (with-current-buffer (generate-new-buffer "test")
>     (require 'cl-lib)
>     (tabulated-list-mode)
>     (setq tabulated-list-format [("No." 5) ("Message" 10)])
>     (let ((message (make-string 100 ?a)))
>       (setq tabulated-list-entries
>             (cl-loop for i from 1 to 100
>                      collect `(,i [,(number-to-string i) ,message]))))
>     (tabulated-list-init-header)
>     (revert-buffer)
>     (forward-line 50)
>     (pop-to-buffer (current-buffer))
>     (recenter))
> 
> You can also see that if the lines are not truncated, the behavior is
> correct.

Thanks, should be fixed now.  Please test.





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

* bug#37941: 26.3.50; Wrong behavior when reverting a tabulated-list-mode buffer with truncated lines
  2019-10-27 15:09 ` Eli Zaretskii
@ 2019-10-27 19:12   ` Michał Krzywkowski
  2019-10-27 19:24     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Krzywkowski @ 2019-10-27 19:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Michał Krzywkowski, 37941

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


>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
    Eli> Thanks, should be fixed now.  Please test.

Indeed the problem is fixed now, thanks.

--
Michał Krzywkowski
PGP: A5A7 06C4 28EF 8F64 2868 13A1 7BDE C129 F0B8 09A1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* bug#37941: 26.3.50; Wrong behavior when reverting a tabulated-list-mode buffer with truncated lines
  2019-10-27 19:12   ` Michał Krzywkowski
@ 2019-10-27 19:24     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2019-10-27 19:24 UTC (permalink / raw)
  To: Michał Krzywkowski; +Cc: 37941-done

> From: Michał Krzywkowski <mkrzywkow@gmail.com>
> Cc: Michał Krzywkowski <mkrzywkow@gmail.com>,
>  37941@debbugs.gnu.org
> Date: Sun, 27 Oct 2019 20:12:49 +0100
> 
> >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
>     Eli> Thanks, should be fixed now.  Please test.
> 
> Indeed the problem is fixed now, thanks.

Thanks for testing, I'm therefore closing this bug.





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

end of thread, other threads:[~2019-10-27 19:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-27 10:02 bug#37941: 26.3.50; Wrong behavior when reverting a tabulated-list-mode buffer with truncated lines Michał Krzywkowski
2019-10-27 15:09 ` Eli Zaretskii
2019-10-27 19:12   ` Michał Krzywkowski
2019-10-27 19:24     ` Eli Zaretskii

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