emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: org-store-link gives lisp error "wrong-type-argument" [9.1.3 (release_9.1.3-171-gb6df86)]
@ 2018-01-18 19:36 Stefan-W. Hahn
  2018-01-18 22:11 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan-W. Hahn @ 2018-01-18 19:36 UTC (permalink / raw)
  To: emacs-orgmode


Hello,

when storing a link of an bibtex entry I get an lisp error. This happens
because I have more then one function for storing bibtex links and
org-store-link calls completing-read with initial-input as symbol not as
string.

This has been changed in commit

commit 0cc231a7bb9f261640205943ddeb42ad8cefc43d
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date:   Fri Dec 1 19:33:35 2017 +0100


Not working:
(completing-read "what: " '(a b c) nil t 'a)

Working:
(completing-read "what: " '(a b c) nil t "a")

In the version before the given commit then initial-input parameter was
the "symbol-name" of the value.

The following change repairs the problem, perhaps this is sufficient.

#+begin_src diff
diff --git a/lisp/org.el b/lisp/org.el
index 061776065..51e95a6c8 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9197,7 +9197,7 @@ org-store-link
                         (cdr (assoc-string
                               (completing-read
                                "Which function for creating the link? "
-                               (mapcar #'car results-alist) nil t name)
+                               (mapcar #'car results-alist) nil t (symbol-name name))
                               results-alist)))
                  t))))
        (setq link (plist-get org-store-link-plist :link))
#+end_src


With kind regards,
Stefan

Emacs  : GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2017-12-24
Package: Org mode version 9.1.3 (release_9.1.3-171-gb6df86 @ /home/hs/.emacs.d/lib/org-mode/lisp/)

-- 
Stefan-W. Hahn                          It is easy to make things.
                                        It is hard to make things simple.

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

* Re: Bug: org-store-link gives lisp error "wrong-type-argument" [9.1.3 (release_9.1.3-171-gb6df86)]
  2018-01-18 19:36 Bug: org-store-link gives lisp error "wrong-type-argument" [9.1.3 (release_9.1.3-171-gb6df86)] Stefan-W. Hahn
@ 2018-01-18 22:11 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-01-18 22:11 UTC (permalink / raw)
  To: Stefan-W. Hahn; +Cc: emacs-orgmode

Hello,

"Stefan-W. Hahn" <stefan.hahn@s-hahn.de> writes:

> Hello,
>
> when storing a link of an bibtex entry I get an lisp error. This happens
> because I have more then one function for storing bibtex links and
> org-store-link calls completing-read with initial-input as symbol not as
> string.
>
> This has been changed in commit
>
> commit 0cc231a7bb9f261640205943ddeb42ad8cefc43d
> Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
> Date:   Fri Dec 1 19:33:35 2017 +0100
>
>
> Not working:
> (completing-read "what: " '(a b c) nil t 'a)
>
> Working:
> (completing-read "what: " '(a b c) nil t "a")
>
> In the version before the given commit then initial-input parameter was
> the "symbol-name" of the value.
>
> The following change repairs the problem, perhaps this is sufficient.

Fixed. Thank you for the report and the patch.

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2018-01-18 22:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18 19:36 Bug: org-store-link gives lisp error "wrong-type-argument" [9.1.3 (release_9.1.3-171-gb6df86)] Stefan-W. Hahn
2018-01-18 22:11 ` Nicolas Goaziou

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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