alphapapa / org-sidebar

A helpful sidebar for Org mode
GNU General Public License v3.0
530 stars 16 forks source link

Org 9.7 seems to break org-sidebar-tree #64

Closed LukasCBossert closed 9 months ago

LukasCBossert commented 1 year ago

I start org-sidebar-tree with M-x org-sidebar-tree and then everything stops when it reaches the point "Truncate long lines enabled and 'visual-ilne-mode' disabled.

Screenshot 2023-09-28 at 20 27 03

org-version: Org mode version 9.7 (9.7-??-e90a8a69a @ /Users/lukascbossert/.config/emacs/.local/straight/build-29.1/org/)

My setup:


generated  Sep 28, 2023 20:32:46
system     MacOS 13.6 Darwin 22.6.0 arm64 ns
emacs      29.1 ~/.config/emacs/
doom       3.0.0-pre PROFILE=_@0 HEAD -> master 844a82c4 2023-09-22 23:18:31 +0200
           ~/.config/doom/
shell      /bin/zsh
features   ACL GIF GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES
           NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF
           TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM XWIDGETS ZLIB
traits     gui server-running envvar-file custom-file
custom     warning-suppress-log-types safe-local-variable-values
           org-safe-remote-resources magit-todos-insert-after epg-gpg-program
modules    :config use-package :completion (company +childframe) (vertico +icons) :ui
           deft doom doom-dashboard doom-quit (emoji +github +unicode) hl-todo
           indent-guides modeline nav-flash (popup +defaults) treemacs unicode
           (vc-gutter +pretty) window-select workspaces zen :editor (evil +everywhere)
           file-templates fold (format +onsave) snippets word-wrap :emacs (dired
           +ranger +icons) electric (ibuffer +icons) (undo +tree) vc :term eshell
           vterm :tools biblio lsp (collab +tunnel) direnv (eval +overlay) lookup
           magit make pdf :os macos tty :lang data emacs-lisp ess (json +lsp) (latex
           +fold +latexmk +lsp) ledger (markdown +grip +lsp) (org +dragndrop +gnuplot
           +babel +pretty +journal +roam2 +pandoc +crypt +present +hugo +msg
           +passwords +noter) plantuml (python +lsp +linter) (sh +lsp) (yaml +lsp)
           :email (mu4e +org) :app calendar everywhere :config (default +bindings
           +smartparens)
packages   (typing) (ebib) (expand-region) (csv-mode) (bookmark+) (dired+) (ox-gfm)
           (mermaid-mode) (json-navigator) (org-sidebar) (org-inline-pdf)
           (org-roam-ui) (emacsql) (dirvish) (dired-open) (dired-subtree)
           (rainbow-mode) (org-auto-tangle) (unfill) (sparql-mode)
           (eshell-info-banner) (mastodon) (org-graph-view :recipe (:host github :repo
           alphapapa/org-graph-view) :pin 233c6708c1f37fc60604de49ca192497aef39757)
           (org-transclusion) (org-super-agenda) (org-kanban) (org-sticky-header)
           (orgtbl-aggregate) (company-tabnine :recipe (:host github :repo
           TommyX12/company-tabnine)) (org-present) (citar-org-roam)
unpin      org-roam
alphapapa commented 1 year ago

Probably because of something changed in Org 9.7, which is yet to be released. Fallout from its changes has been spreading, e.g. https://github.com/alphapapa/org-ql/issues/364 I can't offer support for unreleased versions, so you'll have to debug it yourself.

Or, who knows, it could just be something to do with DOOM. If I had a dime for every bug report that was caused by something funny DOOM does...

Anyway, I'd start by reproducing it in a clean Emacs configuration using https://github.com/alphapapa/with-emacs.sh

LukasCBossert commented 1 year ago

Thanks for the reply. For now I will downgrade org to 9.6, since it seems there are some more issues going on w/ 9.7 (and I have no clue how to debug elisp...)

paullemmens commented 1 year ago

Note that for me it doesn't work in 9.6 either when I pin Doom's org-mode package setup at 806abc5a2bbcb5f884467a0145547221ba09eb59 (release 9.6.9) nor at HEAD (c7a2cc988423d25da26ad5d16fa3e1a44c07f52e).

I too haven't found a way to debug this yet: the message is just that: a message. So it doesn't trigger the debugger.

I do see that org-sidebar-tree-view-buffer has a (toggle-truncate-lines 1) in its body. (toggle-truncate-lines) function has exactly the message noted above in its body. If I manually run that function before org-sidebar-tree, it still sticks at "Truncate long lines enabled".

rogueai commented 10 months ago

Hi, I'm experiencing the same issue with latest doom emacs and org 9.6.6

I've attempted to triage this issue, but due to my limited knowledge in Elisp I was just able to add a few debug (message)s around.

I don't have a solution, but I think the root cause is here: https://github.com/alphapapa/org-sidebar/blob/288703b897449f5110c9c76e78eb9a928ffc0dcd/org-sidebar.el#L471 The loop never completes. If I remove that loop, I'm able to open the sidebar tree.

If you can't reproduce, I'm happy to provide more details, but I'm afraid I'd need some directions due to me lacking proper Elisp kung-fu.

Thanks!

alphapapa commented 10 months ago

I've made a v0.4 release, and now v0.5 will target Org 9.6+. The updates in https://github.com/alphapapa/org-sidebar/commit/97e9c810b512823dfa396630044651bed478d4fb should help with this problem. Please test and let me know what problems may remain. Thanks.

alphapapa commented 10 months ago

@rogueai See https://github.com/alphapapa/org-sidebar/commit/1e06d1b4ab5f0d09301712cdecb757c9437a7179, which may fix the problem you reported.

rogueai commented 10 months ago

I've run a quick test, and seems to be working now with v0.4, thanks!

alphapapa commented 10 months ago

I've run a quick test, and seems to be working now with v0.4, thanks!

Note that v0.4 has the old code. Current master (v0.5-pre) has the updated code.

paullemmens commented 9 months ago

I just updated with/having (package! org-sidebar :recipe (:host github :repo "alphapapa/org-sidebar")) and it now works. Not sure whether you (do not) want me to close the issue, so I'll leave it as is for you to close @alphapapa.

alphapapa commented 9 months ago

I just updated with/having (package! org-sidebar :recipe (:host github :repo "alphapapa/org-sidebar")) and it now works. Not sure whether you (do not) want me to close the issue, so I'll leave it as is for you to close @alphapapa.

Thanks for the report. AFAIK this is solved now, so closing. If not, hopefully someone else will report so.