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
Issue with with org-link-descriptive = nil #4
Comments
I confirm. |
Ok! Note that this is both in ol.el and in the definition of org-mode in org.el:4684, and also in |
I’m of course glad to test any updates! (I could also, hypothetically, contribute code (have FSF copyright assignment), although my understanding of how |
Can you test now? Should be fixed.
Thanks. It should be correctly handled by org-fold.
I certainly don't mind someone who is actually a programmer helping with this :)
Feel free to ask anything you want to know. The very general idea is described in https://github.com/yantar92/org#org-modeorg-fold-branch. Also, I tried to explain the logic as much as possible in comments within https://github.com/yantar92/org/blob/feature/org-fold/lisp/org-fold.el |
Yes, in my small testing everything seems to work as expected! Loading org, toggling with For reference, this is what I am using now for displaying citation links (I am using zotxt, for generating references from Zotero, although I have hope for better integration of citations into org ( ;; Special fontification, I often manipulate rows of references,
;; and then it’s useful to display the outer brackets, for easy
;; killing and yanking.
(org-link-set-parameters "zotero"
:display 'full ; invisibility is handled in the activate function
:activate-func #'aj/org-zotxt-activate)
(defun aj/org-zotxt-activate (start end path bracketp)
"Add text properties to display zotxt citation links in a good way"
;; it’s always 36 chars, I think: "[[zotero://select/items/1_EEIVB8QC]["
(org-fold-region (1+ start) (+ start 36) t 'org-link)
(org-fold-region (1- end) (- end 2) t 'org-link)) As for being an actual programmer, even if I have taken a few programming courses, I am also just an academic using Emacs for writing, mail and planning (and some research), and fiddling with elisp 😄 |
For reference, this is what I am using now for displaying citation links (I am using [zotxt](https://gitlab.com/egh/zotxt-emacs), for generating references from Zotero, although I have hope for better integration of citations into org (`wip-cite-new` branch)).
I personally prefer org-ref with my custom web-scrapper [1] for
capturing papers. I can keep all the paper notes in org-mode directly
and capture them as easily as with Zotero browser extension.
;; Special fontification, I often manipulate rows of references,
;; and then it’s useful to display the outer brackets, for easy
;; killing and yanking.
Interesting idea. You might propose it to add as a built-in org-link
feature in the mailing list ;)
(org-fold-region (1- end) (- end 2) t 'org-link))
Setting 'invisible text property to t should also be safe, though with
org-fold, you can also reveal the hidden part of the link during isearch
(it is hard-coded not to do so right now (for the sake of consistent
behaviour), but I plan to add this option in future).
As for being an actual programmer, even if I have taken a few programming courses, I am also just an academic using Emacs for writing, mail and planning (and some research), and fiddling with elisp 😄
Greetings to fellow academician ;)
Footnotes:
[1] https://github.com/yantar92/org-capture-ref
|
Thank you! Interesting solution with the scraper! Yes, everything in emacs... Zotero helps me interact with others from time to time (I can export to valid zotero-marks in odt... via some steps). Well. |
Unified interface :)
What is |
Actually I export via generating these kinds of marks: https://zotero-odf-scan.github.io/zotero-odf-scan/, which can then be converted to "active" zotero citations in odt. My sort of messy code for this is here: https://gitlab.com/andersjohansson/emacs-zotxt-extra The benefit is that I can get correct "active" citations when exporting both to odt and latex. But it is still a bit too much of a hacked together solution. |
Thanks. I see what it means now. I think something along that lines is natively supported by org-ref (probably, limited to pdf export). |
Hi, and thanks for this brilliant work. I notice a great speed-up!
However I realized that this interferes with some of the standard behaviour of org links.
A minimal test case:
When
org-link-descriptive
is nil (it can be toggled withorg-toggle-link-display
, which removesorg-link
from the invisibility spec), the link is still visible when folding the headline.Tested with
emacs -Q -L ./lisp -l org
as wellI am on emacs built from the native-comp branch:
GNU Emacs 28.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.17.3) of 2020-11-19
Normally, I have
org-link-descriptive
= t, and wouldn’t have noticed this if it wasn’t for a custom link type that I use, where I previously were able to use a custom:activate-func
to display a selected part of the link (outer brackets + description). This doesn’t work either.The text was updated successfully, but these errors were encountered: