path: root/test-org-link-edit.el
diff options
authorKyle Meyer <kyle@kyleam.com>2017-05-05 19:54:18 -0400
committerKyle Meyer <kyle@kyleam.com>2017-05-05 21:54:45 -0400
commit5c5fef32b4690092bbc9e86a8cf6718288053596 (patch)
treea5512431b724b743b5242199584b34c7c85f76d8 /test-org-link-edit.el
parent36508630d7b8a2c7941f01104e0a0581a464d8cc (diff)
transport-next-link: Keep original description when on whitespace
A to-be-transported link is allowed to have a description if a new description isn't specified by the word at point or the selected text. In this case, don't drop the original description during transport.
Diffstat (limited to 'test-org-link-edit.el')
1 files changed, 8 insertions, 0 deletions
diff --git a/test-org-link-edit.el b/test-org-link-edit.el
index a5fecef..b88592d 100644
--- a/test-org-link-edit.el
+++ b/test-org-link-edit.el
@@ -552,6 +552,14 @@ website"
"Here is<point> Org's website http://orgmode.org/"
+ ;; Transported links are allow to have an existing description when
+ ;; point is on whitespace.
+ (should
+ (string= "Here is\[\[http://orgmode.org/\]\[descrption\]\] Org's website "
+ (org-test-with-temp-text
+ "Here is<point> Org's website \[\[http://orgmode.org/\]\[descrption\]\]"
+ (org-link-edit-transport-next-link)
+ (buffer-string))))
;; Fail if point is on a link.