all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]
@ 2023-05-19 21:23 Patrick Useldinger
  0 siblings, 0 replies; 13+ messages in thread
From: Patrick Useldinger @ 2023-05-19 21:23 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 10233 bytes --]

Hello

I've come across what seems to be a bug in org-element-cache handling.

To reproduce:
1) create a level 1 heading (in my case: "CAPTURE") and a level 2 heading
(in my case: "CAPTURE-TEST")
2) create a similar template to file tasks under a level-2 heading:
("x" "Todo (test)" entry
(file+olp "~/Workcloud/org/WORK.org" "CAPTURE" "CAPTURE-TEST")
"* TODO %^{Task Description}"
:prepend t)
3) create a task using this template (x)
4) while in the narrowed buffer, try to tag the task using C-c C-q
(org-set-tags-command)

This will hang. Pressing C-g helps you recover, the stack trace being
Debugger entered--Lisp error: (quit)
  #f(compiled-function () #<bytecode 0x1321472668e93f>)()
  org-element--parse-to(77445)
  org-element-cache-map(#f(compiled-function (el) #<bytecode
0x184aaa442bea9805>))
  org-get-buffer-tags()
  org-set-tags-command(nil)
  funcall-interactively(org-set-tags-command nil)
  call-interactively(org-set-tags-command nil nil)
  command-execute(org-set-tags-command)

Disabling the cache with (setq org-element-use-cache nil) solves the
problem.
As does dropping "CAPTURE-TEST" in the template (i.e. putting the task
under a level-1 heading instead of level-2).

Relevant Reddit threat:
https://www.reddit.com/r/orgmode/comments/13lwu2o/orgmode_starting_to_be_way_more_buggy/?s=8
)

HTH,
-Patrick

P.S. I am not subscribed to the mailing list, so please cc: me if necessary.

------------------------------------------------------------------------

Emacs  : GNU Emacs 28.2 (build 1, aarch64-apple-darwin22.4.0, NS
appkit-2299.50 Version 13.3.1 (a) (Build 22E772610a))
 of 2023-05-10
Package: Org mode version 9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)

current state:
==============
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-agenda-custom-commands '(("q" . "PU's views")
     ("qq" "PU's view"
      ((todo "WAIT"
((org-agenda-skip-function
  '(org-agenda-skip-entry-if 'scheduled))
 (org-agenda-prefix-format '((todo . ""))))
)
(todo "DELG"
((org-agenda-skip-function
  '(org-agenda-skip-entry-if 'scheduled))
 (org-agenda-prefix-format '((todo . ""))))
)
(todo "TODO"
((org-agenda-skip-function
  '(org-agenda-skip-entry-if 'scheduled))
 (org-agenda-prefix-format '((todo . ""))))
)
(agenda ""
((org-agenda-span 35)
 (org-agenda-prefix-format '((agenda . ""))))
)
nil ("~/Workcloud/org/agenda.txt"))
      )
     )
 org-load-hook '((lambda nil (setq org-element-use-cache nil)
 (setq org-startup-with-inline-images t)
 (setq org-element--cache-self-verify-frequency 0.01)
 (setq org-hide-leading-stars t)
 (setq org-tags-sort-function 'org-string-collate-lessp)
 (setq org-priority-start-cycle-with-default nil)
 (setq org-refile-targets '((org-agenda-files :maxlevel . 9)))
 (setq org-outline-path-complete-in-steps nil) (setq org-log-into-drawer t)
 (setq org-reverse-note-order t) (setq org-return-follows-link t)
 (setq org-tags-column -90)
 (setq org-todo-keyword-faces
  '(("WAIT" :foreground "magenta") ("TODO" :foreground "red")
    ("DELG" :foreground "orange") ("DONE" :foreground "grey"))
  )
 (setq calendar-week-start-day 1) (setq org-todo-fast-selection t)
 (setq org-ellipsis "……") (setq org-startup-indented nil)
 (setq org-adapt-indentation t) (setq org-deadline-warning-days 0)
 (setq org-todo-repeat-to-state "TODO")
 (if work
  (progn (define-key org-mode-map " a" 'org-agenda)
   (setq org-agenda-files '("~/Workcloud/org/WORK.org"))
   (setq org-agenda-skip-scheduled-if-done t)
   (setq org-agenda-skip-scheduled-if-deadline-is-shown t)
   (setq org-agenda-skip-scheduled-if-deadline-if-done t)
   (setq org-agenda-use-time-grid nil)
   (setq org-agenda-show-future-repeats nil)
   (setq org-agenda-start-with-follow-mode t)
   (add-hook 'org-agenda-mode-hook
    #'(lambda nil
(define-key org-agenda-mode-map "\360" 'org-agenda-backward-block)
(define-key org-agenda-mode-map "\356" 'org-agenda-forward-block))
    )
   (setq org-agenda-sorting-strategy
    '((agenda priority-down todo-state-up alpha-up)
      (todo priority-down todo-state-up category-keep)
      (tags priority-down category-keep) (search category-keep))
    )
   (setq org-agenda-custom-commands
    '(("q" . "PU's views")
      ("qq" "PU's view"
((todo "WAIT"
 ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))
  (org-agenda-prefix-format '((todo . ""))))
 )
(todo "DELG"
 ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))
  (org-agenda-prefix-format '((todo . ""))))
 )
(todo "TODO"
 ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))
  (org-agenda-prefix-format '((todo . ""))))
 )
(agenda ""
 ((org-agenda-span 35) (org-agenda-prefix-format '((agenda . "")))))
nil ("~/Workcloud/org/agenda.txt"))
)
      )
    )
   (global-set-key (kbd "<f6>") 'org-capture)
   (setq org-capture-templates
    '(("t" "Todo (work)" entry
(file+olp "~/Workcloud/org/WORK.org" "CAPTURE")
"* TODO %^{Task Description}" :prepend t)
      ("n" "Note (work)" entry
(file+olp "~/Workcloud/org/WORK.org" "CAPTURE")
"* %^{Note Description}" :prepend t)
      ("x" "Todo (test)" entry
(file+olp "~/Workcloud/org/WORK.org" "CAPTURE" "CAPTURE-TEST")
"* TODO %^{Task Description}" :prepend t)
      )
    )
   )
  )
 )
)
 org-log-into-drawer t
 org-agenda-skip-scheduled-if-done t
 org-agenda-files '("~/Workcloud/org/WORK.org")
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-refile-targets '((org-agenda-files :maxlevel . 9))
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-show-empty-lines
 org-cycle-optimize-window-after-visibility-change
 org-cycle-display-inline-images)
 org-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
  [add-hook change-major-mode-hook org-fold-show-all append local] 5]
#[0 "\300\301\302\303\304$\207"
  [add-hook change-major-mode-hook org-babel-show-result-all append local]
  5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ellipsis "……"
 org-confirm-shell-link-function 'yes-or-no-p
 org-agenda-skip-scheduled-if-deadline-is-shown t
 org-adapt-indentation t
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-tags-sort-function 'org-string-collate-lessp
 org-agenda-sorting-strategy '((agenda priority-down todo-state-up alpha-up)
      (todo priority-down todo-state-up category-keep)
      (tags priority-down category-keep) (search category-keep))
 org-agenda-mode-hook '((lambda nil
(define-key org-agenda-mode-map "\360" 'org-agenda-backward-block)
(define-key org-agenda-mode-map "\356" 'org-agenda-forward-block))
)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-hide-leading-stars t
 org-deadline-warning-days 0
 org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
 org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal
 org-persist-before-write-hook '(org-element--cache-persist-before-write)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-pre-tangle-hook '(save-buffer)
 org-agenda-loop-over-headlines-in-active-region nil
 org-todo-keyword-faces '(("WAIT" :foreground "magenta") ("TODO"
:foreground "red")
 ("DELG" :foreground "orange") ("DONE" :foreground "grey"))
 org-occur-hook '(org-first-headline-recenter)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 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 :insert-description
