<?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>「xyzzy」タグの記事一覧 - 工夫と趣向と分別と。</title>
	<atom:link href="https://d.akinori.org/tag/xyzzy/feed/" rel="self" type="application/rss+xml" />
	<link>https://d.akinori.org/tag/xyzzy/</link>
	<description>おもしろく生きたいね</description>
	<lastBuildDate>Fri, 05 Mar 2010 12:12:42 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/>
<atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/>
<atom:link rel="hub" href="https://websubhub.com/hub"/>
<atom:link rel="self" href="https://d.akinori.org/tag/xyzzy/feed/"/>
	<item>
		<title>xyzzy / mcalc</title>
		<link>https://d.akinori.org/2004/12/25/20041225p02/</link>
					<comments>https://d.akinori.org/2004/12/25/20041225p02/#respond</comments>
		
		<dc:creator><![CDATA[Akinori]]></dc:creator>
		<pubDate>Fri, 24 Dec 2004 15:01:00 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Emacs]]></category>
		<category><![CDATA[xyzzy]]></category>
		<guid isPermaLink="false">http://dlog.akinori.org/2004/12/25/20041225p02/</guid>

					<description><![CDATA[<p>　先日のxyzzyの設定がさらに進み、完全に手になじんできた。Emacsとの互換性で言うと、以下も必要だった。特にヒストリの挙動はこうしないと使いづらいと思う。 [crayon-6a74a577a1a1d29171974… <span class="read-more"><a href="https://d.akinori.org/2004/12/25/20041225p02/">続きを読む &#187;</a></span></p>
<p>The post <a href="https://d.akinori.org/2004/12/25/20041225p02/">xyzzy / mcalc</a> appeared first on <a href="https://d.akinori.org">工夫と趣向と分別と。</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-yarpp-template-akinori'>
<!-- YARPP List -->

» 関連記事 «<ul>
<li><a href="https://d.akinori.org/2012/07/23/git-mergetool%e3%81%a7emacs%e3%81%aeediff-merge-files-with-ancestor%e3%82%92%e5%91%bc%e3%81%b3%e5%87%ba%e3%81%99/" rel="bookmark" title="git mergetoolでEmacsのediff-merge-files-with-ancestorを呼び出す">git mergetoolでEmacsのediff-merge-files-with-ancestorを呼び出す</a></li>
<li><a href="https://d.akinori.org/2004/11/30/20041130p02/" rel="bookmark" title="xyzzyイイ">xyzzyイイ</a></li>
<li><a href="https://d.akinori.org/2012/04/25/emacs-kill-region-or-backward-kill-word/" rel="bookmark" title="Emacs: kill-region-or-backward-kill-word">Emacs: kill-region-or-backward-kill-word</a></li>
</ul>
</div>
]]></description>
										<content:encoded><![CDATA[<p>　先日の<a href="/2004/11/30/20041130p02/">xyzzyの設定</a>がさらに進み、完全に手になじんできた。Emacsとの互換性で言うと、以下も必要だった。特にヒストリの挙動はこうしないと使いづらいと思う。</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">; window stuff
(define-key ctl-x-map #\3 'split-window-vertically)
(define-key ctl-x-map '(#\5 #\f) 'find-file-other-window)
(define-key ctl-x-map '(#\5 #\2) 'new-pseudo-frame)
(define-key ctl-x-map '(#\5 #\0) 'delete-pseudo-frame)
(define-key ctl-x-map '(#\5 #\o) 'next-pseudo-frame)
(define-key ctl-x-map '(#\5 #\n) 'next-pseudo-frame)
(define-key ctl-x-map '(#\5 #\p) 'previous-pseudo-frame)

(defun kill-buffer-and-window ()
  (interactive)
  (and (kill-buffer (selected-buffer)) (delete-window)))
(define-key ctl-x-map '(#\4 #\0) 'kill-buffer-and-window)

; ミニバッファのヒストリの挙動
(define-key minibuffer-local-completion-map #\Up
	    'minibuffer-previous-line-or-history)
(define-key minibuffer-local-completion-map #\Down
	    'minibuffer-next-line-or-history)
(define-key minibuffer-local-completion-map #\C-p
	    'minibuffer-previous-line-or-history)
(define-key minibuffer-local-completion-map #\C-n
	    'minibuffer-next-line-or-history)
(define-key minibuffer-local-completion-map #\C-Up
	    'minibuffer-previous-line-or-search-history)
(define-key minibuffer-local-completion-map #\C-Down
	    'minibuffer-next-line-or-search-history)</pre><p></p>
<p>　そしてRPN電卓！Emacsにはmcalcというのがあるが、xyzzyにも移植されていたので、持ってきて設定を追加してみた。演算子を簡単に追加できるのがいいね。以下でクリップボードやキルリングとの間で数値を相互にコピペできる。</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">; RPN calculator
(load-library &quot;mcalc&quot;)

(defun mcalc-copy (arglist)
  (let ((arg (nth 0 arglist)))
    (ed::kill-new (mcalc-format-string arg))
    (message &quot;Copied&quot;)
    (list arg)))
(mcalc-add-function &quot;w&quot; 'mcalc-copy 1)

(defun mcalc-paste (arglist)
  (let ((arg (parse-integer (nth 0 (ed::current-kill 0)))))
    (list arg)))
(mcalc-add-function &quot;y&quot; 'mcalc-paste 0)

(defun mcalc-copy-to-clipboard (arglist)
  (let ((arg (nth 0 arglist)))
    (copy-to-clipboard (mcalc-format-string arg))
    (message &quot;Copied to clipboard&quot;)
    (list arg)))
(mcalc-add-function &quot;c&quot; 'mcalc-copy-to-clipboard 1)

(defun mcalc-paste-from-clipboard (arglist)
  (let ((arg (parse-integer (get-clipboard-data))))
    (list arg)))
(mcalc-add-function &quot;v&quot; 'mcalc-paste-from-clipboard 0)</pre><p></p>
<p>　同じことをEmacsのmcalcでやるにはこうする。Xのクリップボードの操作は面倒なのでやっていない。(<code>kill-new</code>にあたるものがないようだ)</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">(require 'mcalc)

(defun mcalc-copy (arglist)
  (let ((arg (nth 0 arglist)))
    (kill-new (mcalc-format-string arg))
    (message &quot;Copied&quot;)
    (list arg)))
(mcalc-add-function &quot;w&quot; 'mcalc-copy 1)

(defun mcalc-paste (arglist)
  (let ((arg (string-to-number (current-kill 0))))
    (list arg)))
(mcalc-add-function &quot;y&quot; 'mcalc-paste 0)</pre><p></p>
<p>　んー、いい感じ。</p>
<p>The post <a href="https://d.akinori.org/2004/12/25/20041225p02/">xyzzy / mcalc</a> appeared first on <a href="https://d.akinori.org">工夫と趣向と分別と。</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-yarpp-template-akinori'>
<!-- YARPP List -->
<p>» 関連記事 «</p><ul>
<li><a href="https://d.akinori.org/2012/07/23/git-mergetool%e3%81%a7emacs%e3%81%aeediff-merge-files-with-ancestor%e3%82%92%e5%91%bc%e3%81%b3%e5%87%ba%e3%81%99/" rel="bookmark" title="git mergetoolでEmacsのediff-merge-files-with-ancestorを呼び出す">git mergetoolでEmacsのediff-merge-files-with-ancestorを呼び出す</a></li>
<li><a href="https://d.akinori.org/2004/11/30/20041130p02/" rel="bookmark" title="xyzzyイイ">xyzzyイイ</a></li>
<li><a href="https://d.akinori.org/2012/04/25/emacs-kill-region-or-backward-kill-word/" rel="bookmark" title="Emacs: kill-region-or-backward-kill-word">Emacs: kill-region-or-backward-kill-word</a></li>
</ul>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://d.akinori.org/2004/12/25/20041225p02/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>xyzzyイイ</title>
		<link>https://d.akinori.org/2004/11/30/20041130p02/</link>
					<comments>https://d.akinori.org/2004/11/30/20041130p02/#respond</comments>
		
		<dc:creator><![CDATA[Akinori]]></dc:creator>
		<pubDate>Mon, 29 Nov 2004 15:01:00 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[xyzzy]]></category>
		<guid isPermaLink="false">http://dlog.akinori.org/2004/11/30/20041130p02/</guid>

					<description><![CDATA[<p>　Windows上で何のエディタを使うかは悩ましい。同僚はみなPeggyを使っているが、Emacs使いやvi使いの選択肢にはならない。要はMeadowかxyzzyか、GVimかViViか、という話になる。 　長いことMe… <span class="read-more"><a href="https://d.akinori.org/2004/11/30/20041130p02/">続きを読む &#187;</a></span></p>
<p>The post <a href="https://d.akinori.org/2004/11/30/20041130p02/">xyzzyイイ</a> appeared first on <a href="https://d.akinori.org">工夫と趣向と分別と。</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-yarpp-template-akinori'>
<!-- YARPP List -->

» 関連記事 «<ul>
<li><a href="https://d.akinori.org/2012/06/14/emacs%e3%81%ae%e7%af%84%e5%9b%b2%e9%81%b8%e6%8a%9eui%e3%82%92%e5%a4%a7%e5%b9%85%e6%8b%a1%e5%bc%b5%e3%81%97%e3%81%a6%e3%81%8f%e3%82%8c%e3%82%8bcua-mode/" rel="bookmark" title="Emacsの範囲選択UIを大幅拡張してくれるcua-mode">Emacsの範囲選択UIを大幅拡張してくれるcua-mode</a></li>
<li><a href="https://d.akinori.org/2004/12/25/20041225p02/" rel="bookmark" title="xyzzy / mcalc">xyzzy / mcalc</a></li>
<li><a href="https://d.akinori.org/2012/07/23/git-mergetool%e3%81%a7emacs%e3%81%aeediff-merge-files-with-ancestor%e3%82%92%e5%91%bc%e3%81%b3%e5%87%ba%e3%81%99/" rel="bookmark" title="git mergetoolでEmacsのediff-merge-files-with-ancestorを呼び出す">git mergetoolでEmacsのediff-merge-files-with-ancestorを呼び出す</a></li>
</ul>
</div>
]]></description>
										<content:encoded><![CDATA[<p>　Windows上で何のエディタを使うかは悩ましい。同僚はみなPeggyを使っているが、Emacs使いやvi使いの選択肢にはならない。要はMeadowかxyzzyか、GVimかViViか、という話になる。</p>
<p>　長いことMeadowで粘ってきたのだが、結局ケータイの仕事となると半角カナや絵文字が当たり前になるので、そこで誤認識しまくるMeadowは使えないと結論した。フックを書いてディレクトリ名やファイル名で判別するように頑張ったが、所詮限界がある。Emacs 21.3.50では特に問題はないので、Meadowが21.3.50/21.4ベースになればいけそうだけどね。</p>
<p>　ということで、xyzzyに移行することにした。初期状態ではEmacsと微妙に非互換なので、<code>~/.xyzzy</code>にいろいろ書いて矯正してみる。</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">; search/replace
(load-library "isearch")
(global-set-key #\M-% 'query-replace)
(setf *ispell-command* "C:/xyzzy/ispell-win32/bin/ispell.exe")

; undo/redo
(global-set-key #\C-- 'redo)
(global-set-key #\C-_ 'undo)
(global-set-key #\C-/ 'undo)
(define-key ctl-x-map #\u 'undo)

; input
(global-set-key #\C-\\ 'toggle-ime)
(global-set-key #\M-SPC 'just-one-space)
(global-set-key #\M-/ 'dabbrev-expand)

; file stuff
(define-key ctl-x-map #\C-w 'emacs-write-file)
(define-key ctl-x-map #\d 'open-filer)

; indentation
(global-set-key #\C-M-\\ 'indent-region)

; window stuff
(define-key ctl-x-map #\3 'split-window-vertically)

; rectangle selection
(define-key ctl-x-map '(#\r #\k) 'kill-rectangle)
(define-key ctl-x-map '(#\r #\d) 'delete-rectangle)
(define-key ctl-x-map '(#\r #\y) 'yank-rectangle)
(define-key ctl-x-map '(#\r #\r) 'copy-rectangle)
(define-key ctl-x-map '(#\r #\t) 'string-rectangle)

; help stuff
(global-set-key '(#\M-\? #\b) 'describe-bindings)
(global-set-key '(#\M-\? #\k) 'describe-key)
(global-set-key '(#\M-\? #\f) 'describe-function)
(global-set-key '(#\M-\? #\v) 'describe-variable)

; miscellaneous stuff
(global-set-key #\M-: 'eval-expression)</pre><p></p>
<p>　おー、いい感じ。そして<code>cvs-mode</code>, <code>svn mode</code>, <code>php-mode</code>, <code>ruby-mode</code>などを入れて設定してやったら完璧な使い心地に！軽いし最初から<code>xyzzycli.exe</code>というのがあるから、別々に起動しても一つのセッションに統合することができる。</p>
<p>　Cygwin的には、次のような手抜きスクリプトを書けば環境変数<code>EDITOR</code>に設定できる。</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">#!/bin/sh

prog=/cygdrive/c/xyzzy/xyzzycli.exe

if [ $# -eq 0 ]; then
        exec $prog
else
        exec $prog -wait &quot;$(cygpath -w &quot;$1&quot;)&quot;
fi</pre><p></p>
<p>　ただし、Beckyの「外部編集ツール」はプログラムの終了は見ず、ウィンドウが閉じるのを待っているようなので、<code>xyzzycli.exe -wait</code>ではうまくいかない。仕方ないが、<code>xyzzy.exe</code>を登録して独立したセッションで編集せねばならない。まあ、そのくらいはいいけどね。</p>
<p>　てな感じで快適です。ちなみに、<code>.xyzzy</code>に<code>(require "Gates")</code>と書くとWindows標準寄りのキーバインドになるので、実はEmacs使い以外にもおすすめできたり。まあ、面倒はごめんなので秘密にしておきますが。<span style="white-space: nowrap">(・∀・)</span></p>
<p>　あ、<code>tdiary-mode</code>もあるけど、しばしば通信中にxyzzyごと固まってしまうので怖くて使えません。直らないかなー。でないと日記の更新が遅れがちに…。と言い訳</p>
<p>The post <a href="https://d.akinori.org/2004/11/30/20041130p02/">xyzzyイイ</a> appeared first on <a href="https://d.akinori.org">工夫と趣向と分別と。</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-yarpp-template-akinori'>
<!-- YARPP List -->
<p>» 関連記事 «</p><ul>
<li><a href="https://d.akinori.org/2012/06/14/emacs%e3%81%ae%e7%af%84%e5%9b%b2%e9%81%b8%e6%8a%9eui%e3%82%92%e5%a4%a7%e5%b9%85%e6%8b%a1%e5%bc%b5%e3%81%97%e3%81%a6%e3%81%8f%e3%82%8c%e3%82%8bcua-mode/" rel="bookmark" title="Emacsの範囲選択UIを大幅拡張してくれるcua-mode">Emacsの範囲選択UIを大幅拡張してくれるcua-mode</a></li>
<li><a href="https://d.akinori.org/2004/12/25/20041225p02/" rel="bookmark" title="xyzzy / mcalc">xyzzy / mcalc</a></li>
<li><a href="https://d.akinori.org/2012/07/23/git-mergetool%e3%81%a7emacs%e3%81%aeediff-merge-files-with-ancestor%e3%82%92%e5%91%bc%e3%81%b3%e5%87%ba%e3%81%99/" rel="bookmark" title="git mergetoolでEmacsのediff-merge-files-with-ancestorを呼び出す">git mergetoolでEmacsのediff-merge-files-with-ancestorを呼び出す</a></li>
</ul>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://d.akinori.org/2004/11/30/20041130p02/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
