emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Having '%p" in frame-title-format makes org-mode to freeze [9.4 (release_9.4-134-g0d525c @ /home/massimo/bugreport/org-mode/lisp/)]
@ 2020-11-21 15:48 Massimo Lauria
  2020-12-10  5:59 ` Kyle Meyer
  0 siblings, 1 reply; 2+ messages in thread
From: Massimo Lauria @ 2020-11-21 15:48 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

I recently came across this weird issue using org-mode. Essentially
when I fold/unfold/fold some header in org-mode, pressing tab three
times,
I expect the section to fold again at the third keypress, and instead
emacs freezes. By detective work I discovered that it has to do with
having the '%p' option in
frame-title-format. The bug disappeared when I took "%p" option away
from frame-title-format.

Thank you for all you work and for any attention you will give to this
bug. I hope this message is useful.
I will now give enough info and data to reproduce the bug with a
minimal setup, and at the end of the message my emacs/org/Linux
configuration follows.

* Steps to reproduce the bug

Note that these steps only reproduce the bug when emacs runs
graphically. Using "emacs -nw" fails to reproduce the bug.

** Step 0. Prepare a folder ~/bugreport/  with the three files
"test.sh", "test.el" and "test.org" as follows

---- test.sh ---- downloads org-mode and runs emacs with the test setup
cd ~/bugreport/
git clone https://code.orgmode.org/bzg/org-mode.git
cd org-mode/
make autoloads

cd ~/bugreport/
emacs -Q -l test.el test.org &
-----------------------------------------


--- test.el ---- loads org-mode from the repository and set frame-title-format
(add-to-list 'load-path "~/bugreport/org-mode/lisp")
(setq frame-title-format '("%p"))
-----------------------------------------


---- test.org ---- just an org file with a header
* Try to hang emacs

  To  hang emacs  you should  fold/unfold/fold the  header of  this section
  a couple of times.
-----------------------------------------


** Step 1. Run the test
It is sufficient to go "cd ~/bugreport/" and do "sh ./test.sh"
You should see emacs starting and opening "test.org" file, and by
running 'org-version' you could double check that the appropriate
version of org has been loaded.

** Step 2. Make emacs freeze
Go to first line in the "test.org" file and press TAB three times.
Emacs should freeze now.


* Emacs/Org/Linux configuration

Here's some more details about my environment.

Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.20, cairo version 1.16.0)
 of 2020-09-19
Package: Org mode version 9.4 (release_9.4-134-g0d525c @
/home/massimo/bugreport/org-mode/lisp/)
Linux: Linux nuc2020 5.4.0-53-generic #59-Ubuntu SMP Wed Oct 21
09:38:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Content of /etc/lsb-release:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"


current state:
==============
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
    org-src-mode-configure-edit-buffer)
 org-link-shell-confirm-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '((closure
 (org--rds reftex-docstruct-symbol
  org-element-greater-elements org-clock-history
  org-agenda-current-date org-with-time org-defdecode org-def
  org-read-date-inactive org-ans2 org-ans1
  org-columns-current-fmt-compiled org-clock-current-task
  org-clock-effort org-agenda-skip-function
  org-agenda-skip-comment-trees org-agenda-archives-mode
  org-end-time-was-given org-time-was-given
  org-log-note-extra org-log-note-purpose
  org-log-post-message org-last-inserted-timestamp
  org-last-changed-timestamp
  org-entry-property-inherited-from org-blocked-by-checkboxes
  org-state org-agenda-headline-snapshot-before-repeat
  org-agenda-start-on-weekday org-agenda-buffer-tmp-name
  org-priority-regexp org-mode-abbrev-table
  org-mode-syntax-table buffer-face-mode-face org-tbl-menu
  org-org-menu org-struct-menu org-entities org-last-state
  org-id-track-globally org-clock-start-time texmathp-why
  remember-data-file
  org-agenda-tags-todo-honor-ignore-options
  iswitchb-temp-buflist calc-embedded-open-mode
  calc-embedded-open-formula calc-embedded-close-formula
  align-mode-rules-list org-emphasis-alist
  org-emphasis-regexp-components
  org-export-registered-backends org-modules
  org-babel-load-languages org-id-overriding-file-name
  org-indent-indentation-per-level
  org-element-paragraph-separate ffap-url-regexp
  org-inlinetask-min-level t)
 nil
 (add-hook 'change-major-mode-hook 'org-show-all 'append
  'local)
 )
(closure
 (org-src-window-setup *this*
  org-babel-confirm-evaluate-answer-no
  org-babel-tangle-uncomment-comments
  org-src-preserve-indentation org-src-lang-modes
  org-edit-src-content-indentation org-babel-library-of-babel
  t)
 nil
 (add-hook 'change-major-mode-hook 'org-babel-show-result-all
  'append 'local)
 )
org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function '(closure
      (org-id-locations
org-agenda-search-view-always-boolean
org-agenda-overriding-header t)
      (entry) (cdr (assq :title entry)))
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
     org-babel-header-arg-expand)
 org-agenda-loop-over-headlines-in-active-region nil
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
 org-cycle-show-empty-lines
 org-optimize-window-after-visibility-change)
 org-speed-command-hook '(org-speed-command-activate
 org-babel-speed-command-activate)
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :follow org-attach-follow :complete
org-attach-complete-link)
      ("id" :follow org-id-open)
      ("eww" :follow org-eww-open :store org-eww-store-link)
      ("rmail" :follow org-rmail-open :store
org-rmail-store-link)
      ("mhe" :follow org-mhe-open :store org-mhe-store-link)
      ("irc" :follow org-irc-visit :store org-irc-store-link
:export org-irc-export)
      ("info" :follow org-info-open :export org-info-export
:store org-info-store-link)
      ("gnus" :follow org-gnus-open :store
org-gnus-store-link)
      ("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
      ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
      ("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete org-bbdb-complete-link :store
org-bbdb-store-link)
      ("w3m" :store org-w3m-store-link) ("file+sys")
      ("file+emacs") ("shell" :follow org-link--open-shell)
      ("news" :follow
(closure
((scheme . "news") (--dolist-tail--) org-ts-regexp
 org-time-stamp-formats org-src-source-file-name
 org-outline-regexp-bol org-inhibit-startup
 org-id-link-to-org-use-id org-highlight-links
 org-comment-string org-agenda-buffer-name
 clean-buffer-list-kill-buffer-names t)
(url arg) (browse-url (concat scheme ":" url) arg))
)
      ("mailto" :follow
(closure
((scheme . "mailto") (--dolist-tail--) org-ts-regexp
 org-time-stamp-formats org-src-source-file-name
 org-outline-regexp-bol org-inhibit-startup
 org-id-link-to-org-use-id org-highlight-links
 org-comment-string org-agenda-buffer-name
 clean-buffer-list-kill-buffer-names t)
(url arg) (browse-url (concat scheme ":" url) arg))
)
      ("https" :follow
(closure
((scheme . "https") (--dolist-tail--) org-ts-regexp
 org-time-stamp-formats org-src-source-file-name
 org-outline-regexp-bol org-inhibit-startup
 org-id-link-to-org-use-id org-highlight-links
 org-comment-string org-agenda-buffer-name
 clean-buffer-list-kill-buffer-names t)
(url arg) (browse-url (concat scheme ":" url) arg))
)
      ("http" :follow
(closure
((scheme . "http") (--dolist-tail--) org-ts-regexp
 org-time-stamp-formats org-src-source-file-name
 org-outline-regexp-bol org-inhibit-startup
 org-id-link-to-org-use-id org-highlight-links
 org-comment-string org-agenda-buffer-name
 clean-buffer-list-kill-buffer-names t)
(url arg) (browse-url (concat scheme ":" url) arg))
)
      ("ftp" :follow
(closure
((scheme . "ftp") (--dolist-tail--) org-ts-regexp
 org-time-stamp-formats org-src-source-file-name
 org-outline-regexp-bol org-inhibit-startup
 org-id-link-to-org-use-id org-highlight-links
 org-comment-string org-agenda-buffer-name
 clean-buffer-list-kill-buffer-names t)
(url arg) (browse-url (concat scheme ":" url) arg))
)
      ("help" :follow org-link--open-help)
      ("file" :complete org-link-complete-file)
      ("elisp" :follow org-link--open-elisp)
      ("doi" :follow org-link--open-doi))
 org-link-elisp-confirm-function 'yes-or-no-p
 )

-- 
Massimo Lauria
http://www.massimolauria.net

Università degli studi di Roma - La Sapienza
Dipartimento di Scienze Statistiche
Piazzale Aldo Moro, 5
00185 Roma, Italy


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug: Having '%p" in frame-title-format makes org-mode to freeze [9.4 (release_9.4-134-g0d525c @ /home/massimo/bugreport/org-mode/lisp/)]
  2020-11-21 15:48 Bug: Having '%p" in frame-title-format makes org-mode to freeze [9.4 (release_9.4-134-g0d525c @ /home/massimo/bugreport/org-mode/lisp/)] Massimo Lauria
@ 2020-12-10  5:59 ` Kyle Meyer
  0 siblings, 0 replies; 2+ messages in thread
