【讨论】一种提升英文阅读体验的可能性

我最近在使用 solarized-theme 主题时也被这个 x-underline-at-descent-line 坑了,这个值上游不应该设置默认为 t 吗?

默认情况下,solarized-theme 开启时,mode-line 的下划线不会和mode-line 的下边缘重合。

设置了(setq x-underline-at-descent-line t) 后,效果就很好了。

我觉得你把问题想复杂了,单词的各种变形可单独为词典中的词条,就不用词干提取,不知我的想法对不对。 另外,我觉得 skywind 提供的词典 不错

1.6倍行距那张图真的看起来很舒服。 但是请教一个问题,我设置了 line spacing 和line height 并设置了 fill column 折行。 出现了一个奇怪的状况,折行后最后一行的行距明显变得比较宽。 而且宽度收到line height 的影响。不知道是为什么。 看您的图中折行的最后一行宽度和前面的宽度是保持一致的。

我的相关配置:

(setq-default   cursor-type '(bar . 3) ; 光标改为竖线,并加粗为三倍宽度
                cursor-in-non-selected-windows nil ; 不在焦点的窗口隐藏光标
                auto-window-vscroll nil
                default-text-properties '(line-spacing 0.6 line-height 1.8) ; 调整行高和列宽
                frame-title-format "%b"
                mode-line-compact t
                set-language-environment "UTF-8" ; 调整编码格式为 UTF-8
                make-backup-files nil ; 不再自动生成备份(带~的文件)
                read-process-output-max (* 4 1024 1024)
                require-final-newline t ;  文件结尾必有空行
                mark-even-if-inactive nil
                fill-column 100
                system-time-locale "C"
                initial-major-mode 'org-mode ; 默认主模式
                default-directory "~/Lair/Org" ; 默认文件位置
                column-number-mode 1) ; Modeline 显示列位置
(use-package visual-fill-column
  :ensure t
  :hook (org-mode . (lambda ()
					  (setq visual-fill-column-width 88)
					  (setq visual-fill-column-center-text t)
					  (visual-fill-column-mode 1))))
