* Select and Paste
@ 2006-11-30 1:35 Lennart Borgman
2006-11-30 19:48 ` Richard Stallman
0 siblings, 1 reply; 14+ messages in thread
From: Lennart Borgman @ 2006-11-30 1:35 UTC (permalink / raw)
is a very nice feature to have in the menus but maybe not the best name
for it since "Select" in nearly the same context refers to selecting
text in the buffer.
Maybe "Paste More"?
BTW "Paste" is enabled when you are in an info buffer, but "Select and
Paste" is not.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Select and Paste
2006-11-30 1:35 Select and Paste Lennart Borgman
@ 2006-11-30 19:48 ` Richard Stallman
2006-12-01 11:54 ` Eli Zaretskii
2006-12-01 14:35 ` Lennart Borgman
0 siblings, 2 replies; 14+ messages in thread
From: Richard Stallman @ 2006-11-30 19:48 UTC (permalink / raw)
Cc: emacs-devel
is a very nice feature to have in the menus but maybe not the best name
for it since "Select" in nearly the same context refers to selecting
text in the buffer.
Maybe "Paste More"?
How about Paste Menu?
BTW "Paste" is enabled when you are in an info buffer, but "Select and
Paste" is not.
That seems like a bug, but it doesn't happen when I try it,
and the code checks buffer-read-only. Can you debug why it
fails for you?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Select and Paste
2006-11-30 19:48 ` Richard Stallman
@ 2006-12-01 11:54 ` Eli Zaretskii
2006-12-01 12:35 ` Kim F. Storm
2006-12-01 22:02 ` Richard Stallman
2006-12-01 14:35 ` Lennart Borgman
1 sibling, 2 replies; 14+ messages in thread
From: Eli Zaretskii @ 2006-12-01 11:54 UTC (permalink / raw)
Cc: lennart.borgman.073, emacs-devel
> From: Richard Stallman <rms@gnu.org>
> Date: Thu, 30 Nov 2006 14:48:43 -0500
> Cc: emacs-devel@gnu.org
>
> is a very nice feature to have in the menus but maybe not the best name
> for it since "Select" in nearly the same context refers to selecting
> text in the buffer.
>
> Maybe "Paste More"?
>
> How about Paste Menu?
How about "Paste From Menu"?
> BTW "Paste" is enabled when you are in an info buffer, but "Select and
> Paste" is not.
>
> That seems like a bug, but it doesn't happen when I try it,
> and the code checks buffer-read-only. Can you debug why it
> fails for you?
The fact that Paste and Select and Paste behave differently is not a
bug: Paste could be enabled because Emacs sees text in the X selection
(or the Windows clipboard). In that case, if the Emacs kill-ring is
empty, Select and Paste will be disabled.
As for the buffer-read-only test, I see that it doesn't work in more
than just Paste: for example, Cut also becomes enabled when I mark a
region in a read-only buffer. I didn't have time to debug this,
though.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Select and Paste
2006-12-01 11:54 ` Eli Zaretskii
@ 2006-12-01 12:35 ` Kim F. Storm
2006-12-01 15:30 ` Lennart Borgman
2006-12-01 22:02 ` Richard Stallman
1 sibling, 1 reply; 14+ messages in thread
From: Kim F. Storm @ 2006-12-01 12:35 UTC (permalink / raw)
Cc: lennart.borgman.073, rms, emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> How about Paste Menu?
>
> How about "Paste From Menu"?
or:
Paste from kill-ring ?
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Select and Paste
2006-12-01 11:54 ` Eli Zaretskii
2006-12-01 12:35 ` Kim F. Storm
@ 2006-12-01 22:02 ` Richard Stallman
2006-12-02 19:53 ` martin rudalics
1 sibling, 1 reply; 14+ messages in thread
From: Richard Stallman @ 2006-12-01 22:02 UTC (permalink / raw)
Cc: lennart.borgman.073, emacs-devel
> That seems like a bug, but it doesn't happen when I try it,
> and the code checks buffer-read-only. Can you debug why it
> fails for you?
The fact that Paste and Select and Paste behave differently is not a
bug: Paste could be enabled because Emacs sees text in the X selection
(or the Windows clipboard). In that case, if the Emacs kill-ring is
empty, Select and Paste will be disabled.
Both of these have conditions of the form (and ... (not buffer-read-only)),
so I don't see how either of them could be enabled in a read-only buffer
regardless of other circumstances.
The same is true of Cut.
Can anyone debug this? Does anyone else see it fail this way?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Select and Paste
2006-12-01 22:02 ` Richard Stallman
@ 2006-12-02 19:53 ` martin rudalics
2006-12-03 5:07 ` Richard Stallman
0 siblings, 1 reply; 14+ messages in thread
From: martin rudalics @ 2006-12-02 19:53 UTC (permalink / raw)
Cc: lennart.borgman.073, Eli Zaretskii, emacs-devel
> > That seems like a bug, but it doesn't happen when I try it,
> > and the code checks buffer-read-only. Can you debug why it
> > fails for you?
>
> The fact that Paste and Select and Paste behave differently is not a
> bug: Paste could be enabled because Emacs sees text in the X selection
> (or the Windows clipboard). In that case, if the Emacs kill-ring is
> empty, Select and Paste will be disabled.
>
> Both of these have conditions of the form (and ... (not buffer-read-only)),
> so I don't see how either of them could be enabled in a read-only buffer
> regardless of other circumstances.
>
> The same is true of Cut.
Maybe because the key definitions come from `menu-bar-enable-clipboard'.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Select and Paste
2006-12-02 19:53 ` martin rudalics
@ 2006-12-03 5:07 ` Richard Stallman
2006-12-03 10:04 ` martin rudalics
0 siblings, 1 reply; 14+ messages in thread
From: Richard Stallman @ 2006-12-03 5:07 UTC (permalink / raw)
Cc: lennart.borgman.073, eliz, emacs-devel
Maybe because the key definitions come from `menu-bar-enable-clipboard'.
That could be it. For sure, those definitions should have suitable
:enable conditions.
Can you add some?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Select and Paste
2006-12-03 5:07 ` Richard Stallman
@ 2006-12-03 10:04 ` martin rudalics
0 siblings, 0 replies; 14+ messages in thread
From: martin rudalics @ 2006-12-03 10:04 UTC (permalink / raw)
Cc: lennart.borgman.073, eliz, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 64 bytes --]
Could people try whether the attached patch gives good results?
[-- Attachment #2: menu-bar.patch --]
[-- Type: text/plain, Size: 1253 bytes --]
*** menu-bar.el.~1.296.~ Sun Nov 19 18:04:18 2006
--- menu-bar.el Sun Dec 3 11:00:30 2006
***************
*** 502,512 ****
;; These are alternative definitions for the cut, paste and copy
;; menu items. Use them if your system expects these to use the clipboard.
! (put 'clipboard-kill-region 'menu-enable 'mark-active)
(put 'clipboard-kill-ring-save 'menu-enable 'mark-active)
(put 'clipboard-yank 'menu-enable
! '(or (and (fboundp 'x-selection-exists-p) (x-selection-exists-p))
! (x-selection-exists-p 'CLIPBOARD)))
(defun clipboard-yank ()
"Insert the clipboard contents, or the last stretch of killed text."
--- 502,515 ----
;; These are alternative definitions for the cut, paste and copy
;; menu items. Use them if your system expects these to use the clipboard.
! (put 'clipboard-kill-region 'menu-enable
! '(and mark-active (not buffer-read-only)))
(put 'clipboard-kill-ring-save 'menu-enable 'mark-active)
(put 'clipboard-yank 'menu-enable
! '(and (or (and (fboundp 'x-selection-exists-p)
! (x-selection-exists-p))
! (x-selection-exists-p 'CLIPBOARD))
! (not buffer-read-only)))
(defun clipboard-yank ()
"Insert the clipboard contents, or the last stretch of killed text."
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Select and Paste
2006-11-30 19:48 ` Richard Stallman
2006-12-01 11:54 ` Eli Zaretskii
@ 2006-12-01 14:35 ` Lennart Borgman
2006-12-01 20:21 ` Stuart D. Herring
2006-12-02 17:55 ` Richard Stallman
1 sibling, 2 replies; 14+ messages in thread
From: Lennart Borgman @ 2006-12-01 14:35 UTC (permalink / raw)
Cc: emacs-devel
Richard Stallman wrote:
> is a very nice feature to have in the menus but maybe not the best name
> for it since "Select" in nearly the same context refers to selecting
> text in the buffer.
>
> Maybe "Paste More"?
>
> How about Paste Menu?
>
> BTW "Paste" is enabled when you are in an info buffer, but "Select and
> Paste" is not.
>
> That seems like a bug, but it doesn't happen when I try it,
> and the code checks buffer-read-only. Can you debug why it
> fails for you?
If I start with
emacs -Q
and go into an Info buffer then the "Paste" entry in the Options menu in
the menu bar is enabled. I am using w32. So this does not happen on
GNU/Linux?
Could someone tell me where the code is that should enable/disable the
"Paste" entry? I tried to find it but it was not that simple.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2006-12-03 10:04 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-30 1:35 Select and Paste Lennart Borgman
2006-11-30 19:48 ` Richard Stallman
2006-12-01 11:54 ` Eli Zaretskii
2006-12-01 12:35 ` Kim F. Storm
2006-12-01 15:30 ` Lennart Borgman
2006-12-02 17:55 ` Richard Stallman
2006-12-02 20:54 ` Lennart Borgman
2006-12-01 22:02 ` Richard Stallman
2006-12-02 19:53 ` martin rudalics
2006-12-03 5:07 ` Richard Stallman
2006-12-03 10:04 ` martin rudalics
2006-12-01 14:35 ` Lennart Borgman
2006-12-01 20:21 ` Stuart D. Herring
2006-12-02 17:55 ` Richard Stallman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).