[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] org-list-send-item: allow dest to be a buffer position
From: |
Sacha Chua |
Subject: |
[PATCH] org-list-send-item: allow dest to be a buffer position |
Date: |
Sat, 05 Feb 2022 21:44:29 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Passing an integer representing a buffer position to org-list-send-item
was failing because of the string-match-p, so here's something that lets
integers skip that part. I have copyright assignment papers on file.
Sacha
----------------------------------------------------------------
lisp/org-list.el: org-list-send-item: allow dest to be a buffer position
* lisp/org-list.el (org-list-send-item): Check if dest is a string
before matching it, to allow dest to be a buffer position.
---
lisp/org-list.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 3533c8319..f1ab2ca76 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -1442,7 +1442,7 @@ (defun org-list-send-item (item dest struct)
(save-excursion
(goto-char (org-list-get-last-item item struct prevs))
(point-at-eol)))
- ((string-match-p "\\`[0-9]+\\'" dest)
+ ((and (stringp dest) (string-match-p "\\`[0-9]+\\'" dest))
(let* ((all (org-list-get-all-items item struct prevs))
(len (length all))
(index (mod (string-to-number dest) len)))
--
2.25.1
- [PATCH] org-list-send-item: allow dest to be a buffer position,
Sacha Chua <=