From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MFXJELjkx16JHwAA0tVLHw (envelope-from ) for ; Fri, 22 May 2020 14:42:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +KzGDLjkx15TBQAA1q6Kng (envelope-from ) for ; Fri, 22 May 2020 14:42:00 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7213E940980 for ; Fri, 22 May 2020 14:41:58 +0000 (UTC) Received: from localhost ([::1]:58852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jc8s1-0001U3-Fw for larch@yhetil.org; Fri, 22 May 2020 10:41:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jc8rT-00012C-AU for emacs-orgmode@gnu.org; Fri, 22 May 2020 10:41:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49530) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jc8rS-0003YU-NH; Fri, 22 May 2020 10:41:22 -0400 Received: from lns-bzn-32-82-254-31-120.adsl.proxad.net ([82.254.31.120]:35038 helo=guerry) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jc8rQ-00078x-06; Fri, 22 May 2020 10:41:21 -0400 Received: by guerry (Postfix, from userid 1000) id DBB751A603E5; Fri, 22 May 2020 16:41:17 +0200 (CEST) From: Bastien To: John Kitchin Subject: Re: get the body of a heading up to the next subheading Organization: GNU References: <87ftc5agb1.fsf@localhost> <87o8qraoj8.fsf@localhost> Date: Fri, 22 May 2020 16:41:17 +0200 In-Reply-To: (John Kitchin's message of "Wed, 13 May 2020 10:49:41 -0400") Message-ID: <877dx4av76.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: org-mode-email , Ihor Radchenko Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: 1Tz6KlQ9D1d/ Hi John, John Kitchin writes: > Here is a new version that might fail some other way! > > (defun canvas-org-get-heading-body () > =C2=A0 "Return the body of the current heading up to the next heading." > =C2=A0 (interactive) > =C2=A0 (save-excursion > =C2=A0 =C2=A0 (unless (org-at-heading-p) > =C2=A0 =C2=A0 =C2=A0 (org-previous-visible-heading 1)) > =C2=A0 =C2=A0 (org-end-of-meta-data) > =C2=A0 =C2=A0 (buffer-substring (point) > =C2=A0 =C2=A0 =C2=A0(progn (org-next-visible-heading 1) (point))))) Maybe this is useful enough to end up in https://orgmode.org/worg/org-hacks.html ? We obviously need to make this page more readable and useful, but new contents is always welcome. Thanks, --=20 Bastien