all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* using PRIMARY and CLIPBOARD w/o using the mouse
@ 2003-09-12  9:45 James H. Cloos Jr.
  0 siblings, 0 replies; only message in thread
From: James H. Cloos Jr. @ 2003-09-12  9:45 UTC (permalink / raw)


Using a laptop has me a bit spoiled by having the handy track stick
between the GH&B keys, and buttons just below -- and just as easily
thumbed as -- the spacebar.

Reaching for the rodent is a RFPITA.

In X, using the GUI, is there a command that will copy the region
between current and point to PRIMARY, SECONDARY and/or CLIPBOARD?

My searches through info, docstrings and the (lisp) src hasn't
hit on any.

It looks as though I need something like this:

(defun my-x-selection (beg end)
  "select between point and current into PRIMARY"
  (interactive "r")
  (let ((data (list (buffer-substring beg end)))
        (type (if (not current-prefix-arg) 'PRIMARY 'CLIPBOARD)))
  (if data
    (x-own-selection-internal type data)
    (x-disown-selection-internal type))))


(The idea is that it should copy to CLIPBOARD if prefix arg, else to PRIMARY.)

Any thoughts on improving that?

-JimC

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-09-12  9:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-12  9:45 using PRIMARY and CLIPBOARD w/o using the mouse James H. Cloos Jr.

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.