From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aBZfIr2kcmZu4wAAe85BDQ:P1 (envelope-from ) for ; Wed, 19 Jun 2024 09:28:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id aBZfIr2kcmZu4wAAe85BDQ (envelope-from ) for ; Wed, 19 Jun 2024 11:28:29 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Wd29tyjo; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718789309; 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=4lQXwKbo+jUjwdH3NASjYCzAaBvNQ9RlyPSw81+aMMU=; b=J74ob569/MfLGS0KsQFIrwdYU3Yjy7edjx0eKPyRuQ1ljcrJlCsrYjzUm2VycZ8mulfQVQ fvgTm9ta+IW1In1i3ybXF03vn3RVQxzu1n0FIZJqgGebw0bCDSGUqg/DV3Fo03zMstnbkk 65tYQMfovVRTtbZtSFETTRage4C6jzcPUq+5ISaXsMiUtBTs7w9XBxT/ATLzu6nHqPQpac 7y5BXFkMy8otUHyM0JcxqzdNCj59WF1AGzeaXluYbR3Yow/JIqkSHBBHL4HZvjOnyHmN/m 5AZmRL2GR8TlJdKfY+iSvNtGmM40JP8AE+IXU07ysqjFsjkc1Jg8nMFkKCg/oQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Wd29tyjo; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718789309; a=rsa-sha256; cv=none; b=nD+YdOL3uigrXQP3PPq+oxaO0kaADv3NZxv+qLm7ntlIAaonXwElYcw9jtEipVKr5aU146 btQ1scGsq1yhTuENDKrJbmpGfYoZ+/uPnRZ+hmtfa66h1XfdLQKwb+vVjw6J3mIm0gNDPQ g/uWgjay0DOqXbC9fflhXT/46WMNlNQuGkhWibXKEDlOS72pQotwkppThEYinFP7P8cv29 3J00/Rv8VQbb2g9/Qrha1Th8wvEx1/Ts2oWT+ea+MvxGvDwmYphTX6/tq5zG/vpaRiDynj /n+SpHmUjX5SFf6CFIFcGwOHgUJXFVbYJEg075oB/eyNnJ3GbsTh2FP3QLYyFQ== 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 3B7496942B for ; Wed, 19 Jun 2024 11:28:29 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJrbI-0005E5-1V; Wed, 19 Jun 2024 05:27:32 -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 1sJrbG-0005Ae-4K for emacs-orgmode@gnu.org; Wed, 19 Jun 2024 05:27:30 -0400 Received: from mail-ua1-x92d.google.com ([2607:f8b0:4864:20::92d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJrbC-0005ju-T1 for emacs-orgmode@gnu.org; Wed, 19 Jun 2024 05:27:29 -0400 Received: by mail-ua1-x92d.google.com with SMTP id a1e0cc1a2514c-80f4fc0f0aeso395261241.0 for ; Wed, 19 Jun 2024 02:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718789245; x=1719394045; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4lQXwKbo+jUjwdH3NASjYCzAaBvNQ9RlyPSw81+aMMU=; b=Wd29tyjocjpcLBvKoo9RMEHO6W0VXwIGH3schA/qrB89jZHvctTMLPVBH3lg8om/sr HoaMjV5cDBPv04wXl9MS+UGtGuRp1B8BopiNvVfflIaEA8++BxGSbUDwmdKi3L0sxJxa XxD9av9LoGEhH0lKaPPOpa+9cDNxoSM836rQrdYCsFx3AAld0nGKIA2uYn3W75whRap/ 6UBdHwpxDo3au7RY4RWU2UZh15gc162+vXP3E4O64+HxovfLRxunqKz6xpbVfug9QI/Z 5wFq0N/tow5mRptdkk0CmfdSWrn2K6m2J4r4v0T8Daf8jvPeODVA3x6LjiiR30zfC9Nx +CRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718789245; x=1719394045; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4lQXwKbo+jUjwdH3NASjYCzAaBvNQ9RlyPSw81+aMMU=; b=va5qly7k+Y5AK3+z0ApuQMeMFhqGCib/ymyY55rOagu9zarHZPGjkhZbPK5Sx7Z0iD 46vZPLpqTl8Llp2pzmi4AD6Db+7z0HjD7tH6xonVGEug5hehEP8X53i2vltJ5nPoqWb+ IjMTjEgwxk21UwMlFAzP+d4Hk/RNE4FZ9kpC4NfjyPzgRXDQTNogdPxI4tAW9MU2yOVt w4ZCNSzl6kfOKcnAGYaJtQXKh8WjsGIq+bRrznXyGK9StaiCxrXcClteXNnX6N1jqs/p Sdh/3UAPrFaSgvIpCR5MKxtI9YuJqGBm1lgfO9sutrZ//nXSUhJZnPibP2riYXyTZnhA MH1g== X-Gm-Message-State: AOJu0YyrbgawVJ8DklIMIjaoKGJGWSib0qrjEQ4/2BTqj4oyYCG2zCyC uM3JyBuirQvRCRjoJqqBXIzVOVtCNPMVEEGlCG5mEkSx9PbvWL4brmF8yIvF0o8z72R+cOd0Ud1 jjpZpxq45eaTkOP+/QW1f3eTbMnfxj9cdYmeAoQ== X-Google-Smtp-Source: AGHT+IE0nSE1ezK7LJrnUx2j1S9QQkmiBsqaLBtp0MQ7l9lUiUCr8rQy58LPhVNkhtZaMRO+7F3rktTM1A+7hk+FfzE= X-Received: by 2002:a67:f285:0:b0:48f:1db0:e262 with SMTP id ada2fe7eead31-48f1db0e5d8mr52629137.1.1718789245296; Wed, 19 Jun 2024 02:27:25 -0700 (PDT) MIME-Version: 1.0 References: <87zfswtg3u.fsf@localhost> <87o7948sua.fsf@localhost> <87zfrjbxxn.fsf@localhost> In-Reply-To: From: =?UTF-8?Q?Andr=C3=A1s_Simonyi?= Date: Wed, 19 Jun 2024 11:27:14 +0200 Message-ID: Subject: Re: [PATCH] oc-csl: New custom option `org-cite-csl-sentence-case-bibtex-titles' To: Ihor Radchenko Cc: emacs-orgmode list Content-Type: multipart/mixed; boundary="00000000000069000b061b3acec2" Received-SPF: pass client-ip=2607:f8b0:4864:20::92d; envelope-from=andras.simonyi@gmail.com; helo=mail-ua1-x92d.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, 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-Spam-Score: -8.60 X-Migadu-Queue-Id: 3B7496942B X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -8.60 X-TUID: BHO3JaHHr44w --00000000000069000b061b3acec2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Ihor and Max, thanks for the feedback and apologies for responding that late. On Wed, 15 May 2024 at 13:48, Max Nikulin wrote: > Is it possible to keep title formatting from .bib files till it becomes > known that specific style requires sentence case for particular entry > type? I had a hope that it might alleviate the issue and to make things > working out of the box for more users. The problem is that many (maybe most) CSL styles simply assume that titles are in sentence-case in the input without making this explicit. The APA citation style is a prominent example: the APA guidelines require sentence-case titles but AFAICS the standard CSL implementations do not encode this explicitly. Of course it could be checked whether a CSL style contains explicit instructions about how to format titles and skip sentence-case conversion of input for those but this probably would not solve the problems of users who do not want the conversion at all. > > I'm a bit unsure about naming the option: > > Perhaps `org-cite-csl-sentence-case-bibtex-titles-without-langid' > > A variant: org-cite-csl-bibtex-title-to-sentence-case thanks, in the attached patch I went with (a slightly modified version of) = this. > Does it means that you added one more argument to `citeproc-create' and > that consistent Org and citeproc-el versions must be used? no, at least in the sense that this argument has been there since 2021. > It may be tricky to preserve > backward-forward compatibility on this step, but it should make further > changes easier. It may be reasonable to explicitly add version of > "protocol" to the property list, so that citeproc-el may decide if error > should be signaled in the case of serious version difference. although I don't think backward compatibility could be a problem in that particular case, in the future a mechanism like this might be useful, so I plan to implement it, thanks for the suggestion. > It is not clear for me why `org-cite-csl-sentence-case-bibtex-titles' is > a part of Org, not of citeproc-el. The only thing that Org can do is to > pass it to citeproc-el. It is not configurable per .org file and likely > it should not be. From my point of view it might be more suitable per > .bib file. Anyway it is almost unrelated to Org. citeproc-el doesn't have customizable user options by design because it was conceived as a relatively low level rendering library. Also, it's used by several user-facing packages by now in addition to Org (org-ref, citar etc.) so I think it would be both confusing and difficult to try to keep this type of customizations in the library. > On Mon, 17 Jun 2024 at 13:37, Ihor Radchenko wrote: > > > Also, it would be nice to point out the CSL and Bibtex have different= > > > conventions for the title field. I added a few words about this now both in the docstring and in the ORG-NEWS entry -- I've attached the updated patch. best wishes, Andr=C3=A1s --00000000000069000b061b3acec2 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-oc-csl-New-custom-option-org-cite-csl-bibtex-titles-.patch" Content-Disposition: attachment; filename="0001-oc-csl-New-custom-option-org-cite-csl-bibtex-titles-.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lxlmq8o40 RnJvbSBlODljNzg3MmQ4YzI4N2ZiM2FmZmQ5YzgxNWExNDIzYjM2NmMyYmI5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbmRyYXMgU2ltb255aSA8YW5kcmFzLnNpbW9ueWlAZ21haWwu Y29tPgpEYXRlOiBXZWQsIDE5IEp1biAyMDI0IDA4OjI2OjE5ICswMjAwClN1YmplY3Q6IFtQQVRD SF0gb2MtY3NsOiBOZXcgY3VzdG9tIG9wdGlvbgogYG9yZy1jaXRlLWNzbC1iaWJ0ZXgtdGl0bGVz LXRvLXNlbnRlbmNlLWNhc2UnCgoqIGxpc3Avb2MtY3NsLmVsIChvcmctY2l0ZS1jc2wtYmlidGV4 LXRpdGxlcy10by1zZW50ZW5jZS1jYXNlKTogTmV3CnZhcmlhY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