org-info-description-as-command)
      ("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)
      ("doi" :follow org-link-doi-open :export org-link-doi-export)
      ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell)
      ("news" :follow
#[514 "\301\300\302 Q \"\207" ["news" browse-url ":"] 6
 "\n\n(fn URL ARG)"]
)
      ("mailto" :follow
#[514 "\301\300\302 Q \"\207" ["mailto" browse-url ":"] 6
 "\n\n(fn URL ARG)"]
)
      ("https" :follow
#[514 "\301\300\302 Q \"\207" ["https" browse-url ":"] 6
 "\n\n(fn URL ARG)"]
)
      ("http" :follow
#[514 "\301\300\302 Q \"\207" ["http" browse-url ":"] 6
 "\n\n(fn URL ARG)"]
)
      ("ftp" :follow
#[514 "\301\300\302 Q \"\207" ["ftp" browse-url ":"] 6
 "\n\n(fn URL ARG)"]
)
      ("help" :follow org-link--open-help :store org-link--store-help)
      ("file" :complete org-link-complete-file)
      ("elisp" :follow org-link--open-elisp))
 org-agenda-start-with-follow-mode t
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-todo-repeat-to-state "TODO"
 org-startup-with-inline-images t
 org-priority-start-cycle-with-default nil
 org-return-follows-link t
 org-outline-path-complete-in-steps nil
 org-tags-column -90
 org-agenda-show-future-repeats nil
 org-reverse-note-order t
 org-agenda-use-time-grid nil
 )

