Emacs启动日志

郭奕
• 阅读 3420

Emacs启动日志

如上图,在Emacs启动之后会新建一个名为Startup Log的缓冲区,在其中显示ELisp扩展包的启动状态。代码如下:

(defmacro require-maybe (feature &optional file)
  "*Try to require FEATURE, but don't signal an error if `require' fails."
  `(let ((require-result (require ,feature ,file 'noerror)))
     (with-current-buffer (get-buffer-create "*Startup Log*")
       (let* ((startup-log-format-string-prefix "%-20s--------[")
              (startup-log-format-string-postfix "%s")
              (startup-status (if require-result "LOADED" "FAILED"))
              (startup-status-face `(face (:foreground
                                           ,(if require-result "green" "red")))))
         (insert (format startup-log-format-string-prefix ,feature))
         (let ((start-pos (point)))
           (insert (format startup-log-format-string-postfix startup-status))
           (add-text-properties start-pos (point) startup-status-face)
           (insert "]\n"))))
     require-result))

(provide 'require-maybe)

init.el中首先require 'require-maybe,然后其他包都以require-maybe 'name的方式启动即可,如下图所示:
Emacs启动日志

点赞
收藏
评论区
推荐文章
Wesley13 Wesley13
3年前
RAC环境单实例启动数据库收到ORA
     在RAC环境中,如果你在没有启动节点的集群服务的情况下单实例启动数据库,将收到类似如下的报错:\oracle@rhel1u01\$sqlSQL\Plus:Release10.2.0.5.0ProductiononTueApr215:00:272013Copyright(
Stella981 Stella981
3年前
Emacs在minibuffer里的操作
|Key  |Description                             ||||Cw  |
Stella981 Stella981
3年前
Emacs 27.1 不识别系统字体的解决方案
一直以来习惯在终端上使用Emacs,最近尝试了一下emacslibvterm,于是在GUI下使用了一下,设置字体的时候发现无法识别系统已经安装的字体。系统环境为debianbuster,emacs27.1,从源码编译的版本,惯用的字体为FiraCode(https://www.oschina.net/action/GoToLin
Stella981 Stella981
3年前
Linux Deepin 使用日常记录
1.解决启动FailedtostartLoadKernelModules的错误Deepin启动时会提示FailedtostartLoadKernelModules的错误,但是不影响启动,可以进入系统,下图是在启动日志中的截图(/var/log/boot.log)!(https://oscimg.oschina.net/oscn
Stella981 Stella981
3年前
Emacs 学习笔记
1. Cv 向下翻页2. Mv向上翻页3. Cl 将光标位居中4. Cn 下一行next5. Cp 上一行previous6. Cb 光标backward7. Cf  光标forward8. Mf
Stella981 Stella981
3年前
Emacs for Go
InthispostI'mgoingtoexplorecustomizingEmacstomakehackingonGoalittlemorefluid.ThisisalivingdocumentandwillprobablybeupdatedasIdiscovernewmodesandto
Wesley13 Wesley13
3年前
ubuntu 安装最新 emacs
引用自 https://launchpad.net/~cassou/archive/ubuntu/emacs(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Flaunchpad.net%2F%7Ecassou%2F%2Barchive%2Fubuntu%2Femacs)To
Wesley13 Wesley13
3年前
04.Android崩溃Crash库之Loop拦截崩溃和ANR
目录总结01.能否利用Looper拦截崩溃02.思考几个问题分析03.App启动时自动开启Looper04.拦截主进程崩溃前沿上一篇整体介绍了crash崩溃库崩溃重启,崩溃记录记录,查看以及分享日志等功能。项目地址:https://github.com/yangchong
Stella981 Stella981
3年前
Emacs笔记
Emacs转移HOME配置:(setenv"HOME""path/to/dir")(load"~/.emacs.d/init.el")emacsclient用root权限修改文件:/sudo:root@localhost:/etc/fstab用sudo去编辑文本:(defunsudo()"
Wesley13 Wesley13
3年前
2.MySQL日志
MySQL日志分类  MySQL日志主要包含:错误日志、查询日志、慢查询日志、重做日志、回滚日志、二进制日志错误日志:  用来记录MySQL服务器运行过程中的错误信息,比如,服务器启动关闭信息、运行错误信息、时间调度器运行一个事件时产生的信息、在服务器上启动进程产生的信息。  错误日志可以自己配置,lo
奇怪!应用的日志呢??
1.问题回顾问题背景是在进行中台应用中间件迁移过程中,发现存在项目启动失败或者项目正常启动(jsf正常挂载并正常运行,mq正常发送和消费)但是无任何日志打印现象。更奇怪的是不打印日志竟然是偶发的,在测试环境中多次部署都未出现项目启动但无日志打印情况,而且玄