-
Notifications
You must be signed in to change notification settings - Fork 166
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
markdown--filter-visible makes hyperlinks unclickable #693
Comments
@joaotavora This affects Eglot. Moreover, if I change the following line with simply https://github.com/joaotavora/eglot/blob/d03235f39a39bdf2e74571d695163aa42f5b9506/eglot.el#L1439 |
Right now, I don't know exactly why Eglot is using filter-buffer-substring. Can you clarify if this is some kind of regression or did it "never work"? In the latter case, it's a question of understanding the root cause and then deciding where to fix it. If Eglot's use of f-b-substring is unreasonable, it should somehow be fixed there. Else it should be fixed here, where that fix would presumably benefit other users. |
AFAIR it never worked. Eglot is probably following the best practice here, so changing it is a bit of a workaround. As I mentioned, an improved |
I suppose that markdown-mode's filter-buffer-substring-function implementation is correct. org-mode implements it same as markdown's. It strips text properties. https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer-Contents.html
I think you should not use |
Expected Behavior
When
filter-buffer-substring
is used to copy some nicely formatted markdown buffer for display somewhere else, hyperlinks should remain clickable (at least with the mouse, perhaps with some special key as well).Actual Behavior
Hyperlinks are formatted as such, but clicking them does not visit the URL.
Steps to Reproduce
Evaluate this in a fundamental-mode buffer, try to click the link:
(Curiously, if the hyperlink text appears verbatim in the buffer, say if you "deobfuscate" the argument to
insert
, then the link can be clicked).Software Versions
The text was updated successfully, but these errors were encountered: