From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id EFaxOEM4KGX8VgAAauVa8A:P1 (envelope-from ) for ; Thu, 12 Oct 2023 20:17:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EFaxOEM4KGX8VgAAauVa8A (envelope-from ) for ; Thu, 12 Oct 2023 20:17:40 +0200 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 0D28857498 for ; Thu, 12 Oct 2023 20:17:39 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ByUHTwID; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697134659; 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:dkim-signature; bh=NuisaqAqGvADurUxNdZG+478issDNpnBbwPgNIyAAME=; b=q3mXMAT4kCHSkEORWKlJc1hvplTcZu7z5YWYEztfsZc0c3d8HbmSyn5AjL+QUq9sLNJxa5 tMUKJOj5ap9mmyQc+lb12RbixG9yZQSHgOBKtEtN/U/gxdqHyISIKLJyI/Wpyg1SNoJ990 bEGnEr0LYrNRTixEwTjgseRTFExKv51TDGODC4dYdbsa9LMZwJXOtCqv1TrLEgAsCxkffH NZQ7rUDde7RIeGtmnu8T1zXG5bohy+XrhqMwx351tpfPIhzraDQRaDoXbuNaNk/MqOSqjs G2imkB7PoKw8YExEzLIE8wOubRgUIDlAHZSLUnZVk2tNGIuQcJugAFM/BjG4qg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697134659; a=rsa-sha256; cv=none; b=oJ0Ym/lfEu8sbCqC6X82qbLKB78qnjOKFTnMkWGhPtuk1s4LDaBaTvYbgcPWV2yUPp0D7a Da/oewM1Jk5AQKi70xVlBh3gEyi4EvCORXWEKesmnSfei8f52g/uiRdQNJy2vJGGlF5ANX LI0QhyR1UXFGTfWTYJnPcjhHjUnl2q0jO6IeeovQIYlAZGGWum0l4JaRQt/qdJ5oMKRQcq 0LiwPgKawPuhmsiVBgGfVQiT40bpBccTvbEEr1MIJurtCYOfLwPHBT6w3PrAai5b9EGzkY bNZOXo1FtshYdNkBfZf1Y8dIKgThtFmpIs7uWsQ79orOvS3divNIxRqkMwEuDA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ByUHTwID; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qr0Ej-0003oW-AT; Thu, 12 Oct 2023 14:16:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qr0Ed-0003oA-W0 for emacs-orgmode@gnu.org; Thu, 12 Oct 2023 14:16:36 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qr0Ea-00048d-VH for emacs-orgmode@gnu.org; Thu, 12 Oct 2023 14:16:34 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 641D0240027 for ; Thu, 12 Oct 2023 20:16:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1697134590; bh=DuLbtHTnps4Rq9Z5VmlfwqhVylla0WpVgupJ2xmZEQc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=ByUHTwIDvuMRjakcvkWcW/Wv94ypmNERH6Y/jTJFdkG5KMIBP3WxYcnCcWIxr7zBY AoPfHjrfWBmITCV9danSfCF1v0QJ+VezFeGg+c+uZEBQeZ3am0QxK9nlaZ41v0fj+d mrI9F8yMLJBaXFj/0w3GMrA05BQCNJdZGm6xBnlLAeNwpm95XHS+te2hjGm8WD1Mhy d7XfQ1KpqWPcriu+T4ZDaHz7GxXpeyfyETG1f6gOW0XR/DH8gu15lQKYnfOKk1MInr yAlaVHPvpP5osyzqsD2tC6aQEzOTBJMQExUyTCQsSZYwpNuCOP9d0pB0l7DZ5wX93u 3N4ZQm2yd0M2A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S5yWd2R17z9rxN; Thu, 12 Oct 2023 20:16:29 +0200 (CEST) From: Ihor Radchenko To: Tom Alexander Cc: emacs-orgmode@gnu.org Subject: Re: Keyword becoming a paragraph based on optval In-Reply-To: <36bb93d2-53cc-48f5-ac15-2ea1c0516328@app.fastmail.com> References: <36bb93d2-53cc-48f5-ac15-2ea1c0516328@app.fastmail.com> Date: Thu, 12 Oct 2023 18:18:11 +0000 Message-ID: <875y3bd7rw.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -6.39 X-Migadu-Queue-Id: 0D28857498 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -6.39 X-TUID: nIFVPZS71uFu "Tom Alexander" writes: > Emacs version: 29.1 > Org-mode version: f3de4c3e041e0ea825b5b512dc0db37c78b7909e (latest in git) > > This test document parses as a keyword: > ``` > #+CAPTION[*foo*]: baz > ``` > > but this test document parses as a paragraph: > ``` > #+CAPTION[*foo* bar]: baz > ``` Expected. In the first case, KEY = CAPTION[*foo*] and VALUE = baz In the second case, keyword does not match, because KEY cannot have spaces. https://orgmode.org/worg/org-syntax.html#Keywords Note that _affiliated keyword_ has an optional form of #+KEY[OPTVAL]: VALUE where OPTVAL can have spaces. But isolated #+CAPTION cannot be an affiliated keyword, which is why you see what you see. Whether we should allow OPTVAL in ordinary keywords has been discussed , and we might do it to simplify things at some point. But the rules are like the above for now. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at