最新 追記

ソフトウェアと本の覚え書き

2005|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|

2010-07-01 [長年日記]

_ [読書] Ann M. Korner『日本人研究者が間違えやすい英語科学論文の正しい書き方』

まとまっていて良かった。

おすすめ度:★★★☆☆

日本人研究者が間違えやすい英語科学論文の正しい書き方


2010-07-05 [長年日記]

_ [Emacs] one-key-help-window-open の修正

横長ディスプレイで one-key を実行して、縦に画面が分割されると表示が乱れる。one-key-help-window-open でバッファに書き込んでから pop-to-buffer しているので、window-size の取得がうまくいっていない。そこで次のように変更して、これらの順番を逆にする。

(defun one-key-help-window-open (title info-alist)
  "Open the help window.
Argument TITLE is title name for help information.
Argument INFO-ALIST is help information as format ((key . describe) . command)."
  ;; Save current window configuration.
  (or one-key-help-window-configuration
      (setq one-key-help-window-configuration (current-window-configuration)))
  ;; Generate buffer information.
  (if (get-buffer one-key-buffer-name)
      (pop-to-buffer one-key-buffer-name)
    (with-current-buffer (get-buffer-create one-key-buffer-name)
      (pop-to-buffer one-key-buffer-name)
      (goto-char (point-min))
      (save-excursion
        (insert (one-key-highlight-help
                 title
                 (one-key-help-format info-alist))))))
  ;; Pop `one-key' buffer.
  (set-buffer one-key-buffer-name)
  ;; Adjust height of help window
  ;; to display buffer's contents exactly.
  (fit-window-to-buffer nil one-key-help-window-max-height))

2010-07-15 [長年日記]

_ [読書] 荻上チキ『ウェブ炎上』

あまり知らない炎上の話もあった。

おすすめ度:★★★☆☆

ウェブ炎上


2010-07-26 [長年日記]

_ [Linux] one-key-help-window-open の修正2

どうも前の修正だと、Emacs のウィンドウを縦に分割していて、ウィンドウの幅が異なる場合にうまく動かない。すでにウィンドウが複数に分割されている場合、一番大きなウィンドウを選択して one-key のバッファを表示するようにした。

(defvar one-key-minimal-window-width 40)
 
(defun one-key-get-suitable-window ()
  "Get window suitable for setting one-key buffer."
  (let* ((current-win (frame-selected-window))
         (win-list (delete current-win (window-list)))
         (area 0) suitable-win)
    (when (> (length win-list) 0)
      (dolist (win win-list)
        (let* ((wwidth (window-width win))
               (wheight (window-height win))
               (new-area (* wwidth wheight)))
          (if (> wwidth one-key-minimal-window-width)
              (when (> new-area area)
                (setq area new-area)
                (setq suitable-win win))))))
    (or suitable-win (split-window-sensibly current-win))))
 
(defun one-key-help-window-open (title info-alist)
  "Open the help window.
Argument TITLE is title name for help information.
Argument INFO-ALIST is help information as format ((key . describe) . command)."
  ;; Save current window configuration.
  (or one-key-help-window-configuration
      (setq one-key-help-window-configuration (current-window-configuration)))
  ;; Generate buffer information.
  (let ((win (one-key-get-suitable-window)))
    (with-selected-window win
      (if (get-buffer one-key-buffer-name)
          (set-window-buffer win one-key-buffer-name)
        (with-current-buffer (get-buffer-create one-key-buffer-name)
          (set-window-buffer win one-key-buffer-name)
          (goto-char (point-min))
          (save-excursion
            (insert (one-key-highlight-help
                     title
                     (one-key-help-format info-alist))))))
      ;; Adjust height of help window
      ;; to display buffer's contents exactly.
      (fit-window-to-buffer nil one-key-help-window-max-height)))
  ;; Pop `one-key' buffer.
  (set-buffer one-key-buffer-name))

_ [Linux] anything-display-function の変更

同様に anything を表示するウィンドウも変更することにした。必要最低限の横幅を持ち、縦が長いウィンドウに anything のバッファを表示することにする。

(defvar anything-buffer-minimal-window-width 40)
 
(defun anything-get-suitable-window (buf)
  "Get window suitable for anytihng buffer."
  (if anything-samewindow
      (switch-to-buffer buf)
    (let* ((current-win (frame-selected-window))
           (win-list (delete current-win (window-list)))
           (area 0) (height 0) suitable-win)
      (when (> (length win-list) 0)
        (dolist (win win-list)
          (let* ((wwidth (window-width win))
                 (wheight (window-height win))
                 (new-area (* wwidth wheight)))
            (if (and (> wwidth anything-buffer-minimal-window-width)
                     (or (> wheight height) (and (= wheight height) (> new-area area))))
                (progn
                  (setq height wheight)
                  (setq area new-area)
                  (setq suitable-win win))))))
      (if suitable-win
          (progn
            (select-window suitable-win)
            (switch-to-buffer buf))
        (pop-to-buffer buf)))))
 
(setq anything-display-function 'anything-get-suitable-window)

2010-07-31 [長年日記]

_ [読書] 荻上チキ『社会的な身体』

安易な有害メディア論について、違和感を感じていたのだが、その仕組みが書かれていて良かった。

おすすめ度:★★★☆☆

社会的な身体