<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JayXie&#039;s blog &#187; Emacs</title>
	<atom:link href="http://jayxie.com/category/emacs/feed" rel="self" type="application/rss+xml" />
	<link>http://jayxie.com</link>
	<description>Around emacs, linux, etc.</description>
	<lastBuildDate>Sat, 15 May 2010 13:37:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>export org-mode file in command line</title>
		<link>http://jayxie.com/2009/01/19/export-org-mode-file-in-command-line.html</link>
		<comments>http://jayxie.com/2009/01/19/export-org-mode-file-in-command-line.html#comments</comments>
		<pubDate>Mon, 19 Jan 2009 05:48:07 +0000</pubDate>
		<dc:creator>Jay Xie</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://jayxie.com/?p=199</guid>
		<description><![CDATA[
see <a href="http://thread.gmane.org/gmane.emacs.orgmode/7675">http://thread.gmane.org/gmane.emacs.orgmode/7675</a> for more informations
以下是我用来export单个文件的命令
生成html

emacs --batch --eval '(progn (setq user-full-name &#34;Your Name&#34;)(setq user-mail-address &#34;Your Mail Address&#34;)(find-file &#34;/path/to/file.org&#34;)(org-export-as-html 3))'

生成txt

emacs --batch --eval '(progn (setq user-full-name &#34;Your Name&#34;)(setq user-mail-address &#34;Your Mail Address&#34;)(find-file &#34;/path/to/file.org&#34;)(org-export-as-ascii 3))'


]]></description>
			<content:encoded><![CDATA[<p>see <a href="http://thread.gmane.org/gmane.emacs.orgmode/7675">http://thread.gmane.org/gmane.emacs.orgmode/7675</a> for more informations</p>
<p>以下是我用来export单个文件的命令</p>
<p>生成html</p>
<pre class="brush: bash;">
emacs --batch --eval '(progn (setq user-full-name &quot;Your Name&quot;)(setq user-mail-address &quot;Your Mail Address&quot;)(find-file &quot;/path/to/file.org&quot;)(org-export-as-html 3))'
</pre>
<p>生成txt</p>
<pre class="brush: bash;">
emacs --batch --eval '(progn (setq user-full-name &quot;Your Name&quot;)(setq user-mail-address &quot;Your Mail Address&quot;)(find-file &quot;/path/to/file.org&quot;)(org-export-as-ascii 3))'
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jayxie.com/2009/01/19/export-org-mode-file-in-command-line.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>segment fault when dump-emacs</title>
		<link>http://jayxie.com/2008/12/01/segment-fault-when-dump-emacs.html</link>
		<comments>http://jayxie.com/2008/12/01/segment-fault-when-dump-emacs.html#comments</comments>
		<pubDate>Mon, 01 Dec 2008 04:15:38 +0000</pubDate>
		<dc:creator>Jay Xie</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://jayxie.com/?p=173</guid>
		<description><![CDATA[
dump-emacs 是个好东西，不过最近老是dump失败
gdb了一下 发现挂在unexec那
google之至<a href="http://bugs.gentoo.org/show_bug.cgi?id=221281#c6">http://bugs.gentoo.org/show_bug.cgi?id=221281#c6</a>

The breakage is caused by the &#8220;randomize brk()&#8221; patch.
See the LKML, <a href="http://lkml.org/lkml/2007/10/23/435:">http://lkml.org/lkml/2007/10/23/435:</a>

This is known to break older versions of some emacs variants, whose
dumper code assumed that the last variable declared in the program is
equal to the start of the dynamically allocated memory region.
The corresponding kernel parameter is accessible via
/proc/sys/kernel/randomize_va_space, the breakage occurs if <a href="http://jayxie.com/2008/12/01/segment-fault-when-dump-emacs.html" class="more-link">More &#62;</a>
]]></description>
			<content:encoded><![CDATA[<p>dump-emacs 是个好东西，不过最近老是dump失败<br />
gdb了一下 发现挂在unexec那<br />
google之至<a href="http://bugs.gentoo.org/show_bug.cgi?id=221281#c6">http://bugs.gentoo.org/show_bug.cgi?id=221281#c6</a></p>
<blockquote><p>
The breakage is caused by the &#8220;randomize brk()&#8221; patch.<br />
See the LKML, <a href="http://lkml.org/lkml/2007/10/23/435">http://lkml.org/lkml/2007/10/23/435</a>:</p>
<blockquote><p>
This is known to break older versions of some emacs variants, whose<br />
dumper code assumed that the last variable declared in the program is<br />
equal to the start of the dynamically allocated memory region.</p></blockquote>
<p>The corresponding kernel parameter is accessible via<br />
/proc/sys/kernel/randomize_va_space, the breakage occurs if its value is 2.
</p></blockquote>
<p>结论为执行下sysctl -w kernel.randomize_va_space=0再dump即可</p>
<p>shell里这么写</p>
<pre class="brush: bash;">
#!/bin/bash
MYEMACS=/home/x/bin/emacs-dump
EMACS=/home/x/bin/emacs
cat &gt; /tmp/dump-emacs.el &lt;&lt;EOF
(load &quot;/home/x/.emacs&quot;)
(dump-emacs &quot;$MYEMACS&quot; &quot;$EMACS&quot;)
EOF

OLD_VASPACE=`sysctl kernel.randomize_va_space|tr -d &quot; &quot;`
sudo sysctl -w kernel.randomize_va_space=0
$EMACS --batch --load /tmp/dump-emacs.el
sudo sysctl -w &quot;$OLD_VASPACE&quot;
</pre>
<p>即可</p>
]]></content:encoded>
			<wfw:commentRss>http://jayxie.com/2008/12/01/segment-fault-when-dump-emacs.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jump-or-exec in emacs</title>
		<link>http://jayxie.com/2008/10/06/jump-or-exec-in-emacs.html</link>
		<comments>http://jayxie.com/2008/10/06/jump-or-exec-in-emacs.html#comments</comments>
		<pubDate>Mon, 06 Oct 2008 14:05:14 +0000</pubDate>
		<dc:creator>Jay Xie</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://jayxie.com/?p=150</guid>
		<description><![CDATA[
去年的时候发在水木里的
类似sawfish下的jump-or-exec
用于查找名为buffer-name的buffer，如果不存在则调用func，如果存在的话切换到这个buffer，如果这个buffer就是当前的buffer且给出了可选参数onfocused的话就把这个buffer作为参数来调用onfocused
因为不会用正则匹配查找buffer，所以只能全匹配。
代码在 <a href="http://www.emacswiki.org/cgi-bin/wiki/jump-or-exec.el">http://www.emacswiki.org/cgi-bin/wiki/jump-or-exec.el</a>

]]></description>
			<content:encoded><![CDATA[<p>去年的时候发在水木里的</p>
<p>类似sawfish下的jump-or-exec</p>
<p>用于查找名为buffer-name的buffer，如果不存在则调用func，如果存在的话切换到这个buffer，如果这个buffer就是当前的buffer且给出了可选参数onfocused的话就把这个buffer作为参数来调用onfocused</p>
<p>因为不会用正则匹配查找buffer，所以只能全匹配。</p>
<p>代码在 <a href="http://www.emacswiki.org/cgi-bin/wiki/jump-or-exec.el">http://www.emacswiki.org/cgi-bin/wiki/jump-or-exec.el</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jayxie.com/2008/10/06/jump-or-exec-in-emacs.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>没有sawfish的时候怎么用jump-or-exec来切换窗口</title>
		<link>http://jayxie.com/2008/10/06/use-jump-or-exec-without-sawfish.html</link>
		<comments>http://jayxie.com/2008/10/06/use-jump-or-exec-without-sawfish.html#comments</comments>
		<pubDate>Mon, 06 Oct 2008 14:04:55 +0000</pubDate>
		<dc:creator>Jay Xie</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://jayxie.com/?p=152</guid>
		<description><![CDATA[
最初是因为compiz不成熟，所以一直在用sawfish，最近切到了compiz后就不能用sawfish了，非常好用的jump-or-exec也没了，本来打算自己搞个的，发现已经有人弄过了。地址在 <a href="http://pluskid.lifegoo.com/wiki/JumpOrExec.html">http://pluskid.lifegoo.com/wiki/JumpOrExec.html</a>
通过一个python脚本和wmctrl来实现的jump-or-exec，配合xbindkeys，基本上不用再担心切换wm的问题了
不过python脚本的启动明显没有shell脚本来的快，改写成shell脚本代码如下


<ol><li>!/bin/bash
</li></ol>

case $1 in

<pre>
   emacs)
       REXP=&#34;Emacs -x&#34;
       CMD=&#34;emacs&#34;
       ;;
   browser)
       REXP=&#34;Chromium -x&#34;
       CMD=&#34;chromium-browser&#34;
 815417267f76f6f460a4a61f9db75fdb%3Ca%20href%3D%22http%3A%2F%2Fjayxie.com%2F2008%2F10%2F06%2Fuse-jump-or-exec-without-sawfish.html%22%20class%3D%22more-link%22%3EMore%20%26gt%3B%3C%2Fa%3E%0A%3C%2Fpre%3E0fbd1776e1ad22c59a7080d35c7fd4db
]]></description>
			<content:encoded><![CDATA[<p>最初是因为compiz不成熟，所以一直在用sawfish，最近切到了compiz后就不能用sawfish了，非常好用的jump-or-exec也没了，本来打算自己搞个的，发现已经有人弄过了。地址在 <a href="http://pluskid.lifegoo.com/wiki/JumpOrExec.html">http://pluskid.lifegoo.com/wiki/JumpOrExec.html</a></p>
<p>通过一个python脚本和wmctrl来实现的jump-or-exec，配合xbindkeys，基本上不用再担心切换wm的问题了</p>
<p>不过python脚本的启动明显没有shell脚本来的快，改写成shell脚本代码如下<br />
<span id="more-152"></span></p>
<pre class="brush: bash;">
#!/bin/bash

case $1 in
    emacs)
        REXP=&quot;Emacs -x&quot;
        CMD=&quot;emacs&quot;
        ;;
    browser)
        REXP=&quot;Chromium -x&quot;
        CMD=&quot;chromium-browser&quot;
        ;;
    firefox)
        REXP=&quot;Firefox&quot;
        CMD=&quot;firefox&quot;
        ;;
    thunderbird)
        REXP=&quot;Thunderbird&quot;
        CMD=&quot;thunderbird&quot;
        ;;
    qterm)
        REXP=&quot;qterm.Qterm -x&quot;
        CMD=&quot;qterm&quot;
        ;;
    *)
        exit
        ;;
