感谢回复!
用了你给的配置后,html
的邮件确实能正确render了,但是背景确是白的,我是暗色主题啊。。。
如下图:
很好用,顶起!
应该是你的mu4e
配置问题,尝试增加以下的配置取消颜色:
(defun mu4e-view-mode-setup ()
(setq shr-color-visible-luminance-min 60)
(setq shr-color-visible-distance-min 5)
(setq shr-use-colors nil)
(advice-add #'shr-colorize-region :around (defun shr-no-colourise-region (&rest ignore)))
(add-hook 'mu4e-view-mode-hook #'mu4e-view-mode-setup)
今天又花了点时间,将shrface-href-face拆分成更多的faces,
shrface-href-http-face
shrface-href-https-face
shrface-href-ftp-face
shrface-href-file-face
shrface-href-mailto-face
shrface-href-other-face
通过 (setq shrface-href-versatile t)
就能开启多类型链接的样式化。如果是Nil,默认使用一种 shrface-href-face
,就是继承 org-link
的样式。
发现 nov.el 配置有bug,建议用户修改一下:
(setq nov-shr-rendering-functions '((img . nov-render-img) (title . nov-render-title))) ; reset nov-shr-rendering-functions, in case of the list get bigger and bigger
(setq nov-shr-rendering-functions (append nov-shr-rendering-functions shr-external-rendering-functions))
从2.2版开始,shrface不仅只是给HTML和nov美化,而且还是您的科研助手。
我喜欢DEVONthink的概念。将所有文档都存到一个数据库中并加以分析。 emacs呢?
Emacs拥有org,但这还不够。我喜欢将网页保存到本地HTML文件中,或将其导出到epub文件中以供日后研究。 我相信shrface能将Emacs引领新方向:更多的对Web / HTML / epub文件的分析功能。
我很高兴将分析功能引入eww,emacs的内置HTML浏览器。当然,因为它基于shr。这意味着它可以在eww,nov.el,dash-docs,mu4e等上运行。
我最新的尝试,将文件所有的链接列出来,并分类,放在缓存 buffer *shrface-links*
,利用all-the-icons
添加图标以便辨认。缓存buffer支持折叠,鼠标左键单击/键盘Enter(跳到链接所在文件位置),中键(复制链接),右键(用外部浏览器打开链接)。
M-x
shrface-links
现在 Melpa
上可以下载 shrface
了。
Version 2.3: 增加 shrface-toggle-bullets
,只想美化 html,但是又不想用 org 的 bullets 的时候,就可以随时用这个 function,记得 toggle 后要刷新buffer,可以 M-x eww-reload
。
非常好用!大大提升阅读效率!关于循环折叠,我有一个疑问,比如说nov中的书籍结构如下:
* head1
text 1
** head1.1
text 1.1
*** head1.1.1
text 1.1.1
*** head1.1.2
text 1.1.2
** head1.2
text 1.2
循环折叠的时候,我期望是跟org-mode体验一致,在以下三种中进行循环切换:
* head 1
* head1
** head1.1
*** head1.1.1
*** head1.1.2
** head1.2
* head1
text 1
** head1.1
text 1.1
*** head1.1.1
text 1.1.1
*** head1.1.2
text 1.1.2
** head1.2
text 1.2
而目前shrface的切换方式如下:
* head 1
* head1
text 1
...
* head1
text 1
** head1.1
text 1.1
*** head1.1.1
text 1.1.1
*** head1.1.2
text 1.1.2
** head1.2
text 1.2
并没有一个视图是展示所有的大纲,个人觉得显示所有大纲的视图对于快速浏览帮助很大。请问shrface是专门设计成这种循环方式的么?
这是已知问题,github的其中一个issue。
如果用org-cycle这个函数,会有一些问题,因为org-cycle会调用org-children,而这个函数我没有提供overwrite,因为里面hardcode了对标题的正则表达式,暂时没办法解决,除非overwrite,org-children,但是我不太建议。
如果使用outline-cycle,但是outline-cycle也有问题,因为毕竟没有org-cycle功能完善。
其次,org-cycle是用*做标题,我这个包并不是,而是用真正的bullet做标题,会有差别。所以正则表达式也需要改进。
目前在找更好的解决方法。
outline-cycle可以显示所有大纲,或者你用imenu-list,shtface-occur,shrface-headline-counsel配合ivy-occur,shrface-headline-helm配合helm-occur都可以显示大纲。
能不能给shr加个针对特定网址的元素过滤器,哪些隐藏哪些显示
不太懂,你是说类似黑名单的那种吗?
不是,是过滤出一些标签比如列表,可以隐藏显示或者用其他的方式来呈现,有时候用eww看文档,有些html元素太站位置,又不能处理css,不如就隐藏起来