[-- Attachment #2: Type: text/html, Size: 13465 bytes --]

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

* [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]
@ 2023-05-20 15:47 Patrick Useldinger
  2023-05-20 16:04 ` Ihor Radchenko
  0 siblings, 1 reply; 13+ messages in thread
From: Patrick Useldinger @ 2023-05-20 15:47 UTC (permalink / raw)
  To: Emacs-orgmode


Hello

I've come across what seems to be a bug in org-element-cache handling.

To reproduce:
1) create a level 1 heading (in my case: "CAPTURE") and a level 2 
heading (in my case: "CAPTURE-TEST")
2) create a similar template to file tasks under a level-2 heading:
("x" "Todo (test)" entry
(file+olp "~/Workcloud/org/WORK.org" "CAPTURE" "CAPTURE-TEST")
"* TODO %^{Task Description}"
:prepend t)
3) create a task using this template (x)
4) while in the narrowed buffer, try to tag the task using C-c C-q 
(org-set-tags-command)

This will hang. Pressing C-g helps you recover, the stack trace being
Debugger entered--Lisp error: (quit)
   #f(compiled-function () #<bytecode 0x1321472668e93f>)()
   org-element--parse-to(77445)
   org-element-cache-map(#f(compiled-function (el) #<bytecode 
0x184aaa442bea9805>))
   org-get-buffer-tags()
   org-set-tags-command(nil)
   funcall-interactively(org-set-tags-command nil)
   call-interactively(org-set-tags-command nil nil)
   command-execute(org-set-tags-command)

Disabling the cache with (setq org-element-use-cache nil) solves the 
problem.
As does dropping "CAPTURE-TEST" in the template (i.e. putting the task 
under a level-1 heading instead of level-2).

Relevant Reddit threat: 
https://www.reddit.com/r/orgmode/comments/13lwu2o/orgmode_starting_to_be_way_more_buggy/?s=8)

HTH,
-Patrick


------------------------------------------------------------------------

Emacs  : GNU Emacs 28.2 (build 1, aarch64-apple-darwin22.4.0, NS 
appkit-2299.50 Version 13.3.1 (a) (Build 22E772610a))
  of 2023-05-10
Package: Org mode version 9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)

current state:
==============
(setq
  org-link-elisp-confirm-function 'yes-or-no-p
  org-bibtex-headline-format-function #[257 "\300\x01\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]
  org-agenda-custom-commands '(("q" . "PU's views")
      ("qq" "PU's view"
       ((todo "WAIT"
((org-agenda-skip-function
   '(org-agenda-skip-entry-if 'scheduled))
  (org-agenda-prefix-format '((todo . ""))))
)
(todo "DELG"
((org-agenda-skip-function
   '(org-agenda-skip-entry-if 'scheduled))
  (org-agenda-prefix-format '((todo . ""))))
)
(todo "TODO"
((org-agenda-skip-function
   '(org-agenda-skip-entry-if 'scheduled))
  (org-agenda-prefix-format '((todo . ""))))
)
(agenda ""
((org-agenda-span 35)
  (org-agenda-prefix-format '((agenda . ""))))
)
nil ("~/Workcloud/org/agenda.txt"))
       )
      )
  org-load-hook '((lambda nil (setq org-element-use-cache nil)
  (setq org-startup-with-inline-images t)
  (setq org-element--cache-self-verify-frequency 0.01)
  (setq org-hide-leading-stars t)
  (setq org-tags-sort-function 'org-string-collate-lessp)
  (setq org-priority-start-cycle-with-default nil)
  (setq org-refile-targets '((org-agenda-files :maxlevel . 9)))
  (setq org-outline-path-complete-in-steps nil) (setq org-log-into-drawer t)
  (setq org-reverse-note-order t) (setq org-return-follows-link t)
  (setq org-tags-column -90)
  (setq org-todo-keyword-faces
   '(("WAIT" :foreground "magenta") ("TODO" :foreground "red")
     ("DELG" :foreground "orange") ("DONE" :foreground "grey"))
   )
  (setq calendar-week-start-day 1) (setq org-todo-fast-selection t)
  (setq org-ellipsis "……") (setq org-startup-indented nil)
  (setq org-adapt-indentation t) (setq org-deadline-warning-days 0)
  (setq org-todo-repeat-to-state "TODO")
  (if work
   (progn (define-key org-mode-map "\x03a" 'org-agenda)
    (setq org-agenda-files '("~/Workcloud/org/WORK.org"))
    (setq org-agenda-skip-scheduled-if-done t)
    (setq org-agenda-skip-scheduled-if-deadline-is-shown t)
    (setq org-agenda-skip-scheduled-if-deadline-if-done t)
    (setq org-agenda-use-time-grid nil)
    (setq org-agenda-show-future-repeats nil)
    (setq org-agenda-start-with-follow-mode t)
    (add-hook 'org-agenda-mode-hook
     #'(lambda nil
(define-key org-agenda-mode-map "\360" 'org-agenda-backward-block)
(define-key org-agenda-mode-map "\356" 'org-agenda-forward-block))
     )
    (setq org-agenda-sorting-strategy
     '((agenda priority-down todo-state-up alpha-up)
       (todo priority-down todo-state-up category-keep)
       (tags priority-down category-keep) (search category-keep))
     )
    (setq org-agenda-custom-commands
     '(("q" . "PU's views")
       ("qq" "PU's view"
((todo "WAIT"
  ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))
   (org-agenda-prefix-format '((todo . ""))))
  )
(todo "DELG"
  ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))
   (org-agenda-prefix-format '((todo . ""))))
  )
(todo "TODO"
  ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))
   (org-agenda-prefix-format '((todo . ""))))
  )
(agenda ""
  ((org-agenda-span 35) (org-agenda-prefix-format '((agenda . "")))))
nil ("~/Workcloud/org/agenda.txt"))
)
       )
     )
    (global-set-key (kbd "<f6>") 'org-capture)
    (setq org-capture-templates
     '(("t" "Todo (work)" entry
(file+olp "~/Workcloud/org/WORK.org" "CAPTURE")
"* TODO %^{Task Description}" :prepend t)
       ("n" "Note (work)" entry
(file+olp "~/Workcloud/org/WORK.org" "CAPTURE")
"* %^{Note Description}" :prepend t)
       ("x" "Todo (test)" entry
(file+olp "~/Workcloud/org/WORK.org" "CAPTURE" "CAPTURE-TEST")
"* TODO %^{Task Description}" :prepend t)
       )
     )
    )
   )
  )
)
  org-log-into-drawer t
  org-agenda-skip-scheduled-if-done t
  org-agenda-files '("~/Workcloud/org/WORK.org")
  org-persist-after-read-hook '(org-element--cache-persist-after-read)
  org-refile-targets '((org-agenda-files :maxlevel . 9))
  org-export-before-parsing-hook '(org-attach-expand-links)
  org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
  org-archive-hook '(org-attach-archive-delete-maybe)
  org-cycle-hook '(org-cycle-hide-archived-subtrees 
org-cycle-show-empty-lines
  org-cycle-optimize-window-after-visibility-change
  org-cycle-display-inline-images)
  org-persist-before-read-hook '(org-element--cache-persist-before-read)
  org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-fold-show-all append local] 5]
#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-babel-show-result-all append local]
   5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
  org-ellipsis "……"
  org-confirm-shell-link-function 'yes-or-no-p
  org-agenda-skip-scheduled-if-deadline-is-shown t
  org-adapt-indentation t
  outline-isearch-open-invisible-function 'outline-isearch-open-invisible
  org-tags-sort-function 'org-string-collate-lessp
  org-agenda-sorting-strategy '((agenda priority-down todo-state-up 
alpha-up)
       (todo priority-down todo-state-up category-keep)
       (tags priority-down category-keep) (search category-keep))
  org-agenda-mode-hook '((lambda nil
(define-key org-agenda-mode-map "\360" 'org-agenda-backward-block)
(define-key org-agenda-mode-map "\356" 'org-agenda-forward-block))
)
  org-agenda-before-write-hook '(org-agenda-add-entry-text)
  org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
  org-confirm-elisp-link-function 'yes-or-no-p
  org-hide-leading-stars t
  org-deadline-warning-days 0
  org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
  org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal
  org-persist-before-write-hook '(org-element--cache-persist-before-write)
  org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
  org-link-shell-confirm-function 'yes-or-no-p
  org-babel-pre-tangle-hook '(save-buffer)
  org-agenda-loop-over-headlines-in-active-region nil
  org-todo-keyword-faces '(("WAIT" :foreground "magenta") ("TODO" 
:foreground "red")
  ("DELG" :foreground "orange") ("DONE" :foreground "grey"))
  org-occur-hook '(org-first-headline-recenter)
  org-metadown-hook '(org-babel-pop-to-session-maybe)
  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 :insert-description
org-info-description-as-command)
       ("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)
       ("doi" :follow org-link-doi-open :export org-link-doi-export)
       ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell)
       ("news" :follow
#[514 "\301\300\302\x04Q\x02\"\207" ["news" browse-url ":"] 6
  "\n\n(fn URL ARG)"]
)
       ("mailto" :follow
#[514 "\301\300\302\x04Q\x02\"\207" ["mailto" browse-url ":"] 6
  "\n\n(fn URL ARG)"]
)
       ("https" :follow
#[514 "\301\300\302\x04Q\x02\"\207" ["https" browse-url ":"] 6
  "\n\n(fn URL ARG)"]
)
       ("http" :follow
#[514 "\301\300\302\x04Q\x02\"\207" ["http" browse-url ":"] 6
  "\n\n(fn URL ARG)"]
)
       ("ftp" :follow
#[514 "\301\300\302\x04Q\x02\"\207" ["ftp" browse-url ":"] 6
  "\n\n(fn URL ARG)"]
)
       ("help" :follow org-link--open-help :store org-link--store-help)
       ("file" :complete org-link-complete-file)
       ("elisp" :follow org-link--open-elisp))
  org-agenda-start-with-follow-mode t
  org-metaup-hook '(org-babel-load-in-session-maybe)
  org-todo-repeat-to-state "TODO"
  org-startup-with-inline-images t
  org-priority-start-cycle-with-default nil
  org-return-follows-link t
  org-outline-path-complete-in-steps nil
  org-tags-column -90
  org-agenda-show-future-repeats nil
  org-reverse-note-order t
  org-agenda-use-time-grid nil
  )


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

* Re: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]
  2023-05-20 15:47 [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)] Patrick Useldinger
@ 2023-05-20 16:04 ` Ihor Radchenko
  2023-05-20 18:41   ` Patrick Useldinger
  2023-05-23  9:13   ` Patrick Useldinger
  0 siblings, 2 replies; 13+ messages in thread
From: Ihor Radchenko @ 2023-05-20 16:04 UTC (permalink / raw)
  To: Patrick Useldinger; +Cc: Emacs-orgmode

Patrick Useldinger <uselpa@gmail.com> writes:

> Hello
>
> I've come across what seems to be a bug in org-element-cache handling.
>
> To reproduce:
> 1) create a level 1 heading (in my case: "CAPTURE") and a level 2 
> heading (in my case: "CAPTURE-TEST")
> 2) create a similar template to file tasks under a level-2 heading:
> ("x" "Todo (test)" entry
> (file+olp "~/Workcloud/org/WORK.org" "CAPTURE" "CAPTURE-TEST")
> "* TODO %^{Task Description}"
> :prepend t)
> 3) create a task using this template (x)
> 4) while in the narrowed buffer, try to tag the task using C-c C-q 
> (org-set-tags-command)

