From 3f5e8d25456e417415ddbd5ae238295129625119 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Mon, 3 Sep 2018 16:23:35 +0900 Subject: [PATCH] fix my-file-head --- emacs.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/emacs.el b/emacs.el index 235d3f3..486af72 100644 --- a/emacs.el +++ b/emacs.el @@ -1611,6 +1611,7 @@ This mode is a simplified version of `adoc-mode'." (end 0) (result '())) (with-temp-buffer + (erase-buffer) (while (<= (count-lines (point-min) (point-max)) num) @@ -1619,7 +1620,8 @@ This mode is a simplified version of `adoc-mode'." nil beg end) - (setq beg end)) + (goto-char (point-max)) + (setq beg (+ beg size))) (goto-char (point-min)) (while (< (length result) num) (let ((start (point))) @@ -1627,8 +1629,13 @@ This mode is a simplified version of `adoc-mode'." (setq result `(,@result ,(buffer-substring-no-properties start (point)))))) - result))) -;; (apply 'concat (my-file-head "./shrc" 10)) + result + ;; (buffer-substring-no-properties (point-min) + ;; (progn + ;; (forward-line num) + ;; (point))) + ))) +;; (apply 'concat (my-file-head "./shrc" 10) (set-variable 'dumb-jump-prefer-searcher 'rg)