unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21196: 24.5; Paste from clipboard to emacs -nw on windows 8.1
@ 2015-08-06  0:06 Pablo Mercader Alcántara
  2015-08-06 14:31 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Pablo Mercader Alcántara @ 2015-08-06  0:06 UTC (permalink / raw)
  To: 21196

Some days ago I installed version 24.5, in the previous version that I
used (24.3) everything was fine.

I start my emacs session with the "-nw" command line option. And
proceeded to work. Everything works fine, except that now after the
update the text that I kill on emacs doesn't go into windows
clipboard. I can paste on emacs text coming from other programs through
the clipboard, but the inverse is not possible.

When I start emacs normally (without "-nw") everything works fine, so at
first I thought that this was some kind of new configuration. Later I
decided to make some research and found where the problem was. Looking
at the value of the variable "interprogram-cut-function" in my system I
see that it's set to "x-select-text" and in my system this function is
defined at "common-win.el". In the body of "x-select-text" the first
"cond" function is like this "(cond ((eq (framep (selected-frame)) 'w32)
..." and I think this is the cause for the kill function to be unable to
send the text to the clipboard when running with the "-nw" option,
because when emacs runs in this mode the call "(framep
(selected-frame))" returns "t" when it is waiting for a "w32"
value. When the same call is run on the emacs running whithout the "-nw"
option the expected "w32" value appears.

I was also curious about why the yank function does work so, I went to
see the source of the "x-get-selection-value" function too. It turns out
that it's even defined on a different source file named
"w32-common-fns.el". Seeing that I think that only the windows version
defines this function this way, and I can't see anything like the
"framep" function arround here so there is the problem.

Thanks for the great emacs editor! I really admire this project!

In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.3.9600
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'

Important settings:
  value of $LANG: ESD
  locale-coding-system: cp1252

Major mode: Help

Minor modes in effect:
  yas-global-mode: t
  yas-minor-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
