You use org-roam-node-insert
? Can you copy-paste a result here?
Oh, do your nodes have a #+TITLE
line? If there's no #+TITLE
, it defaults to using the filename.
A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!
You use org-roam-node-insert
? Can you copy-paste a result here?
Oh, do your nodes have a #+TITLE
line? If there's no #+TITLE
, it defaults to using the filename.
Inserting stuff from normal mode ends up before the cursor, which is not what I want if I just typed text ending with a space character, I want it after. I've been using this for a bunch of insert functions:
(defmacro my/insert-after-space (&rest fs)
`(progn
,@(mapcar
(lambda (f)
;; If in evil normal mode and cursor is on a whitespace
;; character, then go into append mode first before inserting
;; the link. This is to put the link after the space rather
;; than before.
`(defadvice ,f (around append-if-in-evil-normal-mode activate compile)
(let ((is-in-evil-normal-mode (and (bound-and-true-p evil-mode)
(not (bound-and-true-p
evil-insert-state-minor-mode))
(looking-at "[[:blank:]]"))))
(if (not is-in-evil-normal-mode)
ad-do-it
(evil-append 0)
ad-do-it
(evil-normal-state)))))
fs)))
(my/insert-after-space org-roam-node-insert
emojify-insert-emoji
org-web-tools-insert-link-for-url)
This is really helpful thanks - I ended up changing a variable and now it works (for my purposes)
If I understood correctly, the problem turned out to be caused by evil but the post doesn't mention evil anywhere! Always mention evil, and, more generally, explain how to reproduce the problem.
My apologies, I've edited the Op