all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: dick <dick.r.chiang@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gregory@heytings.org, 57669@debbugs.gnu.org
Subject: bug#57669: 29.0.50; C-n, C-p off under long lines
Date: Fri, 09 Sep 2022 09:08:46 -0400	[thread overview]
Message-ID: <87mtb8hezl.fsf@dick> (raw)
In-Reply-To: <8335d1dr39.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 09 Sep 2022 09:00:58 +0300")

> because before the change Emacs couldn't cope with such files at all

Oh, I know what you're trying to do.  After all Commercial Emacs's
original attempt at "making the best of a bad situation" was the impetus
for your own poke at the pig.

When 29 goes mainstream, just be prepared to auto-reply "Does your file
have a long line?" when feckless users ask, "Why did C-n go to a weird
column?"

And to be clear, you're going from "ineffable" performance to just
"underwhelming."  As of cb036a7 you still need find-file-literally for
some semblance of respectability.

OUTPUT:

Under long-line-threshold=nil find-file 62s
Under long-line-threshold=10000 find-file 27s
Under long-line-threshold=nil find-file-literally 30s
Under long-line-threshold=10000 find-file-literally 4s

INPUT: C-n through file of alternating short and long lines.

src/emacs -Q -l cl-lib --eval "                                   \
(let ((long-line-threshold 10000)                                 \
      (file (make-temp-file \"baz\")))                            \
  (cl-assert (= 80 (window-width)) t)                             \
  (with-temp-file file						  \
    (dotimes (i 100)                                              \
      (insert (make-string (if (zerop (% i 2))                    \
                               200                                \
                             (1+ long-line-threshold))            \
                 ?x) \"\n\")))	                                  \
  (dolist (config (list (cons nil (function find-file))           \
                        (cons long-line-threshold (function find-file))         \
                        (cons nil (function find-file-literally)) \
                        (cons long-line-threshold (function find-file-literally)))) \
    (let* ((long-line-threshold (car config))                     \
           (note (format \"long-line-threshold=%s %s\"            \
                         (car config) (cdr config)))              \
           (buffer (funcall (cdr config) file)))                  \
      (with-current-buffer buffer                                 \
        (show-paren-mode -1)                                      \
        (goto-char (point-min))                                   \
        (princ (format \"Under %s %ds\n\" note                    \
                  (fround (car (benchmark-run                     \
                       (while (condition-case nil                 \
                           (prog1 t (call-interactively           \
                             (function next-line))                \
                           (redisplay))                           \
                         (end-of-buffer)))))))                    \
          (function external-debugging-output)))                  \
      (kill-buffer buffer)))                                      \
   (kill-emacs))"





  reply	other threads:[~2022-09-09 13:08 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08  5:40 bug#57669: 29.0.50; C-n, C-p off under long lines dick.r.chiang
2022-09-08  7:38 ` Gregory Heytings
2022-09-08  8:17 ` Eli Zaretskii
2022-09-08 12:02   ` dick
2022-09-08 17:12     ` Gregory Heytings
2022-09-08 18:13       ` dick
2022-09-08 18:26         ` Gregory Heytings
2022-09-09  6:00         ` Eli Zaretskii
2022-09-09 13:08           ` dick [this message]
2022-09-09 13:38             ` Gregory Heytings
2022-09-09 14:34               ` dick
2022-09-09 14:39                 ` Gregory Heytings
2022-09-09 15:06                   ` dick
2022-09-09 15:41                     ` Gregory Heytings
2022-09-09 16:30                       ` dick
2022-09-09 16:42                         ` Gregory Heytings
2022-09-09 17:11                           ` dick
2022-09-09 18:09                             ` Gregory Heytings
2022-09-09 15:49                 ` Eli Zaretskii
2022-09-09 15:58                   ` Gregory Heytings
2022-09-09 16:04                     ` Eli Zaretskii
2022-09-09 14:12             ` Eli Zaretskii
2022-09-09 15:04               ` dick
2022-09-09 15:19                 ` Gregory Heytings
2022-09-09 15:52                   ` dick
2022-09-09 16:03                     ` Eli Zaretskii
2022-09-09 16:06                       ` Gregory Heytings
2022-09-09 16:19                         ` Eli Zaretskii
2022-09-09 16:25                           ` Gregory Heytings
2022-09-09 17:44                           ` dick
2022-09-09 18:06                             ` Eli Zaretskii
2022-09-09 18:22                               ` dick
2022-09-09 18:57                                 ` Eli Zaretskii
2022-09-09 19:28                                   ` dick
2022-09-09 19:38                                     ` Eli Zaretskii
2022-09-09 19:55                                   ` dick
2022-09-09 21:28                                     ` Gregory Heytings
2022-09-09 22:00                                       ` dick
2022-09-09 22:44                                         ` Gregory Heytings
2022-09-09 23:27                                           ` dick
2022-09-10  8:32                                             ` Eli Zaretskii
2022-09-10 12:51                                               ` dick
2022-09-10 13:09                                                 ` Eli Zaretskii
2022-09-10 13:29                                                   ` Eli Zaretskii
2022-09-10 13:22                                                 ` Eli Zaretskii
2022-09-10 14:03                                                   ` dick
2022-09-10 14:20                                                     ` Eli Zaretskii
2022-09-10 14:52                                                       ` dick
2022-09-10 10:26                                             ` Gregory Heytings
2022-09-10  7:45                                     ` Eli Zaretskii
2022-09-10 12:07                                       ` dick
2022-09-10 12:20                                         ` dick
2022-09-10 12:24                                         ` Eli Zaretskii
2022-09-10 16:55                                       ` Gregory Heytings

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=87mtb8hezl.fsf@dick \
    --to=dick.r.chiang@gmail.com \
    --cc=57669@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=gregory@heytings.org \
    /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.