End of buffer [2 times]
x-get-selection-value
Quit
x-get-selection-value
Type "q" to restore previous buffer.
You can run the command `describe-function' with C-h f
Type "q" to restore previous buffer.
C-x C-g is undefined
Quit
Making completion list...

Load-path shadows:
c:/Users/pmercader/AppData/Roaming/.emacs.d/elpa/csharp-mode-20150714.138/csharp-mode
hides d:/share/emacs/share/emacs/site-lisp/nxhtml/related/csharp-mode
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/cc-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/cperl-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/csharp-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/css-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/emacs-lisp-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/erlang-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/f90-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/html-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/js-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/latex-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/markdown-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/nxml-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/objc-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/perl-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/python-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/rst-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/ruby-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/scala-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/snippet-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/sql-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/c++-mode/.yas-compiled-snippets
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/snippets/text-mode/.yas-compiled-snippets
d:/share/emacs/share/emacs/site-lisp/yasnippet/extras/imported/html-mode/.yas-setup
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/extras/imported/objc-mode/.yas-setup
d:/share/emacs/share/emacs/site-lisp/yasnippet/extras/imported/html-mode/.yas-setup
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/extras/imported/rails-mode/.yas-setup
d:/share/emacs/share/emacs/site-lisp/yasnippet/extras/imported/html-mode/.yas-setup
hides d:/share/emacs/share/emacs/site-lisp/yasnippet/extras/imported/ruby-mode/.yas-setup
d:/share/emacs/share/emacs/site-lisp/nxhtml/tests/ert hides
d:/share/emacs/share/emacs/24.5/lisp/emacs-lisp/ert

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils find-func debug apropos misearch multi-isearch
time-date yasnippet advice cl-extra help-fns derived easy-mmode cl-macs
edmacro kmacro help-mode cl gv cl-loaddefs cl-lib setup-cygwin
cygwin-mount ange-ftp comint ansi-color ring omnisharp-autoloads info
easymenu flycheck-autoloads auto-complete-autoloads dash-autoloads
pkg-info-autoloads epl-autoloads popup-autoloads package epg-config
windmove ido tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win
w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
w32notify w32 multi-tty emacs)

Memory information:
((conses 8 175944 5846)
 (symbols 32 24552 0)
 (miscs 32 87 681)
 (strings 16 36102 5289)
 (string-bytes 1 952830)
 (vectors 8 14963)
 (vector-slots 4 475764 5888)
 (floats 8 377 405)
 (intervals 28 920 33)
 (buffers 508 18))





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#21196: 24.5; Paste from clipboard to emacs -nw on windows 8.1
  2015-08-06  0:06 bug#21196: 24.5; Paste from clipboard to emacs -nw on windows 8.1 Pablo Mercader Alcántara
@ 2015-08-06 14:31 ` Eli Zaretskii
       [not found]   ` <CAPQ4eMJDzvuTtcFsadUhL+567Bc2JOaFku5AUTNmnor7BijoaQ@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2015-08-06 14:31 UTC (permalink / raw)
  To: Pablo Mercader Alcántara; +Cc: 21196

> Date: Wed, 5 Aug 2015 20:06:19 -0400
> From: Pablo Mercader Alcántara <programingfrik@gmail.com>
> 
> Some days ago I installed version 24.5, in the previous version that I
> used (24.3) everything was fine.
> 
> I start my emacs session with the "-nw" command line option. And
> proceeded to work. Everything works fine, except that now after the
> update the text that I kill on emacs doesn't go into windows
> clipboard. I can paste on emacs text coming from other programs through
> the clipboard, but the inverse is not possible.

This is expected behavior: Emacs doesn't support clipboard operations
in -nw sessions, neither on MS-Windows nor on other platforms.  To be
sure, I just tested in v24.3 on MS-Windows, and I see there exactly
the same results as you report for 24.5.  So I cannot understand why
you say it was OK in v24.3.

> When I start emacs normally (without "-nw") everything works fine, so at
> first I thought that this was some kind of new configuration. Later I
> decided to make some research and found where the problem was. Looking
> at the value of the variable "interprogram-cut-function" in my system I
> see that it's set to "x-select-text" and in my system this function is
> defined at "common-win.el". In the body of "x-select-text" the first
> "cond" function is like this "(cond ((eq (framep (selected-frame)) 'w32)
> ..." and I think this is the cause for the kill function to be unable to
> send the text to the clipboard when running with the "-nw" option,
> because when emacs runs in this mode the call "(framep
> (selected-frame))" returns "t" when it is waiting for a "w32"
> value. When the same call is run on the emacs running whithout the "-nw"
> option the expected "w32" value appears.

That's correct.  And the same is true for Emacs 24.3.  Maybe you mean
Emacs 23, where indeed the test for the GUI frame was absent.  But
that was an omission, which is now fixed.

If you want to have access to the clipboard in -nw sessions, you can
always override x-select-text with your own version that doesn't
include that test.  Although I'm unsure why would you want to use
text-mode sessions too much on MS-Windows; GUI sessions have, of
course, full access to the clipboard.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#21196: Fwd: bug#21196: 24.5; Paste from clipboard to emacs -nw on windows 8.1
       [not found]   ` <CAPQ4eMJDzvuTtcFsadUhL+567Bc2JOaFku5AUTNmnor7BijoaQ@mail.gmail.com>
