You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a suggestion to insert a character's name or alias:
(defunorgn--select-character-name-or-alias ()
"Selects the character name or alias from the character notes."
(replace-regexp-in-string".* --- """
(completing-read"Selecciona un nombre de personaje: "
(let ((default-directory (expand-file-name (org-novelist--story-root-folder))))
(flatten-list
(mapcar
(lambda (file)
(with-current-buffer (find-file-noselect file)
(let* ((kw (org-collect-keywords '("title""aliases")))
(full (nth1 (car kw)))
(alias (nth1 (cadr kw))))
(flatten-list
(list
(format"%s" full)
(when alias
(mapcar
(lambda (n)
(format"%s --- %s" full (string-trim n)))
(split-string alias ","))))))))
(directory-files (expand-file-name"Notes" default-directory) t"character-.*\\.org$"))))
nilt)))
(defunorg-novelist-insert-character-name ()
"Iserts a character's name or alias from the character notes."
(interactive)
(insert (orgn--select-character-name-or-alias)))
I didn't want to make a full PR, so I just drop it here.
I hope it is useful (I know it is for me).
The text was updated successfully, but these errors were encountered:
I have a suggestion to insert a character's name or alias:
I didn't want to make a full PR, so I just drop it here.
I hope it is useful (I know it is for me).
The text was updated successfully, but these errors were encountered: