emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: mark parent of current heading
Date: Thu, 13 Mar 2014 13:58:07 -0400	[thread overview]
Message-ID: <CAN_Dec8mtDcaD-V7V=WUF2rMiPeypNbAt3MJe0PpZEx6HrEghw@mail.gmail.com> (raw)
In-Reply-To: <87ha73srq1.fsf@gmail.com>

On Wed, Mar 12, 2014 at 5:15 AM, Thorsten Jolitz <tjolitz@gmail.com> wrote:
> Matt Price <moptop99@gmail.com> writes:
>
>> is it possible to mark, not the current subtree, but one level up from
>> the current subtree?  I would like to add that level to the org
>> bindings for expand-region,
>>
>> https://github.com/magnars/expand-region.el/blob/master/the-org-mode-expansions.el
>
> you are probably looking for something more sophisticated, but this
> (untested) snippet should do the job when you are on a subheadline:
>
> #+begin_src emacs-lisp
>   (save-excursion
>     (org-up-element)
>     (org-mark-subtree)))
> #+end_src
>

Thanks Thorsten,

This is in fact almost exactly what I was looking for, but it seems
expand-region needs something rather more sophisticated, I'll get back
to the list when I have it figured out.  Thank you!

Matt

  reply	other threads:[~2014-03-13 17:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12  4:13 mark parent of current heading Matt Price
2014-03-12  9:15 ` Thorsten Jolitz
2014-03-13 17:58   ` Matt Price [this message]
2014-03-12 15:19 ` Bastien

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='CAN_Dec8mtDcaD-V7V=WUF2rMiPeypNbAt3MJe0PpZEx6HrEghw@mail.gmail.com' \
    --to=moptop99@gmail.com \
    --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).