I am unable to reproduce.
Could you please try to detail all the steps more precisely, starting
from emacs -Q?

-- 
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>


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

* Re: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]
  2023-05-20 16:04 ` Ihor Radchenko
@ 2023-05-20 18:41   ` Patrick Useldinger
  2023-05-20 20:01     ` Ihor Radchenko
  2023-05-23  9:13   ` Patrick Useldinger
  1 sibling, 1 reply; 13+ messages in thread
From: Patrick Useldinger @ 2023-05-20 18:41 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Emacs-orgmode

Thank you for your answer.

I have spend a few hours trying to reproduce it with -Q and the original 
org file, removing every additional package - to no avail.

The fact remains - it only works when the cache is disabled.

Any other idea how I could get you some useful information?

-pu

On 20/05/2023 18:04, Ihor Radchenko wrote:
> Patrick Useldinger <uselpa@gmail.com> writes:
> 
>> Hello
>>
>> I've come across what seems to be a bug in org-element-cache handling.
>>
>> To reproduce:
>> 1) create a level 1 heading (in my case: "CAPTURE") and a level 2
>> heading (in my case: "CAPTURE-TEST")
>> 2) create a similar template to file tasks under a level-2 heading:
>> ("x" "Todo (test)" entry
>> (file+olp "~/Workcloud/org/WORK.org" "CAPTURE" "CAPTURE-TEST")
>> "* TODO %^{Task Description}"
>> :prepend t)
>> 3) create a task using this template (x)
>> 4) while in the narrowed buffer, try to tag the task using C-c C-q
>> (org-set-tags-command)
> 
> I am unable to reproduce.
> Could you please try to detail all the steps more precisely, starting
> from emacs -Q?
> 


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

