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>