* bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe
@ 2022-12-11 11:13 Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-11 14:43 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-12-11 11:13 UTC (permalink / raw)
To: 59963
[-- Attachment #1: Type: text/plain, Size: 21389 bytes --]
'window-max-chars-per-line' doesn't always work on GUI when fringe width
is set to zero. Although it returns seemingly correct answer, actually
writing that characters results in the continuation/truncation glyph to
appear, decreasing the text area width.
I don't know precisely what condition needs to be meet for trigger the
bug. But I think this is triggered when the width of the text area of
window in character is a fraction. For example, my window is 1366px
width, each character takes 8px; so my window is 170.75 characters
width, and this triggers the bug.
This bug affects Term, Eat, Eat in Eshell, Coterm in Shell mode, Vterm,
and possibly any other Emacs terminal emulator.
Reproduction steps:
1. Run the command 'emacs -nw -Q' in any of the terminal emulators
listed above.
2. Remove fringes with 'M-: (set-window-fringes nil 0 0)'.
3. To make the bug is even more clear, enable 'visual-line-mode'.
4. If everything seem to be OK, resize the window.
[ Reported originally on Eat issue tracker on Codeberg by @rahguzar.
https://codeberg.org/akib/emacs-eat/issues/14 ]
In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.30, cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Guix System
Configured using:
'configure
CONFIG_SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash
SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash
--prefix=/gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528
--enable-fast-install --with-sqlite3 --with-xinput2 --with-xwidgets
--with-modules --with-cairo --with-native-compilation
--disable-build-details'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM XWIDGETS GTK3
ZLIB
Important settings:
value of $EMACSLOADPATH: /home/akib/.guix-profile/share/emacs/site-lisp:/gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp
value of $LANG: en_US.utf8
value of $XMODIFIERS: @im=exwm-xim
locale-coding-system: utf-8-unix
Major mode: Group
Minor modes in effect:
coterm-mode: t
global-git-commit-mode: t
magit-auto-revert-mode: t
eat-eshell-visual-command-mode: t
eat-eshell-mode: t
shell-dirtrack-mode: t
lin-mode: t
gnus-undo-mode: t
diff-hl-margin-mode: t
diff-hl-flydiff-mode: t
hl-line-mode: t
desktop-save-mode: t
gcmh-mode: t
server-mode: t
gtags-mode: t
corfu-doc-mode: t
corfu-history-mode: t
global-corfu-mode: t
corfu-mode: t
global-anzu-mode: t
anzu-mode: t
isearch-mb-mode: t
global-auto-revert-mode: t
save-place-mode: t
electric-pair-mode: t
gc-buffers-mode: t
which-key-mode: t
marginalia-mode: t
vertico-mode: t
minibar-mode: t
winner-mode: t
workroom-winner-mode: t
workroom-auto-project-workroom-mode: t
workroom-desktop-save-mode: t
workroom-mode: t
savehist-mode: t
recentf-mode: t
shackle-mode: t
blow-mode: t
leaf-key-override-global-mode: t
el-patch-use-package-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
buffer-read-only: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
/home/akib/.config/emacs/elpa/transient-20220717.1713/transient hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/transient
/home/akib/.config/emacs/elpa/jsonrpc-1.0.15.0.20220714.101331/jsonrpc hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/jsonrpc
/home/akib/.config/emacs/elpa/flymake-1.2.2.0.20221026.210423/flymake hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/progmodes/flymake
/home/akib/.config/emacs/elpa/eglot-1.9.0.20221118.235517/eglot hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/progmodes/eglot
/home/akib/.config/emacs/elpa/xref-1.5.1.0.20221015.114321/xref hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/progmodes/xref
/home/akib/.config/emacs/elpa/project-0.8.3.0.20221114.1910/project hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/progmodes/project
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-desktop-notifications hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-desktop-notifications
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-speedbar hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-speedbar
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-imenu hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-imenu
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-pcomplete hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-pcomplete
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-compat hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-compat
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-replace hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-replace
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-notify hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-notify
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-stamp hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-stamp
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-capab hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-capab
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-lang hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-lang
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-loaddefs hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-loaddefs
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-match hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-match
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-list hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-list
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-truncate hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-truncate
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-services hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-services
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-sound hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-sound
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-button hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-button
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-dcc hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-dcc
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-page hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-page
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-log hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-log
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-goodies hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-goodies
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-ezbounce hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-ezbounce
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-menu hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-menu
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-common hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-common
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-join hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-join
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-xdcc hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-xdcc
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-ibuffer hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-ibuffer
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-status-sidebar hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-status-sidebar
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-netsplit hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-netsplit
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-spelling hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-spelling
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-networks hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-networks
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-autoaway hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-autoaway
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-track hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-track
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-backend hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-backend
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-ring hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-ring
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-identd hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-identd
/home/akib/.config/emacs/elpa/erc-5.4.1.0.20221104.193223/erc-fill hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/erc/erc-fill
/home/akib/.config/emacs/elpa/eldoc-1.13.0.0.20220723.71404/eldoc hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/emacs-lisp/eldoc
/home/akib/.config/emacs/elpa/seq-2.23.0.20210925.195432/seq hides /gnu/store/dzfyzx2b18qh5i38rvkslw04il1nbsms-emacs-edge-29.0.50-3.eb02528/share/emacs/29.0.50/lisp/emacs-lisp/seq
Features:
(bbdb-mua bbdb-com bbdb bbdb-site gnus-cite mm-archive textsec
uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check
gnus-async gnus-bcklg gnus-ml nndraft nnmh gnus-search eieio-opt
speedbar ezimage dframe qp nnmaildir network-stream nsm nnfolder nnnil
gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache
elisp-demos eudc-capf eudc eudc-vars shadow sort footnote mail-extr
gnus-msg emacsbug pcmpl-unix pcmpl-gnu kind-icon svg-lib coterm helpful
info-look f f-shortdoc shortdoc elisp-refs s vterm tramp tramp-loaddefs
trampver tramp-integration tramp-compat ls-lisp vterm-module term/xterm
xterm epa-file password-store eshell-syntax-highlighting em-xtra em-unix
em-tramp em-term term ehelp em-script em-prompt em-ls em-hist em-pred
em-glob em-cmpl em-dirs em-basic em-banner em-alias esh-var esh-mode
eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module
esh-groups esh-util cus-start magit-extras magit-bookmark
magit-submodule magit-obsolete magit-popup magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
which-func edebug debug backtrace magit-diff git-commit log-edit
magit-core magit-autorevert magit-margin magit-transient magit-process
with-editor magit-mode transient magit-git magit-base magit-section crm
compat-27 compat-26 iwindow eat shell misearch multi-isearch dmenu
mode-line-bell emms-cue emms-info-ogginfo emms-info-opusinfo
emms-info-metaflac emms-info-mp3info emms-info-exiftool emms-info-native
bindat emms-last-played emms-playlist-mode emms-source-playlist
emms-source-file locate emms-player-mpv emms-playing-time emms-info
emms-later-do emms-player-simple emms emms-compat orderless cape
info-colors mule-util goto-addr emacs-news-mode arc-mode archive-mode
enriched facemenu plstore guix-build-log guix-utils bui-utils dash guix
js autoconf autoconf-mode gnu-indent asm-mode smerge-mode view
markdown-mode edit-indirect time-stamp perl-mode whitespace flymake-cc
macrostep-c cmacexp macrostep cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs make-mode bug-reference
add-log dired-aux vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs
diredfl lin face-remap org-fragtog org-inline-anim org-element avl-tree
generator ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info
ol-gnus nnselect gnus-registry registry eieio-base gnus-art mm-uu
mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill
kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus
gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time gnus-spec
gnus-win gnus-int gnus-range message sendmail yank-media puny rfc822 mml
mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils
mailheader gnus nnheader gnus-util mail-utils range mm-util mail-prsvr
ol-docview ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle
ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete pcomplete org-list org-faces org-entities org-version
ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601 ol
org-keys oc org-compat org-macs org-loaddefs format-spec find-func
cal-menu calendar cal-loaddefs flyspell ispell texinfo texinfo-loaddefs
imenu doc-view jka-compr image-mode exif sh-script smie treesit
executable hi-lock noutline outline vc-git diff-hl-margin diff-hl-dired
dired dired-loaddefs diff-hl-flydiff diff diff-hl log-view pcvs-util
vc-dir ewoc vc vc-dispatcher diff-mode why-this color timezone battery
dbus xml checkdoc lisp-mnt mb-depth highlight-defined paredit
highlight-quoted aggressive-indent display-line-numbers
display-fill-column-indicator ws-butler highlight-numbers parent-mode
highlight-thing rainbow-delimiters hl-todo hl-line flymake-popon
posframe popon flymake-proc flymake compile comint ansi-osc ansi-color
desktop frameset pinentry time-date modus-vivendi-theme modus-themes
gcmh init comp comp-cstr warnings exwm-xim xcb-xim xcb-xlib exwm-randr
xcb-randr exwm exwm-input xcb-keysyms xcb-xkb exwm-manage exwm-floating
xcb-cursor xcb-render exwm-layout exwm-workspace exwm-core xcb-ewmh
xcb-icccm xcb xcb-xproto xcb-types xcb-debug server auth-source-pass
gtags-mode files-x xref corfu-doc corfu-history corfu anzu advice
thingatpt isearch-mb autorevert filenotify saveplace elec-pair
gc-buffers which-key marginalia vertico minibar winner workroom compat
compat-macs project bookmark text-property-search disp-table savehist
recentf tree-widget shackle trace blow pcase edmacro kmacro cl-extra
cus-edit pp cus-load icons wid-edit leaf finder-inf vterm-autoloads
guix-emacs gc-buffers-autoloads ctrlf-autoloads easy-mmode
helpful-autoloads erc-autoloads camera-autoloads vertico-autoloads
modus-themes-autoloads mlscroll-autoloads mood-line-autoloads
closql-autoloads testcover-mark-line-autoloads marginalia-autoloads
workroom-autoloads insecure-lock-autoloads orderless-autoloads
htmlize-autoloads lin-autoloads undercover-autoloads shut-up-autoloads
doom-modeline-autoloads posframe-autoloads magit-autoloads
exwm-autoloads consult-notmuch-autoloads elisp-demos-autoloads
denote-autoloads ef-themes-autoloads ligature-autoloads meow-autoloads
eshell-syntax-highlighting-autoloads embark-consult-autoloads
chess-autoloads cape-autoloads ement-autoloads plz-autoloads
exercism-autoloads a-autoloads devhelp-autoloads ace-window-autoloads
consult-org-roam-autoloads consult-autoloads emacsql-sqlite-autoloads
emacsql-autoloads minibar-autoloads mastodon-autoloads request-autoloads
coverlay-autoloads rx gnuplot-autoloads quelpa-autoloads setup-autoloads
el-patch el-patch-stub coterm-autoloads iwindow-autoloads
async-autoloads anzu-autoloads disk-usage-autoloads
geiser-guile-autoloads geiser-impl help-fns radix-tree help-mode
geiser-custom geiser-base ring coverage-autoloads doom-themes-autoloads
moody-autoloads ts-autoloads notmuch-autoloads markdown-mode-autoloads
paredit-autoloads blow-autoloads diff-hl-autoloads eat-autoloads
taxy-magit-section-autoloads magit-section-autoloads
eglot-ccls-autoloads eglot-autoloads flymake-autoloads
nyan-mode-autoloads hare-mode-autoloads async-await-autoloads
iter2-autoloads promise-autoloads el-fetch-autoloads
aggressive-indent-autoloads shrink-path-autoloads cov-autoloads
elquery-autoloads crux-autoloads nubox-autoloads f-autoloads
web-server-autoloads multiple-cursors-autoloads
corfu-doc-terminal-autoloads popon-autoloads corfu-autoloads
taxy-autoloads compat-autoloads s-autoloads mood-one-theme-autoloads
relint-autoloads ov-autoloads geiser-autoloads project-autoloads
xref-autoloads embark-autoloads info elpher-autoloads package browse-url
url url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads xwidget-internal dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
xinput2 x multi-tty make-network-process native-compile emacs)
Memory information:
((conses 16 1520221 2146165)
(symbols 48 64702 54)
(strings 32 559717 1078602)
(string-bytes 1 32213328)
(vectors 16 259095)
(vector-slots 8 4909279 1391236)
(floats 8 1074 1686)
(intervals 56 17340 15525)
(buffers 984 190))
--
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe
2022-12-11 11:13 bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-12-11 14:43 ` Eli Zaretskii
2022-12-11 14:50 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <87o7sac78t.fsf@disroot.org>
0 siblings, 2 replies; 11+ messages in thread
From: Eli Zaretskii @ 2022-12-11 14:43 UTC (permalink / raw)
To: Akib Azmain Turja; +Cc: 59963
> Date: Sun, 11 Dec 2022 17:13:41 +0600
> From: Akib Azmain Turja via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> 'window-max-chars-per-line' doesn't always work on GUI when fringe width
> is set to zero. Although it returns seemingly correct answer, actually
> writing that characters results in the continuation/truncation glyph to
> appear, decreasing the text area width.
>
> I don't know precisely what condition needs to be meet for trigger the
> bug. But I think this is triggered when the width of the text area of
> window in character is a fraction. For example, my window is 1366px
> width, each character takes 8px; so my window is 170.75 characters
> width, and this triggers the bug.
>
> This bug affects Term, Eat, Eat in Eshell, Coterm in Shell mode, Vterm,
> and possibly any other Emacs terminal emulator.
>
> Reproduction steps:
>
> 1. Run the command 'emacs -nw -Q' in any of the terminal emulators
> listed above.
> 2. Remove fringes with 'M-: (set-window-fringes nil 0 0)'.
> 3. To make the bug is even more clear, enable 'visual-line-mode'.
> 4. If everything seem to be OK, resize the window.
I tried reproducing the problem, but couldn't:
window-max-chars-per-line returns a value correctly truncated to the
number of fully visible characters that can be shown on the line,
minus the continuation/truncation glyph if there should be one.
So please provide a complete recipe, and please show the numbers: what
does window-max-chars-per-line report when you do what needs to be
done to demonstrate the issue. Bonus points for demonstrating the
issue without running any terminal emulators, but just by typing
characters (which should produce the same effect, since Emacs display
doesn't really know what Lisp program produces the characters it needs
to display).
Thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe
2022-12-11 14:43 ` Eli Zaretskii
@ 2022-12-11 14:50 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <87o7sac78t.fsf@disroot.org>
1 sibling, 0 replies; 11+ messages in thread
From: Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-12-11 14:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 59963
[-- Attachment #1: Type: text/plain, Size: 1864 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Sun, 11 Dec 2022 17:13:41 +0600
>> From: Akib Azmain Turja via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>
>> 'window-max-chars-per-line' doesn't always work on GUI when fringe width
>> is set to zero. Although it returns seemingly correct answer, actually
>> writing that characters results in the continuation/truncation glyph to
>> appear, decreasing the text area width.
>>
>> I don't know precisely what condition needs to be meet for trigger the
>> bug. But I think this is triggered when the width of the text area of
>> window in character is a fraction. For example, my window is 1366px
>> width, each character takes 8px; so my window is 170.75 characters
>> width, and this triggers the bug.
>>
>> This bug affects Term, Eat, Eat in Eshell, Coterm in Shell mode, Vterm,
>> and possibly any other Emacs terminal emulator.
>>
>> Reproduction steps:
>>
>> 1. Run the command 'emacs -nw -Q' in any of the terminal emulators
>> listed above.
>> 2. Remove fringes with 'M-: (set-window-fringes nil 0 0)'.
>> 3. To make the bug is even more clear, enable 'visual-line-mode'.
>> 4. If everything seem to be OK, resize the window.
>
> I tried reproducing the problem, but couldn't:
> window-max-chars-per-line returns a value correctly truncated to the
> number of fully visible characters that can be shown on the line,
> minus the continuation/truncation glyph if there should be one.
I forgot to mention, probably you need to set 'window-resize-pixelwise'
to t to get the correct width of reproducing the bug.
--
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe
[not found] ` <87o7sac78t.fsf@disroot.org>
@ 2022-12-11 15:21 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-11 16:14 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-12-11 15:21 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 59963
[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]
Akib Azmain Turja <akib@disroot.org> writes:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> Date: Sun, 11 Dec 2022 17:13:41 +0600
>>> From: Akib Azmain Turja via "Bug reports for GNU Emacs,
>>> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>>
>>> 'window-max-chars-per-line' doesn't always work on GUI when fringe width
>>> is set to zero. Although it returns seemingly correct answer, actually
>>> writing that characters results in the continuation/truncation glyph to
>>> appear, decreasing the text area width.
>>>
[...]
>
> I'll dig into the 'window-max-chars-per-line' definition and report if I
> find something suspicious.
I just found the root cause. I've used '(set-window-fringes nil 0 0)'
(from Doom as said by the original reporter) to hide fringe. It doesn't
set 'left-fringe-width' and 'right-fringe-width', which are checked by
'window-max-chars-per-line'. Setting these two variables to zero fixes
the bug.
Now I think this is a bug of _both_ Emacs and Doom. Doom doesn't set
the variables, hence this bug report here; and Emacs doesn't check
'window-fringes'.
What do you think?
--
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe
2022-12-11 15:21 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-12-11 16:14 ` Eli Zaretskii
2022-12-12 8:18 ` martin rudalics
0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-12-11 16:14 UTC (permalink / raw)
To: Akib Azmain Turja, martin rudalics; +Cc: 59963
> From: Akib Azmain Turja <akib@disroot.org>
> Cc: 59963@debbugs.gnu.org
> Date: Sun, 11 Dec 2022 21:21:13 +0600
>
> I just found the root cause. I've used '(set-window-fringes nil 0 0)'
> (from Doom as said by the original reporter) to hide fringe. It doesn't
> set 'left-fringe-width' and 'right-fringe-width', which are checked by
> 'window-max-chars-per-line'. Setting these two variables to zero fixes
> the bug.
It is wrong to use left-fringe-width and right-fringe-width here,
because those are per _buffer_ not per _window_. set-window-fringes
doesn't set them for this very reason, and it shouldn't.
> Now I think this is a bug of _both_ Emacs and Doom. Doom doesn't set
> the variables, hence this bug report here; and Emacs doesn't check
> 'window-fringes'.
>
> What do you think?
Using left/right-fringe-width in window-max-chars-per-line is IMO
wrong, we should use window-fringes (which will return correct values
both when the window has its private valuesm, either via
set-window-fringes or via assignment of left/right-fringe-width, and
when it doesn't).
Martin, any comments?
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe
2022-12-11 16:14 ` Eli Zaretskii
@ 2022-12-12 8:18 ` martin rudalics
2022-12-12 13:10 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: martin rudalics @ 2022-12-12 8:18 UTC (permalink / raw)
To: Eli Zaretskii, Akib Azmain Turja; +Cc: 59963
> Using left/right-fringe-width in window-max-chars-per-line is IMO
> wrong, we should use window-fringes (which will return correct values
> both when the window has its private valuesm, either via
> set-window-fringes or via assignment of left/right-fringe-width, and
> when it doesn't).
This should have been done at the time that function was installed. If
you do it now, you may break valid code like
(let (max-chars)
(setq right-fringe-width 0)
(setq max-chars (window-max-chars-per-line))
(set-window-buffer nil (window-buffer))
max-chars)
which currently yields 79 and would yield 80 with your proposal.
martin
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe
2022-12-12 8:18 ` martin rudalics
@ 2022-12-12 13:10 ` Eli Zaretskii
2022-12-12 16:50 ` martin rudalics
2022-12-14 15:21 ` Eli Zaretskii
0 siblings, 2 replies; 11+ messages in thread
From: Eli Zaretskii @ 2022-12-12 13:10 UTC (permalink / raw)
To: martin rudalics; +Cc: 59963, akib
> Date: Mon, 12 Dec 2022 09:18:28 +0100
> Cc: 59963@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
>
> > Using left/right-fringe-width in window-max-chars-per-line is IMO
> > wrong, we should use window-fringes (which will return correct values
> > both when the window has its private valuesm, either via
> > set-window-fringes or via assignment of left/right-fringe-width, and
> > when it doesn't).
>
> This should have been done at the time that function was installed.
Yes, I wonder what I was smoking back them.
> If you do it now, you may break valid code like
>
> (let (max-chars)
> (setq right-fringe-width 0)
> (setq max-chars (window-max-chars-per-line))
> (set-window-buffer nil (window-buffer))
> max-chars)
>
> which currently yields 79 and would yield 80 with your proposal.
Do we have such code somewhere? The correct way of doing that is to
swap the lines that call window-max-chars-per-line and
set-window-buffer, because AFAIU the latter will cause window-margins
to return the values consistent with right-fringe-width just set.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe
2022-12-12 13:10 ` Eli Zaretskii
@ 2022-12-12 16:50 ` martin rudalics
2022-12-14 15:21 ` Eli Zaretskii
1 sibling, 0 replies; 11+ messages in thread
From: martin rudalics @ 2022-12-12 16:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 59963, akib
>> (let (max-chars)
>> (setq right-fringe-width 0)
>> (setq max-chars (window-max-chars-per-line))
>> (set-window-buffer nil (window-buffer))
>> max-chars)
>>
>> which currently yields 79 and would yield 80 with your proposal.
>
> Do we have such code somewhere?
No. Fringes should be set by users only.
> The correct way of doing that is to
> swap the lines that call window-max-chars-per-line and
> set-window-buffer, because AFAIU the latter will cause window-margins
... 'window-max-chars-per-line' I presume ...
> to return the values consistent with right-fringe-width just set.
My example is a simplification. There might be many more buffer-local
variables to set and the conclusive 'set-window-buffer' call to put them
into action might appear much later, maybe also in some other function.
The simplest approach should be to put an extra
(set-window-buffer nil (window-buffer))
right after the
(with-selected-window (window-normalize-window window t)
in 'window-max-chars-per-line'. But there's no right KEEP-MARGINS value
to pass here.
Maybe you should just say in the doc-string that if there are any
pending buffer-local changes, they should be applied before calling
'window-max-chars-per-line'.
martin
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe
2022-12-12 13:10 ` Eli Zaretskii
2022-12-12 16:50 ` martin rudalics
@ 2022-12-14 15:21 ` Eli Zaretskii
2022-12-15 15:53 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-12-14 15:21 UTC (permalink / raw)
To: akib; +Cc: rudalics, 59963
Akib, please see if the patch below gives good results, including in
the real-life use case which triggered this report:
diff --git a/lisp/window.el b/lisp/window.el
index 7d8ee48..a4a8421 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2162,17 +2162,14 @@ window-max-chars-per-line
(let* ((window-width (window-body-width window t))
(font-width (window-font-width window face))
(ncols (- (/ window-width font-width)
- (ceiling (line-number-display-width 'columns)))))
+ (ceiling (line-number-display-width 'columns))))
+ (fringes (window-fringes window))
+ (lfringe (car fringes))
+ (rfringe (nth 1 fringes)))
(if (and (display-graphic-p)
overflow-newline-into-fringe
- (not
- (or (eq left-fringe-width 0)
- (and (null left-fringe-width)
- (= (frame-parameter nil 'left-fringe) 0))))
- (not
- (or (eq right-fringe-width 0)
- (and (null right-fringe-width)
- (= (frame-parameter nil 'right-fringe) 0)))))
+ (not (eq lfringe 0))
+ (not (eq rfringe 0)))
ncols
;; FIXME: This should remove 1 more column when there are no
;; fringes, lines are truncated, and the window is hscrolled,
^ permalink raw reply related [flat|nested] 11+ messages in thread
* bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe
2022-12-14 15:21 ` Eli Zaretskii
@ 2022-12-15 15:53 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-17 12:05 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-12-15 15:53 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rudalics, 59963
[-- Attachment #1: Type: text/plain, Size: 1817 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
> Akib, please see if the patch below gives good results, including in
> the real-life use case which triggered this report:
>
> diff --git a/lisp/window.el b/lisp/window.el
> index 7d8ee48..a4a8421 100644
> --- a/lisp/window.el
> +++ b/lisp/window.el
> @@ -2162,17 +2162,14 @@ window-max-chars-per-line
> (let* ((window-width (window-body-width window t))
> (font-width (window-font-width window face))
> (ncols (- (/ window-width font-width)
> - (ceiling (line-number-display-width 'columns)))))
> + (ceiling (line-number-display-width 'columns))))
> + (fringes (window-fringes window))
> + (lfringe (car fringes))
> + (rfringe (nth 1 fringes)))
> (if (and (display-graphic-p)
> overflow-newline-into-fringe
> - (not
> - (or (eq left-fringe-width 0)
> - (and (null left-fringe-width)
> - (= (frame-parameter nil 'left-fringe) 0))))
> - (not
> - (or (eq right-fringe-width 0)
> - (and (null right-fringe-width)
> - (= (frame-parameter nil 'right-fringe) 0)))))
> + (not (eq lfringe 0))
> + (not (eq rfringe 0)))
> ncols
> ;; FIXME: This should remove 1 more column when there are no
> ;; fringes, lines are truncated, and the window is hscrolled,
Looks good at the first glance! Let me apply it on the function
definition... Works good! Approved.
--
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe
2022-12-15 15:53 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-12-17 12:05 ` Eli Zaretskii
0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2022-12-17 12:05 UTC (permalink / raw)
To: Akib Azmain Turja; +Cc: rudalics, 59963-done
> From: Akib Azmain Turja <akib@disroot.org>
> Cc: rudalics@gmx.at, 59963@debbugs.gnu.org
> Date: Thu, 15 Dec 2022 21:53:23 +0600
>
> Looks good at the first glance! Let me apply it on the function
> definition... Works good! Approved.
Thanks. No further comments, so I've now installed this on the
macs-29 branch, and I'm closing the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-12-17 12:05 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-11 11:13 bug#59963: 29.0.50; 'window-max-chars-per-line' doesn't always work on GUI without fringe Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-11 14:43 ` Eli Zaretskii
2022-12-11 14:50 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <87o7sac78t.fsf@disroot.org>
2022-12-11 15:21 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-11 16:14 ` Eli Zaretskii
2022-12-12 8:18 ` martin rudalics
2022-12-12 13:10 ` Eli Zaretskii
2022-12-12 16:50 ` martin rudalics
2022-12-14 15:21 ` Eli Zaretskii
2022-12-15 15:53 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-17 12:05 ` Eli Zaretskii
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.