New util function
This commit is contained in:
parent
6448d372d1
commit
175d2d547e
@ -221,6 +221,15 @@ The same but for seconds:
|
||||
(message (format-time-string "%F %r" seconds)))
|
||||
#+END_SRC
|
||||
|
||||
Checking if a buffer contains a string:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun buffer-contains-substring (string)
|
||||
(save-excursion
|
||||
(save-match-data
|
||||
(goto-char (point-min))
|
||||
(search-forward string nil t))))
|
||||
#+END_SRC
|
||||
|
||||
** Persisting variables between session
|
||||
The idea behind this is pretty simple - variables get persisted in ~/.emacs.d/<persisted-vars-file> as a plist of (variable-name variable-value).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user