all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Michał Krzywkowski" <mkrzywkow@gmail.com>
Cc: 37941@debbugs.gnu.org
Subject: bug#37941: 26.3.50; Wrong behavior when reverting a tabulated-list-mode buffer with truncated lines
Date: Sun, 27 Oct 2019 17:09:15 +0200	[thread overview]
Message-ID: <83pniirzs4.fsf@gnu.org> (raw)
In-Reply-To: <87d0eiwlog.fsf@gmail.com> (message from Michał Krzywkowski on Sun, 27 Oct 2019 11:02:39 +0100)

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





  reply	other threads:[~2019-10-27 15:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-10-27 19:12   ` Michał Krzywkowski
2019-10-27 19:24     ` 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

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

  git send-email \
    --in-reply-to=83pniirzs4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=37941@debbugs.gnu.org \
    --cc=mkrzywkow@gmail.com \
    /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 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.