We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I generate a graph the long URLs ruin the graph
There may be a configuration that I could add to my init.el instead of patching the function. If it exists please provide the example.
find (defun org-roam-graph--format-node (node type)
org-roam/extensions/org-roam-graph.el
Line 276 in 8667e44
and note the commented out node replaced with (substring node (- (length node) 10))
(setq node-id node node-properties (append `(("label" . ,(concat type ":" ;node (substring node (- (length node) 10)) ))) (when (member type (list "http" "https")) `(("URL" . ,(xml-escape-string (concat type ":" node)))))))
The text was updated successfully, but these errors were encountered:
truncate-string-to-width may be better, but does anybody know how to write a function advise https://www.gnu.org/software/emacs/manual/html_node/elisp/Advising-Functions.html so I can do it in my own init file?
(defun org-roam-graph--format-node (node type) "Return a graphviz NODE with TYPE. Handles both Org-roam nodes, and string nodes (e.g. urls)." (let (node-id node-properties) (if (org-roam-node-p node) (let* ((title (org-roam-quote-string (org-roam-node-title node))) (shortened-title (org-roam-quote-string (pcase org-roam-graph-shorten-titles (`truncate (truncate-string-to-width title org-roam-graph-max-title-length nil nil "...")) (`wrap (org-roam-word-wrap org-roam-graph-max-title-length title)) (_ title))))) (setq node-id (org-roam-node-id node) node-properties `(("label" . ,shortened-title) ("URL" . ,(funcall org-roam-graph-link-builder node)) ("tooltip" . ,(xml-escape-string title))))) (setq node-id node node-properties (append `(("label" . ,(concat type ":" ;node (truncate-string-to-width node 15) ))) (when (member type (list "http" "https")) `(("URL" . ,(xml-escape-string (concat type ":" node)))))))) (format "\"%s\" [%s];\n" node-id (mapconcat (lambda (n) (org-roam-graph--dot-option n nil "\"")) (append (cdr (assoc type org-roam-graph-node-extra-config)) node-properties) ","))))
Sorry, something went wrong.
https://emacs.stackexchange.com/questions/81211/how-do-i-write-an-advice-to-override-an-org-roam-function
No branches or pull requests
Brief Abstract
When I generate a graph the long URLs ruin the graph
Long Description
There may be a configuration that I could add to my init.el instead of patching the function. If it exists please provide the example.
Proposed Implementation (if any)
find (defun org-roam-graph--format-node (node type)
org-roam/extensions/org-roam-graph.el
Line 276 in 8667e44
and note the commented out node replaced with (substring node (- (length node) 10))
Please check the following:
The text was updated successfully, but these errors were encountered: