From: Eli Zaretskii <eliz@gnu.org>
To: dannym@friendly-machines.com
Cc: 74178@debbugs.gnu.org
Subject: bug#74178: Handle tab stops on display so they work in variable-pitch-mode
Date: Sat, 02 Nov 2024 20:45:02 +0200 [thread overview]
Message-ID: <865xp5xyoh.fsf@gnu.org> (raw)
In-Reply-To: <0977f406630ca447c857de6c38a9df7e@friendly-machines.com> (dannym@friendly-machines.com)
> Date: Sat, 02 Nov 2024 19:06:54 +0100
> From: dannym@friendly-machines.com
>
> Right now, when using variable-pitch-mode, there's no way for the user
> to make tables. This patch adds a feature to do that.
>
> This patch handles tab-stop-list in the display part of emacs so that
> they work as expected when using variable-pitch-mode.
>
> The unit of the values in tab-stop-list is space characters.
>
> The reasons why those values are in space characters are:
>
> - Works with HiDPI and LoDPI screens the same way with the same values
> inside tab-stop-list.
> - Works in console emacs.
> - Works in graphical emacs.
> - Is backward compatible.
>
> My assumption is that existing user files either don't have any '\t'
> in their buffers or they are using the (previous) high-level version
> of emacs tab-stop-list (which will replace all '\t' by some spaces),
> not both. This way, emacs without the patch is forward-compatible
> to emacs with the patch.
>
> This is a version that will use tabs in the order they appear in the
> tab-stop-list, (on purpose) regardless of whether the text on the
> line already exceeded the respective tab stop position (because it's
> still better not to use the wrong column in the table).
>
> Each respective tab stop, in order, will be used for a respective
> '\t', per line. If these fixed tab stops are used up, it will fall
> back to the automatic tab stops every tab_width that emacs also
> already had done before.
>
> The list of tab stops is buffer-local--as before.
Thanks, but please tell how this feature is intended to be used. In
particular, what would be the value of the new buffer-local variable,
and how will the tab stops of this value be determined by users or
Lisp programs who want to take advantage of this feature?
There are also some technical problems with the idea of your
implementation: for example, it sounds like the display iterator will
need to always start from the beginning of a physical line, otherwise
it will be unable to correctly account for the tab stops before the
position where it is initialized. But let's ignore these aspects for
now and talk about the general idea, because it's possible that the
feature could be implemented in some other way that is free of these
problems.
P.S. There's also the issue of assigning to the FSF the copyright for
your work, without which we will be unable to accept a contribution of
this size. Should I send you the form to fill and the instructions,
to start the legal paperwork rolling?
prev parent reply other threads:[~2024-11-02 18:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-02 18:06 bug#74178: Handle tab stops on display so they work in variable-pitch-mode dannym
2024-11-02 18:45 ` Eli Zaretskii [this message]
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=865xp5xyoh.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=74178@debbugs.gnu.org \
--cc=dannym@friendly-machines.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.