From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id qMaWOz4U52WxYQEAqHPOHw:P1 (envelope-from ) for ; Tue, 05 Mar 2024 13:46:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id qMaWOz4U52WxYQEAqHPOHw (envelope-from ) for ; Tue, 05 Mar 2024 13:46:55 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=NppaPoFP; 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=1709642814; 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=Ts/xOf/CWfftSGMqN7UQyR4M4Xa2QXzygZrx15C0Ppg=; b=RglmYaWDLEP+/YoNB1q9u/B93TGC3JiUqYw9/HZ0yc5+nb2pXn0UFeNiagvCCz3XRZ12OM +y2YjyHbddBbb5NXjhyHZ1SbO1L5KOkOH29ynvB7bm78G6Z61HPwZJz5h/OfkDOqQeHLOn aSw7blqI+A1TUo7AmniZkxzCotsqEmy1Vo9ekPKm/dX6i+A98ZF2iOR8e5Y/6JleSpq11I iNVzA1IjreRMorfsTwCt8pgidZ04dJEkooK0QKch1Jf9hZtPKRFVTvRi10fSpBxiHbBwaJ ovb5/xqo1NSHq5id3Uw5lu92S8QUb/E+qNFmVAnW27R+qR4WxCJEpPXi+4S/qw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=NppaPoFP; 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-Seal: i=1; s=key1; d=yhetil.org; t=1709642814; a=rsa-sha256; cv=none; b=KMPEeSCnH1+bnErXIpblIeeQmfcCZdCrFz7WCqObvl2pgXZOwWM+XuhlzqPHIBaXiFcI7X rlYsLe6JZYI7dprjYJ7LSrnNx9rVHVWzXzO/EHmoQ03rTvvQLlEKYzAs4YJSul3Yf0BLKP TZ9eko4l/zHv/J83yCB9jEIKyxiL/oVi965T8hY4NSXOuCaENXkUbfcIOO2DpVdVSwOUEa KPYSV0aVqKFbnUghMXrgpZ4yVaJDTmif85y0d0eKzGwRsLD4bam4LmRoRnS62JkqBFhNcI WGzx6mxaTteV7LlrH7uFswGIg5aCutBKPCyX8Hr7dJXQrf9h+dFomLom2+QbIg== 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 BFAB66532F for ; Tue, 5 Mar 2024 13:46:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhUBU-0004sK-EK; Tue, 05 Mar 2024 07:46:17 -0500 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 1rhUBB-0004lY-Hy for emacs-orgmode@gnu.org; Tue, 05 Mar 2024 07:46:00 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhUAz-0000q3-Vj for emacs-orgmode@gnu.org; Tue, 05 Mar 2024 07:45:50 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 95615240103 for ; Tue, 5 Mar 2024 13:45:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1709642743; bh=4UlKiKJqiJH9DHMK0ihdtTL90wlLibrdNP45QfqKTn8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=NppaPoFPXbvMWNME7ECWtZoCANINS/0SJxCpAaChBEsJZQhfS8b0abuBLUN7qdJt2 PBGyDk3xO5ZeBGjx8Nf8SmdApRcZfdnz2+9Hfd4R1Sfm3co+rsEi62pp7Sv0t8nzSW LLKu/NK5iIadih6wjQ+DLKEEogdM5n81XW5pvi3zr2zjvLraZfllrrBjQYp44iLoxX WPuXmv0a+Rz2ASk364Koj98QbBkpH+rJF4bNELqWxLCCH1Ib7VlCzUq2Gt4PwhtcKe IvyB+i7RS0bbSsFROh1/zC/7tFlKvbFxClJwCVloQ+qlghyk7ZujHLXT9QWt61s8zC ndGqTXkEVzpOQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TpwK26mWFz6tvl; Tue, 5 Mar 2024 13:45:42 +0100 (CET) From: Ihor Radchenko To: Stefan Monnier Cc: emacs-orgmode@gnu.org Subject: Re: Provide sane default for the @direntry In-Reply-To: References: <87v868khb2.fsf@localhost> <871q8q1cfd.fsf@localhost> Date: Tue, 05 Mar 2024 12:49:48 +0000 Message-ID: <87o7bs4zdf.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.48 X-Spam-Score: -9.48 X-Migadu-Queue-Id: BFAB66532F X-TUID: mwcoDwJVO9X3 Stefan Monnier writes: > The "* DIRTITLE: (FILENAME)." syntax is Texinfo's syntax, and currently the > Org user needs to know that syntax and abide by it (even though it's > not well defined nor well documented, IME). My change mostly makes it > unnecessary for the user to know that syntax because ox-texinfo already > knows the FILENAME, so it only needs the DIRTITLE. If it is not well-documented, we may as well help users by explaining a bit in a footnote in the Org manual. > The new code supports the "* DIRTITLE: (FILENAME)." syntax mostly for > backward compatibility, tho it can also be useful in corner cases such > as when the final filename will be different than the one ox-texinfo > knows about. > > Not sure how to adjust the text to clarify that, without including > a discussion of the "* DIRTITLE: (FILENAME)." and how things used to be, > and how the filename is controlled. ... then we can also include this discussion in a footnote and put the new syntax into the main visible part of the manual. > The old(current) situation is arguably worse because it doesn't even > document the syntax that needs to be used. Agree. >>> - =TEXINFO_DIR_DESC= :: >>> >>> #+cindex: @samp{TEXINFO_DIR_DESC}, keyword >>> The directory description of the document. >>> + Defaults to the title of the document. >> >> I'd also add that it should be a short sentence. > > Not sure if it needs to be a sentence, but yes, it should usually be > short tho I don't think there's a technical need for it, so I think the > "defaults to the title" should be a good enough hint about the kind of > length expected. Also ok. I do not have a strong opinion here - referring to title is also clear enough for me; I am just not sure if it is clear enough for all the readers of the manual. >>> (:texinfo-dircat "TEXINFO_DIR_CATEGORY" nil nil t) >>> + ;; FIXME: The naming of these options is unsatisfactory: >>> + ;; TEXINFO_DIR_DESC corresponds (and defaults) to the document's >>> + ;; title, whereas TEXINFO_DIR_TITLE corresponds (and defaults) to >>> + ;; its filename. >> What about TEXINFO_DIR_NAME + TECINFO_DIR_DESC? > > Fine by me, yes. I can add it after we finalize your patch. Or you can do it as a part of the patch, if you are willing to. (Just make sure that old keyword name is supported for backwards-compatibility) >>> + (dirtitle >>> + (cond >>> + ((and dt >>> + (or (string-match "\\`\\* \\(.*?\\)\\(\\.\\)?\\'" dt) >>> + (string-match "\\`\\(.*(.*)\\)\\(\\.\\)?\\'" dt))) >>> + ;; `dt' is already "complete". >>> + (format "* %s." (match-string 1 dt))) >>> + ((and dt (not (equal dt file))) >>> + (format "* %s: (%s)." dt file)) >> >> It would be nice to add a comment saying that dt values like >> "Foo (filename)" are already captured by the previous cond clause. > > I don't understand what you mean by that. I had a hard time understanding why the second clause of `cond' never matches things like "Foo (filename)" - the test (equal dt file) looks suspicious from the first glance; until I spend some time parsing the above regexps. So, I am asking you to add code comment explaining why (equal dt file) is sufficient. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at