* Re: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]
  2023-05-20 18:41   ` Patrick Useldinger
@ 2023-05-20 20:01     ` Ihor Radchenko
  2023-05-20 21:06       ` Patrick Useldinger
                         ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Ihor Radchenko @ 2023-05-20 20:01 UTC (permalink / raw)
  To: Patrick Useldinger; +Cc: Emacs-orgmode

Patrick Useldinger <uselpa@gmail.com> writes:

> I have spend a few hours trying to reproduce it with -Q and the original 
> org file, removing every additional package - to no avail.
>
> The fact remains - it only works when the cache is disabled.
>
> Any other idea how I could get you some useful information?

You can try to bisect your config to identify which part is triggering
the problem. See
https://list.orgmode.org/orgmode/87ee2nlslt.fsf@localhost/ and
https://github.com/Malabarba/elisp-bug-hunter

-- 
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>


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

* Re: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]
  2023-05-20 20:01     ` Ihor Radchenko
@ 2023-05-20 21:06       ` Patrick Useldinger
  2023-05-22  8:35         ` Ihor Radchenko
  2023-05-21  9:00       ` Patrick Useldinger
                         ` (3 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Patrick Useldinger @ 2023-05-20 21:06 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Emacs-orgmode

On 20/05/2023 22:01, Ihor Radchenko wrote:
> You can try to bisect your config to identify which part is triggering
> the problem. See
> https://list.orgmode.org/orgmode/87ee2nlslt.fsf@localhost/ and
> https://github.com/Malabarba/elisp-bug-hunter
> 

bug hunter hasn't helped at all, maybe I've missed something, will have 
to try again later.

I tried to profile the loop though:

CPU (1 core is running at 100% for Emacs during the loop)

         1671  83% - command-execute
         1666  82%  - call-interactively
         1666  82%   - funcall-interactively
         1442  71%    - org-set-tags-command
         1442  71%     - org-get-buffer-tags
         1111  55%      - org-element-cache-map
          670  33%       - org-element-at-point
          124   6%        - org-element--parse-to
            8   0%           org-element--cache-find
            2   0%           #<compiled 0x1f4289c15e3f>
            2   0%           org-element--cache-active-p
            4   0%          org-element--cache-active-p
            1   0%          org-element--cache-verify-element
           89   4%       - org-element--parse-to
            8   0%        + org-element--cache-find
            3   0%          #<compiled 0x1f4289c15e3f>
            1   0%          org-element--cache-active-p
          138   6%    - counsel-M-x
          130   6%     - ivy-read
           25   1%      + read-from-minibuffer
            6   0%      + ivy-call
            4   0%      + ivy--reset-state
            8   0%       counsel--M-x-externs
           78   3%    + org-capture
            8   0%    + org-capture-kill
            4   0%    autoload-do-load
          301  14% - ...
          301  14%    Automatic GC
           20   0% + vc-menu-map-filter
           11   0% + timer-event-handler
            1   0%   and
            1   0% + substitute-command-keys
            1   0% + not
            1   0%   keymap-canonicalize
            1   0% + redisplay_internal (C function)

MEM

     202,905,419  99% - command-execute
     202,751,140  99%  - call-interactively
     202,751,140  99%   - funcall-interactively
     186,430,734  91%    - org-set-tags-command
     186,422,494  91%     - org-get-buffer-tags
     186,418,350  91%      - org-element-cache-map
      95,156,424  46%       + org-element-at-point
      63,785,615  31%       - org-element--parse-to
          15,743   0%          make-closure
          14,532   0%          org-element--cache-active-p
          14,532   0%          buffer-base-buffer
          14,532   0%         plist-get
           1,211   0%         re-search-forward
           1,048   0%         #<compiled 0x18db7aed758e9805>
           7,216   0%     + org-get-tags
           1,024   0%     + org-back-to-heading
       6,698,223   3%    - org-capture
       5,982,622   2%     + org-capture-place-template
         503,607   0%     + org-capture-fill-template
         187,110   0%     + org-capture-select-template
          17,688   0%     + org-capture-set-target-location
           1,024   0%       org-capture-set-plist
       5,410,654   2%    - counsel-M-x
       5,337,470   2%     - ivy-read
       3,440,528   1%      + ivy-call
       1,620,889   0%      + read-from-minibuffer
         256,598   0%      + ivy--reset-state
           1,024   0%      + ivy--update-prompt
          73,184   0%     + counsel--M-x-externs
       4,211,529   2%    - org-capture-kill
       4,211,529   2%     + org-capture-finalize
         153,127   0%  + autoload-do-load
         622,776   0% + vc-menu-map-filter
         372,645   0% + substitute-command-keys
         116,585   0% + redisplay_internal (C function)
          46,392   0% + timer-event-handler
          12,300   0% + assq
           9,208   0% + not
           4,144   0%   keymap-canonicalize
           1,936   0% + org-at-timestamp-p
           1,152   0% + org-at-table-p
           1,024   0%   kill-this-buffer-enabled-p
           1,024   0%   and
           1,024   0%   org-at-heading-p
           1,024   0% + require
              21   0% + #<compiled -0x2222a21eed62b99>
               0   0%   ...

I don't see much interaction with anything outside of org-mode.
There's some ivy and counsel, but I uninstalled them and that didn't 
solve the problem.

For comparison, here's with the element cache disabled:

CPU

          343  91% - command-execute
          336  89%  - call-interactively
          336  89%   - funcall-interactively
          173  46%    - counsel-M-x
          165  43%     - ivy-read
           53  14%      - read-from-minibuffer
           14   3%       - ivy--queue-exhibit
           14   3%        - ivy--exhibit
           14   3%         - ivy--update-minibuffer
            7   1%          + ivy--filter
            7   1%          + ivy--format
            2   0%       + substitute-command-keys
            1   0%         and
            6   1%      + ivy-call
            2   0%      + ivy--reset-state
            8   2%       counsel--M-x-externs
           78  20%    - org-capture
           43  11%     - org-capture-fill-template
           38  10%      - org-completing-read
           38  10%       - apply
           38  10%        - completing-read
           38  10%         - ivy-completing-read
           38  10%          - ivy-read
            6   1%           + read-from-minibuffer
            2   0%      + org-mode
           31   8%     + org-capture-select-template
            2   0%     + org-capture-set-target-location
            2   0%     + org-capture-place-template
           45  11%    - org-set-tags-command
           40  10%     - completing-read-multiple
           14   3%      - read-from-minibuffer
            1   0%       + timer-event-handler
            1   0%       org-get-buffer-tags
           40  10%    - org-capture-finalize
           29   7%     - save-buffer
           29   7%      - basic-save-buffer
           29   7%       - basic-save-buffer-1
           29   7%        - basic-save-buffer-2
           28   7%         - write-region
           28   7%          - select-safe-coding-system
           27   7%             find-coding-systems-region
            1   0%             auto-coding-alist-lookup
           11   2%     + org-capture-store-last-position
            4   1%    autoload-do-load
           32   8% - ...
           32   8%    Automatic GC
            1   0% + redisplay_internal (C function)

MEM

      97,045,311  99% - command-execute
      96,891,032  99%  - call-interactively
      96,891,032  99%   - funcall-interactively
      84,247,208  86%    - org-capture-finalize
      79,980,939  82%     - save-buffer
      79,980,939  82%      - basic-save-buffer
      79,966,010  82%       - basic-save-buffer-1
      79,966,010  82%        - basic-save-buffer-2
      79,557,559  81%         - write-region
      79,557,559  81%          - select-safe-coding-system
      79,485,867  81%           - find-coding-systems-region
           3,456   0%            + sort-coding-systems
             395   0%              copy-sequence
          54,312   0%           + find-auto-coding
          17,380   0%             auto-coding-alist-lookup
          14,929   0%       + vc-after-save
       1,828,137   1%     + kill-buffer
         589,419   0%     + org-capture-store-last-position
          15,408   0%     + org-update-parent-todo-statistics
           1,024   0%     + org-back-to-heading
           1,024   0%       org-update-checkbox-count
       6,539,717   6%    - org-capture
       5,931,471   6%     - org-capture-place-template
       3,900,777   4%        delete-other-windows
       1,871,642   1%      - org-switch-to-buffer-other-window
       1,871,642   1%       - apply
       1,871,642   1%        + switch-to-buffer-other-window
         105,652   0%      + org-capture-mode
          43,240   0%      + org-capture-place-entry
          10,120   0%      + org-fold-show-all
         411,724   0%     + org-capture-fill-template
         172,710   0%     + org-capture-select-template
          20,760   0%     + org-capture-set-target-location
           1,024   0%       org-capture-set-plist
       5,853,892   6%    + counsel-M-x
         250,215   0%    + org-set-tags-command
         148,983   0%  + autoload-do-load
         174,845   0% + redisplay_internal (C function)
               0   0%   ...

I appreciate your input and your time.

Given that it works perfectly when I file the captured input under a 
level 1 heading I might just leave it at that.

Regards,
-Patrick


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

* Re: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]
  2023-05-20 20:01     ` Ihor Radchenko
  2023-05-20 21:06       ` Patrick Useldinger
@ 2023-05-21  9:00       ` Patrick Useldinger
  2023-05-23  9:07       ` Patrick Useldinger
                         ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Patrick Useldinger @ 2023-05-21  9:00 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Emacs-orgmode

On 20/05/2023 22:01, Ihor Radchenko wrote:
> You can try to bisect your config to identify which part is triggering
> the problem. See
> https://list.orgmode.org/orgmode/87ee2nlslt.fsf@localhost/ and
> https://github.com/Malabarba/elisp-bug-hunter
> 

FWIW, I just got the following message at startup:

---

Warning (org-element-cache): org-element--cache: Org parser error in 
WORK.org::84837. Resetting.
  The error was: (error "Invalid search bound (wrong side of point)")
  Backtrace:
nil
  Please report this to Org mode mailing list (M-x 
org-submit-bug-report). Disable showing Disable logging

---

It only happened once.
Does this convey any additional information?

-pu


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

* Re: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]
  2023-05-20 21:06       ` Patrick Useldinger
@ 2023-05-22  8:35         ` Ihor Radchenko
  0 siblings, 0 replies; 13+ messages in thread
From: Ihor Radchenko @ 2023-05-22  8:35 UTC (permalink / raw)
  To: Patrick Useldinger; +Cc: Emacs-orgmode

Patrick Useldinger <uselpa@gmail.com> writes:

>> https://github.com/Malabarba/elisp-bug-hunter
>> 
>
> bug hunter hasn't helped at all, maybe I've missed something, will have 
> to try again later.

It will not catch anything automatically - you likely need to do
interactive debugging here.
I provided an example in https://cubeatic.com/index.php/s/iQakFWXgxsJzyXP
Hope it helps.

> I tried to profile the loop though:

This is not useful for infinite loop - the logic might be faulty here or
some third-party package doing something weird. We instead need to
identify how to reproduce the problem, so that I can diagnose further on
my side.

-- 
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>


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

* Re: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]
  2023-05-20 20:01     ` Ihor Radchenko
  2023-05-20 21:06       ` Patrick Useldinger
  2023-05-21  9:00       ` Patrick Useldinger
@ 2023-05-23  9:07       ` Patrick Useldinger
  2023-05-23  9:15       ` Patrick Useldinger
  2023-05-23  9:15       ` Patrick Useldinger
  4 siblings, 0 replies; 13+ messages in thread
From: Patrick Useldinger @ 2023-05-23  9:07 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Emacs-orgmode

