[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org f28f02bde9 34/44: org-link-make-string: Throw error
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org f28f02bde9 34/44: org-link-make-string: Throw error when both LINK and DESCRIPTION are empty |
Date: |
Mon, 25 Apr 2022 07:58:01 -0400 (EDT) |
branch: externals/org
commit f28f02bde95869597edbd4bbf37273197a2e4a6f
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
org-link-make-string: Throw error when both LINK and DESCRIPTION are empty
This behaviour is expected according to `test-ol/make-string'.
---
lisp/ol.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/ol.el b/lisp/ol.el
index 86f55d7cf3..22eaae8fbf 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -999,7 +999,9 @@ LINK is escaped with backslashes for inclusion in buffer."
(replace-regexp-in-string "]\\'"
(concat "\\&" zero-width-space)
(org-trim description))))))
- (if (not (org-string-nw-p link)) description
+ (if (not (org-string-nw-p link))
+ (or description
+ (error "Empty link"))
(format "[[%s]%s]"
(org-link-escape link)
(if description (format "[%s]" description) "")))))
- [elpa] externals/org fa7530c7b4 09/44: Rename old function call to use org-fold, (continued)
- [elpa] externals/org fa7530c7b4 09/44: Rename old function call to use org-fold, ELPA Syncer, 2022/04/25
- [elpa] externals/org 312f39a05d 41/44: org-string-width: Do not remove face info when PIXELS is non-nil, ELPA Syncer, 2022/04/25
- [elpa] externals/org 0bca8bc418 30/44: org-fold-show-set-visibility: Fix edge case when folded region is at BOB, ELPA Syncer, 2022/04/25
- [elpa] externals/org a8f4270ac1 21/44: org-manual: Update to new org-fold function names, ELPA Syncer, 2022/04/25
- [elpa] externals/org 0daa209a74 29/44: org-string-width: Work around `window-pixel-width' bug in old Emacs, ELPA Syncer, 2022/04/25
- [elpa] externals/org d2775da08d 35/44: test-ol/org-toggle-link-display: Fix compatibility with old Emacs, ELPA Syncer, 2022/04/25
- [elpa] externals/org 24c1c877cf 43/44: org-fold-core-fontify-region: Calculate jit-lock-bounds accurately, ELPA Syncer, 2022/04/25
- [elpa] externals/org 17e762426d 18/44: Move `org-buffer-list' to org-macs.el, ELPA Syncer, 2022/04/25
- [elpa] externals/org 3fba34900e 27/44: Fix org-fold--hide-drawers--overlays, ELPA Syncer, 2022/04/25
- [elpa] externals/org fc6314b267 39/44: org-fold.el: Fix typo, ELPA Syncer, 2022/04/25
- [elpa] externals/org f28f02bde9 34/44: org-link-make-string: Throw error when both LINK and DESCRIPTION are empty,
ELPA Syncer <=
- [elpa] externals/org 062e30be8a 36/44: org-macs.el: Fix fontification checks take 2, ELPA Syncer, 2022/04/25
- [elpa] externals/org 6d4e65a124 20/44: Add org-fold-related tests, ELPA Syncer, 2022/04/25
- [elpa] externals/org d4f65e74a2 17/44: org-compat: Work around some third-party packages using outline-* functions, ELPA Syncer, 2022/04/25
- [elpa] externals/org 9bc6c363da 40/44: org-fold-core: Fix edge case when fontification goes beyond requested, ELPA Syncer, 2022/04/25