@ 2015-08-06 23:06     ` Pablo Mercader Alcántara
  2015-08-07  6:34     ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Pablo Mercader Alcántara @ 2015-08-06 23:06 UTC (permalink / raw)
  To: 21196

2015-08-06 10:31 GMT-04:00 Eli Zaretskii <eliz@gnu.org>:
>> Date: Wed, 5 Aug 2015 20:06:19 -0400
>> From: Pablo Mercader Alcántara <programingfrik@gmail.com>
>>
>> Some days ago I installed version 24.5, in the previous version that I
>> used (24.3) everything was fine.
>>
>> I start my emacs session with the "-nw" command line option. And
>> proceeded to work. Everything works fine, except that now after the
>> update the text that I kill on emacs doesn't go into windows
>> clipboard. I can paste on emacs text coming from other programs through
>> the clipboard, but the inverse is not possible.
>
> This is expected behavior: Emacs doesn't support clipboard operations
> in -nw sessions, neither on MS-Windows nor on other platforms.  To be
> sure, I just tested in v24.3 on MS-Windows, and I see there exactly
> the same results as you report for 24.5.  So I cannot understand why
> you say it was OK in v24.3.

Ok, I made the test on emacs 24.3 too, you are right it's the same. It looks
like I thought that this version was the one I had installed because
is the latest
previous version in the my "installs/emacs" directory. sorry! :P

>
>> When I start emacs normally (without "-nw") everything works fine, so at
>> first I thought that this was some kind of new configuration. Later I
>> decided to make some research and found where the problem was. Looking
>> at the value of the variable "interprogram-cut-function" in my system I
>> see that it's set to "x-select-text" and in my system this function is
>> defined at "common-win.el". In the body of "x-select-text" the first
>> "cond" function is like this "(cond ((eq (framep (selected-frame)) 'w32)
>> ..." and I think this is the cause for the kill function to be unable to
>> send the text to the clipboard when running with the "-nw" option,
>> because when emacs runs in this mode the call "(framep
>> (selected-frame))" returns "t" when it is waiting for a "w32"
>> value. When the same call is run on the emacs running whithout the "-nw"
>> option the expected "w32" value appears.
>
> That's correct.  And the same is true for Emacs 24.3.  Maybe you mean
> Emacs 23, where indeed the test for the GUI frame was absent.  But
> that was an omission, which is now fixed.

And why do we want to remove that thing that I say is a "feature" but it looks
like it was treated like a "bug".

>
> If you want to have access to the clipboard in -nw sessions, you can
> always override x-select-text with your own version that doesn't
> include that test.  Although I'm unsure why would you want to use
> text-mode sessions too much on MS-Windows; GUI sessions have, of
> course, full access to the clipboard.

Well, I use cygwin and my prefered editor is emacs, If I'm in cygwin's bash
I like to use emacs "command line style" and I besides I use the beutiful
"http://sourceforge.net/projects/console/" all the time to get a nice
background, that also looks nice on emacs. :P

I think that this feature/bug thing is working backwards. Isn't it desireble
to use X's clipboard on an xterm emacs session? so insted of taking the
functionality from the windows version, why don't we implement it on the
*nix version :D.

Anyway! thanks for the answers!





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#21196: 24.5; Paste from clipboard to emacs -nw on windows 8.1
       [not found]   ` <CAPQ4eMJDzvuTtcFsadUhL+567Bc2JOaFku5AUTNmnor7BijoaQ@mail.gmail.com>
  2015-08-06 23:06     ` bug#21196: Fwd: " Pablo Mercader Alcántara
@ 2015-08-07  6:34     ` Eli Zaretskii
  2015-08-07 13:01       ` Pablo Mercader Alcántara
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2015-08-07  6:34 UTC (permalink / raw)
  To: Pablo Mercader Alcántara; +Cc: 21196-done

> Date: Thu, 6 Aug 2015 19:03:01 -0400
> From: Pablo Mercader Alcántara <programingfrik@gmail.com>
> 
> > Maybe you mean Emacs 23, where indeed the test for the GUI frame
> > was absent.  But that was an omission, which is now fixed.
> 
> And why do we want to remove that thing that I say is a "feature" but it looks
> like it was treated like a "bug".

For consistency across platforms, I guess.

> I think that this feature/bug thing is working backwards. Isn't it desireble
> to use X's clipboard on an xterm emacs session? so insted of taking the
> functionality from the windows version, why don't we implement it on the
> *nix version :D.

It's not always possible to do on Unix what Emacs 23 and before did on
Windows.  On Unix you can build Emacs without any X support
whatsoever, something that is not supported on Windows.  In that case,
X functions are not available.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#21196: 24.5; Paste from clipboard to emacs -nw on windows 8.1
  2015-08-07  6:34     ` Eli Zaretskii
