emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "András Simonyi" <andras.simonyi@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode list <emacs-orgmode@gnu.org>
Subject: Re: [RFC PATCH] oc-csl: Add support for title, locators and bibentry styles
Date: Mon, 8 Aug 2022 19:01:10 +0200	[thread overview]
Message-ID: <CAOWRwxBBqH8K02A_3euik=ntjJxyBWNU=+3n=TuEwNUzxhC2MQ@mail.gmail.com> (raw)
In-Reply-To: <87v8r4wfl9.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

Dear All,

On Sun, 7 Aug 2022 at 11:45, Ihor Radchenko <yantar92@gmail.com> wrote:

> LGTM in general, but please add a proper commit message.
[...]
> Also, it would be useful to explain a bit what bibentry stands for.

thanks, I've attached a new patch implementing these recommendations.

best wishes,
András

[-- Attachment #2: 0001-oc-csl-Add-support-for-title-locators-and-bibentry-c.patch --]
[-- Type: text/x-patch, Size: 2941 bytes --]

From 361e78eca47d2a6472064ae37d43e9c1e131faa3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A1s=20Simonyi?= <andras.simonyi@gmail.com>
Date: Tue, 2 Aug 2022 11:32:17 +0200
Subject: [PATCH] oc-csl: Add support for title, locators and bibentry citation
 styles

* lisp/oc-csl.el: Register the newly added citation styles "title",
"locators and "bibentry" as supported by the "csl" export processor.
(org-cite-csl--create-structure-params): Add support for the creation
of citation structures with the new citation styles.
---
 lisp/oc-csl.el | 31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)

diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el
index 0b2fe5c41..7fcc1f1f2 100644
--- a/lisp/oc-csl.el
+++ b/lisp/oc-csl.el
@@ -61,11 +61,16 @@
 ;; - noauthor (na), including bare (b), caps (c) and bare-caps (bc) variants,
 ;; - nocite (n),
 ;; - year (y), including a bare (b) variant,
-;; - text (t). including caps (c), full (f), and caps-full (cf) variants,
+;; - text (t), including caps (c), full (f), and caps-full (cf) variants,
+;; - title (ti), including a bare (b) variant,
+;; - locators (l), including a bare (b) variant,
+;; - bibentry (b), including a bare (b) variant,
 ;; - default style, including bare (b), caps (c) and bare-caps (bc) variants.
 ;;
-;; Using "*" as a key in a nocite citation includes all available items in
-;; the printed bibliography.
+;; Using "*" as a key in a nocite citation includes all available
+;; items in the printed bibliography.  The "bibentry" citation style,
+;; similarly to biblatex's \fullcite, creates a citation which is
+;; similar to the bibliography entry.
 
 ;; CSL styles recognize "locator" in citation references' suffix.  For example,
 ;; in the citation
@@ -349,6 +354,21 @@ a property list."
        (pcase variant
 	 ((or "bare" "b") '(:mode year-only :suppress-affixes t))
 	 (_ '(:mode year-only))))
+      ;; "bibentry" style
+      (`(,(or "bibentry" "b") . ,variant)
+       (pcase variant
+	 ((or "bare" "b") '(:mode bib-entry :suppress-affixes t))
+	 (_ '(:mode bib-entry))))
+      ;; "locators" style
+      (`(,(or "locators" "l") . ,variant)
+       (pcase variant
+	 ((or "bare" "b") '(:mode locator-only :suppress-affixes t))
+	 (_ '(:mode locator-only))))
+      ;; "title" style
+      (`(,(or "title" "ti") . ,variant)
+       (pcase variant
+	 ((or "bare" "b") '(:mode title-only :suppress-affixes t))
+	 (_ '(:mode title-only))))
       ;; "text" style.
       (`(,(or "text" "t") . ,variant)
        (pcase variant
@@ -730,7 +750,10 @@ property list."
     (("year" "y") ("bare" "b"))
     (("text" "t") ("caps" "c") ("full" "f") ("caps-full" "cf"))
     (("nil") ("bare" "b") ("caps" "c") ("bare-caps" "bc"))
-    (("nocite" "n"))))
+    (("nocite" "n"))
+    (("title" "ti") ("bare" "b"))
+    (("bibentry" "b") ("bare" "b"))
+    (("locators" "l") ("bare" "b"))))
 
 (provide 'oc-csl)
 ;;; oc-csl.el ends here
-- 
2.25.1


  reply	other threads:[~2022-08-08 17:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 11:14 [RFC PATCH] oc-csl: Add support for title, locators and bibentry styles András Simonyi
2022-08-02 12:08 ` Bruce D'Arcus
2022-08-07  9:46 ` Ihor Radchenko
2022-08-08 17:01   ` András Simonyi [this message]
2022-08-09 12:03     ` Ihor Radchenko
2022-08-09 15:38 ` Rudolf Adamkovič
2022-08-13 12:30   ` András Simonyi
2022-08-13 14:01     ` Bruce D'Arcus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOWRwxBBqH8K02A_3euik=ntjJxyBWNU=+3n=TuEwNUzxhC2MQ@mail.gmail.com' \
    --to=andras.simonyi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).