From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aOM1C6Ich2AMdwAAgWs5BA (envelope-from ) for ; Mon, 26 Apr 2021 22:03:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WMjOBqIch2C0EgAAbx9fmQ (envelope-from ) for ; Mon, 26 Apr 2021 20:03:46 +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 669F322178 for ; Mon, 26 Apr 2021 22:03:45 +0200 (CEST) Received: from localhost ([::1]:42742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lb7SJ-0004nX-MB for larch@yhetil.org; Mon, 26 Apr 2021 16:03:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lb7RO-0004nD-Ax for emacs-orgmode@gnu.org; Mon, 26 Apr 2021 16:02:46 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:44905) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lb7RK-0007jL-20 for emacs-orgmode@gnu.org; Mon, 26 Apr 2021 16:02:45 -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 6EFD220008; Mon, 26 Apr 2021 20:02:37 +0000 (UTC) From: Nicolas Goaziou To: "Bruce D'Arcus" Subject: Re: (Not so) Short note about citations in Org References: <87pmyn5i1g.fsf@nicolasgoaziou.fr> <6e209667-7dc6-ca71-2888-dabf178a73e1@mailbox.org> Mail-Followup-To: "Bruce D'Arcus" , Denis Maier , Org Mode List Date: Mon, 26 Apr 2021 22:02:36 +0200 In-Reply-To: (Bruce D'Arcus's message of "Mon, 26 Apr 2021 14:36:38 -0400") Message-ID: <87czugx19f.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: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, 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: Org Mode List , Denis Maier 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=1619467425; 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=Djao9TLVfYSPzWWfPrXFwOGN2Lhc68wFc/sANRgsvEE=; b=ZEDLxRitFdeqzJtmUXPjPqGz/cV9+ki3HWK+kGAHFX/eZwXJ3AV9dMm9ayfuNFoOzky1RF gbUQKBE56ceB8P8iw2SXYNi0RQMnpHDJIjC7djS3VK/5/RHwMotD8HW1L252hOFSSQWY/e acD2umfdRSYmOAAWVFTEiV5aKEbFisakFq6DA+R1Qv/P/Bs+gtsuJRE5nd3RXsb9JT8B13 O8z4vQBnZiWMS1OQYZ+gMOPpHg6YqmmdNZL0wKxLVNKc4d9d7Y7RRG8T8YCscyWNhH+gkL nAzZ9Lq6c7AVUJldDerY0y9xY6MNTYkBKADbfRPRXSIL/ZujVS5Nb1YsKaAIxg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619467425; a=rsa-sha256; cv=none; b=IcouY4UlqhbWsgdVYvQ/rpCNsYkuDQiJYxu6VkjV8Ks7qBmwPYxg13GdHuyB0vA/f7EBUq 3ID6K5/pMLYd6uPpi4wsuqcwbBY4nxMjXnFoOvRegDK/D2yyKC8a/mjlmaIhwfMRSgi3XE fJRnkoc7KXr5lBUCN0eHJo4RIkKMC24BD2BjWgyuiUFbwk/3NysJJVqk51Dta4DaQxbV+C V9hsA3DESKX9krWcwKBKUKIhinekOy4TfDIWJQNfWT+67z9i4zmhftn8Kl9FMJdkNsKenh aLZlj3h22Di10Vf1A3DxbB+uKt/aafj5XtYbcEegBrSQfHt9VDbuU/SLpd/V5A== ARC-Authentication-Results: i=1; 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-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: 669F322178 X-Spam-Score: -2.45 X-Migadu-Scanner: scn0.migadu.com X-TUID: zxBDkQlWGeZf Hello, "Bruce D'Arcus" writes: > On this, on the other (big) wip-cite thread, Nicolas said the following: > > "A drawback with allowing emphasis there is that prefix and suffix become > parsed data and not plain string anymore. As a consequence, searching > through them, e.g., when looking for locator names, requires an > additional level of indirection, since you need to first transform > parsed data back into plain text." > > Nicolas: I get that you need more code to do this, but are there other > practical consequences of allowing more than plain-text? The code I need to write does not count, really. It is 10 locs at most, without the tests. My concern is the additional burden for processor developers. They will need to shift from one representation to the other, this is not convenient. Also some tasks then become an order of magnitude harder. For example, let's consider the suffix: " p.32 and following" If it is plain text, I can recognize p.32 as a locator, and replace it with "page 32" using something like `replace-regexp-in-string'. Now, if it is a somewhat opaque parsed string, I need to first expand it, for example with `org-element-interpret-data', modify the output as above, and then parse it again to get a new parsed string. I can no longer (concat "(" prefix author "," year suffix ")") either, because prefix and suffix are not strings anymore. I need to (format "(%s%s, %s%s)" (org-export-data prefix info) (org-export-data author info) year ;I assume year cannot contain problematic characters (org-export-data suffix info)) So, nothing impossible, but still slightly inconvenient. Regards, -- Nicolas Goaziou