GNU bug report logs - #35434
terminal emacs: continuation line indicator missing when word wrapping is enabled

Previous Next

Package: emacs;

Reported by: Luis Gerhorst <privat <at> luisgerhorst.de>

Date: Fri, 26 Apr 2019 08:09:01 UTC

Severity: minor

To reply to this bug, email your comments to 35434 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#35434; Package emacs. (Fri, 26 Apr 2019 08:09:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luis Gerhorst <privat <at> luisgerhorst.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 26 Apr 2019 08:09:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Luis Gerhorst <privat <at> luisgerhorst.de>
To: bug-gnu-emacs <at> gnu.org
Subject: [<8; 36; 7m26.2;
 terminal emacs: continuation line indicator missing when word
 wrapping is enabled
Date: Fri, 26 Apr 2019 10:07:58 +0200
1. Start Emacs using 'emacs -Q --no-window-system'.

2. Reduce the window width until the lines in the scratch buffer wrap
around. Notice that Emacs shows a '\' at the end of each wrapped line.

3. Type M-x toggle-word-wrap. Emacs no longer shows a '\' to indicate
continuation lines. There is no way to tell whether the line contains a
newline, or whether it has been wrapped.

Notice that if you do the same in graphical Emacs (i.e. start with
'emacs -Q'), the fringes do show an indicator for continuation lines,
even with word wrapping enabled.

This is no critical bug, however, the behavior is inconsistent and not
user friendly. The following post shows, that it has also confused other
users who noticed the inconsistency:

https://stackoverflow.com/questions/12989072/showing-continuation-lines-in-emacs-in-a-text-terminal

If you think, this should not be a bug report and can point me to a
better place to discuss the issue, I will be happy to do so.

Best regards,
Luis


In GNU Emacs 26.2 (build 1, x86_64-apple-darwin18.5.0)
 of 2019-04-13 built on Mojave-2.local
Recent messages:
Package html2text is obsolete!
[mu4e] Started mu4e with 42141 messages in store
Mark saved where search started
Quit
Mark set

Process clipboard-copy finished
Mark saved where search started
Ag finished
Mark saved where search started
Quit
Configured using:
 'configure --disable-dependency-tracking --disable-silent-rules
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs/26.2/share/info/emacs
 --prefix=/usr/local/Cellar/emacs/26.2 --with-gnutls --without-x
 --with-xml2 --without-dbus --with-modules --without-ns
 --without-imagemagick'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB MODULES THREADS

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LC_CTYPE: UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Texinfo/P

Minor modes in effect:
  diff-auto-refine-mode: t
  TeX-PDF-mode: t
  ws-butler-mode: t
  show-paren-mode: t
  global-company-mode: t
  company-mode: t
  which-key-mode: t
  flx-ido-mode: t
  ido-vertical-mode: t
  crm-custom-mode: t
  ido-ubiquitous-mode: t
  ido-everywhere: t
  projectile-mode: t
  shell-dirtrack-mode: t
  recentf-mode: t
  global-auto-revert-mode: t
  xterm-mouse-mode: t
  override-global-mode: t
  cl-old-struct-compat-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/Users/luis/.emacs.d/site-lisp/solarized-emacs/solarized-theme-utils hides /Users/luis/.emacs.d/elpa/solarized-theme-1.2.2/solarized-theme-utils
/Users/luis/.emacs.d/site-lisp/solarized-emacs/solarized-dark-theme hides /Users/luis/.emacs.d/elpa/solarized-theme-1.2.2/solarized-dark-theme
/Users/luis/.emacs.d/site-lisp/solarized-emacs/solarized-theme hides /Users/luis/.emacs.d/elpa/solarized-theme-1.2.2/solarized-theme
/Users/luis/.emacs.d/site-lisp/solarized-emacs/solarized-theme-pkg hides /Users/luis/.emacs.d/elpa/solarized-theme-1.2.2/solarized-theme-pkg
/Users/luis/.emacs.d/site-lisp/solarized-emacs/solarized-light-theme hides /Users/luis/.emacs.d/elpa/solarized-theme-1.2.2/solarized-light-theme
/Users/luis/.emacs.d/site-lisp/solarized-emacs/solarized hides /Users/luis/.emacs.d/elpa/solarized-theme-1.2.2/solarized

Features:
(shadow face-remap emacsbug ace-window avy ag vc-svn find-dired smex
luis-mail-fastmail mu4e desktop frameset mu4e-speedbar speedbar sb-image
ezimage dframe mu4e-main mu4e-view cal-menu calendar cal-loaddefs
browse-url mu4e-headers mu4e-compose mu4e-context mu4e-draft
mu4e-actions rfc2368 smtpmail sendmail mu4e-mark mu4e-message flow-fill
html2text mu4e-proc mu4e-utils doc-view jka-compr image-mode image
mu4e-lists mu4e-vars message rmc puny rfc822 mml mml-sec epa derived epg
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev
mail-utils gmm-utils mailheader hl-line fringe mu4e-meta vc-git
diff-mode tex-info tex crm texinfo misearch multi-isearch dired-aux
term/xterm xterm server xcscope dired dired-loaddefs paredit
aggressive-indent fillcode company-jedi jedi-core python-environment epc
ctable concurrent company-racer deferred python cc-mode cc-fonts
cc-guess cc-menus cc-styles cc-align cc-cmds cc-engine cc-vars cc-defs
cc-bytecomp ws-butler cap-words superword subword fic-mode elec-pair
luis-iterm luis-apps luis-mail luis-modes luis-julia luis-rust
flycheck-rust flycheck json map rx subr-x luis-xml luis-make luis-scala
luis-sbt luis-java luis-lua luis-asm luis-org luis-c luis-python
luis-apache luis-swift luis-css luis-shell luis-latex luis-markdown
luis-text-wrap visual-fill-column adaptive-wrap luis-elisp luis-look
paren solarized-dark-theme solarized dash powerline powerline-separators
color powerline-themes luis-user-interaction luis-compile luis-movement
saveplace luis-modification company-keywords company-css
company-dabbrev-code company-dabbrev company-elisp find-func company
pcase luis-interactive time-date which-key flx-ido flx ido-vertical-mode
crm-custom ido-completing-read+ warnings memoize s cus-edit cus-start
cus-load minibuf-eldef ido luis-files projectile grep compile ibuf-ext
ibuffer ibuffer-loaddefs thingatpt tramp-cache tramp-sh tramp
tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete
comint regexp-opt ansi-color ring parse-time format-spec recentf
tree-widget wid-edit autorevert filenotify luis-integration xt-mouse
cl-extra help-mode diminish use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
easy-mmode use-package-core luis-packages cl finder-inf tex-site edmacro
kmacro ess-generics info tool-bar package easymenu epg-config
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv luis-private benchmark-init advice cl-loaddefs cl-lib
benchmark-init-loaddefs mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select mouse jit-lock font-lock syntax
facemenu font-core term/tty-colors frame cl-generic 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 charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads kqueue
multi-tty make-network-process emacs)

Memory information:
((conses 16 775479 32983)
 (symbols 48 45855 1)
 (miscs 40 109 347)
 (strings 32 166124 19659)
 (string-bytes 1 4804936)
 (vectors 16 91608)
 (vector-slots 8 2008071 76500)
 (floats 8 732 1467)
 (intervals 56 3942 24)
 (buffers 992 22))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35434; Package emacs. (Fri, 26 Apr 2019 08:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 35434 <at> debbugs.gnu.org (full text, mbox):

From: Luis Gerhorst <privat <at> luisgerhorst.de>
To: 35434 <at> debbugs.gnu.org
Subject: Re: terminal emacs: continuation line indicator missing when word
 wrapping is enabled
Date: Fri, 26 Apr 2019 10:12:07 +0200
Pleasy excuse me for the artifacts in the subject, it should have been 'terminal emacs: continuation line indicator missing when word wrapping is enabled'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35434; Package emacs. (Fri, 26 Apr 2019 11:11:01 GMT) Full text and rfc822 format available.

Message #11 received at 35434 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Luis Gerhorst <privat <at> luisgerhorst.de>
Cc: 35434 <at> debbugs.gnu.org
Subject: Re: bug#35434: [<8; 36; 7m26.2;
 terminal emacs: continuation line indicator missing when word
 wrapping is enabled
Date: Fri, 26 Apr 2019 14:10:04 +0300
> From: Luis Gerhorst <privat <at> luisgerhorst.de>
> Date: Fri, 26 Apr 2019 10:07:58 +0200
> 
> 1. Start Emacs using 'emacs -Q --no-window-system'.
> 
> 2. Reduce the window width until the lines in the scratch buffer wrap
> around. Notice that Emacs shows a '\' at the end of each wrapped line.
> 
> 3. Type M-x toggle-word-wrap. Emacs no longer shows a '\' to indicate
> continuation lines. There is no way to tell whether the line contains a
> newline, or whether it has been wrapped.
> 
> Notice that if you do the same in graphical Emacs (i.e. start with
> 'emacs -Q'), the fringes do show an indicator for continuation lines,
> even with word wrapping enabled.

The canonical way of using this feature is with "M-x visual-line-mode",
not with toggle-word-wrap.  visual-line-mode takes care of removing
the fringe indicators as well, so the appearance on GUI frames and TTY
frames is the same: without continuation indicators.

toggle-word-wrap does part of the job of visual-line-mode, and frankly
I don't understand why the former even exists.

Making continuation glyphs appear in TTY frames shouldn't be hard, but
I don't know how important is that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35434; Package emacs. (Fri, 26 Apr 2019 11:30:02 GMT) Full text and rfc822 format available.

Message #14 received at 35434 <at> debbugs.gnu.org (full text, mbox):

From: Luis Gerhorst <privat <at> luisgerhorst.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 35434 <at> debbugs.gnu.org
Subject: Re: bug#35434: terminal emacs: continuation line indicator missing
 when word wrapping is enabled
Date: Fri, 26 Apr 2019 13:29:49 +0200
Eli Zaretskii writes:

> Making continuation glyphs appear in TTY frames shouldn't be 
> hard, but
> I don't know how important is that.

Would you accept a patch if I manage to create one?




Changed bug title to 'terminal emacs: continuation line indicator missing when word wrapping is enabled' from '[<8; 36; 7m26.2; terminal emacs: continuation line indicator missing when word wrapping is enabled' Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 26 Apr 2019 11:34:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35434; Package emacs. (Fri, 26 Apr 2019 11:35:01 GMT) Full text and rfc822 format available.

Message #19 received at 35434 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Luis Gerhorst <privat <at> luisgerhorst.de>
Cc: 35434 <at> debbugs.gnu.org
Subject: Re: bug#35434: terminal emacs: continuation line indicator missing
 when word wrapping is enabled
Date: Fri, 26 Apr 2019 14:33:51 +0300
> From: Luis Gerhorst <privat <at> luisgerhorst.de>
> Cc: 35434 <at> debbugs.gnu.org
> Date: Fri, 26 Apr 2019 13:29:49 +0200
> 
> Eli Zaretskii writes:
> 
> > Making continuation glyphs appear in TTY frames shouldn't be 
> > hard, but
> > I don't know how important is that.
> 
> Would you accept a patch if I manage to create one?

I will definitely review it.  If it's clean, and if its smaller than
about 15 lines, we can accept it; longer patches will need you to
assign copyright to the FSF.

Would you perhaps like to describe the idea behind the patch you would
like to submit before actually coding it?  This could avoid the need
to rework it more than necessary.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35434; Package emacs. (Fri, 26 Apr 2019 11:50:02 GMT) Full text and rfc822 format available.

Message #22 received at 35434 <at> debbugs.gnu.org (full text, mbox):

From: Luis Gerhorst <privat <at> luisgerhorst.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 35434 <at> debbugs.gnu.org
Subject: Re: bug#35434: terminal emacs: continuation line indicator missing
 when word wrapping is enabled
Date: Fri, 26 Apr 2019 13:49:08 +0200
Eli Zaretskii writes:

>> From: Luis Gerhorst <privat <at> luisgerhorst.de>
>> Cc: 35434 <at> debbugs.gnu.org
>> Date: Fri, 26 Apr 2019 13:29:49 +0200
>>
>> Eli Zaretskii writes:
>>
>> > Making continuation glyphs appear in TTY frames shouldn't be
>> > hard, but
>> > I don't know how important is that.
>>
>> Would you accept a patch if I manage to create one?
>
> I will definitely review it.  If it's clean, and if its smaller 
> than
> about 15 lines, we can accept it; longer patches will need you 
> to
> assign copyright to the FSF.
>
> Would you perhaps like to describe the idea behind the patch you 
> would
> like to submit before actually coding it?  This could avoid the 
> need
> to rework it more than necessary.

Code-wise I have no idea yet ;)

My initial approach would be to have a look at the patches that
introduced word wrapping in the first place. If I'm lucky they 
modified
the GUI code to still show the fringe indicators, but simply 
missed the
TUI code.

However, I've not read any Emacs C code ever. I'll look into it 
and come
back when I unserstand the problem.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35434; Package emacs. (Fri, 26 Apr 2019 12:11:01 GMT) Full text and rfc822 format available.

Message #25 received at 35434 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Luis Gerhorst <privat <at> luisgerhorst.de>
Cc: 35434 <at> debbugs.gnu.org
Subject: Re: bug#35434: terminal emacs: continuation line indicator missing
 when word wrapping is enabled
Date: Fri, 26 Apr 2019 15:10:04 +0300
> From: Luis Gerhorst <privat <at> luisgerhorst.de>
> Cc: 35434 <at> debbugs.gnu.org
> Date: Fri, 26 Apr 2019 13:49:08 +0200
> 
> > Would you perhaps like to describe the idea behind the patch you
> > would like to submit before actually coding it?  This could avoid
> > the need to rework it more than necessary.
> 
> Code-wise I have no idea yet ;)
> 
> My initial approach would be to have a look at the patches that
> introduced word wrapping in the first place. If I'm lucky they
> modified the GUI code to still show the fringe indicators, but
> simply missed the TUI code.
> 
> However, I've not read any Emacs C code ever. I'll look into it and
> come back when I unserstand the problem.

Look at the function produce_special_glyphs in xdisp.c.

I think showing the continuation glyphs on TTY frames in word-wrap
mode should be optional, controlled by a user variable, since the
current behavior is unchanged since Emacs 23.

Thanks.




This bug report was last modified 6 years and 106 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.