From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OOIuAkjEwGAbVAAAgWs5BA (envelope-from ) for ; Wed, 09 Jun 2021 15:38:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kIMcOUfEwGBSOQAA1q6Kng (envelope-from ) for ; Wed, 09 Jun 2021 13:38:15 +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 5190DD3B6 for ; Wed, 9 Jun 2021 15:38:15 +0200 (CEST) Received: from localhost ([::1]:60588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqyPN-0001Ht-QU for larch@yhetil.org; Wed, 09 Jun 2021 09:38:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqyOE-0008Jk-Cg for emacs-orgmode@gnu.org; Wed, 09 Jun 2021 09:37:02 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]:54911) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqyOC-0001b8-RO for emacs-orgmode@gnu.org; Wed, 09 Jun 2021 09:37:02 -0400 Received: by mail-pj1-x1031.google.com with SMTP id g24so1348707pji.4 for ; Wed, 09 Jun 2021 06:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:message-id :date:mime-version:content-transfer-encoding; bh=N2qJTmWpJTIR12gTASVzqipsH8nnj3jrlsMaB6yTahw=; b=NzmwLHaq9DFptxD+BLaEyLYsPWhh543vcgp6ewBu6GvXc3q9IcvdrAD87Y2D7gQta7 CQYxspzCyZKotw2IkGcM++CpS3ox5flljmRBuDBW8iLNKE53RFwC9GnEQqxwGLxzQozn hL/W4k3ralwUoEZMH30Ev/H98DpFqJeCErw/DEYghsPfiAKcD97CA96jsw+ZiBWfcYtR QjUVUDYLDnMc4LTF+CPv/yX4FLbv9fM6u4ULlHFqmX8lU8lFSDEk9twqJ0eqgEDvCO3L Cy8qOrjoxXLF0ljNonu5SmTs57xqeq9cjlslrnXZrplo9aoaPjb0aOpdYqwp6yXd1bB6 1CuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version:content-transfer-encoding; bh=N2qJTmWpJTIR12gTASVzqipsH8nnj3jrlsMaB6yTahw=; b=sKVc9+kkpfmtP3zTKR+lFy/7j7omsLsBAN1rl77tPBvN7220c4DDA8a+cThQbxP7j2 /yGpU6g8T78saOTkqcx1eAX6hf/sp14uQOsNBkD0yCJqbyUtbJ85MHgSXg3LshLaWxCQ /z3PTTySD+6wPzlbFAZ/S1Ecrnwzalq/H9fXzOYnOK9MX/KLH5cAH7AV+mX1eUn29noG TWGGTjpBR/Sx3kBowJH7GH+h940IVyNmyB6Ygel4baOjvjU6FXG5mnkMu4XOrd6b4VMK OykomwAcFTLTtcIMXyhkq77HCtoJW/kQdFWpdgq5PyDF0OqbynX4/4dqnIWvx6ij9Yuu jyag== X-Gm-Message-State: AOAM530aA2aC/lQ8gmwQsdN4Q4jrnvvGH0+eF31G+r3JxmUEzJsB4aLq slF+kBoP0D96UhAEUdVPoHs= X-Google-Smtp-Source: ABdhPJxhjpwOtHW4cVYADGeNhrD6hrNvP/hSVzLdiwULijtrcKMaH6gPaXnAsKK4PRrZ78MGFkwVIg== X-Received: by 2002:a17:902:d917:b029:107:eca4:d5b4 with SMTP id c23-20020a170902d917b0290107eca4d5b4mr5348490plz.79.1623245818897; Wed, 09 Jun 2021 06:36:58 -0700 (PDT) Received: from localhost (180-150-91-8.b4965b.per.nbn.aussiebb.net. [180.150.91.8]) by smtp.gmail.com with ESMTPSA id x28sm354489pff.201.2021.06.09.06.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 06:36:58 -0700 (PDT) References: <87mts25000.fsf@gmail.com> <871r9bpz18.fsf@gmail.com> <874ke7i7bv.fsf@nicolasgoaziou.fr> User-agent: mu4e 1.4.15; emacs 28.0.50 From: Timothy To: Nicolas Goaziou Subject: Re: [PATCH] Allow LaTeX reference command (\ref) to be customised In-reply-to: <874ke7i7bv.fsf@nicolasgoaziou.fr> Message-ID: <87y2bjnoqy.fsf@gmail.com> Date: Wed, 09 Jun 2021 21:36:54 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=tecosaur@gmail.com; helo=mail-pj1-x1031.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-email 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=1623245895; 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=N2qJTmWpJTIR12gTASVzqipsH8nnj3jrlsMaB6yTahw=; b=l/2lMvJzFEey0khGtsoXmg390SH4YqT5DPyrBgbQGJmw5u8UxX5n1C6/l36vkodixugh3Z KVMJO7viK1K+xiQWOhvNsmtbYxTn96ZB/XplzE2BfUE3mB8aUzsIXGNXyLiMdS081gy5VN YBVNOvQqQpDvQ6G+7tpXYq0ORtqSxmeu14rfXAfMbw5XS26mbVaUEZZNGvgeLG7z6WsOBe MWtWw84py8feiZsAPJ5kOKAeOsccvHgVKCFgV0CvMoXGDVekWARk1CCfGfAKhFVeMe+nfS 5YuGbN2eE7IHOzz5GaZDuC6HRG6SyhxFcBrSfxQa/JzpaFtBvRdvKEUG6r5W7Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1623245895; a=rsa-sha256; cv=none; b=fcQHwemE2sbdeSwLRfdTeBzDDGoif9wTjqcKWHS8POQ3VeGfuSpPs+X2d3LUFfGaEoK5T/ ywqZ13/J66c78c05Om6SuvCuEVvlBLhIfGBDy9ScGJ74ksGxS5Kqa1Fmcwy3w1JyHvhcqw hekMIPbuSxOXd6n64H1OQnJfqLwMN2dg2LAAC1Kf6VAqU/J4KzbwTuJMKIDHumabfaBv5c rkFtekhjupW2D79pZ+I4hOkqqI6poHuSyzhUI0L5Ts+Be5fAEghc0yulEtlAx1Yhvu8a2A CBcrxkwLVimfVi3Gf8bjt/6Enp7NDVFz+pS8AMh0QILcad4VIASz7cWUQ0d9Pg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=NzmwLHaq; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=NzmwLHaq; dmarc=pass (policy=none) header.from=gmail.com; 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: 5190DD3B6 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: BSPWGnTT5SQS Nicolas Goaziou writes: > I agree there is no good reason to hard-code "\ref", but, off the top of > my head, there may be a couple of things to consider: > > 1. There is still a dangling \ref in `org-latex-footnote-defined-format'; I noticed this, but looking at the usage I think the user would be surprised if changing \ref for sections, figures etc. also changed how footnotes looked. > 2. This change is already somewhat trivial using a link filter: > > (defun my-ref-link-filter (s &rest _) > (replace-regexp-in-string (rx string-start "\\ref") "\\foo" s nil = t)) > > (add-to-list 'org-export-filter-link-functions #'my-ref-link-filter) As are many things :P but I think it's worth making some more obvious to users, and IMO this is worth it. > 3. \hyperref is still hard-coded in `org-latex-link'; your patch could > look like a partial solution. A reference with a named description does use hyperref, but I think that would still be expected --- let me know if you think otherwise though. > Those are not strong objections, so if you think none of them is worth > considering, then I'm fine with your patch. If what I've said above makes sense, I think it would be good to merge =F0= =9F=91=8D. All the best, Timothy.