From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [RFC, mini] org-mark-element-parent Date: Tue, 30 May 2017 09:01:33 +0200 Message-ID: <87tw426d6a.fsf@nicolasgoaziou.fr> References: <84r2z746ai.fsf@tm6592> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFb9z-0001Sb-04 for emacs-orgmode@gnu.org; Tue, 30 May 2017 03:01:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFb9u-0006wr-ID for emacs-orgmode@gnu.org; Tue, 30 May 2017 03:01:39 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:59979) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dFb9u-0006vL-CG for emacs-orgmode@gnu.org; Tue, 30 May 2017 03:01:38 -0400 In-Reply-To: <84r2z746ai.fsf@tm6592> (Marco Wahl's message of "Tue, 30 May 2017 01:00:53 +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: Marco Wahl Cc: emacs-orgmode@gnu.org Hello, Marco Wahl 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). IMO, this is not only marginally useful. Also, it doesn't handle headlines. Regards, -- Nicolas Goaziou