all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-copy-visible does not work with x-select-enable-primary
@ 2018-09-10 12:15 Alain.Cochard
  2018-09-10 14:49 ` Eli Zaretskii
  2018-09-10 17:00 ` Stefan Monnier
  0 siblings, 2 replies; 9+ messages in thread
From: Alain.Cochard @ 2018-09-10 12:15 UTC (permalink / raw)
  To: emacs-devel; +Cc: Alain Cochard


Hello.  I already sent an email about this issue to
emacs-orgmode@gnu.org.  Nicolas Goaziou, one of the Org mode
developers, suggested to report to Emacs Devel instead because "Since
it works in some cases, it may not be related to Org."

The issue is also present with the development version of Org, but,
below, I assume no access to this development version and no knowledge
of Org.  I only assume an Emacs version with org-mode included (if I
understand well, any Emacs version >= 24.5.1 should do).

So here it is:

Using 'emacs -Q', visit or create a file with the '.org' extension
(say 'bug.org') with the following 2 lines:

* foo
bar

(As I am not fully sure this will be transmitted correctly, let me
specify: the 1st line is '* foo', the 2nd line is 'bar'; there is no
indentation.)

With the cursor on the star, hitting repetitively the <TAB> key should
cycle between a state for which one sees all the content of the file,
and the so-called folded state where one only sees the line:

* foo...

Now, selecting the single line above, e.g., with the mouse, hitting
'C-c C-x v' (M-x org-copy-visible), then 'C-y' (M-x org-yank), should
yank '* foo'.

This is the normal behavior.  As far as I understand, there is no
reason this behavior should be affected by the variable
'x-select-enable-primary', but it it, at least for me.  A possible
test is to repeat the same experiment using 'emacs -Q -l .emacs.debug'
(instead of 'emacs -Q'), where the '.emacs.debug' file contains only
the line:

(setq x-select-enable-primary t)

In that case, for me, 'C-y' yanks both lines, instead of only
'foo...'. 

I have tried with the following 2 versions of Emacs+Org (plus, as I
said, with the development version of Org instead of the bundled
ones):

Emacs : GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version
3.18.9) of 2016-04-11 on buildvm-25.phx2.fedoraproject.org Package:
Org-mode version 8.2.10 (release_8.2.10 @
/usr/share/emacs/24.5/lisp/org/)

Emacs : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.18.9) of 2018-05-30 Package: Org mode version 9.1.9
(release_9.1.9-65-g5e4542 @
/home/cochard/usr/local/emacs-26.1/lisp/org/)

Regards

-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France    | Fax:   +33 (0)3 68 85 01 25     



^ permalink raw reply	[flat|nested] 9+ messages in thread
* org-copy-visible does not work with x-select-enable-primary
@ 2018-09-02 13:37 Alain.Cochard
  2018-09-02 19:25 ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Alain.Cochard @ 2018-09-02 13:37 UTC (permalink / raw)
  To: emacs-orgmode


Hello.


I use

   emacs -Q -l ~/.emacs.debug

with the ~/.emacs.debug file containing only

   (add-to-list 'load-path "/home/cochard/Org/Coch-git/org-mode/lisp")

I tried 2 versions of emacs, giving:

   Emacs : GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version
   3.18.9) of 2016-04-11 on buildvm-25.phx2.fedoraproject.org Package:
   Org mode version 9.1.14 (release_9.1.14-908-gf1269e @
   /home/cochard/Org/Coch-git/org-mode/lisp/)

   Emacs : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
   3.18.9) of 2018-05-30 Package: Org mode version 9.1.14
   (release_9.1.14-908-gf1269e @
   /home/cochard/Org/Coch-git/org-mode/lisp/)

In both cases, org-copy-visible works as I expect: if I select region
containing a folded tree, use 'M-x org-copy-visible', then put the
cursor elsewhere and use 'M-x org-yank', only the visible part is
copied.

Now, if I append the line

   (setq x-select-enable-primary t) 

to ~/.emacs.debug, the whole tree is copied instead of the expected
result, that is, including the invisible parts, also for the two emacs
versions.

NB: For emacs 26, as the manual says that 

   [x-select-enable-primary] is an alias for ‘select-enable-primary’.
   This variable is obsolete since 25.1; use ‘select-enable-primary’
   instead.

I have also tried (setq select-enable-primary t) but this fails in the
same way.

Regards


-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France    | Fax:   +33 (0)3 68 85 01 25     

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

end of thread, other threads:[~2018-09-11 10:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-10 12:15 org-copy-visible does not work with x-select-enable-primary Alain.Cochard
2018-09-10 14:49 ` Eli Zaretskii
2018-09-10 15:20   ` Alain.Cochard
2018-09-10 17:27     ` Eli Zaretskii
2018-09-10 17:00 ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2018-09-02 13:37 Alain.Cochard
2018-09-02 19:25 ` Nicolas Goaziou
2018-09-11  7:05   ` Alain.Cochard
2018-09-11 10:07     ` Nicolas Goaziou

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.