all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: 6944@debbugs.gnu.org
Subject: bug#6944: Paste in Edit menu not active at start
Date: Mon, 30 Aug 2010 19:56:31 +0300	[thread overview]
Message-ID: <83y6bojayo.fsf@gnu.org> (raw)
In-Reply-To: <AANLkTimne7o=q_8zJWPapsGykeQdUM7rHgXBvSQggEGC@mail.gmail.com>

> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Mon, 30 Aug 2010 12:32:56 +0200
> Cc: 
> 
> After starting Emacs with "emacs -Q" the "Paste" alternative is not
> active in the menu even though C-y works.

This happens because menu-bar.el defines the sensitivity of "Paste" as
follows:

  (define-key menu-bar-edit-menu [paste]
    `(menu-item ,(purecopy "Paste") yank
		:enable (and (or
			      ;; Emacs compiled --without-x doesn't have
			      ;; x-selection-exists-p.
			      (and (fboundp 'x-selection-exists-p)
				   (x-selection-exists-p))
			      kill-ring)
			     (not buffer-read-only))

and x-selection-exists-p with its argument omitted probes the PRIMARY
selection, which doesn't exist on MS-Windows.

I can easily fix that with an MS-Windows specific change, but I'm
actually surprised we don't call (x-selection-exists-p 'CLIPBOARD)
here: isn't C-y supposed to yank from the clipboard, not from PRIMARY?
If we use 'CLIPBOARD, the code will work on Windows without any
changes.

Am I missing something?





  parent reply	other threads:[~2010-08-30 16:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30 10:32 bug#6944: Paste in Edit menu not active at start Lennart Borgman
2010-08-30 12:49 ` Stephen Berman
2010-08-30 16:56 ` Eli Zaretskii [this message]
2010-08-30 17:37   ` Chong Yidong
2010-08-30 18:12     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83y6bojayo.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=6944@debbugs.gnu.org \
    --cc=lennart.borgman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.