🌓

Arch Linux用户:大胆使用--force升级ttf-dejavu到2.37版本

来源

对于最新的ttf-dejavu 2.37,需要使用pacman -S --force ttf-dejavu进行安装。

阅读全文

Emacs的refcard

以前我自己整理过一些Emacs的基本按键,当然不太成功。最近知道,原来Emacs有官方的refcard,比如Emacs的就是下面的两张:

阅读全文

Apple终结了Emacs和Vi(m)的圣战

Apple finally weighs in on the Vim vs. Emacs debate. Chooses Emacs, removes the escape key.

https://www.reddit.com/[object Object]comments/59dq60/apple_finally_weighs_in_on_the_vim_vs_emacs/

阅读全文

今天必应(Bing)的壁纸

今天(2019-Oct-29)必应的壁纸挺好看的,如果你没看到,这里有。

我把首页的banner也换成这个图了,好看么?

阅读全文

Octave和shell-mode的几个小技巧

假期折腾了很多东西,但没有完整的记录,等回忆的时候才有点慌。没记住的就算了,把记住的东西记下来也不错。

Octave里角度制的三角函数

Octave里默认的三角函数,比如sincos等用的单位是弧度制,就是说π是180°,我以前总用蹩脚的方式把角度换算到弧度来计算:

1
sin(30/180 * pi)

后来总算是怒了,查了一下,发现有相关的函数,以“d”结尾,就是sindcosd等,所以上面的代码用sind(30)就行了。

阅读全文

调侃知乎的段子

十一假期某城市的星巴克里,一对情侣背着包想必是逛完一处来歇脚,女的意犹未尽,兴奋地问男的喝什么,男的一脸疲态,尽是不耐烦。店内拥挤,但男的还是抢到了一个位子,在人挤人中,他拿出笔记本熟练地打开一个网站,我看见他打了两个字,然后露出久违的笑容,准备一鼓作气大干一番,那两个字是「谢邀」。

阅读全文

调侃手机品牌的段子

2016-10-13 Update: 加了两个链接方便读者理解内涵,改了一个段子里的错别字,还改了一下格式。另外,新增了一个笑话段子分类。

阅读全文

Fix a not enough memory error in ORCA under Windows

Using ORCA under Windows is painful. However, this does not dim the light of ORCA. Today I met a “not enough memory” error. The following are the details.

Phenomenon: The ORCA 3.0.3 Windows 64-bit version was used under Windows 8.1. The calculation was run in single-process mode (I can’t make the parallel version work 😢). Since the auxiliary basis set def2-QZVPP/C was used, MP2 should be calculated. But a error occurred:

阅读全文

用kill-this-buffer简化代码

最近有两个有关删除buffer的讨论[1][2],我用这个技巧已经很长时间了,但我的写法有点繁琐:

阅读全文

Workaround a bug for octave-mode of Emacs 25.2.50 under MS-Windows

When I switched to the master branch of Emacs, I found that octave-mode doesn’t work correctly. The run-octave will result in the crash of “octave-gui.exe”, even without the configuration file. Afer hours of digging, I think the problem is related to the default-directory. That is, no matter what the PATH is, only when the default-directory being the directory of octave program can make it work. This may relate to the octave, but in Emacs 24.5 run-octave works correctly. Strang enough. I can workaround the problem by temporarily setting the default-directory. The code looks like:

1
2
3
(let ((default-directory (file-name-directory
(executable-find inferior-octave-program))))
(run-octave))

MS-Windows下变通解决Emacs 25.2.50的octave-mode的bug

当换到master分支后,我发现octave-mode工作不正常了,现象是“octave-gui.exe”崩溃。我捉摸了好长时间,觉得问题出在default-directory取值的问题,不论PATH怎么设置,只有default-directory是octave.exe所在目录时才不会崩溃。这似乎和octave有关系,但Emacs 24.5是正常的,很奇怪。要完全解决这个问题我的功力恐怕不够,只要暂时设置default-directory就好了。代码就像下面的样子:

阅读全文