summaryrefslogtreecommitdiff
path: root/test-org-link-edit.el
AgeCommit message (Collapse)Author
2019-01-24transport: Let caller overwrite previous descriptionKyle Meyer
The existing description may not be of interest to the caller, especially if it was automatically generated by org-store-link.
2019-01-24transport: Test point-bounds interaction for non-interactive callKyle Meyer
2019-01-24tests: Drop pointless buffer-string callsKyle Meyer
These are cruft left from copying the (should-error ...) sexps from a (should (string= ...) one.
2019-01-24tests: Fix typos in Org snippetsKyle Meyer
2019-01-24tests: Reflow a testKyle Meyer
2019-01-24Use https for license linksKyle Meyer
2019-01-24Update copyright yearsKyle Meyer
2017-05-05transport-next-link: Keep original description when on whitespaceKyle Meyer
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.
2017-05-05transport-next-link: Fix error on whitespaceKyle Meyer
When point is on whitespace, there are no description bounds because there is no text to use for the description. Avoid a type error in this case by navigating to the initial location of point rather than the left description bound.
2017-05-05tests/transport-next-link: Check "description exists" errorKyle Meyer
2017-05-05tests/transport-next-link: Specify error typesKyle Meyer
2017-05-05tests: Don't wrap a single error type in a listKyle Meyer
The function should-error allows "(list 'error)" to be shortened to "'error".
2017-05-05tests/transport-next-link: Describe test casesKyle Meyer
2017-05-05tests: Welcome back a stranded parenKyle Meyer
2017-03-03Add org-link-edit-transport-next-link commandKyle Meyer
2017-03-03Add a separate function for testing if point is on a linkKyle Meyer
The slurping and barfing commands are interested in point being on a link, so it is sufficient for them to use org-link-edit--get-link-data and get a user-error when point is not on a link. But an upcoming command will want to know that point is _not_ in a link.
2017-03-03org-link-edit--get-link-data: Rename to drop "get"Kyle Meyer
2017-03-03barf: Fix edge cases where point is beyond linkKyle Meyer
When a point is on a blank space beyond the link but before the next element, org-element-context considers point to be a part of the link. This leads to incorrect behavior (shown in the added tests) when either barfing backward or forward. Avoid these issues by moving point to the beginning of the link before deleting the old link and inserting a new one. As a bonus, this makes some of the later goto-char calculations unnecessary.
2017-03-02Update copyright yearsKyle Meyer
2016-03-08org-link-edit--get-link-data: Unescape link textKyle Meyer
org-make-link-string will escape the link again when it's reinserted.
2015-08-08slurp: Reduce new line stretches to single spaceKyle Meyer
... instead of replacing each new line with a space.
2015-08-08Clean up some spacing in testsKyle Meyer
2015-02-14Don't use words as unit for slurping and barfingKyle Meyer
Using words as the unit for slurping can give confusing results. For example, slurping forward with The [http://orgmode.org] Org-mode site results in The [[http://orgmode.org][Org]]-mode site This is somewhat inconvenient because the intended slurp here is most likely 'Org-mode'. However, given that the command clearly says that it works at the level of words, this shouldn't be too surprising. The problem is that, unless the user is displaying the full link (e.g., using org-toggle-link-display), the entire text 'Org-mode' is highlighted as though it's part of the link. If the user then tried to slurp again to get 'site', '-mode' would actually be slurped, and it would appear like nothing happened. Instead of words, make blocks of non-whitespace characters, referred to as blobs, the unit for slurping and barfing. When slurping forward, don't consider trailing punctuation as part of a blob.
2015-02-14split-{first,last}-words: Use Org syntax tableKyle Meyer
Fix the test that should have caught this.
2015-02-14Add tests for round trip exceptionsKyle Meyer
2015-02-14Trim only whitespace from slurped stringsKyle Meyer
2015-02-14backward-slurp-word: Fix whitespace checkKyle Meyer
Don't fail when there is no description and the slurped word isn't separated by a non-word character.
2015-02-12SlurpKyle Meyer