@ 2015-08-07 13:01       ` Pablo Mercader Alcántara
  2015-09-04 15:42         ` Pablo Mercader Alcántara
  0 siblings, 1 reply; 6+ messages in thread
From: Pablo Mercader Alcántara @ 2015-08-07 13:01 UTC (permalink / raw)
  To: 21196-done

Ok! I understand, the good part is that it can be customized.

Thank you any way!

2015-08-07 2:34 GMT-04:00 Eli Zaretskii <eliz@gnu.org>:
>> Date: Thu, 6 Aug 2015 19:03:01 -0400
>> From: Pablo Mercader Alcántara <programingfrik@gmail.com>
>>
>> > Maybe you mean Emacs 23, where indeed the test for the GUI frame
>> > was absent.  But that was an omission, which is now fixed.
>>
>> And why do we want to remove that thing that I say is a "feature" but it looks
>> like it was treated like a "bug".
>
> For consistency across platforms, I guess.
>
>> I think that this feature/bug thing is working backwards. Isn't it desireble
>> to use X's clipboard on an xterm emacs session? so insted of taking the
>> functionality from the windows version, why don't we implement it on the
>> *nix version :D.
>
> It's not always possible to do on Unix what Emacs 23 and before did on
> Windows.  On Unix you can build Emacs without any X support
> whatsoever, something that is not supported on Windows.  In that case,
> X functions are not available.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#21196: 24.5; Paste from clipboard to emacs -nw on windows 8.1
  2015-08-07 13:01       ` Pablo Mercader Alcántara
@ 2015-09-04 15:42         ` Pablo Mercader Alcántara
  0 siblings, 0 replies; 6+ messages in thread
From: Pablo Mercader Alcántara @ 2015-09-04 15:42 UTC (permalink / raw)
  To: 21196-done

This is closed and I understood perfectly, but still, if the purpose
is "consistency" why allow "paste from windows clipboard" but not
"copy to windows clipboard". Obviously this is not what I want, that
the "paste from" is disabled too, but I'm curious. Is there a reason?
:P

Thanks for your time!

2015-08-07 9:01 GMT-04:00 Pablo Mercader Alcántara <programingfrik@gmail.com>:
> Ok! I understand, the good part is that it can be customized.
>
> Thank you any way!
>
> 2015-08-07 2:34 GMT-04:00 Eli Zaretskii <eliz@gnu.org>:
>>> Date: Thu, 6 Aug 2015 19:03:01 -0400
>>> From: Pablo Mercader Alcántara <programingfrik@gmail.com>
>>>
>>> > Maybe you mean Emacs 23, where indeed the test for the GUI frame
>>> > was absent.  But that was an omission, which is now fixed.
>>>
>>> And why do we want to remove that thing that I say is a "feature" but it looks
>>> like it was treated like a "bug".
>>
>> For consistency across platforms, I guess.
>>
>>> I think that this feature/bug thing is working backwards. Isn't it desireble
>>> to use X's clipboard on an xterm emacs session? so insted of taking the
>>> functionality from the windows version, why don't we implement it on the
>>> *nix version :D.
>>
>> It's not always possible to do on Unix what Emacs 23 and before did on
>> Windows.  On Unix you can build Emacs without any X support
>> whatsoever, something that is not supported on Windows.  In that case,
>> X functions are not available.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-09-04 15:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-06  0:06 bug#21196: 24.5; Paste from clipboard to emacs -nw on windows 8.1 Pablo Mercader Alcántara
2015-08-06 14:31 ` Eli Zaretskii
     [not found]   ` <CAPQ4eMJDzvuTtcFsadUhL+567Bc2JOaFku5AUTNmnor7BijoaQ@mail.gmail.com>
2015-08-06 23:06     ` bug#21196: Fwd: " Pablo Mercader Alcántara
2015-08-07  6:34     ` Eli Zaretskii
2015-08-07 13:01       ` Pablo Mercader Alcántara
2015-09-04 15:42         ` Pablo Mercader Alcántara

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