From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Li Subject: 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: Wed, 05 Apr 2017 20:46:32 -0700 Message-ID: <87k26yurjb.fsf@felesatra.moe> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvycQ-0005GG-Ue for emacs-orgmode@gnu.org; Thu, 06 Apr 2017 00:01:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvycN-0004tC-U4 for emacs-orgmode@gnu.org; Thu, 06 Apr 2017 00:01:59 -0400 Received: from solmarta.felesatra.moe ([198.199.111.162]:35341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvycN-0004sa-Ne for emacs-orgmode@gnu.org; Thu, 06 Apr 2017 00:01:55 -0400 Received: from localhost (c-73-70-42-168.hsd1.ca.comcast.net [73.70.42.168]) by solmarta.felesatra.moe (Postfix) with ESMTPSA id E1008FFD8D for ; Thu, 6 Apr 2017 00:01:52 -0400 (EDT) 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-orgmode@gnu.org 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. Emacs : GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.7) of 2017-02-07 Package: Org mode version 9.0.5 (9.0.5-elpaplus @ /home/mir/.emacs.d/elpa/org-plus-contrib-20170210/)