brunoarine / org-similarity

Emacs package that helps org-mode users (re)discover similar documents
GNU General Public License v3.0
87 stars 12 forks source link

Error (use-package): org-similarity/:catch: Symbol’s function definition is void - cannot make org-similiarty work #25

Closed patsh90 closed 1 year ago

patsh90 commented 1 year ago

It is not working on my computer.

My emacs ver: GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) of 2022-04-13

My init.el file line about org-similarity

(use-package org-similarity
  :load-path  "~/E/org-similarity")

(setq org-similarity-directory "~/WRITING/")

Message running simply emacs: Error (use-package): org-similarity/:catch: Symbol’s function definition is void: define-short-documentation-group Disable showing Disable logging

Message after running emacs --debug-init

Debugger entered--Lisp error: (void-function define-short-documentation-group)
  (define-short-documentation-group f "Paths" (f-join :eval (f-join "path") :eval (f-join "path" "to") :eval (f-join "/" "path" "to" "heaven") :eval (f-join "path" "/to" "file")) (f-split :eval (f-split "path") :eval (f-split "path/to") :eval (f-split "/path/to/heaven") :eval (f-split "~/back/to/earth")) (f-expand :no-eval (f-expand "name") :result-string "/default/directory/name" :no-eval (f-expand "name" "other/directory") :result-string "other/directory/name") (f-filename :eval (f-filename "path/to/file.ext") :eval (f-filename "path/to/directory")) (f-dirname :eval (f-dirname "path/to/file.ext") :eval (f-dirname "path/to/directory") :eval (f-dirname "/")) (f-common-parent :eval (f-common-parent '("foo/bar/baz" "foo/bar/qux" "foo/bar/mux")) :eval (f-common-parent '("/foo/bar/baz" "/foo/bar/qux" "/foo/bax/mux")) :eval (f-common-parent '("foo/bar/baz" "quack/bar/qux" "lack/bar/mux"))) (f-ext :eval (f-ext "path/to/file") :eval (f-ext "path/to/file.txt") :eval (f-ext "path/to/file.txt.org")) (f-no-ext :eval (f-no-ext "path/to/file") :eval (f-no-ext "path/to/file.txt") :eval (f-no-ext "path/to/file.txt.org")) (f-swap-ext :eval (f-swap-ext "path/to/file.ext" "org")) (f-base :eval (f-base "path/to/file.ext") :eval (f-base "path/to/directory")) (f-relative :eval (f-relative "/some/path/relative/to/my/file.txt" "/some/path/") :eval (f-relative "/default/directory/my/file.txt")) (f-short :no-eval (f-short "/Users/foo/Code/on/macOS") :result-string "~/Code/on/macOS" :no-eval (f-short "/home/foo/Code/on/linux") :result-string "~/Code/on/linux" :eval (f-short "/path/to/Code/bar")) (f-long :eval (f-long "~/Code/bar") :eval (f-long "/path/to/Code/bar")) (f-canonical :eval (f-canonical "/path/to/real/file") :no-eval (f-canonical "/link/to/file") :result-string "/path/to/real/file") (f-slash :no-eval (f-slash "/path/to/file") :result-string "/path/to/file" :no-eval (f-slash "/path/to/dir") :result-string "/path/to/dir/" :no-eval (f-slash "/path/to/dir/") :result-string "/path/to/dir/") (f-full :eval (f-full "~/path/to/file") :eval (f-full "~/path/to/dir") :eval (f-full "~/path/to/dir/")) (f-uniquify :eval (f-uniquify '("/foo/bar" "/foo/baz" "/foo/quux")) :eval (f-uniquify '("/foo/bar" "/www/bar" "/foo/quux")) :eval (f-uniquify '("/foo/bar" "/www/bar" "/www/bar/quux")) :eval (f-uniquify '("/foo/bar" "/foo/baz" "/home/www/bar" "/home/www/baz" "/var/foo" "/opt/foo/www/baz"))) (f-uniquify-alist :eval (f-uniquify-alist '("/foo/bar" "/foo/baz" "/foo/quux")) :eval (f-uniquify-alist '("/foo/bar" "/www/bar" "/foo/quux")) :eval (f-uniquify-alist '("/foo/bar" "/www/bar" "/www/bar/quux")) :eval (f-uniquify-alist '("/foo/bar" "/foo/baz" "/home/www/bar" "/home/www/baz" "/var/foo" "/opt/foo/www/baz"))) "I/O" (f-read-bytes :no-eval* (f-read-bytes "path/to/binary/data")) (f-write-bytes :no-eval* (f-write-bytes (unibyte-string 72 101 108 108 111 32 119 111 114 108 100) "path/to/binary/data")) (f-append-bytes :no-eval* (f-append-bytes "path/to/file" (unibyte-string 72 101 108 108 111 32 119 111 114 108 100))) (f-read-text :no-eval* (f-read-text "path/to/file.txt" 'utf-8) :no-eval* (f-read "path/to/file.txt" 'utf-8)) (f-write-text :no-eval* (f-write-text "Hello world" 'utf-8 "path/to/file.txt") :no-eval* (f-write "Hello world" 'utf-8 "path/to/file.txt")) (f-append-text :no-eval* (f-append-text "Hello world" 'utf-8 "path/to/file.txt") :no-eval* (f-append "Hello world" 'utf-8 "path/to/file.txt")) "Destructive" (f-mkdir :no-eval (f-mkdir "dir") :result-string "creates /default/directory/dir" :no-eval (f-mkdir "other" "dir") :result-string "creates /default/directory/other/dir" :no-eval (f-mkdir "/" "some" "path") :result-string "creates /some/path" :no-eval (f-mkdir "~" "yet" "another" "dir") :result-string "creates ~/yet/another/dir") (f-mkdir-full-path :no-eval (f-mkdir-full-path "dir") :result-string "creates /default/directory/dir" :no-eval (f-mkdir-full-path "other/dir") :result-string "creates /default/directory/other/dir" :no-eval (f-mkdir-full-path "/some/path") :result-string "creates /some/path" :no-eval (f-mkdir-full-path "~/yet/another/dir") :result-string "creates ~/yet/another/dir") (f-delete :no-eval* (f-delete "dir") :no-eval* (f-delete "other/dir" t) :no-eval* (f-delete "path/to/file.txt")) (f-symlink :no-eval* (f-symlink "path/to/source" "path/to/link")) (f-move :no-eval* (f-move "path/to/file.txt" "new-file.txt") :no-eval* (f-move "path/to/file.txt" "other/path")) (f-copy :no-eval* (f-copy "path/to/file.txt" "new-file.txt") :no-eval* (f-copy "path/to/dir" "other/dir")) (f-copy-contents :no-eval* (f-copy-contents "path/to/dir" "path/to/other/dir")) (f-touch :no-eval* (f-touch "path/to/existing/file.txt") :no-eval* (f-touch "path/to/non/existing/file.txt")) "Predicates" ...)
  (progn (if (< emacs-major-version 29) (progn (require 'shortdoc))) (define-short-documentation-group f "Paths" (f-join :eval (f-join "path") :eval (f-join "path" "to") :eval (f-join "/" "path" "to" "heaven") :eval (f-join "path" "/to" "file")) (f-split :eval (f-split "path") :eval (f-split "path/to") :eval (f-split "/path/to/heaven") :eval (f-split "~/back/to/earth")) (f-expand :no-eval (f-expand "name") :result-string "/default/directory/name" :no-eval (f-expand "name" "other/directory") :result-string "other/directory/name") (f-filename :eval (f-filename "path/to/file.ext") :eval (f-filename "path/to/directory")) (f-dirname :eval (f-dirname "path/to/file.ext") :eval (f-dirname "path/to/directory") :eval (f-dirname "/")) (f-common-parent :eval (f-common-parent '("foo/bar/baz" "foo/bar/qux" "foo/bar/mux")) :eval (f-common-parent '("/foo/bar/baz" "/foo/bar/qux" "/foo/bax/mux")) :eval (f-common-parent '("foo/bar/baz" "quack/bar/qux" "lack/bar/mux"))) (f-ext :eval (f-ext "path/to/file") :eval (f-ext "path/to/file.txt") :eval (f-ext "path/to/file.txt.org")) (f-no-ext :eval (f-no-ext "path/to/file") :eval (f-no-ext "path/to/file.txt") :eval (f-no-ext "path/to/file.txt.org")) (f-swap-ext :eval (f-swap-ext "path/to/file.ext" "org")) (f-base :eval (f-base "path/to/file.ext") :eval (f-base "path/to/directory")) (f-relative :eval (f-relative "/some/path/relative/to/my/file.txt" "/some/path/") :eval (f-relative "/default/directory/my/file.txt")) (f-short :no-eval (f-short "/Users/foo/Code/on/macOS") :result-string "~/Code/on/macOS" :no-eval (f-short "/home/foo/Code/on/linux") :result-string "~/Code/on/linux" :eval (f-short "/path/to/Code/bar")) (f-long :eval (f-long "~/Code/bar") :eval (f-long "/path/to/Code/bar")) (f-canonical :eval (f-canonical "/path/to/real/file") :no-eval (f-canonical "/link/to/file") :result-string "/path/to/real/file") (f-slash :no-eval (f-slash "/path/to/file") :result-string "/path/to/file" :no-eval (f-slash "/path/to/dir") :result-string "/path/to/dir/" :no-eval (f-slash "/path/to/dir/") :result-string "/path/to/dir/") (f-full :eval (f-full "~/path/to/file") :eval (f-full "~/path/to/dir") :eval (f-full "~/path/to/dir/")) (f-uniquify :eval (f-uniquify '("/foo/bar" "/foo/baz" "/foo/quux")) :eval (f-uniquify '("/foo/bar" "/www/bar" "/foo/quux")) :eval (f-uniquify '("/foo/bar" "/www/bar" "/www/bar/quux")) :eval (f-uniquify '("/foo/bar" "/foo/baz" "/home/www/bar" "/home/www/baz" "/var/foo" "/opt/foo/www/baz"))) (f-uniquify-alist :eval (f-uniquify-alist '("/foo/bar" "/foo/baz" "/foo/quux")) :eval (f-uniquify-alist '("/foo/bar" "/www/bar" "/foo/quux")) :eval (f-uniquify-alist '("/foo/bar" "/www/bar" "/www/bar/quux")) :eval (f-uniquify-alist '("/foo/bar" "/foo/baz" "/home/www/bar" "/home/www/baz" "/var/foo" "/opt/foo/www/baz"))) "I/O" (f-read-bytes :no-eval* (f-read-bytes "path/to/binary/data")) (f-write-bytes :no-eval* (f-write-bytes (unibyte-string 72 101 108 108 111 32 119 111 114 108 100) "path/to/binary/data")) (f-append-bytes :no-eval* (f-append-bytes "path/to/file" (unibyte-string 72 101 108 108 111 32 119 111 114 108 100))) (f-read-text :no-eval* (f-read-text "path/to/file.txt" 'utf-8) :no-eval* (f-read "path/to/file.txt" 'utf-8)) (f-write-text :no-eval* (f-write-text "Hello world" 'utf-8 "path/to/file.txt") :no-eval* (f-write "Hello world" 'utf-8 "path/to/file.txt")) (f-append-text :no-eval* (f-append-text "Hello world" 'utf-8 "path/to/file.txt") :no-eval* (f-append "Hello world" 'utf-8 "path/to/file.txt")) "Destructive" (f-mkdir :no-eval (f-mkdir "dir") :result-string "creates /default/directory/dir" :no-eval (f-mkdir "other" "dir") :result-string "creates /default/directory/other/dir" :no-eval (f-mkdir "/" "some" "path") :result-string "creates /some/path" :no-eval (f-mkdir "~" "yet" "another" "dir") :result-string "creates ~/yet/another/dir") (f-mkdir-full-path :no-eval (f-mkdir-full-path "dir") :result-string "creates /default/directory/dir" :no-eval (f-mkdir-full-path "other/dir") :result-string "creates /default/directory/other/dir" :no-eval (f-mkdir-full-path "/some/path") :result-string "creates /some/path" :no-eval (f-mkdir-full-path "~/yet/another/dir") :result-string "creates ~/yet/another/dir") (f-delete :no-eval* (f-delete "dir") :no-eval* (f-delete "other/dir" t) :no-eval* (f-delete "path/to/file.txt")) (f-symlink :no-eval* (f-symlink "path/to/source" "path/to/link")) (f-move :no-eval* (f-move "path/to/file.txt" "new-file.txt") :no-eval* (f-move "path/to/file.txt" "other/path")) (f-copy :no-eval* (f-copy "path/to/file.txt" "new-file.txt") :no-eval* (f-copy "path/to/dir" "other/dir")) (f-copy-contents :no-eval* (f-copy-contents "path/to/dir" "path/to/other/dir")) (f-touch :no-eval* (f-touch "path/to/existing/file.txt") :no-eval* (f-touch "path/to/non/existing/file.txt")) "Predicates" ...))
  (if (version<= "28.1" emacs-version) (progn (if (< emacs-major-version 29) (progn (require 'shortdoc))) (define-short-documentation-group f "Paths" (f-join :eval (f-join "path") :eval (f-join "path" "to") :eval (f-join "/" "path" "to" "heaven") :eval (f-join "path" "/to" "file")) (f-split :eval (f-split "path") :eval (f-split "path/to") :eval (f-split "/path/to/heaven") :eval (f-split "~/back/to/earth")) (f-expand :no-eval (f-expand "name") :result-string "/default/directory/name" :no-eval (f-expand "name" "other/directory") :result-string "other/directory/name") (f-filename :eval (f-filename "path/to/file.ext") :eval (f-filename "path/to/directory")) (f-dirname :eval (f-dirname "path/to/file.ext") :eval (f-dirname "path/to/directory") :eval (f-dirname "/")) (f-common-parent :eval (f-common-parent '...) :eval (f-common-parent '...) :eval (f-common-parent '...)) (f-ext :eval (f-ext "path/to/file") :eval (f-ext "path/to/file.txt") :eval (f-ext "path/to/file.txt.org")) (f-no-ext :eval (f-no-ext "path/to/file") :eval (f-no-ext "path/to/file.txt") :eval (f-no-ext "path/to/file.txt.org")) (f-swap-ext :eval (f-swap-ext "path/to/file.ext" "org")) (f-base :eval (f-base "path/to/file.ext") :eval (f-base "path/to/directory")) (f-relative :eval (f-relative "/some/path/relative/to/my/file.txt" "/some/path/") :eval (f-relative "/default/directory/my/file.txt")) (f-short :no-eval (f-short "/Users/foo/Code/on/macOS") :result-string "~/Code/on/macOS" :no-eval (f-short "/home/foo/Code/on/linux") :result-string "~/Code/on/linux" :eval (f-short "/path/to/Code/bar")) (f-long :eval (f-long "~/Code/bar") :eval (f-long "/path/to/Code/bar")) (f-canonical :eval (f-canonical "/path/to/real/file") :no-eval (f-canonical "/link/to/file") :result-string "/path/to/real/file") (f-slash :no-eval (f-slash "/path/to/file") :result-string "/path/to/file" :no-eval (f-slash "/path/to/dir") :result-string "/path/to/dir/" :no-eval (f-slash "/path/to/dir/") :result-string "/path/to/dir/") (f-full :eval (f-full "~/path/to/file") :eval (f-full "~/path/to/dir") :eval (f-full "~/path/to/dir/")) (f-uniquify :eval (f-uniquify '...) :eval (f-uniquify '...) :eval (f-uniquify '...) :eval (f-uniquify '...)) (f-uniquify-alist :eval (f-uniquify-alist '...) :eval (f-uniquify-alist '...) :eval (f-uniquify-alist '...) :eval (f-uniquify-alist '...)) "I/O" (f-read-bytes :no-eval* (f-read-bytes "path/to/binary/data")) (f-write-bytes :no-eval* (f-write-bytes (unibyte-string 72 101 108 108 111 32 119 111 114 108 100) "path/to/binary/data")) (f-append-bytes :no-eval* (f-append-bytes "path/to/file" (unibyte-string 72 101 108 108 111 32 119 111 114 108 100))) (f-read-text :no-eval* (f-read-text "path/to/file.txt" 'utf-8) :no-eval* (f-read "path/to/file.txt" 'utf-8)) (f-write-text :no-eval* (f-write-text "Hello world" 'utf-8 "path/to/file.txt") :no-eval* (f-write "Hello world" 'utf-8 "path/to/file.txt")) (f-append-text :no-eval* (f-append-text "Hello world" 'utf-8 "path/to/file.txt") :no-eval* (f-append "Hello world" 'utf-8 "path/to/file.txt")) "Destructive" (f-mkdir :no-eval (f-mkdir "dir") :result-string "creates /default/directory/dir" :no-eval (f-mkdir "other" "dir") :result-string "creates /default/directory/other/dir" :no-eval (f-mkdir "/" "some" "path") :result-string "creates /some/path" :no-eval (f-mkdir "~" "yet" "another" "dir") :result-string "creates ~/yet/another/dir") (f-mkdir-full-path :no-eval (f-mkdir-full-path "dir") :result-string "creates /default/directory/dir" :no-eval (f-mkdir-full-path "other/dir") :result-string "creates /default/directory/other/dir" :no-eval (f-mkdir-full-path "/some/path") :result-string "creates /some/path" :no-eval (f-mkdir-full-path "~/yet/another/dir") :result-string "creates ~/yet/another/dir") (f-delete :no-eval* (f-delete "dir") :no-eval* (f-delete "other/dir" t) :no-eval* (f-delete "path/to/file.txt")) (f-symlink :no-eval* (f-symlink "path/to/source" "path/to/link")) (f-move :no-eval* (f-move "path/to/file.txt" "new-file.txt") :no-eval* (f-move "path/to/file.txt" "other/path")) (f-copy :no-eval* (f-copy "path/to/file.txt" "new-file.txt") :no-eval* (f-copy "path/to/dir" "other/dir")) (f-copy-contents :no-eval* (f-copy-contents "path/to/dir" "path/to/other/dir")) (f-touch :no-eval* (f-touch "path/to/existing/file.txt") :no-eval* (f-touch "path/to/non/existing/file.txt")) "Predicates" ...)))
  eval-buffer(#<buffer  *load*-79361> nil "/home/patsh/.emacs.d/elpa/f-20230116.113231/f-shor..." nil t)  ; Reading at buffer position 14107
  load-with-code-conversion("/home/patsh/.emacs.d/elpa/f-20230116.113231/f-shor..." "/home/patsh/.emacs.d/elpa/f-20230116.113231/f-shor..." nil t)
  require(f-shortdoc)
  byte-code("\301\302!\210\301\303!\210\304\305\10\"\203\23\0\301\306!\210\307\310\311\312#\210\307\310\313\314#\207" [emacs-version require s dash version<= "28.1" f-shortdoc put f-guard-error error-conditions (error f-guard-error) error-message "Destructive operation outside sandbox"] 4)
  require(f)
  eval-buffer(#<buffer  *load*-515370> nil "/home/patsh/E/org-similarity/org-similarity.el" nil t)  ; Reading at buffer position 1261
  load-with-code-conversion("/home/patsh/E/org-similarity/org-similarity.el" "/home/patsh/E/org-similarity/org-similarity.el" t t)
  require(org-similarity nil t)
  (not (require 'org-similarity nil t))
  (if (not (require 'org-similarity nil t)) (display-warning 'use-package (format "Cannot load %s" 'org-similarity) :error))
  (condition-case err (if (not (require 'org-similarity nil t)) (display-warning 'use-package (format "Cannot load %s" 'org-similarity) :error)) ((debug error) (funcall use-package--warning7 :catch err)))
  eval-buffer(#<buffer  *load*> nil "/home/patsh/.emacs.d/init.el" nil t)  ; Reading at buffer position 8472
  load-with-code-conversion("/home/patsh/.emacs.d/init.el" "/home/patsh/.emacs.d/init.el" t t)
  load("/home/patsh/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode -0x149771d75b1a2537>) #f(compiled-function () #<bytecode -0x1f3c6feddc0abd75>) t)
  command-line()
  normal-top-level()
luckysori commented 1 year ago

Hey, @patsh90. How did you fix this? I'm not an org-similarity user, but I get this error for some of my installed packages after updating some dependencies.

luckysori commented 1 year ago

Okay, I think it's related to this: https://github.com/rejeep/f.el/issues/121. My emacs version is outdated too D: