From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8LN5BWYkl2OmDQEAbAwnHQ (envelope-from ) for ; Mon, 12 Dec 2022 13:53:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cI11BWYkl2MHSgAA9RJhRA (envelope-from ) for ; Mon, 12 Dec 2022 13:53:58 +0100 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 CD9E0E49A for ; Mon, 12 Dec 2022 13:53:57 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4iJ0-0004gO-CZ; Mon, 12 Dec 2022 07:53:14 -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 1p4iIt-0004ev-G7 for emacs-orgmode@gnu.org; Mon, 12 Dec 2022 07:53:12 -0500 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 1p4iIq-0006iF-LY for emacs-orgmode@gnu.org; Mon, 12 Dec 2022 07:53:06 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 6CC03240027 for ; Mon, 12 Dec 2022 13:53:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1670849582; bh=iCntxWfpfdZdmEZJvX6rgn2LBbpVZYvP9wt41jRMYDY=; h=From:To:Cc:Subject:Date:From; b=O7eRqQDmx48JS2gzh16PVWi8G2KH6sUzjN/MUkFkX2PqLw7Zw62miW86e5l7ZUSLD Hd+ibOECx2/LHATJ6C/7KjqVQ5L+w/R8ycxWeJIBgjrts2nb4kr/iJ1i86Du2cIa7z 8J2dJctr50LMI4NZ1lvrftpqME2a1pVozqoBycXwliiBdbNUJYUNPIDIaU27TqsoLi EuYfwWbyoxZ+chzffIF6SFNanTcn1qa8Xpaw5p3oV728eyJpeGaVNSQe0ne/KNBVpe qA2wy1ZnpK2FE1hGLBA9rVWgI0SGeL43uVLgvffCfbqTF+HVH5kw2fZf8acLH1DIJY pRwZde2Cg7q9A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NW1kj59B7z6tmV; Mon, 12 Dec 2022 13:53:01 +0100 (CET) From: Ihor Radchenko To: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Make broken link markers customizable In-Reply-To: References: Date: Mon, 12 Dec 2022 12:52:56 +0000 Message-ID: <877cywhjh3.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670849637; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=M8djiIapalo1IoBpyghHkMbySNdu9xfiEx1UfQ1DoQY=; b=eXhdtxpTbHDietGov4l1kjTexGVz+Fp1lqjTjVQsRBNKWR10IjA/cdASFnJgRsgpD9QGQF 1RPrFruEtHRBwzbq5pMFF07JzaNcR5POhgVaOxkBo5tzBFl6MeITStp8eLyi22vFO+1ecw xZRFi9jJxOOUkbh3GxiDTzTl4TcjKM6ktX5crvBIwTWC8QBWC4r7KWwAVrT6mUAtcwrnt+ +pqYVfwtc8fI9JKp+Eio1HcRbDjUr/R3R6uxJeA7sLI/ScXhTQptGyUqe0qcPUfAJGOtn4 aJz6qnv9NqrDCecmIYvOmIl/ZtcTwot0wGdubfT8ZjsZKVdHIDea/52hbcGAWg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=O7eRqQDm; 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=1670849637; a=rsa-sha256; cv=none; b=XJkmJHupWoxjiOrDXZ8PE7YC9uW2T6xVqPmTsRLdQmkdsU6ho300YjXJi9+loAQQEINK+7 lSYR6B8gM3GbwbOIAzacl4EeZKBZ7tjW3n62AqyO62bmfojiAHokWCCE6cjjK6b/nvl/Ob KIbXZNTs8NkEEAwX+flPYHWDSUVdOKWuckN8Ko7xzeFNamqERoWq3aMALMetxd04DZPDs0 dSnwXx7Xt4JdWF9DFMWeY3GMMfWCXN0fhYvn/adByp4IGIANkTDt/PzGi7zbBvzAXW6Zgf e7cEHBmG0WUlNu6pStEqHeU4HcAoayxS3RXFGvZDUU2ZxK8lM/Y0OOQawAPeAg== X-Migadu-Spam-Score: -10.75 X-Spam-Score: -10.75 X-Migadu-Queue-Id: CD9E0E49A X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=O7eRqQDm; 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 X-TUID: yi5HFLGTZzBM Rudolf Adamkovi=C4=8D writes: > Org provides no good way to ignore broken links when exporting subtrees > with lots of links. With `org-export-with-broken-links' set to `nil', > the exporter aborts. When set to `t', the exporter removes the linked > words altogether, breaking the sentences. Lastly, when set to `mark', > the sentences become unreadable due to the million [BROKEN LINK: ...] > fragments everywhere. > > What do you folks think about the WIP patch below? It allows the user > to customize the broken link marker the Org exporter will use. A user > like me, one who works in a large Org file and often exports only its > parts, can use a more gentle marker or even no marker at all. In general, sounds like a reasonable addition. Though it should be accompanied by a NEWS entry. > When this variable is non-nil, broken links are ignored, without > stopping the export process. If it is set to `mark', broken > -links are marked as such in the output, with a string like > +links are marked with `org-export-broken-link-marker'. >=20=20 > - [BROKEN LINK: path] > - > -where PATH is the un-resolvable reference. > - > -This option can also be set with the OPTIONS keyword, e.g., > +This variable can also be set with the OPTIONS keyword, e.g., > \"broken-links:mark\"." This is wrong. broken-links:mark is an option defined in `org-export-options-alist'. You may instead add a sentence that the string may be customized via the new variable. > +(defcustom org-export-broken-link-marker "[BROKEN LINK: %s]" > + "The string used to mark broken links. > + > +This variable applies only when `org-export-with-broken-links' is > +set to `mark'. If the value contains the %-sequence `%s', the > +exporter will replace it with the broken reference which it > +cannot resolve." > + :group 'org-export-general > + :package-version '(Org . "9.7") > + :type 'string > + :safe #'stringp) What will happen if multiple %s are inside the string? --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at