emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Samuel Wales" <samologist@gmail.com>
To: Carsten Dominik <dominik@science.uva.nl>
Cc: emacs-orgmode@gnu.org
Subject: Re: feature request: org-yank to call org-paste-subtree
Date: Sun, 26 Oct 2008 01:35:48 -0700	[thread overview]
Message-ID: <20524da70810260135v1adc1022le89e4ba6d9eeab6a@mail.gmail.com> (raw)
In-Reply-To: <973CD8B2-1E07-457E-BA70-16F3EAFE892C@uva.nl>

I find that org-paste-subtree works perfectly all the time for
headlines, and that org-yank does not work for headlines any time the
levels are wrong.  But I just started using them.

Approximate and prob wrong:

(defun org-yank-possibly-adjusted ()
  (save-excursion
    (if (and org-yank-adjust (org-kill-is-subtree-p))
        (call-interactively 'org-paste-subtree)
      (call-interactively 'yank))))
(defun org-yank ()
  "Yank, and if the yanked text is a single subtree, fold it.
In fact, if the yanked text is a sequence of subtrees, fold all of them."
  (interactive)
  (if org-yank-folded-subtrees
      (let ((beg (point)) end)
        (org-yank-possibly-adjusted)
...

  reply	other threads:[~2008-10-26  8:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-26  4:37 feature request: org-yank to call org-paste-subtree Samuel Wales
2008-10-26  6:30 ` Carsten Dominik
2008-10-26  8:35   ` Samuel Wales [this message]
2008-10-28  8:10 ` Carsten Dominik
2008-10-28  8:16   ` Carsten Dominik
2008-10-28  8:32     ` Manish
2008-10-28  8:53       ` Carsten Dominik
2008-11-01  0:23   ` Samuel Wales
2008-11-13 22:32     ` Samuel Wales
2008-11-13 22:32       ` Samuel Wales
2008-11-14  6:50       ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20524da70810260135v1adc1022le89e4ba6d9eeab6a@mail.gmail.com \
    --to=samologist@gmail.com \
    --cc=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).