reddit / emacs

Ugly links in Roam buffer

thephatmaster · 2022-09-28 12:49
Hi all, With thanks for the assistance of this sub, I'm up and running with org-roam v2 after a hiatus from org-roam (v1). I've followed the System Crafters tutorial. I have an aesthetic issue the backlinks in my roam buffer are ugly (showing the full link in square brackets): ``` Backlinks (1) System Crafters (Top) They sometimes make videos about [[id:8ccffdbb-45c9-4826-b66a-182c085f6da7][programming languages]] like [[id:6f63cb5a-2866-4746-8f7d-2e14241afed9][Emacs Lisp]] and [[id:d16ab718-9d9a-4142-befd-6ef51dbe6224][Scheme]] ``` It seems from a [Github issue](https://github.com/org-roam/org-roam/issues/2198) that this may be because of `org-descriptive-links`, but I'm struggling to find information on that. It's not in the [Org manual](https://orgmode.org/manual/Handling-Links.html).
Rob23Hert · 2022-09-30 21:20
```M-x org-toggle-link-display``` does nothing for you?
thephatmaster · 2022-10-01 06:28
That's fine in any `.org` file, but in the roam buffer I get `org-link is not a valid folding spec` So the question is, I guess, what does roam consider a valid folding spec? I did stumble accross a [closed issue for this on github](https://github.com/org-roam/org-roam/issues/2228), but feel maybe I'm experiencing [this bug](https://github.com/org-roam/org-roam/issues/2198)
Rob23Hert · 2022-10-01 06:43
I use doom so a lot of thing are already set for me. There's a buffer local variable called ```org-link--link-folding-spec``` you can maybe try ``` (setq org-link--link-folding-spec '(org-link) (:global t) (:ellipsis) (:isearch-open . t) (:fragile . org-link--reveal-maybe))) ```
thephatmaster · 2022-10-01 06:49
Thanks, am I right in thinking I can just evaluate that in a scratch buffer, and if it works add it to my config.el?
Rob23Hert · 2022-10-01 11:38
Yes that should work
thephatmaster · 2022-10-01 12:26
Unfortunately not. I get `Symbol’s function definition is void: :ellipsis` That's with or without the presumably extraneous final `)`
Rob23Hert · 2022-10-02 08:27
You are right I copied it wrong There should not be a ) after org-link `(setq org-link--link-folding-spec '(org-link (:global t) (:ellipsis) (:isearch-open . t) (:fragile . org-link--reveal-maybe)))`
thephatmaster · 2022-10-02 11:46
>(setq org-link--link-folding-spec '(org-link (:global t) (:ellipsis) (:isearch-open . t) (:fragile . org-link--reveal-maybe))) No dice unfortunately
Rob23Hert · 2022-10-02 17:37
I couldn't replicate the issue as stated in the github thread. I don't know how to solve the problem You can maybe try to update the packages or if you are using doom you can try ```M-x doom/upgrade```
thephatmaster · 2022-10-02 18:03
Thanks for your help anyway. I'm running out of time for org-roam and its idiosyncrasies, it's been over a year and I'm yet to achieve a fully working setup. I did run `doom/upgrade` but got an error, and now my whole installation is broken ``` > Building undo-fu... x There was an unexpected runtime error Message: Invalid sub-list head in :files directive: :not Backtrace: (signal error ("Invalid sub-list head in :files directive: :not")) (error "Invalid sub-list head in :files directive: %S" :not) (if (stringp (car spec)) nil (error "Invalid sub-list head in :files directive: %S" (car spec))) (cond ((eq spec :defaults) (setq files (append straight-default-files-directive files))) ((stringp spec) (setq files (nconc (map... (let ((spec (car files))) (setq files (cdr files)) (cond ((eq spec :defaults) (setq files (append straight-default-files-directi... (while files (let ((spec (car files))) (setq files (cdr files)) (cond ((eq spec :defaults) (setq files (append straight-default-... (let ((mappings nil) (exclusions nil)) (while files (let ((spec (car files))) (setq files (cdr files)) (cond ((eq spec :defaults... (straight--expand-files-directive-internal (:defaults (:not ".elisp-autofmt" "LICENSE")) "/home/steve/.emacs.d/.local/straight/r... (let* ((default-directory src-dir) (result (straight--expand-files-directive-internal (or files straight-default-files-directive... (straight-expand-files-directive (:defaults (:not ".elisp-autofmt" "LICENSE")) "/home/steve/.emacs.d/.local/straight/repos/undo-... (let ((--dolist-tail-- (straight-expand-files-directive files (straight--repos-dir local-repo) (straight--build-dir package) fla... (progn (let ((dir (straight--build-dir package))) (if (file-exists-p dir) (progn (delete-directory dir 'recursive)))) (make-dire... ! Wrote extended backtrace to ~/.emacs.d/.local/logs/cli.doom.221002185915.3269.error ``` I think I'll leave org-roam alone for a while.
Rob23Hert · 2022-10-02 20:04
Well in that case you can reinstall doom, it's super easy, you just need to backup the .doom.d directory and delete the .emacs.d directory. I've also broken my install a couple of times, check the documentation for more information
thephatmaster · 2022-10-02 20:22
I'll put that next on my list. Perhaps with a fresh(er) install roam will play better
thephatmaster · 2022-10-03 12:23
This is a good tip, managed to overcome a couple of similar issues this morning by doing that on both my machines