Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org-mode link with %2B, becomes %252B #9484

Closed
duianto opened this issue Aug 24, 2017 · 1 comment
Closed

org-mode link with %2B, becomes %252B #9484

duianto opened this issue Aug 24, 2017 · 1 comment
Labels
stale marked as a stale issue/pr (usually by a bot)

Comments

@duianto
Copy link
Collaborator

duianto commented Aug 24, 2017

Description :octocat:

The number 25 gets added in-between the % and 2, when a link that contains
%2B is added to a .org file with , i l.

Reproduction guide 🪲

  • Copy this link:
    https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Blang/bibtex/README.org
  • Start Emacs
  • Open the org layers readme.org: SPC h l org RET
  • Find the BibTeX layer link: / bibtex layer RET
  • Disable read-only mode: SPC b w
  • Open the insert link prompt: , i l
  • Clear the current link ../../+lang/bibtex/README.org: C-- M-k or C-a M-k
  • Paste C-y, and cycle through the kill-ring, to the github link: M-y
  • Confirm the link RET and the description RET

Observed behaviour: 👀 💔
When the link is inspected with , i l, then it shows %2B as expected.

But if one changes the readme.org buffer to text-mode, then the link includes
25 between the % and 2:
the [[https://github.com/syl20bnr/spacemacs/blob/develop/layers/%252Blang/bibtex/README.org][BibTeX layer]].

25 is also shown in the magit buffer SPC g s. Move the cursor to the
unstaged changes: g u, and show the sections 4th level: 4
+the [[https://github.com/syl20bnr/spacemacs/blob/develop/layers/%252Blang/bibtex/README.org][BibTeX layer]].

Switching back to the readme.org buffer, changing it to org-mode, and
inspecting the link , i l, still shows %2B.

When the bibtex layer link is clicked (pressed RET on) then an empty buffer
opens, and it's entry in the SPC b b Helm Mini buffer looks like this:
README.org<bibtex> 0 Org (in `~/.emacs.d/layers/%2Blang/bibtex/')

Expected behaviour: ❤️ 😄
25 shouldn't be inserted in the link.

Additional notes

The ascii hex code for % is 25.

I discovered this while testing this command: (url-hexify-string "%")
it outputs: %25

Another strange thing happens if %252B is changed to %2B in the readme.org
in text-mode. Now when the readme.org is switched back to org-mode and the link
is inspected with , i l, then %2B has been replaced with a + sign:
https://github.com/syl20bnr/spacemacs/blob/develop/layers/+lang/bibtex/README.org

As long as one doesn't confirm the , i l prompts link and description. then both readme.org in text-mode and the magit buffer shows the link with %2B.

However with readme.org in org-mode, if one confirms the bibtex layer link , i l with the + sign, and it's description, then the readme.org in text-mode and magit buffer link is shown with the + sign.

System Info 💻

  • OS: windows-nt
  • Emacs: 25.2.2
  • Spacemacs: 0.200.9
  • Spacemacs branch: develop (rev. 3e98896)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(autohotkey auto-completion emacs-lisp git helm markdown org version-control)
  • System configuration features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

1 participant