From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Failure in compiling org-capture.el Date: Mon, 17 Apr 2017 15:19:05 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c1aba78735447054d5e5066 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d08Qw-00038r-Ig for emacs-orgmode@gnu.org; Mon, 17 Apr 2017 11:19:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d08Qv-0004n9-Lu for emacs-orgmode@gnu.org; Mon, 17 Apr 2017 11:19:18 -0400 Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]:35063) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d08Qv-0004mF-ED for emacs-orgmode@gnu.org; Mon, 17 Apr 2017 11:19:17 -0400 Received: by mail-lf0-x236.google.com with SMTP id 75so66725233lfs.2 for ; Mon, 17 Apr 2017 08:19:17 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-org list --94eb2c1aba78735447054d5e5066 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable While that error is fixed, we still have this byte compilation warning: org-capture.el:1586:1:Warning: Unused lexical variable =E2=80=98first-value= =E2=80=99 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))))) --=20 Kaushal Modi --94eb2c1aba78735447054d5e5066 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
While that error is fixed, we still have this byte compila= tion warning:

org-capture.el:1586:1:Warning: Unused= lexical variable =E2=80=98first-value=E2=80=99

<= div>I haven't used pcase extensively, but based on the warning, the bel= ow doesn't work as intended in the compiled elc:

= =C2=A0 =C2=A0((or "C" "L")
=C2=A0 =C2=A0 (let ((inser= t-fun (if (equal key "C") #'insert
(lambda (s) (org-inse= rt-link 0 s))))
=C2=A0 (first-value (car org-capture--clipboards)))
= =C2=A0 =C2=A0 =C2=A0 (pcase (length org-capture--clipboards)
(`nil nil)<= /div>
(`(,value) (funcall insert-fun value))
(`(,first-value . ,_)
=C2= =A0(funcall insert-fun
=C2=A0 (read-string "Clipboard/kill value: = "
= first-value =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0; Based on the warning, does i= t mean that the value of first-value is not picked from the value calculate= d in the let form above?
'org-capture--clipboards
first-value= ))) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ; And the same here=C2=A0
(_ (error "Invalid `org-captur= e--clipboards' value: %S"
=C2=A0 org-capture--clipboards)))))<= /div>
--

Kaushal Modi

--94eb2c1aba78735447054d5e5066--