emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
To: emacs-orgmode@gnu.org
Subject: Bug: org-store-link gives lisp error "wrong-type-argument" [9.1.3 (release_9.1.3-171-gb6df86)]
Date: Thu, 18 Jan 2018 20:36:43 +0100	[thread overview]
Message-ID: <20180118193643.GA19499@seven> (raw)


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.

             reply	other threads:[~2018-01-18 19:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 19:36 Stefan-W. Hahn [this message]
2018-01-18 22:11 ` Bug: org-store-link gives lisp error "wrong-type-argument" [9.1.3 (release_9.1.3-171-gb6df86)] Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180118193643.GA19499@seven \
    --to=stefan.hahn@s-hahn.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).