(map! :n "ff" #'save-buffer) ; Save
(map! :n "fq" #'kill-current-buffer) ; Quit a buffer
or (defun my/org-buffer-check ()
"Check that we are in org-directory, and the buffer name is in that directory"
(and (string= org-directory default-directory)
(seq-contains (directory-files org-directory nil)
(buffer-name)
'string=)))
the latter being easily represented as: function my/org-buffer-check()
return string=(org-directory, default-directory)
and seq-contains(directory-files(org-directory, nil),
buffer-name(),
&string=)
end
(seq-contains looks through the sequence returned by directory-files, for the result of buffer-name(), and compares them using the string equality function)I love the concept behind Emacs, I just think at least 80% of its code should actually be in plugins, and the program itself and a lot of large expansions are really bogged down by the sheer size and lack of simplicity.
Oh, and Emacs-Lisp...it's much better than Vimscript, but it's a disappointment nonetheless. Loops instead of recursion in Lisp, really? And last time I tried it the parser could not handle unmatched brackets in comments.
That's pretty common in common lisp as well. Specifically do loops (and lest we not forget the loop macro).
I think you might be thinking of the scheme branch of lisps, but not all of them work that way.
I switched last July and after 8+ years of using variations of Vim, Vi, Ex-Vi, Ed(1) (yes), NeoVim, et all, it is by far the smoothest experience I've ever had.
Unlike my experience with Spacemacs, I haven't had any problems adapting from Vim -- there are no points where the Vim interaction layer breaks down, and it genuinely feels like an editor that I'll be using for the next 20+ years. Like something that can grow around me.