emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: copy-rectangle-to-register problem with org-indent [9.3.5 (9.3.5-elpa @ ~/.emacs.d/elpa/org-20200212/)]
@ 2020-02-12 17:48 Hannu Koivisto
  2020-02-13  1:05 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Hannu Koivisto @ 2020-02-12 17:48 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Summary: if org-indent-mode is enabled, copy-rectangle-to-register seems 
to copy "indentation" in addition to the actual rectangle, even if the 
rectangle is not in the beginning or end of any line.

Steps to reproduce:
- Using the Emacs and Org mode versions listed at the end, start Emacs 
with "emacs -q"
- M-x package-initialize RET so that Org fetched using the package 
system is used instead of the bundled one
- Create test.org with the following content:

* test
** test2
foo !2.11. foo
bar 23.11. foo
baz 24.11. foo
jep 25.11! foo

- Enable org-indent-mode
- Select a region starting from the first ! and ending to the second !
- C-x r r i
- Switch to *scratch* buffer
- C-x r i i

Expected result:

!2.11.
23.11.
24.11.
25.11!

Actual result:

     !2.11.
     23.11.
     24.11.
     25.11!

...where indentation happens due to text properties (you cannot move 
point to column 0, for example -- I'm using manually inserted spaces in 
this email).  If I select the inserted lines, starting from the line 
above it, and execute M-x facemenu-remove-all RET, the inserted lines 
move to column 0.

Emacs  : GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21)
  of 2017-09-22, modified by Debian
Package: Org mode version 9.3.5 (9.3.5-elpa @ 
/home/hannuko/.emacs.d/elpa/org-20200212/)

-- 
Hannu

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

* Re: Bug: copy-rectangle-to-register problem with org-indent [9.3.5 (9.3.5-elpa @ ~/.emacs.d/elpa/org-20200212/)]
  2020-02-12 17:48 Bug: copy-rectangle-to-register problem with org-indent [9.3.5 (9.3.5-elpa @ ~/.emacs.d/elpa/org-20200212/)] Hannu Koivisto
@ 2020-02-13  1:05 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2020-02-13  1:05 UTC (permalink / raw)
  To: Hannu Koivisto; +Cc: emacs-orgmode

Hi Hannu,

Hannu Koivisto <azuhoo@gmail.com> writes:

> Summary: if org-indent-mode is enabled, copy-rectangle-to-register
> seems to copy "indentation" in addition to the actual rectangle, even
> if the rectangle is not in the beginning or end of any line.

Well, this is a real problem, but I have no idea how to prevent this
behavior.  I'd be interested if someone finds a solution.

We could also ask on emacs-devel@ whether `copy-rectangle-to-register'
(and friends) should not take care of stripping wrap/line-prefix props
from the copied text.

-- 
 Bastien

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

end of thread, other threads:[~2020-02-13  1:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 17:48 Bug: copy-rectangle-to-register problem with org-indent [9.3.5 (9.3.5-elpa @ ~/.emacs.d/elpa/org-20200212/)] Hannu Koivisto
2020-02-13  1:05 ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).