esac

wmctrl -a $REXP &amp;&amp; exit
exec $CMD &amp;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jayxie.com/2008/10/06/use-jump-or-exec-without-sawfish.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>有了xft后emacs的字体设置，解决新开frame还是老字体的问题</title>
		<link>http://jayxie.com/2008/03/17/%e6%9c%89%e4%ba%86xft%e5%90%8eemacs%e7%9a%84%e5%ad%97%e4%bd%93%e8%ae%be%e7%bd%ae%ef%bc%8c%e8%a7%a3%e5%86%b3%e6%96%b0%e5%bc%80frame%e8%bf%98%e6%98%af%e8%80%81%e5%ad%97%e4%bd%93%e7%9a%84%e9%97%ae.html</link>
		<comments>http://jayxie.com/2008/03/17/%e6%9c%89%e4%ba%86xft%e5%90%8eemacs%e7%9a%84%e5%ad%97%e4%bd%93%e8%ae%be%e7%bd%ae%ef%bc%8c%e8%a7%a3%e5%86%b3%e6%96%b0%e5%bc%80frame%e8%bf%98%e6%98%af%e8%80%81%e5%ad%97%e4%bd%93%e7%9a%84%e9%97%ae.html#comments</comments>
		<pubDate>Mon, 17 Mar 2008 09:22:53 +0000</pubDate>
		<dc:creator>Jay Xie</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[frame]]></category>
		<category><![CDATA[set font]]></category>
		<category><![CDATA[xft]]></category>

		<guid isPermaLink="false">http://jayxie.com/2008/03/17/%e6%9c%89%e4%ba%86xft%e5%90%8eemacs%e7%9a%84%e5%ad%97%e4%bd%93%e8%ae%be%e7%bd%ae%ef%bc%8c%e8%a7%a3%e5%86%b3%e6%96%b0%e5%bc%80frame%e8%bf%98%e6%98%af%e8%80%81%e5%ad%97%e4%bd%93%e7%9a%84%e9%97%ae.html</guid>
		<description><![CDATA[
有了xft以后emacs的字体设置现在已经可以简单到不能简单了，而且很漂亮，真的很养眼。
其实这个设置也没什么特别的，主要是今天在emacs@newsmth上看到有人问新开frame仍然使用的是老字体的问题，想起自己当初因为这个琢磨了很久emacs的font是怎么搞的，所以应该还是有必要发出来共享一下的

(progn

<pre>
 (set-default-font &#34;courier 10 pitch-12&#34;)
 (set-fontset-font &#34;fontset-default&#34; 'han '(&#34;微软雅黑&#34; . &#34;unicode-bmp&#34;))
 (add-to-list 'default-frame-alist '(font . &#34;courier 10 pitch-12&#34;)))
</pre>

progn那个可以去掉的，我当初是为了测试方便能够一起eval三句用的
我不会创建fontset，所以先set-default-font来设置默认字体，这个会自动创建一个fontset
然后修改这个fontset来增加中文显示字体
最后把这个fontset加到default-frame-alist，因为新开的frame会从default-frame-alist里继承，也就继承了字体的设置

]]></description>
			<content:encoded><![CDATA[<p>有了xft以后emacs的字体设置现在已经可以简单到不能简单了，而且很漂亮，真的很养眼。<br />
其实这个设置也没什么特别的，主要是今天在emacs@newsmth上看到有人问新开frame仍然使用的是老字体的问题，想起自己当初因为这个琢磨了很久emacs的font是怎么搞的，所以应该还是有必要发出来共享一下的</p>
<pre class="brush: cl;">
(progn
  (set-default-font &quot;courier 10 pitch-12&quot;)
  (set-fontset-font &quot;fontset-default&quot; 'han '(&quot;微软雅黑&quot; . &quot;unicode-bmp&quot;))
  (add-to-list 'default-frame-alist '(font . &quot;courier 10 pitch-12&quot;)))
</pre>
<p>progn那个可以去掉的，我当初是为了测试方便能够一起eval三句用的<br />
我不会创建fontset，所以先set-default-font来设置默认字体，这个会自动创建一个fontset<br />
然后修改这个fontset来增加中文显示字体<br />
最后把这个fontset加到default-frame-alist，因为新开的frame会从default-frame-alist里继承，也就继承了字体的设置</p>
]]></content:encoded>
			<wfw:commentRss>http://jayxie.com/2008/03/17/%e6%9c%89%e4%ba%86xft%e5%90%8eemacs%e7%9a%84%e5%ad%97%e4%bd%93%e8%ae%be%e7%bd%ae%ef%bc%8c%e8%a7%a3%e5%86%b3%e6%96%b0%e5%bc%80frame%e8%bf%98%e6%98%af%e8%80%81%e5%ad%97%e4%bd%93%e7%9a%84%e9%97%ae.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seems scim conflicts with Xorg or sawfish or emacs?</title>
		<link>http://jayxie.com/2007/03/09/seems-scim-conflicts-with-xorg-or-sawfish-or-emacs.html</link>
		<comments>http://jayxie.com/2007/03/09/seems-scim-conflicts-with-xorg-or-sawfish-or-emacs.html#comments</comments>
		<pubDate>Fri, 09 Mar 2007 05:25:09 +0000</pubDate>
		<dc:creator>Jay Xie</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://jayxie.com/2007/03/09/seems-scim-conflicts-with-xorg-or-sawfish-or-emacs.html</guid>
		<description><![CDATA[
I first found this problem when using ubuntu dapper &#038; emacs 23.0.0.1.
Sometimes when speedbar is started in emacs, every key press in emacs does not effects unless next time I switched to emacs.
At first, I thought it was a little bug with emacs 23, so I did not take it serious.
But after upgrading to feisty <a href="http://jayxie.com/2007/03/09/seems-scim-conflicts-with-xorg-or-sawfish-or-emacs.html" class="more-link">More &#62;</a>
]]></description>
			<content:encoded><![CDATA[<p>I first found this problem when using ubuntu dapper &#038; emacs 23.0.0.1.</p>
<p>Sometimes when speedbar is started in emacs, every key press in emacs does not effects unless next time I switched to emacs.</p>
<p>At first, I thought it was a little bug with emacs 23, so I did not take it serious.</p>
<p>But after upgrading to feisty &#038; emacs 23.0.0.9, this happens more often. When created a new frame, either speedbar or C+X 5 2, key press frozen. And everything returns all right when all other frames are closed. And evem more, key press lags when switching windows! So I thought it maybe bug with xorg or sawfish!<br />
So I asked in emacs@newsmth, and someone said it maybe problem between xim &#038; emacs in reply. Then I disabled scim and now seems everything ok.</p>
]]></content:encoded>
			<wfw:commentRss>http://jayxie.com/2007/03/09/seems-scim-conflicts-with-xorg-or-sawfish-or-emacs.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
