Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zonuexe/init-open-recentf.el
open-recentf on Emacs startup
https://github.com/zonuexe/init-open-recentf.el
Last synced: about 1 month ago
JSON representation
open-recentf on Emacs startup
- Host: GitHub
- URL: https://github.com/zonuexe/init-open-recentf.el
- Owner: zonuexe
- License: gpl-3.0
- Created: 2015-10-26T00:26:49.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-02-20T20:04:44.000Z (almost 3 years ago)
- Last Synced: 2024-10-27T05:21:38.714Z (3 months ago)
- Language: Emacs Lisp
- Homepage: https://www.emacswiki.org/emacs/ZonuExe
- Size: 43.9 KB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE.md
Awesome Lists containing this project
README
* init-open-recentf.el
#+BEGIN_HTML
#+END_HTMLOpen recentf immediately after Emacs is started.
Here are some example scenarios for when Emacs is started from the command line:
- If files are opened (e.g. =$ emacs file1.txt=), nothing out of the ordinary occurs-- the file is opened.
- However if a file is not indicated (e.g. =$ emacs =), recentf will be opened after emacs is initialized.
This script uses only the inbuilt advice function for startup. It does not require or use any interactive function.** Setup
Put the following into your .emacs file (=~/.emacs.d/init.el=)
#+BEGIN_SRC emacs-lisp
(init-open-recentf)
#+END_SRC=init-open-recentf= supports the following frameworks: [[https://github.com/minad/consult][Consult]], [[https://emacs-helm.github.io/helm/][Helm]], [[https://www.gnu.org/software/emacs/manual/ido.html][IDO]], [[https://github.com/abo-abo/swiper][Ivy/Counsel]] and [[https://www.emacswiki.org/emacs/Anything][Anything]] (and the default Emacs setup without those frameworks).
The package determines the frameworks from your environment, but you can also indicate it explicitly.
#+BEGIN_SRC emacs-lisp
(setq init-open-recentf-interface 'ido)
(init-open-recentf)
#+END_SRCAnother possible configuration is demonstrated below if you want to specify an arbitrary function.
#+BEGIN_SRC emacs-lisp
(setq init-open-recentf-function #'awesome-open-recentf)
(init-open-recentf)
#+END_SRC** Hook
#+BEGIN_SRC emacs-lisp
(add-hook 'init-open-recentf-after-hook 'your/init-func)(add-hook
'init-open-recentf-before-hook
(lambda ()
(with-current-buffer "*scratch*"
(unless buffer-read-only
(goto-char (1- (point-max)))
(insert "
;; r /
;; __ , --ヽ!-- .、_
;; ! `/::::;::::ヽ l
;; !二二!::/}::::丿ハニ|
;; !ニニ.|:/ ノ/ }::::}コ
;; L二lイ 0´ 0 ,':ノコ
;; lヽノ/ヘ、 '' ▽_ノイ ソ
;; ソ´ /}`ス / ̄ ̄ ̄ ̄/
;; .(_:;つ/ 0401 / カタカタ
;;  ̄ ̄ ̄ ̄ ̄\/____/
")))))
#+END_SRC** Installation
*** Cask (without [[https://github.com/rdallasgray/pallet][pallet]])
See the [[http://cask.readthedocs.org/en/latest/guide/installation.html][Cask Installation]] guide. Put into your =Cask= file the following.
#+BEGIN_SRC emacs-lisp
(depends-on "init-open-recentf")
#+END_SRC
*** MELPA
See [[http://melpa.org/#/getting-started][Getting Started - MELPA]]. =M-x package-install= and type =init-open-recentf=.
*** El-get
See [[https://github.com/dimitri/el-get#installation][El-Get #Installation]]. Put into your =init.el= file the following.
#+BEGIN_SRC emacs-lisp
(el-get-bundle init-open-recentf)
#+END_SRC