On 20/05/2023 22:01, Ihor Radchenko wrote:
> You can try to bisect your config to identify which part is triggering
> the problem. See
> https://list.orgmode.org/orgmode/87ee2nlslt.fsf@localhost/ and
> https://github.com/Malabarba/elisp-bug-hunter

I have been able to create a minimal set of init.el and WORK.org which 
allows me to reproduce the problem:

1) start Emacs
2) F6 (shortcut for capture)
3) x
4) create a task in the capture buffer
5) press C-c C-q and enjoy the loop
6) C-g breaks the loop

OTOH, using t at step 3 works well.
As indicated, the only difference between the remplates x and t is that 
x uses 2 levels of heading, whereas t only uses one.

HTH!


--- WORK.org

;; -*- coding: utf-8 -*-
#+TODO: WAIT(w) TODO(t) DELG(d) | DONE(x)
#+STARTUP: show2levels hidestars nologrepeat
#+ARCHIVE: %s_archive::
* CAPTURE
** Regulars
*** TODO [#C] -- Empty CAP.org/CAPTURE
     SCHEDULED: <2023-05-26 Fri ++1w>
** Cap-X
** WAIT hello 
            :test:
** DONE read "acceptable use"
    DEADLINE: <2023-05-19 Fri>

--- init.el

;; custom variables
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
  '(org-capture-templates
    '(("x" "Todo (test)" entry
       (file+olp "/Users/pu/Workcloud/org/WORK.org" "CAPTURE" "Cap-X")
       "* TODO %^{Task Description}" :prepend t)
      ("t" "Todo (work)" entry
       (file+olp "~/Workcloud/org/WORK.org" "CAPTURE")
       "* TODO %^{Task Description}" :prepend t)
      ("n" "Note (work)" entry
       (file+olp "~/Workcloud/org/WORK.org" "CAPTURE")
       "* %^{Note Description}" :prepend t))))

