GNU bug report logs - #6944
Paste in Edit menu not active at start

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Mon, 30 Aug 2010 11:07:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6944 in the body.
You can then email your comments to 6944 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6944; Package emacs. (Mon, 30 Aug 2010 11:07:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 30 Aug 2010 11:07:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Emacs Bugs <bug-gnu-emacs <at> gnu.org>
Subject: Paste in Edit menu not active at start
Date: Mon, 30 Aug 2010 12:32:56 +0200
After starting Emacs with "emacs -Q" the "Paste" alternative is not
active in the menu even though C-y works.


In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-08-10
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6944; Package emacs. (Mon, 30 Aug 2010 12:48:01 GMT) Full text and rfc822 format available.

Message #8 received at 6944 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6944 <at> debbugs.gnu.org
Subject: Re: bug#6944: Paste in Edit menu not active at start
Date: Mon, 30 Aug 2010 14:49:00 +0200
On Mon, 30 Aug 2010 12:32:56 +0200 Lennart Borgman <lennart.borgman <at> gmail.com> wrote:

> After starting Emacs with "emacs -Q" the "Paste" alternative is not
> active in the menu even though C-y works.
>
>
> In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
>  of 2010-08-10
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (3.4) --no-opt --cflags
> -Ic:/g/include -fno-crossjumping'

On GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.18.6) of
2010-08-22 on escher, "Paste" is active in the menu after starting with
-Q, so this seems to be an MS-Windows problem.

Steve Berman




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6944; Package emacs. (Mon, 30 Aug 2010 16:53:02 GMT) Full text and rfc822 format available.

Message #11 received at 6944 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6944 <at> debbugs.gnu.org
Subject: Re: bug#6944: Paste in Edit menu not active at start
Date: Mon, 30 Aug 2010 19:56:31 +0300
> From: Lennart Borgman <lennart.borgman <at> 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?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6944; Package emacs. (Mon, 30 Aug 2010 17:37:01 GMT) Full text and rfc822 format available.

Message #14 received at 6944 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 6944 <at> debbugs.gnu.org
Subject: Re: bug#6944: Paste in Edit menu not active at start
Date: Mon, 30 Aug 2010 13:37:52 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

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

Yes, please make the change.  This looks like an oversight.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Mon, 30 Aug 2010 18:10:02 GMT) Full text and rfc822 format available.

Notification sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
bug acknowledged by developer. (Mon, 30 Aug 2010 18:10:03 GMT) Full text and rfc822 format available.

Message #19 received at 6944-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: lennart.borgman <at> gmail.com, 6944-done <at> debbugs.gnu.org
Subject: Re: bug#6944: Paste in Edit menu not active at start
Date: Mon, 30 Aug 2010 21:12:26 +0300
> From: Chong Yidong <cyd <at> stupidchicken.com>
> Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 6944 <at> debbugs.gnu.org
> Date: Mon, 30 Aug 2010 13:37:52 -0400
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >   (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))
> >
> > 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.
> 
> Yes, please make the change.  This looks like an oversight.

Done.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 28 Sep 2010 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 346 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.