<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Emacs on KK's Blog (fromkk)</title><link>https://fromkk.com/tags/emacs/</link><description>Recent content in Emacs on KK's Blog (fromkk)</description><generator>Hugo</generator><language>en</language><managingEditor>bebound@gmail.com (KK)</managingEditor><webMaster>bebound@gmail.com (KK)</webMaster><lastBuildDate>Sun, 10 Aug 2025 18:44:06 +0800</lastBuildDate><atom:link href="https://fromkk.com/tags/emacs/index.xml" rel="self" type="application/rss+xml"/><item><title>Emacs Chinese-related Settings</title><link>https://fromkk.com/posts/emacs-chinese-related-settings/</link><pubDate>Thu, 17 Feb 2022 01:27:00 +0800</pubDate><author>bebound@gmail.com (KK)</author><guid>https://fromkk.com/posts/emacs-chinese-related-settings/</guid><description>&lt;h2 id="auto-switch-input-method-in-evil"&gt;Auto Switch Input Method in Evil&lt;/h2&gt;
&lt;p&gt;This setting makes it possible to switch input method based on the context of cursor when entering insert mode.&lt;/p&gt;
&lt;h3 id="sis"&gt;sis&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;m using &lt;code&gt;sis&lt;/code&gt; package with this configuration. You may need to install &lt;code&gt;macism&lt;/code&gt; if you&amp;rsquo;re not using &lt;code&gt;railwaycat/emacsmacport&lt;/code&gt;. More settings can be found in &lt;a href="https://github.com/laishulu/emacs-smart-input-source" target="_blank" rel="noopener noreffer "&gt;emacs-smart-input-source&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-elisp" data-lang="elisp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(sis-ism-lazyman-config
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;com.apple.keylayout.US&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;com.apple.inputmethod.SCIM.ITABC&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(sis-global-cursor-color-mode &lt;span style="color:#66d9ef"&gt;t&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(sis-global-respect-mode &lt;span style="color:#66d9ef"&gt;t&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(sis-global-context-mode &lt;span style="color:#66d9ef"&gt;t&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(sis-global-inline-mode &lt;span style="color:#66d9ef"&gt;t&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="fcitx"&gt;fcitx&lt;/h3&gt;
&lt;p&gt;You can also install &lt;a href="https://github.com/xcodebuild/fcitx-remote-for-osx" target="_blank" rel="noopener noreffer "&gt;fcitx-remote for-osx&lt;/a&gt; and use &lt;code&gt;cute-jumper/fcitx.el&lt;/code&gt; to do so. As &lt;code&gt;homebrew&lt;/code&gt; no longer support some build options, you need to follow the install instructions in the GitHub repository to build &lt;code&gt;fcitx&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>C-m, RET and Return Key in Emacs</title><link>https://fromkk.com/posts/c-m-ret-and-return-key-in-emacs/</link><pubDate>Sat, 11 Apr 2020 21:23:00 +0800</pubDate><author>bebound@gmail.com (KK)</author><guid>https://fromkk.com/posts/c-m-ret-and-return-key-in-emacs/</guid><description>&lt;p&gt;I use Emacs to write blog. In the recent update, I found &lt;code&gt;M-RET&lt;/code&gt; no longer behave as leader key in org mode, but behave as &lt;code&gt;org-meta-return&lt;/code&gt;. And even more strange is that in other mode, it behave as leader key. And &lt;code&gt;M-RET&lt;/code&gt; also works in terminal in org mode. In GUI, pressing &lt;code&gt;C-M-m&lt;/code&gt; can trigger leader key.&lt;/p&gt;
&lt;p&gt;SO I opened this &lt;a href="https://github.com/syl20bnr/spacemacs/issues/13374" target="_blank" rel="noopener noreffer "&gt;issue&lt;/a&gt;, with the help of these friends, the issue has been fixed. Here is the cause of the bug.&lt;/p&gt;</description></item><item><title>Preview LaTeX in Org Mode with Emacs in MacOS</title><link>https://fromkk.com/posts/preview-latex-in-org-mode-with-emacs-in-macos/</link><pubDate>Sun, 12 May 2019 20:26:00 +0800</pubDate><author>bebound@gmail.com (KK)</author><guid>https://fromkk.com/posts/preview-latex-in-org-mode-with-emacs-in-macos/</guid><description>&lt;h2 id="using-the-right-emacs-version"&gt;Using the right Emacs Version&lt;/h2&gt;
&lt;p&gt;I failed to preview LaTeX with &lt;code&gt;emacs-plus&lt;/code&gt;. If you have installed &lt;code&gt;d12frosted/emacs-plus&lt;/code&gt;, uninstall it and use &lt;code&gt;emacs-mac&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-nil" data-lang="nil"&gt;brew tap railwaycat/emacsmacport
brew install emacs-mac
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you like the fancy spacemacs icon, install it with cask: &lt;code&gt;brew cask install emacs-mac-spacemacs-icon&lt;/code&gt;&lt;/p&gt;
&lt;h2 id="install-tex"&gt;Install Tex&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Download and install BasicTeX.pkg &lt;a href="http://www.tug.org/mactex/morepackages.html" target="_blank" rel="noopener noreffer "&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;/Library/TeX/texbin&lt;/code&gt; to PATH.&lt;/li&gt;
&lt;li&gt;Install &lt;code&gt;dvisvgm&lt;/code&gt; by &lt;code&gt;sudo tlmgr update --self &amp;amp;&amp;amp; sudo tlmgr install dvisvgm collection-fontsrecommended&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="emacs-settings"&gt;Emacs settings&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Add TeX related bin to path: &lt;code&gt;(setenv &amp;quot;PATH&amp;quot; (concat (getenv &amp;quot;PATH&amp;quot;) &amp;quot;:/Library/TeX/texbin&amp;quot;))&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Tell Org Mode to create svg images: &lt;code&gt;(setq org-latex-create-formula-image-program 'dvisvgm)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now you can see the rendered LaTeX equation by calling &lt;code&gt;org-preview-latex-fragment&lt;/code&gt; or using shortcut &lt;code&gt;,Tx&lt;/code&gt;.&lt;/p&gt;</description></item></channel></rss>