emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marco Wahl <marcowahlsoft@gmail.com>
To: emacs-orgmode@gnu.org
Cc: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: [RFC, mini] org-mark-element-parent
Date: Tue, 30 May 2017 09:51:34 +0200	[thread overview]
Message-ID: <84bmqaok8p.fsf@tm6592> (raw)
In-Reply-To: 87tw426d6a.fsf@nicolasgoaziou.fr

Hi!

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> is the following function worthy to occupy space in Orgmode?
>>
>> #v+
>> (defun org-mark-element-parent ()
>>   "Put point at beginning of the parent element, mark at end."
>>   (interactive)
>>   (let ((parent (org-element-property :parent (org-element-at-point))))
>>     (when parent
>>       (push-mark (org-element-property :end parent) t t)
>>       (goto-char (org-element-property :begin parent)))))
>> #v-
>>
>> Can be used to e.g.
>> - mark a table or
>> - a plain list
>
> There is already a binding to move to the beginning of the parent
> element (C-c C-^, IIRC).

Nice!

How could I overlook `org-up-element'?  `org-up-element' together with
org-mark-element (M-h) is my key combination of the day!

> IMO, this is not only marginally useful. Also, it doesn't handle
> headlines.

Let's commit that little RFC to the stream of oblivion.


Thanks!

      reply	other threads:[~2017-05-30  7:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-29 23:00 [RFC, mini] org-mark-element-parent Marco Wahl
2017-05-30  7:01 ` Nicolas Goaziou
2017-05-30  7:51   ` Marco Wahl [this message]

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=84bmqaok8p.fsf@tm6592 \
    --to=marcowahlsoft@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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).