(set-face-attribute 'org-level-1 nil :foreground "#000000" :height 1.12 :bold t) ;; #2E3440
(set-face-attribute 'org-level-2 nil :foreground "#000000" :height 1.1 :bold t) ;; #2E3440
(set-face-attribute 'org-level-3 nil :foreground "#000000" :height 1.04 :bold t) ;; #3B4252
(set-face-attribute 'org-level-4 nil :foreground "#000000" :height 1.02 :bold t) ;; #3B4252
(set-face-attribute 'org-level-5 nil :foreground "#000000" :height 1.02 :bold t) ;; #434C5E
(set-face-attribute 'org-level-6 nil :foreground "#000000" :height 1.02 :bold t) ;; #434C5E
(set-face-attribute 'org-level-7 nil :foreground "#000000" :height 1.02 :bold t) ;; #4C566A
(set-face-attribute 'org-level-8 nil :foreground "#000000" :height 1.02 :bold t) ;; #4C566A
(set-face-attribute 'org-headline-done nil :foreground "#99A3B6")

我的截图里是在 elfeed 下的截图,org mode 没有用 visual-fill-column ,也没有设置 line-height 。所以我可能帮不了您什么,建议用二分法试试。

好嘞。我去排查排查。

自问自答一下,这几天抽时间挨个排查了下相关的配置。 发现是

(setq-default default-text-properties '(line-spacing 0.6 line-height 1.8)

这个配置的问题。 直接使用

(setq-default ine-spacing 0.5)

就好了。

之前的配置是刚开始用Emacs 的时候这里那里一点点抄来的,之前配置的line spacing 是0.2,基本看不出来最后一行的区别,一直也没调整过,直到前几天。

调整 text properties 为啥会导致只有折行的最后一行的行距变化,看了半天Emacs wiki 的内容也没看明白。看来搞不明白的配置还是不要轻易直接拿来用或者改的好。

windows11 emacs29.4 测试用 d-o render 了一上 eww 文章 报如下错:

Error (websocket): in callback `on-message': Wrong type argument: hash-table-p, nil

如果执行 dictionary-overlay-jump-first-unknown-word 则报

car: Wrong type argument: stringp, nil

换了另一篇文章,报错为

[WebsocketBridge] Server start websocket server on port 52214
[WebsocketBridge] Server has start. [2 times]
For information about GNU Emacs and the GNU system, type C-h C-a.
Contacting host: yitang.uk:80
Dictionary-Overlay not ready, please wait a second.
[WebsocketBridge] Server has start. [2 times]
Making completion list...
if: Cannot send message to a closed websocket: #s(websocket-frame text "[\"data\",[\"render\",\"[ ] \\n\\n   Life can only be understood backwards; but it must be lived forwards.        S  ren\\nKierkegaard \\n\\nHome About Me Blog Posts \\n\\nYi Tang Data Science and Emacs \\n\\nSetup ssh-agent Systemd Service for Emacs\\n\\n26 Jan 2025 \\n\\nProblem Statement\\n\\nMy personal desktop is not booting (the motherboard is probably dead) so I have been\\nsetting my server so I can work while sorting things out.\\n\\nI got stuck in getting magit working in emacsclient: I thought I could run ssh-add inside of\\nEmacs that would allow magic to access my git repos using ssh, but apparently, it is not\\nthe case.\\n\\nAfter some digging, I learnt that the problem I have to solve is to run one ssh-agent in the\\nbackground and then make the Emacs/Magit or any programs hook onto it. Then once I\\nrun ssh-add and type the passphrase for the first time, either inside of Emacs or in a\\nbash terminal, everything would work.\\n\\nImplementation\\n\\nDrop the following unit file below to ~/.config/systemd/user/ssh-agent.service.\\n\\n[Unit]\\nDescription=SSH key agent\\n\\n[Service]\\nType=simple\\nEnvironment=SSH_AUTH_SOCK=%t/ssh-agent.socket\\nExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK\\n\\n[Install]\\nWantedBy=default.target\\n\\nThe important things are\\n\\n1 The environment variable SSH_AUTH_SOCK is specified. It can be anywhere as long as this\\n environment variable in other programs points to the same location.\\n2 ssh-agent is invoked with the -a option to provide an address specified in the above step.\\n\\nThe $t is a specifier1 in systemd, it is equivalent to $XDG_RUNTIME_DIR variable in Debian. It\\npoints to the runtime temporary directory which apparently is safer2 than the /tmp\\ndirectory. The runtime directory was cleaned up after stopping the ssh-agent so it is\\nnon-persistent.\\n\\nTo start the ssh-agent service:\\n\\n \\nsystemctl enable --user ssh-agent\\nsystemctl start --user ssh-agent\\n\\nAfter that, update the unit file of Emacs to include this line (follow up my blog post\\nManaging Emacs Server as Systemd Service for the full setup).\\n\\nEnvironment=SSH_AUTH_SOCK=%t/ssh-agent.socket\\n\\nTo make it work for bash shell and all other programs calling from a bash terminal, add\\nthis line to ~/.bashrc.\\n\\n \\nexport SSH_AUTH_SOCK=\\\"$XDG_RUNTIME_DIR/ssh-agent.socket\\\"\\n\\nAlternatives\\n\\nThere are programs developed to solve this specific problem (see Debian wiki). While\\nusing such a program seems like a simpler alternative (e.g. keychain), I prefer to use\\nsystemd as the unified approach for managing background services. I have been using\\nit for emacsclient, and I   m adding ssh-agent to it.\\n\\nWhat is your preference? How do you solve this problem?\\n\\nFootnotes\\n\\n1 All the specifiers are listed here.\\n\\n2 I am not a security expert but the StackExchange comments seem to make sense.\\n\\nRelated Posts\\n\\n* Retiring Raspberry Pi 4 as Home Server and NAS 20 Jan 2025 \\n\\n* Use Ledger-Cli to Track DIY Project Expenses 14 Jan 2025 \\n\\n* Finding Highly Correlated Features 20 Oct 2024 \\n\\nIf you have any questions or comments, please post them below. If you liked this post,\\nyou can share it with your followers or follow me on Twitter! SVG Image SVG Image SVG Image \\nPlease enable JavaScript to view the comments powered by Disqus. comments\\npowered by Disqus \\n\",6,\"*eww*\"]]" nil t)

jump下一个生词报错同上