emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-cite: enable inserting citation (org-cite-insert) after list bul


From: Timothy
Subject: Re: org-cite: enable inserting citation (org-cite-insert) after list bullet [9.5 (9.5-7c78aca @ /home/yuu/.config/emacs/straight/build/org/)]
Date: Tue, 31 Aug 2021 18:24:57 +0800
User-agent: mu4e 1.6.5; emacs 28.0.50

Yuu Yin <yuuyin@protonmail.com> writes:

> Invoking ~org-cite-insert~ after list bullets (e.g. ~-~ and ~1.~ )
> doesn't work.

I did a little test myself, and can confirm that it's not currently
possible to insert a citation *immediately* after a bullet and space.
This can be checked with `org-cite--allowed-p'.

Thinking about this situation, inserting citations should be fine as
long as the `point' isn't before or immediately after the bullet itself
(i.e. no space).

I've prepared a patch that fixes this (attached). This is the test case
that I'm adding:

+     ((eq type 'item)
+      (> (point) (+ (org-element-property :begin context)
+                    (org-get-indentation)
+                    1)))

As this is so simple, if nobody has any comments I'll push this in a
week or so.

--
Timothy

Attachment: 0001-oc-allow-citations-following-an-item-bullet.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]