From 8a242b6c80c2ec2b384f12c16bb9f70c2d44c9c7 Mon Sep 17 00:00:00 2001 From: TEC Date: Tue, 31 Aug 2021 19:03:19 +0800 Subject: [PATCH] oc: allow citations following an item bullet * lisp/oc.el (org-cite--allowed-p): Expand the allowed cases to include "item", which lets one insert a citation following a bullet, e.g. "- ". We just have to check to make sure the citation actually is at least one character away from the bullet. --- lisp/oc.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/oc.el b/lisp/oc.el index 5fcb9da62..7ffe37e57 100644 --- a/lisp/oc.el +++ b/lisp/oc.el @@ -1426,6 +1426,11 @@ (defun org-cite--allowed-p (context) ((= (point) (org-element-property :begin context))) ;; Within recursive object too, but not in a link. ((eq type 'link) nil) + ;; At the start of a list item is fine, as long as the bullet is unaffected. + ((eq type 'item) + (> (point) (+ (org-element-property :begin context) + (org-get-indentation) + 1))) ((eq type 'table-cell) ;; :contents-begin is not reliable on empty cells, so special ;; case it. -- 2.33.0