From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kA5pJUbyhmD3fgEAgWs5BA (envelope-from ) for ; Mon, 26 Apr 2021 19:03:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id OE31IEbyhmAPHgAAbx9fmQ (envelope-from ) for ; Mon, 26 Apr 2021 17:03:02 +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 14A6811351 for ; Mon, 26 Apr 2021 19:03:02 +0200 (CEST) Received: from localhost ([::1]:47130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lb4dQ-00038N-Nf for larch@yhetil.org; Mon, 26 Apr 2021 13:03:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lb4c8-000382-Lp for emacs-orgmode@gnu.org; Mon, 26 Apr 2021 13:01:40 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:55297) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lb4c5-0004Cd-Fy for emacs-orgmode@gnu.org; Mon, 26 Apr 2021 13:01:40 -0400 X-Originating-IP: 185.131.40.67 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 8573C20002; Mon, 26 Apr 2021 17:01:31 +0000 (UTC) From: Nicolas Goaziou To: Timothy Subject: Re: [PATCH] Have C-c C-c recognise #+plot lines References: <87ft0jzbq0.fsf@ucl.ac.uk> <87tunt580v.fsf@gmail.com> Mail-Followup-To: Timothy , emacs-orgmode@gnu.org Date: Mon, 26 Apr 2021 19:01:30 +0200 In-Reply-To: <87tunt580v.fsf@gmail.com> (Timothy's message of "Tue, 27 Apr 2021 00:24:00 +0800") Message-ID: <87wnspvv2t.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.200; envelope-from=mail@nicolasgoaziou.fr; helo=relay7-d.mail.gandi.net X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, GAPPY_SUBJECT=0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619456582; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=+2oGOG+ZGDqdwIjhFON9XHS2eXHNQNzCySwZorMSqfw=; b=ri9fGO45FaKygPnHNatmeGEV31a9SEZownXSTtBaecxxSocFKsu6vW1qD76d3EELskuVZX Zf50qJuwSAE33KFMk0xGVGo9nCCXsMtu9b+HtKRldfdUcIdppn+rZXjnOMgKgTFyHuitAB zs33ky1iwXLALbkDA6QM7l3e+iHwvPciyMS0edGTYBRyc36xJDIbCC9QOEdY6aP0mqwu+8 DwsfPQCKAOxuvl8MxKZv4lB+q7yPp+RjIlBlm7cqb9Q/l+3epA37d+50H2bnrpAHUqnkDg FDsQIpf+6roriP0wkn43Zr9VWQN1GqTtEJjrxpZx+WTvHJzaS4+cWYbuOxVwaw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619456582; a=rsa-sha256; cv=none; b=NCGgIt97nAVcpmo1CeCXo5vB1lzg+jXPSaEzLuHfvN+HPAoG9jmMk+/rT3WPunnSbajNH1 FrUmhy1gGfyvqvBn6RTLoirMBzJvF4yD3HidgCGZTdj/cTSedypiXiN30QT70IaGZH/kQr 7jKhKfhP/6vByZ0+CCp6c32aNnIYufpU1oNXHEOkgquQ5Ll3OoBT8/w0RhVcvvVh+svSdu hO9UQ471rpgxeiV+WxjgSoRu7kWmxbOgm2Jw+DkOmjmcKAB1FRtCaRwYx+73VuUqzRo/na 60UP6MOH/dSiPzP+t3lbZapgOp2lC0NYtKi52u9Cmlgt85uyHH/K5oyUcXiWxA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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-Migadu-Spam-Score: -2.45 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-Migadu-Queue-Id: 14A6811351 X-Spam-Score: -2.45 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4NKb5JTLDvUr Hello, Timothy writes: > + (cond > + ((string-match-p "#\\+plot" (thing-at-point 'line t)) The whole `org-ctrl-c-ctrl-c' function relies on the parser. It would be nice to use it for this case too. Here a more accurate check would be: (and (< (point) (org-element-property :post-affiliated context)) (org-match-line (rx (zero-or-more (any " " "\t")) "#+plot:"))) Regards, -- Nicolas Goaziou