emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* yanking a headline in folded state
@ 2013-04-02  2:56 42 147
  2013-04-02 19:18 ` Rasmus
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: 42 147 @ 2013-04-02  2:56 UTC (permalink / raw)
  To: emacs-orgmode


Hello mailing list,

A source of slight irritation is killing a whole headline with C-k
(usually to move it to another buffer), and seeing it unfold every
single sub-headline after I yank it to its new position. This causes
tremendous chaos sometimes, especially if there are a number of nested
sub-headlines, and the killed headline itself needs to be adjusted to a
deeper / shallower level (depending on where I inserted it).

So in fewer words: how do I yank a headline in its folded state?

Much thanks,

42

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

* Re: yanking a headline in folded state
  2013-04-02  2:56 yanking a headline in folded state 42 147
@ 2013-04-02 19:18 ` Rasmus
  2013-04-03  9:31 ` Bastien
  2013-04-03 18:11 ` Samuel Wales
  2 siblings, 0 replies; 6+ messages in thread
From: Rasmus @ 2013-04-02 19:18 UTC (permalink / raw)
  To: emacs-orgmode

42 147 <aeuster@gmail.com> writes:

> Hello mailing list,
>
> A source of slight irritation is killing a whole headline with C-k
> (usually to move it to another buffer), and seeing it unfold every
> single sub-headline after I yank it to its new position. This causes
> tremendous chaos sometimes, especially if there are a number of nested
> sub-headlines, and the killed headline itself needs to be adjusted to a
> deeper / shallower level (depending on where I inserted it).
>
> So in fewer words: how do I yank a headline in its folded state?

In my Emacs I have the following.  Would that work?

"C-c C-x C-w runs the command org-cut-special, which is an interactive
compiled Lisp function in `org.el'.

It is bound to C-c C-x C-w, <menu-bar> <Org> <Edit Structure> <Cut
Subtree>, <menu-bar> <Tbl> <Rectangle> <Cut Rectangle>.

(org-cut-special)

Cut region in table or cut current subtree.
Calls `org-table-copy' or `org-cut-subtree', depending on context.
See the individual commands for more information."


-- 
The Kids call him Billy the Saint

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

* Re: yanking a headline in folded state
@ 2013-04-02 22:08 42 147
  2013-04-03 10:33 ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: 42 147 @ 2013-04-02 22:08 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 737 bytes --]

> In my Emacs I have the following.  Would that work?

> "C-c C-x C-w runs the command org-cut-special, which is an interactive
> compiled Lisp function in `org.el'.

I incidentally figured out the problem: I had rebound yank to "C-.", and
did not realize that org-yank was bound to the original yank shortcut
(C-y).

Therefore, I was yanking the org text rather than org-yanking it.
org-cut-special turns out not to be necessary, although I appreciate the
suggestion; and in fiddling around with it, I found the solution to my
problem.

Lesson learned: I should always take a second look at potential org-mode
parallels to the standard Emacs commands. Until now, I had assumed that
"yank" in org-mode was identical to "yank" generally.

[-- Attachment #2: Type: text/html, Size: 863 bytes --]

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

* Re: yanking a headline in folded state
  2013-04-02  2:56 yanking a headline in folded state 42 147
  2013-04-02 19:18 ` Rasmus
@ 2013-04-03  9:31 ` Bastien
  2013-04-03 18:11 ` Samuel Wales
  2 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2013-04-03  9:31 UTC (permalink / raw)
  To: 42 147; +Cc: emacs-orgmode

Hi 42,

42 147 <aeuster@gmail.com> writes:

> So in fewer words: how do I yank a headline in its folded state?

In Emacs 24.3, there is `yank-excluded-properties' and
`yank-handled-properties' which allow you to select what
properties are excluded/handled by a yank.

HTH,

-- 
 Bastien

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

* Re: yanking a headline in folded state
  2013-04-02 22:08 42 147
@ 2013-04-03 10:33 ` Bastien
  0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2013-04-03 10:33 UTC (permalink / raw)
  To: 42 147; +Cc: Org Mode

42 147 <aeuster@gmail.com> writes:

> Therefore, I was yanking the org text rather than org-yanking it.
> org-cut-special turns out not to be necessary, although I appreciate the
> suggestion; and in fiddling around with it, I found the solution to my
> problem.

There is also this variable: `org-yank-folded-subtrees' of potential
interest for the readers of this thread.

Best,

-- 
 Bastien

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

* Re: yanking a headline in folded state
  2013-04-02  2:56 yanking a headline in folded state 42 147
  2013-04-02 19:18 ` Rasmus
  2013-04-03  9:31 ` Bastien
@ 2013-04-03 18:11 ` Samuel Wales
  2 siblings, 0 replies; 6+ messages in thread
From: Samuel Wales @ 2013-04-03 18:11 UTC (permalink / raw)
  To: 42 147; +Cc: emacs-orgmode

Have you tried org-yank-adjusted-subtrees?

Samuel

On 4/1/13, 42 147 <aeuster@gmail.com> wrote:
> sub-headlines, and the killed headline itself needs to be adjusted to a
> deeper / shallower level (depending on where I inserted it).

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is NO hope without action.  This means YOU.

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

end of thread, other threads:[~2013-04-03 18:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-02  2:56 yanking a headline in folded state 42 147
2013-04-02 19:18 ` Rasmus
2013-04-03  9:31 ` Bastien
2013-04-03 18:11 ` Samuel Wales
  -- strict thread matches above, loose matches on Subject: below --
2013-04-02 22:08 42 147
2013-04-03 10:33 ` 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).