all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [emacs-lisp newbie] print-something() -> clipboard?
@ 2012-05-18 19:46 Tom Roche
  2012-05-19  7:19 ` Andreas Röhler
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tom Roche @ 2012-05-18 19:46 UTC (permalink / raw)
  To: help-gnu-emacs


From my init.el I load a file that contains function definitions which
all have the form

> (defun print-path-and-filename () 
>   "Print the current buffer's file's path at point."
>   (interactive "*") ; abort if buffer is read-only
>   (if buffer-file-name (insert buffer-file-name) nil))
> (global-set-key "\C-pp" 'print-path-and-filename)
...
> (defun print-buffer-name ()
>   "Print (at point) the current buffer's name."
>   (interactive "*") ; abort if buffer is read-only
>   (insert (buffer-name (window-buffer (minibuffer-selected-window)))))
> (global-set-key "\C-pb" 'print-buffer-name)
>
> (provide 'tlr-print)

Most of the functions are buffer-independent (printing, e.g., current
time, emacs version) but some (like the above) are not. For the
latter, I'd like to have the option to "print" the datum to the
clipboard. How can I (easily :-) do that?

Examples esp appreciated. Feel free to point to doc.

TIA, Tom Roche <Tom_Roche@pobox.com>



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

end of thread, other threads:[~2012-05-21 13:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-18 19:46 [emacs-lisp newbie] print-something() -> clipboard? Tom Roche
2012-05-19  7:19 ` Andreas Röhler
2012-05-20 18:57 ` Tom Roche
2012-05-20 19:20   ` Drew Adams
2012-05-20 20:27 ` Tom Roche
2012-05-21 13:24   ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.