时政
财经
科技
虚拟货币
其他
登录
#emacs
关注
Andy Stewart
4小时前
看到Emacs道友在讨论 load-path 对启动速度的影响 其实Emacs内置的 load-path 比较傻,会扫描过多的目录内容,扫描的无关文件太多就会影响Emacs的启动速度 其实可以用我10年前写的 add-subdirs-to-load-path,可以根据自己的目录情况写忽略规则,轻松实现400多个插件,秒开 (defun add-subdirs-to-load-path (search-dir) (interactive) (let* ((dir (file-name-as-directory search-dir))) (dolist (subdir ;; 过滤出不必要的目录,提升Emacs启动速度 (cl-remove-if #'(lambda (subdir) (or ;; 不是目录的文件都移除 (not (file-directory-p (concat dir subdir))) ;; 父目录、 语言相关和版本控制目录都移除 (member subdir '("." ".." "dist" "node_modules" "__pycache__" "RCS" "CVS" "rcs" "cvs" ".git" ".github")))) (directory-files dir))) (let ((subdir-path (concat dir (file-name-as-directory subdir)))) ;; 目录下有 .el .so .dll 文件的路径才添加到 `load-path' 中,提升Emacs启动速度 (when (cl-some #'(lambda (subdir-file) (and (file-regular-p (concat subdir-path subdir-file)) ;; .so .dll 文件指非Elisp语言编写的Emacs动态库 (member (file-name-extension subdir-file) '("el" "so" "dll")))) (directory-files subdir-path)) ;; 注意:`add-to-list' 函数的第三个参数必须为 t ,表示加到列表末尾 ;; 这样Emacs会从父目录到子目录的顺序搜索Elisp插件,顺序反过来会导致Emacs无法正常启动 (add-to-list 'load-path subdir-path t)) ;; 继续递归搜索子目录 (add-subdirs-to-load-path subdir-path))))) (add-subdirs-to-load-path "/usr/share/emacs/lazycat")
#emacs
#load-path
#启动速度
#插件优化
#add-subdirs-to-load-path
分享
评论 0
0
Larry & Leo Bro - Eagle of Full Stack
1个月前
What? Claude Code 发布了一个杀手级应用!那就是 C-g 在 Emacs 中编辑 prompt 的功能! 这简直是瞄准了我的需求做的! 太棒了!
AI编程工具激战:Claude Code、Gemini Cli崛起· 1169 条信息
#Claude Code
#C-g
#emacs
#prompt编辑
#积极
分享
评论 0
0
Andy Stewart
1个月前
开读,我一个驴友朋友,也是战略辅导的老师告诉我,你如果要懂美国,一定要读这套书 今天开读,看来我构建Emacs下一代图形环境的欲望还是比不过看书 Emacs fans再等等吧 ,我读书很快😂
#读书
#美国
#emacs
#学习
#朋友推荐
分享
评论 0
0
risent
1个月前
比看老板卖懒猫微服、玩 Emacs 更让人羡慕的是种地、摘葡萄😄
#老板
#懒猫
#emacs
#种地
#葡萄
#羡慕
#积极
分享
评论 0
0
卫斯理
1个月前
今天在公司闲的无聊配置一下emacs
#公司
#emacs
#配置
#无聊
#中性
分享
评论 0
0
Larry & Leo Bro - Eagle of Full Stack
1个月前
解锁 claude code 新玩法! 让 claude code 帮我: 安装 Emacs package, 然后跑个 headless emacs 测试!很有意思! Emacs 道友,你这么玩过吗?
AI编程工具激战:Claude Code、Gemini Cli崛起· 1169 条信息
#Claude Code
#emacs
#headless emacs
#package安装
#技术玩法
分享
评论 0
0
Larry & Leo Bro - Eagle of Full Stack
4个月前
O3 与 Claude Code 之战,Claude Code 完胜! 想自己在 Emacs 里糊一个文件加入 magit 暂存区自动调用 AI 生成 commit message 的小功能,O3 搞了一个小时,一直有个问题没解决(获取不到暂存区的 git diff 输出),我气坏了,直接发给 Claude Code, 两次交互解决问题。 我是真的气,为什么要在这么弱的程序员这浪费这一个小时呢?程序员们,对自己好点,赶紧开除 ChatGPT 换 Claude Code 吧!
AI编程工具激战:Claude Code、Gemini Cli崛起· 1169 条信息
#o3
#Claude Code
#emacs
#magit
#git diff
#AI
#commit message
分享
评论 0
0
Mr Panda
5个月前
要是能成功打入 emacs 社区,受益绝对很大。 能把emacs 这么难学的东西学会, 还能玩的特别有意思的大佬, 都因为emacs 聚集在了一起, 应该是一个非常特别的圈子。
#emacs
#开源社区
#技术圈子
#学习编程
分享
评论 0
0
Mr Panda
5个月前
emacs 的大佬们,你们是怎么渡过新手期呢
#emacs
#新手期
#学习经验
分享
评论 0
0
个人主页
通知
我的投稿
我的关注
我的拉黑
我的评论
我的点赞