New answers tagged


It's now 2020 and you can open neotree in the current directory using neotree-show instead of neotree-toggle. neotree-show does exactly what the orignal op required, without the need for the elaborate function.


Quoth (emacs) Completion Options, the paragraph just before completion-ignored-extensions is described: When completing file names, case differences are ignored if the variable ‘read-file-name-completion-ignore-case’ is non-‘nil’. The default value is ‘nil’ on systems that have case-sensitive file-names, such as GNU/Linux; it is non-‘nil’ on systems ...


You're still going need to read the entire file, but you don't have to process every line, since you need just first N lines. (defun your-read-lines (file n) "Return first N lines of FILE." (with-temp-buffer (insert-file-contents-literally file) (cl-loop repeat n unless (eobp) collect (prog1 (buffer-substring-no-...

Top 50 recent answers are included