<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5409286375980018045</id><updated>2024-08-29T04:50:49.085+09:00</updated><category term="emacs"/><category term="tips"/><category term="mac"/><category term="javascript"/><category term="書評"/><category term="iPod touch"/><category term="program"/><category term="command"/><category term="kaizen"/><category term="chrome"/><category term="手帳"/><category term="PC"/><category term="evernote"/><category term="google"/><category term="iTerm2"/><category term="kindle"/><category term="windows"/><category term="金言"/><category term="TeX"/><category term="english"/><category term="git"/><category term="perl"/><category term="ruby"/><category term="subversion"/><category term="tmux"/><category term="web"/><category term="サーバ"/><category term="拡張機能"/><category term="資料"/><title type='text'>With having fun</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>63</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-1766651709499161536</id><published>2016-07-03T11:47:00.000+09:00</published><updated>2016-07-03T11:47:28.329+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="emacs"/><title type='text'>Emacs カッコの自動挿入で困っている方へ</title><content type='html'>&lt;body&gt;
&lt;h3&gt;閉じカッコの自動挿入は便利なのに・・・&lt;/h3&gt;
&lt;p&gt;
Emacs では、カッコを書く時に自動的に閉じカッコを挿入してくれる設定があります。(リンク：&lt;a href=&quot;http://bhby39.blogspot.jp/2014/02/emacs.html&quot;&gt;Emacs 閉じカッコの自動挿入&lt;/a&gt;)
&lt;/p&gt;
&lt;p&gt;
開きカッコ &quot;(&quot; を書くと自動で閉じカッコ &quot;)&quot; を書いてくれて、更にカーソルはカッコの中にあるのですぐに中身を書き始められます。
&lt;/p&gt;
&lt;p&gt;
自動挿入でなかった時には、カーソルを行ったり来たりさせていたのがなくなってスムーズに書けるようになり、絶対に外せない機能です。
&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;
これは、何もないところにカッコを書き始める場合は非常に便利な機能です。
&lt;/p&gt;
&lt;p&gt;
でも、すでに中身が書いてある所でそれをカッコでくくろうとすると、とたんに煩わしい機能になります。
&lt;/p&gt;
&lt;p&gt;
カッコでくくりたい部分の先頭にカーソルを持ってきてカッコを書くとこんな風になります。
&lt;/p&gt;
&lt;pre&gt;
 y = ()a + b * c          // y = (a + b) * c と書きたいのに・・・
&lt;/pre&gt;
&lt;/br&gt;&lt;/br&gt;
&lt;h3&gt;&quot;M-(&quot; で解決&lt;/h3&gt;
&lt;p&gt;
これを解決するのが、リージョンを選択して M-( です。
&lt;/p&gt;
&lt;p&gt;
上の場合だと、a + b の部分を選択して、M-( すると　(a + b) になります。
&lt;/p&gt;
&lt;p&gt;
直観的で非常に良いアイデアだと思います。
&lt;/p&gt;
&lt;p&gt;
でも、惜しむらくは、()カッコにしか対応していないところです。
&lt;/p&gt;
&lt;p&gt;
ダブルクォーテーションに対応した、M-&quot; はないのか・・・。
&lt;/p&gt;
&lt;/br&gt;&lt;/br&gt;
&lt;h3&gt;別のアプローチ&lt;/h3&gt;
&lt;p&gt;
方針は違うのですが、こんな対策を考えてみました。
&lt;/p&gt;
&lt;p&gt;
「() カッコを書くとカーソルを () の中に持ってきてくれる。」
&lt;/p&gt;
&lt;p&gt;
() カッコは自分で書きます。実は、閉じカッコを書くのが面倒くさいのではなくてカーソルをカッコの中に戻すのが面倒なのではないかという発想です。
&lt;/p&gt;
&lt;p&gt;
よろしければ使ってみてください。 () と {} と [] と &lt;&gt; と &quot;&quot; と &#39;&#39; に対応しています。
&lt;/p&gt;
&lt;p&gt;
&lt;a href=&quot;https://github.com/tbhby39g/backalittle.el&quot;&gt;https://github.com/tbhby39g/backalittle.el&lt;/a&gt;
&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;
インストールするには、backalittle.el を load-path のフォルダ(例えば、~/.emacs.d/lisp/)に置いて、.emacs(または、init.el) に (require &#39;backalittle) を書き加えれば OK です。
&lt;/p&gt;
&lt;p&gt;
これを使う場合は、electric-pair-mode　(or その他のカッコ自動挿入機能)は無効にしておいてください。
&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;
リンク：　&lt;a href=&quot;http://bhby39.blogspot.jp/2014/02/emacs.html&quot;&gt;Emacs 閉じカッコの自動挿入&lt;/a&gt;&lt;/br&gt;
リンク：　&lt;a href=&quot;https://github.com/tbhby39g/backalittle.el&quot;&gt;https://github.com/tbhby39g/backalittle.el&lt;/a&gt;

&lt;/p&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;iframe src=&quot;https://rcm-fe.amazon-adsystem.com/e/cm?t=withhavingfun-22&amp;o=9&amp;p=48&amp;l=ur1&amp;category=software&amp;banner=1904325XRAWY2NSBHS82&amp;f=ifr&quot; width=&quot;728&quot; height=&quot;90&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;max-width:800px;max-height:600px;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;

&lt;/body&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/1766651709499161536/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2016/07/emacs.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/1766651709499161536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/1766651709499161536'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2016/07/emacs.html' title='Emacs カッコの自動挿入で困っている方へ'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-1733686400440506125</id><published>2015-06-26T01:24:00.000+09:00</published><updated>2015-06-26T01:24:24.813+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="program"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>Project Euler 始めました。</title><content type='html'>&lt;p&gt;
Ruby 勉強中です。
&lt;/p&gt;
&lt;p&gt;
最近話題になった「&lt;a href=&quot;https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour&quot;&gt;１時間以内にこの問題を解けなきゃソフトウェアエンジニアじゃない、５つの問題&lt;/a&gt;」を勉強がてら Ruby でチャレンジして、それ以来、いろいろな問題を解くのがマイブームになっています。
&lt;/p&gt;
&lt;p&gt;
そんな中、ポッドキャストの「&lt;a href=&quot;http://codelunch.fm/&quot;&gt;CodeLunch.fm&lt;/a&gt;」を聞いていて、&quot;&lt;a href=&quot;https://projecteuler.net/&quot;&gt;Project Euler&lt;/a&gt;&quot; という数学問題サイトを知りました。
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
Project Euler では、2015. 6. 25 現在、521問が出題されています。
&lt;/p&gt;
&lt;p&gt;
最新の 521問目は数日前の 6/21出題です。第１問は2001年なので14年も続いている長寿サイトです。
&lt;/p&gt;
&lt;p&gt;
丁寧なサイトで、問題を説いてサブミットし正解なら解説の PDF がダウンロードできたり、その問題のフォーラムがのぞけるようになります。
&lt;/p&gt;
&lt;p&gt;
それから、問題を解いていくと賞がもらえて、僕は &quot;Baby Steps&quot; をもらいました。
&lt;/p&gt;
&lt;p&gt;
現在、約50万人が登録していて、でも続けているのは少数のようで、123問まで解いている人が全体の1%です。ひとまず、1%以内に入るのが目標。
&lt;/p&gt;
&lt;p&gt;
問題によっては、一見すると時間がかかりそうで、スクリプト言語ではなくてもっと速い言語にしようか、と思うものもあります。でも、頭のひねりが足りないだけで、ちゃんとしたアルゴリズムなら１分以内に解けるようにできているそうです。
&lt;/p&gt;
&lt;p&gt;
いい頭の体操になります。
&lt;/p&gt;
&lt;p&gt;
脳内の休眠中だったいろんな部分が活性化されている気がして、結構、燃えます。
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
リンク
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour&quot;&gt;Five programming problems every Software Engineer should be able to solve in less than 1 hour&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://codelunch.fm/&quot;&gt;CodeLunch.fm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://projecteuler.net/&quot;&gt;Project Euler&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;

&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- new300x250 --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;8048142040&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;iframe src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=withhavingfun-22&amp;o=9&amp;p=12&amp;l=ur1&amp;category=amazonsale&amp;f=ifr&quot; width=&quot;300&quot; height=&quot;250&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/1733686400440506125/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2015/06/project-euler.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/1733686400440506125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/1733686400440506125'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2015/06/project-euler.html' title='Project Euler 始めました。'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-6006036104854764211</id><published>2015-02-21T00:12:00.001+09:00</published><updated>2015-02-21T00:12:47.630+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Windows でもEmacs 魂は健在です</title><content type='html'>&lt;p&gt;Emacs を使うのが楽しくなってくると、それに比例して Windows を使うのがつまらなくなってくる。&lt;/p&gt;
&lt;p&gt;そんな気持ちを和らげてくれるのが「 keyhac 」というキー操作をカスタマイズできるソフトと Emacs 用の設定です。&lt;/p&gt;
&lt;p&gt;作者の方、ありがとうございます。便利に使わせて頂いています。&lt;/p&gt;
&lt;p&gt;Windows へのインストールと Emacs 用の設定は「&lt;a href=&quot;http://qiita.com/hshimo/items/2f3f7e070ae75243eb8b&quot;&gt;Windows 7や8(64bit)で emacs キーバインドにする方法&lt;/a&gt;」を参考にしました。&lt;/p&gt;
&lt;br&gt;
&lt;h3&gt;keyhac を使ってみると&lt;/h3&gt;
&lt;p&gt;エディタだけではなくて、エクスプローラでファイルをコピー＆ペーストするときにも M-w, C-y となって、思った以上に Emacs 化されてワクワクします。&lt;/p&gt;
&lt;p&gt;もちろん IDE も Emacs のキーバインドになるので、IDE に元々付いている微妙な Emacs モードを使う必要はありません。&lt;/p&gt;
&lt;p&gt;アプリケーションによっては、Emacs のキーバインドにしたくない場合もあると思います。&lt;/p&gt;
&lt;p&gt;僕の場合は、ペイントをよく使うのですが、ペイントでは C-n は下へ移動ではなくて、標準の「新規ファイル」としておきたい。&lt;/p&gt;
&lt;p&gt;こういう時は、設定ファイルの指定の場所に適用したくないアプリケーションの実行ファイル名を &quot;mspaint.exe&quot; のように書くだけでＯＫです。（場所は設定ファイルを見ればすぐに分かります。）&lt;/p&gt;
&lt;br&gt;
&lt;h3&gt;C-@ でマークする方に朗報です。&lt;/h3&gt;
&lt;p&gt;僕は、Emacs ではマークを C-@ で行っています。&lt;/p&gt;
&lt;p&gt;上記の設定では、C-@ は英語キーボードではうまくいかないとのことでコメントアウトされています。&lt;/p&gt;
&lt;pre&gt;
 ## 英語キーボードを利用する場合、LC-2 の設定（数引数の指定で利用）が LC-Atmark の設定で上書きされるのでコメント化
 #keymap_emacs[&quot;LC-Atmark&quot;]     = reset_search(reset_counter(set_mark_command))
&lt;/pre&gt;

&lt;p&gt;僕が使っているのは日本語キーボードなので、コメントアウトを外してみたのですが、うまく設定されませんでした。&lt;/p&gt;
&lt;p&gt;以下の設定を追加すると、C-@ でマークできるようになりました。&lt;/p&gt;
&lt;pre&gt;keymap_emacs[&quot;LC-(192)&quot;]     = reset_search(reset_counter(set_mark_command))&lt;/pre&gt;

&lt;br&gt;
&lt;h3&gt;まとめ&lt;/h3&gt;
&lt;p&gt;keyhac を使うと Windows の操作が何でも Emacs 風になります。 &lt;/p&gt;
&lt;p&gt;人の心理とは面白いもので、たったこれだけのことで Windows を使うのが楽しくなり、仕事が楽しくなります。&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;リンク&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/craftware/keyhac&quot;&gt;craftware - keyhac&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www49.atwiki.jp/ntemacs/pages/25.html&quot;&gt;Windows の操作を emacs のキーバインドで行うための設定 （keyhac版）&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://qiita.com/hshimo/items/2f3f7e070ae75243eb8b&quot;&gt;Windows 7や8(64bit)で emacs キーバインドにする方法&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 below_rectangle_middle --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;7337090445&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/6006036104854764211/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2015/02/windows-emacs.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/6006036104854764211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/6006036104854764211'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2015/02/windows-emacs.html' title='Windows でもEmacs 魂は健在です'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-8827135616025174264</id><published>2015-02-08T11:01:00.000+09:00</published><updated>2015-02-08T11:01:38.331+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="program"/><title type='text'>Emacs &quot;FooFooFoo&quot; をプログラミングする</title><content type='html'>&lt;p&gt;Software Design の1月号の記事で、「編集はプログラミングである 」というコラムがありました。（リンク：&lt;a href=&quot;http://bhby39.blogspot.jp/2015/02/vim.html&quot;&gt;Vim に乗り換え！？&lt;/a&gt;）&lt;/p&gt;
&lt;p&gt;Vim では 「FooFooFoo」と書くには、3iFoo Esc とタイプすれば良いようです。&lt;/p&gt;
&lt;p&gt;結果として FooFooFoo と得るために、行うのは 3iFoo Esc という入力である。「これはプログラムである」と考える。&lt;/p&gt;
&lt;pre&gt;
FooFooFoo
&lt;/pre&gt;
&lt;p&gt;FooFooFoo とそのままタイプするのは DRY の原則に反しており、プログラマとしては避けたい（？）&lt;/p&gt;
&lt;p&gt;Emacs で FooFooFoo をプログラミングするにはどうするか？ 次のような案はどうか？&lt;/p&gt;
&lt;br&gt;
&lt;h3&gt;1. &quot;Foo M-del C-y C-y C-y&quot;&lt;/h3&gt;
&lt;p&gt;【 説明 】&lt;/p&gt;
&lt;p&gt;Foo とタイプしてそれを切り取って３回貼り付ける。&lt;/p&gt;
&lt;p&gt;7ストロークのタイプになり、FooFooFooとタイプするより（9ストローク）も2ストローク少なくなる。（速いかどうかはともかく）&lt;/p&gt;
&lt;p&gt;しかし、最後のC-y C-y C-y は同じことを3回やっていて依然としてDRY違反で、モヤモヤ感は残る。&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;M-3 C-y というようなイメージで貼付けを3回するようプログラミングしたい。&lt;/p&gt;
&lt;p&gt;（M-数字 は次のコマンドや入力を数字回繰り返すコマンド）&lt;/p&gt;
&lt;p&gt;しかし M-3 はこの場合は C-y に適用できない。&lt;/p&gt;
&lt;br&gt;
&lt;h3&gt;2. &quot;C-x ( Foo C-x ) M-2 C-x e&quot;&lt;/h3&gt;
&lt;p&gt;【 説明 】&lt;/p&gt;
&lt;p&gt;C-x ( と C-x ) はマクロの定義。最後のC-x e がマクロの実行。&lt;/p&gt;
&lt;p&gt;C-x ( と C-x ) の間の Foo という入力がマクロとして定義され、マクロの実行をM-2 で２回繰り返す。（定義した時に1回、Fooを入力しているのであと２回繰り返して計３つのFooが入力されたことになる。）&lt;/p&gt;
&lt;p&gt;Fooという関数を切り出して、ループで２回実行しているようなイメージ。プログラミングをしているような感じがする。&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;マクロはショートカットがあるので、実はもっと簡単になる。&lt;/p&gt;
&lt;p&gt;C-x ( は F3 キーに割り当てられていて、C-x ) はF4 キーに割り当てられている。&lt;/p&gt;
&lt;p&gt;さらに、C-x )は繰り返しのコマンド &quot;M-数字&quot; が適用できて、この場合にはマクロを定義して即座に数字（-1）回分実行する。&lt;/p&gt;
&lt;p&gt;まとめると以下の &quot;プログラム&quot; になる。
&lt;p&gt;&lt;strong&gt;&quot;F3 Foo M-3 F4&quot;&lt;/strong&gt; (6ストローク！！)&lt;/p&gt;
&lt;br&gt;
&lt;h3&gt;3. まとめ&lt;/h3&gt;
&lt;p&gt;あまり実用的ではない編集方法でした。&lt;/p&gt;
&lt;p&gt;以下を覚えておくと、この駄文を最後まで読んだ意義があるかもしれません。&lt;/p&gt;
&lt;p&gt;　1. M-del で後ろ向きに1単語 kill する。&lt;/p&gt;
&lt;p&gt;　2. M-数字 コマンド でコマンドを &quot;数字&quot; 回繰り返す。&lt;/p&gt;
&lt;p&gt;　3. マクロの定義、実行は意外と簡単（やってみるべき！）。定義にはショートカット（F3, F4）もある。&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;リンク&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.gnu.org/software/emacs/manual/html_node/emacs/Basic-Keyboard-Macro.html#Basic-Keyboard-Macro&quot;&gt;・Emacs manual - Keyboard Macros 17.1 Basic use&lt;/a&gt;
&lt;p&gt;&lt;a href=&quot;http://bhby39.blogspot.jp/2015/02/vim.html&quot;&gt;・Vim に乗り換え！？&lt;/a&gt;&lt;/p&gt;
&lt;br&gt;
&lt;SCRIPT charset=&quot;utf-8&quot; type=&quot;text/javascript&quot; src=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&amp;MarketPlace=JP&amp;ID=V20070822%2FJP%2Fwithhavingfun-22%2F8010%2Fc287e986-7d83-43f7-9192-4471cb1e5e41&amp;Operation=GetScriptTemplate&quot;&gt; &lt;/SCRIPT&gt; &lt;NOSCRIPT&gt;&lt;A HREF=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&amp;MarketPlace=JP&amp;ID=V20070822%2FJP%2Fwithhavingfun-22%2F8010%2Fc287e986-7d83-43f7-9192-4471cb1e5e41&amp;Operation=NoScript&quot;&gt;Amazon.co.jp ウィジェット&lt;/A&gt;&lt;/NOSCRIPT&gt;
&lt;br&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 below_rectangle_middle --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;7337090445&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/8827135616025174264/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2015/02/emacs-foofoofoo.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/8827135616025174264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/8827135616025174264'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2015/02/emacs-foofoofoo.html' title='Emacs &quot;FooFooFoo&quot; をプログラミングする'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-4046006701734627327</id><published>2015-02-01T13:13:00.000+09:00</published><updated>2015-02-01T13:13:04.271+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="書評"/><title type='text'>Vim に乗り換え！？</title><content type='html'>&lt;p&gt;Software Design の2015年1月号は Vim の特集でした。&lt;/p&gt;
&lt;p&gt;Emacs を使っているので、普段は Vim の記事は読まないのですが、Vim を IDE のように使うという記事に惹かれてちょっと読み始めました。&lt;/p&gt;
&lt;p&gt;Emacs を使っていても、もう少し IDE 的にしたいと感じていたので妙に熱心に読んでしまい、気がついたら Vim をインストールしてチュートリアルをやっていました。&lt;/p&gt;

&lt;br&gt;
&lt;p&gt;もう Vim への乗り換えを決意して、チュートリアルも終わった後で、ふと１文字削除しようとして我に返りました。&lt;/p&gt;
&lt;p&gt;１文字削除するには、「編集モードに移行して x キーを押す」なのか？&lt;/p&gt;
&lt;p&gt;これは打ち間違えた時のコストが高すぎる！&lt;/p&gt;
&lt;p&gt;・・・何でもコマンドですると思い込んでいて Backspace で消せることには思いが至りませんでした。&lt;/P&gt;
&lt;p&gt;とにかく、勘違いにせよ冷静になれました。&lt;/p&gt;
&lt;p&gt;Emacs も何でもできるので IDE 的にしたければ Emacs でやればいいだけでした。&lt;/p&gt;
&lt;p&gt;一瞬だけの Vim 乗り換えでしたが、IDE 的に拡張したいポイントを考えるいいきっかけになりました。&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;***&lt;/p&gt;
&lt;p&gt;特集のコラムで Vim の編集作業はプログラミングであると言っていました。&lt;/p&gt;
&lt;p&gt;「3iFoo Esc」と &quot;プログラム&quot; すると「FooFooFoo」という結果が得られるという例が挙げられていました。&lt;/p&gt;
&lt;p&gt;モードを切り替えて入力したり編集したりすると考えるのではなく、編集作業全体（3iFoo Esc）がプログラムで、結果としてある文字が入力されている、という考え方です。&lt;/p&gt;&lt;p&gt;面白い考え方と思いました。&lt;/p&gt;
&lt;p&gt;Emacs は編集モードはありませんが、様々な編集のショートカットがあるので考え方は通ずるところがあると思います。&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;今、Emacs を使っていて編集機能を使いこなせているとは言いがたいので、もう少しチャレンジしてみようと思いました。&lt;/p&gt;
&lt;p&gt;普段は読まない Vim 記事ですが、いい刺激が得られました。&lt;/p&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/B00QH3HQMO/ref=as_li_qf_sp_asin_il?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=B00QH3HQMO&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B00QH3HQMO&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=withhavingfun-22&quot; &gt;&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=B00QH3HQMO&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/B00QH3HQMO/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=B00QH3HQMO&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;Software Design (ソフトウェア デザイン) 2015年 01月号 [雑誌]&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=B00QH3HQMO&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;br&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 below_rectangle_middle --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;7337090445&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/4046006701734627327/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2015/02/vim.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/4046006701734627327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/4046006701734627327'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2015/02/vim.html' title='Vim に乗り換え！？'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-6432353448333689147</id><published>2015-01-18T00:15:00.000+09:00</published><updated>2015-01-18T00:15:18.015+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="手帳"/><title type='text'>2015年の手帳</title><content type='html'>&lt;p&gt;昨年に続き今年もフランクリン・プランナーの手帳にしました。&lt;/p&gt;
&lt;p&gt;中身は特に変わりはないようですが、「段差をなくし、180度開いて使いやすく改良しました。」と&lt;a href=&quot;http://www.franklinplanner.co.jp/shopping/boundnotebook/organizer-04s.html&quot;&gt;メーカーが書いている通り&lt;/a&gt;、明らかに開きやすく改良されています。&lt;/p&gt;
&lt;p&gt;あと、カバーにペン差しがついたのがありがたい。&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;と思っていたのですが、僕の３色ボールペンはサイズがペン差しにギリギリで入れにくいので使うのをやめました。&lt;/p&gt;
&lt;p&gt;もう一つ不満を言うと、手帳のカバーにはポケットがあって、一週間の目標を書く短冊状のカードを入れるようになっているのですが、これが浅すぎて落ちそうで不安です。&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;以前に使っていたほぼ日手帳はつくづく良くできた作りだったと思います。&lt;/p&gt;
&lt;p&gt;ペン差しにペンを差すと手帳が開かないように閉じられるのは本当に良い。&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;***&lt;/P&gt;
&lt;p&gt;フランクリン・プランナーはカバーには不満なのですが、中身は自分には合っていて、とにかくやる気にさせてくれるので、今は手放せないです。&lt;/p&gt;
&lt;p&gt;たぶん、「７つの習慣」を実践するように導いてくれたり、思い出させてくれるからだと思う。&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;***&lt;/p&gt;
&lt;p&gt;実はこの手帳、カバー無しの中身だけでも入手できます。&lt;/p&gt;
&lt;p&gt;この記事を書きながら気づいたのですが、中身をフランクリン・プランナーにして、カバーはほぼ日にすれば、これは僕にとって完全にベストな手帳です。&lt;/p&gt;
&lt;p&gt;ただ、サイズが今年買ったB6サイズに合うものが、ほぼ日にはありません。A5サイズなら両方そろいます！&lt;/p&gt;
&lt;p&gt;来年はこれだ！　来年が待ち遠しい！&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;リンク：&lt;a href=&quot;http://www.franklinplanner.co.jp/shopping/boundnotebook/organizer-04s.html&quot;&gt;フランクリン・プランナー　オーガナイザー〈2015.4〉&lt;/a&gt;
&lt;p&gt;リンク：&lt;a href=&quot;http://bhby39.blogspot.jp/2013/12/blog-post_19.html&quot;&gt;手帳で気分転換（フランクリン・プランナー）&lt;/a&gt;
&lt;br&gt;
&lt;p&gt;リンク：&lt;a href=&quot;http://www.amazon.co.jp/b/ref=as_li_qf_br_sr_il_tl?_encoding=UTF8&amp;camp=247&amp;creative=1211&amp;linkCode=as2&amp;node=2460011051&amp;tag=withhavingfun-22&quot;&gt;Amazon  ダイアリー・綴じ手帳&lt;/a&gt;&lt;/p&gt;
&lt;br&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 below_rectangle_middle --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;7337090445&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/6432353448333689147/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2015/01/2015.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/6432353448333689147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/6432353448333689147'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2015/01/2015.html' title='2015年の手帳'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-2810234942056043513</id><published>2014-07-20T21:47:00.000+09:00</published><updated>2014-07-20T21:47:51.727+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><title type='text'>⌘＋クリックで１秒短縮（新しいタブで開く）</title><content type='html'>&lt;p&gt;
Chrome でリンク先を「新しいタブで開く」時は、⌘＋クリック。
&lt;/p&gt;
&lt;p&gt;
知らなかったので、久々の大物ライフハック。
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
今までは、
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt; リンクを２本指タップ、
&lt;li&gt; コンテキストメニューから「新しいタブで開く」を選択。
&lt;/ol&gt;
&lt;p&gt;
でも、２本指でタップしたつもりが１本指になっていてリンク先に移動してしまう、なんて事故も時々。
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
1秒くらいの時間短縮になるかな。
&lt;/p&gt;
&lt;p&gt;
Safari でも同じ機能でした。FireFox でも同じでした。
&lt;/p&gt;
&lt;p&gt;
Linux や Windows では、⌘でなくて Ctrl キーです。
&lt;/p&gt;
&lt;p&gt;
実は業界標準ですか？
&lt;/p&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 below_rectangle_middle --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;7337090445&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;iframe src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=withhavingfun-22&amp;o=9&amp;p=12&amp;l=ur1&amp;category=amazoncampaign&amp;banner=0KNZQ1XWQP0VR5F7DTR2&amp;f=ifr&quot; width=&quot;300&quot; height=&quot;250&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/2810234942056043513/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2014/07/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/2810234942056043513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/2810234942056043513'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2014/07/blog-post.html' title='⌘＋クリックで１秒短縮（新しいタブで開く）'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-7134992121839688247</id><published>2014-05-10T09:47:00.000+09:00</published><updated>2014-05-10T09:49:56.065+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="evernote"/><category scheme="http://www.blogger.com/atom/ns#" term="iTerm2"/><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><category scheme="http://www.blogger.com/atom/ns#" term="tmux"/><title type='text'>iTerm2 カーソル位置の見つけ方</title><content type='html'>&lt;p&gt;
iTerm2 で「 ⌘ + / 」とタイプするとカーソル位置が見つかります。
&lt;/p&gt;
&lt;p&gt;
エディタを使っている時や、tmux で画面分割している時などは、目を動かして探しまわるよりもこの方が一瞬早く見つけられるかも。
&lt;/p&gt;
&lt;p&gt;
画面の移動をしようと思って（ ⌘ + ]）間違えてタイプして発見しました。&lt;br /&gt;
（我ながら、ちょっとあり得ないミスタイプですが。）
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
***
&lt;/p&gt;
&lt;p&gt;
もしかして Mac のデフォルトの機能なのかと思って、Evernote 上でも試してみました。&lt;br /&gt;
ノートが共有されました。&lt;br /&gt;
むやみに試さないほうがいいです。
&lt;/p&gt;
&lt;p&gt;
***
&lt;/p&gt;
&lt;p&gt;
iTerm2 のメニューの View の中に 「 Find Cursor 」というのがあるのに後で気づきました。
&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt; 
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 below_rectangle_middle --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;7337090445&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
&lt;iframe src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=withhavingfun-22&amp;o=9&amp;p=12&amp;l=ur1&amp;category=amazoncampaign&amp;banner=0YG23VH6AV6XCXJXFSG2&amp;f=ifr&quot; width=&quot;300&quot; height=&quot;250&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/7134992121839688247/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2014/05/iterm2_10.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/7134992121839688247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/7134992121839688247'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2014/05/iterm2_10.html' title='iTerm2 カーソル位置の見つけ方'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-1440074235950089674</id><published>2014-05-06T10:28:00.001+09:00</published><updated>2016-06-18T20:38:07.148+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iTerm2"/><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><title type='text'>iTerm2 画面分割状態で起動</title><content type='html'>&lt;p&gt;iTerm2 では画面分割とかタブを利用して、ターミナルを自分用の使いやすい配置にできます。&lt;/p&gt;
&lt;p&gt;でも、立ち上げるたびに毎回分割するのはちょっと面倒。&lt;/p&gt;
&lt;p&gt;iTerm2 を使って暫く経つのですが、いまさらながら「 保存しておいた分割を起動時に再現できる 」方法を知ったので紹介します。&lt;/p&gt;
&lt;br /&gt;
&lt;h3&gt;【手順】&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;希望の分割、タブ追加等を行います。&lt;/li&gt;
&lt;li&gt;現在の状態を保存します。&lt;br /&gt;
これは、メニューの「 Window 」→「 Save Window Arrangement 」を選んで適当な名前をつけるとできます。&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7NnxThjiX067iBRAlR475VWnPn0vax-VtEPLoiO0IvaF64XAodXNANfm58X1SCNrQ_n5EGpnh09VaiebsseZBffVc5pqYn-Iu0WZkOCLBE72J090RWSBTQD3UEiI6J7fJuf77dy1qhqY/s320/save_arrangement.png&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;メニューの「 iTerm 」→「 Preferences... 」→「 General 」→ Startup項の「 Open default window arrangement 」にチェックを入れる。これで起動時にデフォルトの配置になります。
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoZ1hyYOQzEHLjZ_fsRY4wj_PZ6QOm4PU4U-QGN-iKr4sTW7JlKh964FgvCzAjxkKs3mLB_m7sCicyEllAW_KMVmEJJ4_QUOeAZD0xAohK2zsyIk_OizGlBDaVUc8WbsgPLhUsSIt1CXo/s1600/preference_s.png&quot;&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;続いて、Preferences 画面の「 Arrangements 」で先ほど、手順２で保存した設定を選択し 「Set Default」ボタンを押してデフォルトにします。
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjncHY_AsCEId_ADnIc0-1s1_St7lcGkbP3q6L9gj1lIOICWEQLqEI1pE6CQeyjedeH4W209rlohwZP4AbJl3NvWfZq79OkxJJWOFWRT2A6fVDQrA4xk1_-vnePczue0bvYHoSm3l_dTd4/s1600/arrangements_s.png&quot;&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
これで次に iTerm を立ち上げた時に保存した分割、タブ状態で起動します。
&lt;/p&gt;
&lt;p&gt;
＜リンク＞ &lt;a href=&quot;http://www.iterm2.com/#/section/documentation&quot;&gt;iTerm2 Documentation&lt;/a&gt;
&lt;/p&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 below_rectangle_middle --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;7337090445&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;iframe src=&quot;https://rcm-fe.amazon-adsystem.com/e/cm?t=withhavingfun-22&amp;amp;o=9&amp;amp;p=12&amp;amp;l=ur1&amp;amp;category=pc_peripherals&amp;amp;banner=10HBF6BYAZYY4W0S9H02&amp;amp;f=ifr&quot; width=&quot;300&quot; height=&quot;250&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/1440074235950089674/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2014/05/iterm2.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/1440074235950089674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/1440074235950089674'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2014/05/iterm2.html' title='iTerm2 画面分割状態で起動'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7NnxThjiX067iBRAlR475VWnPn0vax-VtEPLoiO0IvaF64XAodXNANfm58X1SCNrQ_n5EGpnh09VaiebsseZBffVc5pqYn-Iu0WZkOCLBE72J090RWSBTQD3UEiI6J7fJuf77dy1qhqY/s72-c/save_arrangement.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-4730662390161703043</id><published>2014-04-17T00:23:00.000+09:00</published><updated>2014-04-17T21:01:53.294+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google"/><title type='text'>Google 翻訳良いと思います。</title><content type='html'>&lt;p&gt;Google 翻訳良いです。&lt;/p&gt;
&lt;a href=&quot;http://translate.google.co.jp/&quot;&gt;Google 翻訳&lt;/a&gt;

&lt;p&gt;
機械翻訳は面白い訳をするだけで役に立たないとずっと思っていました。
&lt;/p&gt;
&lt;p&gt;
必要に迫られて使ってみると意外とまともで、ちょっとびっくりしています。
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
英訳をしたかったのですが、タブを２つ開いてひとつは日本語→英語、もうひとつは英語→日本語として使いました。
&lt;/p&gt;
&lt;p&gt;
日本語を英訳して、結果をまた日本語訳して正しく英訳できているのか確認。
英語をちょっと変更してから、また日本語訳して確認。
&lt;/p&gt;
&lt;p&gt;
こうやって、ちょっとずつ英語の精度を高めていこうという作戦です。
&lt;/p&gt;
&lt;p&gt;
でも結局、自分の知識は超えられないので、候補はいくつかできるのですが本当の正解は分からない・・・。&lt;br /&gt;
自然な英語なのかどうかがいつまでたっても心配です。&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;
機械翻訳がダメという思いがまだどこかにあるのでこんなことをやってしまうんですが、もう信じてみてもいいのかもしれません。
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
&lt;a href=&quot;http://ja.wikipedia.org/wiki/Google%E7%BF%BB%E8%A8%B3&quot;&gt;ウィキペディア&lt;/a&gt;によると、よく使われている翻訳エンジンとは別の、独自のエンジンで統計的機械翻訳というのを使っているとのことです。
&lt;/p&gt;
&lt;p&gt;
元々、言語学の分野のものを統計学の分野に引っ張ってきて、エンジニアが介入できる余地が大きくなって、翻訳精度が上がったんだろうか、と勝手に想像。
&lt;/p&gt;
&lt;p&gt;
Google 翻訳は良いと思います。
&lt;/p&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 below_rectangle_middle --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;7337090445&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/4730662390161703043/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2014/04/google.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/4730662390161703043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/4730662390161703043'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2014/04/google.html' title='Google 翻訳良いと思います。'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-2305557119004558046</id><published>2014-03-31T23:30:00.000+09:00</published><updated>2014-04-01T00:36:48.615+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="command"/><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><title type='text'>Mac に nkf をインストールして乾杯</title><content type='html'>&lt;p&gt;
Mac で nkf コマンドを使おうと思ったら Mac にはデフォルトでは入っていないよう。
&lt;/p&gt;
&lt;p&gt;
homebrew でも入れられるとのことなので、インストールする。
&lt;pre&gt;
$ brew install nkf
&lt;/pre&gt;
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
インストールは一瞬で終わるのですが、homebrew ではインストールメッセージの最後にビールアイコンが表示される。&lt;br /&gt;
「おつかれさま！」の意味なんだろうか。&lt;br /&gt;
大した仕事はしてないのですが、乾杯することにします。
&lt;/p&gt;

&lt;p&gt;
このビールアイコンを見ると、味気ないターミナルに表示されるためか、妙にテンションが上ります。&lt;br /&gt;
Mac で見たいときには下記コマンドで出てきます。
&lt;pre&gt;
$ echo &quot;\xf0\x9f\x8d\xba&quot;
&lt;/pre&gt;
&lt;p&gt;
&lt;br /&gt;
参考：&lt;a href=&quot;http://rochefort.hatenablog.com/entry/20130203/p1&quot;&gt; homebrewでinstall後にビールアイコンが表示される件
 &lt;/a&gt;
&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 below_rectangle_middle --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;7337090445&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
&lt;iframe src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=withhavingfun-22&amp;o=9&amp;p=13&amp;l=ur1&amp;category=books&amp;f=ifr&quot; width=&quot;468&quot; height=&quot;60&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/2305557119004558046/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2014/03/mac-nkf.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/2305557119004558046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/2305557119004558046'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2014/03/mac-nkf.html' title='Mac に nkf をインストールして乾杯'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-3158298639075026059</id><published>2014-02-22T22:45:00.000+09:00</published><updated>2016-07-15T22:15:50.197+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="emacs"/><title type='text'>Emacs 閉じカッコの自動挿入</title><content type='html'>&lt;p&gt;
Emacs で開きカッコを書くと自動で対応する閉じカッコを挿入するモードがありました。&lt;br /&gt;
Emacs 24 で導入された機能です。&lt;br /&gt;
機能を有効にするには、.emacs に以下のように書くだけ。
&lt;pre&gt;
(electric-pair-mode 1)
&lt;/pre&gt;

&lt;p&gt;
リンク：&lt;a href=&quot;http://ergoemacs.org/emacs/emacs_insert_brackets_by_pair.html&quot;&gt;Emacs: Insert Parenthesis/Brackets by Pair&lt;/a&gt;&lt;br /&gt;
リンク：&lt;a href=&quot;http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Parentheses&quot;&gt;The Emacs Editor の 26.4.3 Matching Parentheses&lt;/a&gt;
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
***
&lt;/p&gt;
&lt;p&gt;
なんと、この対応は全角のカッコでもOKです。&lt;br /&gt;
「」とか【】でも機能します。&lt;br /&gt;
&lt;br /&gt;

なんと、なんと、&quot;&quot; (ダブルクオート) にも対応しています。&lt;br /&gt;
(&quot;string&quot;) などと書く時にどういう順番でタイプするのが早いのかというのを、もう悩まなくても済みます。&lt;br /&gt;
( を書いて &quot; を書くと、(&quot;&quot;) という状態になってカーソルがダブルクオートの間に来るので、後は string と書くだけ。&lt;br /&gt;
&lt;br /&gt;
長年のモヤモヤが解決しました。
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
リンク：&lt;a href=&quot;http://bhby39.blogspot.jp/2016/07/emacs.html&quot;&gt;Emacs カッコの自動挿入で困っている方へ&lt;/a&gt;
&lt;/p&gt;
&lt;br /&gt;
&lt;script charset=&quot;utf-8&quot; type=&quot;text/javascript&quot; src=&quot;https://ws-fe.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&amp;amp;MarketPlace=JP&amp;amp;ID=V20070822/JP/withhavingfun-22/8010/c287e986-7d83-43f7-9192-4471cb1e5e41&amp;amp;Operation=GetScriptTemplate&quot;&gt; &lt;/SCRIPT&gt; &lt;NOSCRIPT&gt;&lt;A HREF=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&amp;MarketPlace=JP&amp;ID=V20070822%2FJP%2Fwithhavingfun-22%2F8010%2Fc287e986-7d83-43f7-9192-4471cb1e5e41&amp;Operation=NoScript&quot;&gt;Amazon.co.jp ウィジェット&lt;/A&gt;&lt;/NOSCRIPT&gt;

&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 below_rectangle_middle --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;7337090445&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/3158298639075026059/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2014/02/emacs.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/3158298639075026059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/3158298639075026059'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2014/02/emacs.html' title='Emacs 閉じカッコの自動挿入'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-9001375501015610806</id><published>2014-02-03T23:45:00.000+09:00</published><updated>2014-02-04T23:32:49.226+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="kindle"/><category scheme="http://www.blogger.com/atom/ns#" term="書評"/><title type='text'>「黒田如水」の予習</title><content type='html'>&lt;p&gt;
吉川英治の「黒田如水」を Kindle で読みました。&lt;br /&gt;
今年の大河ドラマは「軍師官兵衛」なので、予習をしようと思ってです。
&lt;/p&gt;
&lt;p&gt;
Amazon でも Kindle の無料書籍の1位になっており、みんな同じようなことを考えているのではないでしょうか。
&lt;/p&gt;
&lt;p&gt;
決して暗君ではないが、優柔不断な殿様、小寺政職。&lt;br /&gt;
自分を取り立ててくれたこの殿様のために、滅私の精神で奔走する官兵衛の姿が描かれていて面白かった。&lt;/p&gt;

&lt;p&gt;
***&lt;br /&gt;&lt;br /&gt;
最近、「7つの習慣」を読んで理想に近づこうという気持ちが盛り上がっていて、その為もあってか官兵衛の、純粋に自分の信じる理想を追求する姿に共感した。
&lt;/p&gt;
&lt;p&gt;
しかし、7つの習慣を読んだせいか、官兵衛を「大きな仕事を本気でやり遂げていくビジネスマン」の姿に置き換えて読んでしまうという弊害もあった。
&lt;/p&gt;

&lt;p&gt;
***&lt;br /&gt;&lt;br /&gt;
こんなにも主君のためと思っていても、政職に裏切られ、結果、敵将の荒木村重の元に数ヶ月間も幽閉されてしまう。
&lt;/p&gt;
&lt;p&gt;
それでも助けだされた時には、「倍返しだ！」とはならない。&lt;br /&gt;
旧恩に報いるため、国を追われて落ちぶれた政職の家族を客分として迎えるというくだりは清々しい。&lt;/p&gt;
&lt;p&gt;
この本は残念ながらここで終わっていて、官兵衛の半生しか書かれていない。&lt;br /&gt;
大河ドラマの予習のためには、後半生を別の本で読まなければならない。
&lt;/p&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/B00G3SRJYI/ref=as_li_tf_il?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=B00G3SRJYI&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B00G3SRJYI&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=withhavingfun-22&quot; &gt;&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=B00G3SRJYI&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/B00G3SRJYI/ref=as_li_tf_tl?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=B00G3SRJYI&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;黒田如水&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=B00G3SRJYI&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;br /&gt;
&lt;p&gt;リンク&lt;/p&gt;
&lt;a href=&quot;http://bhby39.blogspot.jp/2014/01/7.html&quot;&gt;・「 7 つの習慣 」のひと言まとめ&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/9001375501015610806/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2014/02/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/9001375501015610806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/9001375501015610806'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2014/02/blog-post.html' title='「黒田如水」の予習'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-1123598148411240984</id><published>2014-01-07T23:47:00.000+09:00</published><updated>2014-01-07T23:49:06.047+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="手帳"/><category scheme="http://www.blogger.com/atom/ns#" term="書評"/><title type='text'>「 7 つの習慣 」のひと言まとめ</title><content type='html'>&lt;p&gt;
今年から新しい手帳、フランクリン・プランナーを使い始めました。&lt;br /&gt;
この手帳はスティーブン・R・コヴィー著の「７つの習慣」がベースになっているとのことなので「７つの習慣」を読みました。
&lt;/p&gt;
&lt;br /&gt;
&lt;h3&gt;■1. ７つとは&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;主体性を発揮する&lt;/li&gt;
  &lt;li&gt;目的を持って始める&lt;/li&gt;
  &lt;li&gt;重要事項を優先する&lt;/li&gt;
  &lt;li&gt;Win-Win を考える&lt;/li&gt;
  &lt;li&gt;理解してから理解される&lt;/li&gt;
  &lt;li&gt;相乗効果を発揮する&lt;/li&gt;
  &lt;li&gt;刃を研ぐ&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;&lt;br /&gt;

&lt;h3&gt;■2. ７つの習慣のひと言まとめ&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;1. 主体性を発揮する&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;自分自身の行動は周りの状況からではなく、自分の価値観に基づいて決める。&lt;br /&gt;
反対語は「反応的」。&lt;br /&gt;
反応的な人は周りから大きな影響を受ける&lt;/p&gt;
&lt;br /&gt;

&lt;p&gt;&lt;strong&gt;2. 目的を持って始める&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;自分はどうなりたいのか、何をしたいのか、自分の行動の基礎となる価値観を明確にする。&lt;br /&gt;
（ミッション・ステートメントを書く）&lt;br /&gt;
そして、その価値観に基づいて行動する。&lt;/p&gt;
&lt;br /&gt;

&lt;p&gt;&lt;strong&gt;3. 重要事項を優先する&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;大事を小事の犠牲にしてはならない。&lt;br /&gt;
緊急度ではなく重要度に集中する。&lt;br /&gt;
なかなか手がつけられない、「緊急ではないが重要な事柄」を行うようにする。&lt;/p&gt;
&lt;br /&gt;

&lt;p&gt;&lt;strong&gt;4. Win-Win を考える&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;お互いに満足できる合意を打ち出すこと。&lt;br /&gt;
当初、それぞれの当事者が持っていた案ではなく全く新しい第三案の存在を信じる。&lt;/p&gt;
&lt;br /&gt;

&lt;p&gt;&lt;strong&gt;5. 理解してから理解される&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;まず相手を理解するように努め、その後で自分を理解してもらうようにする。&lt;br /&gt;
相手を本当に理解するためには自分のパラダイムというフィルターを通して話を聞くのではない。&lt;br /&gt;
感情移入して聞くようにする。&lt;/p&gt;
&lt;br /&gt;

&lt;p&gt;&lt;strong&gt;6. 相乗効果を発揮する&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1 〜 5 の習慣により１プラス１が３あるいはそれ以上の結果となるようにする。&lt;/p&gt;
&lt;br /&gt;

&lt;p&gt;&lt;strong&gt;7. 刃を研ぐ&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;自分自身という最も大切な資源を維持する。&lt;br /&gt;
肉体的、精神的、知的、社会・情緒的側面のそれぞれを再新再生させること。&lt;br /&gt;
定期的に刃を研ぐ時間を取らなければならない。&lt;/p&gt;
&lt;br /&gt;&lt;br /&gt;

&lt;h3&gt;■3. その他の重要キーワード&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;1. パラダイム&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
世界を見る見方。認識、理解、解釈を決めるもの。&lt;br /&gt;
本書では&lt;a href=&quot;http://ja.wikipedia.org/wiki/%E5%A6%BB%E3%81%A8%E7%BE%A9%E6%AF%8D&quot;&gt;若い女性と老婆のだまし絵&lt;/a&gt;の例が取り上げられている。&lt;br /&gt;
同じ絵を見ていても、絵が若い女性に見える人もいれば老婆と見える人もいる。&lt;br /&gt;
つまり、物事を見た時に自分だけが正しいのではなく相手も正しい。&lt;br /&gt;
相手の見え方（パラダイム）を理解することが大事。
&lt;/p&gt;
&lt;br /&gt;

&lt;p&gt;&lt;strong&gt;2. インサイド・アウト&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;自分自身の根本的なパラダイム、人格、動機などを変えることから始める。&lt;br /&gt;
相手や環境を正そうとするのではなく。
&lt;/p&gt;
&lt;br /&gt;

&lt;p&gt;&lt;strong&gt;3. P / PC&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;目標達成(performance)と目標達成能力(performance capability)。&lt;br /&gt;
斧を使って目標を達成するだけでなく、定期的に刃を研いでその能力を維持あるいは向上させる。&lt;br /&gt;
つまり、目標達成能力を向上させる。
&lt;/p&gt;
&lt;br /&gt;
ひと言まとめで物足りない方はこちらもどうぞ。&lt;a href=&quot;http://www.franklinplanner.co.jp/beginner/planner.html&quot;&gt;（フランクリン・プランナーの解説ページ）&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;リンク&lt;/p&gt;
&lt;a href=&quot;http://bhby39.blogspot.jp/2013/12/blog-post_19.html&quot;&gt;・手帳で気分転換（フランクリン・プランナー）&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/4863940246/ref=as_li_tf_il?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=4863940246&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=4863940246&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=withhavingfun-22&quot; &gt;&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=4863940246&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/4863940246/ref=as_li_tf_tl?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=4863940246&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;完訳 7つの習慣 人格主義の回復&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=4863940246&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;

&lt;p&gt;
（※ 新しい翻訳が出ているようですが、僕は古い方を読みました。）
&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt; 
&lt;iframe src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=withhavingfun-22&amp;o=9&amp;p=12&amp;l=ur1&amp;category=office&amp;banner=1EPGMTM19WQH0YJEJH02&amp;f=ifr&quot; width=&quot;300&quot; height=&quot;250&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- bigbanner728x90 --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:728px;height:90px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;8722558787&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/1123598148411240984/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2014/01/7.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/1123598148411240984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/1123598148411240984'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2014/01/7.html' title='「 7 つの習慣 」のひと言まとめ'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-7512934688012331972</id><published>2013-12-19T00:00:00.000+09:00</published><updated>2014-02-03T23:46:15.993+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="手帳"/><title type='text'>手帳で気分転換（フランクリン・プランナー）</title><content type='html'>&lt;p&gt;
来年の手帳は&lt;a href=&quot;http://www.amazon.co.jp/gp/product/B00F3Y0IIC/ref=as_li_ss_tl?ie=UTF8&amp;camp=247&amp;creative=7399&amp;creativeASIN=B00F3Y0IIC&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;フランクリン・プランナー&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=B00F3Y0IIC&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
にしました。
&lt;/p&gt;
&lt;p&gt;
これまで 5 年間は「&lt;a href=&quot;http://www.1101.com/store/techo/&quot;&gt;ほぼ日手帳&lt;/a&gt;」を使っていて気に入ってはいるのですが、（手帳の良し悪しとは関係なく）漠然とした行き詰まり感を感じていて気分転換も兼ねて変えてみました。
&lt;/p&gt;
&lt;p&gt;
1 日 1 ページの手帳です。
&lt;/p&gt;
&lt;p&gt;
この手の手帳を持つ人はスケジュール管理以上の何かを手帳に求めていると思いますが、今回の手帳は目的が明確です。
&lt;/p&gt;
&lt;p&gt;
「なりたい自分になって人生の目標を達成する」
&lt;/p&gt;
&lt;p&gt;
使いこなせれば確かに成長して目標に近づけそうな内容です。
&lt;/p&gt;
&lt;p&gt;
手帳を開くと 40 ページまで活用の仕方の説明があり、これを読んだだけでも前向きな考え方にさせられます。
&lt;/p&gt;
&lt;p&gt;
新しい手帳を手にして、あとは来年が来るのを待つだけ・・・ではありません。&lt;br /&gt;
使い始めるにあたっては、まず「ミッション・ステートメント」を書き出します。これは人生の目的や自分がどうありたいかといったこと。
&lt;/p&gt;
&lt;p&gt;
そして次に何を達成すればミッション・ステートメントが実現するのかといった具体的な目標を設定し、更にその目標を小さなステップに切り分けます。
&lt;/p&gt;
&lt;p&gt;
・・・ここまでで、すでにお腹いっぱいです。
&lt;/p&gt;
&lt;p&gt;
使い始めたら「一週間コンパス」で毎週目標を決め、日々のページでは QII Activities として「緊急ではないが重要」な項目をピックアップしておく。
&lt;/p&gt;
&lt;p&gt;
・・・全くスキがないです。
&lt;/p&gt;
&lt;p&gt;
ミッション・ステートメントを考える過程では、憧れの人から連想するように導かれますが、昔の上司や後輩を思い出して初心に帰った気分です。
&lt;/p&gt;
&lt;p&gt;
しかし、1 月 1 日に使い始められるように準備が間に合うかな？
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
リンク
&lt;/p&gt;
&lt;p&gt;
&lt;a href=&quot;http://bhby39.blogspot.jp/2014/01/7.html&quot;&gt;「 7 つの習慣 」のひと言まとめ&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/B00F3Y0IIC/ref=as_li_ss_il?ie=UTF8&amp;camp=247&amp;creative=7399&amp;creativeASIN=B00F3Y0IIC&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B00F3Y0IIC&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=withhavingfun-22&quot; &gt;&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=B00F3Y0IIC&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/B00F3Y0IIC/ref=as_li_ss_tl?ie=UTF8&amp;camp=247&amp;creative=7399&amp;creativeASIN=B00F3Y0IIC&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;フランクリン・プランナー　PVC  1日１P 2014年1月始まり B6綴じ手帳 デイリー (バーガンディ)&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=B00F3Y0IIC&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;/p&gt;

&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;iframe src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=withhavingfun-22&amp;o=9&amp;p=12&amp;l=ur1&amp;category=office&amp;banner=1EPGMTM19WQH0YJEJH02&amp;f=ifr&quot; width=&quot;300&quot; height=&quot;250&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- bigbanner728x90 --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:728px;height:90px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;8722558787&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/7512934688012331972/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2013/12/blog-post_19.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/7512934688012331972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/7512934688012331972'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2013/12/blog-post_19.html' title='手帳で気分転換（フランクリン・プランナー）'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-8465735730821774695</id><published>2013-12-06T00:30:00.000+09:00</published><updated>2013-12-07T19:46:45.778+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iPod touch"/><title type='text'>人生のやり残しを取り返せるか（ドラクエDL.無料です。）</title><content type='html'>&lt;p&gt;
ドラクエが iPhone で無料でできるということで（僕は iPod touch ですが）、先日より始めて、暇さえあれば経験値をためています。
&lt;/p&gt;
&lt;p&gt;
昔、ファミコンでやった時は最後のボスを倒せずじまいでした。
&lt;br /&gt;
なので、実はエンディングを見ていないのです。
&lt;/p&gt;
&lt;p&gt;
エンディングを見ておらず、ドラクエはこれまでにやり残した感のある事の一つだったので、iPod touch でやっていると、人生をもう一度やり直すチャンスをもらった気分です。（大げさでなく本当に。）
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
ふと気づくと対時間効果が最大になるように（早く終えたい）考えていたりと、昔は、純粋にその瞬間を夢中になってやっていたのとは違った遊び方をしているのは面白い。
&lt;br /&gt;
（それにしても今は、解き方を&lt;a href=&quot;http://matome.naver.jp/odai/2138578164393771601&quot;&gt;こんな&lt;/a&gt;に丁寧に教えてもらえるとは・・・。明日からは一気に進みそうです。）
&lt;/p&gt;
&lt;p&gt;
・・・今ひとつ夢中になれないとは、やはり過ぎ去った時間は取り戻せないのか？
&lt;/p&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 below_rectangle_middle --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;7337090445&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;iframe src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=withhavingfun-22&amp;o=9&amp;p=12&amp;l=ur1&amp;category=kindlebooks&amp;banner=18CJR2Q2BTZDZ6GG2X82&amp;f=ifr&quot; width=&quot;300&quot; height=&quot;250&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/8465735730821774695/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2013/12/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/8465735730821774695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/8465735730821774695'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2013/12/blog-post.html' title='人生のやり残しを取り返せるか（ドラクエDL.無料です。）'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-330907999663739982</id><published>2013-11-29T14:21:00.000+09:00</published><updated>2013-12-02T00:59:54.920+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chrome"/><title type='text'>OS が変わると動作が変わるのが悩ましい（Chrome 拡張機能）</title><content type='html'>&lt;p&gt;
Chrome の拡張機能を書いています。
&lt;/p&gt;
&lt;p&gt;
バックグラウンドで処理をする機能を書いていて、ブラウザを終了すると処理も終了して欲しいのですが、Windows ではブラウザが終了してもバックグラウンドの処理は動き続けています。
&lt;/p&gt;
&lt;p&gt;
Mac では終了します。Linux でも終了します。
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
悩ましい。
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
ならば、ブラウザの終了を検知して明示的に処理を終了させれば良いのだ。&lt;br /&gt;
・・・しかし、ブラウザの終了タイミングを検知するそのものズバリのイベントはないようです。
&lt;/p&gt;
&lt;p&gt;
ウインドウが閉じられたタイミングを知らせるイベントはあるので、
&lt;/p&gt;
&lt;p&gt;
「最後のウインドウが閉じられた」 = 「ブラウザが終了した」
&lt;/p&gt;
&lt;p&gt;
と考えてこんな風に書いてみた。
&lt;/p&gt;
&lt;pre&gt;
// &quot;onRemoved&quot; は Chrome の API で、ウインドウが閉じられた時に発生するイベント

chrome.windows.onRemoved.addListener(function (windowId) {　　
    chrome.windows.getAll(function (windows) {  // 全てのウインドウを取得するメソッド
        if (windows.length === 0) {
            // ブラウザ終了時の処理
        }
    });
});
&lt;/pre&gt;
&lt;p&gt;
結果は・・・、
&lt;/p&gt;
&lt;p&gt;
Windows ではうまく終了をとらえられました。&lt;br /&gt;
Mac ではブラウザの終了時には onRemoved イベントが発生しませんでした・・・。ガーン。&lt;br /&gt;
Linux ではうまくいきました。
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
悩ましい。
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
ブラウザはプラットフォームの違いを吸収してくれると楽観したくなるが、過信してはいけない。
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
（補足ですが、Mac では×ボタンでウインドウを閉じますが、この時は最後のウインドウを閉じた時でも onRemoved イベントは発生します。&lt;br /&gt;
しかし、×ボタンで閉じた時はウインドウは閉じられているのですがブラウザのプロセスは終了していません。&lt;br /&gt;
通常、ブラウザを終了させるときは、Command + q で終了させます。この時に onRemoved が発生しないのです。）&lt;br /&gt;
&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- bigbanner728x90 --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:728px;height:90px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;8722558787&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;br /&gt;
&lt;iframe src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=withhavingfun-22&amp;o=9&amp;p=48&amp;l=ur1&amp;category=books&amp;f=ifr&quot; width=&quot;728&quot; height=&quot;90&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/330907999663739982/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2013/11/os-chrome.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/330907999663739982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/330907999663739982'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2013/11/os-chrome.html' title='OS が変わると動作が変わるのが悩ましい（Chrome 拡張機能）'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-2350959950411870252</id><published>2013-10-08T22:24:00.000+09:00</published><updated>2013-12-28T14:03:46.605+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google"/><title type='text'>Doodle (Google ロゴ) を全部見る</title><content type='html'>&lt;p&gt;Google の検索画面で、何も入力せずに &quot;&lt;strong&gt;I&#39;m Feeling Lucky&lt;/strong&gt;&quot; ボタンを押すと、これまでの Doodle の一覧画面が出た！&lt;/p&gt;
&lt;p&gt;一日違いで見逃したときは、ここで見ればいいのか。&lt;/p&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-5711853862834929&quot;;
/* bigbanner728x90 */
google_ad_slot = &quot;8722558787&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;//pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/2350959950411870252/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2013/10/doodle.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/2350959950411870252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/2350959950411870252'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2013/10/doodle.html' title='Doodle (Google ロゴ) を全部見る'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-4573657853002402763</id><published>2013-10-04T21:27:00.000+09:00</published><updated>2013-10-26T16:23:46.454+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><title type='text'>MacBookAir 購入後の設定メモ</title><content type='html'>&lt;p&gt;
この秋、新しい OS (OS X Mavericks) が登場という、まさにこの時に新しい MacBookAir（まだ古いOS） を買いました。
13 インチです。
&lt;/p&gt;
&lt;p&gt;
これまで、メモリ不足で煩わしい思いをしてきたので、今回は奮発して 8G の最大容量までアップグレードしました。
勢い余って CPU もアップグレードしました。
&lt;/p&gt;
&lt;p&gt;
購入後に、最初にやったことの自分用メモです。
&lt;/p&gt;
&lt;br /&gt;

&lt;ol&gt;
&lt;li&gt;&lt;h3&gt;ユーザー ID&lt;/h3&gt;
&lt;p&gt;ターミナルでユーザー ID をプロンプトに表示するのであまり長くしない。&lt;/p&gt;
&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;OS アップデート&lt;/h3&gt;
&lt;p&gt;App Store ーアップデート&lt;/p&gt;
&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Xcode&lt;/h3&gt;
&lt;p&gt;次の Homebrew でのパッケージインストール時に必要になるのでインストールしておく。&lt;br /&gt;
また、ライセンス認証をしておかないと、Homebrew でのパッケージインストール時に警告がでるので一度起動しておく。（警告が出てもインストール自体は問題ないようですが。）&lt;/p&gt;
&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Homebrew&lt;/h3&gt;
&lt;p&gt;以前は MacPorts を使用していて特に不便を感じていた訳ではないのですが、 Homebrew が良い良いと見かけるので &lt;a href=&quot;http://brew.sh/index.html&quot;&gt;Homebrew&lt;/a&gt; をインストールする。&lt;/p&gt;
&lt;p&gt;
Homebrew のページのシンプルな説明のおかげか、すごく分かりやすい印象です。&lt;br /&gt;
とにかくパッケージは &lt;strong&gt;/usr/local&lt;/strong&gt; にインストールされると言うのが分かるだけでも安心。&lt;/p&gt;
&lt;p&gt;Mac に元々入っているアプリケーションのバージョン違いなどをインストールした場合、このままだと元々入っている方が呼ばれてしまうので、パスの順番を変更しておく。&lt;/p&gt;
&lt;p&gt;パスの順番を変更するには &lt;strong&gt;/etc/paths&lt;/strong&gt; ファイルを編集して、&lt;strong&gt;/usr/local/bin &lt;/strong&gt;を先頭にする。&lt;/p&gt;
&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;iTerm2&lt;/h3&gt;
&lt;p&gt;ターミナルは &lt;a href=&quot;http://www.iterm2.com/#/section/home&quot;&gt;iTerm2&lt;/a&gt; を使っています。&lt;/p&gt;
&lt;p&gt;iTerm2 をインストール後、表示色をマイルドにする &lt;a href=&quot;http://ethanschoonover.com/solarized&quot;&gt;SOLERRIZED&lt;/a&gt; をダウンロードしてきて、色のプロファイル設定でインポートする。&lt;/p&gt;
&lt;p&gt;あと、Emacs で現在行をハイライトする設定にすると、その行の文字が読めなくなるので、同じく色のプロファイル設定で &quot;Minimum contrast&quot; の設定を少し high 寄りにする。
&lt;/p&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Emacs&lt;/h3&gt;
&lt;p&gt;今まで使っていた MacBookAir の .emacs と .emacs.d をコピーして持ってくる。&lt;/p&gt;
&lt;p&gt;メタキーを &quot;Command&quot; キーの位置にしたいので、システム環境設定のキーボード設定で Command と Option を入れ替える。&lt;br /&gt;
また、iTerm2 でもメタキーが効くように、iTerm2 のキーのプロファイル設定で &quot;Left option key acts as&quot; を &quot;+Esc&quot; にする。&lt;/p&gt;
&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Zsh&lt;/h3&gt;
&lt;p&gt;Homebrew で zsh をインストールし、シェルを zsh に変更する。今まで使っていた MacBookAir の .zshrc をコピーして持ってくる。&lt;/p&gt;
&lt;p&gt;[ シェルの変更 ]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;/etc/shells&lt;/strong&gt; に &lt;strong&gt;/usr/local/bin/zsh&lt;/strong&gt; を追加する。（←これが homebrew でインストールした zsh）&lt;/li&gt;
&lt;li&gt;&lt;strong&gt; chsh -s /usr/local/bin/zsh&lt;/strong&gt; でシェル変更。&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;&lt;h3&gt;Google 日本語入力&lt;/h3&gt;
&lt;p&gt;変換候補の精度が圧倒的に良いので、&lt;a href=&quot;http://www.google.co.jp/ime/&quot;&gt;Google 日本語入力&lt;/a&gt; をインストールする。&lt;/p&gt;
&lt;p&gt;インストール後、システム環境設定ー言語とテキストー入力ソースで「ことえり」のチェックを外す。&lt;/p&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;外部モニター &amp; キーボードの接続、Magic TrackPad の設定&lt;/h3&gt;
&lt;p&gt;家では外部モニターとキーボードを接続して、クラムシェルモードで使用しています。&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;キーボードのドライバーインストール&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://pqrs.org/macosx/keyremap4macbook/&quot;&gt;KeyRemap4Macbook&lt;/a&gt; のインストール。右シフトキーの横の &quot;_&quot; でバックスラッシュが入力できるようにする。&lt;/li&gt;
&lt;li&gt;音がモニターから鳴るようにする。&lt;br /&gt;
システム環境設定ーサウンドー出力、で出力する装置をモニタにする。&lt;/li&gt;
&lt;li&gt;(外付け)Magic TrackPad の設定&lt;br /&gt;
これまで使っていた MacBookAir での Bluetooth ペアリングの解除をし、新たに新しい MacBookAir で設定し直す。&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;&lt;h3&gt;その他&lt;/h3&gt;
&lt;p&gt;マウスのポインターを大きくする。&lt;br /&gt;
システム環境設定ーアクセシビリティーディスプレイ、でカーソルのサイズを設定。&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;p&gt;＜リンク＞&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://brew.sh/index.html&quot;&gt;Homebrew&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.iterm2.com/#/section/home&quot;&gt;iTerm2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ethanschoonover.com/solarized&quot;&gt;SOLERRIZED&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.google.co.jp/ime/&quot;&gt;Google 日本語入力&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://pqrs.org/macosx/keyremap4macbook/&quot;&gt;KeyRemap4Macbook&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;

&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-5711853862834929&quot;;
/* bigbanner728x90 */
google_ad_slot = &quot;8722558787&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;//pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/4573657853002402763/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2013/10/macbookair.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/4573657853002402763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/4573657853002402763'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2013/10/macbookair.html' title='MacBookAir 購入後の設定メモ'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-3880293845691462384</id><published>2013-09-25T00:44:00.000+09:00</published><updated>2013-09-25T22:53:58.355+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="emacs"/><title type='text'>Emacs バッファを読み込み専用にする</title><content type='html'>&lt;p&gt;
Emacs で現在編集中のファイルと同じ名前のファイルを開いたときに、どちらが元のファイルか分からなくなってしまうことがある。
&lt;/p&gt;
&lt;p&gt;
&lt;a href=&quot;http://bhby39.blogspot.jp/2013/09/emacs.html&quot;&gt;ファイルのパスを表示するコマンドを見つけた&lt;/a&gt;が (&lt;strong&gt;C-x C-v&lt;/strong&gt;)、同じ趣旨で、参照用として開いたファイルは読み込み専用にしておくと言う手もある。
&lt;/p&gt;
&lt;p&gt;コマンドは、&lt;strong&gt;C-x C-q&lt;/strong&gt;。&lt;/p&gt;
&lt;p&gt;バッファを開いた状態で &lt;strong&gt;C-x C-q&lt;/strong&gt; とタイプすれば読み込み専用になります。もう一度タイプすると解除されます。&lt;/p&gt;
&lt;p&gt;読み込み専用時には、左下に &quot;%%&quot; が表示されるので、編集中のファイルか参照用のファイルかの区別がつきます。参照用ファイルを間違って編集することもなくなるので余計な気を使わなくて済むのもいい。&lt;/p&gt;
&lt;p&gt;***&lt;/p&gt;
&lt;p&gt;同じバッファ名だと区別がつかない時、バッファ名を変更するというのが王道なのかもしれませんが、&lt;strong&gt;M-x rename-buffer&lt;/strong&gt; でバッファ名をタイプするのは少々面倒くさい。&lt;/p&gt; 
&lt;br /&gt;
&lt;p&gt;＜参考＞&lt;/p&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/487311277X/ref=as_li_tf_il?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=487311277X&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=487311277X&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=withhavingfun-22&quot; &gt;&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=487311277X&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/487311277X/ref=as_li_tf_tl?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=487311277X&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;入門 GNU Emacs 第3版&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=487311277X&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;p&gt;＜リンク＞
&lt;a href=&quot;http://bhby39.blogspot.jp/2013/09/emacs.html&quot;&gt;Emacs 現在のバッファのファイルパスを表示する&lt;/a&gt;
&lt;/p&gt;&lt;br /&gt;

&lt;SCRIPT charset=&quot;utf-8&quot; type=&quot;text/javascript&quot; src=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&amp;MarketPlace=JP&amp;ID=V20070822%2FJP%2Fwithhavingfun-22%2F8010%2Fc287e986-7d83-43f7-9192-4471cb1e5e41&amp;Operation=GetScriptTemplate&quot;&gt; &lt;/SCRIPT&gt; &lt;NOSCRIPT&gt;&lt;A HREF=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&amp;MarketPlace=JP&amp;ID=V20070822%2FJP%2Fwithhavingfun-22%2F8010%2Fc287e986-7d83-43f7-9192-4471cb1e5e41&amp;Operation=NoScript&quot;&gt;Amazon.co.jp ウィジェット&lt;/A&gt;&lt;/NOSCRIPT&gt;

&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-5711853862834929&quot;;
/* bigbanner728x90 */
google_ad_slot = &quot;8722558787&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;//pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/3880293845691462384/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2013/09/emacs_25.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/3880293845691462384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/3880293845691462384'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2013/09/emacs_25.html' title='Emacs バッファを読み込み専用にする'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-4976171857285652892</id><published>2013-09-23T12:25:00.001+09:00</published><updated>2013-12-02T01:05:55.261+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><title type='text'>Emacs 現在のバッファのファイルパスを表示する</title><content type='html'>&lt;p&gt;
index.html とか manifest.json など、名前が決まっているようなファイルがあります。
&lt;/p&gt;
&lt;p&gt;
そのようなファイルを編集している時に、過去はどうだったかと2つめの manifest.json を開くと、
もうどっちが編集中のものだったか分からなくなってしまいます。
やむなく、一回両方のファイルを閉じてもう一回開き直したりして・・・。
&lt;/p&gt;
&lt;p&gt;
ファイルのパスが簡単に分ればいいのに。
&lt;/p&gt;
&lt;br /&gt;
&lt;h3&gt;ファイルのパスを表示するコマンド&lt;/h3&gt;
&lt;p&gt;
Emacs で現在のバッファのファイルパスを知る方法が無いかと調べたら、こんなコマンドが有りました。
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;C-x C-v (find-alternate-file) &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;C-x C-v&lt;/strong&gt; とタイプするとミニバッファに現在のファイルパスが表示されます。
確認できたら &lt;strong&gt;C-g&lt;/strong&gt;で終了します。&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;C-g&lt;/strong&gt; で終了？&lt;/p&gt;
&lt;p&gt;実はこのコマンドは本来はファイルを間違えて開いてしまった時などに別の正しいファイルを開き直すコマンドです。&lt;br /&gt;
&lt;strong&gt;C-x C-f&lt;/strong&gt; との違いは現在のバッファを閉じて新しいファイルを開くところです。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;C-x C-v&lt;/strong&gt; とタイプしてミニバッファに表示されたパスを編集して、目的のファイルを開く、というのが本来の使い方のようです。&lt;/p&gt;
&lt;p&gt;今回はパスを知りたいだけなので、&lt;strong&gt;C-g&lt;/strong&gt; で終了します。&lt;/p&gt;

&lt;p&gt;＜参考＞&lt;/p&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/487311277X/ref=as_li_tf_il?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=487311277X&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=487311277X&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=withhavingfun-22&quot; &gt;&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=487311277X&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;

&lt;a href=&quot;http://www.amazon.co.jp/gp/product/487311277X/ref=as_li_tf_tl?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=487311277X&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;入門 GNU Emacs 第3版&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=487311277X&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;

&lt;br /&gt;
&lt;p&gt;＜リンク＞
&lt;a href=&quot;http://bhby39.blogspot.jp/2013/09/emacs_25.html&quot;&gt;Emacs バッファを読み込み専用にする&lt;/a&gt;&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;SCRIPT charset=&quot;utf-8&quot; type=&quot;text/javascript&quot; src=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?rt=tf_cw&amp;ServiceVersion=20070822&amp;MarketPlace=JP&amp;ID=V20070822%2FJP%2Fwithhavingfun-22%2F8010%2Fc287e986-7d83-43f7-9192-4471cb1e5e41&amp;Operation=GetScriptTemplate&quot;&gt; &lt;/SCRIPT&gt; &lt;NOSCRIPT&gt;&lt;A HREF=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?rt=tf_cw&amp;ServiceVersion=20070822&amp;MarketPlace=JP&amp;ID=V20070822%2FJP%2Fwithhavingfun-22%2F8010%2Fc287e986-7d83-43f7-9192-4471cb1e5e41&amp;Operation=NoScript&quot;&gt;Amazon.co.jp ウィジェット&lt;/A&gt;&lt;/NOSCRIPT&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 text --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-5711853862834929&quot;
     data-ad-slot=&quot;3462486042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-5711853862834929&quot;;
/* bigbanner728x90 */
google_ad_slot = &quot;8722558787&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;//pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;iframe src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=withhavingfun-22&amp;o=9&amp;p=48&amp;l=ur1&amp;category=kindlebooks&amp;banner=1BNXB889KWNVJSZN9RR2&amp;f=ifr&quot; width=&quot;728&quot; height=&quot;90&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/4976171857285652892/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2013/09/emacs.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/4976171857285652892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/4976171857285652892'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2013/09/emacs.html' title='Emacs 現在のバッファのファイルパスを表示する'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-6752438289120106842</id><published>2013-09-07T23:51:00.000+09:00</published><updated>2013-09-07T23:51:31.676+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><title type='text'>git の見える化コマンド</title><content type='html'>&lt;p&gt;git add や git commit はするけど過去を振り返ったり、状態を確認する時には戸惑ってしまうので、見える化コマンドをまとめておきます。
全面的に、&lt;a href=&quot;http://www.amazon.co.jp/gp/product/4774156167/ref=as_li_tf_tl?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=4774156167&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;&quot;開発ツール徹底攻略 (WEB+DB PRESS plus)&quot;&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=4774156167&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;の &quot;はじめての Git&quot; の記事を参考にしています。&lt;/p&gt;
&lt;br /&gt;

&lt;h3&gt;1. git diff コマンド&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
インデックス（最後に &#39;git add&#39; した状態）と現在の状態との差分を表示する
&lt;pre class=&quot;example&quot;&gt;$ git diff
&lt;/pre&gt;
&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;
コミット（最後に &#39;git commit&#39; した状態）と現在の状態との差分を表示する
&lt;pre class=&quot;example&quot;&gt;$ git diff HEAD
&lt;/pre&gt;
&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;
コミットとインデックスの差分を表示する
&lt;pre class=&quot;example&quot;&gt;$ git diff --cashed
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;h3&gt;2. git log コマンド&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
最新のコミットから順にログを表示する
&lt;pre class=&quot;example&quot;&gt;$ git log
&lt;/pre&gt;
&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;
ファイルの変更内容をパッチ形式出力する
&lt;pre class=&quot;example&quot;&gt;$ git log -p
&lt;/pre&gt;
&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;
出力コミットの数を制限する
&lt;pre class=&quot;example&quot;&gt;$ git log -2        # 最新と一つ前の2つのコミットログを表示
&lt;/pre&gt;
&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;
ログメッセージの最初の一段落（要約部分）だけを出力する
&lt;pre class=&quot;example&quot;&gt;$ git log --pretty=short
&lt;/pre&gt;
&lt;/li&gt;

&lt;p&gt;
※ git commit する時にログメッセージは以下の形式で書くと良い。
&lt;ul&gt;
&lt;li&gt;1行目：コミットする変更内容の要約&lt;/li&gt;
&lt;li&gt;2行目：空行&lt;/li&gt;
&lt;li&gt;3行目：変更詳細&lt;/li&gt;
&lt;/ul&gt;
上記のような形式で書いておくと &quot;git log --pretty=short&quot; した時に要約部分だけが表示される。
&lt;/p&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;h3&gt;3. その他&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;今の状態では、どのファイルがコミットされるのかを確認する
&lt;pre class=&quot;example&quot;&gt;$ git status
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;最新のコミット内容の表示
&lt;pre class=&quot;example&quot;&gt;$ git show       # git log -p -1 と同じかな？
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;p&gt;＜参考＞&lt;/p&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/4774156167/ref=as_li_tf_il?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=4774156167&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=4774156167&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=withhavingfun-22&quot; &gt;&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=4774156167&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/4774156167/ref=as_li_tf_tl?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=4774156167&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;開発ツール徹底攻略 (WEB+DB PRESS plus)&lt;/a&gt;&lt;img src=&quot;http://ir-jp.amazon-adsystem.com/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=4774156167&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-5711853862834929&quot;;
/* below_rectangle_big336x280 */
google_ad_slot = &quot;4607337000&quot;;
google_ad_width = 336;
google_ad_height = 280;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;   
&lt;iframe src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=withhavingfun-22&amp;o=9&amp;p=8&amp;l=as1&amp;asins=B00CTUMNAO&amp;ref=tf_til&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=6E2F00&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr&quot; style=&quot;width:120px;height:240px;&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/6752438289120106842/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2013/09/git.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/6752438289120106842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/6752438289120106842'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2013/09/git.html' title='git の見える化コマンド'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-8430044501723017745</id><published>2013-06-23T18:29:00.000+09:00</published><updated>2013-06-23T18:29:43.677+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="web"/><title type='text'>Google Reader から Feedspot へ</title><content type='html'>&lt;p&gt;
Google Reader がついに今月いっぱいで終了してしまいます。&lt;br /&gt;
つくづく残念です。
&lt;/p&gt;
&lt;p&gt;
「 Feedspot 」に乗り換えました。&lt;br /&gt;
フィードの登録とか編集は Google Reader に比べて手間がかかるのですが、閲覧はほぼ同じ感覚で出来ます。&lt;br /&gt;
これが Feedspot にした決め手です。
&lt;/p&gt;
&lt;p&gt;
Google Reader から乗り換えるときは、登録データを Feedspot に移行出来ます。&lt;br /&gt;
Google Reader のデータをダウンロードするといくつかのファイルがダウンロードされますが、その中の xml ファイルが登録データです。&lt;br /&gt;
このファイルを Feedspot でインポートすると移行出来ます。
&lt;/p&gt;

&lt;p&gt;
リンク：&lt;a href=&quot;https://support.google.com/reader/answer/3028851?hl=ja&amp;ref_topic=12010&quot;&gt;Google リーダーのデータをダウンロードする方法&lt;/a&gt;
&lt;/p&gt;

&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-5711853862834929&quot;;
/* bigbanner728x90 */
google_ad_slot = &quot;8722558787&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/8430044501723017745/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2013/06/google-reader-feedspot.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/8430044501723017745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/8430044501723017745'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2013/06/google-reader-feedspot.html' title='Google Reader から Feedspot へ'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-9025196791772170795</id><published>2013-06-01T09:49:00.000+09:00</published><updated>2013-12-02T01:02:51.694+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>JavaScript をコマンドラインで品質チェック（ JSHint ）</title><content type='html'>&lt;h1 class=&quot;title&quot;&gt;&lt;/h1&gt;

&lt;p&gt;JavaScript の品質チェックツールである JSLint をコマンドラインから使えるようにしようと重い重い腰を上げました。&lt;/p&gt;
&lt;p&gt;
やり方を調べていると、&quot;JSHint&quot; なるものがあることを知った。&lt;br /&gt;
JSHint は『JSLint を元に、「より柔軟な設定ができる JSLint 」として』開発されたそうです。（JavaScript テクニックバイブルより）&lt;br /&gt;
確かに、JSLint はちょっと厳しすぎるように思う（JSLint の作者も言っているように）。&lt;br /&gt;
それに引き換え &quot;Hint&quot; とは、いかにも優しそうな感じする。&lt;br /&gt;
これはいい考えだ。
&lt;/p&gt;
&lt;br /&gt;&lt;br /&gt;

&lt;div id=&quot;outline-container-1&quot; class=&quot;outline-3&quot;&gt;
&lt;h3 id=&quot;sec-1&quot;&gt;インストール&lt;/h3&gt;
&lt;br /&gt;

&lt;div id=&quot;outline-container-1-1&quot; class=&quot;outline-4&quot;&gt;
&lt;h4 id=&quot;sec-1-1&quot;&gt;1) Node.js のインストール&lt;/h4&gt;
&lt;div class=&quot;outline-text-4&quot; id=&quot;text-1-1&quot;&gt;
&lt;p&gt;JSHint は Node.js のプログラムとしてインストールできるのでまずは、Node.js をインストールします。
Mac の場合は &lt;a href=&quot;http://nodejs.jp/nodejs.org_ja/#download&quot;&gt;Node.js の公式 HP&lt;/a&gt; からインストーラをダウンロードしてインストールします。
&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;

&lt;div id=&quot;outline-container-1-2&quot; class=&quot;outline-4&quot;&gt;
&lt;h4 id=&quot;sec-1-2&quot;&gt;2) JSHint のインストール&lt;/h4&gt;
&lt;div class=&quot;outline-text-4&quot; id=&quot;text-1-2&quot;&gt;
&lt;p&gt;Node.js をインストールした後で、Node.js のパッケージ管理システムを使って JSHint をインストールします。
&lt;/p&gt;
&lt;pre class=&quot;example&quot;&gt;$ sudo npm install -g jshint
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;

&lt;div id=&quot;outline-container-2&quot; class=&quot;outline-3&quot;&gt;
&lt;h3 id=&quot;sec-2&quot;&gt;JSHint を使ってみる&lt;/h3&gt;
&lt;div class=&quot;outline-text-3&quot; id=&quot;text-2&quot;&gt;

&lt;pre class=&quot;example&quot;&gt;$ jshint test.js
&lt;/pre&gt;

&lt;p&gt;
実行してみると、あれっ？　これだけ？&lt;br /&gt;
思った以上に警告が少なくてちょっと物足りない。
&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;

&lt;div id=&quot;outline-container-3&quot; class=&quot;outline-3&quot;&gt;
&lt;h3 id=&quot;sec-3&quot;&gt;もうちょっと厳しく設定&lt;/h3&gt;
&lt;div class=&quot;outline-text-3&quot; id=&quot;text-3&quot;&gt;

&lt;p&gt;JSLint と同様に JSHint でも警告の具合を調整出来ます。&lt;br /&gt;
設定ファイル .jshintrc に書きます。&lt;br /&gt;
.jshintrc はカレントワーキングディレクトリに置いてもいいし、ディレクトリツリーを上にたどっていった、どこに置いてもいいようです。&lt;br /&gt;
置き場所によって、プロジェクト毎の設定にもできるし、一括設定にもできる仕組みです。&lt;br /&gt;
とりあえず僕は home に置いておきました。
&lt;/p&gt;
&lt;p&gt;
手始めに Enforcing Options の項目を全部 true に設定しました。(オプションは &lt;a href=&quot;http://www.jshint.com/docs/#options&quot;&gt;JSHint のページ&lt;/a&gt;を参照)&lt;br /&gt;
jshint を実行。&lt;br /&gt;
大量に警告が出ました！　これこれ！&lt;br /&gt;
あっ！
&lt;/p&gt;
&lt;pre class=&quot;example&quot;&gt;... line 12, col 17, Expected &#39;start&#39; to have an indentation at 14 instead at 17.
&lt;/pre&gt;
&lt;p&gt;
そうそう、これこれ。&lt;br /&gt;
これが出ないと始まりません。やっと納得感。&lt;br /&gt;
インデントの位置がダメと言う警告で、&quot;JSLint&quot; で必ず見た警告です。
&lt;/p&gt;
&lt;p&gt;
その後、ちょっと調節して下の様な設定になりました。&lt;br /&gt;
使いながらまた調節していきます。&lt;br /&gt;
JSHint は多分デフォルトで良い感じに警告をしてくれるんでしょうけど、結局、JSLint と同じような設定にしてました。
&lt;/p&gt;

&lt;pre class=&quot;example&quot;&gt;// file .jshintrc
{
        &quot;bitwise&quot;: true,
        &quot;camelcase&quot;: true,
        &quot;curly&quot;: true,
        &quot;eqeqeq&quot;: true,
        &quot;es3&quot;: true,
        &quot;forin&quot;: true,
        &quot;immed&quot;: true,
        &quot;indent&quot;: false,
        &quot;latedef&quot;: true,
        &quot;newcap&quot;: true,
        &quot;noarg&quot;: true,
        &quot;noempty&quot;: true,
        &quot;nonew&quot;: true,
        &quot;plusplus&quot;: false,
        &quot;quotmark&quot;: false,
        &quot;undef&quot;: true,
        &quot;unused&quot;: true,
        &quot;strict&quot;: true,
        &quot;trailing&quot;: true,
        &quot;maxparams&quot;: 3,
        &quot;maxdepth&quot;: 3,
        &quot;maxstatements&quot;: false,
        &quot;maxcomplexity&quot;: 3,
        &quot;maxlen&quot;: 80,
        &quot;browser&quot;: true
}
&lt;/pre&gt;


&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;参考：
&lt;a href=&quot;http://www.jshint.com/docs/&quot;&gt;JS Hint (公式ページ)&lt;/a&gt;&lt;/p&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/4774152439/ref=as_li_tf_il?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=4774152439&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws.assoc-amazon.jp/widgets/q?_encoding=UTF8&amp;ASIN=4774152439&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=withhavingfun-22&quot; &gt;&lt;/a&gt;&lt;img src=&quot;http://www.assoc-amazon.jp/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=4774152439&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/4774152439/ref=as_li_tf_tl?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=4774152439&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;JavaScriptテクニックバイブル ~効率的な開発に役立つ150の技&lt;/a&gt;&lt;img src=&quot;http://www.assoc-amazon.jp/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=4774152439&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;br /&gt;
&lt;p&gt;リンク：
&lt;a href=&quot;http://bhby39.blogspot.jp/2012/05/jslint.html&quot;&gt;JSLint で自分のコードをチェックしてみた&lt;/a&gt;
&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-5711853862834929&quot;;
/* 300x250 below_rectangle_middle */
google_ad_slot = &quot;7337090445&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-5711853862834929&quot;;
/* 300x250 text */
google_ad_slot = &quot;3462486042&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;iframe src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=withhavingfun-22&amp;o=9&amp;p=48&amp;l=ur1&amp;category=kindlebooks&amp;banner=1X31T257082BN8GSPVG2&amp;f=ifr&quot; width=&quot;728&quot; height=&quot;90&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/9025196791772170795/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2013/06/javascript-jshint.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/9025196791772170795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/9025196791772170795'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2013/06/javascript-jshint.html' title='JavaScript をコマンドラインで品質チェック（ JSHint ）'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5409286375980018045.post-7517161857839907082</id><published>2013-04-30T23:24:00.000+09:00</published><updated>2013-04-30T23:24:28.731+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="kindle"/><title type='text'>kindle ハイライト機能</title><content type='html'>&lt;p&gt;
kindle 入手しました。
&lt;/p&gt;

&lt;p&gt;
面白い機能があって、文章を選択してハイライト設定すると、後でハイライトした文章だけまとめて見ることができます。
&lt;br /&gt;
さらに、このハイライトは同じ本を読んでいる人とシェアされるようで、本を読んでいると時々、文章に下線が引いてあるところがあって「 86人がハイライト 」などと表示されます。
&lt;/p&gt;

&lt;p&gt;
「うんうん、そうそう、これ重要ね。ハイライトしておこう。&lt;br /&gt;
あれ、みんなはもう少し先までハイライトしているのか。
&lt;br /&gt;確かに・・・。ではもう少し・・・。」
&lt;/p&gt;

&lt;p&gt;
と半ば背中を押されるように自分もハイライトしています。
&lt;/p&gt;

&lt;p&gt;
---&lt;br /&gt;
他の人がどこを重要と思っているかが分かって面白い機能なのですが、次第に、自分が読む前に既に線が引いてあるというのは何とも興ざめな気がしてきた。
&lt;/p&gt;

&lt;p&gt;
図書館で借りた本に線が引いてあったような残念さであろうか。&lt;br /&gt;
いや、風呂洗いをしようと思った矢先に、家人に「お風呂洗って」と言われてしまった悔しさの方が近いか。
&lt;/p&gt;

&lt;p&gt;
---&lt;br /&gt;
ハイライトをシェアする機能はオフにすることもできるのですが、この機能を知ってしまった後では、オフにすると何か大事な情報をつかみ損ねそうで、それもできない。
&lt;/p&gt;

&lt;p&gt;
悩ましい・・・。
&lt;/p&gt;

&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/B007OZO03M/ref=as_li_tf_il?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=B007OZO03M&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws.assoc-amazon.jp/widgets/q?_encoding=UTF8&amp;ASIN=B007OZO03M&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=withhavingfun-22&quot; &gt;&lt;/a&gt;&lt;img src=&quot;http://www.assoc-amazon.jp/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=B007OZO03M&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/gp/product/B007OZO03M/ref=as_li_tf_tl?ie=UTF8&amp;camp=247&amp;creative=1211&amp;creativeASIN=B007OZO03M&amp;linkCode=as2&amp;tag=withhavingfun-22&quot;&gt;Kindle Paperwhite&lt;/a&gt;&lt;img src=&quot;http://www.assoc-amazon.jp/e/ir?t=withhavingfun-22&amp;l=as2&amp;o=9&amp;a=B007OZO03M&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-5711853862834929&quot;;
/* 300x250 below_rectangle_middle */
google_ad_slot = &quot;7337090445&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;iframe src=&quot;http://rcm-jp.amazon.co.jp/e/cm?t=withhavingfun-22&amp;o=9&amp;p=12&amp;l=ur1&amp;category=kindlebooks&amp;banner=12NJVSNGQT7WYTTCM182&amp;f=ifr&quot; width=&quot;300&quot; height=&quot;250&quot; scrolling=&quot;no&quot; border=&quot;0&quot; marginwidth=&quot;0&quot; style=&quot;border:none;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bhby39.blogspot.com/feeds/7517161857839907082/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://bhby39.blogspot.com/2013/04/kindle.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/7517161857839907082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5409286375980018045/posts/default/7517161857839907082'/><link rel='alternate' type='text/html' href='http://bhby39.blogspot.com/2013/04/kindle.html' title='kindle ハイライト機能'/><author><name>bhby39</name><uri>http://www.blogger.com/profile/03688545183276142004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>