unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Andrew Yu <libre@andrewyu.org>
To: help-gnu-emacs@gnu.org
Subject: Do not display bottom logical lines that don't fit with visual-line-mode
Date: Mon, 7 Feb 2022 23:45:57 +0800	[thread overview]
Message-ID: <20220207154557.c77hv527us4x5ezf@gentoo-dell> (raw)

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

Hello.

When using visual-line-mode, by default long lines at the bottom of the
window are partially displayed.  I would like to replace the beginning
of each physical line in the undisplayable logical line with @s, as how
Vim does it by default.

(The @s are just for familiarity, it's okay if it's something else,
though in that case it's probably easy to change.)

The example below does not use word-wrap or anything like that.  Line
numbers are absolute.  The cursor is indicated with #.

File (raw, sorry if your email reader doesn't line wrap):
Short line.                                                     
Long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line.

Wanted behavior (viewport shorter than that but taller than two physical
lines):
+----------------------------------------------------------------------+
|  1  Short line.                                                      |
|  2  @                                                                |
|     @                                                                |
|     @                                                                |
|     @                                                                |
|     @                                                                |
+----------------------------------------------------------------------+

Emacs behavior (viewport shorter than that but taller than two physical
lines):
+----------------------------------------------------------------------+
|  1  Short line.                                                      |
|  2  Long long long long long long long long long long long long long |
|     long long long long long long long long long long long long long |
|     long long long long long long long long long long long long long |
|     long long long long long long long long long long long long long |
|     long long long long long long long long long long long long long |
+----------------------------------------------------------------------+

As you can see, the emacs version has the long line truncated, instead
of not being displayed.

The reason for me to do so is I'm using vertical splits with follow-mode
in order to expand the lines of text I can display.  However I encounter
long lines in my org and LaTeX documents.  It's quite annoying to have
the last line in the left column display incompletely, and have the
right column start from the beginning of the incompletely displayed
logical line.  Of course it'd be cool to fix follow-mode to account for
visual-line-mode, but I'd still want the Vim-like behavior because lines
splitting across windows may still confuse me.

Are there any minor modes for this?  Or other ways to get this?

Thanks!

========================================================================
Defend software freedom (https://fsf.org)
End software patents (https://endsoftwarepatents.org)
Read EULAs (https://www.eff.org/wp/dangerous-terms-users-guide-eulas)

New sites, suggestions welcome:
Free Computing Movement (https://fcm.andrewyu.org)
Host Things Yourself (https://host.andrewyu.org)
Libre Society (https://project.andrewyu.org/libresociety)

To any Skynet, FBI, CIA, NSA, etc. agents reading my email: please
consider whether defending the Constitution and our basic rights to
freedom and speech and privacy against all enemies, foreign or domestic,
requires you to follow Snowden's example.  (Adapted from RMS)

Andrew Yu <andrew@andrewyu.org> (https://www.andrewyu.org)

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

                 reply	other threads:[~2022-02-07 15:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20220207154557.c77hv527us4x5ezf@gentoo-dell \
    --to=libre@andrewyu.org \
    --cc=help-gnu-emacs@gnu.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.
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).