Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- **** special functions
- #+begin_src elisp
- (use-package! ox
- :defer t
- :commands
- graph
- :config
- (defun graph ()
- (save-excursion
- (search-backward "#+name: ")
- (evil-forward-WORD-begin)
- (setq drawGraphName (buffer-substring-no-properties (point) (point-at-eol)))
- (search-forward "#+begin_example")
- (evil-next-line-first-non-blank)
- (let ((begin (point)))
- (search-forward "#+end_example")
- (previous-line)
- (setq drawGraph (buffer-substring-no-properties begin (point-at-eol)))
- )
- (concat drawGraph (concat "\nname: " (replace-regexp-in-string " " "_" (replace-regexp-in-string " +" "_" drawGraphName))))
- ))
- )
- #+end_src
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement