From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: Clipboard history is empty when using %^C in capture template [9.0.5 (9.0.5-elpaplus @ /home/mir/.emacs.d/elpa/org-plus-contrib-20170210/)] Date: Mon, 17 Apr 2017 14:21:11 +0200 Message-ID: <87inm3mdhk.fsf@nicolasgoaziou.fr> References: <87k26yurjb.fsf@felesatra.moe> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d05eh-0004aF-8q for emacs-orgmode@gnu.org; Mon, 17 Apr 2017 08:21:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d05ed-0002zA-8k for emacs-orgmode@gnu.org; Mon, 17 Apr 2017 08:21:19 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:57121) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d05ed-0002xY-2x for emacs-orgmode@gnu.org; Mon, 17 Apr 2017 08:21:15 -0400 In-Reply-To: <87k26yurjb.fsf@felesatra.moe> (Allen Li's message of "Wed, 05 Apr 2017 20:46:32 -0700") 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: Allen Li Cc: emacs-orgmode@gnu.org Hello, Allen Li writes: > Using the %^C expansion in a capture template brings up a minibuffer > prompt to read/select a clipboard value, but there are no values to > select from. > > The relevant code is in the function org-capture-fill-template. > > ("C" > (cond > ((= (length clipboards) 1) (insert (car clipboards))) > ((> (length clipboards) 1) > (insert (read-string "Clipboard/kill value: " > (car clipboards) > '(clipboards . 1) > (car clipboards)))))) > > It looks like the intention is to put the list of possible clipboard > values into the minibuffer history for read-string, but in practice I > get an error saying the history is empty. > > I suspect that the problem is that clipboard is lexically bound, and > since read-string takes a symbol for the history, it cannot get the > lexical value for clipboards from the symbol argument. Thank you for the report. I think I fixed it in maint. Could you confirm it? Regards, -- Nicolas Goaziou