GNU bug report logs - #66790
29.1; ispell breaks org-mode headings folding/unfolding

Previous Next

Package: emacs;

Reported by: Kai Jenkins <jenkinskair <at> gmail.com>

Date: Sat, 28 Oct 2023 11:48:02 UTC

Severity: normal

Found in version 29.1

To reply to this bug, email your comments to 66790 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#66790; Package emacs. (Sat, 28 Oct 2023 11:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kai Jenkins <jenkinskair <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 28 Oct 2023 11:48:02 GMT) Full text and rfc822 format available.

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

From: Kai Jenkins <jenkinskair <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.1; ispell breaks org-mode headings folding/unfolding
Date: Fri, 27 Oct 2023 21:12:59 +0100

recipe to create bug:
- starting emacs (via. emacs -Q)
- open a new org file
- create a heading (eg. * test)
- write some text under the heading that contains a spelling mistake
- fold the heading with tab
- run M-x ispell

the bug:
- ispell doesnt unfold the header that has the bug (possible corrections
are shown so it is finding the incorrect word)
- when you exit ispell with C-g the heading is now stuck and will not unfold with tab
- in the buffer theres a message "SUBTREE (NO CHILDREN)"


In GNU Emacs 29.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60
Version 10.14.6 (Build 18G9323)) of 2023-08-17 built on
builder10-14.lan
Windowing system distributor 'Apple', version 10.3.2299
System Description:  macOS 13.5.1

Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules 'CFLAGS=-DFD_SETSIZE=10000
-DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=no'

Configured features:
ACL GLIB GMP GNUTLS JPEG JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER
PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER ZLIB

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

Major mode: Org

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug ispell org-element org-persist org-id
org-refile avl-tree generator oc-basic cl-extra help-mode ol-eww eww xdg
url-queue thingatpt mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus
nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig
gnus-sum shr pixel-fill kinsoku url-file svg dom browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util url-parse auth-source cl-seq
eieio eieio-core cl-macs json map byte-opt gv bytecomp byte-compile
url-vars gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud
nnimap nnmail mail-source utf7 nnoo parse-time gnus-spec gnus-int
gnus-range message sendmail mailcap yank-media puny rfc822 mml mml-sec
password-cache epa derived epg rfc6068 epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util
text-property-search mail-utils range mm-util mail-prsvr wid-edit
ol-docview doc-view filenotify jka-compr image-mode exif dired
dired-loaddefs ol-bibtex bibtex iso8601 ol-bbdb ol-w3m ol-doi
org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-src ob-comint org-pcomplete pcomplete comint ansi-osc ansi-color
ring org-list org-footnote org-faces org-entities time-date subr-x
noutline outline icons ob-emacs-lisp ob-core ob-eval org-cycle org-table
ol rx org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu
calendar cal-loaddefs org-version org-compat org-macs format-spec
cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win 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 kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 185135 7761)
(symbols 48 19578 0)
(strings 32 67756 5621)
(string-bytes 1 2111119)
(vectors 16 37358)
(vector-slots 8 418673 19557)
(floats 8 264 184)
(intervals 56 300 0)
(buffers 984 11))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66790; Package emacs. (Sat, 28 Oct 2023 12:02:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kai Jenkins <jenkinskair <at> gmail.com>
Cc: 66790 <at> debbugs.gnu.org
Subject: Re: bug#66790: 29.1; ispell breaks org-mode headings folding/unfolding
Date: Sat, 28 Oct 2023 15:01:11 +0300
> From: Kai Jenkins <jenkinskair <at> gmail.com>
> Date: Fri, 27 Oct 2023 21:12:59 +0100
> 
> 
> 
> recipe to create bug:
> - starting emacs (via. emacs -Q)
> - open a new org file
> - create a heading (eg. * test)
> - write some text under the heading that contains a spelling mistake
> - fold the heading with tab
> - run M-x ispell
> 
> the bug:
> - ispell doesnt unfold the header that has the bug (possible corrections
> are shown so it is finding the incorrect word)
> - when you exit ispell with C-g the heading is now stuck and will not unfold with tab
> - in the buffer theres a message "SUBTREE (NO CHILDREN)"

I suggest to report this to the Org developers first.  I'm not sure
this is a problem with Ispell.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66790; Package emacs. (Sun, 05 Nov 2023 11:58:02 GMT) Full text and rfc822 format available.

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

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Kai Jenkins <jenkinskair <at> gmail.com>
Cc: emacs-orgmode <at> gnu.org, 66790 <at> debbugs.gnu.org
Subject: Re: [BUG] org, ispell [9.6.6 (release_9.6.6 @
 /Applications/Emacs.app/Contents/Resources/lisp/org/)]
Date: Sun, 05 Nov 2023 11:58:46 +0000
Kai Jenkins <jenkinskair <at> gmail.com> writes:

> recipe to create bug:
> - starting emacs (via. emacs -Q)
> - open a new org file
> - create a heading (eg. * test)
> - write some text under the heading that contains a spelling mistake
> - fold the heading with tab
> - run M-x ispell
>
> the bug:
> - ispell doesnt unfold the header that has the bug (possible corrections
> are shown so it is finding the incorrect word)
> - when you exit ispell with C-g the heading is now stuck and will not unfold with tab
> - in the buffer theres a message "SUBTREE (NO CHILDREN)"

Confirmed.

At this point, I feel that supporting isearch + text properties is an
uphill battle. I was hoping to contribute isearch.el patch upstream, but
apparently numerous other libraries (ispell, regexp-search, evil,
swiper) are relying upon invisibility being handled in very specific
way, using overlays. Considering that using overlays is no longer slower
compared to text properties in Emacs 29+, I am thinking of slowly
switching back to using overlays for folding for newer Emacs versions.

For your problem, just add (setq org-fold-core-style 'overlays) early in
your config. It should fix the issue.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66790; Package emacs. (Thu, 02 May 2024 11:36:02 GMT) Full text and rfc822 format available.

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

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Kai Jenkins <jenkinskair <at> gmail.com>
Cc: emacs-orgmode <at> gnu.org, 66790 <at> debbugs.gnu.org
Subject: Re: [BUG] org, ispell [9.6.6 (release_9.6.6 @
 /Applications/Emacs.app/Contents/Resources/lisp/org/)]
Date: Thu, 02 May 2024 11:36:08 +0000
Ihor Radchenko <yantar92 <at> posteo.net> writes:

> Confirmed.
>
> At this point, I feel that supporting isearch + text properties is an
> uphill battle. I was hoping to contribute isearch.el patch upstream, but
> apparently numerous other libraries (ispell, regexp-search, evil,
> swiper) are relying upon invisibility being handled in very specific
> way, using overlays. Considering that using overlays is no longer slower
> compared to text properties in Emacs 29+, I am thinking of slowly
> switching back to using overlays for folding for newer Emacs versions.

Org mode development branch will have `org-fold-core-style' defaulting
to 'overlays now as long as Emacs version is recent enough to handle
overlays efficiently.

Handled.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




This bug report was last modified 2 days ago.

Previous Next


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