emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Error when using mouse to set TODO state [9.5.2 (9.5.2-g91681f @ /home/garyo/.emacs.d/straight/build/org/)]
@ 2022-03-17 16:37 Gary Oberbrunner
  2022-03-19  8:17 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Gary Oberbrunner @ 2022-03-17 16:37 UTC (permalink / raw)
  To: Orgmode Mailing List

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

I'm using org and org-roam. I tried to use the mouse-3 menu to toggle the
state of a TODO item, but I get this error:

Debugger entered--Lisp error: (void-variable org-todo)
  (funcall org-todo "DONE")
  popup-menu((nil ["TODO" (funcall org-todo "TODO") :style toggle :selected
t] ["WAITING" (funcall org-todo "WAITING") :style toggle :selected nil]
["DONE" (funcall org-todo "DONE") :style toggle :selected nil] ["CANCELLED"
(funcall org-todo "CANCELLED") :style toggle :selected nil] "--" ["Check
TODOs" org-show-todo-tree t] ["List all TODO keywords" org-todo-list t]
[#("List only TODO" 10 14 (fontified t face (org-todo org-level-1)))
(org-todo-list (match-string 0)) t]))
  org-mouse-context-menu((mouse-3 (#<window 30 on 20220315191837-python.org>
1735 (42 . 240) 88049612 nil 1735 (3 . 13) nil (9 . 12) (11 . 22))))
  org-mouse-show-context-menu((mouse-3 (#<window 30 on
20220315191837-python.org> 1735 (42 . 240) 88049612 nil 1735 (3 . 13) nil
(9 . 12) (11 . 22))) nil)
  funcall-interactively(org-mouse-show-context-menu (mouse-3 (#<window 30
on 20220315191837-python.org> 1735 (42 . 240) 88049612 nil 1735 (3 . 13)
nil (9 . 12) (11 . 22))) nil)
  call-interactively(org-mouse-show-context-menu nil nil)

Manually calling (funcall org-todo "DONE") works fine with point on that
todo item. "org-todo" is an interactive native-compiled Lisp function, so I
don't know why the error says "void-variable" -- why is its variable value
being used rather than its function value?
Toggling the TODO state with C-c C-t d works fine, no error. Just the
mouse-3 menu.

To repro, use this startup file (emacs -Q -l ~/.emacs-test), create foo.org
with a single TODO item, right-click and select DONE.

------------ .emacs-test ----
;;; Set up package system -- straight.el
(defvar bootstrap-version)
(or (boundp 'native-comp-deferred-compilation-deny-list)
    (setq native-comp-deferred-compilation-deny-list '()))

(let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el"
      (bootstrap-version 5))
  (unless (file-exists-p bootstrap-file)
         'silent 'inhibit-cookies)
      (goto-char (point-max))
  (load bootstrap-file nil 'nomessage))

(straight-use-package 'use-package)
(defvar straight-use-package-by-default)
(setq straight-use-package-by-default t) ; make use-package use straight

(use-package org
 (require 'org-mouse)
---------------------- cut -----------

System config:
WSL2 on Windows 11, Ubuntu.
Emacs compiled locally Jan 24 2022, with native compilation enabled.


Emacs  : GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version
3.24.20, cairo version 1.16.0)
 of 2022-01-24
Package: Org mode version 9.5.2 (9.5.2-g91681f @

current state:
 org-link-elisp-confirm-function 'yes-or-no-p
 org-directory "~/Documents/synced/RoamNotes"
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-tag-faces '(("@work" . "#0066ff") ("@home" . "#bb0000") ("volunteer" .
 org-log-done 'time
 org-agenda-custom-commands '(("w" "At work" ((agenda "" ((org-agenda-span
2))) (tags-todo "+PRIORITY=\"A\"") (tags-todo "@work"))
                               ((org-agenda-compact-blocks t)))
                              ("h" "At home" ((agenda "" ((org-agenda-span
4))) (tags-todo "+PRIORITY=\"A\"") (tags-todo "@home"))
                               ((org-agenda-compact-blocks t)))
                              ("i" "Inbox" ((tags-todo
                              ("u" "Uncategorized" ((tags-todo "-{.*}"
((org-agenda-overriding-header "Uncategorized TODOs")))))
                              ("U" "Unscheduled"
                               ((todo ""
"Unscheduled TODOs")
'(org-agenda-skip-entry-if 'scheduled)))
 org-startup-folded nil
 org-agenda-skip-scheduled-if-done t
 org-agenda-files '("~/Documents/synced/RoamNotes")
 org-capture-templates '(("t" "Todo [inbox]" entry (file+headline "inbox.org"
"Tasks") "* TODO %i%?\n  %U" :prepend t)
                         ("." "Today" entry (file+headline "inbox.org"
"Tasks") "* TODO %^{Task}\nSCHEDULED: %t\n"
                          :immediate-finish t)
                         ("s" "Scheduled TODO" entry (file+headline "
inbox.org" "Tasks") "* TODO %? %^G \nSCHEDULED: %^t\n  %U")
                         ("d" "Deadline" entry (file+headline "inbox.org"
"Tasks") "* TODO %? %^G \n  DEADLINE: %^t" :empty-lines
                         ("w" "Work" entry (file+headline "gtd.org" "Work")
"* TODO %i%?\n  %U" :prepend t)
                         ("h" "Home" entry (file+headline "gtd.org" "Home")
"* TODO %i%?\n  %U" :prepend t)
                         ("T" "Tickler" entry (file+headline "tickler.org"
"Tickler") "* TODO %i%? \n %U"))
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-refile-targets '((nil :maxlevel . 4) (org-agenda-files :maxlevel . 4))
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-default-notes-file "~/Documents/synced/RoamNotes/notes.org"
 org-roam-find-file-hook '(org-roam-buffer--setup-redisplay-h
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-font-lock-hook '(org-inlinetask-fontify)
 org-cycle-hook '(org-inlinetask-hide-tasks
org-cycle-hide-archived-subtrees org-cycle-hide-drawers
 org-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-babel-load-languages '((emacs-lisp . t) (python . t) (dot . t) (ditaa
. t) (latex . t) (sql . t) (shell . t))
 org-agenda-skip-deadline-if-done t
 org-roam-ref-annotation-function 'org-roam-ref-read--annotation
 org-roam-directory "/mnt/c/Users/garyo/Documents/synced/RoamNotes"
 org-roam-db-node-include-function #[0 "\300\207" [t] 1]
 org-confirm-shell-link-function 'yes-or-no-p
 org-reveal-start-hook '(org-decrypt-entry)
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-use-sub-superscripts '{}
 org-use-speed-commands t

 org-roam-capture-preface-hook '(org-roam-dailies--override-capture-time-h
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-capture-prepare-finalize-hook '(org-roam-capture--install-finalize-h)
 org-latex-packages-alist '(("cm" "fullpage" nil) ("compact" "titlesec"
nil) ("" "paralist" nil) ("" "enumitem" nil)
                            ("" "color" nil) ("" "tabularx" nil) (""
"enumitem" nil))
 org-roam-preview-function 'org-roam-preview-default-function
 org-babel-tangle-lang-exts '(("latex" . "tex") ("python" . "py")
("emacs-lisp" . "el") ("elisp" . "el"))
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-roam-db-autosync-mode t
 org-confirm-elisp-link-function 'yes-or-no-p
 org-tags-exclude-from-inheritance '("project")
 org-todo-keywords '((sequence "TODO(t)" "WAITING(w)" "|" "DONE(d)"
 org-roam-capture-new-node-hook '(org-roam-capture--insert-captured-ref-h)
 org-speed-command-hook '(org-speed-command-activate
 org-table-convert-region-max-lines 9999
 org-export-backends '(ascii html icalendar latex odt koma-letter)
 org-confirm-babel-evaluate nil
 org-persist-before-write-hook '(org-element--cache-persist-before-write)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-pre-tangle-hook '(save-buffer)
 org-roam-completion-everywhere t
 org-agenda-loop-over-headlines-in-active-region nil
 org-agenda-start-on-weekday nil
 org-roam-mode-sections '(org-roam-backlinks-section
