GNU bug report logs -
#74178
Handle tab stops on display so they work in variable-pitch-mode
Previous Next
To reply to this bug, email your comments to 74178 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74178
; Package
emacs
.
(Sat, 02 Nov 2024 18:08:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
dannym <at> friendly-machines.com
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 02 Nov 2024 18:08:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
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.
I successfully tested both console and graphical emacs.
In GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41,
cairo version 1.18.0)
System Description: Guix System
Configured using:
'configure
CONFIG_SHELL=/gnu/store/3jhfhxdf6v5ms10x5zmnl166dh3yhbr1-bash-minimal-5.1.16/bin/bash
SHELL=/gnu/store/3jhfhxdf6v5ms10x5zmnl166dh3yhbr1-bash-minimal-5.1.16/bin/bash
--prefix=/gnu/store/9q1cfyj0bk0lqvx75pg9gn4isnlz2llv-emacs-pgtk-29.4
--enable-fast-install --with-pgtk --with-cairo --with-modules
--with-native-compilation=aot --disable-build-details'
[emacs-tab-stops-v2.patch (text/x-diff, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74178
; Package
emacs
.
(Sat, 02 Nov 2024 18:46:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 74178 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 02 Nov 2024 19:06:54 +0100
> From: dannym <at> 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?
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 02 Jan 2025 02:09:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 168 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.