Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] org-encrypt error: wrong-type-argument #3123

Closed
Silipwn opened this issue May 14, 2020 · 5 comments
Closed

[BUG] org-encrypt error: wrong-type-argument #3123

Silipwn opened this issue May 14, 2020 · 5 comments
Labels
is:upstream Originates from outside the project and cannot be fully addressed here module:lang/org Pertains to Doom's :lang org module status:resolved-elsewhere Issue was addressed outside of Doom, needing no action on Doom's part

Comments

@Silipwn
Copy link

Silipwn commented May 14, 2020

What did you expect to happen?
Org-encrypt to run successfully and encrypt the file.

What actually happened?
It failed with an error, (wrong-type-argument stringp stringp)

Additional details:

  • Private config: Gist
  • Include screenshots/casts of your issue
    image
  • Warnings/Errors: apply: Wrong type argument: stringp, stringp

Debugger entered--Lisp error: (wrong-type-argument stringp stringp)
format-message(stringp)
apply(format-message stringp)
error(stringp)
org-encrypt-entry()
funcall-interactively(org-encrypt-entry)
call-interactively(org-encrypt-entry record nil)
command-execute(org-encrypt-entry record)
counsel-M-x-action("org-encrypt-entry")
ivy-call()
ivy-read("M-x " ("org-encrypt-entry" "doom/toggle-debug-mode" "org-encrypt-entries" "org-decrypt-entry" "cd" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "man" "mpc" "pdb" "pwd" "rsh" "sdb" "xdb" "calc" "deft" "diff" "dirs" "ffap" "gnus" "grep" "help" "ielm" "info" "life" "lsp!" "mail" "mpuz" "ping" "pong" "talk" "term" "undo" "yank" "zone" "align" "chmod" "debug" "diary" "dired" ...) :predicate #f(compiled-function (x) #<bytecode 0x298e655>) :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)
counsel-M-x()
funcall-interactively(counsel-M-x)
call-interactively(counsel-M-x nil nil)
command-execute(counsel-M-x)

Steps to reproduce:

  1. Create an org file with a simple header
  2. Run org-encrypt-entry on the headline

System information:

((emacs
  (version . "26.3")
  (features . "XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2")
  (build . "Aug 30, 2019")
  (buildopts "--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now")
  (windowsys . batch)
  (daemonp . server-running))
 (doom
  (version . "2.0.9")
  (build . "grafted, HEAD -> develop, origin/develop, origin/HEAD 2bdc147 2020-05-14 04:31:52 -0400")
  (dir . "~/.doom.d/"))
 (system
  (type . gnu/linux)
  (config . "x86_64-pc-linux-gnu")
  (shell . "/bin/fish")
  (uname . "Linux 5.6.11-arch1-1 #1 SMP PREEMPT Wed, 06 May 2020 17:32:37 +0000 x86_64")
  (path "/usr/local/sbin" "/usr/local/bin" "/usr/bin" "/usr/bin/site_perl" "/usr/bin/vendor_perl" "/usr/bin/core_perl" " "~/.cargo/bin" "~/.local/bin" "/usr/lib/emacs/26.3/x86_64-pc-linux-gnu"))
 (config
  (envfile . envvar-file)
  (elc-files . 0)
  (modules :completion company ivy :ui deft doom doom-dashboard doom-quit hl-todo modeline nav-flash ophints (popup +defaults) tabs vc-gutter vi-tilde-fringe workspaces zen :editor (evil +everywhere) file-templates fold snippets :emacs dired electric undo vc :term eshell :checkers syntax spell grammar :tools (eval +overlay) lookup magit make pdf :lang cc emacs-lisp latex markdown (org +dragndrop +pandoc +roam +journal +pomodoro +gnuplot +present) python sh :config (default +bindings +smartparens))
  (packages (vagrant) (arduino-mode) (activity-watch-mode))
  (unpin "n/a")
  (elpa "n/a")))

@Silipwn Silipwn added the is:bug Something isn't working as intended label May 14, 2020
@hlissner
Copy link
Member

I can reproduce this, but this appears to be an upstream issue.

Namely, the org-encrypt-string function expects epa-file-encrypt-to to be a string, but epa-file-encrypt-to's documentation says:

May either be a string or a list of strings.

And Doom sets it to a list of strings, by default.

Would you mind reporting this upstream to the org devs?


For the time being, you can get around this with:

;; add to ~/.doom.d/config.el
(after! epa
  (setq epa-file-encrypt-to (car epa-file-encrypt-to)))

@hlissner hlissner added module:lang/org Pertains to Doom's :lang org module is:upstream Originates from outside the project and cannot be fully addressed here workaround Contains a workaround, but no acceptable or final solution (yet) and removed is:bug Something isn't working as intended labels May 14, 2020
@hlissner hlissner added the status:resolved-temporarily Issue was addressed internally, but needs a better solution label May 14, 2020
@hlissner hlissner reopened this May 14, 2020
@hlissner
Copy link
Member

I've implemented a temporary workaround in 043a561. Let me know if that gives you any trouble. In the meantime, I'll keep this issue open until it is addressed upstream.

@Silipwn
Copy link
Author

Silipwn commented May 15, 2020

The workaround for config.el didn't work, nor did the current commit 043a561.
Current back-trace looks like this:

Debugger entered--Lisp error: (error "Encrypt failed")
  signal(error ("Encrypt failed"))
  error("Encrypt failed")
  org-encrypt-entry()
  funcall-interactively(org-encrypt-entry)
  call-interactively(org-encrypt-entry record nil)
Reported the issue upstream.

@hlissner hlissner added status:unconfirmed Still under investigation. and removed workaround Contains a workaround, but no acceptable or final solution (yet) status:resolved-temporarily Issue was addressed internally, but needs a better solution labels May 15, 2020
@Silipwn
Copy link
Author

Silipwn commented May 16, 2020

Update: A fix was added to the main repo in this commit

@hlissner
Copy link
Member

Excellent. I've bumped org and removed the "workaround" in e3ca1d5. Thanks for letting me know!

@hlissner hlissner added status:resolved-elsewhere Issue was addressed outside of Doom, needing no action on Doom's part and removed status:unconfirmed Still under investigation. labels May 16, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
is:upstream Originates from outside the project and cannot be fully addressed here module:lang/org Pertains to Doom's :lang org module status:resolved-elsewhere Issue was addressed outside of Doom, needing no action on Doom's part
Projects
None yet
Development

No branches or pull requests

2 participants