emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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/)]
@ 2017-04-06  3:46 Allen Li
  2017-04-17 12:21 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Allen Li @ 2017-04-06  3:46 UTC (permalink / raw)
  To: emacs-orgmode


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/)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* 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/)]
  2017-04-06  3:46 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/)] Allen Li
@ 2017-04-17 12:21 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-04-17 12:21 UTC (permalink / raw)
  To: Allen Li; +Cc: emacs-orgmode

Hello,

Allen Li <darkfeline@felesatra.moe> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-17 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-06  3:46 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/)] Allen Li
2017-04-17 12:21 ` Nicolas Goaziou

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).