From: Kyle Meyer @ 2020-12-10  5:59 UTC (permalink / raw)
  To: Massimo Lauria; +Cc: emacs-orgmode


Massimo Lauria writes:

> Hi all,
>
> I recently came across this weird issue using org-mode. Essentially
> when I fold/unfold/fold some header in org-mode, pressing tab three
> times,
> I expect the section to fold again at the third keypress, and instead
> emacs freezes. By detective work I discovered that it has to do with
> having the '%p' option in
> frame-title-format. The bug disappeared when I took "%p" option away
> from frame-title-format.

Very nice detective work.  Thank you.

> * Steps to reproduce the bug
[...]

Yep, I can reproduce it on my end.

The culprit is a8e812e60 (org.el: Restore the scroll position after
cycling, 2020-09-05).  However, at the time of that commit, the change
didn't trigger the hang with the default Org settings.  However, once
that commit was merged to master (5beeb094a), it started to trigger it
with the standard Org settings because the default value of
org-startup-folded changed to showeverything (88f5ed91c).

Anyway, this is fixed (on my end, at least) by 4f8ac0a7a.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-10  6:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-21 15:48 Bug: Having '%p" in frame-title-format makes org-mode to freeze [9.4 (release_9.4-134-g0d525c @ /home/massimo/bugreport/org-mode/lisp/)] Massimo Lauria
2020-12-10  5:59 ` Kyle Meyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).