emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Failure in compiling org-capture.el
Date: Mon, 17 Apr 2017 15:19:05 +0000	[thread overview]
Message-ID: <CAFyQvY1WxedZ=zvHY4e+P9zZ9+TN9brvQaMBUSE68NTcLEgafA@mail.gmail.com> (raw)
In-Reply-To: <CAFyQvY1jEGo0R=KW-5Fk2cAWXJ9uk6CH2DCWaF_B2tigq6B9sg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

While that error is fixed, we still have this byte compilation warning:

org-capture.el:1586:1:Warning: Unused lexical variable ‘first-value’

I haven't used pcase extensively, but based on the warning, the below
doesn't work as intended in the compiled elc:

   ((or "C" "L")
    (let ((insert-fun (if (equal key "C") #'insert
(lambda (s) (org-insert-link 0 s))))
  (first-value (car org-capture--clipboards)))
      (pcase (length org-capture--clipboards)
(`nil nil)
(`(,value) (funcall insert-fun value))
(`(,first-value . ,_)
 (funcall insert-fun
  (read-string "Clipboard/kill value: "
first-value                                                ; Based on the
warning, does it mean that the value of first-value is not picked from the
value calculated in the let form above?
'org-capture--clipboards
first-value)))                                             ; And the same
here
(_ (error "Invalid `org-capture--clipboards' value: %S"
  org-capture--clipboards)))))
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 2430 bytes --]

  reply	other threads:[~2017-04-17 15:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-17 14:11 Failure in compiling org-capture.el Kaushal Modi
2017-04-17 14:55 ` Kaushal Modi
2017-04-17 15:10   ` Kaushal Modi
2017-04-17 15:19     ` Kaushal Modi [this message]
2017-04-17 18:05       ` Nicolas Goaziou
2017-04-17 18:11         ` Kaushal Modi

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='CAFyQvY1WxedZ=zvHY4e+P9zZ9+TN9brvQaMBUSE68NTcLEgafA@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --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).