Closed VitalyAnkh closed 3 years ago
Thanks for report! You can try the following:
Check the validity of variable org-xournal-note-dir
, org-xournal-template-dir
, org-xournal-default-template-name
, org-xournal-bin
, you can find more details in readme. Remember, the xournal template file is copied from org-xournal-template-dir
to org-xournal-note-dir
. They must be set correctly.
If it still doesn't help, run toggle-debug-on-error
first, then call org-xournal-insert-new-image
. Copy the error log together with the result of doom/info
Thanks for your kind reply. I tried the two ways:
org-xournal-template-dir
remains the default value but I have set it in doom's config.el
. Trying to solve this problem, I create the directory which the default value points, and put the template file into it, but the error still on. toggle-debug-on-error
, then run org-xournal-insert-new-image
, I got:
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
replace-regexp-in-string("\\[.*\\]" "" nil)
(setq heading (replace-regexp-in-string "\\[.*\\]" "" heading))
org-xournal-org-heading-escape(nil)
(format "%s_%s" (format-time-string "%Y%m%d_%H%M%S") (org-xournal-org-heading-escape (org-entry-get nil "ITEM")))
(read-minibuffer "New Xournal file: " (format "%s_%s" (format-time-string "%Y%m%d_%H%M%S") (org-xournal-org-heading-escape (org-entry-get nil "ITEM"))))
(let ((file-name (read-minibuffer "New Xournal file: " (format "%s_%s" (format-time-string "%Y%m%d_%H%M%S") (org-xournal-org-heading-escape (org-entry-get nil "ITEM")))))) (funcall org-xournal-path-format-function file-name))
org-xournal--new-xournal-file-in-default-dir()
funcall(org-xournal--new-xournal-file-in-default-dir)
(let ((output-xournal-path (funcall org-xournal-get-new-filepath)) (desc (funcall org-xournal-get-new-desc))) (list output-xournal-path desc))
call-interactively(org-xournal-insert-new-image record nil)
command-execute(org-xournal-insert-new-image record)
counsel-M-x-action("org-xournal-insert-new-image")
funcall(counsel-M-x-action "org-xournal-insert-new-image")
(closure ((dir) (action . counsel-M-x-action) t) (x) (let ((cand x)) (if (listp cand) (progn (setq cand (car x)))) (if dir (progn (setq cand (file-relative-name cand dir)))) (prescient-remember cand)) (funcall action x))("org-xournal-insert-new-image")
ivy-call()
#f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially. An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero. Otherwise, use the first occurrence of\nPRESELECT in the collection. Comparison is first done with\n`equal'. If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input. It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS is a plist that can be used to store\ncollection-specific session-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x119281e817d80208>)("M-x " ("toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" "rake" ...) :predicate (closure ((externs "toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" ...) (initial-input) smex-ido-cache smex-initialized-p amx-cache amx-initialized info-lookup-mode find-tag-marker-ring t) (x) (not (get (intern x) 'no-counsel-M-x))) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x :sort t)
apply(#f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially. An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero. Otherwise, use the first occurrence of\nPRESELECT in the collection. Comparison is first done with\n`equal'. If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input. It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS is a plist that can be used to store\ncollection-specific session-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x119281e817d80208>) ("M-x " ("toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" "rake" ...) :predicate (closure ((externs "toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" ...) (initial-input) smex-ido-cache smex-initialized-p amx-cache amx-initialized info-lookup-mode find-tag-marker-ring t) (x) (not (get (intern x) 'no-counsel-M-x))) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x :sort t))
#f(advice-wrapper :filter-args #f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially. An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero. Otherwise, use the first occurrence of\nPRESELECT in the collection. Comparison is first done with\n`equal'. If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input. It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS is a plist that can be used to store\ncollection-specific session-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x119281e817d80208>) ivy-prescient--enable-sort-commands)("M-x " ("toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" "rake" ...) :predicate (closure ((externs "toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" ...) (initial-input) smex-ido-cache smex-initialized-p amx-cache amx-initialized info-lookup-mode find-tag-marker-ring t) (x) (not (get (intern x) 'no-counsel-M-x))) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
apply(#f(advice-wrapper :filter-args #f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially. An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero. Otherwise, use the first occurrence of\nPRESELECT in the collection. Comparison is first done with\n`equal'. If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input. It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS is a plist that can be used to store\ncollection-specific session-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x119281e817d80208>) ivy-prescient--enable-sort-commands) ("M-x " ("toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" "rake" ...) :predicate (closure ((externs "toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" ...) (initial-input) smex-ido-cache smex-initialized-p amx-cache amx-initialized info-lookup-mode find-tag-marker-ring t) (x) (not (get (intern x) 'no-counsel-M-x))) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x))
(let ((ivy-display-functions-alist (append ivy-posframe-display-functions-alist ivy-display-functions-alist))) (apply fn args))
(if (not (display-graphic-p)) (apply fn args) (let ((ivy-display-functions-alist (append ivy-posframe-display-functions-alist ivy-display-functions-alist))) (apply fn args)))
ivy-posframe--read(#f(advice-wrapper :filter-args #f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially. An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero. Otherwise, use the first occurrence of\nPRESELECT in the collection. Comparison is first done with\n`equal'. If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input. It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS is a plist that can be used to store\ncollection-specific session-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x119281e817d80208>) ivy-prescient--enable-sort-commands) "M-x " ("toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" "rake" ...) :predicate (closure ((externs "toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" ...) (initial-input) smex-ido-cache smex-initialized-p amx-cache amx-initialized info-lookup-mode find-tag-marker-ring t) (x) (not (get (intern x) 'no-counsel-M-x))) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
apply(ivy-posframe--read #f(advice-wrapper :filter-args #f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially. An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero. Otherwise, use the first occurrence of\nPRESELECT in the collection. Comparison is first done with\n`equal'. If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input. It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS is a plist that can be used to store\ncollection-specific session-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x119281e817d80208>) ivy-prescient--enable-sort-commands) ("M-x " ("toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" "rake" ...) :predicate (closure ((externs "toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" ...) (initial-input) smex-ido-cache smex-initialized-p amx-cache amx-initialized info-lookup-mode find-tag-marker-ring t) (x) (not (get (intern x) 'no-counsel-M-x))) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x))
ivy-read("M-x " ("toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" "rake" ...) :predicate (closure ((externs "toggle-debug-on-error" "org-xournal-insert-new-image" "doom/info" "org-krita-insert-new-image" "org-xournal-insert-new-image-with-default-template" "org-xournal-mode" "maple-run" "cd" "wl" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "lsp" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "sly" "xdb" "=rss" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "kana" "life" "lsp!" "mail" "mpuz" "mu4e" "ping" "pong" ...) (initial-input) smex-ido-cache smex-initialized-p amx-cache amx-initialized info-lookup-mode find-tag-marker-ring t) (x) (not (get (intern x) 'no-counsel-M-x))) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
(let ((externs (counsel--M-x-externs))) (ivy-read (counsel--M-x-prompt) (or externs obarray) :predicate (if externs #'(lambda (x) (not (get (intern x) 'no-counsel-M-x))) #'(lambda (sym) (and (commandp sym) (not (get sym ...)) (not (get sym ...))))) :require-match t :history 'counsel-M-x-history :action #'counsel-M-x-action :keymap counsel-describe-map :initial-input initial-input :caller 'counsel-M-x))
counsel-M-x()
funcall-interactively(counsel-M-x)
call-interactively(counsel-M-x nil nil)
command-execute(counsel-M-x)
and doom/info
:
SYSTEM type gnu/linux
config x86_64-pc-linux-gnu
shell /bin/fish
uname Linux 5.10.9-arch1-1 #1 SMP PREEMPT Tue, 19 Jan 2021 22:06:06 +0000 x86_64
path (~/.opam/default/bin /usr/lib/jvm/default/bin ~/sdk/lib/flutter/bin ~/sdk/app/jetbrains ~/.cargo/bin ~/.local/bin ~/.cabal/bin ~/.ghcup/bin ~/sdk/config/emacs/emacs.d-doom/bin/ . ~/.opam/default/bin . . . . . /usr/lib/jvm/default/bin ~/sdk/lib/flutter/bin ~/sdk/app/jetbrains ~/.cargo/bin ~/.local/bin ~/.cabal/bin ~/.ghcup/bin ~/.opam/default/bin /usr/lib/jvm/default/bin ~/sdk/lib/flutter/bin ~/sdk/app/jetbrains ~/.cargo/bin ~/.local/bin ~/.cabal/bin ~/.ghcup/bin /usr/local/bin /usr/local/sbin /usr/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl /opt/anaconda/bin /opt/depot_tools /opt/anaconda/bin /opt/depot_tools /opt/anaconda/bin /opt/depot_tools)
EMACS dir ~/sdk/config/emacs/emacs.d-doom/
version 28.0.50
build 1月 22, 2021
buildopts --with-nativecomp CC=clang --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-sound=alsa --with-modules --without-gconf --without-gsettings --with-nativecomp --with-pgtk --enable-autodepend --enable-link-time-optimization --with-x-toolkit=gtk3 --without-xaw3d --without-m17n-flt --with-cairo --with-xwidgets --without-compress-install 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -g -flto' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
features JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 PGTK XIM MODULES THREADS XWIDGETS LIBSYSTEMD JSON PDUMPER LCMS2
traits (gui server-running chemacs envvar-file)
DOOM dir ~/sdk/config/emacs/doom.d-$USER/
version 2.0.9
font #<font-spec nil nil mononoki nil nil light nil nil 22 nil nil nil nil>
theme doom-opera-light
build HEAD -> develop 2ad1eab6e 2021-01-18 19:59:18 -0500
elc-files 21
modules (:input japanese :completion company (ivy +fuzzy +childframe +prescient +icons) :ui deft doom doom-dashboard fill-column hl-todo hydra indent-guides modeline nav-flash ophints (popup +defaults +all) (ligatures +fira +hasklig +iosevka) tabs treemacs vc-gutter vi-tilde-fringe (window-select +ace-window) workspaces zen :editor (evil +everywhere) file-templates fold (format +onsave) multiple-cursors objed rotate-text snippets word-wrap :emacs dired electric ibuffer undo vc :term eshell vterm :checkers syntax grammar :tools ansible debugger direnv editorconfig ein (eval +overlay) gist lookup (lsp +peek) magit make pdf prodigy rgb taskrunner tmux upload :lang agda (cc +lsp) (common-lisp +lsp) coq data elm (emacs-lisp +lsp) fstar (go +lsp) (haskell +lsp) hy idris (json +lsp) (javascript +lsp) julia (latex +latexmk +cdlatex +fold) lean lua markdown ocaml (org +roam +dragndrop +journal +jupyter +pandoc +gnuplot +noter +pomodoro +present +attach +capture +export +babel +pretty) raku plantuml purescript python (racket +lsp) (ruby +rails) (rust +lsp) scala scheme (sh +bash +fish +zsh) sml terra web yaml :email (mu4e +gmail) notmuch (wanderlust +gmail) :app calendar (rss +org) :config literate (default +bindings +smartparens))
packages ((kana :recipe (:host github :repo chenyanming/kana)) (org-roam-server :recipe (:host github :repo org-roam/org-roam-server)) (rime :recipe (:host github :repo DogLooksGood/emacs-rime)) (valign :recipe (:host github :repo casouri/valign)) (org-latex-impatient :recipe (:host github :repo yangsheng6810/org-latex-impatient)) (smart-input-source :recipe (:host github :repo laishulu/emacs-smart-input-source)) (exec-path-from-shell :recipe (:host github :repo purcell/exec-path-from-shell)) (quickrun :recipe (:host github :repo emacsorphanage/quickrun)) (wucuo :recipe (:host github :repo redguardtoo/wucuo)) (maple-run :recipe (:host github :repo VitalyAnkh/emacs-maple-run)) (doom-themes :recipe (:host github :repo hlissner/emacs-doom-themes)) (transwin :recipe (:host github :repo jcs-elpa/transwin)) (company-tabnine :recipe (:host github :repo TommyX12/company-tabnine)) (org-roam-bibtex :recipe (:host github :repo org-roam/org-roam-bibtex)) (org-xournal :recipe (:host github :repo yuchen-lea/org-xournal :files (*.el))) (org-krita :recipe (:host github :repo lepisma/org-krita :files (resources resources *.el *.el))))
unpin (org-roam org-roam-server rime)
elpa (n/a)
Thanks for your detailed report!
This may relate to the doom loading mechanism. I'll look into this. Your responses are greatly welcome.
After looking into the log, I guess you called this function outside headline, while I assumed people do this under headline. So in org-xournal--new-xournal-file-in-default-dir
, the file-name is generated from healine title. Since you call it outside headline, (org-entry-get nil "ITEM")
returns nil, which results in (org-xournal-org-heading-escape nil)
raises error Wrong type argument: arrayp, nil. ace7607 should have fixed this. You can create xournal file anywhere in org-mode now. BTW, if you don't like the default file-name, you can write a new function and customize the variable org-xournal-get-new-filepath
.
Please let me know if you have any problems.
Hi friend! Your late updates have fixed the bug. And this error:
I find the variable org-xournal-template-dir remains the default value but I have set it in doom's config.el
This package is really awesome! Thank you very much!
After calling "org-xournal-insert-new-image" I got this error:
I use branch pgtk-nativecomp of Emacs 28.0.50, with doom emacs 2.0.9.
And I didn't get the same error in
org-krita
. How to fix this?