org-roam-reflinks-section org-roam-unlinked-references-section)
 org-occur-hook '(org-first-headline-recenter)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-roam-node-annotation-function 'org-roam-node-read--annotation
 org-link-parameters '(("attachment" :follow org-attach-follow :complete
                       ("eww" :follow org-eww-open :store
                       ("rmail" :follow org-rmail-open :store
                       ("mhe" :follow org-mhe-open :store
                       ("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
                       ("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
                       ("bibtex" :follow org-bibtex-open :store
                       ("bbdb" :follow org-bbdb-open :export
org-bbdb-export :complete org-bbdb-complete-link :store
                       ("w3m" :store org-w3m-store-link) ("doi" :follow
org-link-doi-open :export org-link-doi-export)
                       ("roam" :follow org-roam-link-follow-link) ("id"
:follow org-roam-id-open)
                       ("treemacs" :store treemacs-store-org-link)
("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-roam-ui-browser-function 'browse-url
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-return-follows-link t
 org-refile-target-verify-function 'go/verify-refile-target
 org-list-allow-alphabetical t


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

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

end of thread, other threads:[~2022-03-19  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 16:37 [BUG] Error when using mouse to set TODO state [9.5.2 (9.5.2-g91681f @ /home/garyo/.emacs.d/straight/build/org/)] Gary Oberbrunner
2022-03-19  8:17 ` Ihor Radchenko

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


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