From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Wahl Subject: Re: [RFC, mini] org-mark-element-parent Date: Tue, 30 May 2017 09:51:34 +0200 Message-ID: <84bmqaok8p.fsf@tm6592> References: <84r2z746ai.fsf@tm6592> <87tw426d6a.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFbwV-0003oD-JZ for emacs-orgmode@gnu.org; Tue, 30 May 2017 03:51:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFbwR-00089s-MJ for emacs-orgmode@gnu.org; Tue, 30 May 2017 03:51:51 -0400 Received: from [195.159.176.226] (port=56508 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFbwR-00089h-Ez for emacs-orgmode@gnu.org; Tue, 30 May 2017 03:51:47 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dFbwJ-0005H2-6u for emacs-orgmode@gnu.org; Tue, 30 May 2017 09:51:39 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Cc: Nicolas Goaziou Hi! Nicolas Goaziou 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!