;; system-specific
(when (eq system-type 'darwin)
   (setq ns-alternate-modifier 'meta)
   (setq ns-right-alternate-modifier nil))

;; package: org
(add-hook
  'org-load-hook
  (lambda ()
    (define-key org-mode-map "\C-ca" 'org-agenda)
    (add-hook
     'org-agenda-load-hook
     (lambda ()
       (define-key org-agenda-mode-map "\M-p" 'org-agenda-backward-block)
       (define-key org-agenda-mode-map "\M-n" 'org-agenda-forward-block)))
    (global-set-key (kbd "<f6>") 'org-capture)))

(defun pu/options ()
   (interactive)
   (pu/option-org))
(add-hook 'window-setup-hook 'pu/options)

(defun pu/option-org ()
   (find-file "~/Workcloud/org/WORK.org"))








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

* Re: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]
  2023-05-20 16:04 ` Ihor Radchenko
  2023-05-20 18:41   ` Patrick Useldinger
@ 2023-05-23  9:13   ` Patrick Useldinger
  1 sibling, 0 replies; 13+ messages in thread
From: Patrick Useldinger @ 2023-05-23  9:13 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Emacs-orgmode

On 20/05/2023 18:04, Ihor Radchenko wrote:
> I am unable to reproduce.
> Could you please try to detail all the steps more precisely, starting
> from emacs -Q?
> 

I have been able to create a minimal set of init.el and WORK.org which
allows me to reproduce the problem:

1) start Emacs
2) F6 (shortcut for capture)
3) x
4) create a task in the capture buffer
5) press C-c C-q and enjoy the loop
6) C-g breaks the loop

OTOH, using t at step 3 works well.
As indicated, the only difference between the remplates x and t is that
x uses 2 levels of heading, whereas t only uses one.

--- WORK.org

;; -*- coding: utf-8 -*-
#+TODO: WAIT(w) TODO(t) DELG(d) | DONE(x)
#+STARTUP: show2levels hidestars nologrepeat
#+ARCHIVE: %s_archive::
* CAPTURE
** Regulars
*** TODO [#C] -- Empty CAP.org/CAPTURE
      SCHEDULED: <2023-05-26 Fri ++1w>
** Cap-X
** WAIT hello
             :test:
** DONE read "acceptable use"
     DEADLINE: <2023-05-19 Fri>

--- init.el

;; custom variables
(custom-set-variables
   ;; custom-set-variables was added by Custom.
   ;; If you edit it by hand, you could mess it up, so be careful.
   ;; Your init file should contain only one such instance.
   ;; If there is more than one, they won't work right.
   '(org-capture-templates
     '(("x" "Todo (test)" entry
        (file+olp "/Users/pu/Workcloud/org/WORK.org" "CAPTURE" "Cap-X")
        "* TODO %^{Task Description}" :prepend t)
       ("t" "Todo (work)" entry
        (file+olp "~/Workcloud/org/WORK.org" "CAPTURE")


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

* Re: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]
  2023-05-20 20:01     ` Ihor Radchenko
                         ` (2 preceding siblings ...)
  2023-05-23  9:07       ` Patrick Useldinger
@ 2023-05-23  9:15       ` Patrick Useldinger
  2023-05-23  9:15       ` Patrick Useldinger
  4 siblings, 0 replies; 13+ messages in thread
From: Patrick Useldinger @ 2023-05-23  9:15 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Emacs-orgmode

On 20/05/2023 22:01, Ihor Radchenko wrote:
> You can try to bisect your config to identify which part is triggering
> the problem. See
> https://list.orgmode.org/orgmode/87ee2nlslt.fsf@localhost/ and
> https://github.com/Malabarba/elisp-bug-hunter

I have "bisected" init.el to no avail, the problem remains.
Then I started doing the same with the org file and I was able to
reproduce the problem with the following minimal file:

---

;; -*- coding: utf-8 -*-
#+TODO: WAIT(w) TODO(t) DELG(d) | DONE(x)
#+STARTUP: show2levels hidestars nologrepeat
#+ARCHIVE: %s_archive::
* CAPTURE
** Regulars
*** TODO [#C] -- Empty CAP.org/CAPTURE
     SCHEDULED: <2023-05-26 Fri ++1w>
** Cap-X
** WAIT hello
            :test:
** DONE read "acceptable use"
    DEADLINE: <2023-05-19 Fri>

---

I am also posting my init.el here, just in case anybody can spot
anything problematic.


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

* Re: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]
  2023-05-20 20:01     ` Ihor Radchenko
                         ` (3 preceding siblings ...)
  2023-05-23  9:15       ` Patrick Useldinger
@ 2023-05-23  9:15       ` Patrick Useldinger
  2023-05-24  8:56         ` Ihor Radchenko
  4 siblings, 1 reply; 13+ messages in thread
From: Patrick Useldinger @ 2023-05-23  9:15 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Emacs-orgmode

On 20/05/2023 22:01, Ihor Radchenko wrote:
> You can try to bisect your config to identify which part is triggering
> the problem. See
> https://list.orgmode.org/orgmode/87ee2nlslt.fsf@localhost/ and
> https://github.com/Malabarba/elisp-bug-hunter

I have been able to create a minimal set of init.el and WORK.org which
allows me to reproduce the problem

1) start Emacs
2) F6 (shortcut for capture)
3) create a task in the capture buffer
4) press C-c C-q and enjoy the loop
5) C-g breaks the loop



--- WORK.org

;; -*- coding: utf-8 -*-
#+TODO: WAIT(w) TODO(t) DELG(d) | DONE(x)
#+STARTUP: show2levels hidestars nologrepeat
#+ARCHIVE: %s_archive::
* CAPTURE
** Regulars
*** TODO [#C] -- Empty CAP.org/CAPTURE
     SCHEDULED: <2023-05-26 Fri ++1w>
** Cap-X
** WAIT hello
            :test:
** DONE read "acceptable use"
    DEADLINE: <2023-05-19 Fri>

--- init.el


;; custom variables
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
  '(org-capture-templates
    '(("x" "Todo (test)" entry
       (file+olp "/Users/pu/Workcloud/org/WORK.org" "CAPTURE" "Cap-X")
       "* TODO %^{Task Description}" :prepend t)
      ("t" "Todo (work)" entry
       (file+olp "~/Workcloud/org/WORK.org" "CAPTURE")
       "* TODO %^{Task Description}" :prepend t)
      ("n" "Note (work)" entry
       (file+olp "~/Workcloud/org/WORK.org" "CAPTURE")
       "* %^{Note Description}" :prepend t))))

;; system-specific
(when (eq system-type 'darwin)
   (setq ns-alternate-modifier 'meta)
   (setq ns-right-alternate-modifier nil))

;; package: org
(add-hook
  'org-load-hook
  (lambda ()
    (define-key org-mode-map "\C-ca" 'org-agenda)
    (add-hook
     'org-agenda-load-hook
     (lambda ()
       (define-key org-agenda-mode-map "\M-p" 'org-agenda-backward-block)
       (define-key org-agenda-mode-map "\M-n" 'org-agenda-forward-block)))
    (global-set-key (kbd "<f6>") 'org-capture)))

(defun pu/options ()
   (interactive)
   (pu/option-org))
(add-hook 'window-setup-hook 'pu/options)

(defun pu/option-org ()
   (find-file "~/Workcloud/org/WORK.org"))


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

* Re: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)]
  2023-05-23  9:15       ` Patrick Useldinger
@ 2023-05-24  8:56         ` Ihor Radchenko
  0 siblings, 0 replies; 13+ messages in thread
From: Ihor Radchenko @ 2023-05-24  8:56 UTC (permalink / raw)
  To: Patrick Useldinger; +Cc: Emacs-orgmode

Patrick Useldinger <uselpa@gmail.com> writes:

> On 20/05/2023 22:01, Ihor Radchenko wrote:
>> You can try to bisect your config to identify which part is triggering
>> the problem. See
>> https://list.orgmode.org/orgmode/87ee2nlslt.fsf@localhost/ and
>> https://github.com/Malabarba/elisp-bug-hunter
>
> I have been able to create a minimal set of init.el and WORK.org which
> allows me to reproduce the problem
>
> 1) start Emacs
> 2) F6 (shortcut for capture)
> 3) create a task in the capture buffer
> 4) press C-c C-q and enjoy the loop
> 5) C-g breaks the loop

Thanks! Unfortunately, I am still unable to reproduce. May you try to
provide more detailed instructions?

I tried the following:

1. copy work.org to /tmp/bug.org
2. copy init.el to /tmp/bug.el, and adjust the paths
3. cd /path/to/org/git
4. git checkout bugfix
5. make repro REPRO_ARGS="-l /tmp/bug.el"
6. M-x org-capture <RET> x asd <RET> C-c C-q asd <RET>
7. No hang is observed.

-- 
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>


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

end of thread, other threads:[~2023-05-24  8:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-20 15:47 [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)] Patrick Useldinger
2023-05-20 16:04 ` Ihor Radchenko
2023-05-20 18:41   ` Patrick Useldinger
2023-05-20 20:01     ` Ihor Radchenko
2023-05-20 21:06       ` Patrick Useldinger
2023-05-22  8:35         ` Ihor Radchenko
2023-05-21  9:00       ` Patrick Useldinger
2023-05-23  9:07       ` Patrick Useldinger
2023-05-23  9:15       ` Patrick Useldinger
2023-05-23  9:15       ` Patrick Useldinger
2023-05-24  8:56         ` Ihor Radchenko
2023-05-23  9:13   ` Patrick Useldinger
  -- strict thread matches above, loose matches on Subject: below --
2023-05-19 21:23 Patrick Useldinger

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.