From 241689bf571febee79cbfb407f9c8c1682aa06f2 Mon Sep 17 00:00:00 2001 From: ___Johniel Date: Sun, 28 Jul 2013 07:53:11 +0900 Subject: [PATCH] first commit --- .gitignore | 12 + appearance.el | 30 + commands.el | 143 + conf/integrate-yas-ac.el | 59 + conf/setup-ace-jump-mode.el | 24 + conf/setup-auctex.el | 46 + conf/setup-auto-complete.el | 35 + conf/setup-auto-save-buffers.el | 5 + conf/setup-browse-kill-ring.el | 65 + conf/setup-c++-mode.el | 29 + conf/setup-c-mode.el | 22 + conf/setup-cedet.el | 58 + conf/setup-clojure-mode.el | 75 + conf/setup-cua-mode.el | 4 + conf/setup-dired.el | 9 + conf/setup-emacs-lisp-mode.el | 26 + conf/setup-eshell.el | 152 + conf/setup-flymake.el | 113 + conf/setup-flyspell.el | 60 + conf/setup-foreign-regexp.el | 8 + conf/setup-golden-ratio.el | 14 + conf/setup-gtags.el | 71 + conf/setup-guide-key.el | 21 + conf/setup-helm.el | 139 + conf/setup-highlight-indentation.el | 14 + conf/setup-hippie-expand.el | 15 + conf/setup-howm.el | 56 + conf/setup-html-mode.el | 14 + conf/setup-java-mode.el | 4 + conf/setup-latex-mode.el | 28 + conf/setup-linum.el | 12 + conf/setup-magit.el | 24 + conf/setup-markdown-mode.el | 7 + conf/setup-multiple-cursors.el | 30 + conf/setup-package.el | 7 + conf/setup-popwin.el | 10 + conf/setup-scratch.el | 35 + conf/setup-screen-lines.el | 5 + conf/setup-sequential-command.el | 14 + conf/setup-skk.el | 7 + conf/setup-smartchr.el | 3 + conf/setup-smex.el | 10 + conf/setup-tabbar.el | 25 + conf/setup-tramp.el | 7 + conf/setup-whitespace.el | 15 + conf/setup-wrap-region.el | 8 + conf/setup-yasnippet.el | 17 + conf/setup-zlc.el | 19 + eshell/alias | 4 + init.el | 107 + key-bindings.el | 182 + my-misc.el | 106 + .../auto-save-buffers/auto-save-buffers.el | 76 + site-lisp/cljdoc/ac-clj.el | 544 ++ site-lisp/cljdoc/cljdoc.el | 592 ++ site-lisp/cljdoc/doc | 518 ++ site-lisp/cljdoc/gist:1386449.rb | 18 + site-lisp/dmacro/dmacro.el | 293 + site-lisp/emacs-smartchr/smartchr.el | 169 + site-lisp/foreign-regexp.el/.gitattributes | 1 + site-lisp/foreign-regexp.el/.gitignore | 2 + site-lisp/foreign-regexp.el/README.org | 407 ++ .../bin/foreign-regexp-occur-aux.pl | 74 + .../bin/foreign-regexp-occur-aux.rb | 52 + .../bin/foreign-regexp-quote-meta-aux.pl | 47 + .../bin/foreign-regexp-quote-meta-aux.rb | 30 + .../bin/foreign-regexp-replace-aux.pl | 107 + .../bin/foreign-regexp-replace-aux.rb | 55 + .../bin/foreign-regexp-search-aux.pl | 64 + .../bin/foreign-regexp-search-aux.rb | 46 + site-lisp/foreign-regexp.el/foreign-regexp.el | 4962 +++++++++++++++++ site-lisp/howm/.gitignore | 7 + site-lisp/howm/AUTHORS | 0 site-lisp/howm/COPYING | 340 ++ site-lisp/howm/ChangeLog | 2230 ++++++++ site-lisp/howm/INSTALL | 182 + site-lisp/howm/Makefile.am | 86 + site-lisp/howm/Makefile.in | 835 +++ site-lisp/howm/Makefile.old | 0 site-lisp/howm/NEWS | 1 + site-lisp/howm/README | 1 + site-lisp/howm/acinclude.m4 | 54 + site-lisp/howm/aclocal.m4 | 678 +++ site-lisp/howm/action-lock.el | 360 ++ site-lisp/howm/bcomp.el | 23 + site-lisp/howm/bcomp.el.in | 23 + site-lisp/howm/cheat-font-lock.el | 111 + site-lisp/howm/config.guess | 1500 +++++ site-lisp/howm/config.sub | 1608 ++++++ site-lisp/howm/configure | 3890 +++++++++++++ site-lisp/howm/configure.in | 169 + site-lisp/howm/doc/CL-HOWM.ja.rd | 148 + site-lisp/howm/doc/ChangeLog | 265 + site-lisp/howm/doc/Makefile.am | 19 + site-lisp/howm/doc/Makefile.in | 377 ++ site-lisp/howm/doc/OLD.rd | 2435 ++++++++ site-lisp/howm/doc/README-j.html | 1811 ++++++ site-lisp/howm/doc/README.html | 241 + site-lisp/howm/doc/README.ja.rd | 1307 +++++ site-lisp/howm/doc/README.rd | 246 + site-lisp/howm/doc/TUTORIAL.ja.rd | 191 + site-lisp/howm/doc/cat.png | Bin 0 -> 15701 bytes site-lisp/howm/doc/come.png | Bin 0 -> 3352 bytes site-lisp/howm/doc/go.png | Bin 0 -> 3394 bytes site-lisp/howm/doc/index-j.html | 296 + site-lisp/howm/doc/index.html | 300 + site-lisp/howm/doc/menu.png | Bin 0 -> 22098 bytes site-lisp/howm/doc/s-cat.png | Bin 0 -> 24347 bytes site-lisp/howm/doc/s-menu.png | Bin 0 -> 12931 bytes site-lisp/howm/doc/s-screen-shot.png | Bin 0 -> 21340 bytes site-lisp/howm/doc/s-search.png | Bin 0 -> 31910 bytes site-lisp/howm/doc/s-source.png | Bin 0 -> 7464 bytes site-lisp/howm/doc/screen-shot.png | Bin 0 -> 14254 bytes site-lisp/howm/doc/search.png | Bin 0 -> 21021 bytes site-lisp/howm/doc/source.png | Bin 0 -> 14847 bytes site-lisp/howm/doc/todo.png | Bin 0 -> 6159 bytes site-lisp/howm/doc/updown.png | Bin 0 -> 8332 bytes site-lisp/howm/elisp-comp | 89 + site-lisp/howm/en/0000-00-00-000000.txt | 98 + site-lisp/howm/en/ChangeLog | 20 + site-lisp/howm/en/Makefile.am | 6 + site-lisp/howm/en/Makefile.in | 315 ++ site-lisp/howm/ext/ChangeLog | 44 + site-lisp/howm/ext/Makefile.am | 12 + site-lisp/howm/ext/Makefile.in | 369 ++ site-lisp/howm/ext/hcal.rb | 280 + site-lisp/howm/ext/howm2 | 534 ++ site-lisp/howm/ext/howmkara | 361 ++ site-lisp/howm/ext/hsplit.rb | 33 + site-lisp/howm/gfunc.el | 121 + site-lisp/howm/gfunc.el.rej | 21 + site-lisp/howm/honest-report.el | 138 + site-lisp/howm/howm-backend.el | 980 ++++ site-lisp/howm/howm-cl.el | 56 + site-lisp/howm/howm-common.el | 635 +++ site-lisp/howm/howm-date.el | 275 + site-lisp/howm/howm-lang-en.el | 60 + site-lisp/howm/howm-lang-ja.el | 61 + site-lisp/howm/howm-menu-en.el | 106 + site-lisp/howm/howm-menu-ja.el | 166 + site-lisp/howm/howm-menu.el | 965 ++++ site-lisp/howm/howm-misc.el | 1174 ++++ site-lisp/howm/howm-mkmenu.el | 73 + site-lisp/howm/howm-mode.el | 1234 ++++ site-lisp/howm/howm-reminder.el | 918 +++ .../howm/howm-test130318-emacs24.3.patch | 21 + site-lisp/howm/howm-vars.el | 1198 ++++ site-lisp/howm/howm-version.el | 8 + site-lisp/howm/howm-version.el.in | 8 + site-lisp/howm/howm-view.el | 1603 ++++++ site-lisp/howm/howm.el | 84 + site-lisp/howm/illusion.el | 133 + site-lisp/howm/install-sh | 507 ++ site-lisp/howm/ja/0000-00-00-000000.txt | 157 + site-lisp/howm/ja/ChangeLog | 26 + site-lisp/howm/ja/Makefile.am | 6 + site-lisp/howm/ja/Makefile.in | 315 ++ site-lisp/howm/missing | 367 ++ site-lisp/howm/mkinstalldirs | 161 + site-lisp/howm/riffle.el | 634 +++ site-lisp/howm/sample/ChangeLog | 33 + site-lisp/howm/sample/Makefile.am | 7 + site-lisp/howm/sample/Makefile.in | 317 ++ site-lisp/howm/sample/bug-report.txt | 29 + site-lisp/howm/sample/dot.emacs | 13 + site-lisp/howm/sample/search.txt | 13 + site-lisp/howm/sample/top.txt | 90 + site-lisp/howm/test.bat | 7 + site-lisp/ht/CHANGELOG.md | 28 + site-lisp/ht/README.md | 93 + site-lisp/ht/ht-tests.el | 76 + site-lisp/ht/ht.el | 149 + site-lisp/point-undo/point-undo.el | 154 + .../popwin-misc/popwin-browse-kill-ring.el | 36 + .../sequential-command-config.el | 97 + .../sequential-command/sequential-command.el | 182 + site-lisp/tabbar+/tabbar+.el | 355 ++ site-lisp/tabbar/tabbar.el | 1937 +++++++ site-lisp/tempbuf/tempbuf.el | 317 ++ snippets/c++-mode/.yas-parents | 1 + snippets/c++-mode/beginend | 4 + snippets/c++-mode/class | 8 + snippets/c++-mode/macro | 39 + snippets/c++-mode/max | 4 + snippets/c++-mode/min | 4 + snippets/c++-mode/ns | 4 + snippets/c++-mode/perm | 7 + snippets/c++-mode/template | 4 + snippets/c++-mode/unique | 5 + snippets/c++-mode/using | 5 + snippets/c++-mode/vec | 4 + snippets/emacs-lisp-mode/.read_me | 7 + snippets/emacs-lisp-mode/.yas-parents | 1 + snippets/emacs-lisp-mode/package | 33 + theme/bubbleberry-theme.el | 112 + theme/piecewise-linear-theme.el | 74 + util.el | 148 + 197 files changed, 48565 insertions(+) create mode 100644 .gitignore create mode 100644 appearance.el create mode 100644 commands.el create mode 100644 conf/integrate-yas-ac.el create mode 100644 conf/setup-ace-jump-mode.el create mode 100644 conf/setup-auctex.el create mode 100644 conf/setup-auto-complete.el create mode 100644 conf/setup-auto-save-buffers.el create mode 100644 conf/setup-browse-kill-ring.el create mode 100644 conf/setup-c++-mode.el create mode 100644 conf/setup-c-mode.el create mode 100644 conf/setup-cedet.el create mode 100644 conf/setup-clojure-mode.el create mode 100644 conf/setup-cua-mode.el create mode 100644 conf/setup-dired.el create mode 100644 conf/setup-emacs-lisp-mode.el create mode 100644 conf/setup-eshell.el create mode 100644 conf/setup-flymake.el create mode 100644 conf/setup-flyspell.el create mode 100644 conf/setup-foreign-regexp.el create mode 100644 conf/setup-golden-ratio.el create mode 100644 conf/setup-gtags.el create mode 100644 conf/setup-guide-key.el create mode 100644 conf/setup-helm.el create mode 100644 conf/setup-highlight-indentation.el create mode 100644 conf/setup-hippie-expand.el create mode 100644 conf/setup-howm.el create mode 100644 conf/setup-html-mode.el create mode 100644 conf/setup-java-mode.el create mode 100644 conf/setup-latex-mode.el create mode 100644 conf/setup-linum.el create mode 100644 conf/setup-magit.el create mode 100644 conf/setup-markdown-mode.el create mode 100644 conf/setup-multiple-cursors.el create mode 100644 conf/setup-package.el create mode 100644 conf/setup-popwin.el create mode 100644 conf/setup-scratch.el create mode 100644 conf/setup-screen-lines.el create mode 100644 conf/setup-sequential-command.el create mode 100644 conf/setup-skk.el create mode 100644 conf/setup-smartchr.el create mode 100644 conf/setup-smex.el create mode 100644 conf/setup-tabbar.el create mode 100644 conf/setup-tramp.el create mode 100644 conf/setup-whitespace.el create mode 100644 conf/setup-wrap-region.el create mode 100644 conf/setup-yasnippet.el create mode 100644 conf/setup-zlc.el create mode 100644 eshell/alias create mode 100644 init.el create mode 100644 key-bindings.el create mode 100644 my-misc.el create mode 100644 site-lisp/auto-save-buffers/auto-save-buffers.el create mode 100644 site-lisp/cljdoc/ac-clj.el create mode 100644 site-lisp/cljdoc/cljdoc.el create mode 100644 site-lisp/cljdoc/doc create mode 100644 site-lisp/cljdoc/gist:1386449.rb create mode 100644 site-lisp/dmacro/dmacro.el create mode 100644 site-lisp/emacs-smartchr/smartchr.el create mode 100644 site-lisp/foreign-regexp.el/.gitattributes create mode 100644 site-lisp/foreign-regexp.el/.gitignore create mode 100644 site-lisp/foreign-regexp.el/README.org create mode 100755 site-lisp/foreign-regexp.el/bin/foreign-regexp-occur-aux.pl create mode 100755 site-lisp/foreign-regexp.el/bin/foreign-regexp-occur-aux.rb create mode 100755 site-lisp/foreign-regexp.el/bin/foreign-regexp-quote-meta-aux.pl create mode 100755 site-lisp/foreign-regexp.el/bin/foreign-regexp-quote-meta-aux.rb create mode 100755 site-lisp/foreign-regexp.el/bin/foreign-regexp-replace-aux.pl create mode 100755 site-lisp/foreign-regexp.el/bin/foreign-regexp-replace-aux.rb create mode 100755 site-lisp/foreign-regexp.el/bin/foreign-regexp-search-aux.pl create mode 100755 site-lisp/foreign-regexp.el/bin/foreign-regexp-search-aux.rb create mode 100644 site-lisp/foreign-regexp.el/foreign-regexp.el create mode 100644 site-lisp/howm/.gitignore create mode 100644 site-lisp/howm/AUTHORS create mode 100755 site-lisp/howm/COPYING create mode 100644 site-lisp/howm/ChangeLog create mode 100755 site-lisp/howm/INSTALL create mode 100644 site-lisp/howm/Makefile.am create mode 100644 site-lisp/howm/Makefile.in create mode 100644 site-lisp/howm/Makefile.old create mode 100644 site-lisp/howm/NEWS create mode 100644 site-lisp/howm/README create mode 100644 site-lisp/howm/acinclude.m4 create mode 100644 site-lisp/howm/aclocal.m4 create mode 100644 site-lisp/howm/action-lock.el create mode 100644 site-lisp/howm/bcomp.el create mode 100644 site-lisp/howm/bcomp.el.in create mode 100644 site-lisp/howm/cheat-font-lock.el create mode 100755 site-lisp/howm/config.guess create mode 100755 site-lisp/howm/config.sub create mode 100755 site-lisp/howm/configure create mode 100644 site-lisp/howm/configure.in create mode 100644 site-lisp/howm/doc/CL-HOWM.ja.rd create mode 100644 site-lisp/howm/doc/ChangeLog create mode 100644 site-lisp/howm/doc/Makefile.am create mode 100644 site-lisp/howm/doc/Makefile.in create mode 100644 site-lisp/howm/doc/OLD.rd create mode 100644 site-lisp/howm/doc/README-j.html create mode 100644 site-lisp/howm/doc/README.html create mode 100644 site-lisp/howm/doc/README.ja.rd create mode 100644 site-lisp/howm/doc/README.rd create mode 100644 site-lisp/howm/doc/TUTORIAL.ja.rd create mode 100644 site-lisp/howm/doc/cat.png create mode 100644 site-lisp/howm/doc/come.png create mode 100644 site-lisp/howm/doc/go.png create mode 100644 site-lisp/howm/doc/index-j.html create mode 100644 site-lisp/howm/doc/index.html create mode 100644 site-lisp/howm/doc/menu.png create mode 100644 site-lisp/howm/doc/s-cat.png create mode 100644 site-lisp/howm/doc/s-menu.png create mode 100644 site-lisp/howm/doc/s-screen-shot.png create mode 100644 site-lisp/howm/doc/s-search.png create mode 100644 site-lisp/howm/doc/s-source.png create mode 100644 site-lisp/howm/doc/screen-shot.png create mode 100644 site-lisp/howm/doc/search.png create mode 100644 site-lisp/howm/doc/source.png create mode 100644 site-lisp/howm/doc/todo.png create mode 100644 site-lisp/howm/doc/updown.png create mode 100755 site-lisp/howm/elisp-comp create mode 100644 site-lisp/howm/en/0000-00-00-000000.txt create mode 100644 site-lisp/howm/en/ChangeLog create mode 100644 site-lisp/howm/en/Makefile.am create mode 100644 site-lisp/howm/en/Makefile.in create mode 100644 site-lisp/howm/ext/ChangeLog create mode 100644 site-lisp/howm/ext/Makefile.am create mode 100644 site-lisp/howm/ext/Makefile.in create mode 100755 site-lisp/howm/ext/hcal.rb create mode 100755 site-lisp/howm/ext/howm2 create mode 100755 site-lisp/howm/ext/howmkara create mode 100755 site-lisp/howm/ext/hsplit.rb create mode 100644 site-lisp/howm/gfunc.el create mode 100644 site-lisp/howm/gfunc.el.rej create mode 100644 site-lisp/howm/honest-report.el create mode 100644 site-lisp/howm/howm-backend.el create mode 100644 site-lisp/howm/howm-cl.el create mode 100644 site-lisp/howm/howm-common.el create mode 100644 site-lisp/howm/howm-date.el create mode 100644 site-lisp/howm/howm-lang-en.el create mode 100644 site-lisp/howm/howm-lang-ja.el create mode 100644 site-lisp/howm/howm-menu-en.el create mode 100644 site-lisp/howm/howm-menu-ja.el create mode 100644 site-lisp/howm/howm-menu.el create mode 100644 site-lisp/howm/howm-misc.el create mode 100644 site-lisp/howm/howm-mkmenu.el create mode 100644 site-lisp/howm/howm-mode.el create mode 100644 site-lisp/howm/howm-reminder.el create mode 100644 site-lisp/howm/howm-test130318-emacs24.3.patch create mode 100644 site-lisp/howm/howm-vars.el create mode 100644 site-lisp/howm/howm-version.el create mode 100644 site-lisp/howm/howm-version.el.in create mode 100644 site-lisp/howm/howm-view.el create mode 100644 site-lisp/howm/howm.el create mode 100644 site-lisp/howm/illusion.el create mode 100755 site-lisp/howm/install-sh create mode 100644 site-lisp/howm/ja/0000-00-00-000000.txt create mode 100644 site-lisp/howm/ja/ChangeLog create mode 100644 site-lisp/howm/ja/Makefile.am create mode 100644 site-lisp/howm/ja/Makefile.in create mode 100755 site-lisp/howm/missing create mode 100755 site-lisp/howm/mkinstalldirs create mode 100644 site-lisp/howm/riffle.el create mode 100644 site-lisp/howm/sample/ChangeLog create mode 100644 site-lisp/howm/sample/Makefile.am create mode 100644 site-lisp/howm/sample/Makefile.in create mode 100644 site-lisp/howm/sample/bug-report.txt create mode 100644 site-lisp/howm/sample/dot.emacs create mode 100644 site-lisp/howm/sample/search.txt create mode 100644 site-lisp/howm/sample/top.txt create mode 100644 site-lisp/howm/test.bat create mode 100644 site-lisp/ht/CHANGELOG.md create mode 100644 site-lisp/ht/README.md create mode 100644 site-lisp/ht/ht-tests.el create mode 100644 site-lisp/ht/ht.el create mode 100644 site-lisp/point-undo/point-undo.el create mode 100644 site-lisp/popwin-misc/popwin-browse-kill-ring.el create mode 100644 site-lisp/sequential-command/sequential-command-config.el create mode 100644 site-lisp/sequential-command/sequential-command.el create mode 100644 site-lisp/tabbar+/tabbar+.el create mode 100644 site-lisp/tabbar/tabbar.el create mode 100644 site-lisp/tempbuf/tempbuf.el create mode 100644 snippets/c++-mode/.yas-parents create mode 100644 snippets/c++-mode/beginend create mode 100644 snippets/c++-mode/class create mode 100644 snippets/c++-mode/macro create mode 100644 snippets/c++-mode/max create mode 100644 snippets/c++-mode/min create mode 100644 snippets/c++-mode/ns create mode 100644 snippets/c++-mode/perm create mode 100644 snippets/c++-mode/template create mode 100644 snippets/c++-mode/unique create mode 100644 snippets/c++-mode/using create mode 100644 snippets/c++-mode/vec create mode 100644 snippets/emacs-lisp-mode/.read_me create mode 100644 snippets/emacs-lisp-mode/.yas-parents create mode 100644 snippets/emacs-lisp-mode/package create mode 100644 theme/bubbleberry-theme.el create mode 100644 theme/piecewise-linear-theme.el create mode 100644 util.el diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6d42010 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +auto-save-list +*~ +tramp +elpa +url +*.elc +history +skk +eshell/history +eshell/lastdir +.mc-lists.el +/site-lisp/k7 diff --git a/appearance.el b/appearance.el new file mode 100644 index 0000000..b9864ae --- /dev/null +++ b/appearance.el @@ -0,0 +1,30 @@ +;; appearance.el --- + +(require 'util) + +;; Font +(set-face-attribute 'default nil :height 120) + +(add-to-list 'custom-theme-load-path "~/.emacs.d/theme") +(load-theme 'piecewise-linear t) +(enable-theme 'piecewise-linear) + +(global-font-lock-mode 1) + +(show-paren-mode 1) + +(line-number-mode 1) + +(column-number-mode 1) + +(tool-bar-mode 0) + +(scroll-bar-mode 0) + +(transient-mark-mode 0) + +(when window-system + (eval-safe + (global-hl-line-mode 1) + (global-yascroll-bar-mode 1) + )) diff --git a/commands.el b/commands.el new file mode 100644 index 0000000..c4adbc6 --- /dev/null +++ b/commands.el @@ -0,0 +1,143 @@ +;;; commands.el --- + +;; +;; https://github.com/magnars/.emacs.d/blob/master/defuns/lisp-defuns.el +(defun eval-and-replace () + "Replace the preceding sexp with its value." + (interactive) + (backward-kill-sexp) + (condition-case nil + (prin1 (eval (read (current-kill 0))) + (current-buffer)) + (error (message "Invalid expression") + (insert (current-kill 0))))) + + +;; +;; http://qiita.com/items/e6978008253ba70c037c +(defun kill-word-or-kill-region () + (interactive) + (if (or (not transient-mark-mode) (region-active-p)) + (kill-region (region-beginning) (region-end)) + (kill-word 1))) + +;; +;; http://d.hatena.ne.jp/rubikitch/20100210/emacs +(defun other-window-or-split () + (interactive) + (when (one-window-p) + (split-window-horizontally)) + (other-window 1)) + +;; +;; http://d.hatena.ne.jp/supermassiveblackhole/20100625/1277436024 +(defun swap-screen () + "Swap two screen,leaving cursor at current window." + (interactive) + (let ((thiswin (selected-window)) + (nextbuf (window-buffer (next-window)))) + (set-window-buffer (next-window) (window-buffer)) + (set-window-buffer thiswin nextbuf))) + +(defun swap-screen-with-cursor () + "Swap two screen,with cursor in same buffer." + (interactive) + (let ((thiswin (selected-window)) + (thisbuf (window-buffer))) + (other-window 1) + (set-window-buffer thiswin (window-buffer)) + (set-window-buffer (selected-window) thisbuf))) + +;; +;; http://emacswiki.org/emacs/CopyingWholeLines +(defun copy-line (arg) + "Copy lines (as many as prefix argument) in the kill ring" + (interactive "p") + (kill-ring-save (line-beginning-position) + (line-beginning-position (+ 1 arg))) + (message "%d line%s copied" arg (if (= 1 arg) "" "s"))) + + +;; delete-trailing-whitespace-except-current-line is added to hook +;; http://stackoverflow.com/questions/3533703/emacs-delete-trailing-whitespace-except-current-line +(defun delete-trailing-whitespace-except-current-line () + (interactive) + (let ((begin (line-beginning-position)) + (end (line-end-position))) + (save-excursion + (when (< (point-min) begin) + (save-restriction + (narrow-to-region (point-min) (1- begin)) + (delete-trailing-whitespace))) + (when (> (point-max) end) + (save-restriction + (narrow-to-region (1+ end) (point-max)) + (delete-trailing-whitespace)))))) + + +;; +;; https://github.com/purcell/emacs.d/blob/master/init-editing-utils.el +(defun sort-lines-random (beg end) + "Sort lines in region randomly." + (interactive "r") + (save-excursion + (save-restriction + (narrow-to-region beg end) + (goto-char (point-min)) + (let ;; To make `end-of-line' and etc. to ignore fields. + ((inhibit-field-text-motion t)) + (sort-subr nil 'forward-line 'end-of-line nil nil + (lambda (s1 s2) (eq (random 2) 0))))))) + + +;; +;; http://stackoverflow.com/questions/3669511/the-function-to-show-current-files-full-path-in-mini-buffer +(setq frame-title-format + (list (format "%s %%S: %%j " (system-name)) + '(buffer-file-name "%f" (dired-directory dired-directory "%b")))) +(defun insert-file-path () + (interactive) + (insert (buffer-file-name))) + + +;; Switching Between Two Recently Used Buffers +;; http://www.emacswiki.org/emacs/SwitchingBuffers +(defun resently-used-buffer () + (interactive) + (other-buffer (current-buffer) 1)) + +;; +;; http://whattheemacsd.com/file-defuns.el-02.html +(defun delete-current-buffer-file () + "Removes file connected to current buffer and kills buffer." + (interactive) + (let ((filename (buffer-file-name)) + (buffer (current-buffer)) + (name (buffer-name))) + (if (not (and filename (file-exists-p filename))) + (ido-kill-buffer) + (when (yes-or-no-p "Are you sure you want to remove this file? ") + (delete-file filename) + (kill-buffer buffer) + (message "File '%s' successfully removed" filename))))) + +;; http://whattheemacsd.com/file-defuns.el-01.html +(defun rename-current-buffer-file () + "Renames current buffer and file it is visiting." + (interactive) + (let ((name (buffer-name)) + (filename (buffer-file-name))) + (if (not (and filename (file-exists-p filename))) + (error "Buffer '%s' is not visiting a file!" name) + (let ((new-name (read-file-name "New name: " filename))) + (if (get-buffer new-name) + (error "A buffer named '%s' already exists!" new-name) + (rename-file filename new-name 1) + (rename-buffer new-name) + (set-visited-file-name new-name) + (set-buffer-modified-p nil) + (message "File '%s' successfully renamed to '%s'" + name (file-name-nondirectory new-name))))))) + +;;; +(provide 'commands) diff --git a/conf/integrate-yas-ac.el b/conf/integrate-yas-ac.el new file mode 100644 index 0000000..0d47611 --- /dev/null +++ b/conf/integrate-yas-ac.el @@ -0,0 +1,59 @@ +;;; integrate-yas-ac.el --- Integration for Auco-Complete and Yasnippet + +(require 'auto-complete) +(require 'auto-complete-config) +(require 'dash) +(require 'util) +(require 'yasnippet) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Remove Yasnippet Keywords Into `ac-ignores' For Each Buffers +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun add-yas-keys-to-ac-ignores () + (interactive) + (progn + (make-local-variable 'ac-ignores) + (->> (yas--get-snippet-tables) + (-map 'yas--table-hash) + (--map (loop for k being the hash-keys in it collect k)) + (-flatten) + (--map (add-to-list 'ac-ignores it))))) + +(defadvice yas--load-pending-jits (after my-ac-conf activate) + (add-yas-keys-to-ac-ignores)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Stup Auto-Complete While Expanding Yasnippet +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;; https://gist.github.com/750077 +;;; yasnippet and auto-complete + +(defvar ac-yas-expand-autostart-backup nil "s") + +(defun ac-yas-expand-start () + "" + (setq ac-yas-expand-autostart-backup ac-auto-start) + (setq ac-auto-start nil)) + +(defun ac-yas-expand-end () + "" + (setq ac-auto-start ac-yas-expand-autostart-backup)) + +(defun ac-yas-expand-install () + (interactive) + (add-hook 'yas-before-expand-snippet-hook 'ac-yas-expand-start) + (add-hook 'yas-after-exit-snippet-hook 'ac-yas-expand-end)) + +(defun ac-yas-expand-uninstall () + (interactive) + (remove-hook 'yas-before-expand-snippet-hook 'ac-yas-expand-start) + (remove-hook 'yas-after-exit-snippet-hook 'ac-yas-expand-end)) + +(ac-yas-expand-install) + +;;; +(provide 'integrate-yas-ac) diff --git a/conf/setup-ace-jump-mode.el b/conf/setup-ace-jump-mode.el new file mode 100644 index 0000000..b401ae8 --- /dev/null +++ b/conf/setup-ace-jump-mode.el @@ -0,0 +1,24 @@ +;;; setup-ace-jump-mode.el --- + +(require 'ace-jump-mode) + +(setq ace-jump-mode-submode-list + '(ace-jump-word-mode + ace-jump-char-mode + ace-jump-line-mode)) + +;; https://github.com/magnars/.emacs.d/blob/master/setup-ace-jump-mode.el +(defun define-ace-jump-char-mode-for-all (c) + (global-set-key (read-kbd-macro (concat "C-M-g " (string c))) + `(lambda () + (interactive) + (setq ace-jump-query-char ,c) + (setq ace-jump-current-mode 'ace-jump-word-mode) + (ace-jump-do (concat "\\b" + (regexp-quote (make-string 1 ,c))))))) + +;; (loop for c from ?0 to ?9 do (define-ace-jump-char-mode-for-all c)) +;; (loop for c from ?A to ?Z do (define-ace-jump-char-mode-for-all c)) +;; (loop for c from ?a to ?z do (define-ace-jump-char-mode-for-all c)) + +(provide 'setup-ace-jump-mode) diff --git a/conf/setup-auctex.el b/conf/setup-auctex.el new file mode 100644 index 0000000..bfd99c1 --- /dev/null +++ b/conf/setup-auctex.el @@ -0,0 +1,46 @@ +;;; setup-auctex.el --- + +(require 'latex) +(require 'tex-site) +(require 'tex-mode) + +(defvar tex-mode-list + '(tex-mode-hook + slitex-mode-hook + latex-mode-hook + bibtex-mode-hook + LaTeX-mode-hook)) + +;; http://d.hatena.ne.jp/ryoma_robo/20120503/1336012148 + +;; (setq tex-default-mode 'latex-mode) + +;; (setq-default ispell-program-name "/usr/bin/aspell") ;; path to aspell +(setq flyspell-issu-welcome-flag nil) + + +;; DocView auto-revert-mode +(add-hook 'doc-view-mode-hook 'auto-revert-mode) +(setq doc-view-continuous t) + +(dolist (mode tex-mode-list) + (add-hook mode 'flyspell-mode)) + +(add-to-list 'tex-compile-commands + '("platex %f")) + +(require 'setup-flyspell) +(add-hook 'flyspell-mode-hook + '(lambda () + (local-set-key (kbd "C-c n") 'flyspell-correct-word-popup-el))) + +;; http://wikemacs.org/wiki/AUCTeX +(require 'font-latex) +(setq font-latex-fontify-script nil) +(setq font-latex-fontify-sectioning 'color) +; modify Beamer as well +(custom-set-faces + '(font-latex-slide-title-face ((t (:inherit font-lock-type-face))))) +(font-latex-update-sectioning-faces) + +(provide 'setup-auctex) diff --git a/conf/setup-auto-complete.el b/conf/setup-auto-complete.el new file mode 100644 index 0000000..6f1470d --- /dev/null +++ b/conf/setup-auto-complete.el @@ -0,0 +1,35 @@ +;; http://cx4a.org/software/auto-complete/manual.ja.html + +(require 'auto-complete) +(require 'auto-complete-config) + +(add-to-list 'ac-dictionary-directories "~/.emacs.d/auto-complete/dict") + +(custom-set-variables '(ac-ignore-case nil)) + +(setq ac-use-comphist nil) +(setq ac-auto-start t) +(setq ac-delay 0.0) +(setq popup-use-optimized-column-computation nil) + +(setq ac-use-menu-map t) +(define-key ac-menu-map (kbd "C-n") nil) +(define-key ac-menu-map (kbd "C-p") nil) + +(define-key ac-completing-map "\r" nil) +(define-key ac-completing-map [return] nil) + +(set-face-background 'ac-candidate-face "gray30") +(set-face-underline 'ac-candidate-face "gray50") +(set-face-background 'ac-selection-face "RoyalBlue4") + +(defadvice ac-inline-show (around my-ac-conf activate) + "Call ac-inline-show, if the cursor is in end of line." + (if (eolp) ad-do-it nil)) + +(if (not (performance-saving-p)) + (global-auto-complete-mode t)) + +(make-local-variable 'ac-auto-start) + +(provide 'setup-auto-complete) diff --git a/conf/setup-auto-save-buffers.el b/conf/setup-auto-save-buffers.el new file mode 100644 index 0000000..d14c988 --- /dev/null +++ b/conf/setup-auto-save-buffers.el @@ -0,0 +1,5 @@ +(require 'auto-save-buffers) + +(run-with-idle-timer 5 t 'auto-save-buffers) + +(provide 'setup-auto-save-buffers) diff --git a/conf/setup-browse-kill-ring.el b/conf/setup-browse-kill-ring.el new file mode 100644 index 0000000..478c35b --- /dev/null +++ b/conf/setup-browse-kill-ring.el @@ -0,0 +1,65 @@ +(require 'browse-kill-ring) +(require 'util) + +(browse-kill-ring-default-keybindings) + +(add-hook-fn 'browse-kill-ring-hook + (define-key browse-kill-ring-mode-map (kbd "C-g") 'browse-kill-ring-quit) + (define-key browse-kill-ring-mode-map (kbd "h") 'browse-kill-ring-previous)) + +(setq browse-kill-ring-separator (concat "\n" (make-string 100 ?\\))) +(setq browse-kill-ring-highlight-current-entry t) + +(defface my-browse-kill-ring-current-entry-face + '((t (:background "dark green" :highlight t))) nil) + +;; from ver. 1.4 +(defun my-browse-kill-ring-forward (&optional arg) + "Move forward by ARG `kill-ring' entries." + (interactive "p") + (beginning-of-line) + (while (not (zerop arg)) + (if (< arg 0) + (progn + (incf arg) + (if (overlays-at (point)) + (progn + (goto-char (overlay-start (car (overlays-at (point))))) + (goto-char (previous-overlay-change (point))) + (goto-char (previous-overlay-change (point)))) + (progn + (goto-char (1- (previous-overlay-change (point)))) + (unless (bobp) + (goto-char (overlay-start (car (overlays-at (point))))))))) + (progn + (decf arg) + (if (overlays-at (point)) + (progn + (goto-char (overlay-end (car (overlays-at (point))))) + (goto-char (next-overlay-change (point)))) + (goto-char (next-overlay-change (point))) + (unless (eobp) + (goto-char (overlay-start (car (overlays-at (point)))))))))) + ;; This could probably be implemented in a more intelligent manner. + ;; Perhaps keep track over the overlay we started from? That would + ;; break when the user moved manually, though. + (when browse-kill-ring-highlight-current-entry + (let ((overs (overlay-lists)) + (current-overlay (car (overlays-at (point))))) + (mapcar #'(lambda (o) + (overlay-put o 'face nil)) + (nconc (car overs) (cdr overs))) + (overlay-put current-overlay 'face 'my-browse-kill-ring-current-entry-face))) + (when browse-kill-ring-recenter + (recenter 1))) + +(add-hook 'browse-kill-ring-mode-hook + '(lambda () + (set (make-local-variable 'hl-line-range-function) + (lambda () + '(0 . 0))))) + +(defadvice browse-kill-ring-forward (around ___ activate) + (my-browse-kill-ring-forward (ad-get-arg 0))) + +(provide 'setup-browse-kill-ring) diff --git a/conf/setup-c++-mode.el b/conf/setup-c++-mode.el new file mode 100644 index 0000000..4aca22e --- /dev/null +++ b/conf/setup-c++-mode.el @@ -0,0 +1,29 @@ +;; +;; + +(require 'util) + +(def-face c++-macro "cyan1" "C++ macro form") +(add-keywords 'c++-mode '("each" "unless") 'c++-macro) + +(add-hook 'c++-mode-hook + '(lambda() + (local-set-key (kbd "C-x C-e") 'eval-and-replace) + (local-set-key (kbd "C-x C-a") nil) + (c-set-style "ellemtel") + (c-toggle-electric-state +1) + (setq c-basic-offset 2) + (setq tab-width 2))) + +(require 'auto-complete) +(require 'auto-complete-config) + +(add-hook 'c++-mode-hook + '(lambda () + (setq ac-sources '(ac-source-dictionary + ac-source-words-in-buffer + ac-source-words-in-same-mode-buffers)))) + +;;; + +(provide 'setup-c++-mode) diff --git a/conf/setup-c-mode.el b/conf/setup-c-mode.el new file mode 100644 index 0000000..2980aba --- /dev/null +++ b/conf/setup-c-mode.el @@ -0,0 +1,22 @@ +;; +;; + +(add-hook 'c-mode-hook + '(lambda() + (c-set-style "ellemtel") + (c-toggle-electric-state +1) + (setq c-basic-offset 2) + (setq tab-width 2))) + +(require 'auto-complete) +(require 'auto-complete-config) + +(add-hook 'c-mode-hook + '(lambda () + (setq ac-sources '(ac-source-dictionary + ac-source-words-in-buffer + ac-source-words-in-same-mode-buffers)))) + +;;; + +(provide 'setup-c-mode) diff --git a/conf/setup-cedet.el b/conf/setup-cedet.el new file mode 100644 index 0000000..b7256b2 --- /dev/null +++ b/conf/setup-cedet.el @@ -0,0 +1,58 @@ +;;; http://code.google.com/p/my-dot-emacs-files/source/browse/trunk/.emacs23.3/preferences/library.config/cedet.el?spec=svn129&r=129 + +(require 'cedet nil t) + +;; Configuration variables here: +(setq semantic-load-turn-useful-things-on t) +(setq semantic-load-turn-everything-on t) + +;; +(setq semantic-default-submodes + '( + ;; + ;; + global-semantic-idle-scheduler-mode + + ;; + global-semanticdb-minor-mode + + ;; + ;; global-semantic-idle-summary-mode + + ;; + ;; global-semantic-idle-completions-mode + + ;; + ;; global-semantic-decoration-mode + + ;; + ;; global-semantic-highlight-func-mode + + ;; + ;; global-semantic-mru-bookmark-mode + )) + +;; do not swap this lines +(global-ede-mode 1) +(semantic-mode 1) + +(semantic-add-system-include "/usr/include" 'c++-mode) +(semantic-add-system-include "/usr/local/include" 'c++-mode) +(semantic-add-system-include "/usr/include/c++/4.6" 'c++-mode) + +;; +;; *_flymake.cpp file is flooded! +;; (setq semantic-idle-work-parse-neighboring-files-flag t) + +;; (define-key semantic-mode-map (kbd "") 'semantic-complete-analyze-inline-idle) +;; (define-key semantic-mode-map (kbd "C-") 'semantic-complete-analyze-inline-idle) +;; (define-key semantic-mode-map (kbd "M-") 'semantic-complete-analyze-inline-idle) +;; (define-key semantic-mode-map (kbd "M-SPC") 'semantic-complete-analyze-inline-idle) + +(require 'semantic/complete) +(setq semantic-complete-inline-map + (let ((km semantic-complete-inline-map)) + (define-key km " " 'semantic-complete-inline-TAB) + km)) + +(provide 'setup-cedet) diff --git a/conf/setup-clojure-mode.el b/conf/setup-clojure-mode.el new file mode 100644 index 0000000..ce31353 --- /dev/null +++ b/conf/setup-clojure-mode.el @@ -0,0 +1,75 @@ +(require 'util) + +(require 'clojure-mode) +(require 'clojurescript-mode) +(require 'nrepl) +(require 'align-cljlet) +;; (require 'ac-clj) +(require 'highlight-indentation) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Clojure +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(def-face clojure-special "khaki" "Clojure special") +(add-keywords 'clojure-mode '("true" "false" "nil") 'clojure-special) +(add-keywords 'clojure-mode '("%1" "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9") 'clojure-special) + +(defun my-ac-clojure-mode-setup () + (setq ac-sources '(ac-source-dictionary + ac-source-words-in-buffer + ac-source-words-in-same-mode-buffers))) + +(add-hook 'clojure-mode-hook + '(lambda () + (highlight-indentation-current-column-mode) + (my-ac-clojure-mode-setup))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; nREPL +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(setq nrepl-popup-stacktraces nil) + +(add-hook 'nrepl-interaction-mode-hook + 'nrepl-turn-on-eldoc-mode) + +(add-hook 'nrepl-mode-hook + 'clojure-mode-font-lock-setup) + +(defalias 'clojure-repl 'nrepl-jack-in) +(defalias 'clj-repl 'nrepl-jack-in) + +(defadvice nrepl-jack-in (after connect-to-clojure-repl activate) + (nrepl-enable-on-existing-clojure-buffers)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ac-nrepl +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(require 'ac-nrepl) + +(add-hook 'nrepl-mode-hook + '(lambda () + (ac-nrepl-setup) + (set-auto-complete-as-completion-at-point-function) + (setq ac-auto-start nil))) + +(add-hook 'nrepl-interaction-mode-hook + '(lambda () + (ac-nrepl-setup) + (set-auto-complete-as-completion-at-point-function))) + +(eval-after-load "auto-complete" + '(add-to-list 'ac-modes 'nrepl-mode)) + +(defun set-auto-complete-as-completion-at-point-function () + (setq completion-at-point-functions '(auto-complete))) + +(add-hook 'auto-complete-mode-hook 'set-auto-complete-as-completion-at-point-function) + +;;; +(provide 'setup-clojure-mode) diff --git a/conf/setup-cua-mode.el b/conf/setup-cua-mode.el new file mode 100644 index 0000000..07a187a --- /dev/null +++ b/conf/setup-cua-mode.el @@ -0,0 +1,4 @@ +(define-key cua-global-keymap (kbd "C-") nil) +(define-key cua-global-keymap (kbd "C-S-") 'cua-set-rectangle-mark) + +(provide 'setup-cua-mode) diff --git a/conf/setup-dired.el b/conf/setup-dired.el new file mode 100644 index 0000000..5aa7c79 --- /dev/null +++ b/conf/setup-dired.el @@ -0,0 +1,9 @@ +;;; sutup-dired.el + +(require 'dired) +(require 'dired-x) +(require 'wdired) + +(define-key dired-mode-map "r" 'wdired-change-to-wdired-mode) + +(provide 'setup-dired) diff --git a/conf/setup-emacs-lisp-mode.el b/conf/setup-emacs-lisp-mode.el new file mode 100644 index 0000000..829248f --- /dev/null +++ b/conf/setup-emacs-lisp-mode.el @@ -0,0 +1,26 @@ +(require 'util) + +(def-face elisp-special "khaki" "elisp special") +(add-keywords 'emacs-lisp-mode '("nil") 'elisp-special) + +(define-key emacs-lisp-mode-map (kbd "C-x e") 'pp-macroexpand-last-sexp) + +(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode) + +(require 'elisp-slime-nav) +(autoload 'elisp-slime-nav-mode "elisp-slime-nav") +(add-hook 'emacs-lisp-mode-hook (lambda () (elisp-slime-nav-mode t))) +;; (eval-after-load 'elisp-slime-nav '(diminish 'elisp-slime-nav-mode)) + +(require 'auto-complete) +(require 'auto-complete-config) + +(defun my-ac-emacs-lisp-mode-setup () + (setq ac-sources '(ac-source-features + ac-source-functions + ac-source-variables + ac-source-symbols + ac-source-words-in-same-mode-buffers))) +(add-hook 'emacs-lisp-mode-hook 'my-ac-emacs-lisp-mode-setup) + +(provide 'setup-emacs-lisp-mode) diff --git a/conf/setup-eshell.el b/conf/setup-eshell.el new file mode 100644 index 0000000..ae58209 --- /dev/null +++ b/conf/setup-eshell.el @@ -0,0 +1,152 @@ +;;; setup-eshell.el --- + +(require 'eshell) + +(setq eshell-modules-list '( + eshell-banner + eshell-basic + eshell-cmpl + eshell-dirs + eshell-glob + eshell-hist + eshell-ls + eshell-pred + eshell-prompt + eshell-script + eshell-term + eshell-alias + )) + +(setq eshell-banner-message "") +(setq eshell-ls-initial-args "-h") +(setq eshell-cmpl-ignore-case t) +(setq eshell-hist-ignoredups t) +;; Prompt +(setq eshell-prompt-function + '(lambda () + (let ((user (or (getenv "USER") user-login-name "ted")) + (host (car (split-string (or (getenv "HOST") + system-name + "unknown") + "\\.")))) + (concat ".[" user "@" host "]% ")))) + +(setq eshell-prompt-regexp "^[^#%]*[%#] ") + +(eval-after-load "em-alias" + '(progn (eshell/alias "ll" "ls -lhF") + (eshell/alias "la" "ls -aF") + (eshell/alias "lla" "ls -alhF") + (eshell/alias "cd" "cd $1; ls"))) + +;; +(defadvice eshell/cd (after title-bar activate) + (setq frame-title-format (concat "*eshell* :: " "%f" (eshell/pwd)))) + +(add-hook 'eshell-mode-hook + '(lambda () + (set-face-foreground 'eshell-prompt "RoyalBlue"))) + +;; http://djlab.sakura.ne.jp/mydiary/?p=401 +(add-hook 'set-language-environment-hook + (lambda () + (when (equal "ja_JP.UTF-8" (getenv "LANG")) + (setq default-process-coding-system '(utf-8 . utf-8)) + (setq default-file-name-coding-system 'utf-8)) + (when (equal "Japanese" current-language-environment) + (setq default-buffer-file-coding-system 'euc-jp)))) +(set-language-environment "Japanese") + +;; complete after 'sudo' +(defun pcomplete/sudo () + "Completion rules for the `sudo' command." + (let ((pcomplete-help "complete after sudo")) + (pcomplete-here (pcomplete-here (eshell-complete-commands-list))))) + +;; clear +;; http://www.bookshelf.jp/pukiwiki/pukiwiki.php?Eshell%A4%F2%BB%C8%A4%A4%A4%B3%A4%CA%A4%B9#content_1_46 +(defun eshell/clear () + "Clear the current buffer, leaving one prompt at the top." + (interactive) + (let ((inhibit-read-only t)) + (erase-buffer))) + +;; less +;; written by Stefan Reichoer +(defun eshell/less (&rest args) + "Invoke `view-file' on the file. +\"less +42 foo\" also goes to line 42 in the buffer." + (while args + (if (string-match "\\`\\+\\([0-9]+\\)\\'" (car args)) + (let* ((line (string-to-number (match-string 1 (pop args)))) + (file (pop args))) + (view-file file) + (goto-line line)) + (view-file (pop args))))) + +;; From: http://www.emacswiki.org/cgi-bin/wiki.pl/EshellEnhancedLS +;; http://www.bookshelf.jp/pukiwiki/pukiwiki.php?Eshell%A4%F2%BB%C8%A4%A4%A4%B3%A4%CA%A4%B9 +(eval-after-load "em-ls" + '(progn + ;; (defun ted-eshell-ls-find-file-at-point (point) + ;; "RET on Eshell's `ls' output to open files." + ;; (interactive "d") + ;; (find-file (buffer-substring-no-properties + ;; (previous-single-property-change point 'help-echo) + ;; (next-single-property-change point 'help-echo)))) + (defun pat-eshell-ls-find-file-at-mouse-click (event) + "Middle click on Eshell's `ls' output to open files. + From Patrick Anderson via the wiki." + (interactive "e") + (ted-eshell-ls-find-file-at-point (posn-point (event-end event)))) + (defun ted-eshell-ls-find-file () + (interactive) + (let ((fname (buffer-substring-no-properties + (previous-single-property-change (point) 'help-echo) + (next-single-property-change (point) 'help-echo)))) + ;; Remove any leading whitespace, including newline that might + ;; be fetched by buffer-substring-no-properties + (setq fname (replace-regexp-in-string "^[ \t\n]*" "" fname)) + ;; Same for trailing whitespace and newline + (setq fname (replace-regexp-in-string "[ \t\n]*$" "" fname)) + (cond + ((equal "" fname) + (message "No file name found at point")) + (fname + (find-file fname))))) + (let ((map (make-sparse-keymap))) + ;; (define-key map (kbd "RET") 'ted-eshell-ls-find-file-at-point) + ;; (define-key map (kbd "") 'ted-eshell-ls-find-file-at-point) + (define-key map (kbd "RET") 'ted-eshell-ls-find-file) + (define-key map (kbd "") 'ted-eshell-ls-find-file) + (define-key map (kbd "") 'pat-eshell-ls-find-file-at-mouse-click) + (defvar ted-eshell-ls-keymap map)) + (defadvice eshell-ls-decorated-name (after ted-electrify-ls activate) + "Eshell's `ls' now lets you click or RET on file names to open them." + (add-text-properties 0 (length ad-return-value) + (list 'help-echo "RET, mouse-2: visit this file" + 'mouse-face 'highlight + 'keymap ted-eshell-ls-keymap) + ad-return-value) + ad-return-value))) + +;; http://whattheemacsd.com/setup-shell.el-01.html +;; +(defun comint-delchar-or-eof-or-kill-buffer (arg) + (interactive "p") + (if (null (get-buffer-process (current-buffer))) + (kill-buffer) + (comint-delchar-or-maybe-eof arg))) + +(add-hook 'shell-mode-hook + (lambda () + (define-key shell-mode-map + (kbd "C-d") 'comint-delchar-or-eof-or-kill-buffer))) + +(add-hook 'eshell-mode-hook + (lambda () + (local-set-key (kbd "M-h") 'eshell-next-input) + (local-set-key (kbd "M-n") 'eshell-previous-input))) + +;;; +(provide 'setup-eshell) diff --git a/conf/setup-flymake.el b/conf/setup-flymake.el new file mode 100644 index 0000000..581cf4b --- /dev/null +++ b/conf/setup-flymake.el @@ -0,0 +1,113 @@ +;;; setup-flymake.el --- + +(require 'flymake) + +;; +(setq flymake-start-syntax-check-on-newline nil) + +(set-face-attribute 'flymake-errline nil :inherit nil) +(set-face-foreground 'flymake-errline nil) +(set-face-underline-p 'flymake-errline "red") + +(set-face-attribute 'flymake-warnline nil :inherit nil) +(set-face-foreground 'flymake-warnline nil) +(set-face-underline-p 'flymake-warnline "gold") + +;; -1 = NONE, +;; 0 = ERROR, +;; 1 = WARNING, +;; 2 = INFO, +;; 3 = DEBUG +(setq flymake-log-level -1) + +;; display flymake error in minibuffer +;; https://gist.github.com/415429 +(defun my-flymake-show-help () + (when (get-char-property (point) 'flymake-overlay) + (let ((help (get-char-property (point) 'help-echo))) + (if help (message "%s" help))))) + +(add-hook 'post-command-hook 'my-flymake-show-help) + +;; +;; C++ +(defun flymake-cpp-init () + (let* ((temp-file (flymake-init-create-temp-buffer-copy + 'flymake-create-temp-inplace)) + (local-file (file-relative-name + temp-file + (file-name-directory buffer-file-name)))) + (list "g++" (list "-Wall" "-fsyntax-only" "-std=c++0x" local-file)))) +;; (list "g++" (list "-Wall" "-Wextra" "-fsyntax-only" local-file)))) + +(push '("\\.cpp$" flymake-cpp-init) flymake-allowed-file-name-masks) +(push '("\\.hpp$" flymake-cpp-init) flymake-allowed-file-name-masks) + +(add-hook 'c++-mode-hook + '(lambda() + (flymake-mode t))) + +;; +;; C +(defun flymake-c-init () + (let* ((temp-file (flymake-init-create-temp-buffer-copy + 'flymake-create-temp-inplace)) + (local-file (file-relative-name + temp-file + (file-name-directory buffer-file-name)))) + (list "gcc" (list "-Wall" "-fsyntax-only" local-file)))) + +(push '("\\.c$" flymake-c-init) flymake-allowed-file-name-masks) +(push '("\\.h$" flymake-cpp-init) flymake-allowed-file-name-masks) + +(add-hook 'c-mode-hook + '(lambda() + (flymake-mode t))) + +;; Emacs Lisp +;; http://www.lunaport.net/blog/2010/02/windowsflymake-elisp-1.html +(defun flymake-elisp-init () + (unless (string-match "^ " (buffer-name)) + (let* ((temp-file (flymake-init-create-temp-buffer-copy + 'flymake-create-temp-inplace)) + (local-file (file-relative-name + temp-file + (file-name-directory buffer-file-name)))) + (list + (expand-file-name invocation-name invocation-directory) + (list + "-Q" "--batch" "--eval" + (prin1-to-string + (quote + (dolist (file command-line-args-left) + (with-temp-buffer + (insert-file-contents file) + (emacs-lisp-mode) + (let ((parse-sexp-ignore-comments t)) + (condition-case data + (scan-sexps (point-min) (point-max)) + (scan-error + (goto-char(nth 2 data)) + (princ (format "%s:%s: error: Unmatched bracket or quote\n" + file (line-number-at-pos)))))))) + ) + ) + local-file))))) +(push '("\\.el$" flymake-elisp-init) flymake-allowed-file-name-masks) +(push '("\\.emacs$" flymake-elisp-init) flymake-allowed-file-name-masks) +(add-hook 'emacs-lisp-mode-hook + ;; workaround for (eq buffer-file-name nil) + (function (lambda () (if buffer-file-name (flymake-mode))))) + +;; buffer has a running process: kill it? +;; http://stackoverflow.com/questions/7299893/getting-rid-of-buffer-has-running-process-confirmation-when-the-process-is-a-f +(defadvice flymake-start-syntax-check-process (after + cheeso-advice-flymake-start-syntax-check-1 + (cmd args dir) + activate compile) + ;; set flag to allow exit without query on any + ;;active flymake processes + (set-process-query-on-exit-flag ad-return-value nil)) + + +(provide 'setup-flymake) diff --git a/conf/setup-flyspell.el b/conf/setup-flyspell.el new file mode 100644 index 0000000..00e79e3 --- /dev/null +++ b/conf/setup-flyspell.el @@ -0,0 +1,60 @@ +;; http://d.hatena.ne.jp/mooz/20100423/p1 + +(require 'flyspell) +(require 'popup) + +(defun flyspell-correct-word-popup-el () + "Pop up a menu of possible corrections for misspelled word before point." + (interactive) + ;; use the correct dictionary + (flyspell-accept-buffer-local-defs) + (let ((cursor-location (point)) + (word (flyspell-get-word nil))) + (if (consp word) + (let ((start (car (cdr word))) + (end (car (cdr (cdr word)))) + (word (car word)) + poss ispell-filter) + ;; now check spelling of word. + (ispell-send-string "%\n") ;put in verbose mode + (ispell-send-string (concat "^" word "\n")) + ;; wait until ispell has processed word + (while (progn + (accept-process-output ispell-process) + (not (string= "" (car ispell-filter))))) + ;; Remove leading empty element + (setq ispell-filter (cdr ispell-filter)) + ;; ispell process should return something after word is sent. + ;; Tag word as valid (i.e., skip) otherwise + (or ispell-filter + (setq ispell-filter '(*))) + (if (consp ispell-filter) + (setq poss (ispell-parse-output (car ispell-filter)))) + (cond + ((or (eq poss t) (stringp poss)) + ;; don't correct word + t) + ((null poss) + ;; ispell error + (error "Ispell: error in Ispell process")) + (t + ;; The word is incorrect, we have to propose a replacement. + (flyspell-do-correct (popup-menu* (car (cddr poss)) :scroll-bar t :margin t) + poss word cursor-location start end cursor-location))) + (ispell-pdict-save t))))) + +;; 修正したい単語の上にカーソルをもっていき, C-M-return を押すことで候補を選択 + +;; (add-hook 'flyspell-mode-hook +;; (lambda () +;; (define-key flyspell-mode-map (kbd "") 'flyspell-correct-word-popup-el) +;; )) + +;; flyspell-mode を自動的に開始させたいファイルを指定 (お好みでアンコメントするなり, 変更するなり) + +;; (add-to-list 'auto-mode-alist '("\\.txt" . flyspell-mode)) +;; (add-to-list 'auto-mode-alist '("\\.tex" . flyspell-mode)) +;; (add-to-list 'auto-mode-alist '("\\.properties" . flyspell-mode)) +;; (add-to-list 'auto-mode-alist '("\\.dtd" . flyspell-mode)) + +(provide 'setup-flyspell) diff --git a/conf/setup-foreign-regexp.el b/conf/setup-foreign-regexp.el new file mode 100644 index 0000000..a34c408 --- /dev/null +++ b/conf/setup-foreign-regexp.el @@ -0,0 +1,8 @@ +;;; +(require 'foreign-regexp) + +(custom-set-variables + '(foreign-regexp/regexp-type 'perl) ;; Choose by your preference. + '(reb-re-syntax 'foreign-regexp)) ;; Tell re-builder to use foreign regexp. + +(provide 'setup-foreign-regexp) diff --git a/conf/setup-golden-ratio.el b/conf/setup-golden-ratio.el new file mode 100644 index 0000000..5485be2 --- /dev/null +++ b/conf/setup-golden-ratio.el @@ -0,0 +1,14 @@ +(require 'golden-ratio) + +(defun other-window-or-split-golden-ratio () + (interactive) + (when (one-window-p) + (split-window-horizontally)) + (other-window 1) + (golden-ratio)) + +(defun enable-global-golden-ratio () + (interactive) + (global-set-key "\C-t" 'other-window-or-split-golden-ratio)) + +(provide 'setup-golden-ratio) diff --git a/conf/setup-gtags.el b/conf/setup-gtags.el new file mode 100644 index 0000000..0f7e974 --- /dev/null +++ b/conf/setup-gtags.el @@ -0,0 +1,71 @@ +;; http://qiita.com/yewton@github/items/d9e686d2f2a092321e34 +(require 'gtags) +(require 'helm-gtags) + +(defun update-gtags (&optional prefix) + (interactive "P") + (let ((rootdir (gtags-get-rootpath)) + (args (if prefix "-v" "-iv"))) + (when rootdir + (let* ((default-directory rootdir) + (buffer (get-buffer-create "*update GTAGS*"))) + (save-excursion + (set-buffer buffer) + (erase-buffer) + (let ((result (process-file "gtags" nil buffer nil args))) + (if (= 0 result) + (message "GTAGS successfully updated.") + (message "update GTAGS error with exit status %d" result)))))))) + +(defun gtags-parse-file2 () + (interactive) + (if (gtags-get-rootpath) + (let* + ((root (gtags-get-rootpath)) + (path (buffer-file-name)) + (gtags-path-style 'root) + (gtags-rootdir root)) + (if (string-match (regexp-quote root) path) + (gtags-goto-tag + (replace-match "" t nil path) + "f" nil) + ;; delegate to gtags-parse-file + (gtags-parse-file))) + ;; delegate to gtags-parse-file + (gtags-parse-file))) + +;; get the path of gtags root directory. +(defun gtags-get-rootpath () + (let (path buffer) + (save-excursion + (setq buffer (generate-new-buffer (generate-new-buffer-name "*rootdir*"))) + (set-buffer buffer) + (setq n (process-file "global" nil t nil "-pr")) + (if (= n 0) + (setq path (file-name-as-directory (buffer-substring (point-min)(1- (point-max)))))) + (kill-buffer buffer)) + (if (and (fboundp 'tramp-tramp-file-p) + (tramp-tramp-file-p default-directory)) + (with-parsed-tramp-file-name default-directory tr + (when path + (concat (substring default-directory 0 (* -1 (length tr-localname))) + path))) + path))) + +(defun make-gtags () + (interactive) + (if (= 0 (shell-command "gtags --version")) + (progn (add-hook 'after-save-hook 'update-gtags) + (setq gtags-prefix-key "\C-c") + (setq gtags-mode-hook + '(lambda () + (define-key gtags-mode-map "\C-cs" 'gtags-find-symbol) + (define-key gtags-mode-map "\C-cr" 'gtags-find-rtag) + (define-key gtags-mode-map "\C-ct" 'gtags-find-tag) + (define-key gtags-mode-map "\C-cf" 'gtags-parse-file))) + (add-hook 'c-mode-common-hook + '(lambda() + (gtags-mode 1)))) + (message "[setup-gtags]: not found command gtags"))) + +(provide 'setup-gtags) diff --git a/conf/setup-guide-key.el b/conf/setup-guide-key.el new file mode 100644 index 0000000..db71304 --- /dev/null +++ b/conf/setup-guide-key.el @@ -0,0 +1,21 @@ +;;; https://github.com/kbkbkbkb1/guide-key + +(require 'guide-key) + +(setq guide-key/popup-window-position 'bottom) + +(defun guide-key/my-hook-function-for-org-mode () + (guide-key-mode 1) + (guide-key/add-local-guide-key-sequence "C-c") + (guide-key/add-local-guide-key-sequence "C-c C-x") + (guide-key/add-local-highlight-command-regexp "org-")) +(add-hook 'org-mode-hook 'guide-key/my-hook-function-for-org-mode) + +(defun guide-key/my-hook-function-for-howm-mode () + (guide-key-mode 1) + (guide-key/add-local-guide-key-sequence "C-c") + (guide-key/add-local-guide-key-sequence "C-c ,") + (guide-key/add-local-highlight-command-regexp "howm-")) +(add-hook 'howm-mode-hook 'guide-key/my-hook-function-for-howm-mode) + +(provide 'setup-guide-key) diff --git a/conf/setup-helm.el b/conf/setup-helm.el new file mode 100644 index 0000000..3cfdd9a --- /dev/null +++ b/conf/setup-helm.el @@ -0,0 +1,139 @@ +;;; setup-helm.el + +(require 'helm) +(require 'helm-config) +(require 'helm-files) +(require 'helm-imenu) +(require 'helm-command) + +(setq helm-idle-delay 0.1) +(setq helm-input-idle-delay 0) +(setq helm-candidate-number-limit 300) + +(define-key helm-map (kbd "C-h") 'helm-previous-line) +(define-key helm-map (kbd "C-n") 'helm-next-line) +(define-key helm-map (kbd "C-M-n") 'helm-next-source) +(define-key helm-map (kbd "C-M-h") 'helm-previous-source) + +(require 'tabbar+) +(defun my-standard-helm () + (interactive) + (helm :sources '( + ;; helm-c-source-buffers-list + ;; helm-c-source-tabbar+buffers-list + helm-c-source-tabbar+current-group-buffers-list + helm-c-source-tab-groups-list + helm-c-source-imenu + helm-c-source-recentf + ;; helm-c-source-buffer-not-found + ) + :buffer "*helm*" + :keymap helm-c-buffer-map)) + +(require 'popwin) +(push "*helm*" popwin:special-display-config) + +(provide 'setup-helm) + +;;; ----- helm sources 2012/12/08 +;; helm-apt.el helm-c-source-apt +;; helm-bbdb.el helm-c-source-bbdb +;; helm-bmkext.el helm-c-source-bmkext-addressbook +;; helm-bmkext.el helm-c-source-bookmark-files&dirs +;; helm-bmkext.el helm-c-source-bookmark-gnus +;; helm-bmkext.el helm-c-source-bookmark-images +;; helm-bmkext.el helm-c-source-bookmark-info +;; helm-bmkext.el helm-c-source-bookmark-man +;; helm-bmkext.el helm-c-source-bookmark-ssh-files&dirs +;; helm-bmkext.el helm-c-source-bookmark-su-files&dirs +;; helm-bmkext.el helm-c-source-bookmark-w3m +;; helm-bookmark.el helm-c-source-bookmark-set +;; helm-bookmark.el helm-c-source-bookmarks +;; helm-bookmark.el helm-c-source-bookmarks-local +;; helm-bookmark.el helm-c-source-bookmarks-ssh +;; helm-bookmark.el helm-c-source-bookmarks-su +;; helm-buffers.el helm-c-source-buffer-not-found +;; helm-buffers.el helm-c-source-buffers-list +;; helm-buffers.el helm-c-source-ido-virtual-buffers +;; helm-call-tree.el helm-c-source-simple-call-tree-callers-functions +;; helm-call-tree.el helm-c-source-simple-call-tree-functions-callers +;; helm-color.el helm-c-source-colors +;; helm-color.el helm-c-source-customize-face +;; helm-elisp.el helm-c-source-absolute-time-timers +;; helm-elisp.el helm-c-source-advice +;; helm-elisp.el helm-c-source-complex-command-history +;; helm-elisp.el helm-c-source-elisp-library-scan +;; helm-elisp.el helm-c-source-idle-time-timers +;; helm-elscreen.el helm-c-source-elscreen +;; helm-emms.el helm-c-source-emms-dired +;; helm-emms.el helm-c-source-emms-files +;; helm-emms.el helm-c-source-emms-streams +;; helm-eshell.el helm-c-source-esh +;; helm-eshell.el helm-c-source-eshell-history +;; helm-eval.el helm-c-source-calculation-result +;; helm-eval.el helm-c-source-evaluation-result +;; helm-files.el helm-c-source-copy-files +;; helm-files.el helm-c-source-ff-file-name-history +;; helm-files.el helm-c-source-ffap-guesser +;; helm-files.el helm-c-source-ffap-line +;; helm-files.el helm-c-source-file-cache +;; helm-files.el helm-c-source-file-name-history +;; helm-files.el helm-c-source-files-in-all-dired +;; helm-files.el helm-c-source-files-in-current-dir +;; helm-files.el helm-c-source-find-files +;; helm-files.el helm-c-source-hardlink-files +;; helm-files.el helm-c-source-insert-file +;; helm-files.el helm-c-source-recentf +;; helm-files.el helm-c-source-rename-files +;; helm-files.el helm-c-source-session +;; helm-files.el helm-c-source-symlink-files +;; helm-files.el helm-c-source-write-file +;; helm-firefox.el helm-c-source-firefox-bookmarks +;; helm-font.el helm-c-source-ucs +;; helm-font.el helm-c-source-xfonts +;; helm-gentoo.el helm-c-source-gentoo +;; helm-gentoo.el helm-c-source-use-flags +;; helm-imenu.el helm-c-source-imenu +;; helm-info.el helm-c-source-info-pages +;; helm-locate.el helm-c-source-locate +;; helm-man.el helm-c-source-man-pages +;; helm-misc.el helm-c-source-eev-anchor +;; helm-misc.el helm-c-source-emacs-lisp-expectations +;; helm-misc.el helm-c-source-emacs-lisp-toplevels +;; helm-misc.el helm-c-source-emacs-source-defun +;; helm-misc.el helm-c-source-fixme +;; helm-misc.el helm-c-source-jabber-contacts +;; helm-misc.el helm-c-source-lacarte +;; helm-misc.el helm-c-source-latex-math +;; helm-misc.el helm-c-source-mac-spotlight +;; helm-misc.el helm-c-source-minibuffer-history +;; helm-misc.el helm-c-source-oddmuse-headline +;; helm-misc.el helm-c-source-picklist +;; helm-misc.el helm-c-source-ratpoison-commands +;; helm-misc.el helm-c-source-rd-headline +;; helm-misc.el helm-c-source-stumpwm-commands +;; helm-misc.el helm-c-source-time-world +;; helm-misc.el helm-c-source-tracker-search +;; helm-net.el helm-c-source-google-suggest +;; helm-net.el helm-c-source-yahoo-suggest +;; helm-org.el helm-c-source-org-headline +;; helm-org.el helm-c-source-org-keywords +;; helm-plugin.el helm-c-source-info-wget +;; helm-plugin.el helm-c-source-test-file +;; helm-regexp.el helm-c-source-browse-code +;; helm-regexp.el helm-c-source-moccur +;; helm-regexp.el helm-c-source-occur +;; helm-regexp.el helm-c-source-regexp +;; helm-ring.el helm-c-source-global-mark-ring +;; helm-ring.el helm-c-source-kill-ring +;; helm-ring.el helm-c-source-mark-ring +;; helm-ring.el helm-c-source-register +;; helm-semantic.el helm-c-source-semantic +;; helm-sys.el helm-c-source-emacs-process +;; helm-sys.el helm-c-source-top +;; helm-sys.el helm-c-source-xrandr-change-resolution +;; helm-tags.el helm-c-source-ctags +;; helm-tags.el helm-c-source-etags-select +;; helm-w3m.el helm-c-source-w3m-bookmarks +;; helm-yaoddmuse.el helm-c-source-yaoddmuse-emacswiki-edit-or-view +;; helm-yaoddmuse.el helm-c-source-yaoddmuse-emacswiki-post-library diff --git a/conf/setup-highlight-indentation.el b/conf/setup-highlight-indentation.el new file mode 100644 index 0000000..04ca744 --- /dev/null +++ b/conf/setup-highlight-indentation.el @@ -0,0 +1,14 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; highlight-indentation.el +;; https://github.com/antonj/Highlight-Indentation-for-Emacs/ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(require 'highlight-indentation) + +;; (add-hook 'highlight-indentation-mode-hook +;; 'highlight-indentation-current-column-mode) + +(set-face-background 'highlight-indentation-face "#1a1a1a") +(set-face-background 'highlight-indentation-current-column-face "#2a2040") + +(provide 'setup-highlight-indentation) diff --git a/conf/setup-hippie-expand.el b/conf/setup-hippie-expand.el new file mode 100644 index 0000000..46bf0a2 --- /dev/null +++ b/conf/setup-hippie-expand.el @@ -0,0 +1,15 @@ + +(setq hippie-expand-try-functions-list + '( + ;;yas/hippie-try-expand + try-expand-dabbrev + try-expand-dabbrev-all-buffers + try-expand-dabbrev-from-kill + try-complete-file-name-partially + try-complete-file-name + try-expand-all-abbrevs + try-expand-list try-expand-line + try-complete-lisp-symbol-partially + try-complete-lisp-symbol)) + +(provide 'setup-hippie-expand) diff --git a/conf/setup-howm.el b/conf/setup-howm.el new file mode 100644 index 0000000..1bb417f --- /dev/null +++ b/conf/setup-howm.el @@ -0,0 +1,56 @@ +;; howm +;; http://www.bookshelf.jp/soft/meadow_38.html#SEC563 +(require 'howm) + +(setq howm-directory "~/Dropbox/howm/") +(setq howm-menu-lang 'ja) + +(mapc + (lambda (f) + (autoload f + "howm" "Hitori Otegaru Wiki Modoki" t)) + '(howm-menu howm-list-all howm-list-recent + howm-list-grep howm-create + howm-keyword-to-kill-ring)) + +;; (eval-after-load "howm-mode" +;; '(progn +;; (define-key howm-mode-map [tab] 'action-lock-goto-next-link) +;; (define-key howm-mode-map [(meta tab)] 'action-lock-goto-previous-link))) + +(setq howm-file-name-format "%Y/%m/%Y-%m-%d.howm") + +(if (not (memq 'delete-file-if-no-contents after-save-hook)) + (setq after-save-hook + (cons 'delete-file-if-no-contents after-save-hook))) + +(defun delete-file-if-no-contents () + (when (and + (buffer-file-name (current-buffer)) + (string-match "\\.howm" (buffer-file-name (current-buffer))) + (= (point-min) (point-max))) + (delete-file + (buffer-file-name (current-buffer))))) + +;; http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?SaveAndKillBuffer +;; C-c C-c +(defun my-save-and-kill-buffer () + (interactive) + (when (and + (buffer-file-name) + (string-match "\\.howm" + (buffer-file-name))) + (save-buffer) + (kill-buffer nil))) + +(eval-after-load "howm" + '(progn + (define-key howm-mode-map + "\C-c\C-c" 'my-save-and-kill-buffer))) + +(add-to-list 'auto-mode-alist '("\\.howm$" . markdown-mode)) +;; (define-key howm-menu-mode-map [tab] nil) +(setq action-lock-goto-next-link nil) +(defalias 'hm 'howm-menu) + +(provide 'setup-howm) diff --git a/conf/setup-html-mode.el b/conf/setup-html-mode.el new file mode 100644 index 0000000..aec951f --- /dev/null +++ b/conf/setup-html-mode.el @@ -0,0 +1,14 @@ +(require 'sgml-mode) +(require 'zencoding-mode) + +(add-hook 'html-mode-hook 'zencoding-mode) + +(defun insert-angle-brackets (&optional arg) + (interactive "P") + (insert-pair arg ?\< ?>)) + +(add-hook 'html-mode-hook + '(lambda () + (local-set-key (kbd "C-=") 'insert-angle-brackets))) + +(provide 'setup-html-mode) diff --git a/conf/setup-java-mode.el b/conf/setup-java-mode.el new file mode 100644 index 0000000..53e7671 --- /dev/null +++ b/conf/setup-java-mode.el @@ -0,0 +1,4 @@ + +(setq c-default-style '((java-mode . "gnu"))) + +(provide 'setup-java-mode) diff --git a/conf/setup-latex-mode.el b/conf/setup-latex-mode.el new file mode 100644 index 0000000..343a9d1 --- /dev/null +++ b/conf/setup-latex-mode.el @@ -0,0 +1,28 @@ +(require 'tex-mode) + +;; http://d.hatena.ne.jp/ryoma_robo/20120503/1336012148 + +(setq tex-default-mode 'latex-mode) + +;; (setq-default ispell-program-name "/usr/bin/aspell") ;; path to aspell +(setq flyspell-issu-welcome-flag nil) + +(add-hook 'tex-mode-hook 'flyspell-mode) +(add-hook 'slitex-mode-hook 'flyspell-mode) +(add-hook 'latex-mode-hook 'flyspell-mode) +(add-hook 'bibtex-mode-hook 'flyspell-mode) +(add-hook 'LaTeX-mode-hook 'flyspell-mode) + +(add-to-list 'tex-compile-commands + '("platex %f")) + +(add-hook 'flyspell-mode-hook + '(lambda () + (local-set-key (kbd "C-c n") 'flyspell-correct-word-before-point))) + +;; DocView auto-revert-mode +(add-hook 'doc-view-mode-hook 'auto-revert-mode) +(setq doc-view-continuous t) + + +(provide 'setup-latex-mode) diff --git a/conf/setup-linum.el b/conf/setup-linum.el new file mode 100644 index 0000000..f453aa4 --- /dev/null +++ b/conf/setup-linum.el @@ -0,0 +1,12 @@ +(require 'linum) + +(setq linum-format "%4d.".) + +(set-face-foreground 'linum "#7a7a7a") +(set-face-background 'linum "#2D0922") + +(setq linum-delay t) +(defadvice linum-schedule (around my-linum-schedule () activate) + (run-with-idle-timer 0.2 nil #'linum-update-current)) + +(provide 'setup-linum) diff --git a/conf/setup-magit.el b/conf/setup-magit.el new file mode 100644 index 0000000..c955c49 --- /dev/null +++ b/conf/setup-magit.el @@ -0,0 +1,24 @@ +(require 'magit) + +(setq magit-diff-options '("-w" "-b")) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; http://whattheemacsd.com/setup-magit.el-01.html +;; full screen magit-status +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defadvice magit-status (around magit-fullscreen activate) + (window-configuration-to-register :magit-fullscreen) + ad-do-it + (delete-other-windows)) + +(defun magit-quit-session () + "Restores the previous window configuration and kills the magit buffer" + (interactive) + (kill-buffer) + (jump-to-register :magit-fullscreen)) + +(define-key magit-status-mode-map (kbd "q") 'magit-quit-session) + +;;; +(provide 'setup-magit) diff --git a/conf/setup-markdown-mode.el b/conf/setup-markdown-mode.el new file mode 100644 index 0000000..e4bdb2d --- /dev/null +++ b/conf/setup-markdown-mode.el @@ -0,0 +1,7 @@ +(require 'markdown-mode) + +(add-to-list 'auto-mode-alist '("\\.md" . markdown-mode)) +(add-to-list 'auto-mode-alist '("\\.mdt" . markdown-mode)) +(add-to-list 'auto-mode-alist '("\\.mddw" . markdown-mode)) + +(provide 'setup-markdown-mode) diff --git a/conf/setup-multiple-cursors.el b/conf/setup-multiple-cursors.el new file mode 100644 index 0000000..8804653 --- /dev/null +++ b/conf/setup-multiple-cursors.el @@ -0,0 +1,30 @@ +(require 'multiple-cursors) + +;; +;; http://qiita.com/ShingoFukuyama@github/items/3ad7e24cb2d8f55b4cc5 + +;; insert specific serial number +(defvar mc:insert-numbers-hist nil) +(defvar mc:insert-numbers-inc 1) +(defvar mc:insert-numbers-pad "%01d") + +(defun mc:insert-numbers (start inc pad) + "Insert increasing numbers for each cursor specifically." + (interactive + (list (read-number "Start from: " 0) + (read-number "Increment by: " 1) + (read-string "Padding (%01d): " nil mc:insert-numbers-hist "%01d"))) + (setq mc--insert-numbers-number start) + (setq mc:insert-numbers-inc inc) + (setq mc:insert-numbers-pad pad) + (mc/for-each-cursor-ordered + (mc/execute-command-for-fake-cursor + 'mc:-insert-number-and-increase + cursor))) + +(defun mc:-insert-number-and-increase () + (interactive) + (insert (format mc:insert-numbers-pad mc--insert-numbers-number)) + (setq mc--insert-numbers-number (+ mc--insert-numbers-number mc:insert-numbers-inc))) + +(provide 'setup-multiple-cursors) diff --git a/conf/setup-package.el b/conf/setup-package.el new file mode 100644 index 0000000..a3add12 --- /dev/null +++ b/conf/setup-package.el @@ -0,0 +1,7 @@ +(require 'package) + +(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) +(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) +(package-initialize) + +(provide 'setup-package) diff --git a/conf/setup-popwin.el b/conf/setup-popwin.el new file mode 100644 index 0000000..6869261 --- /dev/null +++ b/conf/setup-popwin.el @@ -0,0 +1,10 @@ +(require 'popwin) + +(setq display-buffer-function 'popwin:display-buffer) +(setq popwin:popup-window-height 18) + +(push "*Backtrace*" popwin:special-display-config) + +(require 'popwin-browse-kill-ring) + +(provide 'setup-popwin) diff --git a/conf/setup-scratch.el b/conf/setup-scratch.el new file mode 100644 index 0000000..a0c813f --- /dev/null +++ b/conf/setup-scratch.el @@ -0,0 +1,35 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; http://www.bookshelf.jp/soft/meadow_29.html#SEC392 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defun my-make-scratch (&optional arg) + (interactive) + (progn + ;; + (set-buffer (get-buffer-create "*scratch*")) + (funcall initial-major-mode) + (erase-buffer) + (when (and initial-scratch-message (not inhibit-startup-message)) + (insert initial-scratch-message)) + (or arg (progn (setq arg 0) + (switch-to-buffer "*scratch*"))) + (cond ((= arg 0) (message "*scratch* is cleared up.")) + ((= arg 1) (message "another *scratch* is created"))))) + +(defun my-buffer-name-list () + (mapcar (function buffer-name) (buffer-list))) + +(add-hook 'kill-buffer-query-functions + ;; + (function (lambda () + (if (string= "*scratch*" (buffer-name)) + (progn (my-make-scratch 0) nil) + t)))) + +(add-hook 'after-save-hook +;; + (function (lambda () + (unless (member "*scratch*" (my-buffer-name-list)) + (my-make-scratch 1))))) +;; +(provide 'setup-scratch) diff --git a/conf/setup-screen-lines.el b/conf/setup-screen-lines.el new file mode 100644 index 0000000..edfb212 --- /dev/null +++ b/conf/setup-screen-lines.el @@ -0,0 +1,5 @@ +(require 'screen-lines) + +(add-hook 'text-mode-hook 'turn-on-screen-lines-mode) + +(provide 'setup-screen-lines) diff --git a/conf/setup-sequential-command.el b/conf/setup-sequential-command.el new file mode 100644 index 0000000..2fe6b68 --- /dev/null +++ b/conf/setup-sequential-command.el @@ -0,0 +1,14 @@ +(require 'sequential-command) +(require 'sequential-command-config) + +(sequential-command-setup-keys) + +(define-sequential-command seq-home +;; back-to-indentation + beginning-of-line + beginning-of-buffer + seq-return) + +(global-set-key "\C-a" 'seq-home) + +(provide 'setup-sequential-command) diff --git a/conf/setup-skk.el b/conf/setup-skk.el new file mode 100644 index 0000000..2eaf1a4 --- /dev/null +++ b/conf/setup-skk.el @@ -0,0 +1,7 @@ +;; skk + +(when (require 'skk nil t) + (setq fill-column 120)) + +;;; +(provide 'setup-skk) diff --git a/conf/setup-smartchr.el b/conf/setup-smartchr.el new file mode 100644 index 0000000..8f7c43b --- /dev/null +++ b/conf/setup-smartchr.el @@ -0,0 +1,3 @@ +(require 'smartchr) + +(provide 'setup-smartchr) diff --git a/conf/setup-smex.el b/conf/setup-smex.el new file mode 100644 index 0000000..3e5a31c --- /dev/null +++ b/conf/setup-smex.el @@ -0,0 +1,10 @@ +(require 'smex) ; Not needed if you use package.el +(smex-initialize) ; Can be omitted. This might cause a (minimal) delay + ; when Smex is auto-initialized on its first run. + +(global-set-key (kbd "M-x") 'smex) +(global-set-key (kbd "M-X") 'smex-major-mode-commands) +;; This is your old M-x. +(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command) + +(provide 'setup-smex) diff --git a/conf/setup-tabbar.el b/conf/setup-tabbar.el new file mode 100644 index 0000000..6812025 --- /dev/null +++ b/conf/setup-tabbar.el @@ -0,0 +1,25 @@ +;;; setup-tabbar.el --- + +(require 'tabbar) +(require 'tabbar+) + +;; remove {home, left, right} button +(dolist (btn '(tabbar-buffer-home-button + tabbar-scroll-left-button + tabbar-scroll-right-button)) + (set btn (cons (cons "" nil) + (cons "" nil)))) + +(tabbar-mwheel-mode 0) + +(setq tabbar-auto-scroll-flag 1) + +(setq tabbar-separator '(1.2)) + +(setq tabbar-cycle-scope 'tabs) + +(when window-system + (tabbar-mode t) + (tabbar+enable-tab-group)) + +(provide 'setup-tabbar) diff --git a/conf/setup-tramp.el b/conf/setup-tramp.el new file mode 100644 index 0000000..3e9e975 --- /dev/null +++ b/conf/setup-tramp.el @@ -0,0 +1,7 @@ +(require 'tramp) + +(setq tramp-default-method "ssh") +(add-to-list 'backup-directory-alist + (cons tramp-file-name-regexp nil)) + +(provide 'setup-tramp) diff --git a/conf/setup-whitespace.el b/conf/setup-whitespace.el new file mode 100644 index 0000000..56ab53a --- /dev/null +++ b/conf/setup-whitespace.el @@ -0,0 +1,15 @@ +(require 'whitespace) + +(setq whitespace-style + '(tabs tab-mark spaces space-mark)) + +(setq whitespace-space-regexp "\\(\x3000+\\)") + +(setq whitespace-display-mappings + '((space-mark ?\x3000 [?\□]) + (tab-mark ?\t [?\xBB ?\t]) + )) + +(global-whitespace-mode 1) + +(provide 'setup-whitespace) diff --git a/conf/setup-wrap-region.el b/conf/setup-wrap-region.el new file mode 100644 index 0000000..2394240 --- /dev/null +++ b/conf/setup-wrap-region.el @@ -0,0 +1,8 @@ +;;; https://github.com/rejeep/wrap-region + +(require 'wrap-region) + +(wrap-region-global-mode t) +(add-to-list 'wrap-region-except-modes 'magit-status-mode) + +(provide 'setup-wrap-region) diff --git a/conf/setup-yasnippet.el b/conf/setup-yasnippet.el new file mode 100644 index 0000000..2ad93a7 --- /dev/null +++ b/conf/setup-yasnippet.el @@ -0,0 +1,17 @@ +;; setup-yasnnippet.el --- + +(require 'yasnippet) +(setq yas-snippet-dirs '("~/.emacs.d/snippets")) + +(yas-global-mode +1) + +(setq yas/wrap-around-region t) + +(define-key yas-keymap (kbd "") 'yas-exit-all-snippets) +(define-key yas-keymap (kbd "C-h") 'yas-prev-field) +(define-key yas-keymap (kbd "C-n") 'yas-next-field) + +(if (not window-system) + (setq yas-prompt-functions '(yas-ido-prompt yas-completing-prompt))) + +(provide 'setup-yasnippet) diff --git a/conf/setup-zlc.el b/conf/setup-zlc.el new file mode 100644 index 0000000..0cec22c --- /dev/null +++ b/conf/setup-zlc.el @@ -0,0 +1,19 @@ +;; setup-zsh.el + +;; https://github.com/mooz/emacs-zlc +(require 'zlc) + +(let ((map minibuffer-local-map)) + ;;; like menu select + (define-key map (kbd "") 'zlc-select-next-vertical) + (define-key map (kbd "") 'zlc-select-previous-vertical) + (define-key map (kbd "") 'zlc-select-next) + (define-key map (kbd "") 'zlc-select-previous) + ;;; reset selection + (define-key map (kbd "C-d") 'zlc-reset) + ;; turn on + (zlc-mode t)) + + + +(provide 'setup-zlc) diff --git a/eshell/alias b/eshell/alias new file mode 100644 index 0000000..f7bb7f4 --- /dev/null +++ b/eshell/alias @@ -0,0 +1,4 @@ +alias cd cd $1; ls +alias lla ls -alhF +alias la ls -aF +alias ll ls -lhF diff --git a/init.el b/init.el new file mode 100644 index 0000000..c5aef91 --- /dev/null +++ b/init.el @@ -0,0 +1,107 @@ +;;; init.el --- ___Johniel's init file + +;; +;; +;; + +(unless (>= 24 emacs-major-version) + (error "Use Emacs 24 or later.")) + +(add-to-list 'load-path "~/.emacs.d") + +(require 'util) +(add-to-load-path-r "elpa") +(add-to-load-path-r "site-lisp") +(add-to-load-path-r "conf") +(add-to-load-path-r "theme") + +(defun performance-saving-p () + (member (system-name) '())) + +;; +;; +;; + +(require 'all-ext) +(require 'color-moccur) +(require 'dash) +(require 'expand-region) +(require 'fold-this) +(require 'mark-multiple) +(require 'litable) +(require 'point-undo) +(require 'redo+) +(require 's) +(require 'smooth-scrolling) +(require 'tempbuf) +(require 'yascroll) + +;; +;; +;; + +(require 'setup-ace-jump-mode) +(require 'setup-auto-complete) +(require 'setup-auto-save-buffers) +(require 'setup-browse-kill-ring) +(require 'setup-eshell) +(require 'setup-dired) +(require 'setup-flymake) +(require 'setup-flyspell) +(require 'setup-golden-ratio) +(require 'setup-gtags) +(require 'setup-helm) +(require 'setup-highlight-indentation) +(require 'setup-hippie-expand) +(require 'setup-howm) +(require 'setup-linum) +(require 'setup-magit) +(require 'setup-multiple-cursors) +(require 'setup-package) +(require 'setup-popwin) +(require 'setup-scratch) +(require 'setup-screen-lines) +(require 'setup-sequential-command) +(require 'setup-skk) +(require 'setup-smartchr) +(require 'setup-tabbar) +(require 'setup-whitespace) +(require 'setup-wrap-region) +(require 'setup-yasnippet) +(require 'setup-zlc) +;; (require 'setup-cedet) +;; (require 'setup-tramp) +;; (require 'setup-smex) +;; (require 'setup-guide-key) +(require 'integrate-yas-ac) + +;; +;; Major Mode Setup +;; + +(require 'setup-auctex) ;; latex +(require 'setup-c-mode) +(require 'setup-c++-mode) +(require 'setup-clojure-mode) +(require 'setup-emacs-lisp-mode) +(require 'setup-html-mode) +(require 'setup-java-mode) +(require 'setup-markdown-mode) + +;; +;; +;; + +(load "my-misc.el") +(load "key-bindings.el") +(load "appearance.el") + +;; +;; +;; + +;; (require 'k7) +(put 'erase-buffer 'disabled nil) + +;; latest ddskk +(put 'modeline 'face-alias 'mode-line) diff --git a/key-bindings.el b/key-bindings.el new file mode 100644 index 0000000..13de021 --- /dev/null +++ b/key-bindings.el @@ -0,0 +1,182 @@ +;;; key-bindings.el + +;; _____ _ ______ _ +;; | ___| (_) | _ \ | | +;; | |__ _ __ _ ___ _ _| | | |_ _____ _ __ __ _| | __ +;; | __| '_ \| |/ _ \| | | | | | \ \ / / _ \| '__/ _` | |/ / +;; | |__| | | | | (_) | |_| | |/ / \ V / (_) | | | (_| | < +;; \____/_| |_| |\___/ \__, |___/ \_/ \___/|_| \__,_|_|\_\ +;; _/ | __/ | +;; |__/ |___/ + +(require 'util) +(require 'commands) + +(defun call-either (condition command-a command-b) + `(lambda () + (interactive) + (if (,condition) + (call-interactively ',command-a) + (call-interactively ',command-b)))) + +(keyboard-translate ?\C-\[ ?\C-m) +(keyboard-translate ?\C-m ?\C-\[) +(keyboard-translate ?\C-i ?\C-\]) +(keyboard-translate ?\C-\] ?\C-i) + +;; ispell +(global-set-key (kbd "") 'ispell-word) +(global-set-key (kbd "C-") 'ispell-region) + +;; linum +(global-set-key [S-f9] 'linum-mode) + +;; rode+ +(global-set-key (kbd "C-.") 'redo) + +;; killing +(global-set-key (kbd "C-\\") 'kill-whole-line) +(global-set-key (kbd "C-c C-k") 'copy-line) +(global-set-key (kbd "C-w") 'kill-word-or-kill-region) +(global-set-key (kbd "C-M-w") 'kill-ring-save) + +;; helm +(global-set-key (kbd "C-_") 'my-standard-helm) +(global-set-key (kbd "C-c SPC") 'helm-M-x) +;; (global-set-key (kbd "C-c SPC") 'helm-lisp-completion-at-point) + +;; +(global-set-key (kbd "C-c ;") 'comment-dwim) + +;; +(global-set-key (kbd "C-c C-r") 'revert-buffer) +(global-set-key (kbd "C-x C-r") 'rename-current-buffer-file) +(global-set-key (kbd "C-x C-k") 'delete-current-buffer-file) + +;; +(global-set-key (kbd "C-c C-y") 'browse-kill-ring) + +;; +(global-set-key (kbd "C-S-y") 'yank-unindented) + +;; +(global-set-key [f8] 'howm-menu) + +;; +(global-set-key (kbd "C-x b") 'switch-to-buffer) +(global-set-key (kbd "C-x C-b") 'switch-to-buffer) + +;; magit +(global-set-key (kbd "C-x m") 'magit-status) + +;; +(global-set-key (kbd "C-f") 'hippie-expand) + +;; cua-mode +(define-key cua-global-keymap (kbd "C-") nil) +(define-key cua-global-keymap (kbd "C-S-") 'cua-set-rectangle-mark) + +;; cursor +(global-set-key (kbd "C-c C-g") 'goto-line) +(global-set-key (kbd "C-h") 'previous-line) +(global-set-key (kbd "C-n") 'next-line) +(global-set-key (kbd "C-t") 'forward-char) +(global-set-key (kbd "C-b") 'backward-char) +(global-set-key (kbd "C-u") 'forward-word) +(global-set-key (kbd "C--") 'backward-word) + +(global-set-key (kbd "C-S-n") 'point-undo) +(global-set-key (kbd "C-S-h") 'point-redo) + +;; +(global-set-key (kbd "C-d") 'delete-char) +(global-set-key (kbd "C-p") 'delete-backward-char) + +;; ace-jump-mode +(global-set-key (kbd "C-c C-h") 'ace-jump-line-mode) +(global-set-key (kbd "C-c C-t") 'ace-jump-mode) + +;; +(global-set-key (kbd "M-s o") 'isearch-occur) + +;; +(global-set-key (kbd "C-c C-e") 'eval-and-replace) + +;; +(global-set-key (kbd "C-x ") 'indent-region) + +;; +(global-set-key (kbd "C-x C-h") 'mark-whole-buffer) + +;; +(global-set-key (kbd "C-=") 'insert-parentheses) + +;; +(global-set-key (kbd "C-;") 'universal-argument) +(global-set-key (kbd "C-]") 'other-window-or-split) ; C-] <-> C-i +(global-set-key (kbd "C-M-]") 'kill-buffer-and-window) ; C-] <-> C-i +(global-set-key [f2] 'swap-screen) +(global-set-key [C-f2] 'swap-screen-with-cursor) + +;; scroll +(global-set-key (kbd "C-'") 'scroll-down) +(global-set-key (kbd "C-v") 'scroll-up-command) + +;; expand-region +(global-set-key (kbd "C-8") 'er/expand-region) +(global-set-key (kbd "C-7") 'er/contract-region) + +;; mark-multiple +;; (global-set-key (kbd "C-9") 'mark-previous-like-this) +;; (global-set-key (kbd "C-0") 'mark-next-like-this) + +;; multiple-cursor +(global-set-key (kbd "C->") 'mc/mark-next-like-this) +(global-set-key (kbd "C-<") 'mc/mark-previous-like-this) +(global-set-key (kbd "C-c C-*") 'mc/mark-all-like-this) + +;; flymake +(global-set-key (kbd "M-h") 'flymake-goto-prev-error) +(global-set-key (kbd "M-n") 'flymake-goto-next-error) + +;; +(global-set-key (kbd "C-c C-8") 'join-line) +(global-set-key (kbd "") '(lambda () + (interactive) + (move-end-of-line nil) + (newline-and-indent))) + +(require 'cc-cmds) +(global-set-key (kbd "") 'c-hungry-backspace) + +;; fold-this +(global-set-key (kbd "C-c C-f") 'fold-this-all) +(global-set-key (kbd "C-c C-F") 'fold-this) +(global-set-key (kbd "C-c M-f") 'fold-this-unfold-all) + +;; transpose +;; (global-set-key (kbd "M-t l") 'transpose-lines) +;; (global-set-key (kbd "M-t w") 'transpose-words) + +;; font size +(global-set-key (kbd "") 'text-scale-increase) +(global-set-key (kbd "") 'text-scale-decrease) + +;; tabbar +(global-set-key [f9] 'tabbar-mode) +(global-set-key (kbd "C-S-t") 'tabbar-forward) +(global-set-key (kbd "C-S-b") 'tabbar-backward) +(global-set-key (kbd "C-") 'tabbar+move-left) +(global-set-key (kbd "C-") 'tabbar+move-right) +(global-set-key (kbd "C-") 'tabbar-forward-group) +(global-set-key (kbd "C-") 'tabbar-backward-group) + +;; dmacro +(defconst *dmacro-key* (kbd "C-1")) +(require 'dmacro) +(global-set-key *dmacro-key* 'dmacro-exec) +(autoload 'dmacro-exec "dmacro" nil t) + +;; ddskk +(when (require 'skk nil t) + (global-set-key (kbd "C-x C-j") 'skk-mode)) diff --git a/my-misc.el b/my-misc.el new file mode 100644 index 0000000..c4dfa5a --- /dev/null +++ b/my-misc.el @@ -0,0 +1,106 @@ +;;; my-misc.el --- + +(require 'util) +(require 'commands) + +;; +(when (eq system-type 'gnu/linux) + (require 'notifications)) + +;; +(defalias 'yes-or-no-p 'y-or-n-p) +(defalias 'quit 'save-buffers-kill-terminal) + +;; +(savehist-mode 1) + +;; +(global-auto-revert-mode -1) +;; http://d.hatena.ne.jp/syohex/20130206/1360157000 +(require 'notifications) +(defun my/after-revert-hook () + (notifications-notify :title (format "Revert %s" (buffer-file-name)) + :body "Check it out" :urgency 'critical)) +(add-hook 'after-revert-hook 'my/after-revert-hook) + +;; +(recentf-mode 1) +(setq recentf-max-menu-items 200) +(setq recentf-max-saved-items 500) + +;; +(iswitchb-mode 1) +(setq read-buffer-function 'iswitchb-read-buffer) +(setq iswitchb-regexp nil) +(setq iswitchb-prompt-newbuffer nil) + +;; +(cua-mode 1) +(setq cua-enable-cua-keys nil) + +;; +(setq inhibit-startup-screen t) + +;; +(set-default 'indicate-empty-lines t) + +;; +(setq gc-cons-threshold (* 10 gc-cons-threshold)) + +;; +(setq scroll-conservatively 1) + +;; +(setq completion-ignore-case t) +(setq read-file-name-completion-ignore-case t) + +;; +(setq next-line-add-newlines nil) +;; (setq require-final-newline t) + +;; +(setq c-auto-newline nil) +(setq-default tab-width 2) +(setq-default indent-tabs-mode nil) + +;; +;; (require 'wgrep) +;; (setq wgrep-enable-key "r") + +;; +(setq make-backup-files +1) ; ~ +(setq auto-save-default -1) ; # + +;; ediff +(setq ediff-diff-options "-w") +(setq ediff-split-window-function 'split-window-horizontally) + +;; display full-path in title-bar +;; http://wiki.s17.xrea.com/x/wiki/wiki.cgi?.emacs +(defvar dired-mode-p nil) +(add-hook 'dired-mode-hook + (lambda () + (make-local-variable 'dired-mode-p) + (setq dired-mode-p t))) +(setq frame-title-format-orig frame-title-format) +(setq frame-title-format '((buffer-file-name "%f" + (dired-mode-p default-directory + mode-line-buffer-identification)))) + +;; +(add-hook 'window-setup-hook + (lambda () + (set-frame-parameter nil 'fullscreen 'maximized))) + +;; +;; http://d.hatena.ne.jp/sugyan/20120120/1327037494 +(add-hook 'after-init-hook + (lambda () + (message "init time: %.3f sec" + (float-time (time-subtract after-init-time before-init-time))))) + +;; +(add-hook 'before-save-hook 'delete-trailing-whitespace-except-current-line) + +;; +(add-hook 'dired-load-hook '(lambda () (load "dired-x"))) diff --git a/site-lisp/auto-save-buffers/auto-save-buffers.el b/site-lisp/auto-save-buffers/auto-save-buffers.el new file mode 100644 index 0000000..a9423e4 --- /dev/null +++ b/site-lisp/auto-save-buffers/auto-save-buffers.el @@ -0,0 +1,76 @@ +;; +;; auto-save-buffers.el +;; +;; 元のコードは山岡克美氏が書いてくださった (ELF:01128) +;; +;; 使い方: +;; +;; (require 'auto-save-buffers) +;; (run-with-idle-timer 0.5 t 'auto-save-buffers) ; アイドル0.5秒で保存 +;; +;; auto-save-buffers の on/off を切り替えるためのキー定義 (C-x a s) +;; +;; (define-key ctl-x-map "as" 'auto-save-buffers-toggle) +;; + +;; auto-save-buffers で対象とするファイル名の正規表現 +(defvar auto-save-buffers-regexp "" + "*Regexp that matches `buffer-file-name' to be auto-saved.") + +;; auto-save-buffers で除外するファイル名の正規表現 +(defvar auto-save-buffers-exclude-regexp "^$" + "*Regexp that matches `buffer-file-name' not to be auto-saved.") + +;; +;; あるいは auto-save-buffers の引数で正規表現を指定することもできる +;; +;; (require 'auto-save-buffers) +;; (run-with-idle-timer 0.5 t 'auto-save-buffers "\\.c$" "^$") ; .c だけ対象 +;; (run-with-idle-timer 0.5 t 'auto-save-buffers "" "\\.h$") ; .h だけ除外 +;; + +;; nil ならセーブしない (タイマーは回ったまま) +(defvar auto-save-buffers-active-p t + "If non-nil, `auto-save-buffers' saves buffers.") + +;; 省略可能の引数で、include/exclude 用の正規表現を指定できる +(defun auto-save-buffers (&rest regexps) + "Save buffers if `buffer-file-name' matches `auto-save-buffers-regexp'." + (let ((include-regexp (or (car regexps) auto-save-buffers-regexp)) + (exclude-regexp (or (cadr regexps) auto-save-buffers-exclude-regexp)) + (buffers (buffer-list))) + (save-excursion + (while buffers + (set-buffer (car buffers)) + (if (and buffer-file-name + auto-save-buffers-active-p + (buffer-modified-p) + (not buffer-read-only) + (string-match include-regexp buffer-file-name) + (not (string-match exclude-regexp buffer-file-name)) + (file-writable-p buffer-file-name)) + (save-buffer)) + (setq buffers (cdr buffers)))))) + +;; auto-save-buffers の on/off をトグルで切り替える +;; Based on the code by Yoshihiro (いやな日記 2004-03-23) +(defun auto-save-buffers-toggle () + "Toggle `auto-save-buffers'" + (interactive) + (if auto-save-buffers-active-p + (setq auto-save-buffers-active-p nil) + (setq auto-save-buffers-active-p t)) + (if auto-save-buffers-active-p + (message "auto-save-buffers on") + (message "auto-save-buffers off"))) + +;; +;; Emacs 21 以降で Makefile の編集時に "Suspicious line XXX. Save anyway" +;; というプロンプトを出さないようにするためのおまじない +;; +(add-hook 'makefile-mode-hook + (function (lambda () + (fset 'makefile-warn-suspicious-lines 'ignore)))) + +(provide 'auto-save-buffers) + diff --git a/site-lisp/cljdoc/ac-clj.el b/site-lisp/cljdoc/ac-clj.el new file mode 100644 index 0000000..9781c84 --- /dev/null +++ b/site-lisp/cljdoc/ac-clj.el @@ -0,0 +1,544 @@ +(defvar cljdoc-alist + '(("*" . "(* x y & more) Returns the product of nums. (*) returns 1. Does not auto-promote longs, will throw on overflow. See also: *'") + ("*'" . "(*' x y & more) Returns the product of nums. (*) returns 1. Supports arbitrary precision. See also: *") + ("+" . "(+ x y & more) Returns the sum of nums. (+) returns 0. Does not auto-promote longs, will throw on overflow. See also: +'") + ("+'" . "(+' x y & more) Returns the sum of nums. (+) returns 0. Supports arbitrary precision. See also: +") + ("-" . "(- x y & more) If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result. Does not auto-promote longs, will throw on overflow. See also: -'") + ("-'" . "(-' x y & more) If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result. Supports arbitrary precision. See also: -") + ("->" . "(-> x form & more) Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc.") + ("->>" . "(->> x form & more) Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the last item in second form, etc.") + ("->ArrayChunk" . "(->ArrayChunk am arr off end) Positional factory function for class clojure.core.ArrayChunk.") + ("->Vec" . "(->Vec am cnt shift root tail _meta) Positional factory function for class clojure.core.Vec.") + ("->VecNode" . "(->VecNode edit arr) Positional factory function for class clojure.core.VecNode.") + ("->VecSeq" . "(->VecSeq am vec anode i offset) Positional factory function for class clojure.core.VecSeq.") + (".." . "(.. x form & more) form => fieldName-symbol or (instanceMethodName-symbol args*) Expands into a member access (.) of the first member on the first argument, followed by the next member on the result, etc. For instance: (.. System (getProperties) (get \"os.name\")) expands to: (. (. System (getProperties)) (get \"os.name\")) but is easier to write, read, and understand.") + ("/" . "(/ x y & more) If no denominators are supplied, returns 1/numerator, else returns numerator divided by all of the denominators.") + ("<" . "(< x y & more) Returns non-nil if nums are in monotonically increasing order, otherwise false.") + ("<=" . "(<= x y & more) Returns non-nil if nums are in monotonically non-decreasing order, otherwise false.") + ("=" . "(= x y & more) Equality. Returns true if x equals y, false if not. Same as Java x.equals(y) except it also works for nil, and compares numbers and collections in a type-independent manner. Clojure's immutable data structures define equals() (and thus =) as a value, not an identity, comparison.") + ("==" . "(== x y & more) Returns non-nil if nums all have the equivalent value (type-independent), otherwise false") + (">" . "(> x y & more) Returns non-nil if nums are in monotonically decreasing order, otherwise false.") + (">=" . "(>= x y & more) Returns non-nil if nums are in monotonically non-increasing order, otherwise false.") + ("accessor" . "(accessor s key) Returns a fn that, given an instance of a structmap with the basis, returns the value at the key. The key must be in the basis. The returned function should be (slightly) more efficient than using get, but such use of accessors should be limited to known performance-critical areas.") + ("aclone" . "(aclone array) Returns a clone of the Java array. Works on arrays of known types.") + ("add-classpath" . "(add-classpath url) DEPRECATED Adds the url (String or URL object) to the classpath per URLClassLoader.addURL") + ("add-watch" . "(add-watch reference key fn) Alpha - subject to change. Adds a watch function to an agent/atom/var/ref reference. The watch fn must be a fn of 4 args: a key, the reference, its old-state, its new-state. Whenever the reference's state might have been changed, any registered watches will have their functions called. The watch fn will be called synchronously, on the agent's thread if an agent, before any pending sends if agent or ref. Note that an atom's or ref's state may have changed again prior to the fn call, so use old/new-state rather than derefing the reference. Note also that watch fns may be called from multiple threads simultaneously. Var watchers are triggered only by root binding changes, not thread-local set!s. Keys must be unique per reference, and can be used to remove the watch with remove-watch, but are otherwise considered opaque by the watch mechanism.") + ("agent" . "(agent state & options) Creates and returns an agent with an initial value of state and zero or more options (in any order): :meta metadata-map :validator validate-fn :error-handler handler-fn :error-mode mode-keyword If metadata-map is supplied, it will be come the metadata on the agent. validate-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validate-fn should return false or throw an exception. handler-fn is called if an action throws an exception or if validate-fn rejects a new state -- see set-error-handler! for details. The mode-keyword may be either :continue (the default if an error-handler is given) or :fail (the default if no error-handler is given) -- see set-error-mode! for details.") + ("agent-error" . "(agent-error a) Returns the exception thrown during an asynchronous action of the agent if the agent is failed. Returns nil if the agent is not failed.") + ("agent-errors" . "(agent-errors a) DEPRECATED: Use 'agent-error' instead. Returns a sequence of the exceptions thrown during asynchronous actions of the agent.") + ("aget" . "(aget array idx & idxs) Returns the value at the index/indices. Works on Java arrays of all types.") + ("alength" . "(alength array) Returns the length of the Java array. Works on arrays of all types.") + ("alias" . "(alias alias namespace-sym) Add an alias in the current namespace to another namespace. Arguments are two symbols: the alias to be used, and the symbolic name of the target namespace. Use :as in the ns macro in preference to calling this directly.") + ("all-ns)" . "(all-ns) Returns a sequence of all namespaces.") + ("alter" . "(alter ref fun & args) Must be called in a transaction. Sets the in-transaction-value of ref to: (apply fun in-transaction-value-of-ref args) and returns the in-transaction-value of ref.") + ("alter-meta!" . "(alter-meta! iref f & args) Atomically sets the metadata for a namespace/var/ref/agent/atom to be: (apply f its-current-meta args) f must be free of side-effects") + ("alter-var-root" . "(alter-var-root v f & args) Atomically alters the root binding of var v by applying f to its current value plus any args") + ("amap" . "(amap a idx ret expr) Maps an expression across an array a, using an index named idx, and return value named ret, initialized to a clone of a, then setting each element of ret to the evaluation of expr, returning the new array ret.") + ("ancestors" . "(ancestors h tag) Returns the immediate and indirect parents of tag, either via a Java type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy") + ("and" . "(and x & next) Evaluates exprs one at a time, from left to right. If a form returns logical false (nil or false), and returns that value and doesn't evaluate any of the other expressions, otherwise it returns the value of the last expr. (and) returns true.") + ("apply" . "(apply f a b c d & args) Applies fn f to the argument list formed by prepending intervening arguments to args.") + ("areduce" . "(areduce a idx ret init expr) Reduces an expression across an array a, using an index named idx, and return value named ret, initialized to init, setting ret to the evaluation of expr at each step, returning ret.") + ("array-map" . "(array-map & keyvals) Constructs an array-map.") + ("aset" . "(aset array idx idx2 & idxv) Sets the value at the index/indices. Works on Java arrays of reference types. Returns val.") + ("aset-boolean" . "(aset-boolean array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of boolean. Returns val.") + ("aset-byte" . "(aset-byte array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of byte. Returns val.") + ("aset-char" . "(aset-char array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of char. Returns val.") + ("aset-double" . "(aset-double array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of double. Returns val.") + ("aset-float" . "(aset-float array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of float. Returns val.") + ("aset-int" . "(aset-int array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of int. Returns val.") + ("aset-long" . "(aset-long array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of long. Returns val.") + ("aset-short" . "(aset-short array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of short. Returns val.") + ("assert" . "(assert x message) Evaluates expr and throws an exception if it does not evaluate to logical true.") + ("assoc" . "(assoc map key val & kvs) assoc[iate]. When applied to a map, returns a new map of the same (hashed/sorted) type, that contains the mapping of key(s) to val(s). When applied to a vector, returns a new vector that contains val at index. Note - index must be <= (count vector).") + ("assoc!" . "(assoc! coll key val & kvs) Alpha - subject to change. When applied to a transient map, adds mapping of key(s) to val(s). When applied to a transient vector, sets the val at index. Note - index must be <= (count vector). Returns coll.") + ("assoc-in" . "(assoc-in m [k & ks] v) Associates a value in a nested associative structure, where ks is a sequence of keys and v is the new value and returns a new nested structure. If any levels do not exist, hash-maps will be created.") + ("associative?" . "(associative? coll) Returns true if coll implements Associative") + ("atom" . "(atom x & options) Creates and returns an Atom with an initial value of x and zero or more options (in any order): :meta metadata-map :validator validate-fn If metadata-map is supplied, it will be come the metadata on the atom. validate-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validate-fn should return false or throw an exception.") + ("await" . "(await & agents) Blocks the current thread (indefinitely!) until all actions dispatched thus far, from this thread or agent, to the agent(s) have occurred. Will block on failed agents. Will never return if a failed agent is restarted with :clear-actions true.") + ("await-for" . "(await-for timeout-ms & agents) Blocks the current thread until all actions dispatched thus far (from this thread or agent) to the agents have occurred, or the timeout (in milliseconds) has elapsed. Returns logical false if returning due to timeout, logical true otherwise.") + ("bases" . "(bases c) Returns the immediate superclass and direct interfaces of c, if any") + ("bean" . "(bean x) Takes a Java object and returns a read-only implementation of the map abstraction based upon its JavaBean properties.") + ("bigdec" . "(bigdec x) Coerce to BigDecimal") + ("bigint" . "(bigint x) Coerce to BigInt") + ("biginteger" . "(biginteger x) Coerce to BigInteger") + ("binding" . "(binding bindings & body) binding => var-symbol init-expr Creates new bindings for the (already-existing) vars, with the supplied initial values, executes the exprs in an implicit do, then re-establishes the bindings that existed before. The new bindings are made in parallel (unlike let); all init-exprs are evaluated before the vars are bound to their new values.") + ("bit-and" . "(bit-and x y & more) Bitwise and") + ("bit-and-not" . "(bit-and-not x y & more) Bitwise and with complement") + ("bit-clear" . "(bit-clear x n) Clear bit at index n") + ("bit-flip" . "(bit-flip x n) Flip bit at index n") + ("bit-not" . "(bit-not x) Bitwise complement") + ("bit-or" . "(bit-or x y & more) Bitwise or") + ("bit-set" . "(bit-set x n) Set bit at index n") + ("bit-shift-left" . "(bit-shift-left x n) Bitwise shift left") + ("bit-shift-right" . "(bit-shift-right x n) Bitwise shift right") + ("bit-test" . "(bit-test x n) Test bit at index n") + ("bit-xor" . "(bit-xor x y & more) Bitwise exclusive or") + ("boolean" . "(boolean x) Coerce to boolean") + ("boolean-array" . "(boolean-array size init-val-or-seq) Creates an array of booleans") + ("booleans" . "(booleans xs) Casts to boolean[]") + ("bound-fn" . "(bound-fn & fntail) Returns a function defined by the given fntail, which will install the same bindings in effect as in the thread at the time bound-fn was called. This may be used to define a helper function which runs on a different thread, but needs the same bindings in place.") + ("bound-fn*" . "(bound-fn* f) Returns a function, which will install the same bindings in effect as in the thread at the time bound-fn* was called and then call f with any given arguments. This may be used to define a helper function which runs on a different thread, but needs the same bindings in place.") + ("bound?" . "(bound? & vars) Returns true if all of the vars provided as arguments have any bound value, root or thread-local. Implies that deref'ing the provided vars will succeed. Returns true if no vars are provided.") + ("butlast" . "(butlast coll) Return a seq of all but the last item in coll, in linear time") + ("byte" . "(byte x) Coerce to byte") + ("byte-array" . "(byte-array size init-val-or-seq) Creates an array of bytes") + ("bytes" . "(bytes xs) Casts to bytes[]") + ("case" . "(case e & clauses) Takes an expression, and a set of clauses. Each clause can take the form of either: test-constant result-expr (test-constant1 ... test-constantN) result-expr The test-constants are not evaluated. They must be compile-time literals, and need not be quoted. If the expression is equal to a test-constant, the corresponding result-expr is returned. A single default expression can follow the clauses, and its value will be returned if no clause matches. If no default expression is provided and no clause matches, an IllegalArgumentException is thrown. Unlike cond and condp, case does a constant-time dispatch, the clauses are not considered sequentially. All manner of constant expressions are acceptable in case, including numbers, strings, symbols, keywords, and (Clojure) composites thereof. Note that since lists are used to group multiple constants that map to the same expression, a vector can be used to match a list if needed. The test-constants need not be all of the same type.") + ("cast" . "(cast c x) Throws a ClassCastException if x is not a c, else returns x.") + ("char" . "(char x) Coerce to char") + ("char-array" . "(char-array size init-val-or-seq) Creates an array of chars") + ("char?" . "(char? x) Return true if x is a Character") + ("chars" . "(chars xs) Casts to chars[]") + ("class" . "(class x) Returns the Class of x") + ("class?" . "(class? x) Returns true if x is an instance of Class") + ("clear-agent-errors" . "(clear-agent-errors a) DEPRECATED: Use 'restart-agent' instead. Clears any exceptions thrown during asynchronous actions of the agent, allowing subsequent actions to occur.") + ("clojure-version)" . "(clojure-version) Returns clojure version as a printable string.") + ("coll?" . "(coll? x) Returns true if x implements IPersistentCollection") + ("comment" . "(comment & body) Ignores body, yields nil") + ("commute" . "(commute ref fun & args) Must be called in a transaction. Sets the in-transaction-value of ref to: (apply fun in-transaction-value-of-ref args) and returns the in-transaction-value of ref. At the commit point of the transaction, sets the value of ref to be: (apply fun most-recently-committed-value-of-ref args) Thus fun should be commutative, or, failing that, you must accept last-one-in-wins behavior. commute allows for more concurrency than ref-set.") + ("comp" . "(comp f1 f2 f3 & fs) Takes a set of functions and returns a fn that is the composition of those fns. The returned fn takes a variable number of args, applies the rightmost of fns to the args, the next fn (right-to-left) to the result, etc.") + ("comparator" . "(comparator pred) Returns an implementation of java.util.Comparator based upon pred.") + ("compare" . "(compare x y) Comparator. Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'greater than' y. Same as Java x.compareTo(y) except it also works for nil, and compares numbers and collections in a type-independent manner. x must implement Comparable") + ("compare-and-set!" . "(compare-and-set! atom oldval newval) Atomically sets the value of atom to newval if and only if the current value of the atom is identical to oldval. Returns true if set happened, else false") + ("compile" . "(compile lib) Compiles the namespace named by the symbol lib into a set of classfiles. The source for the lib must be in a proper classpath-relative directory. The output files will go into the directory specified by *compile-path*, and that directory too must be in the classpath.") + ("complement" . "(complement f) Takes a fn f and returns a fn that takes the same arguments as f, has the same effects, if any, and returns the opposite truth value.") + ("concat" . "(concat x y & zs) Returns a lazy seq representing the concatenation of the elements in the supplied colls.") + ("cond" . "(cond & clauses) Takes a set of test/expr pairs. It evaluates each test one at a time. If a test returns logical true, cond evaluates and returns the value of the corresponding expr and doesn't evaluate any of the other tests or exprs. (cond) returns nil.") + ("condp" . "(condp pred expr & clauses) Takes a binary predicate, an expression, and a set of clauses. Each clause can take the form of either: test-expr result-expr test-expr :>> result-fn Note :>> is an ordinary keyword. For each clause, (pred test-expr expr) is evaluated. If it returns logical true, the clause is a match. If a binary clause matches, the result-expr is returned, if a ternary clause matches, its result-fn, which must be a unary function, is called with the result of the predicate as its argument, the result of that call being the return value of condp. A single default expression can follow the clauses, and its value will be returned if no clause matches. If no default expression is provided and no clause matches, an IllegalArgumentException is thrown.") + ("conj" . "(conj coll x & xs) conj[oin]. Returns a new collection with the xs 'added'. (conj nil item) returns (item). The 'addition' may happen at different 'places' depending on the concrete type.") + ("conj!" . "(conj! coll x) Alpha - subject to change. Adds x to the transient collection, and return coll. The 'addition' may happen at different 'places' depending on the concrete type.") + ("cons" . "(cons x seq) Returns a new seq where x is the first element and seq is the rest.") + ("constantly" . "(constantly x) Returns a function that takes any number of arguments and returns x.") + ("construct-proxy" . "(construct-proxy c & ctor-args) Takes a proxy class and any arguments for its superclass ctor and creates and returns an instance of the proxy.") + ("contains?" . "(contains? coll key) Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or logarithmic time; it will not perform a linear search for a value. See also 'some'.") + ("count" . "(count coll) Returns the number of items in the collection. (count nil) returns 0. Also works on strings, arrays, and Java Collections and Maps") + ("counted?" . "(counted? coll) Returns true if coll implements count in constant time") + ("create-ns" . "(create-ns sym) Create a new namespace named by the symbol if one doesn't already exist, returns it or the already-existing namespace of the same name.") + ("create-struct" . "(create-struct & keys) Returns a structure basis object.") + ("cycle" . "(cycle coll) Returns a lazy (infinite!) sequence of repetitions of the items in coll.") + ("dec" . "(dec x) Returns a number one less than num. Does not auto-promote longs, will throw on overflow. See also: dec'") + ("dec'" . "(dec' x) Returns a number one less than num. Supports arbitrary precision. See also: dec") + ("decimal?" . "(decimal? n) Returns true if n is a BigDecimal") + ("declare" . "(declare & names) defs the supplied var names with no bindings, useful for making forward declarations.") + ("definline" . "(definline name & decl) Experimental - like defmacro, except defines a named function whose body is the expansion, calls to which may be expanded inline as if it were a macro. Cannot be used with variadic (&) args.") + ("defmacro" . "(defmacro name doc-string? attr-map? ([params*] body) + attr-map?) Like defn, but the resulting function name is declared as a macro and will be used as a macro by the compiler when it is called.") + ("defmethod" . "(defmethod multifn dispatch-val & fn-tail) Creates and installs a new method of multimethod associated with dispatch-value. ") + ("defmulti" . "(defmulti name docstring? attr-map? dispatch-fn & options) Creates a new multimethod with the associated dispatch function. The docstring and attribute-map are optional. Options are key-value pairs and may be one of: :default the default dispatch value, defaults to :default :hierarchy the isa? hierarchy to use for dispatching defaults to the global hierarchy") + ("defn" . "(defn name doc-string? attr-map? ([params*] prepost-map? body) + attr-map?) Same as (def name (fn [params* ] exprs*)) or (def name (fn ([params* ] exprs*)+)) with any doc-string or attrs added to the var metadata. prepost-map defines a map with optional keys :pre and :post that contain collections of pre or post conditions.") + ("defn-" . "(defn- name & decls) same as defn, yielding non-public def") + ("defonce" . "(defonce name expr) defs name to have the root value of the expr iff the named var has no root value, else expr is unevaluated") + ("defprotocol" . "(defprotocol name & opts+sigs) A protocol is a named set of named methods and their signatures: (defprotocol AProtocolName ;optional doc string \"A doc string for AProtocol abstraction\" ;method signatures (bar [this a b] \"bar docs\") (baz [this a] [this a b] [this a b c] \"baz docs\")) No implementations are provided. Docs can be specified for the protocol overall and for each method. The above yields a set of polymorphic functions and a protocol object. All are namespace-qualified by the ns enclosing the definition The resulting functions dispatch on the type of their first argument, which is required and corresponds to the implicit target object ('this' in Java parlance). defprotocol is dynamic, has no special compile-time effect, and defines no new types or classes. Implementations of the protocol methods can be provided using extend. defprotocol will automatically generate a corresponding interface, with the same name as the protocol, i.e. given a protocol: my.ns/Protocol, an interface: my.ns.Protocol. The interface will have methods corresponding to the protocol functions, and the protocol will automatically work with instances of the interface. Note that you should not use this interface with deftype or reify, as they support the protocol directly: (defprotocol P (foo [this]) (bar-me [this] [this y])) (deftype Foo [a b c] P (foo [this] a) (bar-me [this] b) (bar-me [this y] (+ c y))) (bar-me (Foo. 1 2 3) 42) => 45 (foo (let [x 42] (reify P (foo [this] 17) (bar-me [this] x) (bar-me [this y] x)))) => 17") + ("defrecord" . "(defrecord name [& fields] & opts+specs) Alpha - subject to change (defrecord name [fields*] options* specs*) Currently there are no options. Each spec consists of a protocol or interface name followed by zero or more method bodies: protocol-or-interface-or-Object (methodName [args*] body)* Dynamically generates compiled bytecode for class with the given name, in a package with the same name as the current namespace, the given fields, and, optionally, methods for protocols and/or interfaces. The class will have the (immutable) fields named by fields, which can have type hints. Protocols/interfaces and methods are optional. The only methods that can be supplied are those declared in the protocols/interfaces. Note that method bodies are not closures, the local environment includes only the named fields, and those fields can be accessed directy. Method definitions take the form: (methodname [args*] body) The argument and return types can be hinted on the arg and methodname symbols. If not supplied, they will be inferred, so type hints should be reserved for disambiguation. Methods should be supplied for all methods of the desired protocol(s) and interface(s). You can also define overrides for methods of Object. Note that a parameter must be supplied to correspond to the target object ('this' in Java parlance). Thus methods for interfaces will take one more argument than do the interface declarations. Note also that recur calls to the method head should *not* pass the target object, it will be supplied automatically and can not be substituted. In the method bodies, the (unqualified) name can be used to name the class (for calls to new, instance? etc). The class will have implementations of several (clojure.lang) interfaces generated automatically: IObj (metadata support) and IPersistentMap, and all of their superinterfaces. In addition, defrecord will define type-and-value-based =, and will defined Java .hashCode and .equals consistent with the contract for java.util.Map. When AOT compiling, generates compiled bytecode for a class with the given name (a symbol), prepends the current ns as the package, and writes the .class file to the *compile-path* directory. Two constructors will be defined, one taking the designated fields followed by a metadata map (nil for none) and an extension field map (nil for none), and one taking only the fields (using nil for meta and extension fields). Note that the field names __meta and __extmap are currently reserved and should not be used when defining your own records. Given (defrecord TypeName ...), two factory functions will be defined: ->TypeName, taking positional parameters for the fields, and map->TypeName, taking a map of keywords to field values.") + ("defstruct" . "(defstruct name & keys) Same as (def name (create-struct keys...))") + ("deftype" . "(deftype name [& fields] & opts+specs) Alpha - subject to change (deftype name [fields*] options* specs*) Currently there are no options. Each spec consists of a protocol or interface name followed by zero or more method bodies: protocol-or-interface-or-Object (methodName [args*] body)* Dynamically generates compiled bytecode for class with the given name, in a package with the same name as the current namespace, the given fields, and, optionally, methods for protocols and/or interfaces. The class will have the (by default, immutable) fields named by fields, which can have type hints. Protocols/interfaces and methods are optional. The only methods that can be supplied are those declared in the protocols/interfaces. Note that method bodies are not closures, the local environment includes only the named fields, and those fields can be accessed directy. Fields can be qualified with the metadata :volatile-mutable true or :unsynchronized-mutable true, at which point (set! afield aval) will be supported in method bodies. Note well that mutable fields are extremely difficult to use correctly, and are present only to facilitate the building of higher level constructs, such as Clojure's reference types, in Clojure itself. They are for experts only - if the semantics and implications of :volatile-mutable or :unsynchronized-mutable are not immediately apparent to you, you should not be using them. Method definitions take the form: (methodname [args*] body) The argument and return types can be hinted on the arg and methodname symbols. If not supplied, they will be inferred, so type hints should be reserved for disambiguation. Methods should be supplied for all methods of the desired protocol(s) and interface(s). You can also define overrides for methods of Object. Note that a parameter must be supplied to correspond to the target object ('this' in Java parlance). Thus methods for interfaces will take one more argument than do the interface declarations. Note also that recur calls to the method head should *not* pass the target object, it will be supplied automatically and can not be substituted. In the method bodies, the (unqualified) name can be used to name the class (for calls to new, instance? etc). When AOT compiling, generates compiled bytecode for a class with the given name (a symbol), prepends the current ns as the package, and writes the .class file to the *compile-path* directory. One constructor will be defined, taking the designated fields. Note that the field names __meta and __extmap are currently reserved and should not be used when defining your own types. Given (deftype TypeName ...), a factory function called ->TypeName will be defined, taking positional parameters for the fields") + ("delay" . "(delay & body) Takes a body of expressions and yields a Delay object that will invoke the body only the first time it is forced (with force or deref/@), and will cache the result and return it on all subsequent force calls. See also - realized?") + ("delay?" . "(delay? x) returns true if x is a Delay created with delay") + ("deliver" . "(deliver promise val) Alpha - subject to change. Delivers the supplied value to the promise, releasing any pending derefs. A subsequent call to deliver on a promise will throw an exception.") + ("denominator" . "(denominator r) Returns the denominator part of a Ratio.") + ("deref" . "(deref ref timeout-ms timeout-val) Also reader macro: @ref/@agent/@var/@atom/@delay/@future/@promise. Within a transaction, returns the in-transaction-value of ref, else returns the most-recently-committed value of ref. When applied to a var, agent or atom, returns its current state. When applied to a delay, forces it if not already forced. When applied to a future, will block if computation not complete. When applied to a promise, will block until a value is delivered. The variant taking a timeout can be used for blocking references (futures and promises), and will return timeout-val if the timeout (in milliseconds) is reached before a value is available. See also - realized?.") + ("derive" . "(derive h tag parent) Establishes a parent/child relationship between parent and tag. Parent must be a namespace-qualified symbol or keyword and child can be either a namespace-qualified symbol or keyword or a class. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to, and modifies, the global hierarchy.") + ("descendants" . "(descendants h tag) Returns the immediate and indirect children of tag, through a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy. Note: does not work on Java type inheritance relationships.") + ("disj" . "(disj set key & ks) disj[oin]. Returns a new set of the same (hashed/sorted) type, that does not contain key(s).") + ("disj!" . "(disj! set key & ks) Alpha - subject to change. disj[oin]. Returns a transient set of the same (hashed/sorted) type, that does not contain key(s).") + ("dissoc" . "(dissoc map key & ks) dissoc[iate]. Returns a new map of the same (hashed/sorted) type, that does not contain a mapping for key(s).") + ("dissoc!" . "(dissoc! map key & ks) Alpha - subject to change. Returns a transient map that doesn't contain a mapping for key(s).") + ("distinct" . "(distinct coll) Returns a lazy sequence of the elements of coll with duplicates removed") + ("distinct?" . "(distinct? x y & more) Returns true if no two of the arguments are =") + ("doall" . "(doall n coll) When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. doall can be used to force any effects. Walks through the successive nexts of the seq, retains the head and returns it, thus causing the entire seq to reside in memory at one time.") + ("dorun" . "(dorun n coll) When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. dorun can be used to force any effects. Walks through the successive nexts of the seq, does not retain the head and returns nil.") + ("doseq" . "(doseq seq-exprs & body) Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by \"for\". Does not retain the head of the sequence. Returns nil.") + ("dosync" . "(dosync & exprs) Runs the exprs (in an implicit do) in a transaction that encompasses exprs and any nested calls. Starts a transaction if none is already running on this thread. Any uncaught exception will abort the transaction and flow out of dosync. The exprs may be run more than once, but any effects on Refs will be atomic.") + ("dotimes" . "(dotimes bindings & body) bindings => name n Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 through n-1.") + ("doto" . "(doto x & forms) Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given arguments. The forms are evaluated in order. Returns x. (doto (new java.util.HashMap) (.put \"a\" 1) (.put \"b\" 2))") + ("double" . "(double x) Coerce to double") + ("double-array" . "(double-array size init-val-or-seq) Creates an array of doubles") + ("doubles" . "(doubles xs) Casts to double[]") + ("drop" . "(drop n coll) Returns a lazy sequence of all but the first n items in coll.") + ("drop-last" . "(drop-last n s) Return a lazy sequence of all but the last n (default 1) items in coll") + ("drop-while" . "(drop-while pred coll) Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns logical false.") + ("empty" . "(empty coll) Returns an empty collection of the same category as coll, or nil") + ("empty?" . "(empty? coll) Returns true if coll has no items - same as (not (seq coll)). Please use the idiom (seq x) rather than (not (empty? x))") + ("ensure" . "(ensure ref) Must be called in a transaction. Protects the ref from modification by other transactions. Returns the in-transaction-value of ref. Allows for more concurrency than (ref-set ref @ref)") + ("enumeration-seq" . "(enumeration-seq e) Returns a seq on a java.util.Enumeration") + ("error-handler" . "(error-handler a) Returns the error-handler of agent a, or nil if there is none. See set-error-handler!") + ("error-mode" . "(error-mode a) Returns the error-mode of agent a. See set-error-mode!") + ("eval" . "(eval form) Evaluates the form data structure (not text!) and returns the result.") + ("even?" . "(even? n) Returns true if n is even, throws an exception if n is not an integer") + ("every-pred" . "(every-pred p1 p2 p3 & ps) Takes a set of predicates and returns a function f that returns true if all of its composing predicates return a logical true value against all of its arguments, else it returns false. Note that f is short-circuiting in that it will stop execution on the first argument that triggers a logical false result against the original predicates.") + ("every?" . "(every? pred coll) Returns true if (pred x) is logical true for every x in coll, else false.") + ("ex-data" . "(ex-data ex) Alpha - subject to change. Returns exception data (a map) if ex is an ExceptionInfo. Otherwise returns nil.") + ("ex-info" . "(ex-info msg map cause) Alpha - subject to change. Create an instance of ExceptionInfo, a RuntimeException subclass that carries a map of additional data.") + ("extend" . "(extend atype & proto+mmaps) Implementations of protocol methods can be provided using the extend construct: (extend AType AProtocol {:foo an-existing-fn :bar (fn [a b] ...) :baz (fn ([a]...) ([a b] ...)...)} BProtocol {...} ...) extend takes a type/class (or interface, see below), and one or more protocol + method map pairs. It will extend the polymorphism of the protocol's methods to call the supplied methods when an AType is provided as the first argument. Method maps are maps of the keyword-ized method names to ordinary fns. This facilitates easy reuse of existing fns and fn maps, for code reuse/mixins without derivation or composition. You can extend an interface to a protocol. This is primarily to facilitate interop with the host (e.g. Java) but opens the door to incidental multiple inheritance of implementation since a class can inherit from more than one interface, both of which extend the protocol. It is TBD how to specify which impl to use. You can extend a protocol on nil. If you are supplying the definitions explicitly (i.e. not reusing exsting functions or mixin maps), you may find it more convenient to use the extend-type or extend-protocol macros. Note that multiple independent extend clauses can exist for the same type, not all protocols need be defined in a single extend call. See also: extends?, satisfies?, extenders") + ("extend-protocol" . "(extend-protocol p & specs) Useful when you want to provide several implementations of the same protocol all at once. Takes a single protocol and the implementation of that protocol for one or more types. Expands into calls to extend-type: (extend-protocol Protocol AType (foo [x] ...) (bar [x y] ...) BType (foo [x] ...) (bar [x y] ...) AClass (foo [x] ...) (bar [x y] ...) nil (foo [x] ...) (bar [x y] ...)) expands into: (do (clojure.core/extend-type AType Protocol (foo [x] ...) (bar [x y] ...)) (clojure.core/extend-type BType Protocol (foo [x] ...) (bar [x y] ...)) (clojure.core/extend-type AClass Protocol (foo [x] ...) (bar [x y] ...)) (clojure.core/extend-type nil Protocol (foo [x] ...) (bar [x y] ...)))") + ("extend-type" . "(extend-type t & specs) A macro that expands into an extend call. Useful when you are supplying the definitions explicitly inline, extend-type automatically creates the maps required by extend. Propagates the class as a type hint on the first argument of all fns. (extend-type MyType Countable (cnt [c] ...) Foo (bar [x y] ...) (baz ([x] ...) ([x y & zs] ...))) expands into: (extend MyType Countable {:cnt (fn [c] ...)} Foo {:baz (fn ([x] ...) ([x y & zs] ...)) :bar (fn [x y] ...)})") + ("extenders" . "(extenders protocol) Returns a collection of the types explicitly extending protocol") + ("extends?" . "(extends? protocol atype) Returns true if atype extends protocol") + ("false?" . "(false? x) Returns true if x is the value false, false otherwise.") + ("ffirst" . "(ffirst x) Same as (first (first x))") + ("file-seq" . "(file-seq dir) A tree seq on java.io.Files") + ("filter" . "(filter pred coll) Returns a lazy sequence of the items in coll for which (pred item) returns true. pred must be free of side-effects.") + ("filterv" . "(filterv pred coll) Returns a vector of the items in coll for which (pred item) returns true. pred must be free of side-effects.") + ("find" . "(find map key) Returns the map entry for key, or nil if key not present.") + ("find-keyword" . "(find-keyword ns name) Returns a Keyword with the given namespace and name if one already exists. This function will not intern a new keyword. If the keyword has not already been interned, it will return nil. Do not use : in the keyword strings, it will be added automatically.") + ("find-ns" . "(find-ns sym) Returns the namespace named by the symbol or nil if it doesn't exist.") + ("find-var" . "(find-var sym) Returns the global var named by the namespace-qualified symbol, or nil if no var with that name.") + ("first" . "(first coll) Returns the first item in the collection. Calls seq on its argument. If coll is nil, returns nil.") + ("flatten" . "(flatten x) Takes any nested combination of sequential things (lists, vectors, etc.) and returns their contents as a single, flat sequence. (flatten nil) returns an empty sequence.") + ("float" . "(float x) Coerce to float") + ("float-array" . "(float-array size init-val-or-seq) Creates an array of floats") + ("float?" . "(float? n) Returns true if n is a floating point number") + ("floats" . "(floats xs) Casts to float[]") + ("flush)" . "(flush) Flushes the output stream that is the current value of *out*") + ("fn" . "(fn & sigs) params => positional-params* , or positional-params* & next-param positional-param => binding-form next-param => binding-form name => symbol Defines a function") + ("fn?" . "(fn? x) Returns true if x implements Fn, i.e. is an object created via fn.") + ("fnext" . "(fnext x) Same as (first (next x))") + ("fnil" . "(fnil f x y z) Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. Higher arity versions can replace arguments in the second and third positions (y, z). Note that the function f can take any number of arguments, not just the one(s) being nil-patched.") + ("for" . "(for seq-exprs body-expr) List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more modifiers, and yields a lazy sequence of evaluations of expr. Collections are iterated in a nested fashion, rightmost fastest, and nested coll-exprs can refer to bindings created in prior binding-forms. Supported modifiers are: :let [binding-form expr ...], :while test, :when test. (take 100 (for [x (range 100000000) y (range 1000000) :while (< y x)] [x y]))") + ("force" . "(force x) If x is a Delay, returns the (possibly cached) value of its expression, else returns x") + ("format" . "(format fmt & args) Formats a string using java.lang.String.format, see java.util.Formatter for format string syntax") + ("frequencies" . "(frequencies coll) Returns a map from distinct items in coll to the number of times they appear.") + ("future" . "(future & body) Takes a body of expressions and yields a future object that will invoke the body in another thread, and will cache the result and return it on all subsequent calls to deref/@. If the computation has not yet finished, calls to deref/@ will block, unless the variant of deref with timeout is used. See also - realized?.") + ("future-call" . "(future-call f) Takes a function of no args and yields a future object that will invoke the function in another thread, and will cache the result and return it on all subsequent calls to deref/@. If the computation has not yet finished, calls to deref/@ will block, unless the variant of deref with timeout is used. See also - realized?.") + ("future-cancel" . "(future-cancel f) Cancels the future, if possible.") + ("future-cancelled?" . "(future-cancelled? f) Returns true if future f is cancelled") + ("future-done?" . "(future-done? f) Returns true if future f is done") + ("future?" . "(future? x) Returns true if x is a future") + ("gen-class" . "(gen-class & options) When compiling, generates compiled bytecode for a class with the given package-qualified :name (which, as all names in these parameters, can be a string or symbol), and writes the .class file to the *compile-path* directory. When not compiling, does nothing. The gen-class construct contains no implementation, as the implementation will be dynamically sought by the generated class in functions in an implementing Clojure namespace. Given a generated class org.mydomain.MyClass with a method named mymethod, gen-class will generate an implementation that looks for a function named by (str prefix mymethod) (default prefix: \"-\") in a Clojure namespace specified by :impl-ns (defaults to the current namespace). All inherited methods, generated methods, and init and main functions (see :methods, :init, and :main below) will be found similarly prefixed. By default, the static initializer for the generated class will attempt to load the Clojure support code for the class as a resource from the classpath, e.g. in the example case, ``org/mydomain/MyClass__init.class``. This behavior can be controlled by :load-impl-ns Note that methods with a maximum of 18 parameters are supported. In all subsequent sections taking types, the primitive types can be referred to by their Java names (int, float etc), and classes in the java.lang package can be used without a package qualifier. All other classes must be fully qualified. Options should be a set of key/value pairs, all except for :name are optional: :name aname The package-qualified name of the class to be generated :extends aclass Specifies the superclass, the non-private methods of which will be overridden by the class. If not provided, defaults to Object. :implements [interface ...] One or more interfaces, the methods of which will be implemented by the class. :init name If supplied, names a function that will be called with the arguments to the constructor. Must return [ [superclass-constructor-args] state] If not supplied, the constructor args are passed directly to the superclass constructor and the state will be nil :constructors {[param-types] [super-param-types], ...} By default, constructors are created for the generated class which match the signature(s) of the constructors for the superclass. This parameter may be used to explicitly specify constructors, each entry providing a mapping from a constructor signature to a superclass constructor signature. When you supply this, you must supply an :init specifier. :post-init name If supplied, names a function that will be called with the object as the first argument, followed by the arguments to the constructor. It will be called every time an object of this class is created, immediately after all the inherited constructors have completed. It's return value is ignored. :methods [ [name [param-types] return-type], ...] The generated class automatically defines all of the non-private methods of its superclasses/interfaces. This parameter can be used to specify the signatures of additional methods of the generated class. Static methods can be specified with ^{:static true} in the signature's metadata. Do not repeat superclass/interface signatures here. :main boolean If supplied and true, a static public main function will be generated. It will pass each string of the String[] argument as a separate argument to a function called (str prefix main). :factory name If supplied, a (set of) public static factory function(s) will be created with the given name, and the same signature(s) as the constructor(s). :state name If supplied, a public final instance field with the given name will be created. You must supply an :init function in order to provide a value for the state. Note that, though final, the state can be a ref or agent, supporting the creation of Java objects with transactional or asynchronous mutation semantics. :exposes {protected-field-name {:get name :set name}, ...} Since the implementations of the methods of the generated class occur in Clojure functions, they have no access to the inherited protected fields of the superclass. This parameter can be used to generate public getter/setter methods exposing the protected field(s) for use in the implementation. :exposes-methods {super-method-name exposed-name, ...} It is sometimes necessary to call the superclass' implementation of an overridden method. Those methods may be exposed and referred in the new method implementation by a local name. :prefix string Default: \"-\" Methods called e.g. Foo will be looked up in vars called prefixFoo in the implementing ns. :impl-ns name Default: the name of the current ns. Implementations of methods will be looked up in this namespace. :load-impl-ns boolean Default: true. Causes the static initializer for the generated class to reference the load code for the implementing namespace. Should be true when implementing-ns is the default, false if you intend to load the code via some other method.") + ("gen-interface" . "(gen-interface & options) When compiling, generates compiled bytecode for an interface with the given package-qualified :name (which, as all names in these parameters, can be a string or symbol), and writes the .class file to the *compile-path* directory. When not compiling, does nothing. In all subsequent sections taking types, the primitive types can be referred to by their Java names (int, float etc), and classes in the java.lang package can be used without a package qualifier. All other classes must be fully qualified. Options should be a set of key/value pairs, all except for :name are optional: :name aname The package-qualified name of the class to be generated :extends [interface ...] One or more interfaces, which will be extended by this interface. :methods [ [name [param-types] return-type], ...] This parameter is used to specify the signatures of the methods of the generated interface. Do not repeat superinterface signatures here.") + ("gensym" . "(gensym prefix-string) Returns a new symbol with a unique name. If a prefix string is supplied, the name is prefix# where # is some unique number. If prefix is not supplied, the prefix is 'G__'.") + ("get" . "(get map key not-found) Returns the value mapped to key, not-found or nil if key not present.") + ("get-in" . "(get-in m ks not-found) Returns the value in a nested associative structure, where ks is a sequence of keys. Returns nil if the key is not present, or the not-found value if supplied.") + ("get-method" . "(get-method multifn dispatch-val) Given a multimethod and a dispatch value, returns the dispatch fn that would apply to that value, or nil if none apply and no default") + ("get-proxy-class" . "(get-proxy-class & bases) Takes an optional single class followed by zero or more interfaces. If not supplied class defaults to Object. Creates an returns an instance of a proxy class derived from the supplied classes. The resulting value is cached and used for any subsequent requests for the same class set. Returns a Class object.") + ("get-thread-bindings)" . "(get-thread-bindings) Get a map with the Var/value pairs which is currently in effect for the current thread.") + ("get-validator" . "(get-validator iref) Gets the validator-fn for a var/ref/agent/atom.") + ("group-by" . "(group-by f coll) Returns a map of the elements of coll keyed by the result of f on each element. The value at each key will be a vector of the corresponding elements, in the order they appeared in coll.") + ("hash" . "(hash x) Returns the hash code of its argument. Note this is the hash code consistent with =, and thus is different than .hashCode for Integer, Short, Byte and Clojure collections.") + ("hash-map" . "(hash-map & keyvals) keyval => key val Returns a new hash map with supplied mappings.") + ("hash-set" . "(hash-set & keys) Returns a new hash set with supplied keys.") + ("identical?" . "(identical? x y) Tests if 2 arguments are the same object") + ("identity" . "(identity x) Returns its argument.") + ("if-let" . "(if-let bindings then else & oldform) bindings => binding-form test If test is true, evaluates then with binding-form bound to the value of test, if not, yields else") + ("if-not" . "(if-not test then else) Evaluates test. If logical false, evaluates and returns then expr, otherwise else expr, if supplied, else nil.") + ("ifn?" . "(ifn? x) Returns true if x implements IFn. Note that many data structures (e.g. sets and maps) implement IFn") + ("import" . "(import & import-symbols-or-lists) import-list => (package-symbol class-name-symbols*) For each name in class-name-symbols, adds a mapping from name to the class named by package.name to the current namespace. Use :import in the ns macro in preference to calling this directly.") + ("in-ns" . "(in-ns name) Sets *ns* to the namespace named by the symbol, creating it if needed.") + ("inc" . "(inc x) Returns a number one greater than num. Does not auto-promote longs, will throw on overflow. See also: inc'") + ("inc'" . "(inc' x) Returns a number one greater than num. Supports arbitrary precision. See also: inc") + ("init-proxy" . "(init-proxy proxy mappings) Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces) to fns (which must take arguments matching the corresponding method, plus an additional (explicit) first arg corresponding to this, and sets the proxy's fn map. Returns the proxy.") + ("instance?" . "(instance? c x) Evaluates x and tests if it is an instance of the class c. Returns true or false") + ("int" . "(int x) Coerce to int") + ("int-array" . "(int-array size init-val-or-seq) Creates an array of ints") + ("integer?" . "(integer? n) Returns true if n is an integer") + ("interleave" . "(interleave c1 c2 & colls) Returns a lazy seq of the first item in each coll, then the second etc.") + ("intern" . "(intern ns name val) Finds or creates a var named by the symbol name in the namespace ns (which can be a symbol or a namespace), setting its root binding to val if supplied. The namespace must exist. The var will adopt any metadata from the name symbol. Returns the var.") + ("interpose" . "(interpose sep coll) Returns a lazy seq of the elements of coll separated by sep") + ("into" . "(into to from) Returns a new coll consisting of to-coll with all of the items of from-coll conjoined.") + ("into-array" . "(into-array type aseq) Returns an array with components set to the values in aseq. The array's component type is type if provided, or the type of the first value in aseq if present, or Object. All values in aseq must be compatible with the component type. Class objects for the primitive types can be obtained using, e.g., Integer/TYPE.") + ("ints" . "(ints xs) Casts to int[]") + ("io!" . "(io! & body) If an io! block occurs in a transaction, throws an IllegalStateException, else runs body in an implicit do. If the first expression in body is a literal string, will use that as the exception message.") + ("isa?" . "(isa? h child parent) Returns true if (= child parent), or child is directly or indirectly derived from parent, either via a Java type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy") + ("iterate" . "(iterate f x) Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects") + ("iterator-seq" . "(iterator-seq iter) Returns a seq on a java.util.Iterator. Note that most collections providing iterators implement Iterable and thus support seq directly.") + ("juxt" . "(juxt f g h & fs) Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applying each fn to the args (left-to-right). ((juxt a b c) x) => [(a x) (b x) (c x)]") + ("keep" . "(keep f coll) Returns a lazy sequence of the non-nil results of (f item). Note, this means false return values will be included. f must be free of side-effects.") + ("keep-indexed" . "(keep-indexed f coll) Returns a lazy sequence of the non-nil results of (f index item). Note, this means false return values will be included. f must be free of side-effects.") + ("key" . "(key e) Returns the key of the map entry.") + ("keys" . "(keys map) Returns a sequence of the map's keys.") + ("keyword" . "(keyword ns name) Returns a Keyword with the given namespace and name. Do not use : in the keyword strings, it will be added automatically.") + ("keyword?" . "(keyword? x) Return true if x is a Keyword") + ("last" . "(last coll) Return the last item in coll, in linear time") + ("lazy-cat" . "(lazy-cat & colls) Expands to code which yields a lazy sequence of the concatenation of the supplied colls. Each coll expr is not evaluated until it is needed. (lazy-cat xs ys zs) === (concat (lazy-seq xs) (lazy-seq ys) (lazy-seq zs))") + ("lazy-seq" . "(lazy-seq & body) Takes a body of expressions that returns an ISeq or nil, and yields a Seqable object that will invoke the body only the first time seq is called, and will cache the result and return it on all subsequent seq calls. See also - realized?") + ("let" . "(let bindings & body) binding => binding-form init-expr Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-exprs or parts therein.") + ("letfn" . "(letfn fnspecs & body) fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+) Takes a vector of function specs and a body, and generates a set of bindings of functions to their names. All of the names are available in all of the definitions of the functions, as well as the body.") + ("line-seq" . "(line-seq rdr) Returns the lines of text from rdr as a lazy sequence of strings. rdr must implement java.io.BufferedReader.") + ("list" . "(list & items) Creates a new list containing the items.") + ("list*" . "(list* a b c d & more) Creates a new list containing the items prepended to the rest, the last of which will be treated as a sequence.") + ("list?" . "(list? x) Returns true if x implements IPersistentList") + ("load" . "(load & paths) Loads Clojure code from resources in classpath. A path is interpreted as classpath-relative if it begins with a slash or relative to the root directory for the current namespace otherwise.") + ("load-file" . "(load-file name) Sequentially read and evaluate the set of forms contained in the file.") + ("load-reader" . "(load-reader rdr) Sequentially read and evaluate the set of forms contained in the stream/file") + ("load-string" . "(load-string s) Sequentially read and evaluate the set of forms contained in the string") + ("loaded-libs)" . "(loaded-libs) Returns a sorted set of symbols naming the currently loaded libs") + ("locking" . "(locking x & body) Executes exprs in an implicit do, while holding the monitor of x. Will release the monitor of x in all circumstances.") + ("long" . "(long x) Coerce to long") + ("long-array" . "(long-array size init-val-or-seq) Creates an array of longs") + ("longs" . "(longs xs) Casts to long[]") + ("loop" . "(loop bindings & body) Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-exprs or parts therein. Acts as a recur target.") + ("macroexpand" . "(macroexpand form) Repeatedly calls macroexpand-1 on form until it no longer represents a macro form, then returns it. Note neither macroexpand-1 nor macroexpand expand macros in subforms.") + ("macroexpand-1" . "(macroexpand-1 form) If form represents a macro form, returns its expansion, else returns form.") + ("make-array" . "(make-array type dim & more-dims) Creates and returns an array of instances of the specified class of the specified dimension(s). Note that a class object is required. Class objects can be obtained by using their imported or fully-qualified name. Class objects for the primitive types can be obtained using, e.g., Integer/TYPE.") + ("make-hierarchy)" . "(make-hierarchy) Creates a hierarchy object for use with derive, isa? etc.") + ("map" . "(map f c1 c2 c3 & colls) Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments.") + ("map-indexed" . "(map-indexed f coll) Returns a lazy sequence consisting of the result of applying f to 0 and the first item of coll, followed by applying f to 1 and the second item in coll, etc, until coll is exhausted. Thus function f should accept 2 arguments, index and item.") + ("map?" . "(map? x) Return true if x implements IPersistentMap") + ("mapcat" . "(mapcat f & colls) Returns the result of applying concat to the result of applying map to f and colls. Thus function f should return a collection.") + ("mapv" . "(mapv f c1 c2 c3 & colls) Returns a vector consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments.") + ("max" . "(max x y & more) Returns the greatest of the nums.") + ("max-key" . "(max-key k x y & more) Returns the x for which (k x), a number, is greatest.") + ("memfn" . "(memfn name & args) Expands into code that creates a fn that expects to be passed an object and any args and calls the named instance method on the object passing the args. Use when you want to treat a Java method as a first-class fn.") + ("memoize" . "(memoize f) Returns a memoized version of a referentially transparent function. The memoized version of the function keeps a cache of the mapping from arguments to results and, when calls with the same arguments are repeated often, has higher performance at the expense of higher memory use.") + ("merge" . "(merge & maps) Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping from the latter (left-to-right) will be the mapping in the result.") + ("merge-with" . "(merge-with f & maps) Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping(s) from the latter (left-to-right) will be combined with the mapping in the result by calling (f val-in-result val-in-latter).") + ("meta" . "(meta obj) Returns the metadata of obj, returns nil if there is no metadata.") + ("methods" . "(methods multifn) Given a multimethod, returns a map of dispatch values -> dispatch fns") + ("min" . "(min x y & more) Returns the least of the nums.") + ("min-key" . "(min-key k x y & more) Returns the x for which (k x), a number, is least.") + ("mod" . "(mod num div) Modulus of num and div. Truncates toward negative infinity.") + ("name" . "(name x) Returns the name String of a string, symbol or keyword.") + ("namespace" . "(namespace x) Returns the namespace String of a symbol or keyword, or nil if not present.") + ("namespace-munge" . "(namespace-munge ns) Convert a Clojure namespace name to a legal Java package name.") + ("neg?" . "(neg? x) Returns true if num is less than zero, else false") + ("newline)" . "(newline) Writes a platform-specific newline to *out*") + ("next" . "(next coll) Returns a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil.") + ("nfirst" . "(nfirst x) Same as (next (first x))") + ("nil?" . "(nil? x) Returns true if x is nil, false otherwise.") + ("nnext" . "(nnext x) Same as (next (next x))") + ("not" . "(not x) Returns true if x is logical false, false otherwise.") + ("not-any?" . "(not-any? pred coll) Returns false if (pred x) is logical true for any x in coll, else true.") + ("not-empty" . "(not-empty coll) If coll is empty, returns nil, else coll") + ("not-every?" . "(not-every? pred coll) Returns false if (pred x) is logical true for every x in coll, else true.") + ("not=" . "(not= x y & more) Same as (not (= obj1 obj2))") + ("ns" . "(ns name docstring? attr-map? references*) Sets *ns* to the namespace named by name (unevaluated), creating it if needed. references can be zero or more of: (:refer-clojure ...) (:require ...) (:use ...) (:import ...) (:load ...) (:gen-class) with the syntax of refer-clojure/require/use/import/load/gen-class respectively, except the arguments are unevaluated and need not be quoted. (:gen-class ...), when supplied, defaults to :name corresponding to the ns name, :main true, :impl-ns same as ns, and :init-impl-ns true. All options of gen-class are supported. The :gen-class directive is ignored when not compiling. If :gen-class is not supplied, when compiled only an nsname__init.class will be generated. If :refer-clojure is not used, a default (refer 'clojure) is used. Use of ns is preferred to individual calls to in-ns/require/use/import: (ns foo.bar (:refer-clojure :exclude [ancestors printf]) (:require (clojure.contrib sql combinatorics)) (:use (my.lib this that)) (:import (java.util Date Timer Random) (java.sql Connection Statement)))") + ("ns-aliases" . "(ns-aliases ns) Returns a map of the aliases for the namespace.") + ("ns-imports" . "(ns-imports ns) Returns a map of the import mappings for the namespace.") + ("ns-interns" . "(ns-interns ns) Returns a map of the intern mappings for the namespace.") + ("ns-map" . "(ns-map ns) Returns a map of all the mappings for the namespace.") + ("ns-name" . "(ns-name ns) Returns the name of the namespace, a symbol.") + ("ns-publics" . "(ns-publics ns) Returns a map of the public intern mappings for the namespace.") + ("ns-refers" . "(ns-refers ns) Returns a map of the refer mappings for the namespace.") + ("ns-resolve" . "(ns-resolve ns env sym) Returns the var or Class to which a symbol will be resolved in the namespace (unless found in the environement), else nil. Note that if the symbol is fully qualified, the var/Class to which it resolves need not be present in the namespace.") + ("ns-unalias" . "(ns-unalias ns sym) Removes the alias for the symbol from the namespace.") + ("ns-unmap" . "(ns-unmap ns sym) Removes the mappings for the symbol from the namespace.") + ("nth" . "(nth coll index not-found) Returns the value at the index. get returns nil if index out of bounds, nth throws an exception unless not-found is supplied. nth also works for strings, Java arrays, regex Matchers and Lists, and, in O(n) time, for sequences.") + ("nthnext" . "(nthnext coll n) Returns the nth next of coll, (seq coll) when n is 0.") + ("nthrest" . "(nthrest coll n) Returns the nth rest of coll, coll when n is 0.") + ("num" . "(num x) Coerce to Number") + ("number?" . "(number? x) Returns true if x is a Number") + ("numerator" . "(numerator r) Returns the numerator part of a Ratio.") + ("object-array" . "(object-array size-or-seq) Creates an array of objects") + ("odd?" . "(odd? n) Returns true if n is odd, throws an exception if n is not an integer") + ("or" . "(or x & next) Evaluates exprs one at a time, from left to right. If a form returns a logical true value, or returns that value and doesn't evaluate any of the other expressions, otherwise it returns the value of the last expression. (or) returns nil.") + ("parents" . "(parents h tag) Returns the immediate parents of tag, either via a Java type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy") + ("partial" . "(partial f arg1 arg2 arg3 & more) Takes a function f and fewer than the normal arguments to f, and returns a fn that takes a variable number of additional args. When called, the returned function calls f with args + additional args.") + ("partition" . "(partition n step pad coll) Returns a lazy sequence of lists of n items each, at offsets step apart. If step is not supplied, defaults to n, i.e. the partitions do not overlap. If a pad collection is supplied, use its elements as necessary to complete last partition upto n items. In case there are not enough padding elements, return a partition with less than n items.") + ("partition-all" . "(partition-all n step coll) Returns a lazy sequence of lists like partition, but may include partitions with fewer than n items at the end.") + ("partition-by" . "(partition-by f coll) Applies f to each value in coll, splitting it each time f returns a new value. Returns a lazy seq of partitions.") + ("pcalls" . "(pcalls & fns) Executes the no-arg fns in parallel, returning a lazy sequence of their values") + ("peek" . "(peek coll) For a list or queue, same as first, for a vector, same as, but much more efficient than, last. If the collection is empty, returns nil.") + ("persistent!" . "(persistent! coll) Alpha - subject to change. Returns a new, persistent version of the transient collection, in constant time. The transient collection cannot be used after this call, any such use will throw an exception.") + ("pmap" . "(pmap f coll & colls) Like map, except f is applied in parallel. Semi-lazy in that the parallel computation stays ahead of the consumption, but doesn't realize the entire result unless required. Only useful for computationally intensive functions where the time of f dominates the coordination overhead.") + ("pop" . "(pop coll) For a list or queue, returns a new list/queue without the first item, for a vector, returns a new vector without the last item. If the collection is empty, throws an exception. Note - not the same as next/butlast.") + ("pop!" . "(pop! coll) Alpha - subject to change. Removes the last item from a transient vector. If the collection is empty, throws an exception. Returns coll") + ("pop-thread-bindings)" . "(pop-thread-bindings) Pop one set of bindings pushed with push-binding before. It is an error to pop bindings without pushing before.") + ("pos?" . "(pos? x) Returns true if num is greater than zero, else false") + ("pr" . "(pr x & more) Prints the object(s) to the output stream that is the current value of *out*. Prints the object(s), separated by spaces if there is more than one. By default, pr and prn print in a way that objects can be read by the reader") + ("pr-str" . "(pr-str & xs) pr to a string, returning it") + ("prefer-method" . "(prefer-method multifn dispatch-val-x dispatch-val-y) Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y when there is a conflict") + ("prefers" . "(prefers multifn) Given a multimethod, returns a map of preferred value -> set of other values") + ("print" . "(print & more) Prints the object(s) to the output stream that is the current value of *out*. print and println produce output for human consumption.") + ("print-str" . "(print-str & xs) print to a string, returning it") + ("printf" . "(printf fmt & args) Prints formatted output, as per format") + ("println" . "(println & more) Same as print followed by (newline)") + ("println-str" . "(println-str & xs) println to a string, returning it") + ("prn" . "(prn & more) Same as pr followed by (newline). Observes *flush-on-newline*") + ("prn-str" . "(prn-str & xs) prn to a string, returning it") + ("promise)" . "(promise) Alpha - subject to change. Returns a promise object that can be read with deref/@, and set, once only, with deliver. Calls to deref/@ prior to delivery will block, unless the variant of deref with timeout is used. All subsequent derefs will return the same delivered value without blocking. See also - realized?.") + ("proxy" . "(proxy class-and-interfaces args & fs) class-and-interfaces - a vector of class names args - a (possibly empty) vector of arguments to the superclass constructor. f => (name [params*] body) or (name ([params*] body) ([params+] body) ...) Expands to code which creates a instance of a proxy class that implements the named class/interface(s) by calling the supplied fns. A single class, if provided, must be first. If not provided it defaults to Object. The interfaces names must be valid interface types. If a method fn is not provided for a class method, the superclass methd will be called. If a method fn is not provided for an interface method, an UnsupportedOperationException will be thrown should it be called. Method fns are closures and can capture the environment in which proxy is called. Each method fn takes an additional implicit first arg, which is bound to 'this. Note that while method fns can be provided to override protected methods, they have no other access to protected members, nor to super, as these capabilities cannot be proxied.") + ("proxy-mappings" . "(proxy-mappings proxy) Takes a proxy instance and returns the proxy's fn map.") + ("proxy-super" . "(proxy-super meth & args) Use to call a superclass method in the body of a proxy method. Note, expansion captures 'this") + ("push-thread-bindings" . "(push-thread-bindings bindings) WARNING: This is a low-level function. Prefer high-level macros like binding where ever possible. Takes a map of Var/value pairs. Binds each Var to the associated value for the current thread. Each call *MUST* be accompanied by a matching call to pop-thread-bindings wrapped in a try-finally! (push-thread-bindings bindings) (try ... (finally (pop-thread-bindings)))") + ("pvalues" . "(pvalues & exprs) Returns a lazy sequence of the values of the exprs, which are evaluated in parallel") + ("quot" . "(quot num div) quot[ient] of dividing numerator by denominator.") + ("rand" . "(rand n) Returns a random floating point number between 0 (inclusive) and n (default 1) (exclusive).") + ("rand-int" . "(rand-int n) Returns a random integer between 0 (inclusive) and n (exclusive).") + ("rand-nth" . "(rand-nth coll) Return a random element of the (sequential) collection. Will have the same performance characteristics as nth for the given collection.") + ("range" . "(range start end step) Returns a lazy seq of nums from start (inclusive) to end (exclusive), by step, where start defaults to 0, step to 1, and end to infinity.") + ("ratio?" . "(ratio? n) Returns true if n is a Ratio") + ("rational?" . "(rational? n) Returns true if n is a rational number") + ("rationalize" . "(rationalize num) returns the rational value of num") + ("re-find" . "(re-find re s) Returns the next regex match, if any, of string to pattern, using java.util.regex.Matcher.find(). Uses re-groups to return the groups.") + ("re-groups" . "(re-groups m) Returns the groups from the most recent match/find. If there are no nested groups, returns a string of the entire match. If there are nested groups, returns a vector of the groups, the first element being the entire match.") + ("re-matcher" . "(re-matcher re s) Returns an instance of java.util.regex.Matcher, for use, e.g. in re-find.") + ("re-matches" . "(re-matches re s) Returns the match, if any, of string to pattern, using java.util.regex.Matcher.matches(). Uses re-groups to return the groups.") + ("re-pattern" . "(re-pattern s) Returns an instance of java.util.regex.Pattern, for use, e.g. in re-matcher.") + ("re-seq" . "(re-seq re s) Returns a lazy sequence of successive matches of pattern in string, using java.util.regex.Matcher.find(), each such match processed with re-groups.") + ("read" . "(read stream eof-error? eof-value recursive?) Reads the next object from stream, which must be an instance of java.io.PushbackReader or some derivee. stream defaults to the current value of *in* .") + ("read-line)" . "(read-line) Reads the next line from stream that is the current value of *in* .") + ("read-string" . "(read-string s) Reads one object from the string s") + ("realized?" . "(realized? x) Returns true if a value has been produced for a promise, delay, future or lazy sequence.") + ("reduce" . "(reduce f val coll) f should be a function of 2 arguments. If val is not supplied, returns the result of applying f to the first 2 items in coll, then applying f to that result and the 3rd item, etc. If coll contains no items, f must accept no arguments as well, and reduce returns the result of calling f with no arguments. If coll has only 1 item, it is returned and f is not called. If val is supplied, returns the result of applying f to val and the first item in coll, then applying f to that result and the 2nd item, etc. If coll contains no items, returns val and f is not called.") + ("reduce-kv" . "(reduce-kv f init coll) Reduces an associative collection. f should be a function of 3 arguments. Returns the result of applying f to init, the first key and the first value in coll, then applying f to that result and the 2nd key and value, etc. If coll contains no entries, returns init and f is not called. Note that reduce-kv is supported on vectors, where the keys will be the ordinals.") + ("reductions" . "(reductions f init coll) Returns a lazy seq of the intermediate values of the reduction (as per reduce) of coll by f, starting with init.") + ("ref" . "(ref x & options) Creates and returns a Ref with an initial value of x and zero or more options (in any order): :meta metadata-map :validator validate-fn :min-history (default 0) :max-history (default 10) If metadata-map is supplied, it will be come the metadata on the ref. validate-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validate-fn should return false or throw an exception. validate-fn will be called on transaction commit, when all refs have their final values. Normally refs accumulate history dynamically as needed to deal with read demands. If you know in advance you will need history you can set :min-history to ensure it will be available when first needed (instead of after a read fault). History is limited, and the limit can be set with :max-history.") + ("ref-history-count" . "(ref-history-count ref) Returns the history count of a ref") + ("ref-max-history" . "(ref-max-history ref n) Gets the max-history of a ref, or sets it and returns the ref") + ("ref-min-history" . "(ref-min-history ref n) Gets the min-history of a ref, or sets it and returns the ref") + ("ref-set" . "(ref-set ref val) Must be called in a transaction. Sets the value of ref. Returns val.") + ("refer" . "(refer ns-sym & filters) refers to all public vars of ns, subject to filters. filters can include at most one each of: :exclude list-of-symbols :only list-of-symbols :rename map-of-fromsymbol-tosymbol For each public interned var in the namespace named by the symbol, adds a mapping from the name of the var to the var to the current namespace. Throws an exception if name is already mapped to something else in the current namespace. Filters can be used to select a subset, via inclusion or exclusion, or to provide a mapping to a symbol different from the var's name, in order to prevent clashes. Use :use in the ns macro in preference to calling this directly.") + ("refer-clojure" . "(refer-clojure & filters) Same as (refer 'clojure.core )") + ("reify" . "(reify & opts+specs) reify is a macro with the following structure: (reify options* specs*) Currently there are no options. Each spec consists of the protocol or interface name followed by zero or more method bodies: protocol-or-interface-or-Object (methodName [args+] body)* Methods should be supplied for all methods of the desired protocol(s) and interface(s). You can also define overrides for methods of Object. Note that the first parameter must be supplied to correspond to the target object ('this' in Java parlance). Thus methods for interfaces will take one more argument than do the interface declarations. Note also that recur calls to the method head should *not* pass the target object, it will be supplied automatically and can not be substituted. The return type can be indicated by a type hint on the method name, and arg types can be indicated by a type hint on arg names. If you leave out all hints, reify will try to match on same name/arity method in the protocol(s)/interface(s) - this is preferred. If you supply any hints at all, no inference is done, so all hints (or default of Object) must be correct, for both arguments and return type. If a method is overloaded in a protocol/interface, multiple independent method definitions must be supplied. If overloaded with same arity in an interface you must specify complete hints to disambiguate - a missing hint implies Object. recur works to method heads The method bodies of reify are lexical closures, and can refer to the surrounding local scope: (str (let [f \"foo\"] (reify Object (toString [this] f)))) == \"foo\" (seq (let [f \"foo\"] (reify clojure.lang.Seqable (seq [this] (seq f))))) == (\f \o \o)) reify always implements clojure.lang.IObj and transfers meta data of the form to the created object. (meta ^{:k :v} (reify Object (toString [this] \"foo\"))) == {:k :v}") + ("release-pending-sends)" . "(release-pending-sends) Normally, actions sent directly or indirectly during another action are held until the action completes (changes the agent's state). This function can be used to dispatch any pending sent actions immediately. This has no impact on actions sent during a transaction, which are still held until commit. If no action is occurring, does nothing. Returns the number of actions dispatched.") + ("rem" . "(rem num div) remainder of dividing numerator by denominator.") + ("remove" . "(remove pred coll) Returns a lazy sequence of the items in coll for which (pred item) returns false. pred must be free of side-effects.") + ("remove-all-methods" . "(remove-all-methods multifn) Removes all of the methods of multimethod.") + ("remove-method" . "(remove-method multifn dispatch-val) Removes the method of multimethod associated with dispatch-value.") + ("remove-ns" . "(remove-ns sym) Removes the namespace named by the symbol. Use with caution. Cannot be used to remove the clojure namespace.") + ("remove-watch" . "(remove-watch reference key) Alpha - subject to change. Removes a watch (set by add-watch) from a reference") + ("repeat" . "(repeat n x) Returns a lazy (infinite!, or length n if supplied) sequence of xs.") + ("repeatedly" . "(repeatedly n f) Takes a function of no args, presumably with side effects, and returns an infinite (or length n if supplied) lazy sequence of calls to it") + ("replace" . "(replace smap coll) Given a map of replacement pairs and a vector/collection, returns a vector/seq with any elements = a key in smap replaced with the corresponding val in smap") + ("replicate" . "(replicate n x) DEPRECATED: Use 'repeat' instead. Returns a lazy seq of n xs.") + ("require" . "(require & args) Loads libs, skipping any that are already loaded. Each argument is either a libspec that identifies a lib, a prefix list that identifies multiple libs whose names share a common prefix, or a flag that modifies how all the identified libs are loaded. Use :require in the ns macro in preference to calling this directly. Libs A 'lib' is a named set of resources in classpath whose contents define a library of Clojure code. Lib names are symbols and each lib is associated with a Clojure namespace and a Java package that share its name. A lib's name also locates its root directory within classpath using Java's package name to classpath-relative path mapping. All resources in a lib should be contained in the directory structure under its root directory. All definitions a lib makes should be in its associated namespace. 'require loads a lib by loading its root resource. The root resource path is derived from the lib name in the following manner: Consider a lib named by the symbol 'x.y.z; it has the root directory /x/y/, and its root resource is /x/y/z.clj. The root resource should contain code to create the lib's namespace (usually by using the ns macro) and load any additional lib resources. Libspecs A libspec is a lib name or a vector containing a lib name followed by options expressed as sequential keywords and arguments. Recognized options: :as takes a symbol as its argument and makes that symbol an alias to the lib's namespace in the current namespace. :refer takes a list of symbols to refer from the namespace or the :all keyword to bring in all public vars. Prefix Lists It's common for Clojure code to depend on several libs whose names have the same prefix. When specifying libs, prefix lists can be used to reduce repetition. A prefix list contains the shared prefix followed by libspecs with the shared prefix removed from the lib names. After removing the prefix, the names that remain must not contain any periods. Flags A flag is a keyword. Recognized flags: :reload, :reload-all, :verbose :reload forces loading of all the identified libs even if they are already loaded :reload-all implies :reload and also forces loading of all libs that the identified libs directly or indirectly load via require or use :verbose triggers printing information about each load, alias, and refer Example: The following would load the libraries clojure.zip and clojure.set abbreviated as 's'. (require '(clojure zip [set :as s]))") + ("reset!" . "(reset! atom newval) Sets the value of atom to newval without regard for the current value. Returns newval.") + ("reset-meta!" . "(reset-meta! iref metadata-map) Atomically resets the metadata for a namespace/var/ref/agent/atom") + ("resolve" . "(resolve env sym) same as (ns-resolve *ns* symbol) or (ns-resolve *ns* &env symbol)") + ("rest" . "(rest coll) Returns a possibly empty seq of the items after the first. Calls seq on its argument.") + ("restart-agent" . "(restart-agent a new-state & options) When an agent is failed, changes the agent state to new-state and then un-fails the agent so that sends are allowed again. If a :clear-actions true option is given, any actions queued on the agent that were being held while it was failed will be discarded, otherwise those held actions will proceed. The new-state must pass the validator if any, or restart will throw an exception and the agent will remain failed with its old state and error. Watchers, if any, will NOT be notified of the new state. Throws an exception if the agent is not failed.") + ("resultset-seq" . "(resultset-seq rs) Creates and returns a lazy sequence of structmaps corresponding to the rows in the java.sql.ResultSet rs") + ("reverse" . "(reverse coll) Returns a seq of the items in coll in reverse order. Not lazy.") + ("reversible?" . "(reversible? coll) Returns true if coll implements Reversible") + ("rseq" . "(rseq rev) Returns, in constant time, a seq of the items in rev (which can be a vector or sorted-map), in reverse order. If rev is empty returns nil") + ("rsubseq" . "(rsubseq sc start-test start-key end-test end-key) sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a reverse seq of those entries with keys ek for which (test (.. sc comparator (compare ek key)) 0) is true") + ("satisfies?" . "(satisfies? protocol x) Returns true if x satisfies the protocol") + ("second" . "(second x) Same as (first (next x))") + ("select-keys" . "(select-keys map keyseq) Returns a map containing only those entries in map whose key is in keys") + ("send" . "(send a f & args) Dispatch an action to an agent. Returns the agent immediately. Subsequently, in a thread from a thread pool, the state of the agent will be set to the value of: (apply action-fn state-of-agent args)") + ("send-off" . "(send-off a f & args) Dispatch a potentially blocking action to an agent. Returns the agent immediately. Subsequently, in a separate thread, the state of the agent will be set to the value of: (apply action-fn state-of-agent args)") + ("seq" . "(seq coll) Returns a seq on the collection. If the collection is empty, returns nil. (seq nil) returns nil. seq also works on Strings, native Java arrays (of reference types) and any objects that implement Iterable.") + ("seq?" . "(seq? x) Return true if x implements ISeq") + ("seque" . "(seque n-or-q s) Creates a queued seq on another (presumably lazy) seq s. The queued seq will produce a concrete seq in the background, and can get up to n items ahead of the consumer. n-or-q can be an integer n buffer size, or an instance of java.util.concurrent BlockingQueue. Note that reading from a seque can block if the reader gets ahead of the producer.") + ("sequence" . "(sequence coll) Coerces coll to a (possibly empty) sequence, if it is not already one. Will not force a lazy seq. (sequence nil) yields ()") + ("sequential?" . "(sequential? coll) Returns true if coll implements Sequential") + ("set" . "(set coll) Returns a set of the distinct elements of coll.") + ("set-error-handler!" . "(set-error-handler! a handler-fn) Sets the error-handler of agent a to handler-fn. If an action being run by the agent throws an exception or doesn't pass the validator fn, handler-fn will be called with two arguments: the agent and the exception.") + ("set-error-mode!" . "(set-error-mode! a mode-keyword) Sets the error-mode of agent a to mode-keyword, which must be either :fail or :continue. If an action being run by the agent throws an exception or doesn't pass the validator fn, an error-handler may be called (see set-error-handler!), after which, if the mode is :continue, the agent will continue as if neither the action that caused the error nor the error itself ever happened. If the mode is :fail, the agent will become failed and will stop accepting new 'send' and 'send-off' actions, and any previously queued actions will be held until a 'restart-agent'. Deref will still work, returning the state of the agent before the error.") + ("set-validator!" . "(set-validator! iref validator-fn) Sets the validator-fn for a var/ref/agent/atom. validator-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validator-fn should return false or throw an exception. If the current state (root value if var) is not acceptable to the new validator, an exception will be thrown and the validator will not be changed.") + ("set?" . "(set? x) Returns true if x implements IPersistentSet") + ("short" . "(short x) Coerce to short") + ("short-array" . "(short-array size init-val-or-seq) Creates an array of shorts") + ("shorts" . "(shorts xs) Casts to shorts[]") + ("shuffle" . "(shuffle coll) Return a random permutation of coll") + ("shutdown-agents)" . "(shutdown-agents) Initiates a shutdown of the thread pools that back the agent system. Running actions will complete, but no new actions will be accepted") + ("slurp" . "(slurp f & opts) Opens a reader on f and reads all its contents, returning a string. See clojure.java.io/reader for a complete list of supported arguments.") + ("some" . "(some pred coll) Returns the first logical true value of (pred x) for any x in coll, else nil. One common idiom is to use a set as pred, for example this will return :fred if :fred is in the sequence, otherwise nil: (some #{:fred} coll)") + ("some-fn" . "(some-fn p1 p2 p3 & ps) Takes a set of predicates and returns a function f that returns the first logical true value returned by one of its composing predicates against any of its arguments, else it returns logical false. Note that f is short-circuiting in that it will stop execution on the first argument that triggers a logical true result against the original predicates.") + ("sort" . "(sort comp coll) Returns a sorted sequence of the items in coll. If no comparator is supplied, uses compare. comparator must implement java.util.Comparator.") + ("sort-by" . "(sort-by keyfn comp coll) Returns a sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item). If no comparator is supplied, uses compare. comparator must implement java.util.Comparator.") + ("sorted-map" . "(sorted-map & keyvals) keyval => key val Returns a new sorted map with supplied mappings.") + ("sorted-map-by" . "(sorted-map-by comparator & keyvals) keyval => key val Returns a new sorted map with supplied mappings, using the supplied comparator.") + ("sorted-set" . "(sorted-set & keys) Returns a new sorted set with supplied keys.") + ("sorted-set-by" . "(sorted-set-by comparator & keys) Returns a new sorted set with supplied keys, using the supplied comparator.") + ("sorted?" . "(sorted? coll) Returns true if coll implements Sorted") + ("special-symbol?" . "(special-symbol? s) Returns true if s names a special form") + ("spit" . "(spit f content & options) Opposite of slurp. Opens f with writer, writes content, then closes f. Options passed to clojure.java.io/writer.") + ("split-at" . "(split-at n coll) Returns a vector of [(take n coll) (drop n coll)]") + ("split-with" . "(split-with pred coll) Returns a vector of [(take-while pred coll) (drop-while pred coll)]") + ("str" . "(str x & ys) With no args, returns the empty string. With one arg x, returns x.toString(). (str nil) returns the empty string. With more than one arg, returns the concatenation of the str values of the args.") + ("string?" . "(string? x) Return true if x is a String") + ("struct" . "(struct s & vals) Returns a new structmap instance with the keys of the structure-basis. vals must be supplied for basis keys in order - where values are not supplied they will default to nil.") + ("struct-map" . "(struct-map s & inits) Returns a new structmap instance with the keys of the structure-basis. keyvals may contain all, some or none of the basis keys - where values are not supplied they will default to nil. keyvals can also contain keys not in the basis.") + ("subs" . "(subs s start end) Returns the substring of s beginning at start inclusive, and ending at end (defaults to length of string), exclusive.") + ("subseq" . "(subseq sc start-test start-key end-test end-key) sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a seq of those entries with keys ek for which (test (.. sc comparator (compare ek key)) 0) is true") + ("subvec" . "(subvec v start end) Returns a persistent vector of the items in vector from start (inclusive) to end (exclusive). If end is not supplied, defaults to (count vector). This operation is O(1) and very fast, as the resulting vector shares structure with the original and no trimming is done.") + ("supers" . "(supers class) Returns the immediate and indirect superclasses and interfaces of c, if any") + ("swap!" . "(swap! atom f x y & args) Atomically swaps the value of atom to be: (apply f current-value-of-atom args). Note that f may be called multiple times, and thus should be free of side effects. Returns the value that was swapped in.") + ("symbol" . "(symbol ns name) Returns a Symbol with the given namespace and name.") + ("symbol?" . "(symbol? x) Return true if x is a Symbol") + ("sync" . "(sync flags-ignored-for-now & body) transaction-flags => TBD, pass nil for now Runs the exprs (in an implicit do) in a transaction that encompasses exprs and any nested calls. Starts a transaction if none is already running on this thread. Any uncaught exception will abort the transaction and flow out of sync. The exprs may be run more than once, but any effects on Refs will be atomic.") + ("take" . "(take n coll) Returns a lazy sequence of the first n items in coll, or all items if there are fewer than n.") + ("take-last" . "(take-last n coll) Returns a seq of the last n items in coll. Depending on the type of coll may be no better than linear time. For vectors, see also subvec.") + ("take-nth" . "(take-nth n coll) Returns a lazy seq of every nth item in coll.") + ("take-while" . "(take-while pred coll) Returns a lazy sequence of successive items from coll while (pred item) returns true. pred must be free of side-effects.") + ("test" . "(test v) test [v] finds fn at key :test in var metadata and calls it, presuming failure will throw exception") + ("the-ns" . "(the-ns x) If passed a namespace, returns it. Else, when passed a symbol, returns the namespace named by it, throwing an exception if not found.") + ("thread-bound?" . "(thread-bound? & vars) Returns true if all of the vars provided as arguments have thread-local bindings. Implies that set!'ing the provided vars will succeed. Returns true if no vars are provided.") + ("time" . "(time expr) Evaluates expr and prints the time it took. Returns the value of expr.") + ("to-array" . "(to-array coll) Returns an array of Objects containing the contents of coll, which can be any Collection. Maps to java.util.Collection.toArray().") + ("to-array-2d" . "(to-array-2d coll) Returns a (potentially-ragged) 2-dimensional array of Objects containing the contents of coll, which can be any Collection of any Collection.") + ("trampoline" . "(trampoline f & args) trampoline can be used to convert algorithms requiring mutual recursion without stack consumption. Calls f with supplied args, if any. If f returns a fn, calls that fn with no arguments, and continues to repeat, until the return value is not a fn, then returns that non-fn value. Note that if you want to return a fn as a final value, you must wrap it in some data structure and unpack it after trampoline returns.") + ("transient" . "(transient coll) Alpha - subject to change. Returns a new, transient version of the collection, in constant time.") + ("tree-seq" . "(tree-seq branch? children root) Returns a lazy sequence of the nodes in a tree, via a depth-first walk. branch? must be a fn of one arg that returns true if passed a node that can have children (but may not). children must be a fn of one arg that returns a sequence of the children. Will only be called on nodes for which branch? returns true. Root is the root node of the tree.") + ("true?" . "(true? x) Returns true if x is the value true, false otherwise.") + ("type" . "(type x) Returns the :type metadata of x, or its Class if none") + ("unchecked-add" . "(unchecked-add x y) Returns the sum of x and y, both long. Note - uses a primitive operator subject to overflow.") + ("unchecked-add-int" . "(unchecked-add-int x y) Returns the sum of x and y, both int. Note - uses a primitive operator subject to overflow.") + ("unchecked-byte" . "(unchecked-byte x) Coerce to byte. Subject to rounding or truncation.") + ("unchecked-char" . "(unchecked-char x) Coerce to char. Subject to rounding or truncation.") + ("unchecked-dec" . "(unchecked-dec x) Returns a number one less than x, a long. Note - uses a primitive operator subject to overflow.") + ("unchecked-dec-int" . "(unchecked-dec-int x) Returns a number one less than x, an int. Note - uses a primitive operator subject to overflow.") + ("unchecked-divide-int" . "(unchecked-divide-int x y) Returns the division of x by y, both int. Note - uses a primitive operator subject to truncation.") + ("unchecked-double" . "(unchecked-double x) Coerce to double. Subject to rounding.") + ("unchecked-float" . "(unchecked-float x) Coerce to float. Subject to rounding.") + ("unchecked-inc" . "(unchecked-inc x) Returns a number one greater than x, a long. Note - uses a primitive operator subject to overflow.") + ("unchecked-inc-int" . "(unchecked-inc-int x) Returns a number one greater than x, an int. Note - uses a primitive operator subject to overflow.") + ("unchecked-int" . "(unchecked-int x) Coerce to int. Subject to rounding or truncation.") + ("unchecked-long" . "(unchecked-long x) Coerce to long. Subject to rounding or truncation.") + ("unchecked-multiply" . "(unchecked-multiply x y) Returns the product of x and y, both long. Note - uses a primitive operator subject to overflow.") + ("unchecked-multiply-int" . "(unchecked-multiply-int x y) Returns the product of x and y, both int. Note - uses a primitive operator subject to overflow.") + ("unchecked-negate" . "(unchecked-negate x) Returns the negation of x, a long. Note - uses a primitive operator subject to overflow.") + ("unchecked-negate-int" . "(unchecked-negate-int x) Returns the negation of x, an int. Note - uses a primitive operator subject to overflow.") + ("unchecked-remainder-int" . "(unchecked-remainder-int x y) Returns the remainder of division of x by y, both int. Note - uses a primitive operator subject to truncation.") + ("unchecked-short" . "(unchecked-short x) Coerce to short. Subject to rounding or truncation.") + ("unchecked-subtract" . "(unchecked-subtract x y) Returns the difference of x and y, both long. Note - uses a primitive operator subject to overflow.") + ("unchecked-subtract-int" . "(unchecked-subtract-int x y) Returns the difference of x and y, both int. Note - uses a primitive operator subject to overflow.") + ("underive" . "(underive h tag parent) Removes a parent/child relationship between parent and tag. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to, and modifies, the global hierarchy.") + ("update-in" . "(update-in m [k & ks] f & args) 'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, and returns a new nested structure. If any levels do not exist, hash-maps will be created.") + ("update-proxy" . "(update-proxy proxy mappings) Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces) to fns (which must take arguments matching the corresponding method, plus an additional (explicit) first arg corresponding to this, and updates (via assoc) the proxy's fn map. nil can be passed instead of a fn, in which case the corresponding method will revert to the default behavior. Note that this function can be used to update the behavior of an existing instance without changing its identity. Returns the proxy.") + ("use" . "(use & args) Like 'require, but also refers to each lib's namespace using clojure.core/refer. Use :use in the ns macro in preference to calling this directly. 'use accepts additional options in libspecs: :exclude, :only, :rename. The arguments and semantics for :exclude, :only, and :rename are the same as those documented for clojure.core/refer.") + ("val" . "(val e) Returns the value in the map entry.") + ("vals" . "(vals map) Returns a sequence of the map's values.") + ("var-get" . "(var-get x) Gets the value in the var object") + ("var-set" . "(var-set x val) Sets the value in the var object to val. The var must be thread-locally bound.") + ("var?" . "(var? v) Returns true if v is of type clojure.lang.Var") + ("vary-meta" . "(vary-meta obj f & args) Returns an object of the same type and value as obj, with (apply f (meta obj) args) as its metadata.") + ("vec" . "(vec coll) Creates a new vector containing the contents of coll.") + ("vector" . "(vector a b c d & args) Creates a new vector containing the args.") + ("vector-of" . "(vector-of t & elements) Creates a new vector of a single primitive type t, where t is one of :int :long :float :double :byte :short :char or :boolean. The resulting vector complies with the interface of vectors in general, but stores the values unboxed internally. Optionally takes one or more elements to populate the vector.") + ("vector?" . "(vector? x) Return true if x implements IPersistentVector") + ("when" . "(when test & body) Evaluates test. If logical true, evaluates body in an implicit do.") + ("when-first" . "(when-first bindings & body) bindings => x xs Same as (when (seq xs) (let [x (first xs)] body))") + ("when-let" . "(when-let bindings & body) bindings => binding-form test When test is true, evaluates body with binding-form bound to the value of test") + ("when-not" . "(when-not test & body) Evaluates test. If logical false, evaluates body in an implicit do.") + ("while" . "(while test & body) Repeatedly executes body while test expression is true. Presumes some side-effect will cause test to become false/nil. Returns nil") + ("with-bindings" . "(with-bindings binding-map & body) Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. The executes body. Pops the installed bindings after body was evaluated. Returns the value of body.") + ("with-bindings*" . "(with-bindings* binding-map f & args) Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. Then calls f with the supplied arguments. Pops the installed bindings after f returned. Returns whatever f returns.") + ("with-in-str" . "(with-in-str s & body) Evaluates body in a context in which *in* is bound to a fresh StringReader initialized with the string s.") + ("with-local-vars" . "(with-local-vars name-vals-vec & body) varbinding=> symbol init-expr Executes the exprs in a context in which the symbols are bound to vars with per-thread bindings to the init-exprs. The symbols refer to the var objects themselves, and must be accessed with var-get and var-set") + ("with-meta" . "(with-meta obj m) Returns an object of the same type and value as obj, with map m as its metadata.") + ("with-open" . "(with-open bindings & body) bindings => [name init ...] Evaluates body in a try expression with names bound to the values of the inits, and a finally clause that calls (.close name) on each name in reverse order.") + ("with-out-str" . "(with-out-str & body) Evaluates exprs in a context in which *out* is bound to a fresh StringWriter. Returns the string created by any nested printing calls.") + ("with-precision" . "(with-precision precision & exprs) Sets the precision and rounding mode to be used for BigDecimal operations. Usage: (with-precision 10 (/ 1M 3)) or: (with-precision 10 :rounding HALF_DOWN (/ 1M 3)) The rounding mode is one of CEILING, FLOOR, HALF_UP, HALF_DOWN, HALF_EVEN, UP, DOWN and UNNECESSARY; it defaults to HALF_UP.") + ("with-redefs" . "(with-redefs bindings & body) binding => var-symbol temp-value-expr Temporarily redefines Vars while executing the body. The temp-value-exprs will be evaluated and each resulting value will replace in parallel the root value of its Var. After the body is executed, the root values of all the Vars will be set back to their old values. These temporary changes will be visible in all threads. Useful for mocking out functions during testing.") + ("with-redefs-fn" . "(with-redefs-fn binding-map func) Temporarily redefines Vars during a call to func. Each val of binding-map will replace the root value of its key which must be a Var. After func is called with no args, the root values of all the Vars will be set back to their old values. These temporary changes will be visible in all threads. Useful for mocking out functions during testing.") + ("xml-seq" . "(xml-seq root) A tree seq on the xml elements as per xml/parse") + ("zero?" . "(zero? x) Returns true if num is zero, else false") + ("zipmap" . "(zipmap keys vals) Returns a map with the keys mapped to the corresponding vals."))) + +(defvar cljdoc-header "clojure.core ver 1.4.0") + +(defun get-cljdoc (symbol) + (concat cljdoc-header "\n\n" (cdr (assoc-string symbol cljdoc-alist)))) + +(defvar cljdoc-cache nil) + +(defun ac-cljdoc-init () + (setq cljdoc-cache (mapcar 'car cljdoc-alist))) + +(defvar ac-source-cljdoc + '((init . ac-cljdoc-init) + (candidates . cljdoc-cache) + (document . get-cljdoc) + (symbol . "s"))) + +(defun ac-clojure-mode-setup () + (setq ac-sources (append '(ac-source-cljdoc) ac-sources))) + +(add-hook 'clojure-mode-hook 'ac-clojure-mode-setup) + +(defun test-cljdoc () + (interactive) + (insert (format "%s" ac-sources))) + +(provide 'ac-clj) diff --git a/site-lisp/cljdoc/cljdoc.el b/site-lisp/cljdoc/cljdoc.el new file mode 100644 index 0000000..faf7991 --- /dev/null +++ b/site-lisp/cljdoc/cljdoc.el @@ -0,0 +1,592 @@ +;;; cljdoc.el --- eldoc mode for clojure + +;; Copyright (C) 2011 tomykaira + +;; Version 0.1.0 +;; Keywords: eldoc clojure +;; Author: tomykaira +;; URL: https://gist.github.com/1386472 + +;; This file is not part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program; if not, write to the Free Software +;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +;;; Installation + +;; Based on http://www.ne.jp/asahi/alpha/kazu/pub/emacs/phpdoc.el +;; document is scraped with https://gist.github.com/1386449 + +;;; Code: + +(require 'eldoc) +(require 'clojure-mode) + +(defun cljdoc-localize-documentation-function () + (set (make-local-variable 'eldoc-documentation-function) + 'cljdoc-message)) + +(defun cljdoc-message () + (if (slime-background-activities-enabled-p) + (progn + (when (slime-background-activities-enabled-p) + (slime-echo-arglist)) + nil) + (or (cljdoc-get-docstring (car (cljdoc-fnsym-in-current-sexp))) + (cljdoc-get-docstring (cljdoc-current-symbol))))) + +(defun cljdoc-current-symbol () + (let ((c (char-after (point)))) + (and c + (memq (char-syntax c) '(?w ?_)) + (current-word)))) + +(defun cljdoc-fnsym-in-current-sexp () + (save-excursion + (let ((argument-index (1- (eldoc-beginning-of-sexp)))) + ;; If we are at the beginning of function name, this will be -1. + (when (< argument-index 0) + (setq argument-index 0)) + ;; Don't do anything if current word is inside a string. + (if (= (or (char-after (1- (point))) 0) ?\") + nil + (list (cljdoc-current-symbol) argument-index))))) + +(defun cljdoc-get-docstring (sym) + (cdr (assoc-string sym cljdoc-alist))) + +(add-hook 'clojure-mode-hook 'cljdoc-localize-documentation-function) +(add-hook 'clojure-mode-hook 'eldoc-mode) + +(defvar cljdoc-alist + '(("*" . "(* x y & more) Returns the product of nums. (*) returns 1. Does not auto-promote longs, will throw on overflow. See also: *'") + ("*'" . "(*' x y & more) Returns the product of nums. (*) returns 1. Supports arbitrary precision. See also: *") + ("+" . "(+ x y & more) Returns the sum of nums. (+) returns 0. Does not auto-promote longs, will throw on overflow. See also: +'") + ("+'" . "(+' x y & more) Returns the sum of nums. (+) returns 0. Supports arbitrary precision. See also: +") + ("-" . "(- x y & more) If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result. Does not auto-promote longs, will throw on overflow. See also: -'") + ("-'" . "(-' x y & more) If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result. Supports arbitrary precision. See also: -") + ("->" . "(-> x form & more) Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc.") + ("->>" . "(->> x form & more) Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the last item in second form, etc.") + ("->ArrayChunk" . "(->ArrayChunk am arr off end) Positional factory function for class clojure.core.ArrayChunk.") + ("->Vec" . "(->Vec am cnt shift root tail _meta) Positional factory function for class clojure.core.Vec.") + ("->VecNode" . "(->VecNode edit arr) Positional factory function for class clojure.core.VecNode.") + ("->VecSeq" . "(->VecSeq am vec anode i offset) Positional factory function for class clojure.core.VecSeq.") + (".." . "(.. x form & more) form => fieldName-symbol or (instanceMethodName-symbol args*) Expands into a member access (.) of the first member on the first argument, followed by the next member on the result, etc. For instance: (.. System (getProperties) (get \"os.name\")) expands to: (. (. System (getProperties)) (get \"os.name\")) but is easier to write, read, and understand.") + ("/" . "(/ x y & more) If no denominators are supplied, returns 1/numerator, else returns numerator divided by all of the denominators.") + ("<" . "(< x y & more) Returns non-nil if nums are in monotonically increasing order, otherwise false.") + ("<=" . "(<= x y & more) Returns non-nil if nums are in monotonically non-decreasing order, otherwise false.") + ("=" . "(= x y & more) Equality. Returns true if x equals y, false if not. Same as Java x.equals(y) except it also works for nil, and compares numbers and collections in a type-independent manner. Clojure's immutable data structures define equals() (and thus =) as a value, not an identity, comparison.") + ("==" . "(== x y & more) Returns non-nil if nums all have the equivalent value (type-independent), otherwise false") + (">" . "(> x y & more) Returns non-nil if nums are in monotonically decreasing order, otherwise false.") + (">=" . "(>= x y & more) Returns non-nil if nums are in monotonically non-increasing order, otherwise false.") + ("accessor" . "(accessor s key) Returns a fn that, given an instance of a structmap with the basis, returns the value at the key. The key must be in the basis. The returned function should be (slightly) more efficient than using get, but such use of accessors should be limited to known performance-critical areas.") + ("aclone" . "(aclone array) Returns a clone of the Java array. Works on arrays of known types.") + ("add-classpath" . "(add-classpath url) DEPRECATED Adds the url (String or URL object) to the classpath per URLClassLoader.addURL") + ("add-watch" . "(add-watch reference key fn) Alpha - subject to change. Adds a watch function to an agent/atom/var/ref reference. The watch fn must be a fn of 4 args: a key, the reference, its old-state, its new-state. Whenever the reference's state might have been changed, any registered watches will have their functions called. The watch fn will be called synchronously, on the agent's thread if an agent, before any pending sends if agent or ref. Note that an atom's or ref's state may have changed again prior to the fn call, so use old/new-state rather than derefing the reference. Note also that watch fns may be called from multiple threads simultaneously. Var watchers are triggered only by root binding changes, not thread-local set!s. Keys must be unique per reference, and can be used to remove the watch with remove-watch, but are otherwise considered opaque by the watch mechanism.") + ("agent" . "(agent state & options) Creates and returns an agent with an initial value of state and zero or more options (in any order): :meta metadata-map :validator validate-fn :error-handler handler-fn :error-mode mode-keyword If metadata-map is supplied, it will be come the metadata on the agent. validate-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validate-fn should return false or throw an exception. handler-fn is called if an action throws an exception or if validate-fn rejects a new state -- see set-error-handler! for details. The mode-keyword may be either :continue (the default if an error-handler is given) or :fail (the default if no error-handler is given) -- see set-error-mode! for details.") + ("agent-error" . "(agent-error a) Returns the exception thrown during an asynchronous action of the agent if the agent is failed. Returns nil if the agent is not failed.") + ("agent-errors" . "(agent-errors a) DEPRECATED: Use 'agent-error' instead. Returns a sequence of the exceptions thrown during asynchronous actions of the agent.") + ("aget" . "(aget array idx & idxs) Returns the value at the index/indices. Works on Java arrays of all types.") + ("alength" . "(alength array) Returns the length of the Java array. Works on arrays of all types.") + ("alias" . "(alias alias namespace-sym) Add an alias in the current namespace to another namespace. Arguments are two symbols: the alias to be used, and the symbolic name of the target namespace. Use :as in the ns macro in preference to calling this directly.") + ("all-ns)" . "(all-ns) Returns a sequence of all namespaces.") + ("alter" . "(alter ref fun & args) Must be called in a transaction. Sets the in-transaction-value of ref to: (apply fun in-transaction-value-of-ref args) and returns the in-transaction-value of ref.") + ("alter-meta!" . "(alter-meta! iref f & args) Atomically sets the metadata for a namespace/var/ref/agent/atom to be: (apply f its-current-meta args) f must be free of side-effects") + ("alter-var-root" . "(alter-var-root v f & args) Atomically alters the root binding of var v by applying f to its current value plus any args") + ("amap" . "(amap a idx ret expr) Maps an expression across an array a, using an index named idx, and return value named ret, initialized to a clone of a, then setting each element of ret to the evaluation of expr, returning the new array ret.") + ("ancestors" . "(ancestors h tag) Returns the immediate and indirect parents of tag, either via a Java type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy") + ("and" . "(and x & next) Evaluates exprs one at a time, from left to right. If a form returns logical false (nil or false), and returns that value and doesn't evaluate any of the other expressions, otherwise it returns the value of the last expr. (and) returns true.") + ("apply" . "(apply f a b c d & args) Applies fn f to the argument list formed by prepending intervening arguments to args.") + ("areduce" . "(areduce a idx ret init expr) Reduces an expression across an array a, using an index named idx, and return value named ret, initialized to init, setting ret to the evaluation of expr at each step, returning ret.") + ("array-map" . "(array-map & keyvals) Constructs an array-map.") + ("aset" . "(aset array idx idx2 & idxv) Sets the value at the index/indices. Works on Java arrays of reference types. Returns val.") + ("aset-boolean" . "(aset-boolean array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of boolean. Returns val.") + ("aset-byte" . "(aset-byte array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of byte. Returns val.") + ("aset-char" . "(aset-char array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of char. Returns val.") + ("aset-double" . "(aset-double array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of double. Returns val.") + ("aset-float" . "(aset-float array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of float. Returns val.") + ("aset-int" . "(aset-int array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of int. Returns val.") + ("aset-long" . "(aset-long array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of long. Returns val.") + ("aset-short" . "(aset-short array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of short. Returns val.") + ("assert" . "(assert x message) Evaluates expr and throws an exception if it does not evaluate to logical true.") + ("assoc" . "(assoc map key val & kvs) assoc[iate]. When applied to a map, returns a new map of the same (hashed/sorted) type, that contains the mapping of key(s) to val(s). When applied to a vector, returns a new vector that contains val at index. Note - index must be <= (count vector).") + ("assoc!" . "(assoc! coll key val & kvs) Alpha - subject to change. When applied to a transient map, adds mapping of key(s) to val(s). When applied to a transient vector, sets the val at index. Note - index must be <= (count vector). Returns coll.") + ("assoc-in" . "(assoc-in m [k & ks] v) Associates a value in a nested associative structure, where ks is a sequence of keys and v is the new value and returns a new nested structure. If any levels do not exist, hash-maps will be created.") + ("associative?" . "(associative? coll) Returns true if coll implements Associative") + ("atom" . "(atom x & options) Creates and returns an Atom with an initial value of x and zero or more options (in any order): :meta metadata-map :validator validate-fn If metadata-map is supplied, it will be come the metadata on the atom. validate-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validate-fn should return false or throw an exception.") + ("await" . "(await & agents) Blocks the current thread (indefinitely!) until all actions dispatched thus far, from this thread or agent, to the agent(s) have occurred. Will block on failed agents. Will never return if a failed agent is restarted with :clear-actions true.") + ("await-for" . "(await-for timeout-ms & agents) Blocks the current thread until all actions dispatched thus far (from this thread or agent) to the agents have occurred, or the timeout (in milliseconds) has elapsed. Returns logical false if returning due to timeout, logical true otherwise.") + ("bases" . "(bases c) Returns the immediate superclass and direct interfaces of c, if any") + ("bean" . "(bean x) Takes a Java object and returns a read-only implementation of the map abstraction based upon its JavaBean properties.") + ("bigdec" . "(bigdec x) Coerce to BigDecimal") + ("bigint" . "(bigint x) Coerce to BigInt") + ("biginteger" . "(biginteger x) Coerce to BigInteger") + ("binding" . "(binding bindings & body) binding => var-symbol init-expr Creates new bindings for the (already-existing) vars, with the supplied initial values, executes the exprs in an implicit do, then re-establishes the bindings that existed before. The new bindings are made in parallel (unlike let); all init-exprs are evaluated before the vars are bound to their new values.") + ("bit-and" . "(bit-and x y & more) Bitwise and") + ("bit-and-not" . "(bit-and-not x y & more) Bitwise and with complement") + ("bit-clear" . "(bit-clear x n) Clear bit at index n") + ("bit-flip" . "(bit-flip x n) Flip bit at index n") + ("bit-not" . "(bit-not x) Bitwise complement") + ("bit-or" . "(bit-or x y & more) Bitwise or") + ("bit-set" . "(bit-set x n) Set bit at index n") + ("bit-shift-left" . "(bit-shift-left x n) Bitwise shift left") + ("bit-shift-right" . "(bit-shift-right x n) Bitwise shift right") + ("bit-test" . "(bit-test x n) Test bit at index n") + ("bit-xor" . "(bit-xor x y & more) Bitwise exclusive or") + ("boolean" . "(boolean x) Coerce to boolean") + ("boolean-array" . "(boolean-array size init-val-or-seq) Creates an array of booleans") + ("booleans" . "(booleans xs) Casts to boolean[]") + ("bound-fn" . "(bound-fn & fntail) Returns a function defined by the given fntail, which will install the same bindings in effect as in the thread at the time bound-fn was called. This may be used to define a helper function which runs on a different thread, but needs the same bindings in place.") + ("bound-fn*" . "(bound-fn* f) Returns a function, which will install the same bindings in effect as in the thread at the time bound-fn* was called and then call f with any given arguments. This may be used to define a helper function which runs on a different thread, but needs the same bindings in place.") + ("bound?" . "(bound? & vars) Returns true if all of the vars provided as arguments have any bound value, root or thread-local. Implies that deref'ing the provided vars will succeed. Returns true if no vars are provided.") + ("butlast" . "(butlast coll) Return a seq of all but the last item in coll, in linear time") + ("byte" . "(byte x) Coerce to byte") + ("byte-array" . "(byte-array size init-val-or-seq) Creates an array of bytes") + ("bytes" . "(bytes xs) Casts to bytes[]") + ("case" . "(case e & clauses) Takes an expression, and a set of clauses. Each clause can take the form of either: test-constant result-expr (test-constant1 ... test-constantN) result-expr The test-constants are not evaluated. They must be compile-time literals, and need not be quoted. If the expression is equal to a test-constant, the corresponding result-expr is returned. A single default expression can follow the clauses, and its value will be returned if no clause matches. If no default expression is provided and no clause matches, an IllegalArgumentException is thrown. Unlike cond and condp, case does a constant-time dispatch, the clauses are not considered sequentially. All manner of constant expressions are acceptable in case, including numbers, strings, symbols, keywords, and (Clojure) composites thereof. Note that since lists are used to group multiple constants that map to the same expression, a vector can be used to match a list if needed. The test-constants need not be all of the same type.") + ("cast" . "(cast c x) Throws a ClassCastException if x is not a c, else returns x.") + ("char" . "(char x) Coerce to char") + ("char-array" . "(char-array size init-val-or-seq) Creates an array of chars") + ("char?" . "(char? x) Return true if x is a Character") + ("chars" . "(chars xs) Casts to chars[]") + ("class" . "(class x) Returns the Class of x") + ("class?" . "(class? x) Returns true if x is an instance of Class") + ("clear-agent-errors" . "(clear-agent-errors a) DEPRECATED: Use 'restart-agent' instead. Clears any exceptions thrown during asynchronous actions of the agent, allowing subsequent actions to occur.") + ("clojure-version)" . "(clojure-version) Returns clojure version as a printable string.") + ("coll?" . "(coll? x) Returns true if x implements IPersistentCollection") + ("comment" . "(comment & body) Ignores body, yields nil") + ("commute" . "(commute ref fun & args) Must be called in a transaction. Sets the in-transaction-value of ref to: (apply fun in-transaction-value-of-ref args) and returns the in-transaction-value of ref. At the commit point of the transaction, sets the value of ref to be: (apply fun most-recently-committed-value-of-ref args) Thus fun should be commutative, or, failing that, you must accept last-one-in-wins behavior. commute allows for more concurrency than ref-set.") + ("comp" . "(comp f1 f2 f3 & fs) Takes a set of functions and returns a fn that is the composition of those fns. The returned fn takes a variable number of args, applies the rightmost of fns to the args, the next fn (right-to-left) to the result, etc.") + ("comparator" . "(comparator pred) Returns an implementation of java.util.Comparator based upon pred.") + ("compare" . "(compare x y) Comparator. Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'greater than' y. Same as Java x.compareTo(y) except it also works for nil, and compares numbers and collections in a type-independent manner. x must implement Comparable") + ("compare-and-set!" . "(compare-and-set! atom oldval newval) Atomically sets the value of atom to newval if and only if the current value of the atom is identical to oldval. Returns true if set happened, else false") + ("compile" . "(compile lib) Compiles the namespace named by the symbol lib into a set of classfiles. The source for the lib must be in a proper classpath-relative directory. The output files will go into the directory specified by *compile-path*, and that directory too must be in the classpath.") + ("complement" . "(complement f) Takes a fn f and returns a fn that takes the same arguments as f, has the same effects, if any, and returns the opposite truth value.") + ("concat" . "(concat x y & zs) Returns a lazy seq representing the concatenation of the elements in the supplied colls.") + ("cond" . "(cond & clauses) Takes a set of test/expr pairs. It evaluates each test one at a time. If a test returns logical true, cond evaluates and returns the value of the corresponding expr and doesn't evaluate any of the other tests or exprs. (cond) returns nil.") + ("condp" . "(condp pred expr & clauses) Takes a binary predicate, an expression, and a set of clauses. Each clause can take the form of either: test-expr result-expr test-expr :>> result-fn Note :>> is an ordinary keyword. For each clause, (pred test-expr expr) is evaluated. If it returns logical true, the clause is a match. If a binary clause matches, the result-expr is returned, if a ternary clause matches, its result-fn, which must be a unary function, is called with the result of the predicate as its argument, the result of that call being the return value of condp. A single default expression can follow the clauses, and its value will be returned if no clause matches. If no default expression is provided and no clause matches, an IllegalArgumentException is thrown.") + ("conj" . "(conj coll x & xs) conj[oin]. Returns a new collection with the xs 'added'. (conj nil item) returns (item). The 'addition' may happen at different 'places' depending on the concrete type.") + ("conj!" . "(conj! coll x) Alpha - subject to change. Adds x to the transient collection, and return coll. The 'addition' may happen at different 'places' depending on the concrete type.") + ("cons" . "(cons x seq) Returns a new seq where x is the first element and seq is the rest.") + ("constantly" . "(constantly x) Returns a function that takes any number of arguments and returns x.") + ("construct-proxy" . "(construct-proxy c & ctor-args) Takes a proxy class and any arguments for its superclass ctor and creates and returns an instance of the proxy.") + ("contains?" . "(contains? coll key) Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or logarithmic time; it will not perform a linear search for a value. See also 'some'.") + ("count" . "(count coll) Returns the number of items in the collection. (count nil) returns 0. Also works on strings, arrays, and Java Collections and Maps") + ("counted?" . "(counted? coll) Returns true if coll implements count in constant time") + ("create-ns" . "(create-ns sym) Create a new namespace named by the symbol if one doesn't already exist, returns it or the already-existing namespace of the same name.") + ("create-struct" . "(create-struct & keys) Returns a structure basis object.") + ("cycle" . "(cycle coll) Returns a lazy (infinite!) sequence of repetitions of the items in coll.") + ("dec" . "(dec x) Returns a number one less than num. Does not auto-promote longs, will throw on overflow. See also: dec'") + ("dec'" . "(dec' x) Returns a number one less than num. Supports arbitrary precision. See also: dec") + ("decimal?" . "(decimal? n) Returns true if n is a BigDecimal") + ("declare" . "(declare & names) defs the supplied var names with no bindings, useful for making forward declarations.") + ("definline" . "(definline name & decl) Experimental - like defmacro, except defines a named function whose body is the expansion, calls to which may be expanded inline as if it were a macro. Cannot be used with variadic (&) args.") + ("defmacro" . "(defmacro name doc-string? attr-map? ([params*] body) + attr-map?) Like defn, but the resulting function name is declared as a macro and will be used as a macro by the compiler when it is called.") + ("defmethod" . "(defmethod multifn dispatch-val & fn-tail) Creates and installs a new method of multimethod associated with dispatch-value. ") + ("defmulti" . "(defmulti name docstring? attr-map? dispatch-fn & options) Creates a new multimethod with the associated dispatch function. The docstring and attribute-map are optional. Options are key-value pairs and may be one of: :default the default dispatch value, defaults to :default :hierarchy the isa? hierarchy to use for dispatching defaults to the global hierarchy") + ("defn" . "(defn name doc-string? attr-map? ([params*] prepost-map? body) + attr-map?) Same as (def name (fn [params* ] exprs*)) or (def name (fn ([params* ] exprs*)+)) with any doc-string or attrs added to the var metadata. prepost-map defines a map with optional keys :pre and :post that contain collections of pre or post conditions.") + ("defn-" . "(defn- name & decls) same as defn, yielding non-public def") + ("defonce" . "(defonce name expr) defs name to have the root value of the expr iff the named var has no root value, else expr is unevaluated") + ("defprotocol" . "(defprotocol name & opts+sigs) A protocol is a named set of named methods and their signatures: (defprotocol AProtocolName ;optional doc string \"A doc string for AProtocol abstraction\" ;method signatures (bar [this a b] \"bar docs\") (baz [this a] [this a b] [this a b c] \"baz docs\")) No implementations are provided. Docs can be specified for the protocol overall and for each method. The above yields a set of polymorphic functions and a protocol object. All are namespace-qualified by the ns enclosing the definition The resulting functions dispatch on the type of their first argument, which is required and corresponds to the implicit target object ('this' in Java parlance). defprotocol is dynamic, has no special compile-time effect, and defines no new types or classes. Implementations of the protocol methods can be provided using extend. defprotocol will automatically generate a corresponding interface, with the same name as the protocol, i.e. given a protocol: my.ns/Protocol, an interface: my.ns.Protocol. The interface will have methods corresponding to the protocol functions, and the protocol will automatically work with instances of the interface. Note that you should not use this interface with deftype or reify, as they support the protocol directly: (defprotocol P (foo [this]) (bar-me [this] [this y])) (deftype Foo [a b c] P (foo [this] a) (bar-me [this] b) (bar-me [this y] (+ c y))) (bar-me (Foo. 1 2 3) 42) => 45 (foo (let [x 42] (reify P (foo [this] 17) (bar-me [this] x) (bar-me [this y] x)))) => 17") + ("defrecord" . "(defrecord name [& fields] & opts+specs) Alpha - subject to change (defrecord name [fields*] options* specs*) Currently there are no options. Each spec consists of a protocol or interface name followed by zero or more method bodies: protocol-or-interface-or-Object (methodName [args*] body)* Dynamically generates compiled bytecode for class with the given name, in a package with the same name as the current namespace, the given fields, and, optionally, methods for protocols and/or interfaces. The class will have the (immutable) fields named by fields, which can have type hints. Protocols/interfaces and methods are optional. The only methods that can be supplied are those declared in the protocols/interfaces. Note that method bodies are not closures, the local environment includes only the named fields, and those fields can be accessed directy. Method definitions take the form: (methodname [args*] body) The argument and return types can be hinted on the arg and methodname symbols. If not supplied, they will be inferred, so type hints should be reserved for disambiguation. Methods should be supplied for all methods of the desired protocol(s) and interface(s). You can also define overrides for methods of Object. Note that a parameter must be supplied to correspond to the target object ('this' in Java parlance). Thus methods for interfaces will take one more argument than do the interface declarations. Note also that recur calls to the method head should *not* pass the target object, it will be supplied automatically and can not be substituted. In the method bodies, the (unqualified) name can be used to name the class (for calls to new, instance? etc). The class will have implementations of several (clojure.lang) interfaces generated automatically: IObj (metadata support) and IPersistentMap, and all of their superinterfaces. In addition, defrecord will define type-and-value-based =, and will defined Java .hashCode and .equals consistent with the contract for java.util.Map. When AOT compiling, generates compiled bytecode for a class with the given name (a symbol), prepends the current ns as the package, and writes the .class file to the *compile-path* directory. Two constructors will be defined, one taking the designated fields followed by a metadata map (nil for none) and an extension field map (nil for none), and one taking only the fields (using nil for meta and extension fields). Note that the field names __meta and __extmap are currently reserved and should not be used when defining your own records. Given (defrecord TypeName ...), two factory functions will be defined: ->TypeName, taking positional parameters for the fields, and map->TypeName, taking a map of keywords to field values.") + ("defstruct" . "(defstruct name & keys) Same as (def name (create-struct keys...))") + ("deftype" . "(deftype name [& fields] & opts+specs) Alpha - subject to change (deftype name [fields*] options* specs*) Currently there are no options. Each spec consists of a protocol or interface name followed by zero or more method bodies: protocol-or-interface-or-Object (methodName [args*] body)* Dynamically generates compiled bytecode for class with the given name, in a package with the same name as the current namespace, the given fields, and, optionally, methods for protocols and/or interfaces. The class will have the (by default, immutable) fields named by fields, which can have type hints. Protocols/interfaces and methods are optional. The only methods that can be supplied are those declared in the protocols/interfaces. Note that method bodies are not closures, the local environment includes only the named fields, and those fields can be accessed directy. Fields can be qualified with the metadata :volatile-mutable true or :unsynchronized-mutable true, at which point (set! afield aval) will be supported in method bodies. Note well that mutable fields are extremely difficult to use correctly, and are present only to facilitate the building of higher level constructs, such as Clojure's reference types, in Clojure itself. They are for experts only - if the semantics and implications of :volatile-mutable or :unsynchronized-mutable are not immediately apparent to you, you should not be using them. Method definitions take the form: (methodname [args*] body) The argument and return types can be hinted on the arg and methodname symbols. If not supplied, they will be inferred, so type hints should be reserved for disambiguation. Methods should be supplied for all methods of the desired protocol(s) and interface(s). You can also define overrides for methods of Object. Note that a parameter must be supplied to correspond to the target object ('this' in Java parlance). Thus methods for interfaces will take one more argument than do the interface declarations. Note also that recur calls to the method head should *not* pass the target object, it will be supplied automatically and can not be substituted. In the method bodies, the (unqualified) name can be used to name the class (for calls to new, instance? etc). When AOT compiling, generates compiled bytecode for a class with the given name (a symbol), prepends the current ns as the package, and writes the .class file to the *compile-path* directory. One constructor will be defined, taking the designated fields. Note that the field names __meta and __extmap are currently reserved and should not be used when defining your own types. Given (deftype TypeName ...), a factory function called ->TypeName will be defined, taking positional parameters for the fields") + ("delay" . "(delay & body) Takes a body of expressions and yields a Delay object that will invoke the body only the first time it is forced (with force or deref/@), and will cache the result and return it on all subsequent force calls. See also - realized?") + ("delay?" . "(delay? x) returns true if x is a Delay created with delay") + ("deliver" . "(deliver promise val) Alpha - subject to change. Delivers the supplied value to the promise, releasing any pending derefs. A subsequent call to deliver on a promise will throw an exception.") + ("denominator" . "(denominator r) Returns the denominator part of a Ratio.") + ("deref" . "(deref ref timeout-ms timeout-val) Also reader macro: @ref/@agent/@var/@atom/@delay/@future/@promise. Within a transaction, returns the in-transaction-value of ref, else returns the most-recently-committed value of ref. When applied to a var, agent or atom, returns its current state. When applied to a delay, forces it if not already forced. When applied to a future, will block if computation not complete. When applied to a promise, will block until a value is delivered. The variant taking a timeout can be used for blocking references (futures and promises), and will return timeout-val if the timeout (in milliseconds) is reached before a value is available. See also - realized?.") + ("derive" . "(derive h tag parent) Establishes a parent/child relationship between parent and tag. Parent must be a namespace-qualified symbol or keyword and child can be either a namespace-qualified symbol or keyword or a class. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to, and modifies, the global hierarchy.") + ("descendants" . "(descendants h tag) Returns the immediate and indirect children of tag, through a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy. Note: does not work on Java type inheritance relationships.") + ("disj" . "(disj set key & ks) disj[oin]. Returns a new set of the same (hashed/sorted) type, that does not contain key(s).") + ("disj!" . "(disj! set key & ks) Alpha - subject to change. disj[oin]. Returns a transient set of the same (hashed/sorted) type, that does not contain key(s).") + ("dissoc" . "(dissoc map key & ks) dissoc[iate]. Returns a new map of the same (hashed/sorted) type, that does not contain a mapping for key(s).") + ("dissoc!" . "(dissoc! map key & ks) Alpha - subject to change. Returns a transient map that doesn't contain a mapping for key(s).") + ("distinct" . "(distinct coll) Returns a lazy sequence of the elements of coll with duplicates removed") + ("distinct?" . "(distinct? x y & more) Returns true if no two of the arguments are =") + ("doall" . "(doall n coll) When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. doall can be used to force any effects. Walks through the successive nexts of the seq, retains the head and returns it, thus causing the entire seq to reside in memory at one time.") + ("dorun" . "(dorun n coll) When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. dorun can be used to force any effects. Walks through the successive nexts of the seq, does not retain the head and returns nil.") + ("doseq" . "(doseq seq-exprs & body) Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by \"for\". Does not retain the head of the sequence. Returns nil.") + ("dosync" . "(dosync & exprs) Runs the exprs (in an implicit do) in a transaction that encompasses exprs and any nested calls. Starts a transaction if none is already running on this thread. Any uncaught exception will abort the transaction and flow out of dosync. The exprs may be run more than once, but any effects on Refs will be atomic.") + ("dotimes" . "(dotimes bindings & body) bindings => name n Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 through n-1.") + ("doto" . "(doto x & forms) Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given arguments. The forms are evaluated in order. Returns x. (doto (new java.util.HashMap) (.put \"a\" 1) (.put \"b\" 2))") + ("double" . "(double x) Coerce to double") + ("double-array" . "(double-array size init-val-or-seq) Creates an array of doubles") + ("doubles" . "(doubles xs) Casts to double[]") + ("drop" . "(drop n coll) Returns a lazy sequence of all but the first n items in coll.") + ("drop-last" . "(drop-last n s) Return a lazy sequence of all but the last n (default 1) items in coll") + ("drop-while" . "(drop-while pred coll) Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns logical false.") + ("empty" . "(empty coll) Returns an empty collection of the same category as coll, or nil") + ("empty?" . "(empty? coll) Returns true if coll has no items - same as (not (seq coll)). Please use the idiom (seq x) rather than (not (empty? x))") + ("ensure" . "(ensure ref) Must be called in a transaction. Protects the ref from modification by other transactions. Returns the in-transaction-value of ref. Allows for more concurrency than (ref-set ref @ref)") + ("enumeration-seq" . "(enumeration-seq e) Returns a seq on a java.util.Enumeration") + ("error-handler" . "(error-handler a) Returns the error-handler of agent a, or nil if there is none. See set-error-handler!") + ("error-mode" . "(error-mode a) Returns the error-mode of agent a. See set-error-mode!") + ("eval" . "(eval form) Evaluates the form data structure (not text!) and returns the result.") + ("even?" . "(even? n) Returns true if n is even, throws an exception if n is not an integer") + ("every-pred" . "(every-pred p1 p2 p3 & ps) Takes a set of predicates and returns a function f that returns true if all of its composing predicates return a logical true value against all of its arguments, else it returns false. Note that f is short-circuiting in that it will stop execution on the first argument that triggers a logical false result against the original predicates.") + ("every?" . "(every? pred coll) Returns true if (pred x) is logical true for every x in coll, else false.") + ("ex-data" . "(ex-data ex) Alpha - subject to change. Returns exception data (a map) if ex is an ExceptionInfo. Otherwise returns nil.") + ("ex-info" . "(ex-info msg map cause) Alpha - subject to change. Create an instance of ExceptionInfo, a RuntimeException subclass that carries a map of additional data.") + ("extend" . "(extend atype & proto+mmaps) Implementations of protocol methods can be provided using the extend construct: (extend AType AProtocol {:foo an-existing-fn :bar (fn [a b] ...) :baz (fn ([a]...) ([a b] ...)...)} BProtocol {...} ...) extend takes a type/class (or interface, see below), and one or more protocol + method map pairs. It will extend the polymorphism of the protocol's methods to call the supplied methods when an AType is provided as the first argument. Method maps are maps of the keyword-ized method names to ordinary fns. This facilitates easy reuse of existing fns and fn maps, for code reuse/mixins without derivation or composition. You can extend an interface to a protocol. This is primarily to facilitate interop with the host (e.g. Java) but opens the door to incidental multiple inheritance of implementation since a class can inherit from more than one interface, both of which extend the protocol. It is TBD how to specify which impl to use. You can extend a protocol on nil. If you are supplying the definitions explicitly (i.e. not reusing exsting functions or mixin maps), you may find it more convenient to use the extend-type or extend-protocol macros. Note that multiple independent extend clauses can exist for the same type, not all protocols need be defined in a single extend call. See also: extends?, satisfies?, extenders") + ("extend-protocol" . "(extend-protocol p & specs) Useful when you want to provide several implementations of the same protocol all at once. Takes a single protocol and the implementation of that protocol for one or more types. Expands into calls to extend-type: (extend-protocol Protocol AType (foo [x] ...) (bar [x y] ...) BType (foo [x] ...) (bar [x y] ...) AClass (foo [x] ...) (bar [x y] ...) nil (foo [x] ...) (bar [x y] ...)) expands into: (do (clojure.core/extend-type AType Protocol (foo [x] ...) (bar [x y] ...)) (clojure.core/extend-type BType Protocol (foo [x] ...) (bar [x y] ...)) (clojure.core/extend-type AClass Protocol (foo [x] ...) (bar [x y] ...)) (clojure.core/extend-type nil Protocol (foo [x] ...) (bar [x y] ...)))") + ("extend-type" . "(extend-type t & specs) A macro that expands into an extend call. Useful when you are supplying the definitions explicitly inline, extend-type automatically creates the maps required by extend. Propagates the class as a type hint on the first argument of all fns. (extend-type MyType Countable (cnt [c] ...) Foo (bar [x y] ...) (baz ([x] ...) ([x y & zs] ...))) expands into: (extend MyType Countable {:cnt (fn [c] ...)} Foo {:baz (fn ([x] ...) ([x y & zs] ...)) :bar (fn [x y] ...)})") + ("extenders" . "(extenders protocol) Returns a collection of the types explicitly extending protocol") + ("extends?" . "(extends? protocol atype) Returns true if atype extends protocol") + ("false?" . "(false? x) Returns true if x is the value false, false otherwise.") + ("ffirst" . "(ffirst x) Same as (first (first x))") + ("file-seq" . "(file-seq dir) A tree seq on java.io.Files") + ("filter" . "(filter pred coll) Returns a lazy sequence of the items in coll for which (pred item) returns true. pred must be free of side-effects.") + ("filterv" . "(filterv pred coll) Returns a vector of the items in coll for which (pred item) returns true. pred must be free of side-effects.") + ("find" . "(find map key) Returns the map entry for key, or nil if key not present.") + ("find-keyword" . "(find-keyword ns name) Returns a Keyword with the given namespace and name if one already exists. This function will not intern a new keyword. If the keyword has not already been interned, it will return nil. Do not use : in the keyword strings, it will be added automatically.") + ("find-ns" . "(find-ns sym) Returns the namespace named by the symbol or nil if it doesn't exist.") + ("find-var" . "(find-var sym) Returns the global var named by the namespace-qualified symbol, or nil if no var with that name.") + ("first" . "(first coll) Returns the first item in the collection. Calls seq on its argument. If coll is nil, returns nil.") + ("flatten" . "(flatten x) Takes any nested combination of sequential things (lists, vectors, etc.) and returns their contents as a single, flat sequence. (flatten nil) returns an empty sequence.") + ("float" . "(float x) Coerce to float") + ("float-array" . "(float-array size init-val-or-seq) Creates an array of floats") + ("float?" . "(float? n) Returns true if n is a floating point number") + ("floats" . "(floats xs) Casts to float[]") + ("flush)" . "(flush) Flushes the output stream that is the current value of *out*") + ("fn" . "(fn & sigs) params => positional-params* , or positional-params* & next-param positional-param => binding-form next-param => binding-form name => symbol Defines a function") + ("fn?" . "(fn? x) Returns true if x implements Fn, i.e. is an object created via fn.") + ("fnext" . "(fnext x) Same as (first (next x))") + ("fnil" . "(fnil f x y z) Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. Higher arity versions can replace arguments in the second and third positions (y, z). Note that the function f can take any number of arguments, not just the one(s) being nil-patched.") + ("for" . "(for seq-exprs body-expr) List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more modifiers, and yields a lazy sequence of evaluations of expr. Collections are iterated in a nested fashion, rightmost fastest, and nested coll-exprs can refer to bindings created in prior binding-forms. Supported modifiers are: :let [binding-form expr ...], :while test, :when test. (take 100 (for [x (range 100000000) y (range 1000000) :while (< y x)] [x y]))") + ("force" . "(force x) If x is a Delay, returns the (possibly cached) value of its expression, else returns x") + ("format" . "(format fmt & args) Formats a string using java.lang.String.format, see java.util.Formatter for format string syntax") + ("frequencies" . "(frequencies coll) Returns a map from distinct items in coll to the number of times they appear.") + ("future" . "(future & body) Takes a body of expressions and yields a future object that will invoke the body in another thread, and will cache the result and return it on all subsequent calls to deref/@. If the computation has not yet finished, calls to deref/@ will block, unless the variant of deref with timeout is used. See also - realized?.") + ("future-call" . "(future-call f) Takes a function of no args and yields a future object that will invoke the function in another thread, and will cache the result and return it on all subsequent calls to deref/@. If the computation has not yet finished, calls to deref/@ will block, unless the variant of deref with timeout is used. See also - realized?.") + ("future-cancel" . "(future-cancel f) Cancels the future, if possible.") + ("future-cancelled?" . "(future-cancelled? f) Returns true if future f is cancelled") + ("future-done?" . "(future-done? f) Returns true if future f is done") + ("future?" . "(future? x) Returns true if x is a future") + ("gen-class" . "(gen-class & options) When compiling, generates compiled bytecode for a class with the given package-qualified :name (which, as all names in these parameters, can be a string or symbol), and writes the .class file to the *compile-path* directory. When not compiling, does nothing. The gen-class construct contains no implementation, as the implementation will be dynamically sought by the generated class in functions in an implementing Clojure namespace. Given a generated class org.mydomain.MyClass with a method named mymethod, gen-class will generate an implementation that looks for a function named by (str prefix mymethod) (default prefix: \"-\") in a Clojure namespace specified by :impl-ns (defaults to the current namespace). All inherited methods, generated methods, and init and main functions (see :methods, :init, and :main below) will be found similarly prefixed. By default, the static initializer for the generated class will attempt to load the Clojure support code for the class as a resource from the classpath, e.g. in the example case, ``org/mydomain/MyClass__init.class``. This behavior can be controlled by :load-impl-ns Note that methods with a maximum of 18 parameters are supported. In all subsequent sections taking types, the primitive types can be referred to by their Java names (int, float etc), and classes in the java.lang package can be used without a package qualifier. All other classes must be fully qualified. Options should be a set of key/value pairs, all except for :name are optional: :name aname The package-qualified name of the class to be generated :extends aclass Specifies the superclass, the non-private methods of which will be overridden by the class. If not provided, defaults to Object. :implements [interface ...] One or more interfaces, the methods of which will be implemented by the class. :init name If supplied, names a function that will be called with the arguments to the constructor. Must return [ [superclass-constructor-args] state] If not supplied, the constructor args are passed directly to the superclass constructor and the state will be nil :constructors {[param-types] [super-param-types], ...} By default, constructors are created for the generated class which match the signature(s) of the constructors for the superclass. This parameter may be used to explicitly specify constructors, each entry providing a mapping from a constructor signature to a superclass constructor signature. When you supply this, you must supply an :init specifier. :post-init name If supplied, names a function that will be called with the object as the first argument, followed by the arguments to the constructor. It will be called every time an object of this class is created, immediately after all the inherited constructors have completed. It's return value is ignored. :methods [ [name [param-types] return-type], ...] The generated class automatically defines all of the non-private methods of its superclasses/interfaces. This parameter can be used to specify the signatures of additional methods of the generated class. Static methods can be specified with ^{:static true} in the signature's metadata. Do not repeat superclass/interface signatures here. :main boolean If supplied and true, a static public main function will be generated. It will pass each string of the String[] argument as a separate argument to a function called (str prefix main). :factory name If supplied, a (set of) public static factory function(s) will be created with the given name, and the same signature(s) as the constructor(s). :state name If supplied, a public final instance field with the given name will be created. You must supply an :init function in order to provide a value for the state. Note that, though final, the state can be a ref or agent, supporting the creation of Java objects with transactional or asynchronous mutation semantics. :exposes {protected-field-name {:get name :set name}, ...} Since the implementations of the methods of the generated class occur in Clojure functions, they have no access to the inherited protected fields of the superclass. This parameter can be used to generate public getter/setter methods exposing the protected field(s) for use in the implementation. :exposes-methods {super-method-name exposed-name, ...} It is sometimes necessary to call the superclass' implementation of an overridden method. Those methods may be exposed and referred in the new method implementation by a local name. :prefix string Default: \"-\" Methods called e.g. Foo will be looked up in vars called prefixFoo in the implementing ns. :impl-ns name Default: the name of the current ns. Implementations of methods will be looked up in this namespace. :load-impl-ns boolean Default: true. Causes the static initializer for the generated class to reference the load code for the implementing namespace. Should be true when implementing-ns is the default, false if you intend to load the code via some other method.") + ("gen-interface" . "(gen-interface & options) When compiling, generates compiled bytecode for an interface with the given package-qualified :name (which, as all names in these parameters, can be a string or symbol), and writes the .class file to the *compile-path* directory. When not compiling, does nothing. In all subsequent sections taking types, the primitive types can be referred to by their Java names (int, float etc), and classes in the java.lang package can be used without a package qualifier. All other classes must be fully qualified. Options should be a set of key/value pairs, all except for :name are optional: :name aname The package-qualified name of the class to be generated :extends [interface ...] One or more interfaces, which will be extended by this interface. :methods [ [name [param-types] return-type], ...] This parameter is used to specify the signatures of the methods of the generated interface. Do not repeat superinterface signatures here.") + ("gensym" . "(gensym prefix-string) Returns a new symbol with a unique name. If a prefix string is supplied, the name is prefix# where # is some unique number. If prefix is not supplied, the prefix is 'G__'.") + ("get" . "(get map key not-found) Returns the value mapped to key, not-found or nil if key not present.") + ("get-in" . "(get-in m ks not-found) Returns the value in a nested associative structure, where ks is a sequence of keys. Returns nil if the key is not present, or the not-found value if supplied.") + ("get-method" . "(get-method multifn dispatch-val) Given a multimethod and a dispatch value, returns the dispatch fn that would apply to that value, or nil if none apply and no default") + ("get-proxy-class" . "(get-proxy-class & bases) Takes an optional single class followed by zero or more interfaces. If not supplied class defaults to Object. Creates an returns an instance of a proxy class derived from the supplied classes. The resulting value is cached and used for any subsequent requests for the same class set. Returns a Class object.") + ("get-thread-bindings)" . "(get-thread-bindings) Get a map with the Var/value pairs which is currently in effect for the current thread.") + ("get-validator" . "(get-validator iref) Gets the validator-fn for a var/ref/agent/atom.") + ("group-by" . "(group-by f coll) Returns a map of the elements of coll keyed by the result of f on each element. The value at each key will be a vector of the corresponding elements, in the order they appeared in coll.") + ("hash" . "(hash x) Returns the hash code of its argument. Note this is the hash code consistent with =, and thus is different than .hashCode for Integer, Short, Byte and Clojure collections.") + ("hash-map" . "(hash-map & keyvals) keyval => key val Returns a new hash map with supplied mappings.") + ("hash-set" . "(hash-set & keys) Returns a new hash set with supplied keys.") + ("identical?" . "(identical? x y) Tests if 2 arguments are the same object") + ("identity" . "(identity x) Returns its argument.") + ("if-let" . "(if-let bindings then else & oldform) bindings => binding-form test If test is true, evaluates then with binding-form bound to the value of test, if not, yields else") + ("if-not" . "(if-not test then else) Evaluates test. If logical false, evaluates and returns then expr, otherwise else expr, if supplied, else nil.") + ("ifn?" . "(ifn? x) Returns true if x implements IFn. Note that many data structures (e.g. sets and maps) implement IFn") + ("import" . "(import & import-symbols-or-lists) import-list => (package-symbol class-name-symbols*) For each name in class-name-symbols, adds a mapping from name to the class named by package.name to the current namespace. Use :import in the ns macro in preference to calling this directly.") + ("in-ns" . "(in-ns name) Sets *ns* to the namespace named by the symbol, creating it if needed.") + ("inc" . "(inc x) Returns a number one greater than num. Does not auto-promote longs, will throw on overflow. See also: inc'") + ("inc'" . "(inc' x) Returns a number one greater than num. Supports arbitrary precision. See also: inc") + ("init-proxy" . "(init-proxy proxy mappings) Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces) to fns (which must take arguments matching the corresponding method, plus an additional (explicit) first arg corresponding to this, and sets the proxy's fn map. Returns the proxy.") + ("instance?" . "(instance? c x) Evaluates x and tests if it is an instance of the class c. Returns true or false") + ("int" . "(int x) Coerce to int") + ("int-array" . "(int-array size init-val-or-seq) Creates an array of ints") + ("integer?" . "(integer? n) Returns true if n is an integer") + ("interleave" . "(interleave c1 c2 & colls) Returns a lazy seq of the first item in each coll, then the second etc.") + ("intern" . "(intern ns name val) Finds or creates a var named by the symbol name in the namespace ns (which can be a symbol or a namespace), setting its root binding to val if supplied. The namespace must exist. The var will adopt any metadata from the name symbol. Returns the var.") + ("interpose" . "(interpose sep coll) Returns a lazy seq of the elements of coll separated by sep") + ("into" . "(into to from) Returns a new coll consisting of to-coll with all of the items of from-coll conjoined.") + ("into-array" . "(into-array type aseq) Returns an array with components set to the values in aseq. The array's component type is type if provided, or the type of the first value in aseq if present, or Object. All values in aseq must be compatible with the component type. Class objects for the primitive types can be obtained using, e.g., Integer/TYPE.") + ("ints" . "(ints xs) Casts to int[]") + ("io!" . "(io! & body) If an io! block occurs in a transaction, throws an IllegalStateException, else runs body in an implicit do. If the first expression in body is a literal string, will use that as the exception message.") + ("isa?" . "(isa? h child parent) Returns true if (= child parent), or child is directly or indirectly derived from parent, either via a Java type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy") + ("iterate" . "(iterate f x) Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects") + ("iterator-seq" . "(iterator-seq iter) Returns a seq on a java.util.Iterator. Note that most collections providing iterators implement Iterable and thus support seq directly.") + ("juxt" . "(juxt f g h & fs) Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applying each fn to the args (left-to-right). ((juxt a b c) x) => [(a x) (b x) (c x)]") + ("keep" . "(keep f coll) Returns a lazy sequence of the non-nil results of (f item). Note, this means false return values will be included. f must be free of side-effects.") + ("keep-indexed" . "(keep-indexed f coll) Returns a lazy sequence of the non-nil results of (f index item). Note, this means false return values will be included. f must be free of side-effects.") + ("key" . "(key e) Returns the key of the map entry.") + ("keys" . "(keys map) Returns a sequence of the map's keys.") + ("keyword" . "(keyword ns name) Returns a Keyword with the given namespace and name. Do not use : in the keyword strings, it will be added automatically.") + ("keyword?" . "(keyword? x) Return true if x is a Keyword") + ("last" . "(last coll) Return the last item in coll, in linear time") + ("lazy-cat" . "(lazy-cat & colls) Expands to code which yields a lazy sequence of the concatenation of the supplied colls. Each coll expr is not evaluated until it is needed. (lazy-cat xs ys zs) === (concat (lazy-seq xs) (lazy-seq ys) (lazy-seq zs))") + ("lazy-seq" . "(lazy-seq & body) Takes a body of expressions that returns an ISeq or nil, and yields a Seqable object that will invoke the body only the first time seq is called, and will cache the result and return it on all subsequent seq calls. See also - realized?") + ("let" . "(let bindings & body) binding => binding-form init-expr Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-exprs or parts therein.") + ("letfn" . "(letfn fnspecs & body) fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+) Takes a vector of function specs and a body, and generates a set of bindings of functions to their names. All of the names are available in all of the definitions of the functions, as well as the body.") + ("line-seq" . "(line-seq rdr) Returns the lines of text from rdr as a lazy sequence of strings. rdr must implement java.io.BufferedReader.") + ("list" . "(list & items) Creates a new list containing the items.") + ("list*" . "(list* a b c d & more) Creates a new list containing the items prepended to the rest, the last of which will be treated as a sequence.") + ("list?" . "(list? x) Returns true if x implements IPersistentList") + ("load" . "(load & paths) Loads Clojure code from resources in classpath. A path is interpreted as classpath-relative if it begins with a slash or relative to the root directory for the current namespace otherwise.") + ("load-file" . "(load-file name) Sequentially read and evaluate the set of forms contained in the file.") + ("load-reader" . "(load-reader rdr) Sequentially read and evaluate the set of forms contained in the stream/file") + ("load-string" . "(load-string s) Sequentially read and evaluate the set of forms contained in the string") + ("loaded-libs)" . "(loaded-libs) Returns a sorted set of symbols naming the currently loaded libs") + ("locking" . "(locking x & body) Executes exprs in an implicit do, while holding the monitor of x. Will release the monitor of x in all circumstances.") + ("long" . "(long x) Coerce to long") + ("long-array" . "(long-array size init-val-or-seq) Creates an array of longs") + ("longs" . "(longs xs) Casts to long[]") + ("loop" . "(loop bindings & body) Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-exprs or parts therein. Acts as a recur target.") + ("macroexpand" . "(macroexpand form) Repeatedly calls macroexpand-1 on form until it no longer represents a macro form, then returns it. Note neither macroexpand-1 nor macroexpand expand macros in subforms.") + ("macroexpand-1" . "(macroexpand-1 form) If form represents a macro form, returns its expansion, else returns form.") + ("make-array" . "(make-array type dim & more-dims) Creates and returns an array of instances of the specified class of the specified dimension(s). Note that a class object is required. Class objects can be obtained by using their imported or fully-qualified name. Class objects for the primitive types can be obtained using, e.g., Integer/TYPE.") + ("make-hierarchy)" . "(make-hierarchy) Creates a hierarchy object for use with derive, isa? etc.") + ("map" . "(map f c1 c2 c3 & colls) Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments.") + ("map-indexed" . "(map-indexed f coll) Returns a lazy sequence consisting of the result of applying f to 0 and the first item of coll, followed by applying f to 1 and the second item in coll, etc, until coll is exhausted. Thus function f should accept 2 arguments, index and item.") + ("map?" . "(map? x) Return true if x implements IPersistentMap") + ("mapcat" . "(mapcat f & colls) Returns the result of applying concat to the result of applying map to f and colls. Thus function f should return a collection.") + ("mapv" . "(mapv f c1 c2 c3 & colls) Returns a vector consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments.") + ("max" . "(max x y & more) Returns the greatest of the nums.") + ("max-key" . "(max-key k x y & more) Returns the x for which (k x), a number, is greatest.") + ("memfn" . "(memfn name & args) Expands into code that creates a fn that expects to be passed an object and any args and calls the named instance method on the object passing the args. Use when you want to treat a Java method as a first-class fn.") + ("memoize" . "(memoize f) Returns a memoized version of a referentially transparent function. The memoized version of the function keeps a cache of the mapping from arguments to results and, when calls with the same arguments are repeated often, has higher performance at the expense of higher memory use.") + ("merge" . "(merge & maps) Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping from the latter (left-to-right) will be the mapping in the result.") + ("merge-with" . "(merge-with f & maps) Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping(s) from the latter (left-to-right) will be combined with the mapping in the result by calling (f val-in-result val-in-latter).") + ("meta" . "(meta obj) Returns the metadata of obj, returns nil if there is no metadata.") + ("methods" . "(methods multifn) Given a multimethod, returns a map of dispatch values -> dispatch fns") + ("min" . "(min x y & more) Returns the least of the nums.") + ("min-key" . "(min-key k x y & more) Returns the x for which (k x), a number, is least.") + ("mod" . "(mod num div) Modulus of num and div. Truncates toward negative infinity.") + ("name" . "(name x) Returns the name String of a string, symbol or keyword.") + ("namespace" . "(namespace x) Returns the namespace String of a symbol or keyword, or nil if not present.") + ("namespace-munge" . "(namespace-munge ns) Convert a Clojure namespace name to a legal Java package name.") + ("neg?" . "(neg? x) Returns true if num is less than zero, else false") + ("newline)" . "(newline) Writes a platform-specific newline to *out*") + ("next" . "(next coll) Returns a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil.") + ("nfirst" . "(nfirst x) Same as (next (first x))") + ("nil?" . "(nil? x) Returns true if x is nil, false otherwise.") + ("nnext" . "(nnext x) Same as (next (next x))") + ("not" . "(not x) Returns true if x is logical false, false otherwise.") + ("not-any?" . "(not-any? pred coll) Returns false if (pred x) is logical true for any x in coll, else true.") + ("not-empty" . "(not-empty coll) If coll is empty, returns nil, else coll") + ("not-every?" . "(not-every? pred coll) Returns false if (pred x) is logical true for every x in coll, else true.") + ("not=" . "(not= x y & more) Same as (not (= obj1 obj2))") + ("ns" . "(ns name docstring? attr-map? references*) Sets *ns* to the namespace named by name (unevaluated), creating it if needed. references can be zero or more of: (:refer-clojure ...) (:require ...) (:use ...) (:import ...) (:load ...) (:gen-class) with the syntax of refer-clojure/require/use/import/load/gen-class respectively, except the arguments are unevaluated and need not be quoted. (:gen-class ...), when supplied, defaults to :name corresponding to the ns name, :main true, :impl-ns same as ns, and :init-impl-ns true. All options of gen-class are supported. The :gen-class directive is ignored when not compiling. If :gen-class is not supplied, when compiled only an nsname__init.class will be generated. If :refer-clojure is not used, a default (refer 'clojure) is used. Use of ns is preferred to individual calls to in-ns/require/use/import: (ns foo.bar (:refer-clojure :exclude [ancestors printf]) (:require (clojure.contrib sql combinatorics)) (:use (my.lib this that)) (:import (java.util Date Timer Random) (java.sql Connection Statement)))") + ("ns-aliases" . "(ns-aliases ns) Returns a map of the aliases for the namespace.") + ("ns-imports" . "(ns-imports ns) Returns a map of the import mappings for the namespace.") + ("ns-interns" . "(ns-interns ns) Returns a map of the intern mappings for the namespace.") + ("ns-map" . "(ns-map ns) Returns a map of all the mappings for the namespace.") + ("ns-name" . "(ns-name ns) Returns the name of the namespace, a symbol.") + ("ns-publics" . "(ns-publics ns) Returns a map of the public intern mappings for the namespace.") + ("ns-refers" . "(ns-refers ns) Returns a map of the refer mappings for the namespace.") + ("ns-resolve" . "(ns-resolve ns env sym) Returns the var or Class to which a symbol will be resolved in the namespace (unless found in the environement), else nil. Note that if the symbol is fully qualified, the var/Class to which it resolves need not be present in the namespace.") + ("ns-unalias" . "(ns-unalias ns sym) Removes the alias for the symbol from the namespace.") + ("ns-unmap" . "(ns-unmap ns sym) Removes the mappings for the symbol from the namespace.") + ("nth" . "(nth coll index not-found) Returns the value at the index. get returns nil if index out of bounds, nth throws an exception unless not-found is supplied. nth also works for strings, Java arrays, regex Matchers and Lists, and, in O(n) time, for sequences.") + ("nthnext" . "(nthnext coll n) Returns the nth next of coll, (seq coll) when n is 0.") + ("nthrest" . "(nthrest coll n) Returns the nth rest of coll, coll when n is 0.") + ("num" . "(num x) Coerce to Number") + ("number?" . "(number? x) Returns true if x is a Number") + ("numerator" . "(numerator r) Returns the numerator part of a Ratio.") + ("object-array" . "(object-array size-or-seq) Creates an array of objects") + ("odd?" . "(odd? n) Returns true if n is odd, throws an exception if n is not an integer") + ("or" . "(or x & next) Evaluates exprs one at a time, from left to right. If a form returns a logical true value, or returns that value and doesn't evaluate any of the other expressions, otherwise it returns the value of the last expression. (or) returns nil.") + ("parents" . "(parents h tag) Returns the immediate parents of tag, either via a Java type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy") + ("partial" . "(partial f arg1 arg2 arg3 & more) Takes a function f and fewer than the normal arguments to f, and returns a fn that takes a variable number of additional args. When called, the returned function calls f with args + additional args.") + ("partition" . "(partition n step pad coll) Returns a lazy sequence of lists of n items each, at offsets step apart. If step is not supplied, defaults to n, i.e. the partitions do not overlap. If a pad collection is supplied, use its elements as necessary to complete last partition upto n items. In case there are not enough padding elements, return a partition with less than n items.") + ("partition-all" . "(partition-all n step coll) Returns a lazy sequence of lists like partition, but may include partitions with fewer than n items at the end.") + ("partition-by" . "(partition-by f coll) Applies f to each value in coll, splitting it each time f returns a new value. Returns a lazy seq of partitions.") + ("pcalls" . "(pcalls & fns) Executes the no-arg fns in parallel, returning a lazy sequence of their values") + ("peek" . "(peek coll) For a list or queue, same as first, for a vector, same as, but much more efficient than, last. If the collection is empty, returns nil.") + ("persistent!" . "(persistent! coll) Alpha - subject to change. Returns a new, persistent version of the transient collection, in constant time. The transient collection cannot be used after this call, any such use will throw an exception.") + ("pmap" . "(pmap f coll & colls) Like map, except f is applied in parallel. Semi-lazy in that the parallel computation stays ahead of the consumption, but doesn't realize the entire result unless required. Only useful for computationally intensive functions where the time of f dominates the coordination overhead.") + ("pop" . "(pop coll) For a list or queue, returns a new list/queue without the first item, for a vector, returns a new vector without the last item. If the collection is empty, throws an exception. Note - not the same as next/butlast.") + ("pop!" . "(pop! coll) Alpha - subject to change. Removes the last item from a transient vector. If the collection is empty, throws an exception. Returns coll") + ("pop-thread-bindings)" . "(pop-thread-bindings) Pop one set of bindings pushed with push-binding before. It is an error to pop bindings without pushing before.") + ("pos?" . "(pos? x) Returns true if num is greater than zero, else false") + ("pr" . "(pr x & more) Prints the object(s) to the output stream that is the current value of *out*. Prints the object(s), separated by spaces if there is more than one. By default, pr and prn print in a way that objects can be read by the reader") + ("pr-str" . "(pr-str & xs) pr to a string, returning it") + ("prefer-method" . "(prefer-method multifn dispatch-val-x dispatch-val-y) Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y when there is a conflict") + ("prefers" . "(prefers multifn) Given a multimethod, returns a map of preferred value -> set of other values") + ("print" . "(print & more) Prints the object(s) to the output stream that is the current value of *out*. print and println produce output for human consumption.") + ("print-str" . "(print-str & xs) print to a string, returning it") + ("printf" . "(printf fmt & args) Prints formatted output, as per format") + ("println" . "(println & more) Same as print followed by (newline)") + ("println-str" . "(println-str & xs) println to a string, returning it") + ("prn" . "(prn & more) Same as pr followed by (newline). Observes *flush-on-newline*") + ("prn-str" . "(prn-str & xs) prn to a string, returning it") + ("promise)" . "(promise) Alpha - subject to change. Returns a promise object that can be read with deref/@, and set, once only, with deliver. Calls to deref/@ prior to delivery will block, unless the variant of deref with timeout is used. All subsequent derefs will return the same delivered value without blocking. See also - realized?.") + ("proxy" . "(proxy class-and-interfaces args & fs) class-and-interfaces - a vector of class names args - a (possibly empty) vector of arguments to the superclass constructor. f => (name [params*] body) or (name ([params*] body) ([params+] body) ...) Expands to code which creates a instance of a proxy class that implements the named class/interface(s) by calling the supplied fns. A single class, if provided, must be first. If not provided it defaults to Object. The interfaces names must be valid interface types. If a method fn is not provided for a class method, the superclass methd will be called. If a method fn is not provided for an interface method, an UnsupportedOperationException will be thrown should it be called. Method fns are closures and can capture the environment in which proxy is called. Each method fn takes an additional implicit first arg, which is bound to 'this. Note that while method fns can be provided to override protected methods, they have no other access to protected members, nor to super, as these capabilities cannot be proxied.") + ("proxy-mappings" . "(proxy-mappings proxy) Takes a proxy instance and returns the proxy's fn map.") + ("proxy-super" . "(proxy-super meth & args) Use to call a superclass method in the body of a proxy method. Note, expansion captures 'this") + ("push-thread-bindings" . "(push-thread-bindings bindings) WARNING: This is a low-level function. Prefer high-level macros like binding where ever possible. Takes a map of Var/value pairs. Binds each Var to the associated value for the current thread. Each call *MUST* be accompanied by a matching call to pop-thread-bindings wrapped in a try-finally! (push-thread-bindings bindings) (try ... (finally (pop-thread-bindings)))") + ("pvalues" . "(pvalues & exprs) Returns a lazy sequence of the values of the exprs, which are evaluated in parallel") + ("quot" . "(quot num div) quot[ient] of dividing numerator by denominator.") + ("rand" . "(rand n) Returns a random floating point number between 0 (inclusive) and n (default 1) (exclusive).") + ("rand-int" . "(rand-int n) Returns a random integer between 0 (inclusive) and n (exclusive).") + ("rand-nth" . "(rand-nth coll) Return a random element of the (sequential) collection. Will have the same performance characteristics as nth for the given collection.") + ("range" . "(range start end step) Returns a lazy seq of nums from start (inclusive) to end (exclusive), by step, where start defaults to 0, step to 1, and end to infinity.") + ("ratio?" . "(ratio? n) Returns true if n is a Ratio") + ("rational?" . "(rational? n) Returns true if n is a rational number") + ("rationalize" . "(rationalize num) returns the rational value of num") + ("re-find" . "(re-find re s) Returns the next regex match, if any, of string to pattern, using java.util.regex.Matcher.find(). Uses re-groups to return the groups.") + ("re-groups" . "(re-groups m) Returns the groups from the most recent match/find. If there are no nested groups, returns a string of the entire match. If there are nested groups, returns a vector of the groups, the first element being the entire match.") + ("re-matcher" . "(re-matcher re s) Returns an instance of java.util.regex.Matcher, for use, e.g. in re-find.") + ("re-matches" . "(re-matches re s) Returns the match, if any, of string to pattern, using java.util.regex.Matcher.matches(). Uses re-groups to return the groups.") + ("re-pattern" . "(re-pattern s) Returns an instance of java.util.regex.Pattern, for use, e.g. in re-matcher.") + ("re-seq" . "(re-seq re s) Returns a lazy sequence of successive matches of pattern in string, using java.util.regex.Matcher.find(), each such match processed with re-groups.") + ("read" . "(read stream eof-error? eof-value recursive?) Reads the next object from stream, which must be an instance of java.io.PushbackReader or some derivee. stream defaults to the current value of *in* .") + ("read-line)" . "(read-line) Reads the next line from stream that is the current value of *in* .") + ("read-string" . "(read-string s) Reads one object from the string s") + ("realized?" . "(realized? x) Returns true if a value has been produced for a promise, delay, future or lazy sequence.") + ("reduce" . "(reduce f val coll) f should be a function of 2 arguments. If val is not supplied, returns the result of applying f to the first 2 items in coll, then applying f to that result and the 3rd item, etc. If coll contains no items, f must accept no arguments as well, and reduce returns the result of calling f with no arguments. If coll has only 1 item, it is returned and f is not called. If val is supplied, returns the result of applying f to val and the first item in coll, then applying f to that result and the 2nd item, etc. If coll contains no items, returns val and f is not called.") + ("reduce-kv" . "(reduce-kv f init coll) Reduces an associative collection. f should be a function of 3 arguments. Returns the result of applying f to init, the first key and the first value in coll, then applying f to that result and the 2nd key and value, etc. If coll contains no entries, returns init and f is not called. Note that reduce-kv is supported on vectors, where the keys will be the ordinals.") + ("reductions" . "(reductions f init coll) Returns a lazy seq of the intermediate values of the reduction (as per reduce) of coll by f, starting with init.") + ("ref" . "(ref x & options) Creates and returns a Ref with an initial value of x and zero or more options (in any order): :meta metadata-map :validator validate-fn :min-history (default 0) :max-history (default 10) If metadata-map is supplied, it will be come the metadata on the ref. validate-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validate-fn should return false or throw an exception. validate-fn will be called on transaction commit, when all refs have their final values. Normally refs accumulate history dynamically as needed to deal with read demands. If you know in advance you will need history you can set :min-history to ensure it will be available when first needed (instead of after a read fault). History is limited, and the limit can be set with :max-history.") + ("ref-history-count" . "(ref-history-count ref) Returns the history count of a ref") + ("ref-max-history" . "(ref-max-history ref n) Gets the max-history of a ref, or sets it and returns the ref") + ("ref-min-history" . "(ref-min-history ref n) Gets the min-history of a ref, or sets it and returns the ref") + ("ref-set" . "(ref-set ref val) Must be called in a transaction. Sets the value of ref. Returns val.") + ("refer" . "(refer ns-sym & filters) refers to all public vars of ns, subject to filters. filters can include at most one each of: :exclude list-of-symbols :only list-of-symbols :rename map-of-fromsymbol-tosymbol For each public interned var in the namespace named by the symbol, adds a mapping from the name of the var to the var to the current namespace. Throws an exception if name is already mapped to something else in the current namespace. Filters can be used to select a subset, via inclusion or exclusion, or to provide a mapping to a symbol different from the var's name, in order to prevent clashes. Use :use in the ns macro in preference to calling this directly.") + ("refer-clojure" . "(refer-clojure & filters) Same as (refer 'clojure.core )") + ("reify" . "(reify & opts+specs) reify is a macro with the following structure: (reify options* specs*) Currently there are no options. Each spec consists of the protocol or interface name followed by zero or more method bodies: protocol-or-interface-or-Object (methodName [args+] body)* Methods should be supplied for all methods of the desired protocol(s) and interface(s). You can also define overrides for methods of Object. Note that the first parameter must be supplied to correspond to the target object ('this' in Java parlance). Thus methods for interfaces will take one more argument than do the interface declarations. Note also that recur calls to the method head should *not* pass the target object, it will be supplied automatically and can not be substituted. The return type can be indicated by a type hint on the method name, and arg types can be indicated by a type hint on arg names. If you leave out all hints, reify will try to match on same name/arity method in the protocol(s)/interface(s) - this is preferred. If you supply any hints at all, no inference is done, so all hints (or default of Object) must be correct, for both arguments and return type. If a method is overloaded in a protocol/interface, multiple independent method definitions must be supplied. If overloaded with same arity in an interface you must specify complete hints to disambiguate - a missing hint implies Object. recur works to method heads The method bodies of reify are lexical closures, and can refer to the surrounding local scope: (str (let [f \"foo\"] (reify Object (toString [this] f)))) == \"foo\" (seq (let [f \"foo\"] (reify clojure.lang.Seqable (seq [this] (seq f))))) == (\f \o \o)) reify always implements clojure.lang.IObj and transfers meta data of the form to the created object. (meta ^{:k :v} (reify Object (toString [this] \"foo\"))) == {:k :v}") + ("release-pending-sends)" . "(release-pending-sends) Normally, actions sent directly or indirectly during another action are held until the action completes (changes the agent's state). This function can be used to dispatch any pending sent actions immediately. This has no impact on actions sent during a transaction, which are still held until commit. If no action is occurring, does nothing. Returns the number of actions dispatched.") + ("rem" . "(rem num div) remainder of dividing numerator by denominator.") + ("remove" . "(remove pred coll) Returns a lazy sequence of the items in coll for which (pred item) returns false. pred must be free of side-effects.") + ("remove-all-methods" . "(remove-all-methods multifn) Removes all of the methods of multimethod.") + ("remove-method" . "(remove-method multifn dispatch-val) Removes the method of multimethod associated with dispatch-value.") + ("remove-ns" . "(remove-ns sym) Removes the namespace named by the symbol. Use with caution. Cannot be used to remove the clojure namespace.") + ("remove-watch" . "(remove-watch reference key) Alpha - subject to change. Removes a watch (set by add-watch) from a reference") + ("repeat" . "(repeat n x) Returns a lazy (infinite!, or length n if supplied) sequence of xs.") + ("repeatedly" . "(repeatedly n f) Takes a function of no args, presumably with side effects, and returns an infinite (or length n if supplied) lazy sequence of calls to it") + ("replace" . "(replace smap coll) Given a map of replacement pairs and a vector/collection, returns a vector/seq with any elements = a key in smap replaced with the corresponding val in smap") + ("replicate" . "(replicate n x) DEPRECATED: Use 'repeat' instead. Returns a lazy seq of n xs.") + ("require" . "(require & args) Loads libs, skipping any that are already loaded. Each argument is either a libspec that identifies a lib, a prefix list that identifies multiple libs whose names share a common prefix, or a flag that modifies how all the identified libs are loaded. Use :require in the ns macro in preference to calling this directly. Libs A 'lib' is a named set of resources in classpath whose contents define a library of Clojure code. Lib names are symbols and each lib is associated with a Clojure namespace and a Java package that share its name. A lib's name also locates its root directory within classpath using Java's package name to classpath-relative path mapping. All resources in a lib should be contained in the directory structure under its root directory. All definitions a lib makes should be in its associated namespace. 'require loads a lib by loading its root resource. The root resource path is derived from the lib name in the following manner: Consider a lib named by the symbol 'x.y.z; it has the root directory /x/y/, and its root resource is /x/y/z.clj. The root resource should contain code to create the lib's namespace (usually by using the ns macro) and load any additional lib resources. Libspecs A libspec is a lib name or a vector containing a lib name followed by options expressed as sequential keywords and arguments. Recognized options: :as takes a symbol as its argument and makes that symbol an alias to the lib's namespace in the current namespace. :refer takes a list of symbols to refer from the namespace or the :all keyword to bring in all public vars. Prefix Lists It's common for Clojure code to depend on several libs whose names have the same prefix. When specifying libs, prefix lists can be used to reduce repetition. A prefix list contains the shared prefix followed by libspecs with the shared prefix removed from the lib names. After removing the prefix, the names that remain must not contain any periods. Flags A flag is a keyword. Recognized flags: :reload, :reload-all, :verbose :reload forces loading of all the identified libs even if they are already loaded :reload-all implies :reload and also forces loading of all libs that the identified libs directly or indirectly load via require or use :verbose triggers printing information about each load, alias, and refer Example: The following would load the libraries clojure.zip and clojure.set abbreviated as 's'. (require '(clojure zip [set :as s]))") + ("reset!" . "(reset! atom newval) Sets the value of atom to newval without regard for the current value. Returns newval.") + ("reset-meta!" . "(reset-meta! iref metadata-map) Atomically resets the metadata for a namespace/var/ref/agent/atom") + ("resolve" . "(resolve env sym) same as (ns-resolve *ns* symbol) or (ns-resolve *ns* &env symbol)") + ("rest" . "(rest coll) Returns a possibly empty seq of the items after the first. Calls seq on its argument.") + ("restart-agent" . "(restart-agent a new-state & options) When an agent is failed, changes the agent state to new-state and then un-fails the agent so that sends are allowed again. If a :clear-actions true option is given, any actions queued on the agent that were being held while it was failed will be discarded, otherwise those held actions will proceed. The new-state must pass the validator if any, or restart will throw an exception and the agent will remain failed with its old state and error. Watchers, if any, will NOT be notified of the new state. Throws an exception if the agent is not failed.") + ("resultset-seq" . "(resultset-seq rs) Creates and returns a lazy sequence of structmaps corresponding to the rows in the java.sql.ResultSet rs") + ("reverse" . "(reverse coll) Returns a seq of the items in coll in reverse order. Not lazy.") + ("reversible?" . "(reversible? coll) Returns true if coll implements Reversible") + ("rseq" . "(rseq rev) Returns, in constant time, a seq of the items in rev (which can be a vector or sorted-map), in reverse order. If rev is empty returns nil") + ("rsubseq" . "(rsubseq sc start-test start-key end-test end-key) sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a reverse seq of those entries with keys ek for which (test (.. sc comparator (compare ek key)) 0) is true") + ("satisfies?" . "(satisfies? protocol x) Returns true if x satisfies the protocol") + ("second" . "(second x) Same as (first (next x))") + ("select-keys" . "(select-keys map keyseq) Returns a map containing only those entries in map whose key is in keys") + ("send" . "(send a f & args) Dispatch an action to an agent. Returns the agent immediately. Subsequently, in a thread from a thread pool, the state of the agent will be set to the value of: (apply action-fn state-of-agent args)") + ("send-off" . "(send-off a f & args) Dispatch a potentially blocking action to an agent. Returns the agent immediately. Subsequently, in a separate thread, the state of the agent will be set to the value of: (apply action-fn state-of-agent args)") + ("seq" . "(seq coll) Returns a seq on the collection. If the collection is empty, returns nil. (seq nil) returns nil. seq also works on Strings, native Java arrays (of reference types) and any objects that implement Iterable.") + ("seq?" . "(seq? x) Return true if x implements ISeq") + ("seque" . "(seque n-or-q s) Creates a queued seq on another (presumably lazy) seq s. The queued seq will produce a concrete seq in the background, and can get up to n items ahead of the consumer. n-or-q can be an integer n buffer size, or an instance of java.util.concurrent BlockingQueue. Note that reading from a seque can block if the reader gets ahead of the producer.") + ("sequence" . "(sequence coll) Coerces coll to a (possibly empty) sequence, if it is not already one. Will not force a lazy seq. (sequence nil) yields ()") + ("sequential?" . "(sequential? coll) Returns true if coll implements Sequential") + ("set" . "(set coll) Returns a set of the distinct elements of coll.") + ("set-error-handler!" . "(set-error-handler! a handler-fn) Sets the error-handler of agent a to handler-fn. If an action being run by the agent throws an exception or doesn't pass the validator fn, handler-fn will be called with two arguments: the agent and the exception.") + ("set-error-mode!" . "(set-error-mode! a mode-keyword) Sets the error-mode of agent a to mode-keyword, which must be either :fail or :continue. If an action being run by the agent throws an exception or doesn't pass the validator fn, an error-handler may be called (see set-error-handler!), after which, if the mode is :continue, the agent will continue as if neither the action that caused the error nor the error itself ever happened. If the mode is :fail, the agent will become failed and will stop accepting new 'send' and 'send-off' actions, and any previously queued actions will be held until a 'restart-agent'. Deref will still work, returning the state of the agent before the error.") + ("set-validator!" . "(set-validator! iref validator-fn) Sets the validator-fn for a var/ref/agent/atom. validator-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validator-fn should return false or throw an exception. If the current state (root value if var) is not acceptable to the new validator, an exception will be thrown and the validator will not be changed.") + ("set?" . "(set? x) Returns true if x implements IPersistentSet") + ("short" . "(short x) Coerce to short") + ("short-array" . "(short-array size init-val-or-seq) Creates an array of shorts") + ("shorts" . "(shorts xs) Casts to shorts[]") + ("shuffle" . "(shuffle coll) Return a random permutation of coll") + ("shutdown-agents)" . "(shutdown-agents) Initiates a shutdown of the thread pools that back the agent system. Running actions will complete, but no new actions will be accepted") + ("slurp" . "(slurp f & opts) Opens a reader on f and reads all its contents, returning a string. See clojure.java.io/reader for a complete list of supported arguments.") + ("some" . "(some pred coll) Returns the first logical true value of (pred x) for any x in coll, else nil. One common idiom is to use a set as pred, for example this will return :fred if :fred is in the sequence, otherwise nil: (some #{:fred} coll)") + ("some-fn" . "(some-fn p1 p2 p3 & ps) Takes a set of predicates and returns a function f that returns the first logical true value returned by one of its composing predicates against any of its arguments, else it returns logical false. Note that f is short-circuiting in that it will stop execution on the first argument that triggers a logical true result against the original predicates.") + ("sort" . "(sort comp coll) Returns a sorted sequence of the items in coll. If no comparator is supplied, uses compare. comparator must implement java.util.Comparator.") + ("sort-by" . "(sort-by keyfn comp coll) Returns a sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item). If no comparator is supplied, uses compare. comparator must implement java.util.Comparator.") + ("sorted-map" . "(sorted-map & keyvals) keyval => key val Returns a new sorted map with supplied mappings.") + ("sorted-map-by" . "(sorted-map-by comparator & keyvals) keyval => key val Returns a new sorted map with supplied mappings, using the supplied comparator.") + ("sorted-set" . "(sorted-set & keys) Returns a new sorted set with supplied keys.") + ("sorted-set-by" . "(sorted-set-by comparator & keys) Returns a new sorted set with supplied keys, using the supplied comparator.") + ("sorted?" . "(sorted? coll) Returns true if coll implements Sorted") + ("special-symbol?" . "(special-symbol? s) Returns true if s names a special form") + ("spit" . "(spit f content & options) Opposite of slurp. Opens f with writer, writes content, then closes f. Options passed to clojure.java.io/writer.") + ("split-at" . "(split-at n coll) Returns a vector of [(take n coll) (drop n coll)]") + ("split-with" . "(split-with pred coll) Returns a vector of [(take-while pred coll) (drop-while pred coll)]") + ("str" . "(str x & ys) With no args, returns the empty string. With one arg x, returns x.toString(). (str nil) returns the empty string. With more than one arg, returns the concatenation of the str values of the args.") + ("string?" . "(string? x) Return true if x is a String") + ("struct" . "(struct s & vals) Returns a new structmap instance with the keys of the structure-basis. vals must be supplied for basis keys in order - where values are not supplied they will default to nil.") + ("struct-map" . "(struct-map s & inits) Returns a new structmap instance with the keys of the structure-basis. keyvals may contain all, some or none of the basis keys - where values are not supplied they will default to nil. keyvals can also contain keys not in the basis.") + ("subs" . "(subs s start end) Returns the substring of s beginning at start inclusive, and ending at end (defaults to length of string), exclusive.") + ("subseq" . "(subseq sc start-test start-key end-test end-key) sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a seq of those entries with keys ek for which (test (.. sc comparator (compare ek key)) 0) is true") + ("subvec" . "(subvec v start end) Returns a persistent vector of the items in vector from start (inclusive) to end (exclusive). If end is not supplied, defaults to (count vector). This operation is O(1) and very fast, as the resulting vector shares structure with the original and no trimming is done.") + ("supers" . "(supers class) Returns the immediate and indirect superclasses and interfaces of c, if any") + ("swap!" . "(swap! atom f x y & args) Atomically swaps the value of atom to be: (apply f current-value-of-atom args). Note that f may be called multiple times, and thus should be free of side effects. Returns the value that was swapped in.") + ("symbol" . "(symbol ns name) Returns a Symbol with the given namespace and name.") + ("symbol?" . "(symbol? x) Return true if x is a Symbol") + ("sync" . "(sync flags-ignored-for-now & body) transaction-flags => TBD, pass nil for now Runs the exprs (in an implicit do) in a transaction that encompasses exprs and any nested calls. Starts a transaction if none is already running on this thread. Any uncaught exception will abort the transaction and flow out of sync. The exprs may be run more than once, but any effects on Refs will be atomic.") + ("take" . "(take n coll) Returns a lazy sequence of the first n items in coll, or all items if there are fewer than n.") + ("take-last" . "(take-last n coll) Returns a seq of the last n items in coll. Depending on the type of coll may be no better than linear time. For vectors, see also subvec.") + ("take-nth" . "(take-nth n coll) Returns a lazy seq of every nth item in coll.") + ("take-while" . "(take-while pred coll) Returns a lazy sequence of successive items from coll while (pred item) returns true. pred must be free of side-effects.") + ("test" . "(test v) test [v] finds fn at key :test in var metadata and calls it, presuming failure will throw exception") + ("the-ns" . "(the-ns x) If passed a namespace, returns it. Else, when passed a symbol, returns the namespace named by it, throwing an exception if not found.") + ("thread-bound?" . "(thread-bound? & vars) Returns true if all of the vars provided as arguments have thread-local bindings. Implies that set!'ing the provided vars will succeed. Returns true if no vars are provided.") + ("time" . "(time expr) Evaluates expr and prints the time it took. Returns the value of expr.") + ("to-array" . "(to-array coll) Returns an array of Objects containing the contents of coll, which can be any Collection. Maps to java.util.Collection.toArray().") + ("to-array-2d" . "(to-array-2d coll) Returns a (potentially-ragged) 2-dimensional array of Objects containing the contents of coll, which can be any Collection of any Collection.") + ("trampoline" . "(trampoline f & args) trampoline can be used to convert algorithms requiring mutual recursion without stack consumption. Calls f with supplied args, if any. If f returns a fn, calls that fn with no arguments, and continues to repeat, until the return value is not a fn, then returns that non-fn value. Note that if you want to return a fn as a final value, you must wrap it in some data structure and unpack it after trampoline returns.") + ("transient" . "(transient coll) Alpha - subject to change. Returns a new, transient version of the collection, in constant time.") + ("tree-seq" . "(tree-seq branch? children root) Returns a lazy sequence of the nodes in a tree, via a depth-first walk. branch? must be a fn of one arg that returns true if passed a node that can have children (but may not). children must be a fn of one arg that returns a sequence of the children. Will only be called on nodes for which branch? returns true. Root is the root node of the tree.") + ("true?" . "(true? x) Returns true if x is the value true, false otherwise.") + ("type" . "(type x) Returns the :type metadata of x, or its Class if none") + ("unchecked-add" . "(unchecked-add x y) Returns the sum of x and y, both long. Note - uses a primitive operator subject to overflow.") + ("unchecked-add-int" . "(unchecked-add-int x y) Returns the sum of x and y, both int. Note - uses a primitive operator subject to overflow.") + ("unchecked-byte" . "(unchecked-byte x) Coerce to byte. Subject to rounding or truncation.") + ("unchecked-char" . "(unchecked-char x) Coerce to char. Subject to rounding or truncation.") + ("unchecked-dec" . "(unchecked-dec x) Returns a number one less than x, a long. Note - uses a primitive operator subject to overflow.") + ("unchecked-dec-int" . "(unchecked-dec-int x) Returns a number one less than x, an int. Note - uses a primitive operator subject to overflow.") + ("unchecked-divide-int" . "(unchecked-divide-int x y) Returns the division of x by y, both int. Note - uses a primitive operator subject to truncation.") + ("unchecked-double" . "(unchecked-double x) Coerce to double. Subject to rounding.") + ("unchecked-float" . "(unchecked-float x) Coerce to float. Subject to rounding.") + ("unchecked-inc" . "(unchecked-inc x) Returns a number one greater than x, a long. Note - uses a primitive operator subject to overflow.") + ("unchecked-inc-int" . "(unchecked-inc-int x) Returns a number one greater than x, an int. Note - uses a primitive operator subject to overflow.") + ("unchecked-int" . "(unchecked-int x) Coerce to int. Subject to rounding or truncation.") + ("unchecked-long" . "(unchecked-long x) Coerce to long. Subject to rounding or truncation.") + ("unchecked-multiply" . "(unchecked-multiply x y) Returns the product of x and y, both long. Note - uses a primitive operator subject to overflow.") + ("unchecked-multiply-int" . "(unchecked-multiply-int x y) Returns the product of x and y, both int. Note - uses a primitive operator subject to overflow.") + ("unchecked-negate" . "(unchecked-negate x) Returns the negation of x, a long. Note - uses a primitive operator subject to overflow.") + ("unchecked-negate-int" . "(unchecked-negate-int x) Returns the negation of x, an int. Note - uses a primitive operator subject to overflow.") + ("unchecked-remainder-int" . "(unchecked-remainder-int x y) Returns the remainder of division of x by y, both int. Note - uses a primitive operator subject to truncation.") + ("unchecked-short" . "(unchecked-short x) Coerce to short. Subject to rounding or truncation.") + ("unchecked-subtract" . "(unchecked-subtract x y) Returns the difference of x and y, both long. Note - uses a primitive operator subject to overflow.") + ("unchecked-subtract-int" . "(unchecked-subtract-int x y) Returns the difference of x and y, both int. Note - uses a primitive operator subject to overflow.") + ("underive" . "(underive h tag parent) Removes a parent/child relationship between parent and tag. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to, and modifies, the global hierarchy.") + ("update-in" . "(update-in m [k & ks] f & args) 'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, and returns a new nested structure. If any levels do not exist, hash-maps will be created.") + ("update-proxy" . "(update-proxy proxy mappings) Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces) to fns (which must take arguments matching the corresponding method, plus an additional (explicit) first arg corresponding to this, and updates (via assoc) the proxy's fn map. nil can be passed instead of a fn, in which case the corresponding method will revert to the default behavior. Note that this function can be used to update the behavior of an existing instance without changing its identity. Returns the proxy.") + ("use" . "(use & args) Like 'require, but also refers to each lib's namespace using clojure.core/refer. Use :use in the ns macro in preference to calling this directly. 'use accepts additional options in libspecs: :exclude, :only, :rename. The arguments and semantics for :exclude, :only, and :rename are the same as those documented for clojure.core/refer.") + ("val" . "(val e) Returns the value in the map entry.") + ("vals" . "(vals map) Returns a sequence of the map's values.") + ("var-get" . "(var-get x) Gets the value in the var object") + ("var-set" . "(var-set x val) Sets the value in the var object to val. The var must be thread-locally bound.") + ("var?" . "(var? v) Returns true if v is of type clojure.lang.Var") + ("vary-meta" . "(vary-meta obj f & args) Returns an object of the same type and value as obj, with (apply f (meta obj) args) as its metadata.") + ("vec" . "(vec coll) Creates a new vector containing the contents of coll.") + ("vector" . "(vector a b c d & args) Creates a new vector containing the args.") + ("vector-of" . "(vector-of t & elements) Creates a new vector of a single primitive type t, where t is one of :int :long :float :double :byte :short :char or :boolean. The resulting vector complies with the interface of vectors in general, but stores the values unboxed internally. Optionally takes one or more elements to populate the vector.") + ("vector?" . "(vector? x) Return true if x implements IPersistentVector") + ("when" . "(when test & body) Evaluates test. If logical true, evaluates body in an implicit do.") + ("when-first" . "(when-first bindings & body) bindings => x xs Same as (when (seq xs) (let [x (first xs)] body))") + ("when-let" . "(when-let bindings & body) bindings => binding-form test When test is true, evaluates body with binding-form bound to the value of test") + ("when-not" . "(when-not test & body) Evaluates test. If logical false, evaluates body in an implicit do.") + ("while" . "(while test & body) Repeatedly executes body while test expression is true. Presumes some side-effect will cause test to become false/nil. Returns nil") + ("with-bindings" . "(with-bindings binding-map & body) Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. The executes body. Pops the installed bindings after body was evaluated. Returns the value of body.") + ("with-bindings*" . "(with-bindings* binding-map f & args) Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. Then calls f with the supplied arguments. Pops the installed bindings after f returned. Returns whatever f returns.") + ("with-in-str" . "(with-in-str s & body) Evaluates body in a context in which *in* is bound to a fresh StringReader initialized with the string s.") + ("with-local-vars" . "(with-local-vars name-vals-vec & body) varbinding=> symbol init-expr Executes the exprs in a context in which the symbols are bound to vars with per-thread bindings to the init-exprs. The symbols refer to the var objects themselves, and must be accessed with var-get and var-set") + ("with-meta" . "(with-meta obj m) Returns an object of the same type and value as obj, with map m as its metadata.") + ("with-open" . "(with-open bindings & body) bindings => [name init ...] Evaluates body in a try expression with names bound to the values of the inits, and a finally clause that calls (.close name) on each name in reverse order.") + ("with-out-str" . "(with-out-str & body) Evaluates exprs in a context in which *out* is bound to a fresh StringWriter. Returns the string created by any nested printing calls.") + ("with-precision" . "(with-precision precision & exprs) Sets the precision and rounding mode to be used for BigDecimal operations. Usage: (with-precision 10 (/ 1M 3)) or: (with-precision 10 :rounding HALF_DOWN (/ 1M 3)) The rounding mode is one of CEILING, FLOOR, HALF_UP, HALF_DOWN, HALF_EVEN, UP, DOWN and UNNECESSARY; it defaults to HALF_UP.") + ("with-redefs" . "(with-redefs bindings & body) binding => var-symbol temp-value-expr Temporarily redefines Vars while executing the body. The temp-value-exprs will be evaluated and each resulting value will replace in parallel the root value of its Var. After the body is executed, the root values of all the Vars will be set back to their old values. These temporary changes will be visible in all threads. Useful for mocking out functions during testing.") + ("with-redefs-fn" . "(with-redefs-fn binding-map func) Temporarily redefines Vars during a call to func. Each val of binding-map will replace the root value of its key which must be a Var. After func is called with no args, the root values of all the Vars will be set back to their old values. These temporary changes will be visible in all threads. Useful for mocking out functions during testing.") + ("xml-seq" . "(xml-seq root) A tree seq on the xml elements as per xml/parse") + ("zero?" . "(zero? x) Returns true if num is zero, else false") + ("zipmap" . "(zipmap keys vals) Returns a map with the keys mapped to the corresponding vals."))) + +(provide 'cljdoc) + +;;; cljdoc.el ends here diff --git a/site-lisp/cljdoc/doc b/site-lisp/cljdoc/doc new file mode 100644 index 0000000..2b6ebdd --- /dev/null +++ b/site-lisp/cljdoc/doc @@ -0,0 +1,518 @@ +clojure version 1.4 + +("*" . "(* x y & more) Returns the product of nums. (*) returns 1. Does not auto-promote longs, will throw on overflow. See also: *'") +("*'" . "(*' x y & more) Returns the product of nums. (*) returns 1. Supports arbitrary precision. See also: *") +("+" . "(+ x y & more) Returns the sum of nums. (+) returns 0. Does not auto-promote longs, will throw on overflow. See also: +'") +("+'" . "(+' x y & more) Returns the sum of nums. (+) returns 0. Supports arbitrary precision. See also: +") +("-" . "(- x y & more) If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result. Does not auto-promote longs, will throw on overflow. See also: -'") +("-'" . "(-' x y & more) If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result. Supports arbitrary precision. See also: -") +("->" . "(-> x form & more) Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc.") +("->>" . "(->> x form & more) Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the last item in second form, etc.") +("->ArrayChunk" . "(->ArrayChunk am arr off end) Positional factory function for class clojure.core.ArrayChunk.") +("->Vec" . "(->Vec am cnt shift root tail _meta) Positional factory function for class clojure.core.Vec.") +("->VecNode" . "(->VecNode edit arr) Positional factory function for class clojure.core.VecNode.") +("->VecSeq" . "(->VecSeq am vec anode i offset) Positional factory function for class clojure.core.VecSeq.") +(".." . "(.. x form & more) form => fieldName-symbol or (instanceMethodName-symbol args*) Expands into a member access (.) of the first member on the first argument, followed by the next member on the result, etc. For instance: (.. System (getProperties) (get \"os.name\")) expands to: (. (. System (getProperties)) (get \"os.name\")) but is easier to write, read, and understand.") +("/" . "(/ x y & more) If no denominators are supplied, returns 1/numerator, else returns numerator divided by all of the denominators.") +("<" . "(< x y & more) Returns non-nil if nums are in monotonically increasing order, otherwise false.") +("<=" . "(<= x y & more) Returns non-nil if nums are in monotonically non-decreasing order, otherwise false.") +("=" . "(= x y & more) Equality. Returns true if x equals y, false if not. Same as Java x.equals(y) except it also works for nil, and compares numbers and collections in a type-independent manner. Clojure's immutable data structures define equals() (and thus =) as a value, not an identity, comparison.") +("==" . "(== x y & more) Returns non-nil if nums all have the equivalent value (type-independent), otherwise false") +(">" . "(> x y & more) Returns non-nil if nums are in monotonically decreasing order, otherwise false.") +(">=" . "(>= x y & more) Returns non-nil if nums are in monotonically non-increasing order, otherwise false.") +("accessor" . "(accessor s key) Returns a fn that, given an instance of a structmap with the basis, returns the value at the key. The key must be in the basis. The returned function should be (slightly) more efficient than using get, but such use of accessors should be limited to known performance-critical areas.") +("aclone" . "(aclone array) Returns a clone of the Java array. Works on arrays of known types.") +("add-classpath" . "(add-classpath url) DEPRECATED Adds the url (String or URL object) to the classpath per URLClassLoader.addURL") +("add-watch" . "(add-watch reference key fn) Alpha - subject to change. Adds a watch function to an agent/atom/var/ref reference. The watch fn must be a fn of 4 args: a key, the reference, its old-state, its new-state. Whenever the reference's state might have been changed, any registered watches will have their functions called. The watch fn will be called synchronously, on the agent's thread if an agent, before any pending sends if agent or ref. Note that an atom's or ref's state may have changed again prior to the fn call, so use old/new-state rather than derefing the reference. Note also that watch fns may be called from multiple threads simultaneously. Var watchers are triggered only by root binding changes, not thread-local set!s. Keys must be unique per reference, and can be used to remove the watch with remove-watch, but are otherwise considered opaque by the watch mechanism.") +("agent" . "(agent state & options) Creates and returns an agent with an initial value of state and zero or more options (in any order): :meta metadata-map :validator validate-fn :error-handler handler-fn :error-mode mode-keyword If metadata-map is supplied, it will be come the metadata on the agent. validate-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validate-fn should return false or throw an exception. handler-fn is called if an action throws an exception or if validate-fn rejects a new state -- see set-error-handler! for details. The mode-keyword may be either :continue (the default if an error-handler is given) or :fail (the default if no error-handler is given) -- see set-error-mode! for details.") +("agent-error" . "(agent-error a) Returns the exception thrown during an asynchronous action of the agent if the agent is failed. Returns nil if the agent is not failed.") +("agent-errors" . "(agent-errors a) DEPRECATED: Use 'agent-error' instead. Returns a sequence of the exceptions thrown during asynchronous actions of the agent.") +("aget" . "(aget array idx & idxs) Returns the value at the index/indices. Works on Java arrays of all types.") +("alength" . "(alength array) Returns the length of the Java array. Works on arrays of all types.") +("alias" . "(alias alias namespace-sym) Add an alias in the current namespace to another namespace. Arguments are two symbols: the alias to be used, and the symbolic name of the target namespace. Use :as in the ns macro in preference to calling this directly.") +("all-ns)" . "(all-ns) Returns a sequence of all namespaces.") +("alter" . "(alter ref fun & args) Must be called in a transaction. Sets the in-transaction-value of ref to: (apply fun in-transaction-value-of-ref args) and returns the in-transaction-value of ref.") +("alter-meta!" . "(alter-meta! iref f & args) Atomically sets the metadata for a namespace/var/ref/agent/atom to be: (apply f its-current-meta args) f must be free of side-effects") +("alter-var-root" . "(alter-var-root v f & args) Atomically alters the root binding of var v by applying f to its current value plus any args") +("amap" . "(amap a idx ret expr) Maps an expression across an array a, using an index named idx, and return value named ret, initialized to a clone of a, then setting each element of ret to the evaluation of expr, returning the new array ret.") +("ancestors" . "(ancestors h tag) Returns the immediate and indirect parents of tag, either via a Java type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy") +("and" . "(and x & next) Evaluates exprs one at a time, from left to right. If a form returns logical false (nil or false), and returns that value and doesn't evaluate any of the other expressions, otherwise it returns the value of the last expr. (and) returns true.") +("apply" . "(apply f a b c d & args) Applies fn f to the argument list formed by prepending intervening arguments to args.") +("areduce" . "(areduce a idx ret init expr) Reduces an expression across an array a, using an index named idx, and return value named ret, initialized to init, setting ret to the evaluation of expr at each step, returning ret.") +("array-map" . "(array-map & keyvals) Constructs an array-map.") +("aset" . "(aset array idx idx2 & idxv) Sets the value at the index/indices. Works on Java arrays of reference types. Returns val.") +("aset-boolean" . "(aset-boolean array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of boolean. Returns val.") +("aset-byte" . "(aset-byte array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of byte. Returns val.") +("aset-char" . "(aset-char array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of char. Returns val.") +("aset-double" . "(aset-double array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of double. Returns val.") +("aset-float" . "(aset-float array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of float. Returns val.") +("aset-int" . "(aset-int array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of int. Returns val.") +("aset-long" . "(aset-long array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of long. Returns val.") +("aset-short" . "(aset-short array idx idx2 & idxv) Sets the value at the index/indices. Works on arrays of short. Returns val.") +("assert" . "(assert x message) Evaluates expr and throws an exception if it does not evaluate to logical true.") +("assoc" . "(assoc map key val & kvs) assoc[iate]. When applied to a map, returns a new map of the same (hashed/sorted) type, that contains the mapping of key(s) to val(s). When applied to a vector, returns a new vector that contains val at index. Note - index must be <= (count vector).") +("assoc!" . "(assoc! coll key val & kvs) Alpha - subject to change. When applied to a transient map, adds mapping of key(s) to val(s). When applied to a transient vector, sets the val at index. Note - index must be <= (count vector). Returns coll.") +("assoc-in" . "(assoc-in m [k & ks] v) Associates a value in a nested associative structure, where ks is a sequence of keys and v is the new value and returns a new nested structure. If any levels do not exist, hash-maps will be created.") +("associative?" . "(associative? coll) Returns true if coll implements Associative") +("atom" . "(atom x & options) Creates and returns an Atom with an initial value of x and zero or more options (in any order): :meta metadata-map :validator validate-fn If metadata-map is supplied, it will be come the metadata on the atom. validate-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validate-fn should return false or throw an exception.") +("await" . "(await & agents) Blocks the current thread (indefinitely!) until all actions dispatched thus far, from this thread or agent, to the agent(s) have occurred. Will block on failed agents. Will never return if a failed agent is restarted with :clear-actions true.") +("await-for" . "(await-for timeout-ms & agents) Blocks the current thread until all actions dispatched thus far (from this thread or agent) to the agents have occurred, or the timeout (in milliseconds) has elapsed. Returns logical false if returning due to timeout, logical true otherwise.") +("bases" . "(bases c) Returns the immediate superclass and direct interfaces of c, if any") +("bean" . "(bean x) Takes a Java object and returns a read-only implementation of the map abstraction based upon its JavaBean properties.") +("bigdec" . "(bigdec x) Coerce to BigDecimal") +("bigint" . "(bigint x) Coerce to BigInt") +("biginteger" . "(biginteger x) Coerce to BigInteger") +("binding" . "(binding bindings & body) binding => var-symbol init-expr Creates new bindings for the (already-existing) vars, with the supplied initial values, executes the exprs in an implicit do, then re-establishes the bindings that existed before. The new bindings are made in parallel (unlike let); all init-exprs are evaluated before the vars are bound to their new values.") +("bit-and" . "(bit-and x y & more) Bitwise and") +("bit-and-not" . "(bit-and-not x y & more) Bitwise and with complement") +("bit-clear" . "(bit-clear x n) Clear bit at index n") +("bit-flip" . "(bit-flip x n) Flip bit at index n") +("bit-not" . "(bit-not x) Bitwise complement") +("bit-or" . "(bit-or x y & more) Bitwise or") +("bit-set" . "(bit-set x n) Set bit at index n") +("bit-shift-left" . "(bit-shift-left x n) Bitwise shift left") +("bit-shift-right" . "(bit-shift-right x n) Bitwise shift right") +("bit-test" . "(bit-test x n) Test bit at index n") +("bit-xor" . "(bit-xor x y & more) Bitwise exclusive or") +("boolean" . "(boolean x) Coerce to boolean") +("boolean-array" . "(boolean-array size init-val-or-seq) Creates an array of booleans") +("booleans" . "(booleans xs) Casts to boolean[]") +("bound-fn" . "(bound-fn & fntail) Returns a function defined by the given fntail, which will install the same bindings in effect as in the thread at the time bound-fn was called. This may be used to define a helper function which runs on a different thread, but needs the same bindings in place.") +("bound-fn*" . "(bound-fn* f) Returns a function, which will install the same bindings in effect as in the thread at the time bound-fn* was called and then call f with any given arguments. This may be used to define a helper function which runs on a different thread, but needs the same bindings in place.") +("bound?" . "(bound? & vars) Returns true if all of the vars provided as arguments have any bound value, root or thread-local. Implies that deref'ing the provided vars will succeed. Returns true if no vars are provided.") +("butlast" . "(butlast coll) Return a seq of all but the last item in coll, in linear time") +("byte" . "(byte x) Coerce to byte") +("byte-array" . "(byte-array size init-val-or-seq) Creates an array of bytes") +("bytes" . "(bytes xs) Casts to bytes[]") +("case" . "(case e & clauses) Takes an expression, and a set of clauses. Each clause can take the form of either: test-constant result-expr (test-constant1 ... test-constantN) result-expr The test-constants are not evaluated. They must be compile-time literals, and need not be quoted. If the expression is equal to a test-constant, the corresponding result-expr is returned. A single default expression can follow the clauses, and its value will be returned if no clause matches. If no default expression is provided and no clause matches, an IllegalArgumentException is thrown. Unlike cond and condp, case does a constant-time dispatch, the clauses are not considered sequentially. All manner of constant expressions are acceptable in case, including numbers, strings, symbols, keywords, and (Clojure) composites thereof. Note that since lists are used to group multiple constants that map to the same expression, a vector can be used to match a list if needed. The test-constants need not be all of the same type.") +("cast" . "(cast c x) Throws a ClassCastException if x is not a c, else returns x.") +("char" . "(char x) Coerce to char") +("char-array" . "(char-array size init-val-or-seq) Creates an array of chars") +("char?" . "(char? x) Return true if x is a Character") +("chars" . "(chars xs) Casts to chars[]") +("class" . "(class x) Returns the Class of x") +("class?" . "(class? x) Returns true if x is an instance of Class") +("clear-agent-errors" . "(clear-agent-errors a) DEPRECATED: Use 'restart-agent' instead. Clears any exceptions thrown during asynchronous actions of the agent, allowing subsequent actions to occur.") +("clojure-version)" . "(clojure-version) Returns clojure version as a printable string.") +("coll?" . "(coll? x) Returns true if x implements IPersistentCollection") +("comment" . "(comment & body) Ignores body, yields nil") +("commute" . "(commute ref fun & args) Must be called in a transaction. Sets the in-transaction-value of ref to: (apply fun in-transaction-value-of-ref args) and returns the in-transaction-value of ref. At the commit point of the transaction, sets the value of ref to be: (apply fun most-recently-committed-value-of-ref args) Thus fun should be commutative, or, failing that, you must accept last-one-in-wins behavior. commute allows for more concurrency than ref-set.") +("comp" . "(comp f1 f2 f3 & fs) Takes a set of functions and returns a fn that is the composition of those fns. The returned fn takes a variable number of args, applies the rightmost of fns to the args, the next fn (right-to-left) to the result, etc.") +("comparator" . "(comparator pred) Returns an implementation of java.util.Comparator based upon pred.") +("compare" . "(compare x y) Comparator. Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'greater than' y. Same as Java x.compareTo(y) except it also works for nil, and compares numbers and collections in a type-independent manner. x must implement Comparable") +("compare-and-set!" . "(compare-and-set! atom oldval newval) Atomically sets the value of atom to newval if and only if the current value of the atom is identical to oldval. Returns true if set happened, else false") +("compile" . "(compile lib) Compiles the namespace named by the symbol lib into a set of classfiles. The source for the lib must be in a proper classpath-relative directory. The output files will go into the directory specified by *compile-path*, and that directory too must be in the classpath.") +("complement" . "(complement f) Takes a fn f and returns a fn that takes the same arguments as f, has the same effects, if any, and returns the opposite truth value.") +("concat" . "(concat x y & zs) Returns a lazy seq representing the concatenation of the elements in the supplied colls.") +("cond" . "(cond & clauses) Takes a set of test/expr pairs. It evaluates each test one at a time. If a test returns logical true, cond evaluates and returns the value of the corresponding expr and doesn't evaluate any of the other tests or exprs. (cond) returns nil.") +("condp" . "(condp pred expr & clauses) Takes a binary predicate, an expression, and a set of clauses. Each clause can take the form of either: test-expr result-expr test-expr :>> result-fn Note :>> is an ordinary keyword. For each clause, (pred test-expr expr) is evaluated. If it returns logical true, the clause is a match. If a binary clause matches, the result-expr is returned, if a ternary clause matches, its result-fn, which must be a unary function, is called with the result of the predicate as its argument, the result of that call being the return value of condp. A single default expression can follow the clauses, and its value will be returned if no clause matches. If no default expression is provided and no clause matches, an IllegalArgumentException is thrown.") +("conj" . "(conj coll x & xs) conj[oin]. Returns a new collection with the xs 'added'. (conj nil item) returns (item). The 'addition' may happen at different 'places' depending on the concrete type.") +("conj!" . "(conj! coll x) Alpha - subject to change. Adds x to the transient collection, and return coll. The 'addition' may happen at different 'places' depending on the concrete type.") +("cons" . "(cons x seq) Returns a new seq where x is the first element and seq is the rest.") +("constantly" . "(constantly x) Returns a function that takes any number of arguments and returns x.") +("construct-proxy" . "(construct-proxy c & ctor-args) Takes a proxy class and any arguments for its superclass ctor and creates and returns an instance of the proxy.") +("contains?" . "(contains? coll key) Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or logarithmic time; it will not perform a linear search for a value. See also 'some'.") +("count" . "(count coll) Returns the number of items in the collection. (count nil) returns 0. Also works on strings, arrays, and Java Collections and Maps") +("counted?" . "(counted? coll) Returns true if coll implements count in constant time") +("create-ns" . "(create-ns sym) Create a new namespace named by the symbol if one doesn't already exist, returns it or the already-existing namespace of the same name.") +("create-struct" . "(create-struct & keys) Returns a structure basis object.") +("cycle" . "(cycle coll) Returns a lazy (infinite!) sequence of repetitions of the items in coll.") +("dec" . "(dec x) Returns a number one less than num. Does not auto-promote longs, will throw on overflow. See also: dec'") +("dec'" . "(dec' x) Returns a number one less than num. Supports arbitrary precision. See also: dec") +("decimal?" . "(decimal? n) Returns true if n is a BigDecimal") +("declare" . "(declare & names) defs the supplied var names with no bindings, useful for making forward declarations.") +("definline" . "(definline name & decl) Experimental - like defmacro, except defines a named function whose body is the expansion, calls to which may be expanded inline as if it were a macro. Cannot be used with variadic (&) args.") +("defmacro" . "(defmacro name doc-string? attr-map? ([params*] body) + attr-map?) Like defn, but the resulting function name is declared as a macro and will be used as a macro by the compiler when it is called.") +("defmethod" . "(defmethod multifn dispatch-val & fn-tail) Creates and installs a new method of multimethod associated with dispatch-value. ") +("defmulti" . "(defmulti name docstring? attr-map? dispatch-fn & options) Creates a new multimethod with the associated dispatch function. The docstring and attribute-map are optional. Options are key-value pairs and may be one of: :default the default dispatch value, defaults to :default :hierarchy the isa? hierarchy to use for dispatching defaults to the global hierarchy") +("defn" . "(defn name doc-string? attr-map? ([params*] prepost-map? body) + attr-map?) Same as (def name (fn [params* ] exprs*)) or (def name (fn ([params* ] exprs*)+)) with any doc-string or attrs added to the var metadata. prepost-map defines a map with optional keys :pre and :post that contain collections of pre or post conditions.") +("defn-" . "(defn- name & decls) same as defn, yielding non-public def") +("defonce" . "(defonce name expr) defs name to have the root value of the expr iff the named var has no root value, else expr is unevaluated") +("defprotocol" . "(defprotocol name & opts+sigs) A protocol is a named set of named methods and their signatures: (defprotocol AProtocolName ;optional doc string \"A doc string for AProtocol abstraction\" ;method signatures (bar [this a b] \"bar docs\") (baz [this a] [this a b] [this a b c] \"baz docs\")) No implementations are provided. Docs can be specified for the protocol overall and for each method. The above yields a set of polymorphic functions and a protocol object. All are namespace-qualified by the ns enclosing the definition The resulting functions dispatch on the type of their first argument, which is required and corresponds to the implicit target object ('this' in Java parlance). defprotocol is dynamic, has no special compile-time effect, and defines no new types or classes. Implementations of the protocol methods can be provided using extend. defprotocol will automatically generate a corresponding interface, with the same name as the protocol, i.e. given a protocol: my.ns/Protocol, an interface: my.ns.Protocol. The interface will have methods corresponding to the protocol functions, and the protocol will automatically work with instances of the interface. Note that you should not use this interface with deftype or reify, as they support the protocol directly: (defprotocol P (foo [this]) (bar-me [this] [this y])) (deftype Foo [a b c] P (foo [this] a) (bar-me [this] b) (bar-me [this y] (+ c y))) (bar-me (Foo. 1 2 3) 42) => 45 (foo (let [x 42] (reify P (foo [this] 17) (bar-me [this] x) (bar-me [this y] x)))) => 17") +("defrecord" . "(defrecord name [& fields] & opts+specs) Alpha - subject to change (defrecord name [fields*] options* specs*) Currently there are no options. Each spec consists of a protocol or interface name followed by zero or more method bodies: protocol-or-interface-or-Object (methodName [args*] body)* Dynamically generates compiled bytecode for class with the given name, in a package with the same name as the current namespace, the given fields, and, optionally, methods for protocols and/or interfaces. The class will have the (immutable) fields named by fields, which can have type hints. Protocols/interfaces and methods are optional. The only methods that can be supplied are those declared in the protocols/interfaces. Note that method bodies are not closures, the local environment includes only the named fields, and those fields can be accessed directy. Method definitions take the form: (methodname [args*] body) The argument and return types can be hinted on the arg and methodname symbols. If not supplied, they will be inferred, so type hints should be reserved for disambiguation. Methods should be supplied for all methods of the desired protocol(s) and interface(s). You can also define overrides for methods of Object. Note that a parameter must be supplied to correspond to the target object ('this' in Java parlance). Thus methods for interfaces will take one more argument than do the interface declarations. Note also that recur calls to the method head should *not* pass the target object, it will be supplied automatically and can not be substituted. In the method bodies, the (unqualified) name can be used to name the class (for calls to new, instance? etc). The class will have implementations of several (clojure.lang) interfaces generated automatically: IObj (metadata support) and IPersistentMap, and all of their superinterfaces. In addition, defrecord will define type-and-value-based =, and will defined Java .hashCode and .equals consistent with the contract for java.util.Map. When AOT compiling, generates compiled bytecode for a class with the given name (a symbol), prepends the current ns as the package, and writes the .class file to the *compile-path* directory. Two constructors will be defined, one taking the designated fields followed by a metadata map (nil for none) and an extension field map (nil for none), and one taking only the fields (using nil for meta and extension fields). Note that the field names __meta and __extmap are currently reserved and should not be used when defining your own records. Given (defrecord TypeName ...), two factory functions will be defined: ->TypeName, taking positional parameters for the fields, and map->TypeName, taking a map of keywords to field values.") +("defstruct" . "(defstruct name & keys) Same as (def name (create-struct keys...))") +("deftype" . "(deftype name [& fields] & opts+specs) Alpha - subject to change (deftype name [fields*] options* specs*) Currently there are no options. Each spec consists of a protocol or interface name followed by zero or more method bodies: protocol-or-interface-or-Object (methodName [args*] body)* Dynamically generates compiled bytecode for class with the given name, in a package with the same name as the current namespace, the given fields, and, optionally, methods for protocols and/or interfaces. The class will have the (by default, immutable) fields named by fields, which can have type hints. Protocols/interfaces and methods are optional. The only methods that can be supplied are those declared in the protocols/interfaces. Note that method bodies are not closures, the local environment includes only the named fields, and those fields can be accessed directy. Fields can be qualified with the metadata :volatile-mutable true or :unsynchronized-mutable true, at which point (set! afield aval) will be supported in method bodies. Note well that mutable fields are extremely difficult to use correctly, and are present only to facilitate the building of higher level constructs, such as Clojure's reference types, in Clojure itself. They are for experts only - if the semantics and implications of :volatile-mutable or :unsynchronized-mutable are not immediately apparent to you, you should not be using them. Method definitions take the form: (methodname [args*] body) The argument and return types can be hinted on the arg and methodname symbols. If not supplied, they will be inferred, so type hints should be reserved for disambiguation. Methods should be supplied for all methods of the desired protocol(s) and interface(s). You can also define overrides for methods of Object. Note that a parameter must be supplied to correspond to the target object ('this' in Java parlance). Thus methods for interfaces will take one more argument than do the interface declarations. Note also that recur calls to the method head should *not* pass the target object, it will be supplied automatically and can not be substituted. In the method bodies, the (unqualified) name can be used to name the class (for calls to new, instance? etc). When AOT compiling, generates compiled bytecode for a class with the given name (a symbol), prepends the current ns as the package, and writes the .class file to the *compile-path* directory. One constructor will be defined, taking the designated fields. Note that the field names __meta and __extmap are currently reserved and should not be used when defining your own types. Given (deftype TypeName ...), a factory function called ->TypeName will be defined, taking positional parameters for the fields") +("delay" . "(delay & body) Takes a body of expressions and yields a Delay object that will invoke the body only the first time it is forced (with force or deref/@), and will cache the result and return it on all subsequent force calls. See also - realized?") +("delay?" . "(delay? x) returns true if x is a Delay created with delay") +("deliver" . "(deliver promise val) Alpha - subject to change. Delivers the supplied value to the promise, releasing any pending derefs. A subsequent call to deliver on a promise will throw an exception.") +("denominator" . "(denominator r) Returns the denominator part of a Ratio.") +("deref" . "(deref ref timeout-ms timeout-val) Also reader macro: @ref/@agent/@var/@atom/@delay/@future/@promise. Within a transaction, returns the in-transaction-value of ref, else returns the most-recently-committed value of ref. When applied to a var, agent or atom, returns its current state. When applied to a delay, forces it if not already forced. When applied to a future, will block if computation not complete. When applied to a promise, will block until a value is delivered. The variant taking a timeout can be used for blocking references (futures and promises), and will return timeout-val if the timeout (in milliseconds) is reached before a value is available. See also - realized?.") +("derive" . "(derive h tag parent) Establishes a parent/child relationship between parent and tag. Parent must be a namespace-qualified symbol or keyword and child can be either a namespace-qualified symbol or keyword or a class. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to, and modifies, the global hierarchy.") +("descendants" . "(descendants h tag) Returns the immediate and indirect children of tag, through a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy. Note: does not work on Java type inheritance relationships.") +("disj" . "(disj set key & ks) disj[oin]. Returns a new set of the same (hashed/sorted) type, that does not contain key(s).") +("disj!" . "(disj! set key & ks) Alpha - subject to change. disj[oin]. Returns a transient set of the same (hashed/sorted) type, that does not contain key(s).") +("dissoc" . "(dissoc map key & ks) dissoc[iate]. Returns a new map of the same (hashed/sorted) type, that does not contain a mapping for key(s).") +("dissoc!" . "(dissoc! map key & ks) Alpha - subject to change. Returns a transient map that doesn't contain a mapping for key(s).") +("distinct" . "(distinct coll) Returns a lazy sequence of the elements of coll with duplicates removed") +("distinct?" . "(distinct? x y & more) Returns true if no two of the arguments are =") +("doall" . "(doall n coll) When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. doall can be used to force any effects. Walks through the successive nexts of the seq, retains the head and returns it, thus causing the entire seq to reside in memory at one time.") +("dorun" . "(dorun n coll) When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. dorun can be used to force any effects. Walks through the successive nexts of the seq, does not retain the head and returns nil.") +("doseq" . "(doseq seq-exprs & body) Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by \"for\". Does not retain the head of the sequence. Returns nil.") +("dosync" . "(dosync & exprs) Runs the exprs (in an implicit do) in a transaction that encompasses exprs and any nested calls. Starts a transaction if none is already running on this thread. Any uncaught exception will abort the transaction and flow out of dosync. The exprs may be run more than once, but any effects on Refs will be atomic.") +("dotimes" . "(dotimes bindings & body) bindings => name n Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 through n-1.") +("doto" . "(doto x & forms) Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given arguments. The forms are evaluated in order. Returns x. (doto (new java.util.HashMap) (.put \"a\" 1) (.put \"b\" 2))") +("double" . "(double x) Coerce to double") +("double-array" . "(double-array size init-val-or-seq) Creates an array of doubles") +("doubles" . "(doubles xs) Casts to double[]") +("drop" . "(drop n coll) Returns a lazy sequence of all but the first n items in coll.") +("drop-last" . "(drop-last n s) Return a lazy sequence of all but the last n (default 1) items in coll") +("drop-while" . "(drop-while pred coll) Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns logical false.") +("empty" . "(empty coll) Returns an empty collection of the same category as coll, or nil") +("empty?" . "(empty? coll) Returns true if coll has no items - same as (not (seq coll)). Please use the idiom (seq x) rather than (not (empty? x))") +("ensure" . "(ensure ref) Must be called in a transaction. Protects the ref from modification by other transactions. Returns the in-transaction-value of ref. Allows for more concurrency than (ref-set ref @ref)") +("enumeration-seq" . "(enumeration-seq e) Returns a seq on a java.util.Enumeration") +("error-handler" . "(error-handler a) Returns the error-handler of agent a, or nil if there is none. See set-error-handler!") +("error-mode" . "(error-mode a) Returns the error-mode of agent a. See set-error-mode!") +("eval" . "(eval form) Evaluates the form data structure (not text!) and returns the result.") +("even?" . "(even? n) Returns true if n is even, throws an exception if n is not an integer") +("every-pred" . "(every-pred p1 p2 p3 & ps) Takes a set of predicates and returns a function f that returns true if all of its composing predicates return a logical true value against all of its arguments, else it returns false. Note that f is short-circuiting in that it will stop execution on the first argument that triggers a logical false result against the original predicates.") +("every?" . "(every? pred coll) Returns true if (pred x) is logical true for every x in coll, else false.") +("ex-data" . "(ex-data ex) Alpha - subject to change. Returns exception data (a map) if ex is an ExceptionInfo. Otherwise returns nil.") +("ex-info" . "(ex-info msg map cause) Alpha - subject to change. Create an instance of ExceptionInfo, a RuntimeException subclass that carries a map of additional data.") +("extend" . "(extend atype & proto+mmaps) Implementations of protocol methods can be provided using the extend construct: (extend AType AProtocol {:foo an-existing-fn :bar (fn [a b] ...) :baz (fn ([a]...) ([a b] ...)...)} BProtocol {...} ...) extend takes a type/class (or interface, see below), and one or more protocol + method map pairs. It will extend the polymorphism of the protocol's methods to call the supplied methods when an AType is provided as the first argument. Method maps are maps of the keyword-ized method names to ordinary fns. This facilitates easy reuse of existing fns and fn maps, for code reuse/mixins without derivation or composition. You can extend an interface to a protocol. This is primarily to facilitate interop with the host (e.g. Java) but opens the door to incidental multiple inheritance of implementation since a class can inherit from more than one interface, both of which extend the protocol. It is TBD how to specify which impl to use. You can extend a protocol on nil. If you are supplying the definitions explicitly (i.e. not reusing exsting functions or mixin maps), you may find it more convenient to use the extend-type or extend-protocol macros. Note that multiple independent extend clauses can exist for the same type, not all protocols need be defined in a single extend call. See also: extends?, satisfies?, extenders") +("extend-protocol" . "(extend-protocol p & specs) Useful when you want to provide several implementations of the same protocol all at once. Takes a single protocol and the implementation of that protocol for one or more types. Expands into calls to extend-type: (extend-protocol Protocol AType (foo [x] ...) (bar [x y] ...) BType (foo [x] ...) (bar [x y] ...) AClass (foo [x] ...) (bar [x y] ...) nil (foo [x] ...) (bar [x y] ...)) expands into: (do (clojure.core/extend-type AType Protocol (foo [x] ...) (bar [x y] ...)) (clojure.core/extend-type BType Protocol (foo [x] ...) (bar [x y] ...)) (clojure.core/extend-type AClass Protocol (foo [x] ...) (bar [x y] ...)) (clojure.core/extend-type nil Protocol (foo [x] ...) (bar [x y] ...)))") +("extend-type" . "(extend-type t & specs) A macro that expands into an extend call. Useful when you are supplying the definitions explicitly inline, extend-type automatically creates the maps required by extend. Propagates the class as a type hint on the first argument of all fns. (extend-type MyType Countable (cnt [c] ...) Foo (bar [x y] ...) (baz ([x] ...) ([x y & zs] ...))) expands into: (extend MyType Countable {:cnt (fn [c] ...)} Foo {:baz (fn ([x] ...) ([x y & zs] ...)) :bar (fn [x y] ...)})") +("extenders" . "(extenders protocol) Returns a collection of the types explicitly extending protocol") +("extends?" . "(extends? protocol atype) Returns true if atype extends protocol") +("false?" . "(false? x) Returns true if x is the value false, false otherwise.") +("ffirst" . "(ffirst x) Same as (first (first x))") +("file-seq" . "(file-seq dir) A tree seq on java.io.Files") +("filter" . "(filter pred coll) Returns a lazy sequence of the items in coll for which (pred item) returns true. pred must be free of side-effects.") +("filterv" . "(filterv pred coll) Returns a vector of the items in coll for which (pred item) returns true. pred must be free of side-effects.") +("find" . "(find map key) Returns the map entry for key, or nil if key not present.") +("find-keyword" . "(find-keyword ns name) Returns a Keyword with the given namespace and name if one already exists. This function will not intern a new keyword. If the keyword has not already been interned, it will return nil. Do not use : in the keyword strings, it will be added automatically.") +("find-ns" . "(find-ns sym) Returns the namespace named by the symbol or nil if it doesn't exist.") +("find-var" . "(find-var sym) Returns the global var named by the namespace-qualified symbol, or nil if no var with that name.") +("first" . "(first coll) Returns the first item in the collection. Calls seq on its argument. If coll is nil, returns nil.") +("flatten" . "(flatten x) Takes any nested combination of sequential things (lists, vectors, etc.) and returns their contents as a single, flat sequence. (flatten nil) returns an empty sequence.") +("float" . "(float x) Coerce to float") +("float-array" . "(float-array size init-val-or-seq) Creates an array of floats") +("float?" . "(float? n) Returns true if n is a floating point number") +("floats" . "(floats xs) Casts to float[]") +("flush)" . "(flush) Flushes the output stream that is the current value of *out*") +("fn" . "(fn & sigs) params => positional-params* , or positional-params* & next-param positional-param => binding-form next-param => binding-form name => symbol Defines a function") +("fn?" . "(fn? x) Returns true if x implements Fn, i.e. is an object created via fn.") +("fnext" . "(fnext x) Same as (first (next x))") +("fnil" . "(fnil f x y z) Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. Higher arity versions can replace arguments in the second and third positions (y, z). Note that the function f can take any number of arguments, not just the one(s) being nil-patched.") +("for" . "(for seq-exprs body-expr) List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more modifiers, and yields a lazy sequence of evaluations of expr. Collections are iterated in a nested fashion, rightmost fastest, and nested coll-exprs can refer to bindings created in prior binding-forms. Supported modifiers are: :let [binding-form expr ...], :while test, :when test. (take 100 (for [x (range 100000000) y (range 1000000) :while (< y x)] [x y]))") +("force" . "(force x) If x is a Delay, returns the (possibly cached) value of its expression, else returns x") +("format" . "(format fmt & args) Formats a string using java.lang.String.format, see java.util.Formatter for format string syntax") +("frequencies" . "(frequencies coll) Returns a map from distinct items in coll to the number of times they appear.") +("future" . "(future & body) Takes a body of expressions and yields a future object that will invoke the body in another thread, and will cache the result and return it on all subsequent calls to deref/@. If the computation has not yet finished, calls to deref/@ will block, unless the variant of deref with timeout is used. See also - realized?.") +("future-call" . "(future-call f) Takes a function of no args and yields a future object that will invoke the function in another thread, and will cache the result and return it on all subsequent calls to deref/@. If the computation has not yet finished, calls to deref/@ will block, unless the variant of deref with timeout is used. See also - realized?.") +("future-cancel" . "(future-cancel f) Cancels the future, if possible.") +("future-cancelled?" . "(future-cancelled? f) Returns true if future f is cancelled") +("future-done?" . "(future-done? f) Returns true if future f is done") +("future?" . "(future? x) Returns true if x is a future") +("gen-class" . "(gen-class & options) When compiling, generates compiled bytecode for a class with the given package-qualified :name (which, as all names in these parameters, can be a string or symbol), and writes the .class file to the *compile-path* directory. When not compiling, does nothing. The gen-class construct contains no implementation, as the implementation will be dynamically sought by the generated class in functions in an implementing Clojure namespace. Given a generated class org.mydomain.MyClass with a method named mymethod, gen-class will generate an implementation that looks for a function named by (str prefix mymethod) (default prefix: \"-\") in a Clojure namespace specified by :impl-ns (defaults to the current namespace). All inherited methods, generated methods, and init and main functions (see :methods, :init, and :main below) will be found similarly prefixed. By default, the static initializer for the generated class will attempt to load the Clojure support code for the class as a resource from the classpath, e.g. in the example case, ``org/mydomain/MyClass__init.class``. This behavior can be controlled by :load-impl-ns Note that methods with a maximum of 18 parameters are supported. In all subsequent sections taking types, the primitive types can be referred to by their Java names (int, float etc), and classes in the java.lang package can be used without a package qualifier. All other classes must be fully qualified. Options should be a set of key/value pairs, all except for :name are optional: :name aname The package-qualified name of the class to be generated :extends aclass Specifies the superclass, the non-private methods of which will be overridden by the class. If not provided, defaults to Object. :implements [interface ...] One or more interfaces, the methods of which will be implemented by the class. :init name If supplied, names a function that will be called with the arguments to the constructor. Must return [ [superclass-constructor-args] state] If not supplied, the constructor args are passed directly to the superclass constructor and the state will be nil :constructors {[param-types] [super-param-types], ...} By default, constructors are created for the generated class which match the signature(s) of the constructors for the superclass. This parameter may be used to explicitly specify constructors, each entry providing a mapping from a constructor signature to a superclass constructor signature. When you supply this, you must supply an :init specifier. :post-init name If supplied, names a function that will be called with the object as the first argument, followed by the arguments to the constructor. It will be called every time an object of this class is created, immediately after all the inherited constructors have completed. It's return value is ignored. :methods [ [name [param-types] return-type], ...] The generated class automatically defines all of the non-private methods of its superclasses/interfaces. This parameter can be used to specify the signatures of additional methods of the generated class. Static methods can be specified with ^{:static true} in the signature's metadata. Do not repeat superclass/interface signatures here. :main boolean If supplied and true, a static public main function will be generated. It will pass each string of the String[] argument as a separate argument to a function called (str prefix main). :factory name If supplied, a (set of) public static factory function(s) will be created with the given name, and the same signature(s) as the constructor(s). :state name If supplied, a public final instance field with the given name will be created. You must supply an :init function in order to provide a value for the state. Note that, though final, the state can be a ref or agent, supporting the creation of Java objects with transactional or asynchronous mutation semantics. :exposes {protected-field-name {:get name :set name}, ...} Since the implementations of the methods of the generated class occur in Clojure functions, they have no access to the inherited protected fields of the superclass. This parameter can be used to generate public getter/setter methods exposing the protected field(s) for use in the implementation. :exposes-methods {super-method-name exposed-name, ...} It is sometimes necessary to call the superclass' implementation of an overridden method. Those methods may be exposed and referred in the new method implementation by a local name. :prefix string Default: \"-\" Methods called e.g. Foo will be looked up in vars called prefixFoo in the implementing ns. :impl-ns name Default: the name of the current ns. Implementations of methods will be looked up in this namespace. :load-impl-ns boolean Default: true. Causes the static initializer for the generated class to reference the load code for the implementing namespace. Should be true when implementing-ns is the default, false if you intend to load the code via some other method.") +("gen-interface" . "(gen-interface & options) When compiling, generates compiled bytecode for an interface with the given package-qualified :name (which, as all names in these parameters, can be a string or symbol), and writes the .class file to the *compile-path* directory. When not compiling, does nothing. In all subsequent sections taking types, the primitive types can be referred to by their Java names (int, float etc), and classes in the java.lang package can be used without a package qualifier. All other classes must be fully qualified. Options should be a set of key/value pairs, all except for :name are optional: :name aname The package-qualified name of the class to be generated :extends [interface ...] One or more interfaces, which will be extended by this interface. :methods [ [name [param-types] return-type], ...] This parameter is used to specify the signatures of the methods of the generated interface. Do not repeat superinterface signatures here.") +("gensym" . "(gensym prefix-string) Returns a new symbol with a unique name. If a prefix string is supplied, the name is prefix# where # is some unique number. If prefix is not supplied, the prefix is 'G__'.") +("get" . "(get map key not-found) Returns the value mapped to key, not-found or nil if key not present.") +("get-in" . "(get-in m ks not-found) Returns the value in a nested associative structure, where ks is a sequence of keys. Returns nil if the key is not present, or the not-found value if supplied.") +("get-method" . "(get-method multifn dispatch-val) Given a multimethod and a dispatch value, returns the dispatch fn that would apply to that value, or nil if none apply and no default") +("get-proxy-class" . "(get-proxy-class & bases) Takes an optional single class followed by zero or more interfaces. If not supplied class defaults to Object. Creates an returns an instance of a proxy class derived from the supplied classes. The resulting value is cached and used for any subsequent requests for the same class set. Returns a Class object.") +("get-thread-bindings)" . "(get-thread-bindings) Get a map with the Var/value pairs which is currently in effect for the current thread.") +("get-validator" . "(get-validator iref) Gets the validator-fn for a var/ref/agent/atom.") +("group-by" . "(group-by f coll) Returns a map of the elements of coll keyed by the result of f on each element. The value at each key will be a vector of the corresponding elements, in the order they appeared in coll.") +("hash" . "(hash x) Returns the hash code of its argument. Note this is the hash code consistent with =, and thus is different than .hashCode for Integer, Short, Byte and Clojure collections.") +("hash-map" . "(hash-map & keyvals) keyval => key val Returns a new hash map with supplied mappings.") +("hash-set" . "(hash-set & keys) Returns a new hash set with supplied keys.") +("identical?" . "(identical? x y) Tests if 2 arguments are the same object") +("identity" . "(identity x) Returns its argument.") +("if-let" . "(if-let bindings then else & oldform) bindings => binding-form test If test is true, evaluates then with binding-form bound to the value of test, if not, yields else") +("if-not" . "(if-not test then else) Evaluates test. If logical false, evaluates and returns then expr, otherwise else expr, if supplied, else nil.") +("ifn?" . "(ifn? x) Returns true if x implements IFn. Note that many data structures (e.g. sets and maps) implement IFn") +("import" . "(import & import-symbols-or-lists) import-list => (package-symbol class-name-symbols*) For each name in class-name-symbols, adds a mapping from name to the class named by package.name to the current namespace. Use :import in the ns macro in preference to calling this directly.") +("in-ns" . "(in-ns name) Sets *ns* to the namespace named by the symbol, creating it if needed.") +("inc" . "(inc x) Returns a number one greater than num. Does not auto-promote longs, will throw on overflow. See also: inc'") +("inc'" . "(inc' x) Returns a number one greater than num. Supports arbitrary precision. See also: inc") +("init-proxy" . "(init-proxy proxy mappings) Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces) to fns (which must take arguments matching the corresponding method, plus an additional (explicit) first arg corresponding to this, and sets the proxy's fn map. Returns the proxy.") +("instance?" . "(instance? c x) Evaluates x and tests if it is an instance of the class c. Returns true or false") +("int" . "(int x) Coerce to int") +("int-array" . "(int-array size init-val-or-seq) Creates an array of ints") +("integer?" . "(integer? n) Returns true if n is an integer") +("interleave" . "(interleave c1 c2 & colls) Returns a lazy seq of the first item in each coll, then the second etc.") +("intern" . "(intern ns name val) Finds or creates a var named by the symbol name in the namespace ns (which can be a symbol or a namespace), setting its root binding to val if supplied. The namespace must exist. The var will adopt any metadata from the name symbol. Returns the var.") +("interpose" . "(interpose sep coll) Returns a lazy seq of the elements of coll separated by sep") +("into" . "(into to from) Returns a new coll consisting of to-coll with all of the items of from-coll conjoined.") +("into-array" . "(into-array type aseq) Returns an array with components set to the values in aseq. The array's component type is type if provided, or the type of the first value in aseq if present, or Object. All values in aseq must be compatible with the component type. Class objects for the primitive types can be obtained using, e.g., Integer/TYPE.") +("ints" . "(ints xs) Casts to int[]") +("io!" . "(io! & body) If an io! block occurs in a transaction, throws an IllegalStateException, else runs body in an implicit do. If the first expression in body is a literal string, will use that as the exception message.") +("isa?" . "(isa? h child parent) Returns true if (= child parent), or child is directly or indirectly derived from parent, either via a Java type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy") +("iterate" . "(iterate f x) Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects") +("iterator-seq" . "(iterator-seq iter) Returns a seq on a java.util.Iterator. Note that most collections providing iterators implement Iterable and thus support seq directly.") +("juxt" . "(juxt f g h & fs) Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applying each fn to the args (left-to-right). ((juxt a b c) x) => [(a x) (b x) (c x)]") +("keep" . "(keep f coll) Returns a lazy sequence of the non-nil results of (f item). Note, this means false return values will be included. f must be free of side-effects.") +("keep-indexed" . "(keep-indexed f coll) Returns a lazy sequence of the non-nil results of (f index item). Note, this means false return values will be included. f must be free of side-effects.") +("key" . "(key e) Returns the key of the map entry.") +("keys" . "(keys map) Returns a sequence of the map's keys.") +("keyword" . "(keyword ns name) Returns a Keyword with the given namespace and name. Do not use : in the keyword strings, it will be added automatically.") +("keyword?" . "(keyword? x) Return true if x is a Keyword") +("last" . "(last coll) Return the last item in coll, in linear time") +("lazy-cat" . "(lazy-cat & colls) Expands to code which yields a lazy sequence of the concatenation of the supplied colls. Each coll expr is not evaluated until it is needed. (lazy-cat xs ys zs) === (concat (lazy-seq xs) (lazy-seq ys) (lazy-seq zs))") +("lazy-seq" . "(lazy-seq & body) Takes a body of expressions that returns an ISeq or nil, and yields a Seqable object that will invoke the body only the first time seq is called, and will cache the result and return it on all subsequent seq calls. See also - realized?") +("let" . "(let bindings & body) binding => binding-form init-expr Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-exprs or parts therein.") +("letfn" . "(letfn fnspecs & body) fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+) Takes a vector of function specs and a body, and generates a set of bindings of functions to their names. All of the names are available in all of the definitions of the functions, as well as the body.") +("line-seq" . "(line-seq rdr) Returns the lines of text from rdr as a lazy sequence of strings. rdr must implement java.io.BufferedReader.") +("list" . "(list & items) Creates a new list containing the items.") +("list*" . "(list* a b c d & more) Creates a new list containing the items prepended to the rest, the last of which will be treated as a sequence.") +("list?" . "(list? x) Returns true if x implements IPersistentList") +("load" . "(load & paths) Loads Clojure code from resources in classpath. A path is interpreted as classpath-relative if it begins with a slash or relative to the root directory for the current namespace otherwise.") +("load-file" . "(load-file name) Sequentially read and evaluate the set of forms contained in the file.") +("load-reader" . "(load-reader rdr) Sequentially read and evaluate the set of forms contained in the stream/file") +("load-string" . "(load-string s) Sequentially read and evaluate the set of forms contained in the string") +("loaded-libs)" . "(loaded-libs) Returns a sorted set of symbols naming the currently loaded libs") +("locking" . "(locking x & body) Executes exprs in an implicit do, while holding the monitor of x. Will release the monitor of x in all circumstances.") +("long" . "(long x) Coerce to long") +("long-array" . "(long-array size init-val-or-seq) Creates an array of longs") +("longs" . "(longs xs) Casts to long[]") +("loop" . "(loop bindings & body) Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-exprs or parts therein. Acts as a recur target.") +("macroexpand" . "(macroexpand form) Repeatedly calls macroexpand-1 on form until it no longer represents a macro form, then returns it. Note neither macroexpand-1 nor macroexpand expand macros in subforms.") +("macroexpand-1" . "(macroexpand-1 form) If form represents a macro form, returns its expansion, else returns form.") +("make-array" . "(make-array type dim & more-dims) Creates and returns an array of instances of the specified class of the specified dimension(s). Note that a class object is required. Class objects can be obtained by using their imported or fully-qualified name. Class objects for the primitive types can be obtained using, e.g., Integer/TYPE.") +("make-hierarchy)" . "(make-hierarchy) Creates a hierarchy object for use with derive, isa? etc.") +("map" . "(map f c1 c2 c3 & colls) Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments.") +("map-indexed" . "(map-indexed f coll) Returns a lazy sequence consisting of the result of applying f to 0 and the first item of coll, followed by applying f to 1 and the second item in coll, etc, until coll is exhausted. Thus function f should accept 2 arguments, index and item.") +("map?" . "(map? x) Return true if x implements IPersistentMap") +("mapcat" . "(mapcat f & colls) Returns the result of applying concat to the result of applying map to f and colls. Thus function f should return a collection.") +("mapv" . "(mapv f c1 c2 c3 & colls) Returns a vector consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments.") +("max" . "(max x y & more) Returns the greatest of the nums.") +("max-key" . "(max-key k x y & more) Returns the x for which (k x), a number, is greatest.") +("memfn" . "(memfn name & args) Expands into code that creates a fn that expects to be passed an object and any args and calls the named instance method on the object passing the args. Use when you want to treat a Java method as a first-class fn.") +("memoize" . "(memoize f) Returns a memoized version of a referentially transparent function. The memoized version of the function keeps a cache of the mapping from arguments to results and, when calls with the same arguments are repeated often, has higher performance at the expense of higher memory use.") +("merge" . "(merge & maps) Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping from the latter (left-to-right) will be the mapping in the result.") +("merge-with" . "(merge-with f & maps) Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping(s) from the latter (left-to-right) will be combined with the mapping in the result by calling (f val-in-result val-in-latter).") +("meta" . "(meta obj) Returns the metadata of obj, returns nil if there is no metadata.") +("methods" . "(methods multifn) Given a multimethod, returns a map of dispatch values -> dispatch fns") +("min" . "(min x y & more) Returns the least of the nums.") +("min-key" . "(min-key k x y & more) Returns the x for which (k x), a number, is least.") +("mod" . "(mod num div) Modulus of num and div. Truncates toward negative infinity.") +("name" . "(name x) Returns the name String of a string, symbol or keyword.") +("namespace" . "(namespace x) Returns the namespace String of a symbol or keyword, or nil if not present.") +("namespace-munge" . "(namespace-munge ns) Convert a Clojure namespace name to a legal Java package name.") +("neg?" . "(neg? x) Returns true if num is less than zero, else false") +("newline)" . "(newline) Writes a platform-specific newline to *out*") +("next" . "(next coll) Returns a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil.") +("nfirst" . "(nfirst x) Same as (next (first x))") +("nil?" . "(nil? x) Returns true if x is nil, false otherwise.") +("nnext" . "(nnext x) Same as (next (next x))") +("not" . "(not x) Returns true if x is logical false, false otherwise.") +("not-any?" . "(not-any? pred coll) Returns false if (pred x) is logical true for any x in coll, else true.") +("not-empty" . "(not-empty coll) If coll is empty, returns nil, else coll") +("not-every?" . "(not-every? pred coll) Returns false if (pred x) is logical true for every x in coll, else true.") +("not=" . "(not= x y & more) Same as (not (= obj1 obj2))") +("ns" . "(ns name docstring? attr-map? references*) Sets *ns* to the namespace named by name (unevaluated), creating it if needed. references can be zero or more of: (:refer-clojure ...) (:require ...) (:use ...) (:import ...) (:load ...) (:gen-class) with the syntax of refer-clojure/require/use/import/load/gen-class respectively, except the arguments are unevaluated and need not be quoted. (:gen-class ...), when supplied, defaults to :name corresponding to the ns name, :main true, :impl-ns same as ns, and :init-impl-ns true. All options of gen-class are supported. The :gen-class directive is ignored when not compiling. If :gen-class is not supplied, when compiled only an nsname__init.class will be generated. If :refer-clojure is not used, a default (refer 'clojure) is used. Use of ns is preferred to individual calls to in-ns/require/use/import: (ns foo.bar (:refer-clojure :exclude [ancestors printf]) (:require (clojure.contrib sql combinatorics)) (:use (my.lib this that)) (:import (java.util Date Timer Random) (java.sql Connection Statement)))") +("ns-aliases" . "(ns-aliases ns) Returns a map of the aliases for the namespace.") +("ns-imports" . "(ns-imports ns) Returns a map of the import mappings for the namespace.") +("ns-interns" . "(ns-interns ns) Returns a map of the intern mappings for the namespace.") +("ns-map" . "(ns-map ns) Returns a map of all the mappings for the namespace.") +("ns-name" . "(ns-name ns) Returns the name of the namespace, a symbol.") +("ns-publics" . "(ns-publics ns) Returns a map of the public intern mappings for the namespace.") +("ns-refers" . "(ns-refers ns) Returns a map of the refer mappings for the namespace.") +("ns-resolve" . "(ns-resolve ns env sym) Returns the var or Class to which a symbol will be resolved in the namespace (unless found in the environement), else nil. Note that if the symbol is fully qualified, the var/Class to which it resolves need not be present in the namespace.") +("ns-unalias" . "(ns-unalias ns sym) Removes the alias for the symbol from the namespace.") +("ns-unmap" . "(ns-unmap ns sym) Removes the mappings for the symbol from the namespace.") +("nth" . "(nth coll index not-found) Returns the value at the index. get returns nil if index out of bounds, nth throws an exception unless not-found is supplied. nth also works for strings, Java arrays, regex Matchers and Lists, and, in O(n) time, for sequences.") +("nthnext" . "(nthnext coll n) Returns the nth next of coll, (seq coll) when n is 0.") +("nthrest" . "(nthrest coll n) Returns the nth rest of coll, coll when n is 0.") +("num" . "(num x) Coerce to Number") +("number?" . "(number? x) Returns true if x is a Number") +("numerator" . "(numerator r) Returns the numerator part of a Ratio.") +("object-array" . "(object-array size-or-seq) Creates an array of objects") +("odd?" . "(odd? n) Returns true if n is odd, throws an exception if n is not an integer") +("or" . "(or x & next) Evaluates exprs one at a time, from left to right. If a form returns a logical true value, or returns that value and doesn't evaluate any of the other expressions, otherwise it returns the value of the last expression. (or) returns nil.") +("parents" . "(parents h tag) Returns the immediate parents of tag, either via a Java type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy") +("partial" . "(partial f arg1 arg2 arg3 & more) Takes a function f and fewer than the normal arguments to f, and returns a fn that takes a variable number of additional args. When called, the returned function calls f with args + additional args.") +("partition" . "(partition n step pad coll) Returns a lazy sequence of lists of n items each, at offsets step apart. If step is not supplied, defaults to n, i.e. the partitions do not overlap. If a pad collection is supplied, use its elements as necessary to complete last partition upto n items. In case there are not enough padding elements, return a partition with less than n items.") +("partition-all" . "(partition-all n step coll) Returns a lazy sequence of lists like partition, but may include partitions with fewer than n items at the end.") +("partition-by" . "(partition-by f coll) Applies f to each value in coll, splitting it each time f returns a new value. Returns a lazy seq of partitions.") +("pcalls" . "(pcalls & fns) Executes the no-arg fns in parallel, returning a lazy sequence of their values") +("peek" . "(peek coll) For a list or queue, same as first, for a vector, same as, but much more efficient than, last. If the collection is empty, returns nil.") +("persistent!" . "(persistent! coll) Alpha - subject to change. Returns a new, persistent version of the transient collection, in constant time. The transient collection cannot be used after this call, any such use will throw an exception.") +("pmap" . "(pmap f coll & colls) Like map, except f is applied in parallel. Semi-lazy in that the parallel computation stays ahead of the consumption, but doesn't realize the entire result unless required. Only useful for computationally intensive functions where the time of f dominates the coordination overhead.") +("pop" . "(pop coll) For a list or queue, returns a new list/queue without the first item, for a vector, returns a new vector without the last item. If the collection is empty, throws an exception. Note - not the same as next/butlast.") +("pop!" . "(pop! coll) Alpha - subject to change. Removes the last item from a transient vector. If the collection is empty, throws an exception. Returns coll") +("pop-thread-bindings)" . "(pop-thread-bindings) Pop one set of bindings pushed with push-binding before. It is an error to pop bindings without pushing before.") +("pos?" . "(pos? x) Returns true if num is greater than zero, else false") +("pr" . "(pr x & more) Prints the object(s) to the output stream that is the current value of *out*. Prints the object(s), separated by spaces if there is more than one. By default, pr and prn print in a way that objects can be read by the reader") +("pr-str" . "(pr-str & xs) pr to a string, returning it") +("prefer-method" . "(prefer-method multifn dispatch-val-x dispatch-val-y) Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y when there is a conflict") +("prefers" . "(prefers multifn) Given a multimethod, returns a map of preferred value -> set of other values") +("print" . "(print & more) Prints the object(s) to the output stream that is the current value of *out*. print and println produce output for human consumption.") +("print-str" . "(print-str & xs) print to a string, returning it") +("printf" . "(printf fmt & args) Prints formatted output, as per format") +("println" . "(println & more) Same as print followed by (newline)") +("println-str" . "(println-str & xs) println to a string, returning it") +("prn" . "(prn & more) Same as pr followed by (newline). Observes *flush-on-newline*") +("prn-str" . "(prn-str & xs) prn to a string, returning it") +("promise)" . "(promise) Alpha - subject to change. Returns a promise object that can be read with deref/@, and set, once only, with deliver. Calls to deref/@ prior to delivery will block, unless the variant of deref with timeout is used. All subsequent derefs will return the same delivered value without blocking. See also - realized?.") +("proxy" . "(proxy class-and-interfaces args & fs) class-and-interfaces - a vector of class names args - a (possibly empty) vector of arguments to the superclass constructor. f => (name [params*] body) or (name ([params*] body) ([params+] body) ...) Expands to code which creates a instance of a proxy class that implements the named class/interface(s) by calling the supplied fns. A single class, if provided, must be first. If not provided it defaults to Object. The interfaces names must be valid interface types. If a method fn is not provided for a class method, the superclass methd will be called. If a method fn is not provided for an interface method, an UnsupportedOperationException will be thrown should it be called. Method fns are closures and can capture the environment in which proxy is called. Each method fn takes an additional implicit first arg, which is bound to 'this. Note that while method fns can be provided to override protected methods, they have no other access to protected members, nor to super, as these capabilities cannot be proxied.") +("proxy-mappings" . "(proxy-mappings proxy) Takes a proxy instance and returns the proxy's fn map.") +("proxy-super" . "(proxy-super meth & args) Use to call a superclass method in the body of a proxy method. Note, expansion captures 'this") +("push-thread-bindings" . "(push-thread-bindings bindings) WARNING: This is a low-level function. Prefer high-level macros like binding where ever possible. Takes a map of Var/value pairs. Binds each Var to the associated value for the current thread. Each call *MUST* be accompanied by a matching call to pop-thread-bindings wrapped in a try-finally! (push-thread-bindings bindings) (try ... (finally (pop-thread-bindings)))") +("pvalues" . "(pvalues & exprs) Returns a lazy sequence of the values of the exprs, which are evaluated in parallel") +("quot" . "(quot num div) quot[ient] of dividing numerator by denominator.") +("rand" . "(rand n) Returns a random floating point number between 0 (inclusive) and n (default 1) (exclusive).") +("rand-int" . "(rand-int n) Returns a random integer between 0 (inclusive) and n (exclusive).") +("rand-nth" . "(rand-nth coll) Return a random element of the (sequential) collection. Will have the same performance characteristics as nth for the given collection.") +("range" . "(range start end step) Returns a lazy seq of nums from start (inclusive) to end (exclusive), by step, where start defaults to 0, step to 1, and end to infinity.") +("ratio?" . "(ratio? n) Returns true if n is a Ratio") +("rational?" . "(rational? n) Returns true if n is a rational number") +("rationalize" . "(rationalize num) returns the rational value of num") +("re-find" . "(re-find re s) Returns the next regex match, if any, of string to pattern, using java.util.regex.Matcher.find(). Uses re-groups to return the groups.") +("re-groups" . "(re-groups m) Returns the groups from the most recent match/find. If there are no nested groups, returns a string of the entire match. If there are nested groups, returns a vector of the groups, the first element being the entire match.") +("re-matcher" . "(re-matcher re s) Returns an instance of java.util.regex.Matcher, for use, e.g. in re-find.") +("re-matches" . "(re-matches re s) Returns the match, if any, of string to pattern, using java.util.regex.Matcher.matches(). Uses re-groups to return the groups.") +("re-pattern" . "(re-pattern s) Returns an instance of java.util.regex.Pattern, for use, e.g. in re-matcher.") +("re-seq" . "(re-seq re s) Returns a lazy sequence of successive matches of pattern in string, using java.util.regex.Matcher.find(), each such match processed with re-groups.") +("read" . "(read stream eof-error? eof-value recursive?) Reads the next object from stream, which must be an instance of java.io.PushbackReader or some derivee. stream defaults to the current value of *in* .") +("read-line)" . "(read-line) Reads the next line from stream that is the current value of *in* .") +("read-string" . "(read-string s) Reads one object from the string s") +("realized?" . "(realized? x) Returns true if a value has been produced for a promise, delay, future or lazy sequence.") +("reduce" . "(reduce f val coll) f should be a function of 2 arguments. If val is not supplied, returns the result of applying f to the first 2 items in coll, then applying f to that result and the 3rd item, etc. If coll contains no items, f must accept no arguments as well, and reduce returns the result of calling f with no arguments. If coll has only 1 item, it is returned and f is not called. If val is supplied, returns the result of applying f to val and the first item in coll, then applying f to that result and the 2nd item, etc. If coll contains no items, returns val and f is not called.") +("reduce-kv" . "(reduce-kv f init coll) Reduces an associative collection. f should be a function of 3 arguments. Returns the result of applying f to init, the first key and the first value in coll, then applying f to that result and the 2nd key and value, etc. If coll contains no entries, returns init and f is not called. Note that reduce-kv is supported on vectors, where the keys will be the ordinals.") +("reductions" . "(reductions f init coll) Returns a lazy seq of the intermediate values of the reduction (as per reduce) of coll by f, starting with init.") +("ref" . "(ref x & options) Creates and returns a Ref with an initial value of x and zero or more options (in any order): :meta metadata-map :validator validate-fn :min-history (default 0) :max-history (default 10) If metadata-map is supplied, it will be come the metadata on the ref. validate-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validate-fn should return false or throw an exception. validate-fn will be called on transaction commit, when all refs have their final values. Normally refs accumulate history dynamically as needed to deal with read demands. If you know in advance you will need history you can set :min-history to ensure it will be available when first needed (instead of after a read fault). History is limited, and the limit can be set with :max-history.") +("ref-history-count" . "(ref-history-count ref) Returns the history count of a ref") +("ref-max-history" . "(ref-max-history ref n) Gets the max-history of a ref, or sets it and returns the ref") +("ref-min-history" . "(ref-min-history ref n) Gets the min-history of a ref, or sets it and returns the ref") +("ref-set" . "(ref-set ref val) Must be called in a transaction. Sets the value of ref. Returns val.") +("refer" . "(refer ns-sym & filters) refers to all public vars of ns, subject to filters. filters can include at most one each of: :exclude list-of-symbols :only list-of-symbols :rename map-of-fromsymbol-tosymbol For each public interned var in the namespace named by the symbol, adds a mapping from the name of the var to the var to the current namespace. Throws an exception if name is already mapped to something else in the current namespace. Filters can be used to select a subset, via inclusion or exclusion, or to provide a mapping to a symbol different from the var's name, in order to prevent clashes. Use :use in the ns macro in preference to calling this directly.") +("refer-clojure" . "(refer-clojure & filters) Same as (refer 'clojure.core )") +("reify" . "(reify & opts+specs) reify is a macro with the following structure: (reify options* specs*) Currently there are no options. Each spec consists of the protocol or interface name followed by zero or more method bodies: protocol-or-interface-or-Object (methodName [args+] body)* Methods should be supplied for all methods of the desired protocol(s) and interface(s). You can also define overrides for methods of Object. Note that the first parameter must be supplied to correspond to the target object ('this' in Java parlance). Thus methods for interfaces will take one more argument than do the interface declarations. Note also that recur calls to the method head should *not* pass the target object, it will be supplied automatically and can not be substituted. The return type can be indicated by a type hint on the method name, and arg types can be indicated by a type hint on arg names. If you leave out all hints, reify will try to match on same name/arity method in the protocol(s)/interface(s) - this is preferred. If you supply any hints at all, no inference is done, so all hints (or default of Object) must be correct, for both arguments and return type. If a method is overloaded in a protocol/interface, multiple independent method definitions must be supplied. If overloaded with same arity in an interface you must specify complete hints to disambiguate - a missing hint implies Object. recur works to method heads The method bodies of reify are lexical closures, and can refer to the surrounding local scope: (str (let [f \"foo\"] (reify Object (toString [this] f)))) == \"foo\" (seq (let [f \"foo\"] (reify clojure.lang.Seqable (seq [this] (seq f))))) == (\f \o \o)) reify always implements clojure.lang.IObj and transfers meta data of the form to the created object. (meta ^{:k :v} (reify Object (toString [this] \"foo\"))) == {:k :v}") +("release-pending-sends)" . "(release-pending-sends) Normally, actions sent directly or indirectly during another action are held until the action completes (changes the agent's state). This function can be used to dispatch any pending sent actions immediately. This has no impact on actions sent during a transaction, which are still held until commit. If no action is occurring, does nothing. Returns the number of actions dispatched.") +("rem" . "(rem num div) remainder of dividing numerator by denominator.") +("remove" . "(remove pred coll) Returns a lazy sequence of the items in coll for which (pred item) returns false. pred must be free of side-effects.") +("remove-all-methods" . "(remove-all-methods multifn) Removes all of the methods of multimethod.") +("remove-method" . "(remove-method multifn dispatch-val) Removes the method of multimethod associated with dispatch-value.") +("remove-ns" . "(remove-ns sym) Removes the namespace named by the symbol. Use with caution. Cannot be used to remove the clojure namespace.") +("remove-watch" . "(remove-watch reference key) Alpha - subject to change. Removes a watch (set by add-watch) from a reference") +("repeat" . "(repeat n x) Returns a lazy (infinite!, or length n if supplied) sequence of xs.") +("repeatedly" . "(repeatedly n f) Takes a function of no args, presumably with side effects, and returns an infinite (or length n if supplied) lazy sequence of calls to it") +("replace" . "(replace smap coll) Given a map of replacement pairs and a vector/collection, returns a vector/seq with any elements = a key in smap replaced with the corresponding val in smap") +("replicate" . "(replicate n x) DEPRECATED: Use 'repeat' instead. Returns a lazy seq of n xs.") +("require" . "(require & args) Loads libs, skipping any that are already loaded. Each argument is either a libspec that identifies a lib, a prefix list that identifies multiple libs whose names share a common prefix, or a flag that modifies how all the identified libs are loaded. Use :require in the ns macro in preference to calling this directly. Libs A 'lib' is a named set of resources in classpath whose contents define a library of Clojure code. Lib names are symbols and each lib is associated with a Clojure namespace and a Java package that share its name. A lib's name also locates its root directory within classpath using Java's package name to classpath-relative path mapping. All resources in a lib should be contained in the directory structure under its root directory. All definitions a lib makes should be in its associated namespace. 'require loads a lib by loading its root resource. The root resource path is derived from the lib name in the following manner: Consider a lib named by the symbol 'x.y.z; it has the root directory /x/y/, and its root resource is /x/y/z.clj. The root resource should contain code to create the lib's namespace (usually by using the ns macro) and load any additional lib resources. Libspecs A libspec is a lib name or a vector containing a lib name followed by options expressed as sequential keywords and arguments. Recognized options: :as takes a symbol as its argument and makes that symbol an alias to the lib's namespace in the current namespace. :refer takes a list of symbols to refer from the namespace or the :all keyword to bring in all public vars. Prefix Lists It's common for Clojure code to depend on several libs whose names have the same prefix. When specifying libs, prefix lists can be used to reduce repetition. A prefix list contains the shared prefix followed by libspecs with the shared prefix removed from the lib names. After removing the prefix, the names that remain must not contain any periods. Flags A flag is a keyword. Recognized flags: :reload, :reload-all, :verbose :reload forces loading of all the identified libs even if they are already loaded :reload-all implies :reload and also forces loading of all libs that the identified libs directly or indirectly load via require or use :verbose triggers printing information about each load, alias, and refer Example: The following would load the libraries clojure.zip and clojure.set abbreviated as 's'. (require '(clojure zip [set :as s]))") +("reset!" . "(reset! atom newval) Sets the value of atom to newval without regard for the current value. Returns newval.") +("reset-meta!" . "(reset-meta! iref metadata-map) Atomically resets the metadata for a namespace/var/ref/agent/atom") +("resolve" . "(resolve env sym) same as (ns-resolve *ns* symbol) or (ns-resolve *ns* &env symbol)") +("rest" . "(rest coll) Returns a possibly empty seq of the items after the first. Calls seq on its argument.") +("restart-agent" . "(restart-agent a new-state & options) When an agent is failed, changes the agent state to new-state and then un-fails the agent so that sends are allowed again. If a :clear-actions true option is given, any actions queued on the agent that were being held while it was failed will be discarded, otherwise those held actions will proceed. The new-state must pass the validator if any, or restart will throw an exception and the agent will remain failed with its old state and error. Watchers, if any, will NOT be notified of the new state. Throws an exception if the agent is not failed.") +("resultset-seq" . "(resultset-seq rs) Creates and returns a lazy sequence of structmaps corresponding to the rows in the java.sql.ResultSet rs") +("reverse" . "(reverse coll) Returns a seq of the items in coll in reverse order. Not lazy.") +("reversible?" . "(reversible? coll) Returns true if coll implements Reversible") +("rseq" . "(rseq rev) Returns, in constant time, a seq of the items in rev (which can be a vector or sorted-map), in reverse order. If rev is empty returns nil") +("rsubseq" . "(rsubseq sc start-test start-key end-test end-key) sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a reverse seq of those entries with keys ek for which (test (.. sc comparator (compare ek key)) 0) is true") +("satisfies?" . "(satisfies? protocol x) Returns true if x satisfies the protocol") +("second" . "(second x) Same as (first (next x))") +("select-keys" . "(select-keys map keyseq) Returns a map containing only those entries in map whose key is in keys") +("send" . "(send a f & args) Dispatch an action to an agent. Returns the agent immediately. Subsequently, in a thread from a thread pool, the state of the agent will be set to the value of: (apply action-fn state-of-agent args)") +("send-off" . "(send-off a f & args) Dispatch a potentially blocking action to an agent. Returns the agent immediately. Subsequently, in a separate thread, the state of the agent will be set to the value of: (apply action-fn state-of-agent args)") +("seq" . "(seq coll) Returns a seq on the collection. If the collection is empty, returns nil. (seq nil) returns nil. seq also works on Strings, native Java arrays (of reference types) and any objects that implement Iterable.") +("seq?" . "(seq? x) Return true if x implements ISeq") +("seque" . "(seque n-or-q s) Creates a queued seq on another (presumably lazy) seq s. The queued seq will produce a concrete seq in the background, and can get up to n items ahead of the consumer. n-or-q can be an integer n buffer size, or an instance of java.util.concurrent BlockingQueue. Note that reading from a seque can block if the reader gets ahead of the producer.") +("sequence" . "(sequence coll) Coerces coll to a (possibly empty) sequence, if it is not already one. Will not force a lazy seq. (sequence nil) yields ()") +("sequential?" . "(sequential? coll) Returns true if coll implements Sequential") +("set" . "(set coll) Returns a set of the distinct elements of coll.") +("set-error-handler!" . "(set-error-handler! a handler-fn) Sets the error-handler of agent a to handler-fn. If an action being run by the agent throws an exception or doesn't pass the validator fn, handler-fn will be called with two arguments: the agent and the exception.") +("set-error-mode!" . "(set-error-mode! a mode-keyword) Sets the error-mode of agent a to mode-keyword, which must be either :fail or :continue. If an action being run by the agent throws an exception or doesn't pass the validator fn, an error-handler may be called (see set-error-handler!), after which, if the mode is :continue, the agent will continue as if neither the action that caused the error nor the error itself ever happened. If the mode is :fail, the agent will become failed and will stop accepting new 'send' and 'send-off' actions, and any previously queued actions will be held until a 'restart-agent'. Deref will still work, returning the state of the agent before the error.") +("set-validator!" . "(set-validator! iref validator-fn) Sets the validator-fn for a var/ref/agent/atom. validator-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validator-fn should return false or throw an exception. If the current state (root value if var) is not acceptable to the new validator, an exception will be thrown and the validator will not be changed.") +("set?" . "(set? x) Returns true if x implements IPersistentSet") +("short" . "(short x) Coerce to short") +("short-array" . "(short-array size init-val-or-seq) Creates an array of shorts") +("shorts" . "(shorts xs) Casts to shorts[]") +("shuffle" . "(shuffle coll) Return a random permutation of coll") +("shutdown-agents)" . "(shutdown-agents) Initiates a shutdown of the thread pools that back the agent system. Running actions will complete, but no new actions will be accepted") +("slurp" . "(slurp f & opts) Opens a reader on f and reads all its contents, returning a string. See clojure.java.io/reader for a complete list of supported arguments.") +("some" . "(some pred coll) Returns the first logical true value of (pred x) for any x in coll, else nil. One common idiom is to use a set as pred, for example this will return :fred if :fred is in the sequence, otherwise nil: (some #{:fred} coll)") +("some-fn" . "(some-fn p1 p2 p3 & ps) Takes a set of predicates and returns a function f that returns the first logical true value returned by one of its composing predicates against any of its arguments, else it returns logical false. Note that f is short-circuiting in that it will stop execution on the first argument that triggers a logical true result against the original predicates.") +("sort" . "(sort comp coll) Returns a sorted sequence of the items in coll. If no comparator is supplied, uses compare. comparator must implement java.util.Comparator.") +("sort-by" . "(sort-by keyfn comp coll) Returns a sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item). If no comparator is supplied, uses compare. comparator must implement java.util.Comparator.") +("sorted-map" . "(sorted-map & keyvals) keyval => key val Returns a new sorted map with supplied mappings.") +("sorted-map-by" . "(sorted-map-by comparator & keyvals) keyval => key val Returns a new sorted map with supplied mappings, using the supplied comparator.") +("sorted-set" . "(sorted-set & keys) Returns a new sorted set with supplied keys.") +("sorted-set-by" . "(sorted-set-by comparator & keys) Returns a new sorted set with supplied keys, using the supplied comparator.") +("sorted?" . "(sorted? coll) Returns true if coll implements Sorted") +("special-symbol?" . "(special-symbol? s) Returns true if s names a special form") +("spit" . "(spit f content & options) Opposite of slurp. Opens f with writer, writes content, then closes f. Options passed to clojure.java.io/writer.") +("split-at" . "(split-at n coll) Returns a vector of [(take n coll) (drop n coll)]") +("split-with" . "(split-with pred coll) Returns a vector of [(take-while pred coll) (drop-while pred coll)]") +("str" . "(str x & ys) With no args, returns the empty string. With one arg x, returns x.toString(). (str nil) returns the empty string. With more than one arg, returns the concatenation of the str values of the args.") +("string?" . "(string? x) Return true if x is a String") +("struct" . "(struct s & vals) Returns a new structmap instance with the keys of the structure-basis. vals must be supplied for basis keys in order - where values are not supplied they will default to nil.") +("struct-map" . "(struct-map s & inits) Returns a new structmap instance with the keys of the structure-basis. keyvals may contain all, some or none of the basis keys - where values are not supplied they will default to nil. keyvals can also contain keys not in the basis.") +("subs" . "(subs s start end) Returns the substring of s beginning at start inclusive, and ending at end (defaults to length of string), exclusive.") +("subseq" . "(subseq sc start-test start-key end-test end-key) sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a seq of those entries with keys ek for which (test (.. sc comparator (compare ek key)) 0) is true") +("subvec" . "(subvec v start end) Returns a persistent vector of the items in vector from start (inclusive) to end (exclusive). If end is not supplied, defaults to (count vector). This operation is O(1) and very fast, as the resulting vector shares structure with the original and no trimming is done.") +("supers" . "(supers class) Returns the immediate and indirect superclasses and interfaces of c, if any") +("swap!" . "(swap! atom f x y & args) Atomically swaps the value of atom to be: (apply f current-value-of-atom args). Note that f may be called multiple times, and thus should be free of side effects. Returns the value that was swapped in.") +("symbol" . "(symbol ns name) Returns a Symbol with the given namespace and name.") +("symbol?" . "(symbol? x) Return true if x is a Symbol") +("sync" . "(sync flags-ignored-for-now & body) transaction-flags => TBD, pass nil for now Runs the exprs (in an implicit do) in a transaction that encompasses exprs and any nested calls. Starts a transaction if none is already running on this thread. Any uncaught exception will abort the transaction and flow out of sync. The exprs may be run more than once, but any effects on Refs will be atomic.") +("take" . "(take n coll) Returns a lazy sequence of the first n items in coll, or all items if there are fewer than n.") +("take-last" . "(take-last n coll) Returns a seq of the last n items in coll. Depending on the type of coll may be no better than linear time. For vectors, see also subvec.") +("take-nth" . "(take-nth n coll) Returns a lazy seq of every nth item in coll.") +("take-while" . "(take-while pred coll) Returns a lazy sequence of successive items from coll while (pred item) returns true. pred must be free of side-effects.") +("test" . "(test v) test [v] finds fn at key :test in var metadata and calls it, presuming failure will throw exception") +("the-ns" . "(the-ns x) If passed a namespace, returns it. Else, when passed a symbol, returns the namespace named by it, throwing an exception if not found.") +("thread-bound?" . "(thread-bound? & vars) Returns true if all of the vars provided as arguments have thread-local bindings. Implies that set!'ing the provided vars will succeed. Returns true if no vars are provided.") +("time" . "(time expr) Evaluates expr and prints the time it took. Returns the value of expr.") +("to-array" . "(to-array coll) Returns an array of Objects containing the contents of coll, which can be any Collection. Maps to java.util.Collection.toArray().") +("to-array-2d" . "(to-array-2d coll) Returns a (potentially-ragged) 2-dimensional array of Objects containing the contents of coll, which can be any Collection of any Collection.") +("trampoline" . "(trampoline f & args) trampoline can be used to convert algorithms requiring mutual recursion without stack consumption. Calls f with supplied args, if any. If f returns a fn, calls that fn with no arguments, and continues to repeat, until the return value is not a fn, then returns that non-fn value. Note that if you want to return a fn as a final value, you must wrap it in some data structure and unpack it after trampoline returns.") +("transient" . "(transient coll) Alpha - subject to change. Returns a new, transient version of the collection, in constant time.") +("tree-seq" . "(tree-seq branch? children root) Returns a lazy sequence of the nodes in a tree, via a depth-first walk. branch? must be a fn of one arg that returns true if passed a node that can have children (but may not). children must be a fn of one arg that returns a sequence of the children. Will only be called on nodes for which branch? returns true. Root is the root node of the tree.") +("true?" . "(true? x) Returns true if x is the value true, false otherwise.") +("type" . "(type x) Returns the :type metadata of x, or its Class if none") +("unchecked-add" . "(unchecked-add x y) Returns the sum of x and y, both long. Note - uses a primitive operator subject to overflow.") +("unchecked-add-int" . "(unchecked-add-int x y) Returns the sum of x and y, both int. Note - uses a primitive operator subject to overflow.") +("unchecked-byte" . "(unchecked-byte x) Coerce to byte. Subject to rounding or truncation.") +("unchecked-char" . "(unchecked-char x) Coerce to char. Subject to rounding or truncation.") +("unchecked-dec" . "(unchecked-dec x) Returns a number one less than x, a long. Note - uses a primitive operator subject to overflow.") +("unchecked-dec-int" . "(unchecked-dec-int x) Returns a number one less than x, an int. Note - uses a primitive operator subject to overflow.") +("unchecked-divide-int" . "(unchecked-divide-int x y) Returns the division of x by y, both int. Note - uses a primitive operator subject to truncation.") +("unchecked-double" . "(unchecked-double x) Coerce to double. Subject to rounding.") +("unchecked-float" . "(unchecked-float x) Coerce to float. Subject to rounding.") +("unchecked-inc" . "(unchecked-inc x) Returns a number one greater than x, a long. Note - uses a primitive operator subject to overflow.") +("unchecked-inc-int" . "(unchecked-inc-int x) Returns a number one greater than x, an int. Note - uses a primitive operator subject to overflow.") +("unchecked-int" . "(unchecked-int x) Coerce to int. Subject to rounding or truncation.") +("unchecked-long" . "(unchecked-long x) Coerce to long. Subject to rounding or truncation.") +("unchecked-multiply" . "(unchecked-multiply x y) Returns the product of x and y, both long. Note - uses a primitive operator subject to overflow.") +("unchecked-multiply-int" . "(unchecked-multiply-int x y) Returns the product of x and y, both int. Note - uses a primitive operator subject to overflow.") +("unchecked-negate" . "(unchecked-negate x) Returns the negation of x, a long. Note - uses a primitive operator subject to overflow.") +("unchecked-negate-int" . "(unchecked-negate-int x) Returns the negation of x, an int. Note - uses a primitive operator subject to overflow.") +("unchecked-remainder-int" . "(unchecked-remainder-int x y) Returns the remainder of division of x by y, both int. Note - uses a primitive operator subject to truncation.") +("unchecked-short" . "(unchecked-short x) Coerce to short. Subject to rounding or truncation.") +("unchecked-subtract" . "(unchecked-subtract x y) Returns the difference of x and y, both long. Note - uses a primitive operator subject to overflow.") +("unchecked-subtract-int" . "(unchecked-subtract-int x y) Returns the difference of x and y, both int. Note - uses a primitive operator subject to overflow.") +("underive" . "(underive h tag parent) Removes a parent/child relationship between parent and tag. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to, and modifies, the global hierarchy.") +("update-in" . "(update-in m [k & ks] f & args) 'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, and returns a new nested structure. If any levels do not exist, hash-maps will be created.") +("update-proxy" . "(update-proxy proxy mappings) Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces) to fns (which must take arguments matching the corresponding method, plus an additional (explicit) first arg corresponding to this, and updates (via assoc) the proxy's fn map. nil can be passed instead of a fn, in which case the corresponding method will revert to the default behavior. Note that this function can be used to update the behavior of an existing instance without changing its identity. Returns the proxy.") +("use" . "(use & args) Like 'require, but also refers to each lib's namespace using clojure.core/refer. Use :use in the ns macro in preference to calling this directly. 'use accepts additional options in libspecs: :exclude, :only, :rename. The arguments and semantics for :exclude, :only, and :rename are the same as those documented for clojure.core/refer.") +("val" . "(val e) Returns the value in the map entry.") +("vals" . "(vals map) Returns a sequence of the map's values.") +("var-get" . "(var-get x) Gets the value in the var object") +("var-set" . "(var-set x val) Sets the value in the var object to val. The var must be thread-locally bound.") +("var?" . "(var? v) Returns true if v is of type clojure.lang.Var") +("vary-meta" . "(vary-meta obj f & args) Returns an object of the same type and value as obj, with (apply f (meta obj) args) as its metadata.") +("vec" . "(vec coll) Creates a new vector containing the contents of coll.") +("vector" . "(vector a b c d & args) Creates a new vector containing the args.") +("vector-of" . "(vector-of t & elements) Creates a new vector of a single primitive type t, where t is one of :int :long :float :double :byte :short :char or :boolean. The resulting vector complies with the interface of vectors in general, but stores the values unboxed internally. Optionally takes one or more elements to populate the vector.") +("vector?" . "(vector? x) Return true if x implements IPersistentVector") +("when" . "(when test & body) Evaluates test. If logical true, evaluates body in an implicit do.") +("when-first" . "(when-first bindings & body) bindings => x xs Same as (when (seq xs) (let [x (first xs)] body))") +("when-let" . "(when-let bindings & body) bindings => binding-form test When test is true, evaluates body with binding-form bound to the value of test") +("when-not" . "(when-not test & body) Evaluates test. If logical false, evaluates body in an implicit do.") +("while" . "(while test & body) Repeatedly executes body while test expression is true. Presumes some side-effect will cause test to become false/nil. Returns nil") +("with-bindings" . "(with-bindings binding-map & body) Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. The executes body. Pops the installed bindings after body was evaluated. Returns the value of body.") +("with-bindings*" . "(with-bindings* binding-map f & args) Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. Then calls f with the supplied arguments. Pops the installed bindings after f returned. Returns whatever f returns.") +("with-in-str" . "(with-in-str s & body) Evaluates body in a context in which *in* is bound to a fresh StringReader initialized with the string s.") +("with-local-vars" . "(with-local-vars name-vals-vec & body) varbinding=> symbol init-expr Executes the exprs in a context in which the symbols are bound to vars with per-thread bindings to the init-exprs. The symbols refer to the var objects themselves, and must be accessed with var-get and var-set") +("with-meta" . "(with-meta obj m) Returns an object of the same type and value as obj, with map m as its metadata.") +("with-open" . "(with-open bindings & body) bindings => [name init ...] Evaluates body in a try expression with names bound to the values of the inits, and a finally clause that calls (.close name) on each name in reverse order.") +("with-out-str" . "(with-out-str & body) Evaluates exprs in a context in which *out* is bound to a fresh StringWriter. Returns the string created by any nested printing calls.") +("with-precision" . "(with-precision precision & exprs) Sets the precision and rounding mode to be used for BigDecimal operations. Usage: (with-precision 10 (/ 1M 3)) or: (with-precision 10 :rounding HALF_DOWN (/ 1M 3)) The rounding mode is one of CEILING, FLOOR, HALF_UP, HALF_DOWN, HALF_EVEN, UP, DOWN and UNNECESSARY; it defaults to HALF_UP.") +("with-redefs" . "(with-redefs bindings & body) binding => var-symbol temp-value-expr Temporarily redefines Vars while executing the body. The temp-value-exprs will be evaluated and each resulting value will replace in parallel the root value of its Var. After the body is executed, the root values of all the Vars will be set back to their old values. These temporary changes will be visible in all threads. Useful for mocking out functions during testing.") +("with-redefs-fn" . "(with-redefs-fn binding-map func) Temporarily redefines Vars during a call to func. Each val of binding-map will replace the root value of its key which must be a Var. After func is called with no args, the root values of all the Vars will be set back to their old values. These temporary changes will be visible in all threads. Useful for mocking out functions during testing.") +("xml-seq" . "(xml-seq root) A tree seq on the xml elements as per xml/parse") +("zero?" . "(zero? x) Returns true if num is zero, else false") +("zipmap" . "(zipmap keys vals) Returns a map with the keys mapped to the corresponding vals.") diff --git a/site-lisp/cljdoc/gist:1386449.rb b/site-lisp/cljdoc/gist:1386449.rb new file mode 100644 index 0000000..3092ecb --- /dev/null +++ b/site-lisp/cljdoc/gist:1386449.rb @@ -0,0 +1,18 @@ +require 'nokogiri' +require 'open-uri' + +open("http://clojure.github.com/clojure/clojure.core-api.html", 'r') do |f| + page = Nokogiri(f.read) + + funcs = [] + page.search("div#var-entry").each do |e| + next if e.search("pre#var-usage").children.text.empty? + usage = e.search("pre#var-usage").children.text.split("\n").map{|f| f.strip}.last.sub('Usage: ', '') + funcs << [usage.split(' ').first[1..-1], usage, + e.search("pre#var-docstr").children.text.gsub("\n", ' ')] + end + + funcs.each do |r| + puts %Q[("#{r[0]}" . "#{r[1].gsub('"', '\"')} #{r[2].gsub('"', '\"')}")] + end +end diff --git a/site-lisp/dmacro/dmacro.el b/site-lisp/dmacro/dmacro.el new file mode 100644 index 0000000..d3ddcc6 --- /dev/null +++ b/site-lisp/dmacro/dmacro.el @@ -0,0 +1,293 @@ +;; +;; dmacro.el - キー操作の繰返し検出 & 実行 +;; +;; 1993 4/14 original idea by 増井俊之@シャープ +;; implemented by 太和田誠@長岡技科大 +;; refinement by 増井俊之@シャープ +;; 1995 3/30 modified for Emacs19 by 増井俊之@シャープ +;; +;; 2002 3 XEmacs対応 by 小畑英司 obata@suzuki.kuee.kyoto-u.ac.jp +;; 峰伸行 zah07175@rose.zero.ad.jp +;; +;; + +;; +;; dmacro.el は、繰り返されるキー操作列から次の操作を予測し実行させる +;; ためのプログラムです。操作の繰返しの検出とその実行を指令するために +;; *dmacro-key* で指定する特別の「繰返しキー」を使用します。 +;; +;; 例えばユーザが +;; abcabc +;; と入力した後「繰返しキー」を押すと、dmacro.el は "abc" の入力操作の +;; 繰返しを検出してそれを実行し、その結果テキストは +;; abcabcabc +;; となります。また、 +;; abcdefab +;; と入力した後「繰返しキー」を押すと、dmacro.el はこれを "abcdef" の +;; 入力の繰返しと判断し、繰返しの残りの部分を予測実行して "cdef" を入力し、 +;; テキストは +;; abcdefabcdef +;; となります。ここでもう一度「繰返しキー」を押すと、"abcdef" の入力 +;; が繰り返されて、テキストは +;; abcdefabcdefabcdef +;; となります。 +;; +;; あらゆるキー操作の繰返しが認識、実行されるため、例えば +;; line1 +;; line2 +;; line3 +;; line4 +;; というテキストを +;; % line1 +;; % line2 +;; line3 +;; line4 +;; のように編集した後「繰返しキー」を押すとテキストは +;; % line1 +;; % line2 +;; % line3 +;; line4 +;; のようになり、その後押すたびに次の行頭に "% "が追加されていきます。 +;; +;; このような機能は、繰返しパタンの認識によりキーボードマクロを自動的に +;; 定義していると考えることもできます。キーボードマクロの場合は操作を +;; 開始する以前にそのことをユーザが認識してマクロを登録する必要があり +;; ますが、dmacro.el では実際に繰返し操作をしてしまった後でそのことに +;; 気がついた場合でも「繰返しキー」を押すだけでその操作をまた実行させる +;; ことができます。またマクロの定義方法(操作の後で「繰返しキー」を押す +;; だけ)もキーボードマクロの場合(マクロの開始と終了を指定する)に比べて +;; 単純になっています。 +;; +;; ● 使用例 +;; +;; ・文字列置換 +;; +;; テキスト中の全ての「abc」を「def]に修正する場合を考えてみます。 +;; 「abc」を検索するキー操作は "Ctrl-S a b c ESC" で、これは +;; "DEL DEL DEL d e f" で「def」に修正することができます。 +;; 引き続き次の「abc」を検索する "Ctrl-S a b c ESC" を入力した後で +;; 「繰返しキー」を押すと "DEL DEL DEL d e f" が予測実行され、新たに +;; 検索された「abc」が「def」に修正されます。ここでまた「繰返しキー」 +;; を押すと次の「abc」が「def」に修正されます。 +;; このように「繰返しキー」を押していくことにより順々に文字列を +;; 置換していくことができます。 +;; +;; ・罫線によるお絵書き +;; +;; 繰返しを含む絵を簡単に書くことができます。例えば、 +;; ─┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐ +;; └┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘ +;; のような絵を書きたい場合は、keisen.el などを使って +;; ─┐┌┐ +;; └┘ +;; と書いた後で「繰返し」キーを押すと、 +;; ─┐┌┐ +;; └┘└┘ +;; となり、もう一度「繰返しキー」を押すと +;; ─┐┌┐┌┐ +;; └┘└┘└┘ +;; となります。同様に +;; ┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐ +;; └─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘ +;; のような絵も +;; ┌─┐ ─ +;; └─┘ +;; だけ入力した後「繰返しキー」を連続して押すだけで描くことができます。 +;; +;; ● 繰返し予測の方法 +;; +;; 入力の繰返しの予測手法はいろいろ考えられますが、dmacro.elでは +;; 以下のような優先度をもたせています。 +;; +;; (1) 同じ入力パタンが予測の直前に2度繰返されている場合はそれを +;; 優先する。繰返しパタンが複数ある場合は長いものを優先する。 +;; +;; 例えば、「かわいいかわいい」という入力では「かわいい」と +;; いうパタンが繰り返されたという解釈と、「い」というパタンが +;; 繰り返されたという解釈の両方が可能ですが、この場合 +;; 「かわいい」を優先します。 +;; +;; (2) (1)の場合にあてはまらず、直前の入力列がそれ以前の入力列の +;; 一部になっている場合(直前の入力が のような形に +;; なっている場合)は、まずを予測し、その次から を予測 +;; する。このときの長いものを優先し、その中ではが短いもの +;; を優先する。 +;; +;; 例えば「abracadabra」という入力では、=「abra」が最長なので +;; =「cadabra」の予測が優先されます。 +;; +;; ● XEmacs 対応、Super, Hyper, Alt キーの対応について +;; +;; この版では XEmacs にも対応しました。 +;; 現在のところ GNU Emacs 18, 19, 20, 21, XEmacs 21 で +;; 動作することが確認できています。 +;; また従来の dmacro では Super, Hyper, Alt のキー入力を +;; 正しく扱うことができませんでしたが、このバージョンでは +;; 扱えるようになっています。 +;; 繰り返しのキーとして *dmacro-key* に Super, Hyper, Alt, Meta +;; を含めたキーを使うこともできますが、ただしその際は +;; 以下の注意に従って下さい。 +;; +;; ● *dmacro-key* の指定 +;; +;; GNU Emacs の場合 +;; Modifier key として Control のみが使われる場合は "\C-t" のような +;; 文字列として指定できます。Meta, Super, Hyper, Alt を利用する場合には +;; それぞれ [?\M-t], [?\s-t], [?\H-t], [?\A-t] のように指定して下さい。 +;; +;; XEmacs の場合 +;; Meta key を使う場合でも上記のような制限はありません。Super 等を使う +;; 場合には [(super t)] のように指定して下さい。 +;; +;; ● 設定方法 +;; +;; .emacsなどに以下の行を入れて下さい。 +;; +;; (defconst *dmacro-key* "\C-t" "繰返し指定キー") +;; (global-set-key *dmacro-key* 'dmacro-exec) +;; (autoload 'dmacro-exec "dmacro" nil t) +;; +;; オリジナルの連絡先: +;; 増井俊之 +;; シャープ株式会社 ソフトウェア研究所 +;; masui@shpcsl.sharp.co.jp +;; +;; 2002/6/3現在の連絡先: +;; 増井俊之 +;; (株)ソニーコンピュータサイエンス研究所 +;; masui@acm.org +;; + +(defvar dmacro-array-type + (if (and (boundp 'emacs-major-version) + (>= emacs-major-version 19)) + 'vector 'string) + "dmacro の内部で処理する配列の種類。 +emacs 19 以上ならデフォルトで vector にする。 +string では hyper, super, alt を含んだ入力の繰り返しが +正しく処理できないので注意。 +GNU Emacs 18 (Nemacs) を使っている方以外は vector で問題ありません。") + +(fset 'dmacro-concat + (cond ((eq dmacro-array-type 'string) 'concat) + ((eq dmacro-array-type 'vector) 'vconcat))) + +(fset 'dmacro-subseq + (cond ((featurep 'xemacs) 'subseq) + ((and (eq dmacro-array-type 'vector) + (boundp 'emacs-major-version) + (eq emacs-major-version 19)) + (require 'cl) + 'subseq) + (t 'substring))) + +(defvar *dmacro-arry* nil "繰返しキー配列") +(defvar *dmacro-arry-1* nil "繰返しキーの部分配列") + +(setq dmacro-key + (cond ((eq dmacro-array-type 'string) + *dmacro-key*) + (t + (let ((key *dmacro-key*)) + (cond ((featurep 'xemacs) + (if (arrayp key) + (mapvector 'character-to-event key) + (vector (character-to-event key)))) + (t + (vconcat key))))))) + +(setq dmacro-keys (dmacro-concat dmacro-key dmacro-key)) + +(defun dmacro-exec () + "キー操作の繰返しを検出し実行する" + (interactive) + (let ((s (dmacro-get))) + (if (null s) + (message "操作の繰返しが見つかりません") + (execute-kbd-macro s) + ) + )) + +(defun dmacro-event (e) + (cond + ((integerp e) e) + ((eq e 'backspace) 8) + ((eq e 'tab) 9) + ((eq e 'enter) 13) + ((eq e 'return) 13) + ((eq e 'escape) 27) + ((eq e 'delete) 127) + (t 0) + )) + +(defun dmacro-recent-keys () + (cond ((eq dmacro-array-type 'vector) (recent-keys)) + ((eq dmacro-array-type 'string) + (let ((s (recent-keys)) ) + (if (stringp s) s + (concat (mapcar 'dmacro-event s)) + ))))) + +(defun dmacro-get () + (let ((rkeys (dmacro-recent-keys)) arry) + (if (if (featurep 'xemacs) + (let ((keys (vconcat dmacro-key + (or *dmacro-arry-1* *dmacro-arry*) + dmacro-key))) + (equal keys + (subseq rkeys (- (length keys))))) + (equal dmacro-keys (dmacro-subseq rkeys (- (length dmacro-keys))))) + (progn + (setq *dmacro-arry-1* nil) + *dmacro-arry*) + (setq arry (dmacro-search (dmacro-subseq rkeys 0 (- (length dmacro-key))))) + (if (null arry) + (setq *dmacro-arry* nil) + (let ((s1 (car arry)) (s2 (cdr arry))) + (setq *dmacro-arry* (dmacro-concat s2 s1) + *dmacro-arry-1* (if (equal s1 "") nil s1)) + (setq last-kbd-macro *dmacro-arry*) + (if (equal s1 "") *dmacro-arry* s1)) + )))) + +(defun dmacro-search (array) + (let* ((arry (dmacro-array-reverse array)) + (sptr 1) + (dptr0 (dmacro-array-search (dmacro-subseq arry 0 sptr) arry sptr)) + (dptr dptr0) + maxptr) + (while (and dptr0 + (not (dmacro-array-search dmacro-key (dmacro-subseq arry sptr dptr0)))) + (if (= dptr0 sptr) + (setq maxptr sptr)) + (setq sptr (1+ sptr)) + (setq dptr dptr0) + (setq dptr0 (dmacro-array-search (dmacro-subseq arry 0 sptr) arry sptr)) + ) + (if (null maxptr) + (let ((predict-arry (dmacro-array-reverse (dmacro-subseq arry (1- sptr) dptr)))) + (if (dmacro-array-search dmacro-key predict-arry) + nil + (cons predict-arry (dmacro-array-reverse (dmacro-subseq arry 0 (1- sptr))))) + ) + (cons "" (dmacro-array-reverse (dmacro-subseq arry 0 maxptr))) + ) + )) + +(defun dmacro-array-reverse (arry) + (dmacro-concat (reverse (mapcar 'identity arry)))) + +(defun dmacro-array-search (pat arry &optional start) + (let* ((len (length pat)) + (max (- (length arry) len)) + p found + ) + (setq p (if start start 0)) + (while (and (not found) (<= p max)) + (setq found (equal pat (dmacro-subseq arry p (+ p len)))) + (if (not found) (setq p (1+ p))) + ) + (if found p nil) + )) + +(provide 'dmacro) diff --git a/site-lisp/emacs-smartchr/smartchr.el b/site-lisp/emacs-smartchr/smartchr.el new file mode 100644 index 0000000..dcfaabe --- /dev/null +++ b/site-lisp/emacs-smartchr/smartchr.el @@ -0,0 +1,169 @@ +;;; smartchr.el -- emacs version of smartchr.vim + +;; Copyright (c) 2009 by IMAKADO. + +;; Author: IMAKADO +;; blog: http://d.hatena.ne.jp/IMAKADO (japanese) +;; Prefix: smartchr + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + + +;;; Thanks to k1LoW for original idea. + +;;; Commentary: + +;; (global-set-key (kbd "=") (smartchr '(" = " " == " " === "))) + +;; substitute `!!' with cursor +;; (global-set-key (kbd "{") +;; (smartchr '("{ `!!' }" "{ \"`!!'\" }" "{"))) + + +;;; TODO: +;; Error with head version of auto-complete.el +;; reported by k1LoW + +(require 'cl) + +(defgroup smartchr nil + "smartchr group" + :group 'smartchr) + +(defcustom smartchr-template-cursor-re (rx "`!!'") + "cursor" + :group 'smartchr) + +(defstruct (smartchr-struct + (:constructor smartchr-make-struct + (&key cleanup-fn insert-fn))) + cleanup-fn insert-fn) + +(defun smartchr (&rest list-of-string) + (let ((list-of-string (if (consp (car-safe list-of-string)) + (car-safe list-of-string) + list-of-string))) + (lexical-let ((smartchr-structs (mapcar 'smartchr-parse list-of-string)) + (last-struct nil) + (count 0)) + (lambda () + (interactive) + (if (eq this-command real-last-command) + (incf count) + (setq count 0)) + (when (>= count (length smartchr-structs)) + (setq count 0)) + ;; cleanup -> insert + (let ((struct (nth count smartchr-structs))) + (assert (smartchr-struct-p struct)) + (when (eq this-command real-last-command) + (assert (smartchr-struct-p last-struct)) + (funcall (smartchr-struct-cleanup-fn last-struct))) + (setq last-struct struct) + (funcall (smartchr-struct-insert-fn struct))))))) + +(defun smartchr-parse (template) + (cond + ((smartchr-struct-p template) + template) + ((functionp template) + (lexical-let ((str-or-struct (funcall template))) + (cond + ((smartchr-struct-p str-or-struct) + str-or-struct) + ((stringp str-or-struct) + (smartchr-parse str-or-struct)) + (t + (smartchr-make-struct + :cleanup-fn (lambda ()) + :insert-fn (lambda ())))))) + ((string-match smartchr-template-cursor-re template) + (destructuring-bind (pre post) (split-string template smartchr-template-cursor-re) + (lexical-let ((pre pre) (post post)) + (smartchr-make-struct + :cleanup-fn (lambda () + (delete-backward-char (length pre)) + (delete-backward-char (- (length post)))) + :insert-fn (lambda () + (insert pre) + (save-excursion (insert post))))))) + (t + (lexical-let ((template template)) + (smartchr-make-struct + :cleanup-fn (lambda () (delete-backward-char (length template))) + :insert-fn (lambda () (insert template))))))) + + +;;;; Tests!! +(dont-compile + (when (fboundp 'expectations) + (expectations + (desc "smartchr-parse smartchr-template-cursor-re") + (expect "{ }" + (with-temp-buffer + (let ((smartchr-struct-cursor-re "`!!'")) + (let ((struct (smartchr-parse "{ `!!' }"))) + (assert (smartchr-struct-p struct)) + (funcall (smartchr-struct-insert-fn struct)) + (buffer-string))))) + + (expect "" + (with-temp-buffer + (let ((smartchr-struct-cursor-re "`!!'")) + (let ((struct (smartchr-parse "{ `!!' }"))) + (assert (smartchr-struct-p struct)) + (funcall (smartchr-struct-insert-fn struct)) + (funcall (smartchr-struct-cleanup-fn struct)) + (buffer-string))))) + + (desc "template allow function") + (expect t + (with-temp-buffer + (let ((smartchr-struct-cursor-re "`!!'") + (fn-called nil)) + (let ((struct (smartchr-parse (lambda () (setq fn-called t))))) + (assert (smartchr-struct-p struct)) + (funcall (smartchr-struct-insert-fn struct)) + fn-called)))) + + (expect "hi" + (with-temp-buffer + (let ((smartchr-struct-cursor-re "`!!'")) + (let ((struct (smartchr-parse (lambda () "hi")))) + (assert (smartchr-struct-p struct)) + (funcall (smartchr-struct-insert-fn struct)) + (buffer-string))))) + + (desc "smartchr-parse pass argument if argument is already struct") + (expect t + (smartchr-struct-p + (smartchr-parse + (smartchr-make-struct + :cleanup-fn (lambda ()) + :insert-fn (lambda ()))))) + + (desc "smartchr-parse rest args") + (with-temp-buffer + (let ((smartchr-struct-cursor-re "`!!'")) + (let ((cmd (smartchr "a" "b")) + (do-nothing (lambda () (interactive)))) + (call-interactively cmd) + (buffer-string)))) + ))) + + +(provide 'smartchr) +;; smartchr.el ends here. diff --git a/site-lisp/foreign-regexp.el/.gitattributes b/site-lisp/foreign-regexp.el/.gitattributes new file mode 100644 index 0000000..31884f8 --- /dev/null +++ b/site-lisp/foreign-regexp.el/.gitattributes @@ -0,0 +1 @@ +* ident diff --git a/site-lisp/foreign-regexp.el/.gitignore b/site-lisp/foreign-regexp.el/.gitignore new file mode 100644 index 0000000..2042151 --- /dev/null +++ b/site-lisp/foreign-regexp.el/.gitignore @@ -0,0 +1,2 @@ +*.elc +attic diff --git a/site-lisp/foreign-regexp.el/README.org b/site-lisp/foreign-regexp.el/README.org new file mode 100644 index 0000000..bcecbe0 --- /dev/null +++ b/site-lisp/foreign-regexp.el/README.org @@ -0,0 +1,407 @@ +#+STARTUP: indent +* foreign-regexp.el --- search and replace by foreign regexp. +** CAUTION + +THIS LIBRARY IS VERY EXPERIMENTAL!!! + + +** Overview + +This library is an extension of `shell-command'. + +What this library does are: + +1. Search for a regexp(*1) from text in current buffer by + external command(*2). + + (*1) You can write regexp with syntax of external command. + + (*2) External commands written in Perl (v5.8 or later + is required) and Ruby (v1.9 or later is required) + are pre-defined in this file. + To use regexp syntax of your choice, you can + write your own external command. + + +2. Let us browse search results from an external command via + Emacs user interface like `occur' and `isearch'. + + Also let us apply results of the replacement operation by an + external command via `query-replace' interface. + + +** REQUIREMENTS + +By shell scripts defined in this file as default external commands, +perl (>= 5.8) or ruby (>= 1.9) is required. + +Also features `cl', `menu-bar' and `re-builder' are required. + +For better multilingual support, Emacs (>= 21) may be required. + + +** INSTALLING +To install this library, save this file to a directory in your +=load-path= (you can view the current =load-path= using +=C-h v load-path = within Emacs), then add the following +lines to your =.emacs= start up file: + +#+BEGIN_EXAMPLE + (require 'foreign-regexp) + + (custom-set-variables + '(foreign-regexp/regexp-type 'perl) ;; Choose by your preference. + '(reb-re-syntax 'foreign-regexp)) ;; Tell re-builder to use foreign regexp. +#+END_EXAMPLE + +** TERMINOLOGY +Technical terms appear in this document are as follows. + +- FOREIGN REGEXP :: + A regular expression in syntax which is foreign to Emacs. + Typically, it is not so much backslashy. + By default, Regular expressions in syntax of `Perl' and + `Ruby' can be used as FOREIGN REGEXP with this library. + +- EXTERNAL COMMAND :: + An external program that gives Emacs the ability to handle + FOREIGN REGEXP. + Commands written in `Perl' and `Ruby' are pre-defined in + this library. + + +** USAGE EXAMPLE + +*** [Example-1] Query Replace in manner of Perl. + +**** STEP-1: Set regexp-type to Perl. + +: M-x foreign-regexp/regexp-type/set perl + +- NOTE :: + Once you choose REGEXP-TYPE, Emacs will remember it + until exit. You can also set and save REGEXP-TYPE for + next Emacs session by setting value via customize. + See "COMMANDS (1) SETTING REGEXP-TYPE" section in this document. + +**** STEP-2: Run query replace + +: M-s M-% (\d+)---(\d+) ${1}456${2} + +This command replaces text in buffer: + +: 123---789 + +with text: + +: 123456789 + +Variables in replacement string are interpolated by Perl. + + +*** [Example-2] Query Replace in manner of Ruby. + +**** STEP-1: Set regexp-type to Ruby. + +: M-x foreign-regexp/regexp-type/set ruby + +**** STEP-2: Run query replace + +: M-s M-% (\d+)---(\d+) #{$1}456#{$2} + +This command replaces text in buffer: + +: 123---789 + +with text: + +: 123456789 + +Variables in replacement string are interpolated by ruby +as if it ware in the string inside of a block of "gsub" +method. + + +** COMMANDS + +*** (1) SETTING REGEXP-TYPE + +: M-x foreign-regexp/regexp-type/set REGEXP-TYPE + +Set type of regexp syntax to REGEXP-TYPE. +By default, two regexp-types `perl' and `ruby' are provided. + +You can also set REGEXP-TYPE via customization interface: + +: M-x customize-apropos foreign-regexp/regexp-type + + +*** (2) SEARCH AND REPLACEMENT + +- NOTE :: + While editing a regular expression on the minibuffer prompt + of `foreign-regexp' commands below, you can switch to another + `foreign-regexp' command without losing current editing state. + +: M-s M-o REGEXP +: M-x foreign-regexp/occur REGEXP + +Show all lines in the current buffer containing a match +for foreign REGEXP. + +: M-s M-% REGEXP REPLACEMENT +: M-x foreign-regexp/query-replace REGEXP REPLACEMENT + +Replace some matches for foreign REGEXP with REPLACEMENT. +Note that notation of REPLACEMENT is different for +each REGEXP-TYPE. + +: M-s M-s +: M-x foreign-regexp/isearch-forward + +Begin incremental search for an foreign regexp. + +: M-s M-r +: M-x foreign-regexp/isearch-backward REGEXP + +Begin reverse incremental search for an foreign regexp. + +: M-s M-f REGEXP +: M-x foreign-regexp/non-incremental/search-forward REGEXP + +Search for an foreign REGEXP. + +: M-s M-F REGEXP +: M-x foreign-regexp/non-incremental/search-backward REGEXP + +Search for an foreign REGEXP backward. + +: M-s M-g +: M-x nonincremental-repeat-search-forward + +Search forward for the previous search string or regexp. + +: M-s M-G +: M-x nonincremental-repeat-search-backward + +Search backward for the previous search string or regexp. + + +*** (3) WORKING WITH SEARCH OPTIONS + +- NOTE :: + The status of each search option will be displayed by an + indicator which is put on the minibuffer prompt of each + `foreign-regexp' command, or put on the mode-line of a + buffer `*RE-Builder*'. The indicator will be displayed + like these: "[isx]" for perl, "[imx]" for ruby. + +: M-s M-i +: M-x foreign-regexp/toggle-case-fold + +Toggle search option `case-fold-search'. + +: M-s M-m +: M-x foreign-regexp/toggle-dot-match + +Toggle search option `foreign-regexp/dot-match-a-newline-p'. + +: M-s M-x +: M-x foreign-regexp/toggle-ext-regexp + +Toggle search option `foreign-regexp/use-extended-regexp-p'. + + +*** (4): CONSTRUCTING REGEXP + +: M-x reb-change-syntax foreign + +Set the syntax used by the `re-builder' to foreign regexp. + +: M-s M-l +: M-x re-builder + +Start an interactive construction of a regexp with +`re-builder'. +(See also documents of `re-builder') + +- NOTE-1 :: + To apply the regexp, which was constructed with + `re-builder', to the `foreign-regexp' commands, + call commands below in `*RE-Builder*' buffer: + +: M-s M-o +: M-x foreign-regexp/re-builder/occur-on-target-buffer + +Run `foreign-regexp/occur' in `reb-target-buffer' +with an foreign regexp in the buffer `*RE-Builder*'. + +: M-s M-% +: M-x foreign-regexp/re-builder/query-replace-on-target-buffer + +Run `foreign-regexp/query-replace' in `reb-target-buffer' +with an foreign regexp in the buffer `*RE-Builder*'. + +: M-s M-s +: M-x foreign-regexp/re-builder/isearch-forward-on-target-buffer + +Run `foreign-regexp/isearch-forward' in `reb-target-buffer' +with an foreign regexp in the buffer `*RE-Builder*'. + +: M-s M-r +: M-x foreign-regexp/re-builder/isearch-backward-on-target-buffer + +Run `foreign-regexp/isearch-backward' in `reb-target-buffer' +with an foreign regexp in the buffer `*RE-Builder*'. + +: M-s M-f +: M-x foreign-regexp/re-builder/non-incremental-search-forward-on-target-buffer + +Run `foreign-regexp/non-incremental/search-forward' in `reb-target-buffer' +with an foreign regexp in the buffer `*RE-Builder*'. + +: M-s M-F +: M-x foreign-regexp/re-builder/non-incremental-search-backward-on-target-buffer + +Run `foreign-regexp/non-incremental/search-backward' in `reb-target-buffer' +with an foreign regexp in the buffer `*RE-Builder*'. + + +- NOTE :: + You can switch search options of the + `reb-target-buffer' with commands below: + +: M-s M-i +: M-x foreign-regexp/re-builder/toggle-case-fold-on-target-buffer + +Toggle search option `case-fold-search' of `reb-target-buffer'. + +: M-s M-m +: M-x foreign-regexp/re-builder/toggle-dot-match-on-target-buffer + +Toggle search option `foreign-regexp/dot-match-a-newline-p' +of `reb-target-buffer'. + +: M-s M-x +: M-x foreign-regexp/re-builder/toggle-ext-regexp-on-target-buffer + +Toggle search option `foreign-regexp/dot-match-a-newline-p' +of `foreign-regexp/use-extended-regexp-p'. + +: M-\ +: M-x foreign-regexp/quote-meta-in-region + +Escape characters in region, that would have special meaning +in foreign regexp. + + +*** (5) ALIGNMENT USING FOREIGN REGEXP + +: C-M-| +: M-x align + +Align region according to pre-defined rules. + +Foreign regexp can be used in a rule by putting an +`regexp-type' attribute on the rule. + +Example) +#+BEGIN_EXAMPLE + (add-to-list + 'align-rules-list + '(perl-and-ruby-hash-form + + ;; This rule will be applied when `regexp-type' + ;; is `perl' or `ruby'. + (regexp-type . '(perl ruby)) + + (regexp . "([ \\t]*)=>[ \\t]*[^# \\t\\n]") ;; Foreign Regexp + (group . 1) + (repeat . t) + (modes . '(perl-mode cperl-mode ruby-mode)))) +#+END_EXAMPLE + +See also `align-rules-list' and help document of an advice +of `align-region' for more information about alignment rules. + +: M-s M-a REGEXP +: M-x foreign-regexp/align REGEXP + +Align the current region using a partial foreign regexp +read from the minibuffer. + +The foreign regexp read from the minibuffer will be +supposed to be placed after whitespaces. + +See also `align-regexp'. + +: C-u M-s M-a REGEXP GROUP SPACING REPEAT +: C-u M-x foreign-regexp/align REGEXP GROUP SPACING REPEAT + +Align the current region using a full foreign regexp +read from the minibuffer. + +Example) + < Use regexp of Perl in this example. > + +#+BEGIN_EXAMPLE + When texts in region is: + + (one 1) + (ten 10) + (hundred 100) + (thousand 1000) + + Run command on the region with options: + + REGEXP: ([ \t]+)\d + | + +--- GROUP: 1 + Alignment will be applied to each + lines by inserting whitespaces to + the place where the sub-expression + specified by `GROUP' is matched to. + SPACING: 1 + REPEAT: y + + Result is: + + (one 1) + (ten 10) + (hundred 100) + (thousand 1000) + | + +---- Aligned using SPACING spaces. +#+END_EXAMPLE +See also `align-regexp'. + +** FOR HACKERS +You can use regexp syntax of your choice of language, if you +write four external commands below with the language: + +`foreign-regexp/replace/external-command' +`foreign-regexp/occur/external-command' +`foreign-regexp/search/external-command' +`foreign-regexp/quote-meta/external-command' + +and install these commands with the function +`foreign-regexp/regexp-type/define'. + +See help documents of these variables and function +for more information. + + +** KNOWN PROBLEMS + - Codes aside, this document should be rewritten. + My English sucks :-( + +** WISH LIST + - History for `re-builder'. + - `grep' with foreign regexp? + - `tags-search', `tags-query-replace', `dried-do-search' and + `dired-do-query-replace-regexp' with foreign regexp? + - `multi-isearch-buffers-regexp', `multi-occur', + `multi-occur-in-matching-buffers', `how-many', `flush-lines', + and `keep-lines' with foreign regexp? + - Better error messages. + - Write Tests. diff --git a/site-lisp/foreign-regexp.el/bin/foreign-regexp-occur-aux.pl b/site-lisp/foreign-regexp.el/bin/foreign-regexp-occur-aux.pl new file mode 100755 index 0000000..533197d --- /dev/null +++ b/site-lisp/foreign-regexp.el/bin/foreign-regexp-occur-aux.pl @@ -0,0 +1,74 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.008; + +use Encode; +use utf8; + +use English qw( -no_match_vars ); +use FileHandle; + +sub main () { + my $fn_in = shift @ARGV or die "No input file name!"; + my $fn_out = shift @ARGV or die "No output file name!"; + my $fn_pat = shift @ARGV or die "No pattern file name!"; + my $dot_p = @ARGV ? shift(@ARGV) : die "No dot matches new line flag."; + my $case_p = @ARGV ? shift(@ARGV) : die "No case sensitive flag."; + my $ext_p = @ARGV ? shift(@ARGV) : die "No extended regular expression flag.";; + my $code = 'utf8'; + my $offset = 0; + + umask 0177; + + my($str_in, $str_pat, $str_repl); + use PerlIO::encoding; + local $PerlIO::encoding::fallback = Encode::FB_CROAK(); # Die on invalid char. + { + local $INPUT_RECORD_SEPARATOR = undef; + $str_pat = FileHandle->new($fn_pat, "<:encoding($code)")->getline; + } + + my $pat = eval("qr/\${str_pat}/om" . + ( $dot_p ? "s" : "") . + (!$case_p ? "i" : "") . + ( $ext_p ? "x" : "")); + die $EVAL_ERROR if $EVAL_ERROR; + + { + local $INPUT_RECORD_SEPARATOR = "\n"; + my $fh_in = FileHandle->new($fn_in, "<:encoding($code)"); + my $fh_out = FileHandle->new($fn_out, ">:encoding($code)"); + + print $fh_out "(setq result '(\n"; + + while (my $line = <$fh_in>) { + my $len = length $line; + my $matched = 0; + chomp $line; + + + while ($line =~ m/${pat}/g) { + print $fh_out '(' unless $matched++; + print($fh_out + '(', + $offset + $LAST_MATCH_START[0], ' ', + $offset + $LAST_MATCH_END [0], + ')'); + } + + print $fh_out ')' if $matched; + + $offset += $len; + } + + print $fh_out "))\n"; + print $fh_out ";;; EOF\n"; + } + + exit 0; +} + +main(); + +# EOF diff --git a/site-lisp/foreign-regexp.el/bin/foreign-regexp-occur-aux.rb b/site-lisp/foreign-regexp.el/bin/foreign-regexp-occur-aux.rb new file mode 100755 index 0000000..d926c38 --- /dev/null +++ b/site-lisp/foreign-regexp.el/bin/foreign-regexp-occur-aux.rb @@ -0,0 +1,52 @@ +#!/usr/bin/env ruby +# -*- coding: utf-8-unix -*- + +abort "Ruby version is too old (1.9 or later is required)." if RUBY_VERSION < "1.9" + +def main () + fn_in, fn_out, fn_pat, dot_p, case_p, ext_p = ARGV + + str_pat = open(fn_pat, 'r:UTF-8') {|f| f.read} + offset = 0 + + pat = Regexp.new(str_pat, ((dot_p.empty? ? 0 : Regexp::MULTILINE) | + (case_p.empty? ? Regexp::IGNORECASE : 0) | + (ext_p.empty? ? 0 : Regexp::EXTENDED))) + + $stdout = open(fn_out, 'w:UTF-8') + + print "(setq result '(" + + open(fn_in, 'r:UTF-8') do |file_in| + while line = file_in.gets do + matched = 0 + len = line.length + line.chomp! + + line.scan( pat ) do + print '(' if matched == 0 + print '(' + print offset + Regexp.last_match.begin(0), ' ' + print offset + Regexp.last_match.end(0) + print ')' + matched += 1 + end + print ')' if matched != 0 + + offset += len + end + end + + print "))\n" + print ";;; EOF\n" + + exit 0 + +rescue RegexpError + $stderr.print $!.message + exit 1 +end + +main + +# EOF diff --git a/site-lisp/foreign-regexp.el/bin/foreign-regexp-quote-meta-aux.pl b/site-lisp/foreign-regexp.el/bin/foreign-regexp-quote-meta-aux.pl new file mode 100755 index 0000000..8f9fca8 --- /dev/null +++ b/site-lisp/foreign-regexp.el/bin/foreign-regexp-quote-meta-aux.pl @@ -0,0 +1,47 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.008; + +use Encode; +use utf8; + +use English qw( -no_match_vars ); +use FileHandle; + +sub escape_perl_str_for_emacs { + my $r_txt = shift; + ${$r_txt} =~ s/\\/\\\\/og; + ${$r_txt} =~ s/"/\\"/og; +} + +sub main () { + my $fn_out = shift @ARGV or die "No output file name!"; + my $fn_pat = shift @ARGV or die "No pattern file name!"; + my $code = 'utf8'; + + umask 0177; + + my($str_pat); + use PerlIO::encoding; + local $PerlIO::encoding::fallback = Encode::FB_CROAK(); # Die on invalid char. + { + local $INPUT_RECORD_SEPARATOR = undef; + $str_pat = FileHandle->new($fn_pat, "<:encoding($code)")->getline; + $str_pat = quotemeta($str_pat); + escape_perl_str_for_emacs(\$str_pat) + } + + { + my $fh_out = FileHandle->new($fn_out, ">:encoding($code)"); + + print $fh_out "(setq result \"${str_pat}\")\n"; + print $fh_out ";;; EOF\n"; + } + + exit 0; +} + +main(); + +# EOF diff --git a/site-lisp/foreign-regexp.el/bin/foreign-regexp-quote-meta-aux.rb b/site-lisp/foreign-regexp.el/bin/foreign-regexp-quote-meta-aux.rb new file mode 100755 index 0000000..dd4d8c4 --- /dev/null +++ b/site-lisp/foreign-regexp.el/bin/foreign-regexp-quote-meta-aux.rb @@ -0,0 +1,30 @@ +#!/usr/bin/env ruby +# -*- coding: utf-8-unix -*- + +abort "Ruby version is too old (1.9 or later is required)." if RUBY_VERSION < "1.9" + +def escape_ruby_str_for_emacs! (str) + str.gsub!(/\\/) {'\\\\'} + str.gsub!(/"/ ) {'\\"'} +end + +def main () + fn_out, fn_pat = ARGV + + str_pat = open(fn_pat, 'r:UTF-8') {|f| f.read} + + $stdout = open(fn_out, 'w:UTF-8') + + retval = Regexp.escape(str_pat) + escape_ruby_str_for_emacs!(retval) + + print '(setq result "' + print retval + print '")' + + exit 0 +end + +main + +# EOF diff --git a/site-lisp/foreign-regexp.el/bin/foreign-regexp-replace-aux.pl b/site-lisp/foreign-regexp.el/bin/foreign-regexp-replace-aux.pl new file mode 100755 index 0000000..b83a80e --- /dev/null +++ b/site-lisp/foreign-regexp.el/bin/foreign-regexp-replace-aux.pl @@ -0,0 +1,107 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.008; + +use Encode; +use utf8; + +package main; +use English qw( -no_match_vars ); +use FileHandle; + +sub generate_build_replacement_fn { + # Eval replacement string in environment + # which has no lexical variable. + # + # Special-variables in the replacement string + # will be interpolated. + eval 'sub {"'.$_[0].'"}'; +} + +sub eval_replacement { + eval $_[0] +} + +sub interpolate_replacement { + eval '"'.$_[0].'"' +} + +sub eval_and_interpolate_replacement { + # Not tested yet. + my $str_repl = shift; + $str_repl = eval_replacement($str_repl); + die "Error while evaluating replacement \"${str_repl}\":\n${EVAL_ERROR}" if $EVAL_ERROR; + $str_repl = interpolate_replacement($str_repl); + die "Error while interpolating replacement \"${str_repl}\":\n${EVAL_ERROR}" if $EVAL_ERROR; + $str_repl +} + +sub escape_str_to_eval { + my $r_txt = shift; + ${$r_txt} =~ s/\\/\\\\/og; + ${$r_txt} =~ s/"/\\"/og; +} + +sub escape_perl_str_for_emacs { + my $r_txt = shift; + ${$r_txt} =~ s/\\/\\\\/og; + ${$r_txt} =~ s/"/\\"/og; +} + +sub main () { + my $fn_in = shift @ARGV or die "No input file name!"; + my $fn_out = shift @ARGV or die "No output file name!"; + my $fn_pat = shift @ARGV or die "No pattern file name!"; + my $fn_repl = shift @ARGV or die "No replacement file name!"; + my $dot_p = @ARGV ? shift(@ARGV) : die "No dot matches new line flag."; + my $case_p = @ARGV ? shift(@ARGV) : die "No case sensitive flag."; + my $ext_p = @ARGV ? shift(@ARGV) : die "No extended regular expression flag.";; + my $code = 'utf8'; + + my($str_in, $str_pat, $str_repl); + use PerlIO::encoding; + local $PerlIO::encoding::fallback = Encode::FB_CROAK(); # Die on invalid char. + { + local $INPUT_RECORD_SEPARATOR = undef; + $str_in = FileHandle->new($fn_in, "<:encoding($code)")->getline; + $str_pat = FileHandle->new($fn_pat, "<:encoding($code)")->getline; + $str_repl = FileHandle->new($fn_repl, "<:encoding($code)")->getline; + } + my $pat = eval("qr/\${str_pat}/om" . + ( $dot_p ? "s" : "") . + (!$case_p ? "i" : "") . + ( $ext_p ? "x" : "")); + die $EVAL_ERROR if $EVAL_ERROR; + + escape_str_to_eval(\$str_repl); + my $build_replacement_fn = generate_build_replacement_fn($str_repl); + die "Error in replacement \"${str_repl}\":\n${EVAL_ERROR}" if $EVAL_ERROR; + + umask 0177; + my $fh_out = FileHandle->new($fn_out, ">:encoding($code)"); + + print $fh_out "(setq result '(", "\n"; + + while ($str_in =~ m/${pat}/omg) { + my $replacement = eval { $build_replacement_fn->() }; + die "Error while interpolating replacement \"${str_repl}\":\n${EVAL_ERROR}" if $EVAL_ERROR; + + escape_perl_str_for_emacs(\$replacement); + + print $fh_out " ("; + print $fh_out $LAST_MATCH_START[0], ' '; + print $fh_out $LAST_MATCH_END [0], ' '; + print $fh_out '"', $replacement, '"'; + print $fh_out " )", "\n"; + } + + print $fh_out "))", "\n"; + print $fh_out ";;; EOF", "\n"; + + exit 0; +} + +main(); + +# EOF diff --git a/site-lisp/foreign-regexp.el/bin/foreign-regexp-replace-aux.rb b/site-lisp/foreign-regexp.el/bin/foreign-regexp-replace-aux.rb new file mode 100755 index 0000000..945cb4a --- /dev/null +++ b/site-lisp/foreign-regexp.el/bin/foreign-regexp-replace-aux.rb @@ -0,0 +1,55 @@ +#!/usr/bin/env ruby +# -*- coding: utf-8-unix -*- + +abort "Ruby version is too old (1.9 or later is required)." if RUBY_VERSION < "1.9" + +def escape_str_for_eval! (str) + str.gsub!(/"/ ){'\\"'} +end + +def escape_ruby_str_for_emacs! (str) + str.gsub!(/\\/) {'\\\\'} + str.gsub!(/"/ ) {'\\"'} +end + +def main () + fn_in, fn_out, fn_pat, fn_rpl, dot_p, case_p, ext_p = ARGV + + str_in = open(fn_in, 'r:UTF-8') {|f| f.read} + str_pat = open(fn_pat, 'r:UTF-8') {|f| f.read} + str_rpl = open(fn_rpl, 'r:UTF-8') {|f| f.read} + + pat = Regexp.new(str_pat, ((dot_p.empty? ? 0 : Regexp::MULTILINE) | + (case_p.empty? ? Regexp::IGNORECASE : 0) | + (ext_p.empty? ? 0 : Regexp::EXTENDED))) + + escape_str_for_eval!(str_rpl) + + $stdout = open(fn_out, 'w:UTF-8') + + print "(setq result '(" + + str_in.scan( pat ) do |m| + replacement = eval '"' + str_rpl + '"' + escape_ruby_str_for_emacs!(replacement) + + print '(' + print Regexp.last_match.begin(0), ' ' + print Regexp.last_match.end(0), ' ' + print '"', replacement, '"' + print ')' + end + + print "))\n" + print ";;; EOF\n" + + exit 0 + +rescue RegexpError + $stderr.print $!.message + exit 1 +end + +main + +# EOF diff --git a/site-lisp/foreign-regexp.el/bin/foreign-regexp-search-aux.pl b/site-lisp/foreign-regexp.el/bin/foreign-regexp-search-aux.pl new file mode 100755 index 0000000..465359f --- /dev/null +++ b/site-lisp/foreign-regexp.el/bin/foreign-regexp-search-aux.pl @@ -0,0 +1,64 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.008; + +use Encode; +use utf8; + +use English qw( -no_match_vars ); +use FileHandle; + +sub main () { + my $fn_in = shift @ARGV or die "No input file name!"; + my $fn_out = shift @ARGV or die "No output file name!"; + my $fn_pat = shift @ARGV or die "No pattern file name!"; + my $dot_p = @ARGV ? shift(@ARGV) : die "No dot matches new line flag."; + my $case_p = @ARGV ? shift(@ARGV) : die "No case sensitive flag."; + my $ext_p = @ARGV ? shift(@ARGV) : die "No extended regular expression flag."; + my $limit = @ARGV ? shift(@ARGV) : die "No search limit."; + my $code = 'utf8'; + + umask 0177; + + my($str_in, $str_pat, $str_repl); + use PerlIO::encoding; + local $PerlIO::encoding::fallback = Encode::FB_CROAK(); # Die on invalid char. + { + local $INPUT_RECORD_SEPARATOR = undef; + $str_in = FileHandle->new($fn_in, "<:encoding($code)")->getline; + $str_pat = FileHandle->new($fn_pat, "<:encoding($code)")->getline; + } + + my $pat = eval("qr/\${str_pat}/om" . + ( $dot_p ? "s" : "") . + (!$case_p ? "i" : "") . + ( $ext_p ? "x" : "")); + die $EVAL_ERROR if $EVAL_ERROR; + + { + my $fh_out = FileHandle->new($fn_out, ">:encoding($code)"); + + print $fh_out "(setq result '("; + + my $i = 0; + while (((!$limit) || (++$i <= $limit)) && ($str_in =~ m/${pat}/omg)) { + print $fh_out ' ('; + + foreach my $i (0 .. $#LAST_MATCH_START) { + print $fh_out $LAST_MATCH_START[$i], ' '; + print $fh_out $LAST_MATCH_END [$i], ' '; + } + print $fh_out ')',; + } + + print $fh_out "))\n"; + print $fh_out ";;; EOF\n"; + } + + exit 0; +} + +main(); + +# EOF diff --git a/site-lisp/foreign-regexp.el/bin/foreign-regexp-search-aux.rb b/site-lisp/foreign-regexp.el/bin/foreign-regexp-search-aux.rb new file mode 100755 index 0000000..836eb2a --- /dev/null +++ b/site-lisp/foreign-regexp.el/bin/foreign-regexp-search-aux.rb @@ -0,0 +1,46 @@ +#!/usr/bin/env ruby +# -*- coding: utf-8-unix -*- + +abort "Ruby version is too old (1.9 or later is required)." if RUBY_VERSION < "1.9" + +def main () + fn_in, fn_out, fn_pat, dot_p, case_p, ext_p, limit = ARGV + + str_in = open(fn_in, 'r:UTF-8') {|f| f.read} + str_pat = open(fn_pat, 'r:UTF-8') {|f| f.read} + + pat = Regexp.new(str_pat, ((dot_p.empty? ? 0 : Regexp::MULTILINE) | + (case_p.empty? ? Regexp::IGNORECASE : 0) | + (ext_p.empty? ? 0 : Regexp::EXTENDED))) + + $stdout = open(fn_out, 'w:UTF-8') + + print "(setq result '(" + + limit = (Integer limit rescue nil) + count = 0 + + str_in.scan( pat ) do + break unless (!limit || ((count += 1) <= limit)) + + print '(' + Regexp.last_match.length.times {|i| + print Regexp.last_match.begin(i), ' ' + print Regexp.last_match.end(i), ' ' + } + print ')' + end + + print "))\n" + print ";;; EOF\n" + + exit 0 + +rescue RegexpError + $stderr.print $!.message + exit 1 +end + +main + +# EOF diff --git a/site-lisp/foreign-regexp.el/foreign-regexp.el b/site-lisp/foreign-regexp.el/foreign-regexp.el new file mode 100644 index 0000000..f6a70a0 --- /dev/null +++ b/site-lisp/foreign-regexp.el/foreign-regexp.el @@ -0,0 +1,4962 @@ +;; foreign-regexp.el --- search and replace by foreign regexp. + +;; Copyright (C) 2010-2012 K-talo Miyazaki, all rights reserved. + +;; Author: K-talo Miyazaki +;; Created: Sun Nov 28 23:50:45 2010 JST +;; Keywords: convenience emulations matching tools unix wp +;; Revision: $Id$ +;; URL: +;; GitHub: http://github.com/k-talo/foreign-regexp.el + +;; This file is not part of GNU Emacs. + +;; This program is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; NOTE +;; +;; This library is just tested on Emacs 23.2.1 on Ubuntu 10.04 +;; and Mac OS X 10.6.3, and won't be run with any version of XEmacs. + +;;; Commentary: +;; +;; CAUTION +;; ======= +;; THIS LIBRARY IS VERY EXPERIMENTAL!!! +;; +;; +;; Overview +;; ======== +;; This library is an extension of `shell-command'. +;; +;; What this library does are: +;; +;; 1. Search for a regexp(*1) from text in current buffer by +;; external command(*2). +;; +;; (*1) You can write regexp with syntax of external +;; command. +;; +;; (*2) External commands written in Perl (v5.8 or later +;; is required) and Ruby (v1.9 or later is required) +;; are pre-defined in this file. +;; To use regexp syntax of your choice, you can +;; write your own external command. +;; +;; 2. Let us browse search results from an external command via +;; Emacs user interface like `occur' and `isearch'. +;; +;; Also let us apply results of the replacement operation by an +;; external command via `query-replace' interface. +;; +;; +;; REQUIREMENTS +;; ============ +;; By shell scripts defined in this file as default external commands, +;; perl (>= 5.8) or ruby (>= 1.9) is required. +;; +;; Also features `cl', `menu-bar' and `re-builder' are required. +;; +;; For better multilingual support, Emacs (>= 21) may be required. +;; +;; +;; INSTALLING +;; ========== +;; To install this library, save this file to a directory in your +;; `load-path' (you can view the current `load-path' using "C-h v +;; load-path " within Emacs), then add the following lines to +;; your .emacs start up file: +;; +;; (require 'foreign-regexp) +;; +;; (custom-set-variables +;; '(foreign-regexp/regexp-type 'perl) ;; Choose by your preference. +;; '(reb-re-syntax 'foreign-regexp)) ;; Tell re-builder to use foreign regexp. +;; +;; +;; TERMINOLOGY +;; =========== +;; Technical terms appear in this document are as follows. +;; +;; FOREIGN REGEXP: +;; A regular expression in syntax which is alien to Emacs. +;; Typically, it is not so much backslashy. +;; By default, Regular expressions in syntax of `Perl' and +;; `Ruby' can be used as FOREIGN REGEXP with this library. +;; +;; EXTERNAL COMMAND: +;; An external program that gives Emacs the ability to handle +;; FOREIGN REGEXP. +;; Commands written in `Perl' and `Ruby' are pre-defined in +;; this library. +;; +;; +;; USAGE EXAMPLE +;; ============= +;; +;; [Example-1] Query Replace in manner of Perl. +;; +;; STEP-1: Set regexp-type to Perl. +;; +;; `M-x foreign-regexp/regexp-type/set perl ' +;; +;; NOTE: Once you choose REGEXP-TYPE, Emacs will remember it +;; until exit. You can also set and save REGEXP-TYPE for +;; next Emacs session by setting value via customize. +;; See "COMMANDS(1)" section in this document. +;; +;; STEP-2: Run query replace +;; +;; `M-s M-% (\d+)---(\d+) ${1}456${2} ' +;; +;; This command replaces text in buffer: +;; +;; 123---789 +;; +;; with text: +;; +;; 123456789 +;; +;; Variables in replacement string are interpolated by Perl. +;; +;; +;; [Example-2] Query Replace in manner of Ruby. +;; +;; STEP-1: Set regexp-type to Ruby. +;; +;; `M-x foreign-regexp/regexp-type/set ruby ' +;; +;; STEP-2: Run query replace +;; +;; `M-s M-% (\d+)---(\d+) #{$1}456#{$2} ' +;; +;; This command replaces text in buffer: +;; +;; 123---789 +;; +;; with text: +;; +;; 123456789 +;; +;; Variables in replacement string are interpolated by ruby +;; as if it ware in the string inside of a block of "gsub" +;; method. +;; +;; +;; COMMANDS(1): SETTING REGEXP-TYPE +;; ================================ +;; +;; `M-x foreign-regexp/regexp-type/set REGEXP-TYPE ' +;; +;; Set type of regexp syntax to REGEXP-TYPE. +;; By default, two regexp-types `perl' and `ruby' are provided. +;; +;; You can also set REGEXP-TYPE via customization interface: +;; +;; `M-x customize-apropos foreign-regexp/regexp-type '. +;; +;; +;; COMMANDS(2): SEARCH AND REPLACEMENT +;; =================================== +;; +;; NOTE: While editing a regular expression on the minibuffer prompt +;; of `foreign-regexp' commands below, you can switch to another +;; `foreign-regexp' command without losing current editing state. +;; +;; `M-s M-o REGEXP ' +;; `M-x foreign-regexp/occur REGEXP ' +;; +;; Show all lines in the current buffer containing a match +;; for foreign regexp REGEXP. +;; +;; `M-s M-% REGEXP REPLACEMENT ' +;; `M-x foreign-regexp/query-replace REGEXP REPLACEMENT ' +;; +;; Replace some matches for foreign regexp REGEXP with REPLACEMENT. +;; Note that notation of REPLACEMENT is different for +;; each REGEXP-TYPE. +;; +;; `M-s M-s' +;; `M-x foreign-regexp/isearch-forward ' +;; +;; Begin incremental search for a foreign regexp. +;; +;; `M-s M-r' +;; `M-x foreign-regexp/isearch-backward REGEXP; +;; +;; Begin reverse incremental search for a foreign regexp. +;; +;; `M-s M-f REGEXP ' +;; `M-x foreign-regexp/non-incremental/search-forward REGEXP ' +;; +;; Search for an foreign regexp REGEXP. +;; +;; `M-s M-F REGEXP ' +;; `M-x foreign-regexp/non-incremental/search-backward REGEXP ' +;; +;; Search for an foreign regexp REGEXP backward. +;; +;; `M-s M-g' +;; `M-x nonincremental-repeat-search-forward' +;; +;; Search forward for the previous search string or regexp. +;; +;; `M-s M-G' +;; `M-x nonincremental-repeat-search-backward' +;; +;; Search backward for the previous search string or regexp. +;; +;; +;; COMMANDS(3): WORKING WITH SEARCH OPTIONS +;; ======================================== +;; NOTE: The status of each search option will be displayed by an +;; indicator which is put on the minibuffer prompt of each +;; `foreign-regexp' command, or put on the mode-line of a +;; buffer `*RE-Builder*'. The indicator will be displayed +;; like these: "[isx]" for perl, "[imx]" for ruby. +;; +;; `M-s M-i' +;; `M-x foreign-regexp/toggle-case-fold ' +;; +;; Toggle search option `case-fold-search'. +;; +;; `M-s M-m' +;; `M-x foreign-regexp/toggle-dot-match ' +;; +;; Toggle search option `foreign-regexp/dot-match-a-newline-p'. +;; +;; `M-s M-x' +;; `M-x foreign-regexp/toggle-ext-regexp ' +;; +;; Toggle search option `foreign-regexp/use-extended-regexp-p'. +;; +;; +;; COMMANDS(4): CONSTRUCTING REGEXP +;; ================================ +;; +;; `M-x reb-change-syntax foreign-regexp ' +;; +;; Set the syntax used by the `re-builder' to foreign regexp. +;; +;; `M-s M-l' +;; `M-x re-builder ' +;; +;; Start an interactive construction of a regexp with +;; `re-builder'. +;; (See also documents of `re-builder') +;; +;; NOTE-1: To apply the regexp, which was constructed with +;; `re-builder', to the `foreign-regexp' commands, +;; call commands below in `*RE-Builder*' buffer: +;; +;; `M-s M-o' +;; `M-x foreign-regexp/re-builder/occur-on-target-buffer' +;; +;; Run `foreign-regexp/occur' in `reb-target-buffer' +;; with a foreign regexp in the buffer `*RE-Builder*'. +;; +;; `M-s M-%' +;; `M-x foreign-regexp/re-builder/query-replace-on-target-buffer' +;; +;; Run `foreign-regexp/query-replace' in `reb-target-buffer' +;; with a foreign regexp in the buffer `*RE-Builder*'. +;; +;; `M-s M-s' +;; `M-x foreign-regexp/re-builder/isearch-forward-on-target-buffer' +;; +;; Run `foreign-regexp/isearch-forward' in `reb-target-buffer' +;; with a foreign regexp in the buffer `*RE-Builder*'. +;; +;; `M-s M-r' +;; `M-x foreign-regexp/re-builder/isearch-backward-on-target-buffer' +;; +;; Run `foreign-regexp/isearch-backward' in `reb-target-buffer' +;; with a foreign regexp in the buffer `*RE-Builder*'. +;; +;; `M-s M-f' +;; `M-x foreign-regexp/re-builder/non-incremental-search-forward-on-target-buffer' +;; +;; Run `foreign-regexp/non-incremental/search-forward' in `reb-target-buffer' +;; with a foreign regexp in the buffer `*RE-Builder*'. +;; +;; `M-s M-F' +;; `M-x foreign-regexp/re-builder/non-incremental-search-backward-on-target-buffer' +;; +;; Run `foreign-regexp/non-incremental/search-backward' in `reb-target-buffer' +;; with a foreign regexp in the buffer `*RE-Builder*'. +;; +;; +;; NOTE-2: You can switch search options of the +;; `reb-target-buffer' with commands below: +;; +;; `M-s M-i' +;; `M-x foreign-regexp/re-builder/toggle-case-fold-on-target-buffer' +;; +;; Toggle search option `case-fold-search' of `reb-target-buffer'. +;; +;; `M-s M-m' +;; `M-x foreign-regexp/re-builder/toggle-dot-match-on-target-buffer' +;; +;; Toggle search option `foreign-regexp/dot-match-a-newline-p' +;; of `reb-target-buffer'. +;; +;; `M-s M-x' +;; `M-x foreign-regexp/re-builder/toggle-ext-regexp-on-target-buffer' +;; +;; Toggle search option `foreign-regexp/dot-match-a-newline-p' +;; of `foreign-regexp/use-extended-regexp-p'. +;; +;; `M-\' +;; `M-x foreign-regexp/quote-meta-in-region ' +;; +;; Escape characters in region, that would have special meaning +;; in foreign regexp. +;; +;; +;; COMMANDS(5): ALIGNMENT USING FOREIGN REGEXP +;; =========================================== +;; +;; `C-M-|' +;; `M-x align' +;; +;; Align region according to pre-defined rules. +;; +;; Foreign regexp can be used in a rule by putting an +;; `regexp-type' attribute on the rule. +;; +;; Example) +;; +;; (add-to-list +;; 'align-rules-list +;; '(perl-and-ruby-hash-form +;; +;; ;; This rule will be applied when `regexp-type' +;; ;; is `perl' or `ruby'. +;; (regexp-type . '(perl ruby)) +;; +;; (regexp . "([ \\t]*)=>[ \\t]*[^# \\t\\n]") ;; Foreign Regexp +;; (group . 1) +;; (repeat . t) +;; (modes . '(perl-mode cperl-mode ruby-mode)))) +;; +;; See also `align-rules-list' and help document of an advice +;; of `align-region' for more information about alignment rules. +;; +;; +;; `M-s M-a REGEXP ' +;; `M-x foreign-regexp/align REGEXP ' +;; +;; Align the current region using a partial foreign regexp +;; read from the minibuffer. +;; +;; The foreign regexp read from the minibuffer will be +;; supposed to be placed after whitespaces. +;; +;; See also `align-regexp'. +;; +;; `C-u M-s M-a REGEXP GROUP SPACING REPEAT ' +;; `C-u M-x foreign-regexp/align REGEXP GROUP SPACING REPEAT ' +;; +;; Align the current region using a full foreign regexp +;; read from the minibuffer. +;; +;; Example) +;; +;; < Use regexp of Perl in this example. > +;; +;; When texts in region is: +;; +;; (one 1) +;; (ten 10) +;; (hundred 100) +;; (thousand 1000) +;; +;; Run command on the region with options: +;; +;; REGEXP: ([ \t]+)\d +;; | +;; +--- GROUP: 1 +;; Alignment will be applied to each +;; lines by inserting whitespaces to +;; the place where the sub-expression +;; specified by GROUP is matched to. +;; SPACING: 1 +;; REPEAT: y +;; +;; Result is: +;; +;; (one 1) +;; (ten 10) +;; (hundred 100) +;; (thousand 1000) +;; | +;; +---- Aligned using SPACING spaces. +;; +;; See also `align-regexp'. +;; +;; +;; FOR HACKERS +;; =========== +;; You can use regexp syntax of your choice of language, if you +;; write four external commands below with the language: +;; +;; `foreign-regexp/replace/external-command' +;; `foreign-regexp/occur/external-command' +;; `foreign-regexp/search/external-command' +;; `foreign-regexp/quote-meta/external-command' +;; +;; and install these commands with the function +;; `foreign-regexp/regexp-type/define'. +;; +;; See help documents of these variables and function +;; for more information. +;; +;; +;; KNOWN PROBLEMS +;; ============== +;; - Codes aside, this document should be rewritten. +;; My English sucks :-( +;; +;; +;; WISH LIST +;; ========= +;; - History for `re-builder'. +;; - `grep' with foreign regexp? +;; - `tags-search', `tags-query-replace', `dried-do-search' and +;; `dired-do-query-replace-regexp' with foreign regexp? +;; - `multi-isearch-buffers-regexp', `multi-occur', +;; `multi-occur-in-matching-buffers', `how-many', `flush-lines', +;; and `keep-lines' with foreign regexp? +;; - Better error messages. +;; - Write Tests. + +;;; Change Log: + +;;; Code: + +(provide 'foreign-regexp) +(defconst foreign-regexp/version "0.0") + + +(eval-when-compile + (require 'cl) + (require 'menu-bar) + (require 'easymenu)) +(require 're-builder) + + +;;; =========================================================================== +;;; +;;; For Debugging. +;;; +;;; =========================================================================== + +(eval-when-compile + (defvar foreign-regexp/search/debug-cache nil) + (defvar foreign-regexp/transition/debug-advices nil)) + +;; ---------------------------------------------------------------------------- +;; +;; Macros +;; +;; ---------------------------------------------------------------------------- + +(defmacro foreign-regexp/.debug (class &rest args) + "Display debugging message when CLASS has non-nil value." + (declare (indent 0) (debug t)) + (when (and (boundp class) + (symbol-value class)) + `(condition-case c + (with-current-buffer (get-buffer-create "*Messages*") + (let ((buffer-undo-list t) + (orig-deactivate-mark deactivate-mark) + (inhibit-modification-hooks t) + (inhibit-point-motion-hooks t)) + (goto-char (point-max)) + (insert (format-time-string "[DEBUG %p%H:%M:%S] " (current-time))) + (insert (format ,@args)) + (insert "\n") + (setq deactivate-mark orig-deactivate-mark))) + (error + (message "%s%s\n%s" + (format-time-string "[DEBUG %p%H:%M:%S] " (current-time)) + (quote ,args) + c))))) + + +;;; =========================================================================== +;;; +;;; Variables and functions common to each `foreign-regexp' operation. +;;; +;;; =========================================================================== + +(defcustom foreign-regexp/tmp-dir temporary-file-directory + "Directory in which temporally files should be written." + :type 'string + :group 'foreign-regexp) + +(defcustom foreign-regexp/tmp-file-prefix "foreign-regexp-" + "Prefix name of temporally files." + :type 'string + :group 'foreign-regexp) + +(defvar foreign-regexp/input-coding-system 'utf-8-unix + "Coding system to be used for decoding files which +contains texts passed from external commands to Emacs.") + +(defvar foreign-regexp/output-coding-system 'utf-8-unix + "Coding system to be used for encoding files which +contains texts passed from Emacs to external commands.") + +(defvar foreign-regexp/history nil + "History list for some commands that runs foreign-regexp.") + +;; Search options. +;; +(defvar foreign-regexp/dot-match-a-newline-p nil + "Non-nil if searches and muches in foreign regexp +should match a new line character by \".\".") +(make-variable-buffer-local 'foreign-regexp/dot-match-a-newline-p) + +(defvar foreign-regexp/use-extended-regexp-p nil + "Non-nil if search and much in foreign regexp +should use extended regexp.") +(make-variable-buffer-local 'foreign-regexp/use-extended-regexp-p) + + +;; ---------------------------------------------------------------------------- +;; +;; Hooks +;; +;; ---------------------------------------------------------------------------- +(defvar foreign-regexp/case-fold-will-change-hook nil + "Normal hook run before toggle `case-fold-search'.") + +(defvar foreign-regexp/ext-regexp-will-change-hook nil + "Normal hook run before toggle `foreign-regexp/use-extended-regexp-p'.") + +(defvar foreign-regexp/dot-match-will-change-hook nil + "Normal hook run before toggle `foreign-regexp/dot-match-a-newline-p'.") + +(defvar foreign-regexp/case-fold-changed-hook nil + "Normal hook run after toggle `case-fold-search'.") + +(defvar foreign-regexp/ext-regexp-changed-hook nil + "Normal hook run after toggle `foreign-regexp/use-extended-regexp-p'.") + +(defvar foreign-regexp/dot-match-changed-hook nil + "Normal hook run after toggle `foreign-regexp/dot-match-a-newline-p'.") + + +;; ---------------------------------------------------------------------------- +;; +;; Macros +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/alambda parms &body body) => RESULT OF BODYFORM +;; ---------------------------------------------------------------------------- +(defmacro* foreign-regexp/alambda (parms &body body) + "An utility macro. +This macro allows anonymous functions to refer themselves +through a symbol `self'." + (declare (indent 1)) + `(labels ((self ,parms ,@body)) + #'self)) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/catch-case var bodyform &rest handlers) => RESULT OF BODYFORM +;; OR HANDLERS +;; ---------------------------------------------------------------------------- +(defmacro foreign-regexp/catch-case (var bodyform &rest handlers) + "Regain control when a tag is thrown. +Executes BODYFORM and returns its value if no tag is thrown. +Each element of HANDLERS looks like (TAG-NAME BODY...) +where the BODY is made of Lisp expressions. + +A handler is applicable to an tag if TAG-NAME is one of +the tag names. +If an tag is thrown, the first applicable handler is run. + +The car of a handler may be a list of tag names +instead of a single tag name. Then it handles all of them. + +When a handler handles an error, control returns to the +`foreign-regexp/catch-case' and it executes the handler's +BODY... with VAR bound to (TAG-NAME . THROWNED-VALUE). +Then the value of the last BODY form is returned from the +`foreign-regexp/catch-case' expression. + +See also the function `throw' for more info." + (declare (indent 2)) + (let* ((g-retval (gensym)) + (bodyform (list 'setq g-retval bodyform)) + var-lst + clause-lst) + (dolist (h handlers) + (let* ((tag-lst + (cond + ((listp (car h)) (car h)) + (t (list (car h))))) + (var-tag-val (gensym))) + (dolist (tag tag-lst) + (push (list var-tag-val `(quote ,var-tag-val)) var-lst) + (setq bodyform + `(setq ,var-tag-val (catch (quote ,tag) + ,bodyform + ,var-tag-val))) + (push `((not (eq ,var-tag-val (quote ,var-tag-val))) + (let ((,var (cons (quote ,tag) ,var-tag-val))) ,@(cdr h))) + clause-lst)))) + `(let (,g-retval ,@var-lst) + ,bodyform + (cond + ,@clause-lst + (t ,g-retval))))) + + +;; ---------------------------------------------------------------------------- +;; +;; Commands +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/toggle-case-fold &optional no-message) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/toggle-case-fold (&optional no-message) + "Toggle `case-fold-search'." + (interactive) + + (run-hooks 'foreign-regexp/case-fold-will-change-hook) + (cond + (isearch-mode + ;; FIXME: Turn off an annoying message. + (isearch-toggle-case-fold) + (setq case-fold-search isearch-case-fold-search)) + (t + (setq case-fold-search + (not case-fold-search)))) + (run-hooks 'foreign-regexp/case-fold-changed-hook) + + (when (not no-message) + (minibuffer-message + (format "[foreign-regexp] case %ssensitive" + (if case-fold-search "in" ""))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/toggle-dot-match &optional no-message) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/toggle-dot-match (&optional no-message) + "Toggle `foreign-regexp/dot-match-a-newline-p'." + (interactive) + (run-hooks 'foreign-regexp/dot-match-will-change-hook) + (setq foreign-regexp/dot-match-a-newline-p + (not foreign-regexp/dot-match-a-newline-p)) + (run-hooks 'foreign-regexp/dot-match-changed-hook) + + (when (not no-message) + (minibuffer-message + (format "[foreign-regexp] . %s newline" + (if foreign-regexp/dot-match-a-newline-p "matches" "does not match"))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/toggle-ext-regexp &optional no-message) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/toggle-ext-regexp (&optional no-message) + "Toggle `foreign-regexp/use-extended-regexp-p'." + (interactive) + (run-hooks 'foreign-regexp/ext-regexp-will-change-hook) + (setq foreign-regexp/use-extended-regexp-p + (not foreign-regexp/use-extended-regexp-p)) + (run-hooks 'foreign-regexp/ext-regexp-changed-hook) + + (when (not no-message) + (minibuffer-message + (format "[foreign-regexp] %sextended regexp" + (if foreign-regexp/use-extended-regexp-p "" "no "))))) + + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/run-external-command cmd-path shell-script body +;; regexp replacement &rest other-args) +;; => RESULT +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/run-external-command (cmd-path shell-script + body + regexp + replacement + &rest other-args) + "Run external command to execute operations regarding to search. + +NOTES FOR DEVELOPERS: Variables in REPLACEMENT should be interpolated + on each match by external command." + (let* ((base (expand-file-name + foreign-regexp/tmp-file-prefix + foreign-regexp/tmp-dir)) + (fn-out-body (make-temp-name base)) + (fn-out-regexp (make-temp-name base)) + (fn-out-replacement (make-temp-name base)) + (fn-in-result (make-temp-name base)) + (fn-cmd (make-temp-name base)) + (cmd-basename (if cmd-path + (file-name-nondirectory cmd-path) + "shell-script")) + (proc-output-buf (get-buffer-create " *foreign-regexp*")) + (cur-buf (current-buffer)) + (orig-file-modes (default-file-modes)) + (coding-sys-out foreign-regexp/output-coding-system) + (coding-sys-in foreign-regexp/input-coding-system) + result) + (unwind-protect + (progn + + ;; Save information, which have to be passed to + ;; external command, to temporally files. + (unwind-protect + (progn + (set-default-file-modes #o0600) + + (when body + (with-temp-file fn-out-body + (set-buffer-file-coding-system coding-sys-out) + (insert body))) + (with-temp-file fn-out-regexp + (set-buffer-file-coding-system coding-sys-out) + (insert regexp)) + (when replacement + (with-temp-file fn-out-replacement + (set-buffer-file-coding-system coding-sys-out) + (insert replacement)))) + (set-default-file-modes orig-file-modes)) + + ;; Save shell-script to file when required. + (when (not cmd-path) + (with-temp-file fn-cmd + (set-buffer-file-coding-system coding-sys-out) + (insert shell-script)) + (set-file-modes fn-cmd #o0700) + (setq cmd-path fn-cmd)) + + ;;(message "[foreign-regexp] Running...") + + ;; Do search by external command. + (let ((status (apply #'call-process + `(,cmd-path + nil ,(buffer-name proc-output-buf) nil + ,@(if body (list fn-out-body) nil) + ,fn-in-result + ,fn-out-regexp + ,@(if replacement (list fn-out-replacement) nil) + ,@other-args)))) + (when (not (and (numberp status) + (zerop status))) + (error "[foreign-regexp] ERROR(%s): %s" + status + (with-current-buffer proc-output-buf + (buffer-substring (point-min) (point-max)))))) + + ;;(message "[foreign-regexp] Running...done") + + (with-current-buffer proc-output-buf + (when (/= (point-min) (point-max)) + (message "[foreign-regexp] messages from %s:\n%s" + cmd-basename + (buffer-substring (point-min) (point-max))))) + + ;; Parse result from external command. + (let ((coding-system-for-read coding-sys-in)) + ;; Loaded data will be stored to the local variable `result'. + (load (expand-file-name fn-in-result) nil t t)) + result) + + ;; Cleanup. + (and (file-exists-p fn-out-regexp ) (delete-file fn-out-regexp )) + (and (file-exists-p fn-out-replacement) (delete-file fn-out-replacement)) + (and (file-exists-p fn-out-body ) (delete-file fn-out-body )) + (and (file-exists-p fn-in-result ) (delete-file fn-in-result )) + (and (file-exists-p fn-cmd ) (delete-file fn-cmd )) + (kill-buffer proc-output-buf)))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/read-minibuf-contents) => (STRING . POSITION) +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/read-minibuf-contents () + "Returns a cons (STRING . POSITION) where +STRING is minibuffer contents and POSITION is +current cursor position in minibuffer." + (save-excursion + ;; Current buffer must be a *Minibuf-N*. + (when (minibufferp (current-buffer)) + ;; Preserve current input string and cursor + ;; position to restart `read-from-minibuffer'. + (let* ((cur-pt (point)) + (eol-pt (progn + (end-of-line) + (point))) + (bol-pt (progn + (beginning-of-line) + (point))) + (offset (1+ (- cur-pt bol-pt)))) + (setq deactivate-mark nil) + (cons (buffer-substring bol-pt eol-pt) + offset))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/ad-enable function class name) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/ad-enable (&rest args) + "`ad-enable-advice' runs `string-match' and breaks +current match-data as a side effect. +This is a side effect free version of `ad-enable-advice'." + (let ((orig-match-data (match-data))) + (apply 'ad-enable-advice args) + (set-match-data orig-match-data))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/ad-disable function class name) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/ad-disable (&rest args) + "`ad-enable-advice' runs `string-match' and breaks +current match-data as a side effect. +This is a side effect free version of `ad-disable-advice'." + (let ((orig-match-data (match-data))) + (apply 'ad-disable-advice args) + (set-match-data orig-match-data))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/ad-activate function &optional compile) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/ad-activate (&rest args) + "`ad-activate' runs `string-match' and breaks +current match-data as a side effect. +This is a side effect free version of `ad-activate'." + (let ((orig-match-data (match-data))) + (apply 'ad-activate args) + (set-match-data orig-match-data))) + + +;;; =========================================================================== +;;; +;;; A "Search Option" indicator. +;;; +;;; =========================================================================== + +(defvar foreign-regexp/search-option-indicator/case-fold-str "" + "A string displayed when the search option +`case-fold-search' is on.") + +(defvar foreign-regexp/search-option-indicator/no-case-fold-str "Case" + "A string displayed when the search option +`case-fold-search' is off.") + +(defvar foreign-regexp/search-option-indicator/dot-match-str ".=~\\n" + "A string displayed when the search option +`foreign-regexp/dot-match-a-newline-p' is on.") + +(defvar foreign-regexp/search-option-indicator/no-dot-match-str "" + "A string displayed when the search option +`foreign-regexp/dot-match-a-newline-p' is off.") + +(defvar foreign-regexp/search-option-indicator/ext-regexp-str "Ext" + "A string displayed when the search option +`foreign-regexp/use-extended-regexp-p' is on.") + +(defvar foreign-regexp/search-option-indicator/no-ext-regexp-str "" + "A string displayed when the search option +`foreign-regexp/use-extended-regexp-p' is off.") + +(defvar foreign-regexp/search-option-indicator/separator-str " " + "A string displayed between search option strings.") + + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/search-option-indicator/make-indicator) => STRING +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/search-option-indicator/make-indicator () + "Make a string which shows current search option status." + (let ((indicator (foreign-regexp/search-option-indicator/make-indicator-aux))) + (if (not (zerop (length indicator))) + (concat "[" indicator "]") + ""))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/search-option-indicator/make-indicator-aux) => STRING +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/search-option-indicator/make-indicator-aux () + "Auxiliary function of `foreign-regexp/search-option-indicator/make-indicator'." + (reduce '(lambda (str elm) + (concat str + (cond + ((zerop (length str)) "") + ((zerop (length elm)) "") + (t foreign-regexp/search-option-indicator/separator-str)) + elm)) + (list "" + (cond + ((and isearch-mode + isearch-case-fold-search) + foreign-regexp/search-option-indicator/case-fold-str) + (isearch-mode + foreign-regexp/search-option-indicator/no-case-fold-str) + (case-fold-search + foreign-regexp/search-option-indicator/case-fold-str) + (t + foreign-regexp/search-option-indicator/no-case-fold-str)) + (if foreign-regexp/dot-match-a-newline-p + foreign-regexp/search-option-indicator/dot-match-str + foreign-regexp/search-option-indicator/no-dot-match-str) + (if foreign-regexp/use-extended-regexp-p + foreign-regexp/search-option-indicator/ext-regexp-str + foreign-regexp/search-option-indicator/no-ext-regexp-str)))) + + +;;; =========================================================================== +;;; +;;; Patches for `read-from-minibuffer'. +;;; +;;; =========================================================================== + +;; ---------------------------------------------------------------------------- +;; +;; Macros +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/read-from-minibuf/with-search-option-indicator &rest body) +;; => RESULT OF BODYFORM +;; ---------------------------------------------------------------------------- +(defmacro foreign-regexp/read-from-minibuf/with-search-option-indicator (&rest body) + "Run body with search option indicator on prompt of `read-from-minibuffer'. " + `(unwind-protect + (progn + (foreign-regexp/ad-enable 'read-from-minibuffer 'around 'foreign-regexp/read-from-minibuf/with-search-option-indicator) + (foreign-regexp/ad-activate 'read-from-minibuffer) + ,@body) + (foreign-regexp/ad-disable 'read-from-minibuffer 'around 'foreign-regexp/read-from-minibuf/with-search-option-indicator) + (foreign-regexp/ad-activate 'read-from-minibuffer))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/read-from-minibuf/with-initial-contents +;; initial-contents &rest body) => RESULT OF BODYFORM +;; ---------------------------------------------------------------------------- +(defmacro foreign-regexp/read-from-minibuf/with-initial-contents (initial-contents &rest body) + "Run body with setting initial contents to `read-from-minibuffer'." + (declare (indent 1)) + ;; Set initial contents for `read-from-minibuffer'. + `(unwind-protect + (progn + (foreign-regexp/ad-enable 'read-from-minibuffer 'before 'foreign-regexp/read-from-minibuf/with-initial-contents) + (foreign-regexp/ad-activate 'read-from-minibuffer) + (let ((foreign-regexp/.initial-contents ,initial-contents)) + ,@body)) + (foreign-regexp/ad-disable 'read-from-minibuffer 'before 'foreign-regexp/read-from-minibuf/with-initial-contents) + (foreign-regexp/ad-activate 'read-from-minibuffer))) + + + +;; ---------------------------------------------------------------------------- +;; +;; Advices +;; +;; ---------------------------------------------------------------------------- + +;; XXX: Should be defined by flet +;; in `foreign-regexp/read-from-minibuf/with-search-option-indicator'? +(defun foreign-regexp/.signal-option-changed () + (let ((contents (foreign-regexp/read-minibuf-contents))) + (when contents + (throw 'foreign-regexp/.option-changed + contents)))) + +(defadvice read-from-minibuffer (around foreign-regexp/read-from-minibuf/with-search-option-indicator + (prompt &optional initial-contents keymap read + hist defalut-value inherit-input-method)) + "Run `read-from-minibuffer' with displaying search option indicator +on prompt string. + +Search option indicator will be updated whenever options are changed via +commands `foreign-regexp/toggle-case-fold', +`foreign-regexp/toggle-dot-match' and +`foreign-regexp/toggle-ext-regexp'. + +This advice will be enabled by `foreign-regexp/query-replace' +and `foreign-regexp/occur'." + ;; Preserve current foreign-regexp/*-will-change-hooks. + (let ((foreign-regexp/case-fold-will-change-hook foreign-regexp/case-fold-will-change-hook) + (foreign-regexp/dot-match-will-change-hook foreign-regexp/dot-match-will-change-hook) + (foreign-regexp/ext-regexp-will-change-hook foreign-regexp/ext-regexp-will-change-hook) + (orig-prompt (copy-sequence prompt)) + (initial-contents initial-contents)) + (unwind-protect + (progn + ;; Do not call this `read-from-minibuffer' recursively. + (foreign-regexp/ad-disable 'read-from-minibuffer 'around 'foreign-regexp/read-from-minibuf/with-search-option-indicator) + (foreign-regexp/ad-activate 'read-from-minibuffer) + + ;; Do not toggle search options of *Minibuf-N* while reading + ;; regexps, toggle re-options of CURRENT BUFFER instead. + (lexical-let ((cur-buf (current-buffer))) + (mapcar + (lambda (lst) + (lexical-let ((hook (nth 0 lst)) (toggle-fn (nth 1 lst))) + (add-hook hook + (foreign-regexp/alambda () + (with-current-buffer cur-buf + (progv (list hook) (list (symbol-value hook)) + ;; Do not call this hook recursively. + (remove-hook hook #'self) + ;; Run `foreign-regexp/toggle-*' in current buffer. + (funcall toggle-fn t))) + ;; Exit from function `foreign-regexp/toggle-*' + ;; in *Minibuf-N*. + (foreign-regexp/.signal-option-changed))))) + '((foreign-regexp/case-fold-will-change-hook foreign-regexp/toggle-case-fold) + (foreign-regexp/dot-match-will-change-hook foreign-regexp/toggle-dot-match) + (foreign-regexp/ext-regexp-will-change-hook foreign-regexp/toggle-ext-regexp)))) + + ;; Whenever search option is changed, restart `read-from-minibuffer' to + ;; redisplay prompt. + (while (setq initial-contents + (foreign-regexp/catch-case data + (progn + ;; Put indicator on prompt. + (setq prompt + (concat (substring orig-prompt + 0 + (string-match "\\( with\\)?: $" orig-prompt)) + (foreign-regexp/search-option-indicator/make-indicator) + (match-string 1 orig-prompt) + ": ")) + ;; Call read-from-minibuffer. + ad-do-it + ;; Break when nothing has been thrown. + nil) + (foreign-regexp/.option-changed + ;; initial-contents is thrown with + ;; a tag `foreign-regexp/.option-changed'. + (cdr data)))))) + (foreign-regexp/ad-enable 'read-from-minibuffer 'around 'foreign-regexp/read-from-minibuf/with-search-option-indicator) + (foreign-regexp/ad-activate 'read-from-minibuffer)))) +(foreign-regexp/ad-disable 'read-from-minibuffer + 'around + 'foreign-regexp/read-from-minibuf/with-search-option-indicator) +(foreign-regexp/ad-activate 'read-from-minibuffer) + +(defadvice read-from-minibuffer (before foreign-regexp/read-from-minibuf/with-initial-contents + (prompt &optional initial-contents keymap read + hist default-value inherit-input-method)) + "Set value of a variable `foreign-regexp/.initial-contents' +to INITIAL-CONTENTS of `read-from-minibuffer'. + +Value should be assigned to `foreign-regexp/.initial-contents' +by caller function with `LET' form. + +This advice will be enabled by `foreign-regexp/re-builder/query-replace-on-target-buffer' +and `foreign-regexp/re-builder/occur-on-target-buffer'." + (foreign-regexp/ad-disable 'read-from-minibuffer 'before 'foreign-regexp/read-from-minibuf/with-initial-contents) + (foreign-regexp/ad-activate 'read-from-minibuffer) + + (when (and (boundp 'foreign-regexp/.initial-contents) + (stringp foreign-regexp/.initial-contents)) + (setq initial-contents + (cons foreign-regexp/.initial-contents + (1+ (length foreign-regexp/.initial-contents))))) + + (setq foreign-regexp/.initial-contents nil)) +(foreign-regexp/ad-disable 'read-from-minibuffer + 'before + 'foreign-regexp/read-from-minibuf/with-initial-contents) +(foreign-regexp/ad-activate 'read-from-minibuffer) + + +;;; =========================================================================== +;;; +;;; Menu Definition. +;;; +;;; =========================================================================== + +(defvar foreign-regexp/menu/use-menu-p t + "A flag if menu items for foreign regexp will be installed or not.") + + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/menu/install) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/menu/install () + "Install menu items for foreign regexp." + (easy-menu-add-item menu-bar-search-menu + nil + ["Foreign Regexp Forward..." foreign-regexp/non-incremental/search-forward + :active (foreign-regexp/non-incremental/available-p) + :help "Search forward for a foreign regular expression"] + "separator-repeat-search") + (easy-menu-add-item menu-bar-search-menu + nil + ["Foreign Regexp Backward..." foreign-regexp/non-incremental/search-backward + :active (foreign-regexp/non-incremental/available-p) + :help "Search backward for a foreign regular expression"] + "separator-repeat-search") + + (easy-menu-add-item menu-bar-i-search-menu + nil + ["Forward Foreign Regexp..." foreign-regexp/isearch-forward + :active (foreign-regexp/isearch/available-p) + :help "Search forward for a foreign regular expression as you type it"] + nil) + + (easy-menu-add-item menu-bar-i-search-menu + nil + ["Backward Foreign Regexp..." foreign-regexp/isearch-backward + :active (foreign-regexp/isearch/available-p) + :help "Search backwards for a foreign regular expression as you type it"] + "separator-repeat-search") + + (easy-menu-add-item menu-bar-replace-menu + nil + ["Replace Foreign Regexp..." foreign-regexp/query-replace + :active (foreign-regexp/replace/available-p) + :help "Replace foreign regular expression interactively, ask about each occurrence"] + "separator-replace-tags") + + (easy-menu-add-item menu-bar-edit-menu + nil + '("Foreign Regexp Options" + ("Regexp Type" + :filter (lambda (&rest args) + (foreign-regexp/menu/regexp-type-menu-gen))) + ("--") + ["Case Insensitive" foreign-regexp/toggle-case-fold + :style radio :selected (if isearch-mode + isearch-case-fold-search + case-fold-search)] + [". Matches a Newline" foreign-regexp/toggle-dot-match + :style radio :selected foreign-regexp/dot-match-a-newline-p] + ["Extended Regular Expression" foreign-regexp/toggle-ext-regexp + :style radio :selected foreign-regexp/use-extended-regexp-p]) + "goto") + + ;; XXX: Should be removed? + (easy-menu-add-item menu-bar-edit-menu + nil + '("---") + "goto") + + + ;; Override defalut menu items. + ;; + (define-key menu-bar-search-menu [repeat-search-fwd] + `(menu-item ,(purecopy "Repeat Forward") nonincremental-repeat-search-forward + :enable (or (and (eq menu-bar-last-search-type 'string) + search-ring) + (and (eq menu-bar-last-search-type 'regexp) + regexp-search-ring) + ;; For foreign regexp search. + (and (eq menu-bar-last-search-type 'foreign-regexp) + foreign-regexp/history + (foreign-regexp/non-incremental/available-p))) + :help ,(purecopy "Repeat last search forward"))) + (define-key menu-bar-search-menu [repeat-search-back] + `(menu-item ,(purecopy "Repeat Backwards") nonincremental-repeat-search-backward + :enable (or (and (eq menu-bar-last-search-type 'string) + search-ring) + (and (eq menu-bar-last-search-type 'regexp) + regexp-search-ring) + ;; For foreign regexp search. + (and (eq menu-bar-last-search-type 'foreign-regexp) + foreign-regexp/history + (foreign-regexp/non-incremental/available-p))) + :help ,(purecopy "Repeat last search backwards")))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/menu/regexp-type-menu-gen &rest args) => MENU ITEMS +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/menu/regexp-type-menu-gen (&rest args) + "" + (mapcar (lambda (pair) + (let ((kv-lst (cdr pair))) + (vector + ;; NAME + (concat (cadr (memq :tag kv-lst)) "") + ;; CALLBACK + `(lambda (&rest args) + (interactive) + (foreign-regexp/regexp-type/set (quote ,(cadr (memq :name kv-lst))))) + :style 'radio + :selected (eq (and (boundp 'foreign-regexp/regexp-type) ;; For compiler + foreign-regexp/regexp-type) + (cadr (memq :name kv-lst))) + :active t + :help "dummy"))) + `((nil :name nil :tag "None") + ,@(let ((alst (copy-list + (and (boundp 'foreign-regexp/regexp-type/.type-alst) ;; For compiler + foreign-regexp/regexp-type/.type-alst)))) + (sort alst + (lambda (pair1 pair2) + (string< (format "%s" (car pair1)) + (format "%s" (car pair2))))))))) + + +;; ---------------------------------------------------------------------------- +;; +;; Main +;; +;; ---------------------------------------------------------------------------- + +(when foreign-regexp/menu/use-menu-p + (foreign-regexp/menu/install)) + + +;;; =========================================================================== +;;; +;;; Key Bindings Definition. +;;; +;;; =========================================================================== + +(defvar foreign-regexp/key-bindings/use-keybindings-p t + "A flag if key bindings for foreign regexp will be installed or not.") + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/key-bindings/install) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/key-bindings/install () + "Install key bindings for foreign regexp." + + ;; For Emacs < 23. + (when (string< emacs-version "23") + (defvar search-map (make-sparse-keymap) + "Keymap for search related commands.") + (define-key esc-map "s" search-map)) + + (defvar reb-mode-search-map (make-sparse-keymap) + "Keymap for search related commands.") + + ;; keys for `foreign-regexp' commands. + ;; + (when (boundp 'search-map) ;; For compiler + + ;; Prefix keys. + ;; + (define-key isearch-mode-map "\M-s" search-map) + (define-key reb-mode-map "\M-s" reb-mode-search-map) + + ;; Keys for `foreign-regexp' commands. + ;; + (define-key search-map "\M-o" 'foreign-regexp/occur) + (define-key search-map "\M-%" 'foreign-regexp/query-replace) + (define-key search-map "\M-s" 'foreign-regexp/isearch-forward) + (define-key search-map "\M-r" 'foreign-regexp/isearch-backward) + (define-key search-map "\M-f" 'foreign-regexp/non-incremental/search-forward) + (define-key search-map "\M-F" 'foreign-regexp/non-incremental/search-backward) + (define-key search-map "\M-g" 'nonincremental-repeat-search-forward) + (define-key search-map "\M-G" 'nonincremental-repeat-search-backward) + (define-key search-map "\M-a" 'foreign-regexp/align) + (define-key search-map "\M-l" 're-builder) + (define-key search-map "\M-\\" 'foreign-regexp/quote-meta-in-region) + + (define-key reb-mode-search-map "\M-o" 'foreign-regexp/re-builder/occur-on-target-buffer) + (define-key reb-mode-search-map "\M-%" 'foreign-regexp/re-builder/query-replace-on-target-buffer) + (define-key reb-mode-search-map "\M-s" 'foreign-regexp/re-builder/isearch-forward-on-target-buffer) + (define-key reb-mode-search-map "\M-r" 'foreign-regexp/re-builder/isearch-backward-on-target-buffer) + (define-key reb-mode-search-map "\M-f" 'foreign-regexp/re-builder/non-incremental-search-forward-on-target-buffer) + (define-key reb-mode-search-map "\M-F" 'foreign-regexp/re-builder/non-incremental-search-backward-on-target-buffer) + (define-key reb-mode-search-map "\M-g" 'foreign-regexp/re-builder/non-incremental-search-forward-on-target-buffer) + (define-key reb-mode-search-map "\M-G" 'foreign-regexp/re-builder/non-incremental-search-backward-on-target-buffer) + (define-key reb-mode-search-map "\M-a" 'foreign-regexp/re-builder/align-on-target-buffer) + (define-key reb-mode-search-map "\M-l" 're-builder) + (define-key reb-mode-search-map "\M-\\" 'foreign-regexp/quote-meta-in-region) + + ;; Keys for changing `foreign-regexp' options. + ;; + (define-key search-map "\M-i" 'foreign-regexp/toggle-case-fold) + (define-key search-map "\M-m" 'foreign-regexp/toggle-dot-match) + (define-key search-map "\M-x" 'foreign-regexp/toggle-ext-regexp) + + (define-key reb-mode-search-map "\M-i" 'foreign-regexp/re-builder/toggle-case-fold-on-target-buffer) + (define-key reb-mode-search-map "\M-m" 'foreign-regexp/re-builder/toggle-dot-match-on-target-buffer) + (define-key reb-mode-search-map "\M-x" 'foreign-regexp/re-builder/toggle-ext-regexp-on-target-buffer) + + ;; XXX: This overrides a key for `next-matching-history-element' + ;; in `minibuffer-local-map', so please rebind it to a + ;; key you like. + (define-key minibuffer-local-map "\M-s" search-map))) + + +;; ---------------------------------------------------------------------------- +;; +;; Main +;; +;; ---------------------------------------------------------------------------- + +(when foreign-regexp/key-bindings/use-keybindings-p + (foreign-regexp/key-bindings/install)) + + +;;; =========================================================================== +;;; +;;; `query-replace' in foreign regexp with a help from external command. +;;; +;;; =========================================================================== + +(defvar foreign-regexp/replace/external-command nil + "Path of an external command to use to execute actual search operation. + +Seven arguments describe below will be passed to the command. + + 1st: Path of a file which contains the text to be searched. + + The text in this file is encoded in the value of + `foreign-regexp/output-coding-system'. + + 2nd: Path of a file to which the command should write the result + of current search operation. + + The external command have to output a form like: + + (setq result + '((1st-MATCH-START 1st-MATCH-END \"REPLACEMENT-FOR-1st-MATCH\") + (2nd-MATCH-START 2nd-MATCH-END \"REPLACEMENT-FOR-2nd-MATCH\") + ...)) + + to this file. + + Note that each start and end position in the form should be + an offset from beginning of the text which has been searched. + (This means each number should be started from 0, not from 1) + + The text in this file must be encoded in the value of + `foreign-regexp/input-coding-system'. + + 3rd: Path of a file in which the regexp we want to search is written. + The command have a responsibility to search this regexp + from the file specified by 1st argument, then write start and + end positions of each match to the file specified by 2nd argument. + + The text in this file is encoded in the value of + `foreign-regexp/output-coding-system'. + + 4th: Path of a file in which the replacement expression is written. + The command have a responsibility to interpolate variables + in the expression on each match, then write them to the file + specified by 2nd argument. + + The text in this file is encoded in the value of + `foreign-regexp/output-coding-system'. + + 5th: A dot matches newline flag. + When the value of this flag is not empty string, + . should be matched to a newline character. + + 6th: A case sensitive flag. + When the value of this flag is not empty string, + the match operation should be done case-sensitive. + + 7th: An extended regular expression flag. + When the value of this flag is not empty string, + the current search regexp (see 3rd arg) should be + interpreted as extended regular expression.") + +(defvar foreign-regexp/replace/shell-script nil + "A shell script which will be run as +`foreign-regexp/replace/external-command' +when it has nil value.") + + +(defvar foreign-regexp/replace/defaults nil + "Default values of FROM-STRING and TO-STRING for `foreign-regexp/query-replace'. + +See also `query-replace-defaults'.") + + +;; ---------------------------------------------------------------------------- +;; +;; Commands +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/query-replace regexp replacement +;; &optional delimited start end) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/query-replace (regexp replacement &optional delimited start end) + "Do `query-replace' with a help from external command. + +See `isearch-forward-regexp' and `isearch-backward-regexp' for +more information." + (interactive + (and + (foreign-regexp/replace/assert-available) + (let ((common + (let ((query-replace-from-history-variable 'foreign-regexp/history) + (query-replace-to-history-variable 'foreign-regexp/history) + (query-replace-defaults foreign-regexp/replace/defaults)) + (foreign-regexp/read-from-minibuf/with-search-option-indicator + (prog1 (query-replace-read-args + (concat "Query replace foreign regexp" + (if (and transient-mark-mode mark-active) " in region" "")) + t) + (setq foreign-regexp/replace/defaults query-replace-defaults)))))) + (list (nth 0 common) (nth 1 common) (nth 2 common) + ;; These are done separately here + ;; so that command-history will record these expressions + ;; rather than the values they had this time. + (if (and transient-mark-mode mark-active) + (region-beginning)) + (if (and transient-mark-mode mark-active) + (region-end)))))) + (foreign-regexp/replace/assert-available) + (foreign-regexp/replace/perform-replace + regexp replacement t nil nil nil nil start end)) + + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/replace/available-p) => BOOL +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/replace/available-p () + "Test if external command or shell script is defined or not." + (or foreign-regexp/replace/external-command + foreign-regexp/replace/shell-script)) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/replace/assert-available) => VOID or ERROR +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/replace/assert-available () + "Raise error when no external command or shell script is defined." + (or (foreign-regexp/replace/available-p) + (error "[foreign-regexp] No external command or shell script is defined for replace."))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/replace/search-by-external-command regexp replacement) +;; => LIST +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/replace/search-by-external-command (regexp replacement min max) + "Scan current buffer with external command to detect matching +texts by REGEXP. + +Overlays will be made on each matched text, and they will be +saved to the variable `foreign-regexp/replace/ovs-on-match/data'. + +Variables in REPLACEMENT will be interpolated +on each match, and will be saved to the property +foreign-regexp/replace/replacement of each overlay. + +Returns position of the neighborhood overlay of a pointer in +the list `foreign-regexp/replace/ovs-on-match/data'." + (let* ((offset (point-min)) + (result (foreign-regexp/run-external-command + foreign-regexp/replace/external-command + foreign-regexp/replace/shell-script + (buffer-substring (point-min) (point-max)) + regexp + replacement + (if foreign-regexp/dot-match-a-newline-p "DOT" "") + (if case-fold-search "" "CASE") + (if foreign-regexp/use-extended-regexp-p "EXT" "")))) + (foreign-regexp/replace/parse-search-result result offset min max) + + ;; Detect index of neighborhood overlay of a pointer. + (position (car (member-if + #'(lambda (ov) + (<= (point) (overlay-start ov))) + (foreign-regexp/replace/ovs-on-match/get-all))) + (foreign-regexp/replace/ovs-on-match/get-all)))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/replace/parse-search-result result offset) => OVERLAYS +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/replace/parse-search-result (result offset min max) + "Subroutine of `foreign-regexp/replace/search-by-external-command'." + (foreign-regexp/replace/ovs-on-match/dispose) + ;; RESULT has structure like: + ;; ((MATCH_START MATCH_END "REPLACEMENT") + ;; ...) + ;; + ;; NOTE: Special variables in "REPLACEMENT" + ;; should be expanded by external command. + (save-excursion + (let ((data nil) + (cur-buf (current-buffer))) + ;;(message "[foreign-regexp] Parsing search results from external command...") + (dolist (lst result) + (let* ((beg (+ (nth 0 lst) offset)) + (end (+ (nth 1 lst) offset)) + (replacement (nth 2 lst))) + (when (and (not (and min (< beg min))) + (not (and max (< max end)))) + (foreign-regexp/replace/ovs-on-match/add beg end cur-buf replacement)))) + ;;(message "[foreign-regexp] Parsing search results from external command...done") + ))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/replace/perform-replace (from-string replacement +;; query-flag ignore ignore +;; &optional ignore map start end) +;; => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/replace/perform-replace (from-string replacement + query-flag + ignore/regexp-flag + ignore/delimited-flag + &optional + ignore/repeat-count + map start end) + "Replacement of `perform-replace' for foreign regexp. + +Note that \"\\?\" in string is not supported like +original `perform-replace' does. + +Also list in REPLACEMENT and REPEAT-COUNT are not supported." + ;; Based on `perform-replace'. + + ;; XXX: The overlays `ovs-on-match', that looks like lazy-highlight, + ;; should be updated by `foreign-regexp/replace/search-by-external-command' + ;; whenever the function `replace-match' is called, but it is little + ;; bit annoying so we don't update them so much often here. + (or map (setq map query-replace-map)) + (and query-flag minibuffer-auto-raise + (raise-frame (window-frame (minibuffer-window)))) + (let* ((search-string from-string) + (real-match-data nil) ; The match data for the current match. + (next-replacement nil) + (keep-going t) + (stack nil) + (replace-count 0) + (multi-buffer nil) + (recenter-last-op nil) ; Start cycling order with initial position. + + (min nil) + ;; If non-nil, it is marker saying where in the buffer to stop. + (max nil) + ;; Data for the next match. If a cons, it has the same format as + ;; (match-data); otherwise it is t if a match is possible at point. + (match-again t) + (message + (if query-flag + (apply 'propertize + (substitute-command-keys + "Query replacing %s with %s: (\\\\[help] for mini buffer help) ") + minibuffer-prompt-properties))) + (idx nil) + (regexp-flag t) + real-replacement) + + (cond + ((stringp replacement) + (setq real-replacement replacement + replacement nil)) + (t + (error "[foreign-regexp] REPLACEMENT must be a string."))) + + ;; If region is active, in Transient Mark mode, operate on region. + (when start + (setq max (copy-marker (max start end))) + (goto-char (setq min (min start end))) + (deactivate-mark)) + + ;; Do search by external command and detect index of + ;; neighborhood overlay of a pointer. + (setq idx (foreign-regexp/replace/search-by-external-command + from-string + real-replacement + min max)) + + (push-mark) + (undo-boundary) + (unwind-protect + (flet ((update-real-match-data (idx) + (setq real-match-data + (let ((ov (foreign-regexp/replace/ovs-on-match/get-nth idx))) + (when ov + (list (overlay-start ov) + (overlay-end ov))))) + (set-match-data real-match-data) + real-match-data) + (update-next-replacement (idx) + (setq next-replacement + (overlay-get (foreign-regexp/replace/ovs-on-match/get-nth idx) + 'foreign-regexp/replace/replacement)))) + ;; Loop finding occurrences that perhaps should be replaced. + (while (and idx + keep-going + (not (or (eobp) (and max (<= max (point))))) + (update-real-match-data idx) + (not (and max (< max (match-end 0))))) + + ;; Optionally ignore matches that have a read-only property. + (unless (and query-replace-skip-read-only + (text-property-not-all + (nth 0 real-match-data) (nth 1 real-match-data) + 'read-only nil)) + + ;; Calculate the replacement string, if necessary. + (set-match-data real-match-data) + (update-next-replacement idx) + + (if (not query-flag) + (progn + (foreign-regexp/replace/highlight/dispose) + (replace-match next-replacement t t) + (setq replace-count (1+ replace-count))) + (undo-boundary) + (let (done replaced key def) + ;; Loop reading commands until one of them sets done, + ;; which means it has finished handling this + ;; occurrence. Any command that sets `done' should + ;; leave behind proper match data for the stack. + ;; Commands not setting `done' need to adjust + ;; `real-match-data'. + (while (not done) + (set-match-data real-match-data) + (foreign-regexp/replace/highlight/put + (match-beginning 0) (match-end 0)) + (goto-char (match-end 0)) + ;; Bind message-log-max so we don't fill up the message log + ;; with a bunch of identical messages. + (let ((message-log-max nil) + (replacement-presentation next-replacement)) + (message message + (query-replace-descr from-string) + (query-replace-descr replacement-presentation))) + (setq key (read-event)) + ;; Necessary in case something happens during read-event + ;; that clobbers the match data. + (set-match-data real-match-data) + (setq key (vector key)) + (setq def (lookup-key map key)) + ;; Restore the match data while we process the command. + (cond ((eq def 'help) + (with-output-to-temp-buffer "*Help*" + (princ + (concat "Query replacing " + (if regexp-flag "regexp " "") + from-string " with " + next-replacement ".\n\n" + (substitute-command-keys + query-replace-help))) + (with-current-buffer standard-output + (help-mode)))) + ((eq def 'exit) + (setq keep-going nil) + (setq done t)) + ((eq def 'exit-current) + (setq multi-buffer t keep-going nil done t)) + ((eq def 'backup) + ;; XXX: The behavior is different from original + ;; `perform-replace' because we don't update + ;; `ovs-on-match' after `replace-match' operation + ;; because of performance issue. + (if stack + (let ((elt (pop stack))) + (goto-char (nth 0 elt)) + (setq idx (1- idx)) + (update-next-replacement idx) + (update-real-match-data idx) + (setq replaced (nth 1 elt) + real-match-data + (replace-match-data + t real-match-data + (nth 2 elt)))) + (message "No previous match") + (ding 'no-terminate) + (sit-for 1))) + ((eq def 'act) + (or replaced + (replace-match next-replacement t t) + (setq replace-count (1+ replace-count))) + (setq done t replaced t)) + ((eq def 'act-and-exit) + (or replaced + (replace-match next-replacement t t) + (setq replace-count (1+ replace-count))) + (setq keep-going nil) + (setq done t replaced t)) + ((eq def 'act-and-show) + (when (not replaced) + (replace-match next-replacement t t) + (setq replace-count (1+ replace-count) + real-match-data (replace-match-data + t real-match-data) + replaced t))) + ((or (eq def 'automatic) (eq def 'automatic-all)) + (when (not replaced) + (replace-match next-replacement t t) + (setq replace-count (1+ replace-count))) + (setq done t query-flag nil replaced t)) + ((eq def 'skip) + (setq done t)) + ((eq def 'recenter) + ;; `this-command' has the value `query-replace', + ;; so we need to bind it to `recenter-top-bottom' + ;; to allow it to detect a sequence of `C-l'. + (let ((this-command 'recenter-top-bottom) + (last-command 'recenter-top-bottom)) + (recenter-top-bottom))) + + ;; Recursive-edit. + ((eq def 'edit) + (let ((opos (save-excursion + (progn + (goto-char (match-beginning 0)) + (point-marker))))) + (setq real-match-data (replace-match-data + nil real-match-data + real-match-data)) + (goto-char (match-beginning 0)) + (save-excursion + (save-window-excursion + (recursive-edit))) + (goto-char opos) + (set-marker opos nil)) + (setq idx (foreign-regexp/replace/search-by-external-command + from-string + next-replacement + min max)) + (update-next-replacement idx) + (update-real-match-data idx)) + + ;; Edit replacement. + ((eq def 'edit-replacement) + (let ((opos (save-excursion + (progn + (goto-char (if replaced + (match-end 0) ;;After backup? + (match-beginning 0))) + (point-marker))))) + (setq real-match-data (replace-match-data + nil real-match-data + real-match-data)) + (setq real-replacement + (read-string "Edit replacement string: " + real-replacement)) + (goto-char opos) + (set-marker opos nil)) + (setq idx (foreign-regexp/replace/search-by-external-command + from-string + real-replacement + min max)) + (update-next-replacement idx) + (update-real-match-data idx) + + (if replaced + (setq idx (and idx (1- idx))) + (replace-match next-replacement t t) + (setq replace-count (1+ replace-count))) + (setq done t replaced t)) + + ;; Delete matched string then recursive-edit. + ((eq def 'delete-and-edit) + (let ((opos (save-excursion + (progn + (goto-char (match-end 0)) + (point-marker))))) + (set-marker-insertion-type opos t) + + (replace-match "" t t) + (setq real-match-data (replace-match-data + nil real-match-data)) + (foreign-regexp/replace/ovs-on-match/dispose) + (foreign-regexp/replace/highlight/dispose) + + (save-excursion (recursive-edit)) + + (goto-char opos) + (set-marker opos nil)) + (setq idx (foreign-regexp/replace/search-by-external-command + from-string + real-replacement + min max)) + (if (numberp idx) + (setq idx (1- idx)) ;;Do not forward current match. + (setq idx (foreign-regexp/replace/ovs-on-match/get-count))) ;;Done. + + (setq replaced t)) + + ;; Note: we do not need to treat `exit-prefix' + ;; specially here, since we reread + ;; any unrecognized character. + (t + (setq this-command 'mode-exited) + (setq keep-going nil) + (setq unread-command-events + (append (listify-key-sequence key) + unread-command-events)) + (setq done t))) + + (unless (eq def 'recenter) + ;; Reset recenter cycling order to initial position. + (setq recenter-last-op nil))) + ;; Record previous position for ^ when we move on. + ;; Change markers to numbers in the match data + ;; since lots of markers slow down editing. + (push (list (point) replaced + ;; If the replacement has already happened, all we need is the + ;; current match start and end. We could get this with a trivial + ;; match like + ;; (save-excursion (goto-char (match-beginning 0)) + ;; (search-forward (match-string 0)) + ;; (match-data t)) + ;; if we really wanted to avoid manually constructing match data. + ;; Adding current-buffer is necessary so that match-data calls can + ;; return markers which are appropriate for editing. + (if replaced + (list + (match-beginning 0) + (match-end 0) + (current-buffer)) + (match-data t))) + stack)))) + (setq idx (1+ idx)))) + (foreign-regexp/replace/ovs-on-match/dispose) + (foreign-regexp/replace/highlight/dispose)) + (or unread-command-events + (message "Replaced %d occurrence%s" + replace-count + (if (= replace-count 1) "" "s"))))) + + +;;; =========================================================================== +;;; +;;; An overlay on current match. +;;; +;;; =========================================================================== + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/replace/highlight/put beg end) => VOID +;; ---------------------------------------------------------------------------- +(defvar foreign-regexp/replace/highlight-overlay nil) +(make-variable-buffer-local 'foreign-regexp/replace/highlight-overlay) +(defun foreign-regexp/replace/highlight/put (beg end) + "Subroutine of `foreign-regexp/replace/perform-replace'. + +Put overlay on current match." + (if foreign-regexp/replace/highlight-overlay + (move-overlay foreign-regexp/replace/highlight-overlay beg end) + (let ((ov (make-overlay beg end (current-buffer) t))) + (overlay-put ov 'priority 1001) ;higher than lazy overlays + (when query-replace-highlight + (overlay-put ov 'face 'query-replace)) + (setq foreign-regexp/replace/highlight-overlay ov)))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/replace/highlight/dispose) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/replace/highlight/dispose () + "Subroutine of `foreign-regexp/replace/perform-replace'." + (when foreign-regexp/replace/highlight-overlay + (delete-overlay foreign-regexp/replace/highlight-overlay) + (setq foreign-regexp/replace/highlight-overlay nil))) + + +;;; =========================================================================== +;;; +;;; Overlays on all of matches. +;;; +;;; =========================================================================== + +(defvar foreign-regexp/replace/ovs-on-match/data nil) +(make-variable-buffer-local 'foreign-regexp/replace/ovs-on-match/data) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/replace/ovs-on-match/get-all) => LIST +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/replace/ovs-on-match/get-all () + "Get all of overlays put on each match." + foreign-regexp/replace/ovs-on-match/data) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/replace/ovs-on-match/add beg end buf replacement) => LIST +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/replace/ovs-on-match/add (beg end buf replacement) + "Make overlay on match text and save it in +`foreign-regexp/replace/ovs-on-match/data'. + +Each overlay has a replacement text as property +foreign-regexp/replace/replacement." + (let ((ov (make-overlay beg end buf nil nil))) + (when query-replace-lazy-highlight + (overlay-put ov 'face lazy-highlight-face)) + (overlay-put ov 'foreign-regexp/replace/replacement replacement) + (overlay-put ov 'priority 1000) + (setq foreign-regexp/replace/ovs-on-match/data + (nconc foreign-regexp/replace/ovs-on-match/data (cons ov nil))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/replace/ovs-on-match/dispose) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/replace/ovs-on-match/dispose () + "Delete overlays on matched strings created by external command +`foreign-regexp/replace'." + (dolist (ov foreign-regexp/replace/ovs-on-match/data) + (overlay-put ov 'foreign-regexp/replace/replacement nil) + (overlay-put ov 'priority nil) + (delete-overlay ov)) + (setq foreign-regexp/replace/ovs-on-match/data nil)) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/replace/ovs-on-match/get-nth nth) => OVERLAY +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/replace/ovs-on-match/get-nth (nth) + (nth nth foreign-regexp/replace/ovs-on-match/data)) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/replace/ovs-on-match/get-count) => NUM +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/replace/ovs-on-match/get-count () + (length foreign-regexp/replace/ovs-on-match/data)) + + +;;; =========================================================================== +;;; +;;; `occur' by foreign regexp with a help from external command. +;;; +;;; =========================================================================== + +;; XXX: `A dot matches newline flag' should be removed? +;; (Is that flag nonsense thing? ...because `occur' is line +;; oriented matching operation...) +(defvar foreign-regexp/occur/external-command nil + "Path of an external command to use to execute actual search +operation. + +Six arguments describe below will be passed to the command. + + 1st: Path of a file which contains the text to be searched. + + The text in this file is encoded in the value of + `foreign-regexp/output-coding-system'. + + 2nd: Path of a file to which the command should write the result + of current search operation. + + The external command have to output a form like: + + (setq result + '( + ;; Match positions in 1st line + ((1st-MATCH-START 1st-MATCH-END) + (2nd-MATCH-START 2nd-MATCH-END) + ...) + ;; When a line has no match, do not put anything. + ... + ;; Match positions in n-th line + ((x-th-MATCH-START x-th-MATCH-END) + (y-th-MATCH-START y-th-MATCH-END) + ...))) + + to this file. + + Note that each start and end position in the form should be + an offset from beginning of the text which has been searched. + (This means each number should be started from 0, not from 1) + + The text in this file must be encoded in the value of + `foreign-regexp/input-coding-system'. + + 3rd: Path of a file in which the regexp we want to search is written. + The command have a responsibility to search this regexp + from the file specified by 1st argument, then write start and + end positions of each match to the file specified by 2nd argument. + + The text in this file is encoded in the value of + `foreign-regexp/output-coding-system'. + + 4th: A dot matches newline flag. + When the value of this flag is not empty string, + . should be matched to a newline character. + + 5th: A case sensitive flag. + When the value of this flag is not empty string, + the match operation should be done case-sensitive. + + 6th: An extended regular expression flag. + When the value of this flag is not empty string, + the current search regexp (see 3rd arg) should be + interpreted as extended regular expression.") + +(defvar foreign-regexp/occur/shell-script nil + "A shell script which will be run as +`foreign-regexp/occur/external-command' +when it has nil value.") + + +;; ---------------------------------------------------------------------------- +;; +;; Commands +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/occur regexp &optional nlines) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/occur (regexp &optional nlines) + (interactive + (and + (foreign-regexp/occur/assert-available) + (let ((regexp-history foreign-regexp/history)) + (foreign-regexp/read-from-minibuf/with-search-option-indicator + (prog1 + (foreign-regexp/occur-read-primary-args) + (setq foreign-regexp/history regexp-history)))))) + (foreign-regexp/occur/assert-available) + (let ((orig-occur-engine-fn (symbol-function 'occur-engine))) + (setf (symbol-function 'occur-engine) + (symbol-function 'foreign-regexp/occur/occur-engine)) + (unwind-protect + (occur regexp nlines) + (setf (symbol-function 'occur-engine) + orig-occur-engine-fn)))) + + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/occur/available-p) => BOOL +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/occur/available-p () + "Test if external command or shell script is defined or not." + (or foreign-regexp/occur/external-command + foreign-regexp/occur/shell-script)) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/occur/assert-available) => VOID or ERROR +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/occur/assert-available () + "Raise error when no external command or shell script is defined." + (or (foreign-regexp/occur/available-p) + (error "[foreign-regexp] No external command or shell script is defined for occur."))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/occur-read-primary-args) => LIST +;; ---------------------------------------------------------------------------- +;; Based on `occur-read-primary-args'. +;; Just for prompt message. +(defun foreign-regexp/occur-read-primary-args () + (list (read-regexp "List lines matching foreign regexp" + (car regexp-history)) + (when current-prefix-arg + (prefix-numeric-value current-prefix-arg)))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/occur/occur-engine regexp buffers out-buf nlines +;; case-fold-search title-face +;; prefix-face match-face keep-props) => NUM +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/occur/occur-engine (regexp buffers out-buf nlines + case-fold-search title-face + prefix-face match-face keep-props) + "Alternate function of original `occur-engine'." + ;; Based on `occur-engine'. + (with-current-buffer out-buf + (let ((globalcount 0) + (coding nil)) + ;; Map over all the buffers + (dolist (buf buffers) + (when (buffer-live-p buf) + (let ((matches 0) ;; count of matched lines + (curstring "") + (inhibit-field-text-motion t) + (headerpt (with-current-buffer out-buf (point))) + (*search-result-alst* nil) + (matches-in-line nil) + result) + (with-current-buffer buf + (setq result (foreign-regexp/run-external-command + foreign-regexp/occur/external-command + foreign-regexp/occur/shell-script + (buffer-substring (point-min) (point-max)) + regexp + nil + (if foreign-regexp/dot-match-a-newline-p "DOT" "") + (if case-fold-search "" "CASE") + (if foreign-regexp/use-extended-regexp-p "EXT" ""))) + (or coding + ;; Set CODING only if the current buffer locally + ;; binds buffer-file-coding-system. + (not (local-variable-p 'buffer-file-coding-system)) + (setq coding buffer-file-coding-system)) + (save-excursion + (goto-char (point-min)) ;; begin searching in the buffer + (while (setq matches-in-line (prog1 (car result) + (setq result (cdr result)))) + (let* ((pt-min (point-min)) + (matchbeg (+ pt-min (caar matches-in-line))) ;; [Count + Offset => Count] + (lines (progn (goto-char matchbeg) + (line-number-at-pos))) + (marker (point-marker)) + (begpt (progn (beginning-of-line) + (point))) + (endpt (progn (end-of-line) + (point))) + match-pair) + (setq matches (1+ matches)) ;; increment match count + + (if (and keep-props + (if (boundp 'jit-lock-mode) jit-lock-mode) + (text-property-not-all begpt endpt 'fontified t)) + (if (fboundp 'jit-lock-fontify-now) + (jit-lock-fontify-now begpt endpt))) + (if (and keep-props (not (eq occur-excluded-properties t))) + (progn + (setq curstring (buffer-substring begpt endpt)) + (remove-list-of-text-properties + 0 (length curstring) occur-excluded-properties curstring)) + (setq curstring (buffer-substring-no-properties begpt endpt))) + ;; Highlight the matches + (while (setq match-pair (prog1 (car matches-in-line) + (setq matches-in-line + (cdr matches-in-line)))) + (add-text-properties + (- (+ pt-min (nth 0 match-pair)) begpt) ;; [Count + Offset => Count] + (- (+ pt-min (nth 1 match-pair)) begpt) ;; [Count + Offset => Count] + (append + `(occur-match t) + (when match-face + ;; Use `face' rather than `font-lock-face' here + ;; so as to override faces copied from the buffer. + `(face ,match-face))) + curstring)) + ;; Generate the string to insert for this match + (let* ((out-line + (concat + ;; Using 7 digits aligns tabs properly. + (apply #'propertize (format "%7d:" lines) + (append + (when prefix-face + `(font-lock-face prefix-face)) + `(occur-prefix t mouse-face (highlight) + occur-target ,marker follow-link t + help-echo "mouse-2: go to this occurrence"))) + ;; We don't put `mouse-face' on the newline, + ;; because that loses. And don't put it + ;; on context lines to reduce flicker. + (propertize curstring 'mouse-face (list 'highlight) + 'occur-target marker + 'follow-link t + 'help-echo + "mouse-2: go to this occurrence") + ;; Add marker at eol, but no mouse props. + (propertize "\n" 'occur-target marker))) + (data + (if (= nlines 0) + ;; The simple display style + out-line + ;; The complex multi-line display style. + (occur-context-lines out-line nlines keep-props) + ))) + ;; Actually insert the match display data + (with-current-buffer out-buf + (let ((beg (point)) + (end (progn (insert data) (point)))) + (unless (= nlines 0) + (insert "-------\n"))))))))) + (when (not (zerop matches)) ;; is the count zero? + (setq globalcount (+ globalcount matches)) + (with-current-buffer out-buf + (goto-char headerpt) + (let ((beg (point)) + end) + (insert (format "%d match%s for \"%s\" in buffer: %s\n" + matches (if (= matches 1) "" "es") + regexp (buffer-name buf))) + (setq end (point)) + (add-text-properties beg end + (append + (when title-face + `(font-lock-face ,title-face)) + `(occur-title ,buf)))) + (goto-char (point-min))))))) + (if coding + ;; CODING is buffer-file-coding-system of the first buffer + ;; that locally binds it. Let's use it also for the output + ;; buffer. + (set-buffer-file-coding-system coding)) + ;; Return the number of matches + globalcount))) + + +;;; =========================================================================== +;;; +;;; `search-forward' and `search-backward' for foreign regexp +;;; with a help from external command. +;;; +;;; =========================================================================== + +(defvar foreign-regexp/search/external-command nil + "Path of an external command to use to execute actual search operation. + +Seven arguments describe below will be passed to the command. + + 1st: Path of a file which contains the text to be searched. + + The text in this file is encoded in the value of + `foreign-regexp/output-coding-system'. + + 2nd: Path of a file to which the command should write the result + of current search operation. + + The external command have to output a form like: + + (setq result + '((1st-MATCH-START 1st-MATCH-END + SUB-MATCH-1-IN-1st-MATCH-START SUB-MATCH-1-IN-1st-MATCH-END + SUB-MATCH-2-IN-1st-MATCH-START SUB-MATCH-2-IN-1st-MATCH-END + ...) + (2nd-MATCH-START 2nd-MATCH-END) + SUB-MATCH-1-IN-2nd-MATCH-START SUB-MATCH-1-IN-2nd-MATCH-END + SUB-MATCH-2-IN-2nd-MATCH-START SUB-MATCH-2-IN-2nd-MATCH-END + ...) + ...) + + to this file. + + Note that each start and end position in the form should be + an offset from beginning of the text which has been searched. + (This means each number should be started from 0, not from 1) + + The text in this file must be encoded in the value of + `foreign-regexp/input-coding-system'. + + 3rd: Path of a file in which the regexp we want to search is written. + The command have a responsibility to search this regexp + from the file specified by 1st argument, then write start and + end positions of each match to the file specified by 2nd argument. + + The text in this file is encoded in the value of + `foreign-regexp/output-coding-system'. + + 4th: A dot matches newline flag. + When the value of this flag is not empty string, + . should be matched to a newline character. + + 5th: A case sensitive flag. + When the value of this flag is not empty string, + the match operation should be done case-sensitive. + + 6th: An extended regular expression flag. + When the value of this flag is not empty string, + the current search regexp (see 3rd arg) should be + interpreted as extended regular expression. + + 7th: Positive integer when we want limit the matches, or empty + string when we don't want limit the matches.") + +(defvar foreign-regexp/search/shell-script nil + "A shell script which will be run as +`foreign-regexp/search/external-command' +when it has nil value.") + + +;; ---------------------------------------------------------------------------- +;; +;; Macros +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/search/with-regarding-these-string-as-foreign-regexp +;; (string-list &optional limit) &rest body) => RESULT OF BODYFORM +;; ---------------------------------------------------------------------------- +(defmacro foreign-regexp/search/with-regarding-these-string-as-foreign-regexp (args &rest body) + "Run BODY with applying `foreign-regexp/search/forward' and +`foreign-regexp/search/backward' to member of STRING-LIST in +substitution for `re-search-forward' and `re-search-backward'. + +Note that the equivalence of the STRING are tested in `eq'. + +When LIMIT is a number, match will be limited to the LIMIT. +When LIMIT is NIL, match won't be limited. + +\(FN (STRING-LIST &OPTIONAL LIMIT) &REST BODY)" + (declare (indent 1)) + (let ((g-orig-re-fwd-fn (gensym)) + (g-orig-re-bkwd-fn (gensym)) + (g-regexp-lst (gensym)) + (g-limit (gensym)) + (g-args (gensym))) + `(lexical-let ((,g-orig-re-fwd-fn (symbol-function 're-search-forward)) + (,g-orig-re-bkwd-fn (symbol-function 're-search-backward))) + (unwind-protect + (lexical-let ((,g-regexp-lst ,(nth 0 args)) + (,g-limit ,(nth 1 args))) + (setf (symbol-function 're-search-forward) + (lambda (regexp &optional bound noerror count) + (cond + ((memq regexp ,g-regexp-lst) + (funcall 'foreign-regexp/search/forward + regexp bound noerror count ,g-limit)) + (t + (funcall ,g-orig-re-fwd-fn + regexp bound noerror count))))) + (setf (symbol-function 're-search-backward) + (lambda (regexp &optional bound noerror count) + (cond + ((memq regexp ,g-regexp-lst) + (funcall 'foreign-regexp/search/backward + regexp bound noerror count ,g-limit)) + (t + (funcall ,g-orig-re-bkwd-fn + regexp bound noerror count))))) + ,@body) + (setf (symbol-function 're-search-forward) ,g-orig-re-fwd-fn) + (setf (symbol-function 're-search-backward) ,g-orig-re-bkwd-fn))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/search/with-regarding-string-as-foreign-regexp +;; (string &optional limit) &rest body) => RESULT OF BODYFORM +;; ---------------------------------------------------------------------------- +(defmacro foreign-regexp/search/with-regarding-string-as-foreign-regexp (args &rest body) + "Run BODY with applying `foreign-regexp/search/forward' and +`foreign-regexp/search/backward' to STRING in substitution for +`re-search-forward' and `re-search-backward'. + +Note that the equivalence of the STRING are tested in `eq'. + +When LIMIT is a number, match will be limited to the LIMIT. +When LIMIT is NIL, match won't be limited. + +\(FN (STRING &OPTIONAL LIMIT) &REST BODY)" + (declare (indent 1)) + `(foreign-regexp/search/with-regarding-these-string-as-foreign-regexp + ((list ,(nth 0 args)) + ,(nth 1 args)) + ,@body)) + +;; ---------------------------------------------------------------------------- +;; +;; Commands +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/search/forward regexp &optional bound noerror count limit) +;; => POINT +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/search/forward (regexp &optional bound noerror count limit) + "Search forward from point for REGEXP in foreign manner. +See also `re-search-forward'." + (interactive + (and + (foreign-regexp/search/assert-available) + (foreign-regexp/read-from-minibuf/with-search-option-indicator + (list (read-from-minibuffer "Search for foreign regexp: " + nil nil nil + 'foreign-regexp/history))))) + (let* ((buf (current-buffer)) + (data (or (foreign-regexp/search/cache/get buf regexp limit) + (foreign-regexp/search/cache/update buf regexp limit))) + (pt (point)) + (be-lst (car (member-if #'(lambda (be-lst) + (<= pt (nth 0 be-lst))) + data))) + (beg (and be-lst (nth 0 be-lst))) + (end (and be-lst (nth 1 be-lst)))) + (cond + ((and be-lst + (if bound (<= end bound) t)) + (set-match-data (copy-list be-lst)) + (goto-char end) + (cond + ((and count + (< 0 (1- count))) + (foreign-regexp/search/forward + regexp bound noerror (1- count) limit)) + (t + end))) + ((eq noerror + t) + nil) + (noerror + (goto-char (or bound + (point-max))) + nil) + (t + (signal 'search-failed + regexp))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/search/backward regexp &optional bound noerror count limit) +;; => POINT +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/search/backward (regexp &optional bound noerror count limit) + "Search backward from point for REGEXP in foreign manner. +See also `re-search-backward'." + (interactive + (and + (foreign-regexp/search/assert-available) + (foreign-regexp/read-from-minibuf/with-search-option-indicator + (list (read-from-minibuffer "Search for foreign regexp backward: " + nil nil nil + 'foreign-regexp/history))))) + (let* ((buf (current-buffer)) + (data (reverse (or (foreign-regexp/search/cache/get buf regexp limit) + (foreign-regexp/search/cache/update buf regexp limit)))) + (pt (point)) + (be-lst (car (member-if + #'(lambda (be-lst) + (<= (nth 1 be-lst) pt)) + data))) + (beg (and be-lst (nth 0 be-lst))) + (end (and be-lst (nth 1 be-lst)))) + (cond + ((and be-lst + (if bound (<= bound beg) t)) + (set-match-data (copy-list be-lst)) + (goto-char beg) + (cond + ((and count + (< 0 (1- count))) + (foreign-regexp/search/backward + regexp bound noerror (1- count) limit)) + (t + beg))) + ((eq noerror + t) + nil) + (noerror + (goto-char (or bound + (point-max))) + nil) + (t + (signal 'search-failed + regexp))))) + + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/search/available-p) => BOOL +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/search/available-p () + "Test if external command or shell script is defined or not." + (or foreign-regexp/search/external-command + foreign-regexp/search/shell-script)) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/search/assert-available) => VOID or ERROR +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/search/assert-available () + "Raise error when no external command or shell script is defined." + (or (foreign-regexp/search/available-p) + (error "[foreign-regexp] No external command or shell script is defined for search."))) + + +;;; =========================================================================== +;;; +;;; Cache data for `foreign-regexp/search/forward' +;;; and `foreign-regexp/search/backward'. +;;; +;;; =========================================================================== + +(defvar foreign-regexp/search/.cache-alst nil) + + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/search/cache/pre-command-hook-fn) void +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/search/cache/pre-command-hook-fn () + "Clear cache before any command will run. + +When `this-command' has property `foreign-regexp/search/ongoing-search-cmd-p', +cache won't be cleared." + (condition-case c + (when (not (and (symbolp this-command) + (get this-command + 'foreign-regexp/search/ongoing-search-cmd))) + (foreign-regexp/search/cache/clear-all)) + (error + (message "[foreign-regexp] %s" (error-message-string c))))) + +(put 'isearch-repeat-forward 'foreign-regexp/search/ongoing-search-cmd t) +(put 'isearch-repeat-backward 'foreign-regexp/search/ongoing-search-cmd t) + +(add-hook 'pre-command-hook 'foreign-regexp/search/cache/pre-command-hook-fn) + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/search/cache/get buf regexp &optional limit) => LIST +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/search/cache/get (buf regexp &optional limit) + "Returns cache data, which is the result of a search +in BUF for REGEXP by external command." + (with-current-buffer buf + (let* ((cache-alst-for-buf (cdr (assq buf foreign-regexp/search/.cache-alst))) + (cache-alst-for-str (cdr (assq regexp cache-alst-for-buf))) + (cached-data (cdr (assq 'data cache-alst-for-str))) + (cached-limit (cdr (assq 'limit cache-alst-for-str))) + (cached-tick (cdr (assq 'tick cache-alst-for-str))) + (cached-pt-min (cdr (assq 'pt-min cache-alst-for-str))) + (cached-pt-max (cdr (assq 'pt-max cache-alst-for-str))) + (cur-tick (buffer-chars-modified-tick buf)) + (cur-pt-min (point-min)) + (cur-pt-max (point-max))) + + (when (and cache-alst-for-str + (or (not (equal cached-limit limit)) + (/= cached-tick cur-tick) + (/= cached-pt-min cur-pt-min) + (/= cached-pt-max cur-pt-max))) + (assq-delete-all regexp cache-alst-for-buf) + (setq cached-data nil)) + cached-data))) + + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/search/cache/clear buf regexp) => LIST +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/search/cache/clear (buf regexp) + "Clear cache data, which is the result of a search +in BUF for REGEXP by external command." + (when (assq regexp + (cdr (assq buf foreign-regexp/search/.cache-alst))) + (foreign-regexp/.debug foreign-regexp/search/debug-cache + "Clear: %s, \"%s\"\n" buf regexp) + (assq-delete-all + regexp + (cdr (assq buf foreign-regexp/search/.cache-alst))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/search/cache/clear-all) => LIST +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/search/cache/clear-all () + "Clear all of cache data, which is the result of a search +by external command." + (when foreign-regexp/search/.cache-alst + (foreign-regexp/.debug foreign-regexp/search/debug-cache + "Clear: All\n") + (setq foreign-regexp/search/.cache-alst nil))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/search/cache/update buf regexp) => LIST +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/search/cache/update (buf regexp &optional limit) + "Update cache data, which is the result of a search +in BUF for REGEXP by external command." + (foreign-regexp/.debug foreign-regexp/search/debug-cache + "Update: %s, \"%s\"\n" buf regexp) + (condition-case c + (with-current-buffer buf + (let ((pt-min (point-min)) + (pt-max (point-max)) + (case-fold-p (if isearch-mode + isearch-case-fold-search + case-fold-search)) + result) + (setq result + (foreign-regexp/run-external-command + foreign-regexp/search/external-command + foreign-regexp/search/shell-script + (buffer-substring pt-min pt-max) + regexp + nil + (if foreign-regexp/dot-match-a-newline-p "DOT" "") + (if (not case-fold-p) "CASE" "") + (if foreign-regexp/use-extended-regexp-p "EXT" "") + (cond + ((null limit) "") + ((integerp limit) (format "%s" limit)) + (t + (error "[foreign-regexp] `%s' is not type of number or null." + limit))))) + + (dolist (be-lst result) + (dotimes (i (length be-lst)) + (setf (nth i be-lst) + (+ pt-min (nth i be-lst))))) ;; [Count + Offset => Count] + + ;; Remove old cache. + (foreign-regexp/search/cache/clear buf regexp) + + ;; Save new cache. + (or (assq buf foreign-regexp/search/.cache-alst) + (push (list buf) + foreign-regexp/search/.cache-alst)) + (push (cons regexp + (list (cons 'data result) + (cons 'limit limit) + (cons 'tick (buffer-chars-modified-tick buf)) + (cons 'pt-min pt-min) + (cons 'pt-max pt-max))) + (cdr (assq buf foreign-regexp/search/.cache-alst))) + result)) + (error + (unwind-protect + ;; Remove old cache. + (foreign-regexp/search/cache/clear buf regexp) + (signal 'invalid-regexp + (list (error-message-string c))))))) + + +;;; =========================================================================== +;;; +;;; `isearch' for foreign regexp with a help from external command. +;;; +;;; =========================================================================== + +;; ---------------------------------------------------------------------------- +;; +;; Commands +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/isearch-forward &optional not-regexp no-recursive-edit) +;; => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/isearch-forward (&optional not-regexp no-recursive-edit) + "Do isearch with a help from external command. + +See `isearch-forward-regexp' and `isearch-backward-regexp' for +more information." + (interactive "P\np") + (foreign-regexp/isearch/assert-available) + + ;; Setup `isearch-search-fun-function'. + (when (not (boundp 'foreign-regexp/isearch/.orig-isearch-search-fun-function)) + (defvar foreign-regexp/isearch/.orig-isearch-search-fun-function + isearch-search-fun-function)) + (setq isearch-search-fun-function #'foreign-regexp/isearch/isearch-search-fun-function) + (add-hook 'isearch-mode-end-hook + 'foreign-regexp/isearch/.isearch-mode-end-hook-fn) + + ;; Just for prompt message. + (foreign-regexp/ad-enable 'isearch-message-prefix 'after 'foreign-regexp/isearch/modify-prompt) + (foreign-regexp/ad-activate 'isearch-message-prefix) + + (isearch-mode t (null not-regexp) nil (not no-recursive-edit))) + + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/isearch-backward &optional not-regexp no-recursive-edit) +;; => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/isearch-backward (&optional not-regexp no-recursive-edit) + "Do isearch with a help from external command. + +See `isearch-forward-regexp' and `isearch-backward-regexp' for +more information." + (interactive "P\np") + (foreign-regexp/isearch/assert-available) + + ;; Setup `isearch-search-fun-function'. + (when (not (boundp 'foreign-regexp/isearch/.orig-isearch-search-fun-function)) + (defvar foreign-regexp/isearch/.orig-isearch-search-fun-function + isearch-search-fun-function)) + (setq isearch-search-fun-function #'foreign-regexp/isearch/isearch-search-fun-function) + (add-hook 'isearch-mode-end-hook + 'foreign-regexp/isearch/.isearch-mode-end-hook-fn) + + ;; Just for prompt message. + (foreign-regexp/ad-enable 'isearch-message-prefix 'after 'foreign-regexp/isearch/modify-prompt) + (foreign-regexp/ad-activate 'isearch-message-prefix) + + (isearch-mode nil (null not-regexp) nil (not no-recursive-edit))) + + +;; ---------------------------------------------------------------------------- +;; +;; Advices +;; +;; ---------------------------------------------------------------------------- + +;; Just for prompt message. +(defadvice isearch-message-prefix (after foreign-regexp/isearch/modify-prompt + (&optional c-q-hack ellipsis nonincremental)) + (when (string-match "\\b\\(\\([Rr]\\)egexp\\)\\b" ad-return-value) + (setq ad-return-value + (replace-match (propertize + (if (string= "R" (match-string 2 ad-return-value)) + "Foreign regexp" + "foreign regexp") + 'face 'minibuffer-prompt) + t t ad-return-value))) + ;; Put search option indicator. + (when (string-match "\\(: \\)$" ad-return-value) + (setq ad-return-value + (replace-match (propertize + (concat (foreign-regexp/search-option-indicator/make-indicator) + ": ") + 'face 'minibuffer-prompt) + t t ad-return-value)))) + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/isearch/available-p) => BOOL +;; ---------------------------------------------------------------------------- +(defalias 'foreign-regexp/isearch/available-p 'foreign-regexp/search/available-p) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/isearch/assert-available) => VOID or ERROR +;; ---------------------------------------------------------------------------- +(defalias 'foreign-regexp/isearch/assert-available 'foreign-regexp/search/assert-available) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/isearch/search-option-changed-hook-fn) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/isearch/search-option-changed-hook-fn () + "Update display when search option is changed." + (when isearch-mode + (setq isearch-success t isearch-adjusted t) + + ;; Force run `isearch-lazy-highlight-new-loop'. + (setq isearch-lazy-highlight-last-string nil) + (isearch-update) + + ;; Suppress messages. + (when (boundp 'no-message) ;; For compiler. + (setq no-message t)))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/isearch/setup-search-option-changed-hook) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/isearch/setup-search-option-changed-hook () + "Set call back function `foreign-regexp/isearch/search-option-changed-hook-fn' +to each search option changed hook." + (add-hook 'foreign-regexp/case-fold-changed-hook + 'foreign-regexp/isearch/search-option-changed-hook-fn) + + (add-hook 'foreign-regexp/dot-match-changed-hook + 'foreign-regexp/isearch/search-option-changed-hook-fn) + + (add-hook 'foreign-regexp/ext-regexp-changed-hook + 'foreign-regexp/isearch/search-option-changed-hook-fn)) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/isearch/.isearch-mode-end-hook-fn ) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/isearch/.isearch-mode-end-hook-fn () + "Clean up environment when isearch by foreign-regexp is finished." + (when (not isearch-nonincremental) + (when (boundp 'foreign-regexp/isearch/.orig-isearch-search-fun-function) + (setq isearch-search-fun-function + foreign-regexp/isearch/.orig-isearch-search-fun-function) + (makunbound 'foreign-regexp/isearch/.orig-isearch-search-fun-function)) + + ;; Just for prompt message. + (foreign-regexp/ad-disable 'isearch-message-prefix 'after 'foreign-regexp/isearch/modify-prompt) + (foreign-regexp/ad-activate 'isearch-message-prefix) + + (remove-hook 'isearch-mode-end-hook + 'foreign-regexp/isearch/.isearch-mode-end-hook-fn))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/isearch/isearch-search-fun-function) => FUNCTION +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/isearch/isearch-search-fun-function () + "The value used as value of `isearch-search-fun' while +isearch by foreign-regexp is going on. + +This function returns the search function +`foreign-regexp/search/forward' or `foreign-regexp/search/backward' +for isearch to use." + (cond + (isearch-forward + 'foreign-regexp/search/forward) + (t + 'foreign-regexp/search/backward))) + + +;; ---------------------------------------------------------------------------- +;; +;; Main +;; +;; ---------------------------------------------------------------------------- + +(add-hook 'isearch-mode-hook + 'foreign-regexp/isearch/setup-search-option-changed-hook) + + +;;; =========================================================================== +;;; +;;; `align' by foreign regexp with a help from external command. +;;; +;;; =========================================================================== +(require 'align) + +(defvar foreign-regexp/align/wsp-regexp "([ \\t]+)" + "A regexp corresponding to white spaces.") + +(defvar foreign-regexp/align/narrow-before-foreign-regexp t + "Non-nil to narrow to the region before foreign regexp is performed. +This is for better performance of foreign regexp.") + + +;; ---------------------------------------------------------------------------- +;; +;; Commands +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/align beg end regexp &optional group spacing repeat) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/align (beg end regexp &optional group spacing repeat) + "Align the current region using a partial foreign regexp +read from the minibuffer. + +The foreign regexp read from the minibuffer will be +supposed to be placed after whitespaces. + +When called with prefix argument, align the current region +using a full foreign regexp read from the minibuffer. + +Example) + + < Use regexp of Perl in this example. > + + When texts in region is: + + (one 1) + (ten 10) + (hundred 100) + (thousand 1000) + + Run command with prefix argument on the region with options: + + REGEXP: ([ \t]+)\d + | + +--- GROUP: 1 + Alignment will be applied to each + lines by inserting whitespaces to + the place where the sub-expression + specified by GROUP is matched to. + SPACING: 1 + REPEAT : y + + Result is: + + (one 1) + (ten 10) + (hundred 100) + (thousand 1000) + | + +---- Aligned using spaces SPACING unit. + +See also `align-regexp'." + (interactive + (append + (list (region-beginning) (region-end)) + (if current-prefix-arg + (list (foreign-regexp/read-from-minibuf/with-search-option-indicator + (read-from-minibuffer "Complex align using foreign regexp: " + foreign-regexp/align/wsp-regexp + nil nil 'foreign-regexp/history)) + (string-to-number + (read-string + "Parenthesis group to modify (justify if negative): " "1")) + (string-to-number + (read-string "Amount of spacing (or column if negative): " + (number-to-string align-default-spacing))) + (y-or-n-p "Repeat throughout line? ")) + (list (concat foreign-regexp/align/wsp-regexp + (foreign-regexp/read-from-minibuf/with-search-option-indicator + (read-from-minibuffer "Align foreign regexp: " + nil + nil nil 'foreign-regexp/history))) + 1 align-default-spacing nil)))) + (let ((rule + (list (list nil (cons 'regexp regexp) + (cons 'group (abs group)) + (if (< group 0) + (cons 'justify t) + (cons 'bogus nil)) + (if (>= spacing 0) + (cons 'spacing spacing) + (cons 'column (abs spacing))) + (cons 'repeat repeat))))) + + (foreign-regexp/search/with-regarding-string-as-foreign-regexp (regexp) + (align-region beg end 'entire rule nil nil)))) + + +;; ---------------------------------------------------------------------------- +;; +;; Advices +;; +;; ---------------------------------------------------------------------------- + +(defadvice align-region (around foreign-regexp/align/align-region + (beg end separate rules exclude-rules + &optional func)) + "Run `align-region' with regarding a regexp in the rule +which has an attribute `regexp-type' as foreign regexp. + +When the value of an attribute `regexp-type' of a rule is + + T: + The rule will be applied regardless of the current + `regexp-type'. + + LIST OF SYMBOLS: + The rule will be applied if current `regexp-type' is + its member, + + SYMBOL: + The rule will be applied if current `regexp-type' is + `eq' to the SYMBOL. + + ALL OTHERS: + The rule won't be applied." + (let ((regexp-lst nil) + (cooked-rules (copy-list rules)) + (cooked-ex-rules (copy-list exclude-rules))) + (dolist (cur-rules (list rules exclude-rules)) + (dolist (rule cur-rules) + (when (assq 'foreign-regexp-type rule) + (let ((regexp-type (cdr (assq 'regexp-type rule))) + (regexp (cdr (assq 'regexp rule)))) + (cond + ((and (stringp regexp) + + (or ;; `aien-type' is + ;; T + (eq regexp-type t) + ;; LIST + (and (listp regexp-type) + (memq foreign-regexp/regexp-type regexp-type)) + ;; SYMBOL + (eq regexp-type + foreign-regexp/regexp-type))) + (push regexp regexp-lst)) + (t + ;; Remove invalid rules. + (setq cooked-rules (delq rule cooked-rules)) + (setq cooked-ex-rules (delq rule cooked-ex-rules)))) + + ;; Modify original arguments. + (setq rules cooked-rules) + (setq exclude-rules cooked-ex-rules))))) + + (foreign-regexp/search/with-regarding-these-string-as-foreign-regexp + (regexp-lst) + (save-restriction + (when (and foreign-regexp/align/narrow-before-foreign-regexp + beg end) + ;; For better performance of foreign regexp. + (narrow-to-region (min beg end) (max beg end))) + ad-do-it)))) +(ad-activate 'align-region) + + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/align/available-p) => BOOL +;; ---------------------------------------------------------------------------- +(defalias 'foreign-regexp/align/available-p 'foreign-regexp/search/available-p) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/align/assert-available) => VOID or ERROR +;; ---------------------------------------------------------------------------- +(defalias 'foreign-regexp/align/assert-available 'foreign-regexp/search/assert-available) + + +;;; =========================================================================== +;;; +;;; quote meta characters of foreign regexp by external command. +;;; +;;; =========================================================================== + +(defvar foreign-regexp/quote-meta/external-command nil + "Path of an external command to use to execute actual +quote-meta operation. + +Two arguments describe below will be passed to the command. + + 1st: Path of a file to which the command should write the result + of quote-meta operation. + + The external command have to output a form like: + + (setq result \"quoted string\") + + to this file. + + The text in this file must be encoded in the value of + `foreign-regexp/input-coding-system'. + + 2nd: Path of a file in which the regexp, we want to quote meta + characters in it, is written. + + The text in this file is encoded in the value of + `foreign-regexp/output-coding-system'.") + +(defvar foreign-regexp/quote-meta/shell-script nil + "A shell script which will be run as +`foreign-regexp/quote-meta/external-command' +when it has nil value.") + + +;; ---------------------------------------------------------------------------- +;; +;; Commands +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/quote-meta-in-region beg end) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/quote-meta-in-region (beg end) + "Quote meta characters in region in manner of external command." + (interactive "r") + (save-excursion + (let ((quoted-str (foreign-regexp/quote-meta + (buffer-substring-no-properties beg end)))) + (delete-region beg end) + (goto-char beg) + (insert quoted-str)))) + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/quote-meta/available-p) => BOOL +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/quote-meta/available-p () + "Test if external command or shell script is defined or not." + (or foreign-regexp/quote-meta/external-command + foreign-regexp/quote-meta/shell-script)) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/quote-meta/assert-available) => VOID or ERROR +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/quote-meta/assert-available () + "Raise error when no external command or shell script is defined." + (or (foreign-regexp/quote-meta/available-p) + (error "[foreign-regexp] No external command or shell script is defined for quote-meta."))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/quote-meta regexp) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/quote-meta (regexp) + "Quote meta characters in a REGEXP in manner of external command." + (interactive) + (foreign-regexp/quote-meta/assert-available) + + (foreign-regexp/run-external-command + foreign-regexp/quote-meta/external-command + foreign-regexp/quote-meta/shell-script + nil ;; Don't care about text in current buffer. + regexp + nil)) + + +;;; =========================================================================== +;;; +;;; `re-builder' in foreign regexp with a help from external command. +;;; +;;; =========================================================================== + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/exec-with-current-re re-var &rest body) +;; => RESULT FROM BODYFORM +;; ---------------------------------------------------------------------------- +(defmacro foreign-regexp/re-builder/exec-with-current-re (re-var &rest body) + "When the current buffer is *RE-Builder*, exit `re-builder' +and then run BODY with binding current RE to RE-VAR. + +NOTE: RE-VAR will be defined as lexical variable by this macro." + (declare (indent 1)) + `(progn + (case reb-re-syntax + ((foreign-regexp) + (lexical-let ((,re-var (and (eq (get-buffer reb-buffer) + (current-buffer)) + (with-current-buffer (get-buffer reb-buffer) + (buffer-substring (point-min) (point-max)))))) + (when ,re-var + (reb-quit) + (kill-buffer (get-buffer reb-buffer)) + (set-buffer reb-target-buffer) + ,@body))) + (t + (error "[foreign-regexp] RE-Builder syntax is not `foreign-regexp'."))))) + + +;; ---------------------------------------------------------------------------- +;; +;; Commands +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/query-replace-on-target-buffer) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/query-replace-on-target-buffer () + "Run `foreign-regexp/query-replace' with current RE on +`reb-target-buffer'." + (interactive) + (foreign-regexp/re-builder/assert-in-reb-buffer) + (foreign-regexp/replace/assert-available) + + (foreign-regexp/re-builder/exec-with-current-re regexp + (when (match-beginning 0) + (goto-char (match-beginning 0))) + + (foreign-regexp/read-from-minibuf/with-initial-contents regexp + (let ((this-command 'foreign-regexp/query-replace)) + (call-interactively 'foreign-regexp/query-replace))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/occur-on-target-buffer) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/occur-on-target-buffer () + "Run `foreign-regexp/occur' with current RE on +`reb-target-buffer'." + (interactive) + (foreign-regexp/re-builder/assert-in-reb-buffer) + (foreign-regexp/occur/assert-available) + + (foreign-regexp/re-builder/exec-with-current-re regexp + (foreign-regexp/read-from-minibuf/with-initial-contents regexp + (let ((this-command 'foreign-regexp/occur)) + (call-interactively 'foreign-regexp/occur))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/isearch-forward-on-target-buffer) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/isearch-forward-on-target-buffer () + "Run `foreign-regexp/isearch-forward' with current RE on +`reb-target-buffer'." + (interactive) + (foreign-regexp/re-builder/assert-in-reb-buffer) + (foreign-regexp/isearch/assert-available) + + (foreign-regexp/re-builder/exec-with-current-re regexp + (add-hook 'isearch-mode-hook + (foreign-regexp/alambda () + (remove-hook 'isearch-mode-hook + #'self) + (isearch-push-state) + (setq isearch-string regexp + isearch-message regexp))) + (foreign-regexp/isearch-forward))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/isearch-backward-on-target-buffer) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/isearch-backward-on-target-buffer () + "Run `foreign-regexp/isearch-backward' with current RE on +`reb-target-buffer'." + (interactive) + (foreign-regexp/re-builder/assert-in-reb-buffer) + (foreign-regexp/isearch/assert-available) + + (foreign-regexp/re-builder/exec-with-current-re regexp + (add-hook 'isearch-mode-hook + (foreign-regexp/alambda () + (remove-hook 'isearch-mode-hook + #'self) + (isearch-push-state) + (setq isearch-string regexp + isearch-message regexp))) + (foreign-regexp/isearch-backward))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/non-incremental-search-forward-on-target-buffer) +;; => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/non-incremental-search-forward-on-target-buffer () + "Run `foreign-regexp/non-incremental/search-forward' with +current RE on `reb-target-buffer'." + (interactive) + (foreign-regexp/re-builder/assert-in-reb-buffer) + (foreign-regexp/non-incremental/assert-available) + + (foreign-regexp/re-builder/exec-with-current-re regexp + (foreign-regexp/read-from-minibuf/with-initial-contents regexp + (let ((this-command 'foreign-regexp/non-incremental/search-forward)) + (call-interactively 'foreign-regexp/non-incremental/search-forward))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/non-incremental-search-backward-on-target-buffer) +;; => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/non-incremental-search-backward-on-target-buffer () + "Run `foreign-regexp/non-incremental/search-backward' with +current RE on `reb-target-buffer'." + (interactive) + (foreign-regexp/re-builder/assert-in-reb-buffer) + (foreign-regexp/non-incremental/assert-available) + + (foreign-regexp/re-builder/exec-with-current-re regexp + (foreign-regexp/read-from-minibuf/with-initial-contents regexp + (let ((this-command 'foreign-regexp/non-incremental/search-backward)) + (call-interactively 'foreign-regexp/non-incremental/search-backward))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/align-on-target-buffer) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/align-on-target-buffer () + "Run `foreign-regexp/align with +current RE on `reb-target-buffer'." + (interactive) + (foreign-regexp/re-builder/assert-in-reb-buffer) + (foreign-regexp/align/assert-available) + + (foreign-regexp/re-builder/exec-with-current-re regexp + (foreign-regexp/read-from-minibuf/with-initial-contents regexp + (let ((this-command 'foreign-regexp/align)) + (call-interactively 'foreign-regexp/align))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/toggle-case-fold-on-target-buffer +;; &optional no-message) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/toggle-case-fold-on-target-buffer (&optional no-message) + "Toggle `case-fold-search' on `reb-target-buffer'." + (interactive) + (foreign-regexp/re-builder/assert-in-reb-buffer) + + (with-current-buffer reb-target-buffer + (foreign-regexp/toggle-case-fold no-message))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/toggle-dot-match-on-target-buffer +;; &optional no-message) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/toggle-dot-match-on-target-buffer (&optional no-message) + "Toggle `foreign-regexp/dot-match-a-newline-p' on `reb-target-buffer'." + (interactive) + (foreign-regexp/re-builder/assert-in-reb-buffer) + + (with-current-buffer reb-target-buffer + (foreign-regexp/toggle-dot-match no-message))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/toggle-ext-regexp-on-target-buffer +;; &optional no-message) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/toggle-ext-regexp-on-target-buffer (&optional no-message) + "Toggle `foreign-regexp/use-extended-regexp-p' on `reb-target-buffer'." + (interactive) + (foreign-regexp/re-builder/assert-in-reb-buffer) + + (with-current-buffer reb-target-buffer + (foreign-regexp/toggle-ext-regexp no-message))) + + +;; ---------------------------------------------------------------------------- +;; +;; Advices +;; +;; ---------------------------------------------------------------------------- + +(defadvice reb-next-match (around foreign-regexp/re-builder/next-match ()) + (case reb-re-syntax + ((foreign-regexp) + (foreign-regexp/re-builder/assert-available) + (foreign-regexp/search/with-regarding-string-as-foreign-regexp + ((reb-target-binding reb-regexp) + ;; Match limit. + (if (numberp reb-auto-match-limit) + reb-auto-match-limit nil)) + ad-do-it)) + (t + ad-do-it))) +(foreign-regexp/ad-activate 'reb-next-match) +(put 'reb-next-match 'foreign-regexp/search/ongoing-search-cmd t) + +(defadvice reb-prev-match (around foreign-regexp/re-builder/prev-match ()) + (case reb-re-syntax + ((foreign-regexp) + (foreign-regexp/re-builder/assert-available) + (foreign-regexp/search/with-regarding-string-as-foreign-regexp + ((reb-target-binding reb-regexp) + ;; Match limit. + (if (numberp reb-auto-match-limit) + reb-auto-match-limit nil)) + ad-do-it)) + (t + ad-do-it))) +(foreign-regexp/ad-activate 'reb-prev-match) +(put 'reb-prev-match 'foreign-regexp/search/ongoing-search-cmd t) + +(defadvice reb-copy (around foreign-regexp/re-builder/copy ()) + (case reb-re-syntax + ((foreign-regexp) + (foreign-regexp/re-builder/assert-available) + (kill-new (buffer-substring-no-properties (point-min) (point-max)))) + (t ad-do-it))) +(foreign-regexp/ad-activate 'reb-copy) +(put 'reb-copy 'foreign-regexp/search/ongoing-search-cmd t) + +(defadvice reb-change-syntax (around foreign-regexp/re-builder/change-syntax (&optional syntax)) + (interactive + (list (intern + (completing-read "Select syntax: " + (mapcar (lambda (el) (cons (symbol-name el) 1)) + (foreign-regexp/re-builder/get-syntax-lst)) + nil t (symbol-name reb-re-syntax))))) + (if (memq syntax '(read string lisp-re sregex rx foreign-regexp)) + (let ((buffer (get-buffer reb-buffer))) + (setq reb-re-syntax syntax) + (when buffer + (with-current-buffer buffer + (reb-initialize-buffer)))) + (error "Invalid syntax: %s" syntax))) +(foreign-regexp/ad-activate 'reb-change-syntax) + +(defadvice reb-update-modestring (around foreign-regexp/re-builder/update-mode-string ()) + "Put search option indicator on modeline." + (case reb-re-syntax + ((foreign-regexp) + (setq reb-mode-string + (concat + (if reb-subexp-mode + (format " (subexp %s)" (or reb-subexp-displayed "-")) + "") + " " + (with-current-buffer reb-target-buffer + (foreign-regexp/search-option-indicator/make-indicator)))) + (force-mode-line-update)) + (t + ad-do-it))) +(foreign-regexp/ad-activate 'reb-update-modestring) + +(defadvice reb-read-regexp (around foreign-regexp/re-builder/read-regexp ()) + (case reb-re-syntax + ((foreign-regexp) + (setq ad-return-value + (buffer-substring-no-properties (point-min) (point-max)))) + (t ad-do-it))) +(foreign-regexp/ad-activate 'reb-read-regexp) + +(defadvice reb-insert-regexp (around foreign-regexp/re-builder/insert-regexp ()) + (case reb-re-syntax + ((foreign-regexp) + (when reb-regexp + (insert reb-regexp))) + (t ad-do-it))) +(foreign-regexp/ad-activate 'reb-insert-regexp) + +(defadvice reb-update-regexp (around foreign-regexp/re-builder/update-regexp ()) + (case reb-re-syntax + ((foreign-regexp) + (let ((regexp (reb-read-regexp))) + (with-current-buffer reb-target-buffer + ;; Do not reset `reb-regexp' so that `eq' can + ;; determine the equivalence. + (when (not (equal reb-regexp + regexp)) + (setq reb-regexp + regexp) + (setq ad-return-value t))))) + (t + ad-do-it))) +(foreign-regexp/ad-activate 'reb-update-regexp) + +(defadvice reb-count-subexps (around foreign-regexp/re-builder/count-subexps (re)) + (case reb-re-syntax + ((foreign-regexp) + (foreign-regexp/re-builder/assert-available) + + ;; Count number of subexp in cache data. + ;; + (let ((retval 0)) + (with-current-buffer reb-target-buffer + (save-excursion + (let ((buf (current-buffer)) + (regexp (reb-target-binding reb-regexp)) + ;; Match limit. + (limit (if (numberp reb-auto-match-limit) + reb-auto-match-limit nil))) + (dolist (be-lst (or (foreign-regexp/search/cache/get buf regexp limit) + (foreign-regexp/search/cache/update buf regexp limit))) + (setq retval (max retval (1- (/ (length be-lst) 2)))))) + (setq ad-return-value retval))))) + (t ad-do-it))) +(foreign-regexp/ad-activate 'reb-count-subexps) + +(defadvice reb-update-overlays (around foreign-regexp/re-builder/update-overlays (&optional subexp)) + (case reb-re-syntax + ((foreign-regexp) + (foreign-regexp/re-builder/assert-available) + + (foreign-regexp/search/with-regarding-string-as-foreign-regexp + ((reb-target-binding reb-regexp) + ;; Match limit. + (if (numberp reb-auto-match-limit) + reb-auto-match-limit nil)) + ad-do-it)) + (t + ad-do-it))) +(foreign-regexp/ad-activate 'reb-update-overlays) + + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/assert-in-reb-buffer) => VOID OR ERROR +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/assert-in-reb-buffer () + (when (not (reb-mode-buffer-p)) + (error "[foreign-regexp] Not in *RE-Builder* buffer."))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/available-p) => BOOL +;; ---------------------------------------------------------------------------- +(defalias 'foreign-regexp/re-builder/available-p 'foreign-regexp/search/available-p) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/assert-available) => VOID or ERROR +;; ---------------------------------------------------------------------------- +(defalias 'foreign-regexp/re-builder/assert-available 'foreign-regexp/search/assert-available) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/get-current-regexp) => STRING or NIL +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/get-current-regexp () + "Returns regular expression in buffer *RE-Builder*. + +When the current buffer is not *RE-Builder*, returns nil." + (let* ((reb-buf (get-buffer reb-buffer)) + (regexp (when (eq reb-buf (current-buffer)) + (with-current-buffer reb-buf + (buffer-substring (point-min) (point-max)))))) + regexp)) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/get-syntax-lst) => LIST +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/get-syntax-lst () + "Returns list of syntax defined in `reb-re-syntax'." + ;; XXX: Ugly hack. + ;; This won't work if `reb-re-syntax' has + ;; structure other than default value. + (let ((type (get 'reb-re-syntax 'custom-type))) + (setq type (delete 'choice type)) + (mapcar '(lambda (alt-type) + (cond + ((symbolp alt-type) + alt-type) + ((listp alt-type) + (let (retval) + (while alt-type + (case (car alt-type) + ((const) + (setq alt-type (cdr alt-type))) + ((:tag) + (setq alt-type (cddr alt-type))) + (t + (setq retval (car alt-type)) + (setq alt-type nil)))) + retval)))) + type))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/reb-target-buffer-p buf) => BOOL +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/reb-target-buffer-p (buf) + "Test if BUF is `reb-target-buffer' and if `reb-re-syntax' is +'foreign-regexp or not." + (and (eq reb-re-syntax 'foreign-regexp) + (get-buffer reb-buffer) + reb-target-buffer + (eq reb-target-buffer + buf))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/search-option-changed-hook-fn) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/search-option-changed-hook-fn () + "Update mode string and update search status with external command. +Called when search option of `reb-target-buffer' is changed." + (let ((cur-buf (current-buffer))) + (when (foreign-regexp/re-builder/reb-target-buffer-p cur-buf) + (with-current-buffer cur-buf + (reb-update-modestring)) + (with-current-buffer (get-buffer reb-buffer) + (reb-auto-update nil nil nil t))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/re-builder/setup-search-option-changed-hook) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/re-builder/setup-search-option-changed-hook () + "Set call back function `foreign-regexp/re-builder/search-option-changed-hook-fn' +to each search option changed hook." + (when reb-target-buffer + (with-current-buffer reb-target-buffer + (add-hook 'foreign-regexp/case-fold-changed-hook + 'foreign-regexp/re-builder/search-option-changed-hook-fn) + + (add-hook 'foreign-regexp/dot-match-changed-hook + 'foreign-regexp/re-builder/search-option-changed-hook-fn) + + (add-hook 'foreign-regexp/ext-regexp-changed-hook + 'foreign-regexp/re-builder/search-option-changed-hook-fn)))) + +;; ---------------------------------------------------------------------------- +;; +;; Main +;; +;; ---------------------------------------------------------------------------- + +;; XXX: Ugly hack. +;; Put `foreign-regexp' to custom variable `reb-re-syntax'. +(when (not (memq 'foreign-regexp (foreign-regexp/re-builder/get-syntax-lst))) + (put 'reb-re-syntax 'custom-type + (nconc (get 'reb-re-syntax 'custom-type) + '((const :tag "Foreign regexp syntax" foreign-regexp))))) + +(add-hook 'reb-mode-hook + 'foreign-regexp/re-builder/setup-search-option-changed-hook) + +(put 'reb-enter-subexp-mode 'foreign-regexp/search/ongoing-search-cmd t) +(put 'reb-quit-subexp-mode 'foreign-regexp/search/ongoing-search-cmd t) +(put 'reb-display-subexp 'foreign-regexp/search/ongoing-search-cmd t) + + +;;; =========================================================================== +;;; +;;; Patches to `re-builder', restore cursor position on quitting. +;;; +;;; =========================================================================== + +;; XXX: This section should be moved to outside of this library. + +;; NOTE: `re-builder' moves cursor to beginning of buffer on quitting. +;; This is very annoying when we run other commands, such as +;; `foreign-regexp/query-replace' and `foreign-regexp/align', from +;; *RE-Builder* buffer. So here we made a patch which corrects +;; that behavior. + +(defvar foreign-regexp/re-builder/targ-buf-state/.orig-pt) + + +;; ---------------------------------------------------------------------------- +;; +;; Advices +;; +;; ---------------------------------------------------------------------------- + +(defadvice re-builder (around foreign-regexp/re-builder/targ-buf-state/save ()) + "Save initial cursor position of the target buffer." + (setq foreign-regexp/re-builder/targ-buf-state/.orig-pt (point)) + ad-do-it) +(ad-activate 're-builder) + +(defadvice reb-change-target-buffer (around foreign-regexp/re-builder/targ-buf-state/update (buf)) + "Update initial cursor position of the target buffer." + (when (window-live-p reb-target-window) + (set-window-buffer reb-target-window buf)) + (with-current-buffer buf + (setq foreign-regexp/re-builder/targ-buf-state/.orig-pt (point))) + ad-do-it) +(ad-activate 'reb-change-target-buffer) + +(defadvice reb-quit (around foreign-regexp/re-builder/targ-buf-state/restore ()) + "Set cursor position of target buffer to initial state." + ad-do-it + (when (and (buffer-live-p reb-target-buffer) + foreign-regexp/re-builder/targ-buf-state/.orig-pt) + (with-current-buffer reb-target-buffer + (goto-char foreign-regexp/re-builder/targ-buf-state/.orig-pt) + (setq foreign-regexp/re-builder/targ-buf-state/.orig-pt nil)))) +(ad-activate 'reb-quit) + +(defadvice reb-kill-buffer (around foreign-regexp/re-builder/targ-buf-state/restore ()) + "Set cursor position of target buffer to initial state." + (when (reb-mode-buffer-p) + (condition-case c (reb-quit) (error nil))) + ad-do-it) +(ad-activate 'reb-kill-buffer) + + +;;; =========================================================================== +;;; +;;; Non-incremental search for foreign regexp with a help from external command. +;;; +;;; =========================================================================== + +;; ---------------------------------------------------------------------------- +;; +;; Commands +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/non-incremental/search-forward regexp) => POINT +;; ---------------------------------------------------------------------------- +;; From menu-bar.el +(defun foreign-regexp/non-incremental/search-forward (&optional regexp) + "Read a regular expression and search for it nonincrementally." + (interactive) + (prog1 + (cond + ((called-interactively-p 'interactive) + (call-interactively 'foreign-regexp/search/forward)) + (t + (foreign-regexp/search/forward regexp))) + (setq menu-bar-last-search-type 'foreign-regexp))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/non-incremental/search-backward regexp) => POINT +;; ---------------------------------------------------------------------------- +;; From menu-bar.el +(defun foreign-regexp/non-incremental/search-backward (&optional regexp) + "Read a regular expression and search for it backward nonincrementally." + (interactive) + (prog1 + (cond + ((called-interactively-p 'interactive) + (call-interactively 'foreign-regexp/search/backward)) + (t + (foreign-regexp/search/backward regexp))) + (setq menu-bar-last-search-type 'foreign-regexp))) + + +;; ---------------------------------------------------------------------------- +;; +;; Advices +;; +;; ---------------------------------------------------------------------------- + +(when (require 'menu-bar nil t) + (when (fboundp 'nonincremental-repeat-search-forward) + (defadvice nonincremental-repeat-search-forward (around foreign-regexp/nonincremental-repeat-search-forward ()) + (cond + ((and (eq menu-bar-last-search-type 'foreign-regexp) + foreign-regexp/history) + (setq ad-return-value + (foreign-regexp/search/forward (car foreign-regexp/history)))) + (t + ad-do-it))) + (foreign-regexp/ad-activate 'nonincremental-repeat-search-forward) + (put 'nonincremental-repeat-search-forward 'foreign-regexp/search/ongoing-search-cmd t)) + + (when (fboundp 'nonincremental-repeat-search-backward) + (defadvice nonincremental-repeat-search-backward (around foreign-regexp/nonincremental-repeat-search-backward ()) + (cond + ((and (eq menu-bar-last-search-type 'foreign-regexp) + foreign-regexp/history) + (setq ad-return-value + (foreign-regexp/search/backward (car foreign-regexp/history)))) + (t + ad-do-it))) + (foreign-regexp/ad-activate 'nonincremental-repeat-search-backward) + (put 'nonincremental-repeat-search-backward 'foreign-regexp/search/ongoing-search-cmd t))) + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/non-incremental/available-p) => BOOL +;; ---------------------------------------------------------------------------- +(defalias 'foreign-regexp/non-incremental/available-p 'foreign-regexp/search/available-p) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/non-incremental/assert-available) => VOID or ERROR +;; ---------------------------------------------------------------------------- +(defalias 'foreign-regexp/non-incremental/assert-available 'foreign-regexp/search/assert-available) + + +;;; =========================================================================== +;;; +;;; The definition of transition between each command. +;;; +;;; =========================================================================== + +(defvar foreign-regexp/transition/.running-cmd nil + "Internal variable.") + +(defvar foreign-regexp/transition/command-table + '((:label re-builder + :op-kind re-builder-cmd + :command re-builder) + (:label isearch-forward + :op-kind isearch-cmd + :command foreign-regexp/isearch-forward) + (:label isearch-backward + :op-kind isearch-cmd + :command foreign-regexp/isearch-backward) + (:label replace + :op-kind minibuf-cmd + :command foreign-regexp/query-replace + ;; required by minibuf-cmd. + :transition-allowed-in query-replace-read-from) + (:label occur + :op-kind minibuf-cmd + :command foreign-regexp/occur + ;; required by minibuf-cmd. + :transition-allowed-in foreign-regexp/occur) + (:label noinc-fwd + :op-kind minibuf-cmd + :command foreign-regexp/non-incremental/search-forward + ;; required by minibuf-cmd. + :transition-allowed-in foreign-regexp/non-incremental/search-forward) + (:label noinc-bkwd + :op-kind minibuf-cmd + :command foreign-regexp/non-incremental/search-backward + ;; required by minibuf-cmd. + :transition-allowed-in foreign-regexp/non-incremental/search-backward) + (:label align + :op-kind minibuf-cmd + :command foreign-regexp/align + ;; required by minibuf-cmd. + :transition-allowed-in foreign-regexp/align)) + "Not documented yet.") + + +;; ---------------------------------------------------------------------------- +;; +;; Macros +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/transition/.setup sym-table) => VOID +;; ---------------------------------------------------------------------------- +(defmacro foreign-regexp/transition/.setup (sym-table) + "Define transitions among each command." + (let ((retval (list 'progn))) + (dolist (rec (symbol-value sym-table)) + (let ((table (copy-list (symbol-value sym-table))) + (label (cadr (memq :label rec))) + (op-kind (cadr (memq :op-kind rec))) + (command (cadr (memq :command rec))) + (transition-allowed-in (cadr (memq :transition-allowed-in rec)))) + + (setq table (delq rec table)) + + (dolist (targ-rec table) + (let ((targ-label (cadr (memq :label targ-rec))) + (targ-op-kind (cadr (memq :op-kind targ-rec))) + (targ-command (cadr (memq :command targ-rec)))) + (case op-kind + ((re-builder-cmd) + ;; Nothing to do. + ;; + ;; foreign-regexp commands which makes transition from + ;; `re-builder' are defined as `foreign-regexp/re-builder/run-*'. + ) + ((isearch-cmd) + (let ((ad-name-make-transition-to (intern + (format + "foreign-regexp/transition/%s/make-transition-to-%s" + label targ-label))) + (fn-name-turn-on-transition (intern + (format + "foreign-regexp/transition/%s/turn-on-make-transition-to-%s" + label targ-label))) + (fn-name-turn-off-transition (intern + (format + "foreign-regexp/transition/%s/turn-off-make-transition-to-%s" + label targ-label)))) + (nconc + retval + `( + ;; Advise other foreign-regexp commands so that + ;; we can exit current isearch session and + ;; make transition to them. + (defadvice ,targ-command (around + ,ad-name-make-transition-to + (&rest args)) + "Exit current isearch session and make a +transition to another foreign-regexp command." + ;; DEBUGGING + (foreign-regexp/.debug foreign-regexp/transition/debug-advices + "TRANSITION: CALL: %s, %s" + (quote ,targ-command) + (quote ,ad-name-make-transition-to)) + + (lexical-let ((regexp isearch-string)) + (unwind-protect + (progn + ;; When `isearch-string' is empty, + ;; `isearch-exit' calls `isearch-edit-string' + ;; and isearch won't be quit. So we set + ;; dummy string to `isearch-string' if + ;; it is empty. + (when (= 0 (length isearch-string)) + (setq isearch-string " ")) + (isearch-exit)) + ;; `isearch-exit' throws something in some case, + ;; so another foreign-regexp command should be called + ;; from within protected form. + ,@(case targ-op-kind + ((re-builder-cmd) + ;; NOTE: Do not run `re-builder' with timer, + ;; or window won't be switched to + ;; *RE-Builder* properly. + `((case reb-re-syntax + ((foreign-regexp) + (let ((this-command (quote ,targ-command))) + (call-interactively (quote ,targ-command))) + (with-current-buffer (get-buffer reb-buffer) + (delete-region (point-min) (point-max)) + (insert regexp))) + (t + (error "[foreign-regexp] RE-Builder syntax is not `foreign-regexp'."))))) + ((minibuf-cmd) + `((run-with-idle-timer + 0 nil + (lambda () + ;; Call another foreign-regexp command with setting + ;; initial contents to `read-from-minibuffer'. + (foreign-regexp/read-from-minibuf/with-initial-contents + regexp + (let ((this-command (quote ,targ-command))) + (call-interactively (quote ,targ-command)))))))))))) + ;; Should be turned on by `isearch-mode-hook'. + (foreign-regexp/ad-disable (quote ,targ-command) 'around (quote ,ad-name-make-transition-to)) + (foreign-regexp/ad-activate (quote ,targ-command)) + + ;; When `foreign-regexp/isearch' will be turned on, + ;; advise another foreign-regexp commands so that + ;; we can exit an isearch session and make a + ;; transition to them. + (defun ,fn-name-turn-on-transition () + (foreign-regexp/ad-enable (quote ,targ-command) 'around (quote ,ad-name-make-transition-to)) + (foreign-regexp/ad-activate (quote ,targ-command))) + (add-hook 'isearch-mode-hook (quote ,fn-name-turn-on-transition)) + + ;; Disable advices of another foreign-regexp commands + ;; when `foreign-regexp/isearch' will be turned off. + (defun ,fn-name-turn-off-transition () + (foreign-regexp/ad-disable (quote ,targ-command) 'around (quote ,ad-name-make-transition-to)) + (foreign-regexp/ad-activate (quote ,targ-command))) + (add-hook 'isearch-mode-end-hook (quote ,fn-name-turn-off-transition)))))) + + ((minibuf-cmd) + (let ((orig-command (intern + (format + "ad-Orig-%s" + command))) + (ad-name-catch-transition-to (intern + (format + "foreign-regexp/transition/%s/catch-transition-to-%s" + label targ-label))) + (ad-name-throw-transition-to (intern + (format + "foreign-regexp/transition/%s/throw-transition-to-%s" + label targ-label))) + (ad-name-allow-transition (intern + (format + "foreign-regexp/transition/%s/allow-transition-to-%s" + label targ-label))) + (g-transition-allowed-p (gensym))) + + ;; For two purposes below, we wrap each foreign-regexp + ;; command, which runs `read-from-minibuffer' to + ;; read input from minibuffer, with a wrapper command. + ;; + ;; 1. To set initial contents of `read-from-minibuffer', + ;; we have to run advices of a command before + ;; `interactive' form is run. + ;; + ;; So we wrap a command with a wrapper + ;; command and set advice to it. + ;; + ;; Now we can run `interactive' form of a + ;; command after advices has run, by calling + ;; the command interactively from inside + ;; of a wrapper command. + ;; + ;; 2. Remember running foreign-regexp command to + ;; prevent duplicated calls while minibuffer + ;; is active. + (eval `(progn + (defadvice ,command (around foreign-regexp/orig-fn (&rest args)) + (interactive) + "A wrapper of original command to run advices before +interactive form is run. +And remember running command to prevent duplicate calls." + (if (eq this-command + (quote ,command)) + ;; Called interactively. + (unwind-protect + (progn + ;; Remember current command to + ;; prevent duplicate calls. + (setq foreign-regexp/transition/.running-cmd this-command) + + (setq ad-return-value + (call-interactively (quote ,orig-command)))) + (setq foreign-regexp/transition/.running-cmd nil)) + ;; Called non-interactively. + (setq ad-return-value + (apply (quote ,orig-command) args)))) + (foreign-regexp/ad-activate (quote ,command)))) + (nconc + retval + `( + ;; Advice a command to allow making transition to + ;; another foreign-regexp command, during it is running. + (defadvice ,transition-allowed-in (around + ,ad-name-allow-transition + (&rest args)) + "Allow making transition to another foreign-regexp command +while this function is running." + ;; DEBUGGING + (foreign-regexp/.debug foreign-regexp/transition/debug-advices + "TRANSITION: CALL: %s, %s" + (quote ,transition-allowed-in) + (quote ,ad-name-allow-transition)) + + (let ((,g-transition-allowed-p t)) + ad-do-it)) + (foreign-regexp/ad-activate (quote ,transition-allowed-in)) + + ;; Advise to foreign-regexp commands, which reads + ;; input from minibuffer, to make transition to + ;; another foreign-regexp command when a tag + ;; is thrown. + (defadvice ,command (around + ,ad-name-catch-transition-to + (&rest args)) + "Make a transition to another foreign-regexp command." + + ;; DEBUGGING + (foreign-regexp/.debug foreign-regexp/transition/debug-advices + "TRANSITION: CALL: %s, %s" + (quote ,command) + (quote ,ad-name-catch-transition-to)) + + ;; Prevent duplicate calls. + (when (eq this-command + foreign-regexp/transition/.running-cmd) + (error "[foreign-regexp] Command attempted to use minibuffer while in minibuffer")) + + (unwind-protect + (progn + (foreign-regexp/ad-enable (quote ,targ-command) + 'around + (quote ,ad-name-throw-transition-to)) + (foreign-regexp/ad-activate (quote ,targ-command)) + + (foreign-regexp/catch-case var + ad-do-it + (,ad-name-throw-transition-to + ;; DEBUGGING + (foreign-regexp/.debug foreign-regexp/transition/debug-advices + "TRANSITION: CATCHED BY: %s, %s\n" + (quote ,command) + (quote ,ad-name-catch-transition-to)) + + (lexical-let ((regexp (cadr var)) + (orig-messasge-fn + (symbol-function 'message))) + ,@(case targ-op-kind + ((re-builder-cmd) + ;; NOTE: Do not run `re-builder' with timer, + ;; or window won't be switched to + ;; *RE-Builder* properly. + `((case reb-re-syntax + ((foreign-regexp) + (let ((this-command (quote ,targ-command))) + (call-interactively (quote ,targ-command))) + (with-current-buffer (get-buffer reb-buffer) + (delete-region (point-min) (point-max)) + (insert regexp))) + (t + (error "[foreign-regexp] RE-Builder syntax is not `foreign-regexp'."))))) + ((isearch-cmd) + `((run-with-idle-timer + 0 nil + (lambda () + (add-hook 'isearch-mode-hook + (foreign-regexp/alambda () + (remove-hook 'isearch-mode-hook + #'self) + (isearch-push-state) + (setq isearch-string regexp + isearch-message regexp))) + (let ((this-command (quote ,targ-command))) + (call-interactively (quote ,targ-command))))))) + ((minibuf-cmd) + `((run-with-idle-timer + 0 nil + (lambda () + ;; Call another foreign-regexp command with setting + ;; initial contents to `read-from-minibuffer'. + (foreign-regexp/read-from-minibuf/with-initial-contents + regexp + (let ((this-command (quote ,targ-command))) + (call-interactively (quote ,targ-command))))))))) + ;; FIXME: Turn off an annoying message + ;; "Back to top level.". + (top-level))))) + (foreign-regexp/ad-disable (quote ,targ-command) 'around (quote ,ad-name-throw-transition-to)) + (foreign-regexp/ad-activate (quote ,targ-command)))) + (foreign-regexp/ad-activate (quote ,command)) + + ;; Advise other foreign-regexp commands to throw a tag + ;; so that we can exit current foreign-regexp command and + ;; make transition to another one. + (defadvice ,targ-command (around ,ad-name-throw-transition-to (&rest args)) + "Throw a tag so that we can exit current foreign-regexp command and +make a transition to another one. + +Current contents of minibuffer will be thrown +as the value of a tag." + ;; DEBUGGING + (foreign-regexp/.debug foreign-regexp/transition/debug-advices + "TRANSITION: CALL: %s, %s" + (quote ,targ-command) + (quote ,ad-name-throw-transition-to)) + + ;; MEMO-1: This advice will be enabled/disabled in + ;; advice of each foreign-regexp command. + ;; MEMO-2: When the flag `,g-transition-allowed-p' is + ;; nil, this advice behaves as if it was not there. + ;; MEMO-3: `,g-transition-allowed-p' is assigned a different + ;; symbol for each foreign-regexp commands. + (cond + ((and (boundp (quote ,g-transition-allowed-p)) + ,g-transition-allowed-p) + (let ((contents (foreign-regexp/read-minibuf-contents))) + (when contents + ;; DEBUGGING + (foreign-regexp/.debug foreign-regexp/transition/debug-advices + "TRANSITION: THROWN: %s ,%s" + (quote ,ad-name-throw-transition-to) + contents) + + (throw (quote ,ad-name-throw-transition-to) + contents)))) + (t + ad-do-it)))))))))))) + retval)) + + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/transition/setup) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/transition/setup () + "Setup transitions among foreign-regexp commands." + (eval + '(foreign-regexp/transition/.setup foreign-regexp/transition/command-table))) + + +;; ---------------------------------------------------------------------------- +;; +;; Main +;; +;; ---------------------------------------------------------------------------- + +(foreign-regexp/transition/setup) + + +;;; =========================================================================== +;;; +;;; Variables and Functions for managing "Foreign-Regexp Types". +;;; +;;; =========================================================================== + +(defcustom foreign-regexp/regexp-type nil + "\"Type of the foreign regular expression\" that you want to use." + :type 'foreign-regexp/regexp-type/custom-widget/regexp-type-selector + :group 'foreign-regexp + :set '(lambda (sym val) + (cond + ((fboundp 'foreign-regexp/regexp-type/set) + (foreign-regexp/regexp-type/set val)) + (t + ;; When this file is being loaded, + ;; `foreign-regexp/regexp-type/set' will be called + ;; from `Main' section by timer. + (setq foreign-regexp/regexp-type val))))) + +(defvar foreign-regexp/regexp-type/.type-alst nil + ;; FIXME: Write document. + "Private variable.") + + +;; ---------------------------------------------------------------------------- +;; +;; Functions +;; +;; ---------------------------------------------------------------------------- + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/regexp-type/define &key name +;; tag +;; input-coding-system +;; output-coding-system +;; indicator-case-fold +;; indicator-no-case-fold +;; indicator-ext-regexp +;; indicator-no-ext-regexp +;; indicator-dot-match +;; indicator-no-dot-match +;; indicator-separator +;; cmd-path-search +;; cmd-path-replace +;; cmd-path-occur +;; cmd-path-quote-meta +;; script-search +;; script-replace +;; script-occur +;; script-quote-meta +;; wsp-regexp-for-align) => VOID +;; ---------------------------------------------------------------------------- +(defun* foreign-regexp/regexp-type/define (&key name + tag + input-coding-system + output-coding-system + indicator-case-fold + indicator-no-case-fold + indicator-ext-regexp + indicator-no-ext-regexp + indicator-dot-match + indicator-no-dot-match + indicator-separator + script-search + script-replace + script-occur + script-quote-meta + wsp-regexp-for-align + cmd-path-search + cmd-path-replace + cmd-path-occur + cmd-path-quote-meta) + ;; FIXME: Write document. + "Define a Foreign Regexp Type. + +Arguments are: + + NAME: + Name of a Foreign Regexp. This must be a symbol. + + TAG: + Name of a Foreign Regexp by human-friendly representation. + TAG will be used as label string of menu item and custom + widget. This must be a string. + + INPUT-CODING-SYSTEM: + See `foreign-regexp/input-coding-system'. + + OUTPUT-CODING-SYSTEM: + See `foreign-regexp/output-coding-system'. + + INDICATOR-CASE-FOLD: + See `foreign-regexp/search-option-indicator/case-fold-str'. + + INDICATOR-NO-CASE-FOLD: + See `foreign-regexp/search-option-indicator/no-case-fold-str'. + + INDICATOR-DOT-MATCH: + See `foreign-regexp/search-option-indicator/dot-match-str'. + + INDICATOR-NO-DOT-MATCH: + See `foreign-regexp/search-option-indicator/no-dot-match-str'. + + INDICATOR-EXT-REGEXP: + See `foreign-regexp/search-option-indicator/ext-regexp-str'. + + INDICATOR-NO-EXT-REGEXP: + See `foreign-regexp/search-option-indicator/no-ext-regexp-str'. + + INDICATOR-SEPARATOR: + See `foreign-regexp/search-option-indicator/separator-str'. + + CMD-PATH-SEARCH: + See `foreign-regexp/search/external-command'. + + CMD-PATH-REPLACE: + See `foreign-regexp/replace/external-command'. + + CMD-PATH-OCCUR: + See `foreign-regexp/occur/external-command'. + + CMD-PATH-QUOTE-META: + See `foreign-regexp/quote-meta/external-command'. + + SCRIPT-SEARCH: + See `foreign-regexp/search/shell-script'. + + SCRIPT-REPLACE: + See `foreign-regexp/replace/shell-script'. + + SCRIPT-OCCUR: + See `foreign-regexp/occur/shell-script'. + + SCRIPT-QUOTE-META: + See `foreign-regexp/quote-meta/shell-script'. + + WSP-REGEXP-FOR-ALIGN: + See `foreign-regexp/align/wsp-regexp'." + ;; Validation + ;; + (or name (error "[foreign-regexp] No `:name'!")) + (or tag (error "[foreign-regexp] No `:tag'!")) + (or input-coding-system (error "[foreign-regexp] No `:input-coding-system'!")) + (or output-coding-system (error "[foreign-regexp] No `:output-coding-system'!")) + (or indicator-case-fold (error "[foreign-regexp] No `:indicator-case-fold'!")) + (or indicator-no-case-fold (error "[foreign-regexp] No `:indicator-no-case-fold'!")) + (or indicator-ext-regexp (error "[foreign-regexp] No `:indicator-ext-regexp'!")) + (or indicator-no-ext-regexp (error "[foreign-regexp] No `:indicator-no-ext-regexp'!")) + (or indicator-dot-match (error "[foreign-regexp] No `:indicator-dot-match'!")) + (or indicator-no-dot-match (error "[foreign-regexp] No `:indicator-no-dot-match'!")) + (or indicator-separator (error "[foreign-regexp] No `:indicator-separator'!")) + (or wsp-regexp-for-align (error "[foreign-regexp] No `:wsp-regexp-for-align'!")) + + (or script-search + cmd-path-search + (error "[foreign-regexp] No `:cmd-path-search' or `:cmd-path-search'!")) + (or script-replace + cmd-path-replace + (error "[foreign-regexp] No `:script-replace' or `:cmd-path-replace'!")) + (or script-occur + cmd-path-occur + (error "[foreign-regexp] No `:script-occur' or `:cmd-path-occur'!")) + (or script-quote-meta + cmd-path-quote-meta + (error "[foreign-regexp] No `:script-quote-meta' or `:cmd-path-quote-meta'!")) + + (foreign-regexp/regexp-type/forget name) + (push (list name + :name name + :tag tag + :input-coding-system input-coding-system + :output-coding-system output-coding-system + :indicator-case-fold indicator-case-fold + :indicator-no-case-fold indicator-no-case-fold + :indicator-ext-regexp indicator-ext-regexp + :indicator-no-ext-regexp indicator-no-ext-regexp + :indicator-dot-match indicator-dot-match + :indicator-no-dot-match indicator-no-dot-match + :indicator-separator indicator-separator + :script-search script-search + :script-replace script-replace + :script-occur script-occur + :script-quote-meta script-quote-meta + :cmd-path-search cmd-path-search + :cmd-path-replace cmd-path-replace + :cmd-path-occur cmd-path-occur + :cmd-path-quote-meta cmd-path-quote-meta + :wsp-regexp-for-align wsp-regexp-for-align) + foreign-regexp/regexp-type/.type-alst) + + (foreign-regexp/regexp-type/custom-widget/regexp-type-selector/update)) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/regexp-type/forget NAME) => ALIST +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/regexp-type/forget (name) + "Remove an regexp type NAME from `foreign-regexp/regexp-type/.type-alst'." + (setq foreign-regexp/regexp-type/.type-alst + (remove-if '(lambda (pair) (eq name (car pair))) + foreign-regexp/regexp-type/.type-alst))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/regexp-type/set NAME) => VOID +;; ---------------------------------------------------------------------------- +(defvar foreign-regexp/regexp-type/.history nil + "History list for a command `foreign-regexp/regexp-type/set'.") + +(defun foreign-regexp/regexp-type/set (name) + "Activate regexp type NAME." + (interactive + (list + (intern + (completing-read + (format "Regexp type for foreign regexp (defalut %s): " + foreign-regexp/regexp-type) + (sort (mapcar (lambda (sym) + (format "%s" (car sym))) + foreign-regexp/regexp-type/.type-alst) + #'string<) + nil t nil + 'foreign-regexp/regexp-type/.history + (format "%s" foreign-regexp/regexp-type) nil)))) + (let ((kv-lst (or (cdr (assq name foreign-regexp/regexp-type/.type-alst)) + (cond + ((null name) + nil) + (t + (error "No such foreign-regexp definition `%s'." name)))))) + (setq foreign-regexp/input-coding-system (cadr (memq :input-coding-system kv-lst))) + (setq foreign-regexp/output-coding-system (cadr (memq :output-coding-system kv-lst))) + (setq foreign-regexp/search-option-indicator/case-fold-str (cadr (memq :indicator-case-fold kv-lst))) + (setq foreign-regexp/search-option-indicator/no-case-fold-str (cadr (memq :indicator-no-case-fold kv-lst))) + (setq foreign-regexp/search-option-indicator/ext-regexp-str (cadr (memq :indicator-ext-regexp kv-lst))) + (setq foreign-regexp/search-option-indicator/no-ext-regexp-str (cadr (memq :indicator-no-ext-regexp kv-lst))) + (setq foreign-regexp/search-option-indicator/dot-match-str (cadr (memq :indicator-dot-match kv-lst))) + (setq foreign-regexp/search-option-indicator/no-dot-match-str (cadr (memq :indicator-no-dot-match kv-lst))) + (setq foreign-regexp/search-option-indicator/separator-str (cadr (memq :indicator-separator kv-lst))) + (setq foreign-regexp/search/external-command (cadr (memq :cmd-path-search kv-lst))) + (setq foreign-regexp/search/shell-script (cadr (memq :script-search kv-lst))) + (setq foreign-regexp/replace/external-command (cadr (memq :cmd-path-replace kv-lst))) + (setq foreign-regexp/replace/shell-script (cadr (memq :script-replace kv-lst))) + (setq foreign-regexp/occur/external-command (cadr (memq :cmd-path-occur kv-lst))) + (setq foreign-regexp/occur/shell-script (cadr (memq :script-occur kv-lst))) + (setq foreign-regexp/quote-meta/external-command (cadr (memq :cmd-path-quote-meta kv-lst))) + (setq foreign-regexp/quote-meta/shell-script (cadr (memq :script-quote-meta kv-lst))) + (setq foreign-regexp/align/wsp-regexp (cadr (memq :wsp-regexp-for-align kv-lst))) + + (setq foreign-regexp/regexp-type name) + (cond + ((null name) + (message "[foreign-regexp] Foreign-Regexp type is set to \"None\".")) + (t + (message "[foreign-regexp] Foreign-Regexp type is set to \"%s\"" name))))) + +;; ---------------------------------------------------------------------------- +;; (foreign-regexp/regexp-type/custom-widget/regexp-type-selector/update NAME) => VOID +;; ---------------------------------------------------------------------------- +(defun foreign-regexp/regexp-type/custom-widget/regexp-type-selector/update () + "Update a widget `foreign-regexp/regexp-type/custom-widget/regexp-type-selector' which +will be used to customize user option `foreign-regexp/regexp-type'." + (define-widget 'foreign-regexp/regexp-type/custom-widget/regexp-type-selector 'lazy + "A widget, which will be used to customize user option +`foreign-regexp/regexp-type'." + :offset 4 + :tag "Type" + :type `(choice + (const :tag "None" nil) + ,@(mapcar (lambda (pair) + (list 'const + :tag (cadr (memq :tag (cdr pair))) + (car pair))) + foreign-regexp/regexp-type/.type-alst)))) + + +;; ---------------------------------------------------------------------------- +;; +;; Main +;; +;; ---------------------------------------------------------------------------- +(run-with-idle-timer + 0 nil + '(lambda () + (foreign-regexp/regexp-type/set foreign-regexp/regexp-type))) + + +;;; =========================================================================== +;;; +;;; Predefined Shell Scripts. +;;; +;;; =========================================================================== + +(defvar foreign-regexp/shell-script/foreign-regexp-occur-aux.pl "#!/usr/bin/env perl +use strict; +use warnings; +use 5.008; + +use Encode; +use utf8; + +use English qw( -no_match_vars ); +use FileHandle; + +sub main () { + my $fn_in = shift @ARGV or die \"No input file name!\"; + my $fn_out = shift @ARGV or die \"No output file name!\"; + my $fn_pat = shift @ARGV or die \"No pattern file name!\"; + my $dot_p = @ARGV ? shift(@ARGV) : die \"No dot matches new line flag.\"; + my $case_p = @ARGV ? shift(@ARGV) : die \"No case sensitive flag.\"; + my $ext_p = @ARGV ? shift(@ARGV) : die \"No extended regular expression flag.\";; + my $code = 'utf8'; + my $offset = 0; + + umask 0177; + + my($str_in, $str_pat, $str_repl); + use PerlIO::encoding; + local $PerlIO::encoding::fallback = Encode::FB_CROAK(); # Die on invalid char. + { + local $INPUT_RECORD_SEPARATOR = undef; + $str_pat = FileHandle->new($fn_pat, \"<:encoding($code)\")->getline; + } + + my $pat = eval(\"qr/\\${str_pat}/om\" . + ( $dot_p ? \"s\" : \"\") . + (!$case_p ? \"i\" : \"\") . + ( $ext_p ? \"x\" : \"\")); + die $EVAL_ERROR if $EVAL_ERROR; + + { + local $INPUT_RECORD_SEPARATOR = \"\\n\"; + my $fh_in = FileHandle->new($fn_in, \"<:encoding($code)\"); + my $fh_out = FileHandle->new($fn_out, \">:encoding($code)\"); + + print $fh_out \"(setq result '(\\n\"; + + while (my $line = <$fh_in>) { + my $len = length $line; + my $matched = 0; + chomp $line; + + + while ($line =~ m/${pat}/g) { + print $fh_out '(' unless $matched++; + print($fh_out + '(', + $offset + $LAST_MATCH_START[0], ' ', + $offset + $LAST_MATCH_END [0], + ')'); + } + + print $fh_out ')' if $matched; + + $offset += $len; + } + + print $fh_out \"))\\n\"; + print $fh_out \";;; EOF\\n\"; + } + + exit 0; +} + +main(); + +# EOF + +") + +(defvar foreign-regexp/shell-script/foreign-regexp-occur-aux.rb "#!/usr/bin/env ruby +# -*- coding: utf-8-unix -*- + +abort \"Ruby version is too old (1.9 or later is required).\" if RUBY_VERSION < \"1.9\" + +def main () + fn_in, fn_out, fn_pat, dot_p, case_p, ext_p = ARGV + + str_pat = open(fn_pat, 'r:UTF-8') {|f| f.read} + offset = 0 + + pat = Regexp.new(str_pat, ((dot_p.empty? ? 0 : Regexp::MULTILINE) | + (case_p.empty? ? Regexp::IGNORECASE : 0) | + (ext_p.empty? ? 0 : Regexp::EXTENDED))) + + $stdout = open(fn_out, 'w:UTF-8') + + print \"(setq result '(\" + + open(fn_in, 'r:UTF-8') do |file_in| + while line = file_in.gets do + matched = 0 + len = line.length + line.chomp! + + line.scan( pat ) do + print '(' if matched == 0 + print '(' + print offset + Regexp.last_match.begin(0), ' ' + print offset + Regexp.last_match.end(0) + print ')' + matched += 1 + end + print ')' if matched != 0 + + offset += len + end + end + + print \"))\\n\" + print \";;; EOF\\n\" + + exit 0 + +rescue RegexpError + $stderr.print $!.message + exit 1 +end + +main + +# EOF + +") + +(defvar foreign-regexp/shell-script/foreign-regexp-quote-meta-aux.pl "#!/usr/bin/env perl +use strict; +use warnings; +use 5.008; + +use Encode; +use utf8; + +use English qw( -no_match_vars ); +use FileHandle; + +sub escape_perl_str_for_emacs { + my $r_txt = shift; + ${$r_txt} =~ s/\\\\/\\\\\\\\/og; + ${$r_txt} =~ s/\"/\\\\\"/og; +} + +sub main () { + my $fn_out = shift @ARGV or die \"No output file name!\"; + my $fn_pat = shift @ARGV or die \"No pattern file name!\"; + my $code = 'utf8'; + + umask 0177; + + my($str_pat); + use PerlIO::encoding; + local $PerlIO::encoding::fallback = Encode::FB_CROAK(); # Die on invalid char. + { + local $INPUT_RECORD_SEPARATOR = undef; + $str_pat = FileHandle->new($fn_pat, \"<:encoding($code)\")->getline; + $str_pat = quotemeta($str_pat); + escape_perl_str_for_emacs(\\$str_pat) + } + + { + my $fh_out = FileHandle->new($fn_out, \">:encoding($code)\"); + + print $fh_out \"(setq result \\\"${str_pat}\\\")\\n\"; + print $fh_out \";;; EOF\\n\"; + } + + exit 0; +} + +main(); + +# EOF + +") + +(defvar foreign-regexp/shell-script/foreign-regexp-quote-meta-aux.rb "#!/usr/bin/env ruby +# -*- coding: utf-8-unix -*- + +abort \"Ruby version is too old (1.9 or later is required).\" if RUBY_VERSION < \"1.9\" + +def escape_ruby_str_for_emacs! (str) + str.gsub!(/\\\\/) {'\\\\\\\\'} + str.gsub!(/\"/ ) {'\\\\\"'} +end + +def main () + fn_out, fn_pat = ARGV + + str_pat = open(fn_pat, 'r:UTF-8') {|f| f.read} + + $stdout = open(fn_out, 'w:UTF-8') + + retval = Regexp.escape(str_pat) + escape_ruby_str_for_emacs!(retval) + + print '(setq result \"' + print retval + print '\")' + + exit 0 +end + +main + +# EOF + +") + +(defvar foreign-regexp/shell-script/foreign-regexp-replace-aux.pl "#!/usr/bin/env perl +use strict; +use warnings; +use 5.008; + +use Encode; +use utf8; + +package main; +use English qw( -no_match_vars ); +use FileHandle; + +sub generate_build_replacement_fn { + # Eval replacement string in environment + # which has no lexical variable. + # + # Special-variables in the replacement string + # will be interpolated. + eval 'sub {\"'.$_[0].'\"}'; +} + +sub eval_replacement { + eval $_[0] +} + +sub interpolate_replacement { + eval '\"'.$_[0].'\"' +} + +sub eval_and_interpolate_replacement { + # Not tested yet. + my $str_repl = shift; + $str_repl = eval_replacement($str_repl); + die \"Error while evaluating replacement \\\"${str_repl}\\\":\\n${EVAL_ERROR}\" if $EVAL_ERROR; + $str_repl = interpolate_replacement($str_repl); + die \"Error while interpolating replacement \\\"${str_repl}\\\":\\n${EVAL_ERROR}\" if $EVAL_ERROR; + $str_repl +} + +sub escape_str_to_eval { + my $r_txt = shift; + ${$r_txt} =~ s/\\\\/\\\\\\\\/og; + ${$r_txt} =~ s/\"/\\\\\"/og; +} + +sub escape_perl_str_for_emacs { + my $r_txt = shift; + ${$r_txt} =~ s/\\\\/\\\\\\\\/og; + ${$r_txt} =~ s/\"/\\\\\"/og; +} + +sub main () { + my $fn_in = shift @ARGV or die \"No input file name!\"; + my $fn_out = shift @ARGV or die \"No output file name!\"; + my $fn_pat = shift @ARGV or die \"No pattern file name!\"; + my $fn_repl = shift @ARGV or die \"No replacement file name!\"; + my $dot_p = @ARGV ? shift(@ARGV) : die \"No dot matches new line flag.\"; + my $case_p = @ARGV ? shift(@ARGV) : die \"No case sensitive flag.\"; + my $ext_p = @ARGV ? shift(@ARGV) : die \"No extended regular expression flag.\";; + my $code = 'utf8'; + + my($str_in, $str_pat, $str_repl); + use PerlIO::encoding; + local $PerlIO::encoding::fallback = Encode::FB_CROAK(); # Die on invalid char. + { + local $INPUT_RECORD_SEPARATOR = undef; + $str_in = FileHandle->new($fn_in, \"<:encoding($code)\")->getline; + $str_pat = FileHandle->new($fn_pat, \"<:encoding($code)\")->getline; + $str_repl = FileHandle->new($fn_repl, \"<:encoding($code)\")->getline; + } + my $pat = eval(\"qr/\\${str_pat}/om\" . + ( $dot_p ? \"s\" : \"\") . + (!$case_p ? \"i\" : \"\") . + ( $ext_p ? \"x\" : \"\")); + die $EVAL_ERROR if $EVAL_ERROR; + + escape_str_to_eval(\\$str_repl); + my $build_replacement_fn = generate_build_replacement_fn($str_repl); + die \"Error in replacement \\\"${str_repl}\\\":\\n${EVAL_ERROR}\" if $EVAL_ERROR; + + umask 0177; + my $fh_out = FileHandle->new($fn_out, \">:encoding($code)\"); + + print $fh_out \"(setq result '(\", \"\\n\"; + + while ($str_in =~ m/${pat}/omg) { + my $replacement = eval { $build_replacement_fn->() }; + die \"Error while interpolating replacement \\\"${str_repl}\\\":\\n${EVAL_ERROR}\" if $EVAL_ERROR; + + escape_perl_str_for_emacs(\\$replacement); + + print $fh_out \" (\"; + print $fh_out $LAST_MATCH_START[0], ' '; + print $fh_out $LAST_MATCH_END [0], ' '; + print $fh_out '\"', $replacement, '\"'; + print $fh_out \" )\", \"\\n\"; + } + + print $fh_out \"))\", \"\\n\"; + print $fh_out \";;; EOF\", \"\\n\"; + + exit 0; +} + +main(); + +# EOF + +") + +(defvar foreign-regexp/shell-script/foreign-regexp-replace-aux.rb "#!/usr/bin/env ruby +# -*- coding: utf-8-unix -*- + +abort \"Ruby version is too old (1.9 or later is required).\" if RUBY_VERSION < \"1.9\" + +def escape_str_for_eval! (str) + str.gsub!(/\"/ ){'\\\\\"'} +end + +def escape_ruby_str_for_emacs! (str) + str.gsub!(/\\\\/) {'\\\\\\\\'} + str.gsub!(/\"/ ) {'\\\\\"'} +end + +def main () + fn_in, fn_out, fn_pat, fn_rpl, dot_p, case_p, ext_p = ARGV + + str_in = open(fn_in, 'r:UTF-8') {|f| f.read} + str_pat = open(fn_pat, 'r:UTF-8') {|f| f.read} + str_rpl = open(fn_rpl, 'r:UTF-8') {|f| f.read} + + pat = Regexp.new(str_pat, ((dot_p.empty? ? 0 : Regexp::MULTILINE) | + (case_p.empty? ? Regexp::IGNORECASE : 0) | + (ext_p.empty? ? 0 : Regexp::EXTENDED))) + + escape_str_for_eval!(str_rpl) + + $stdout = open(fn_out, 'w:UTF-8') + + print \"(setq result '(\" + + str_in.scan( pat ) do |m| + replacement = eval '\"' + str_rpl + '\"' + escape_ruby_str_for_emacs!(replacement) + + print '(' + print Regexp.last_match.begin(0), ' ' + print Regexp.last_match.end(0), ' ' + print '\"', replacement, '\"' + print ')' + end + + print \"))\\n\" + print \";;; EOF\\n\" + + exit 0 + +rescue RegexpError + $stderr.print $!.message + exit 1 +end + +main + +# EOF + +") + +(defvar foreign-regexp/shell-script/foreign-regexp-search-aux.pl "#!/usr/bin/env perl +use strict; +use warnings; +use 5.008; + +use Encode; +use utf8; + +use English qw( -no_match_vars ); +use FileHandle; + +sub main () { + my $fn_in = shift @ARGV or die \"No input file name!\"; + my $fn_out = shift @ARGV or die \"No output file name!\"; + my $fn_pat = shift @ARGV or die \"No pattern file name!\"; + my $dot_p = @ARGV ? shift(@ARGV) : die \"No dot matches new line flag.\"; + my $case_p = @ARGV ? shift(@ARGV) : die \"No case sensitive flag.\"; + my $ext_p = @ARGV ? shift(@ARGV) : die \"No extended regular expression flag.\"; + my $limit = @ARGV ? shift(@ARGV) : die \"No search limit.\"; + my $code = 'utf8'; + + umask 0177; + + my($str_in, $str_pat, $str_repl); + use PerlIO::encoding; + local $PerlIO::encoding::fallback = Encode::FB_CROAK(); # Die on invalid char. + { + local $INPUT_RECORD_SEPARATOR = undef; + $str_in = FileHandle->new($fn_in, \"<:encoding($code)\")->getline; + $str_pat = FileHandle->new($fn_pat, \"<:encoding($code)\")->getline; + } + + my $pat = eval(\"qr/\\${str_pat}/om\" . + ( $dot_p ? \"s\" : \"\") . + (!$case_p ? \"i\" : \"\") . + ( $ext_p ? \"x\" : \"\")); + die $EVAL_ERROR if $EVAL_ERROR; + + { + my $fh_out = FileHandle->new($fn_out, \">:encoding($code)\"); + + print $fh_out \"(setq result '(\"; + + my $i = 0; + while (((!$limit) || (++$i <= $limit)) && ($str_in =~ m/${pat}/omg)) { + print $fh_out ' ('; + + foreach my $i (0 .. $#LAST_MATCH_START) { + print $fh_out $LAST_MATCH_START[$i], ' '; + print $fh_out $LAST_MATCH_END [$i], ' '; + } + print $fh_out ')',; + } + + print $fh_out \"))\\n\"; + print $fh_out \";;; EOF\\n\"; + } + + exit 0; +} + +main(); + +# EOF + +") + +(defvar foreign-regexp/shell-script/foreign-regexp-search-aux.rb "#!/usr/bin/env ruby +# -*- coding: utf-8-unix -*- + +abort \"Ruby version is too old (1.9 or later is required).\" if RUBY_VERSION < \"1.9\" + +def main () + fn_in, fn_out, fn_pat, dot_p, case_p, ext_p, limit = ARGV + + str_in = open(fn_in, 'r:UTF-8') {|f| f.read} + str_pat = open(fn_pat, 'r:UTF-8') {|f| f.read} + + pat = Regexp.new(str_pat, ((dot_p.empty? ? 0 : Regexp::MULTILINE) | + (case_p.empty? ? Regexp::IGNORECASE : 0) | + (ext_p.empty? ? 0 : Regexp::EXTENDED))) + + $stdout = open(fn_out, 'w:UTF-8') + + print \"(setq result '(\" + + limit = (Integer limit rescue nil) + count = 0 + + str_in.scan( pat ) do + break unless (!limit || ((count += 1) <= limit)) + + print '(' + Regexp.last_match.length.times {|i| + print Regexp.last_match.begin(i), ' ' + print Regexp.last_match.end(i), ' ' + } + print ')' + end + + print \"))\\n\" + print \";;; EOF\\n\" + + exit 0 + +rescue RegexpError + $stderr.print $!.message + exit 1 +end + +main + +# EOF + +") + + +;;; =========================================================================== +;;; +;;; Define Foreign Regexp Types. +;;; +;;; =========================================================================== + +(foreign-regexp/regexp-type/define + :name 'perl + :tag "Perl (v5.8 or later)" + :input-coding-system 'utf-8-unix + :output-coding-system 'utf-8-unix + :script-search foreign-regexp/shell-script/foreign-regexp-search-aux.pl + :script-replace foreign-regexp/shell-script/foreign-regexp-replace-aux.pl + :script-occur foreign-regexp/shell-script/foreign-regexp-occur-aux.pl + :script-quote-meta foreign-regexp/shell-script/foreign-regexp-quote-meta-aux.pl + :wsp-regexp-for-align "([ \\t]+)" + :indicator-case-fold "i" + :indicator-no-case-fold "-" + :indicator-ext-regexp "x" + :indicator-no-ext-regexp "-" + :indicator-dot-match "s" + :indicator-no-dot-match "-" + :indicator-separator "") + +(foreign-regexp/regexp-type/define + :name 'ruby + :tag "Ruby (v1.9 or later)" + :input-coding-system 'utf-8-unix + :output-coding-system 'utf-8-unix + :script-search foreign-regexp/shell-script/foreign-regexp-search-aux.rb + :script-replace foreign-regexp/shell-script/foreign-regexp-replace-aux.rb + :script-occur foreign-regexp/shell-script/foreign-regexp-occur-aux.rb + :script-quote-meta foreign-regexp/shell-script/foreign-regexp-quote-meta-aux.rb + :wsp-regexp-for-align "([ \\t]+)" + :indicator-case-fold "i" + :indicator-no-case-fold "-" + :indicator-ext-regexp "x" + :indicator-no-ext-regexp "-" + :indicator-dot-match "m" + :indicator-no-dot-match "-" + :indicator-separator "") + +;;; foreign-regexp.el ends here diff --git a/site-lisp/howm/.gitignore b/site-lisp/howm/.gitignore new file mode 100644 index 0000000..4c4b0a7 --- /dev/null +++ b/site-lisp/howm/.gitignore @@ -0,0 +1,7 @@ +*.elc +*.tar.gz +Makefile +config.log +config.status +elc-stamp +autom4te.cache diff --git a/site-lisp/howm/AUTHORS b/site-lisp/howm/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/site-lisp/howm/COPYING b/site-lisp/howm/COPYING new file mode 100755 index 0000000..2233535 --- /dev/null +++ b/site-lisp/howm/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/site-lisp/howm/ChangeLog b/site-lisp/howm/ChangeLog new file mode 100644 index 0000000..0ad7529 --- /dev/null +++ b/site-lisp/howm/ChangeLog @@ -0,0 +1,2230 @@ +2013-03-21 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-misc.el (howm-normalize-file-name): fix. + howm-mode was not set at C-c , c (howm-create) + if howm-directory is placed under symbolic links. + thx > dareka 2013-03-20 + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReportPaste + +2013-03-18 HIRAOKA Kazuyuki + + * configure.in: test version + + * gfunc.el (gfunc-with): fix an error in emacs 24.3.1 without byte-compilation. + "Can't detect type of ((:nest /home/.../) (%menu%) t) for howm-folder-grep-internal." + thx > dareka 2013-03-17 + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReportPaste + +2013-01-03 HIRAOKA Kazuyuki + + test version + - update copyright years + - use "declare" instead of "lisp-indent-hook" + +2012-12-30 HIRAOKA Kazuyuki + + test version + +2012-12-29 HIRAOKA Kazuyuki + + * howm-misc.el (howm-auto-mode-interpreter-regexp): use howm-if-unbound macro + + * howm-mode.el (howm-keyword-add): fix `save-excursion' defeated by `set-buffer' + + * howm-misc.el (howm-random-walk-summary): avoid non-interactive next-line + + * howm-common.el (howm-goto-line): avoid non-interactive goto-line + + * riffle.el (riffle-contents-to-summary, riffle-set-place): ditto. + + * howm-reminder.el (howm-reminder-goto-today): ditto. + + * howm-view.el (howm-view-summary-shell-command): ditto. + + * howm-mode.el (howm-keyword-add-items): fix reference to free variable `dir' + + * howm-backend.el (howm-open-directory-independently): ditto. + +2012-12-29 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-view.el + (howm-item-list-rangeset, howm-item-list-filter): cleaned + (howm-rangeset-belong-p): add "almighty" for the above cleaning + (howm-rangeset-hit-indicator): added for the above cleaning + (howm-rangeset-hit!, howm-rangeset-hit-p): ditto. + +2012-12-28 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-view.el + (howm-entitle-items-style1): improve efficiency of howm-list-all + by avoiding redundant grep calls. + thx > dareka 2012-12-10, 2012-12-15, 2012-12-16, 2012-12-28 + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReportPaste + (howm-item-list-filter): ditto + +2012-12-27 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-view.el + (howm-entitle-items-style2): add features to summary buffer + when howm-view-list-title-type is 2. + - min/max length of titles + - independent title lines + - delete title header "=" + thx > Albert-san (areiner at tph.tuwien.ac.at) + http://sourceforge.jp/projects/howm/lists/archive/eng/2012/000107.html + http://sourceforge.jp/projects/howm/lists/archive/eng/2012/000111.html + (howm-entitle-items-style2-max-length): ditto. + (howm-entitle-items-style2-format): ditto. + (howm-entitle-items-style2-title-line): ditto. + (howm-view-summary-font-lock-keywords): ditto. + (howm-item-titles): ditto. + (howm-entitle-items-style1): delete redundant code + (howm-view-list-title): ditto. + howm-view-list-title1 and howm-view-list-title2 are deleted. + +2012-12-27 HIRAOKA Kazuyuki + + * configure.in: version 1.4.1 + + * howm-common.el (howm-get-buffer-for-file): + add comment on "File XXX no longer exists!" message. + thx > Albert-san (areiner at tph.tuwien.ac.at) + http://sourceforge.jp/projects/howm/lists/archive/eng/2012/000103.html + http://sourceforge.jp/projects/howm/lists/archive/eng/2012/000106.html + +2012-09-23 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-misc.el (howm-keyword-file): re-generate the keyword list + if .howm-keys doesn't exist. + thx > Albert-san (areiner at tph.tuwien.ac.at) + http://sourceforge.jp/projects/howm/lists/archive/eng/2012/000099.html + + * howm-mode.el (howm-keyword-add-items): ditto. + + * howm-backend.el (howm-open-directory-independently): ditto. + + * howm-menu.el (howm-menu-copy-skel): fix. + scan keywords in the initial menu file. + +2012-09-13 HIRAOKA Kazuyuki + + * configure.in: test version + +2012-09-10 HIRAOKA Kazuyuki + + * howm-view.el + (howm-view-summary-format): fix. + keep the position of the field separator "|" in summary mode + even when *.txt and *.howm are mixed. + thx > http://toro.2ch.net/test/read.cgi/unix/1141892764/940 + (howm-view-summary-font-lock-keywords): ditto. + +2012-08-16 HIRAOKA Kazuyuki + + * configure.in: version 1.4.0 + +2012-02-18 HIRAOKA Kazuyuki + + * configure.in: version 1.4.0rc2 + + * howm-misc.el + (howm-auto-mode): fix. + inhibit-first-line-modes-regexps and inhibit-first-line-modes-suffixes + are obsolete in emacs-24. + thx > Sasaki Kan san (sasaki at fcc.ad.jp) + thx > dareka 2012-02-12, 2012-02-17 + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReportPaste + (howm-if-unbound): ditto. + +2012-01-01 HIRAOKA Kazuyuki + + * howm.el: update copyright years + +2011-12-28 HIRAOKA Kazuyuki + + * configure.in: version 1.4.0rc1 + + * howm.el: avoid warnings about mapcar during byte-compilation. + + * howm-view.el (howm-entitle-items-style1): ditto. + + * howm-misc.el (howm-bug-report): ditto. + + * honest-report.el (honest-report): ditto. + + * howm-cl.el (howm-cl-mapcar*): avoid warnings about cl package + during byte-compilation. + + * howm-common.el (howm-call-process*): ditto. + + * howm-date.el (howm-datestr-expand-general): ditto. + + * howm-reminder.el (howm-define-reminder): ditto. + +2011-08-23 HIRAOKA Kazuyuki + + * riffle.el (riffle-pop-to-buffer): fix. + windows were split recursively if frame size is large. + thx > dareka + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReportPaste + +2011-03-20 HIRAOKA Kazuyuki + + * configure.in: test version + +2011-03-11 HIRAOKA Kazuyuki + + * configure.in: fix warning "suspicious cache-id" in autoconf. + +2011-03-10 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-vars.el (howm-view-grep-default-option): + check availability of "--exclude-dir". + It requires grep >= 2.5.3, whereas popular Macs are shipped with 2.5.1. + thx > http://hibari.2ch.net/test/read.cgi/unix/1141892764/787-790n + thx > http://hibari.2ch.net/test/read.cgi/unix/1141892764/898-901n + +2011-01-19 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-menu.el + (howm-menu-recent): change arguments for broader customization. + thx > http://hibari.2ch.net/test/read.cgi/unix/1141892764/890 + (howm-menu-random): ditto. + (howm-recent-menu): ditto. + + * howm-backend.el (howm-page-viewer:file): + howm-view-external-viewer-assoc works even for directories now. + thx > http://hibari.2ch.net/test/read.cgi/unix/1141892764/891 + +2011-01-14 HIRAOKA Kazuyuki + + * configure.in: test version + +2011-01-13 HIRAOKA Kazuyuki + + * howm-vars.el (howm-define-risky-command): + avoid old-style-backquotes warning when *.elc is loaded. + thx > dareka + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReportPaste + +2011-01-06 HIRAOKA Kazuyuki + + * howm-vars.el (howm-view-grep-option): cancel howm-efficiency group + because howm-grep group is already placed under it. + +2011-01-03 HIRAOKA Kazuyuki + + * howm-mode.el (howm-initialize-buffer): use howm-funcall-if-defined. + + * riffle.el (riffle-summary-mode): ditto. + +2011-01-02 HIRAOKA Kazuyuki + + * howm-backend.el: delete rast. + +2011-01-02 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-mode.el (howm-initialize-buffer): fix. + make-local-hook does not exist in emacs-24.0.50. + thx > Yamamoto Munehiro san (munepi at vinelinux.org) + + * riffle.el (riffle-summary-mode): ditto. + +2011-01-01 HIRAOKA Kazuyuki + + * howm-vars.el + (howm-list-buffers-exclude): officially supported now. + (howm-remember-first-line-to-title): ditto. + (howm-occur-force-fake-grep): ditto. change default value. + + * howm-backend.el (howm-list-buffers,howm-list-mark-ring,howm-occur): + add docstring. + + * howm-mode.el (howm-default-key-table): support new commands. + + * howm-lang-en.el (howm-menu-command-table-en): ditto. + + * howm-lang-ja.el (howm-menu-command-table-ja): ditto. + + * howm-view.el (howm-view-directory,howm-ruby-mode-bug): + delete obsolete workaround + + * howm-vars.el + (howm-action-lock-forward-fuzziness): update customize group + (howm-congrats-command): ditto. + + * howm-reminder.el (howm-highlight-date-regexp-format): ditto. + +2011-01-01 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-view.el (howm-view-change-title): fix error at howm-list-all + + * howm.el: update copyright years + +2010-12-31 HIRAOKA Kazuyuki + + * howm-vars.el + (howm-menu-reminder-separators): officially supported now. + (howm-todo-separators,howm-reminder-menu-types): ditto. + (howm-schedule-sort-by-time,howm-action-lock-forward-fuzziness): ditto. + (howm-process-coding-system): ditto. + + * howm-view.el (howm-view-search-in-result-correctly): ditto. + +2010-12-31 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-vars.el + (howm-compatible-to-1.3): new option + (howm-compatibility): new customize group + (howm-file-name-format): add switch for compatibility. + change *.howm to *.txt. + + * howm-mode.el (howm-normalizer-pair): care for typically wrong setting. + thx > http://hibari.2ch.net/test/read.cgi/unix/1141892764/865-870n + +2010-12-30 HIRAOKA Kazuyuki + + * configure.in: version 1.3.9 + +2010-12-29 HIRAOKA Kazuyuki + + * configure.in: version 1.3.9rc1 + +2010-07-02 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-reminder.el (howm-list-schedule): fix. + contents buffer was not updated if this function was called + from menu. + thx > http://pc12.2ch.net/test/read.cgi/unix/1141892764/826 + +2010-05-05 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm.el: update copyright years + + * howm-menu.el + (howm-menu-search): add new options for formatter and regexp search. + thx > Morgan Veyret san (morgan.veyret at gmail.com) + http://sourceforge.jp/projects/howm/lists/archive/eng/2010/000097.html + (howm-menu-general): add a new formatter to show full text. + (howm-menu-format-full): ditto. + (howm-menu-invoke): + open item when RET is hit in menu if howm-menu-list-item + property is given at the current point. + +2009-12-31 HIRAOKA Kazuyuki + + * configure.in: version 1.3.8 + +2009-08-08 HIRAOKA Kazuyuki + + * howm-vars.el (howm-excluded-dirs): add ".git". + +2009-07-23 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-mode.el (howm-keyword-search-subr): fix. + howm-list-title was ignored for come-from links. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/762 + +2009-06-08 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-reminder.el (howm-reminder-font-lock-keywords): + highlight late deadlines. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/738 + +2009-06-01 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-backend.el (howm-real-grep-multi): fix. + howm-list-recent caused error "Can't exec program" or + "Spawning child process: exec format error" if howm-view-use-grep + is set and there are too many recently-changed files. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/733 + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?Windows + + * howm-vars.el (howm-command-length-limit): new option + +2009-05-30 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-view.el + (howm-filter-items-by-contents): + splitted from howm-view-remove-by-contents for functional style. + it will be used in + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?HidePrivateReminder + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/731 + (howm-entitle-items-style1): use howm-view-search-folder-fi. + (howm-item-list-filter): ditto. + +2009-05-22 HIRAOKA Kazuyuki + + * riffle.el (riffle-line-number): widen before counting. + +2009-05-02 HIRAOKA Kazuyuki + + * configure.in: test version + update automake + + * howm-vars.el + (howm-excluded-dirs): exclude _darcs/ etc. by default. + (howm-view-grep-default-option): ditto. + +2009-03-26 HIRAOKA Kazuyuki + + * configure.in: test version + +2009-03-21 HIRAOKA Kazuyuki + + * howm-backend.el (howm-real-grep-multi, howm-real-grep-single): + remove final slash for compatibility with yagrep. + http://www.kt.rim.or.jp/~kbk/yagrep/index.html + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/685-686n + + * howm-common.el (howm-expand-file-names): ditto. + +2009-02-05 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm.el: update copyright years + + * howm-reminder.el (howm-extend-deadlines): new command. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/671 + + * howm-menu.el (howm-menu-refresh-background): fix. + The main function was erased wrongly on 2006-03-11. + +2008-12-31 HIRAOKA Kazuyuki + + * configure.in: version 1.3.7 + + * howm-misc.el (howm-basic-save-buffer): fix. + inhibit "Wrote ..." message. + +2008-11-05 HIRAOKA Kazuyuki + + * configure.in: version 1.3.7rc4 + + * howm-view.el (howm-view-summary-item): fix. + use full path for equivalence check + thx > dareka + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReportPaste + +2008-10-07 HIRAOKA Kazuyuki + + * configure.in: version 1.3.7rc3 + + * riffle.el (riffle-summary-update): + cancel fix on 2008-09-23, and remove corresponding feature itself. + This special feature was broken from howm-1.2 to 1.3.7rc2, + and I received no bug report. + +2008-09-23 HIRAOKA Kazuyuki + + * riffle.el (riffle-summary-update): fix. + behavior was wrong when howm-view-split-horizontally is + neither t nor nil. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/591 + +2008-09-02 HIRAOKA Kazuyuki + + * howm-misc.el (howm-configuration-for-major-mode): + modify sample for "defun*" + +2008-08-27 HIRAOKA Kazuyuki + + * configure.in: version 1.3.7rc2 + + * howm-menu.el (howm-recent-menu): + select only one item from each file in random selection. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/563-566n + + * howm-misc.el (howm-bug-report): use howm-cl-mapcan instead of mapcan + + * howm-view.el (howm-entitle-items-style2): ditto. + +2008-08-11 HIRAOKA Kazuyuki + + * configure.in: version 1.3.7rc1 + +2008-08-09 HIRAOKA Kazuyuki + + * howm-vars.el (howm-normalizer): + use original names instead of aliases + +2008-08-05 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-reminder.el (howm-reminder-menu): fix. + first argument was not used, and some items were dropped + in howm-menu-categorized-reminder. + thx > taka-san + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReportPaste + +2008-07-25 HIRAOKA Kazuyuki + + * configure.in: test version + +2008-07-24 HIRAOKA Kazuyuki + + * howm-mode.el (howm-keyword-search-subr): + howm-view-item-list was remained wrongly + + * howm-reminder.el (howm-list-todo-sub): ditto. + + * configure.in: test version + + * howm-view.el (howm-entitle-items-style1): fix. + titleless items were not shown + + * howm-view.el (howm-entitle-items-style2): fix error. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/552 + + * howm-mode.el + (howm-call-view-summary): added for manipulation of titles + (howm-list-title-clear-previous): ditto. + + * howm-backend.el (howm-item-dup): ditto. + +2008-07-16 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-mode.el + (howm-all-items): splitted and renamed from howm-list-all + (howm-list-around): rewritten in functional style + +2008-07-15 HIRAOKA Kazuyuki + + * howm-view.el (howm-filter-items): + renamed from howm-view-filter-internal + (howm-filter-items-uniq, howm-filter-items-by-name) + (howm-filter-items-by-summary, howm-filter-items-by-name/summary) + (howm-filter-items-by-date, howm-filter-items-by-reminder) + (howm-filter-items-by-mtime): ditto. + (howm-entitle-items): + renamed from howm-view-list-title-internal + (howm-entitle-items-style1, howm-entitle-items-style2): ditto. + (howm-entitle-items-style1): return value is changed + (howm-sort-items): + renamed from howm-view-sort-internal + (howm-sort-items-by-random, howm-sort-items-by-name) + (howm-sort-items-by-numerical-name, howm-sort-items-by-date) + (howm-sort-items-by-reverse-date, howm-sort-items-by-summary) + (howm-sort-items-by-reminder, howm-sort-items-by-mtime) + (howm-sort-items-by-reverse): ditto. + (howm-view-lift-internal): avoid simple variable name for safety + + * howm-backend.el (howm-view-directory-items): + use howm-folder-items insteadly. + +2008-07-14 HIRAOKA Kazuyuki + + * configure.in: test version + +2008-07-12 HIRAOKA Kazuyuki + + * howm-mode.el + (howm-search): add argument + (howm-list-related): simplified + + * howm-vars.el (howm-view-use-grep): fix docstring + + * howm-mode.el (howm-call-view-search): removed + +2008-07-11 HIRAOKA Kazuyuki + + * howm-common.el (howm-view-in-background): don't use it in principle + + * howm-reminder.el (howm-reminder-add-font-lock): splitted + + * howm-misc.el (howm-mode-add-font-lock): ditto. + + * howm-view.el (howm-view-summary,howm-view-summary-rebuild): + add optional argument for font-lock + + * howm-mode.el (howm-search,howm-keyword-search-subr): + don't use *howm-view-font-lock-keywords* outside howm-view.el + + * action-lock.el: untabify + + * howm-view.el (howm-view-search-folder): splitted + + * howm-mode.el + (howm-list-normalize, howm-normalizer-pair, howm-normalize-oldp): + warn if howm-list-normalizer is set. + convert howm-list-normalizer to howm-normalizer if possible. + (howm-normalize-show): replace howm-list-normalize + + * howm-mode.el (howm-list-all, howm-list-recent, howm-search): + use howm-normalize-show + + * howm-backend.el (howm-open-directory-independently): ditto. + +2008-07-10 HIRAOKA Kazuyuki + + * howm-vars.el + (howm-normalizer): new option + (howm-list-normalizer): default is changed to nil + + * howm-mode.el + (howm-list-normalize): switch new or old codes + (howm-normalize): rewrite howm-list-normalize in functional style + (howm-list-normalize-old): renamed from howm-list-normalize. use prog1. + (howm-list-title-put-previous): add optional argument + + * howm-view.el + (howm-view-list-title-internal): split howm-view-list-title function + (howm-view-list-title1-internal): ditto. + (howm-view-list-title2-internal): ditto. + + * howm-mode.el + (howm-default-key-table): update docstring + (howm-migemo-client): add docstring + (howm-mode): remove useless backquote + + * howm.el: update copyright years + +2008-05-31 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-vars.el (howm-action-lock-forward-fuzziness): new option. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/519 + * howm-reminder.el (howm-action-lock-forward-modify-current-line): + ditto. + +2008-05-24 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-view.el (howm-view-filter-general): fix. predicate was reversed. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/514 + +2008-05-23 HIRAOKA Kazuyuki + + * configure.in: test version + + * riffle.el + (riffle-keep-window): new option. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/507 + (riffle-summary-subr): check riffle-keep-window. + (riffle-post-command): ditto. + (riffle-summary-to-contents): ditto. + (riffle-pop-to-buffer): ditto. + (riffle-refresh-window-configuration): ditto. + + * howm-date.el (howm-date-forward-ymd): don't call riffle directly. + + * riffle.el (riffle-summary-update): use catch & throw. + +2008-05-21 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-view.el (howm-view-filter-general): fix. revived for howmoney. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/503 + +2008-05-14 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-backend.el + (howm-real-grep-single): use labels instead of flet. + (howm-real-grep-multi): ditto. + + * howm-misc.el (howm-basic-save-buffer): ditto. + + * howm-mode.el (howm-expand-aliases-recursively): ditto. + + * howm-common.el (howm-with-exit): new macro for the below fix. + + * howm-reminder.el + (howm-list-schedule): fix. + cancel postprocess if no-match. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/494 + (howm-list-todo-sub): ditto. + (howm-list-reminder-final-setup): fix. + action-lock-mode was toggled unintentionally. + + * howm-common.el + (howm-list-exclude): removed (unused) + (howm-item-exclude-p): ditto. + (howm-view-item-exclude-p): ditto. + +2008-05-13 HIRAOKA Kazuyuki + + * howm-view.el + (howm-view-summary-mode): fix. + global value of font-lock-keywords-only was set wrongly + in CVS head emacs after 2008-02-24. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/484-487n + (howm-view-contents-mode): ditto. + + * howm-menu.el (howm-menu-set-face): unify the style (no effect) + +2008-04-21 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-backend.el (howm-real-grep-multi): + split howm-view-grep-option. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/458 + +2008-04-14 HIRAOKA Kazuyuki + + * howm-view.el (howm-view-title-skip-regexp): + use howm-view-title-header. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/454 + +2008-04-11 HIRAOKA Kazuyuki + + * howm-view.el (howm-view-dired): call howm-view-dired-goto by default. + + * howm-vars.el (howm-view-dired-keep-cursor): removed. + +2008-04-06 HIRAOKA Kazuyuki + + * howm-misc.el (howm-test): add docstring. + thx > dareka + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReport + +2007-11-07 HIRAOKA Kazuyuki + + * configure.in: test version + +2007-11-06 HIRAOKA Kazuyuki + + * howm-common.el (howm-decode-time): + fix. + today's schedule didn't appear on menu on the last day of DST. + thx > Mielke-san (peter.mielke at gmail.com) + http://lists.sourceforge.jp/mailman/archives/howm-eng/2007/000034.html + +2007-07-15 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-view.el (howm-view-sort/filter-doit): fix. + return list of items for backward compatibility. + thx > taku-san + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?HidePrivateReminder + +2007-05-28 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-view.el (howm-view-summary-next-section-sub): + stop at the first hit line of each file. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/360 + +2007-05-18 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm.el: manage circular dependencies + + * elisp-comp: cancel the fix on 2007-05-05 + + * honest-report.el + (honest-report-version-assoc): be independent of howm-* + (honest-report-emacs-build-time): ditto. + howm-emacs-build-time is moved and renamed. + +2007-05-05 HIRAOKA Kazuyuki + + * configure.in: test version + + * mkinstalldirs: update to automake-1.10 + + * missing: ditto. + + * install-sh: ditto. + + * elisp-comp: ditto. & fix (keep the order of arguments) + + * config.guess: update to autotools-dev_20060702 + + * config.sub: ditto. + + * acinclude.m4: fix for aclocal 1.10 + + * Makefile.am: ditto. + +2007-05-01 HIRAOKA Kazuyuki + + * howm-menu.el + (howm-menu-reminder-format): new option. + (howm-menu-list-format): columnar formatting + thx > Mielke-san (peter.mielke at gmail.com) + http://lists.sourceforge.jp/mailman/archives/howm-eng/2007/000032.html + +2007-04-13 HIRAOKA Kazuyuki + + * configure.in: test version + +2007-04-12 HIRAOKA Kazuyuki + + * howm-view.el (howm-view-summary-mode): fix. + summary buffer was not highlighted in howm-occur. + + * howm-backend.el (howm-occur-force-fake-grep): new option. + + * howm-view.el (howm-view-search-folder): + check FIXED-P for highlighting + + * configure.in: test version + +2007-04-11 HIRAOKA Kazuyuki + + * howm-mode.el (howm-read-aliases): fix. + RET on "BBB" in "<<< aaa <<< BBB" didn't search "aaa" + if howm-keyword-case-fold-search is non-nil. + +2007-04-06 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-view.el + (howm-view-filter-by-mtime): fix. range was ignored. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/340 + (howm-view-filter-by-time-range): ditto. + +2007-04-03 HIRAOKA Kazuyuki + + * howm-misc.el (howm-truncate-string): fix. correct docstring + +2007-04-02 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-view.el (howm-view-sort-by-random-internal): fix. + wrong variable name + + * configure.in: test version (canceled) + + * howm-view.el (howm-view-defun-sort-by): use macro to define sort-by-X + +2007-04-01 HIRAOKA Kazuyuki + + * configure.in: private test version + + * howm-reminder.el (howm-schedule-sort-items): wrongly interactive + + * howm-view.el + (howm-view-mtime): remove howm-view-xtime + (howm-view-filter-by-mtime): ditto. + (howm-view-sort-by-mtime): ditto. + (howm-view-filter-general): remove with-index + (howm-view-filter-internal): ditto. + (howm-view-sort-by-name-match): renamed to howm-view-lift-by-* + (howm-view-sort-by-summary-match): ditto. + (howm-view-sort-by-summary-match-string): ditto. + (howm-view-filter-general): removed for more functional style + (howm-view-sort-general): ditto. + (howm-view-sort-by-general-match): ditto. + (howm-view-filter-by-date-internal): fix. limit date was wrong by one + (howm-view-filter-by-reminder-internal): ditto. + (howm-view-filter-by-mtime-internal): ditto. + + * howm-reminder.el (howm-list-reminder-final-setup): fix. + schedule/todo list was not fontified. + (howm-list-schedule): defer setup of summary buffer for efficiency. + (howm-list-todo-sub): ditto. + + * howm-view.el + (howm-view-filter-by-date-internal): fix. + 03-16 was listed when limit is "to 03-15". + (howm-view-filter-by-reminder-internal): ditto. + (howm-view-filter-by-xtime): ditto. + + * configure.in: private test version + +2007-03-30 HIRAOKA Kazuyuki + + * howm-vars.el (howm-view-contents-limit): fix. not used. + also change its default from 10000 to nil for backward compatibility. + + * howm-mode.el + (howm-list-toggle-title): fix. + internal calls to howm-list-title shouldn't perform toggle. + (howm-keyword-search-subr): + defer setup of summary buffer for efficiency. + + * howm-cl.el (howm-cl-remove-duplicates*): fix. + "<<< foo" didn't appear at the top of the summary buffer + when howm-list-title is T. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/328 + + * howm-misc.el (howm-buffer-name-format): new option. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/333 + +2007-03-26 HIRAOKA Kazuyuki + + * configure.in: test version + +2007-03-22 HIRAOKA Kazuyuki + + * howm-view.el (howm-view-contents-item): + don't insert separator "====>>> xxx.howm" in contents buffer + if just one item is displayed. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/314 + +2007-02-24 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-vars.el (howm-check-word-break): new option. + thx > Mielke-san (peter.mielke at gmail.com) + http://lists.sourceforge.jp/mailman/archives/howm-eng/2007/000030.html + + * howm-view.el (howm-view-summary-mode): + highlight today and tomorrow. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/275 + + * howm-menu.el (howm-menu-font-lock-rules): ditto. + + * howm-reminder.el (howm-highlight-date-regexp-format): + change default. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/275 + + * howm-vars.el (howm-funcall-if-defined): fix docstring + + * howm.el: update copyright years + +2007-02-15 HIRAOKA Kazuyuki + + * honest-report.el (honest-report-version-assoc): + report environment variables "LANG" etc. + +2006-12-31 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-reminder.el (howm-reminder-summarizer): + show "late days" in addition to "day of week". + thx > Mielke-san (peter.mielke at gmail.com) + http://lists.sourceforge.jp/mailman/archives/howm-eng/2006/000028.html + +2006-12-18 HIRAOKA Kazuyuki + + * howm-mode.el (howm-keyword-search-open-menu): + show warning when two or more %menu% are found. + + * howm-view.el (howm-view-sort-by-general-match): + return single/multi/nil instead of conventional t/nil. + +2006-12-16 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm.el: security fix. + put risky-local-variable property + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/207 + + * configure.in: version 1.3.4 is released from another branch + +2006-12-10 HIRAOKA Kazuyuki + + * configure.in: private test version + + * howm-vars.el + (howm-define-risky-command): put risky-local-variable property + + * riffle.el: ditto. + + * illusion.el: ditto. + + * gfunc.el: ditto. + + * action-lock.el: ditto. + + * howm-cl.el (howm-cl-gensym): added. + + * howm-misc.el (howm-required-features): add honest-report + + * riffle.el (riffle-set-mode-maybe): removed (not used anywhere) + + * howm-mode.el + (howm-keyword-aliases): fix. check howm-keyword-case-fold-search. + (howm-template-string): fix. accept (lambda ...) as howm-template. + +2006-11-21 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-common.el + (howm-log-buffer-name-format): added + (howm-write-log): rename buffer according to howm-log-buffer-name-format + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/193-194n + (howm-history): raise error if history file doesn't exist. + + * howm-backend.el + (howm-keyword-buffer): + force howm-keyword-buffer-name-format even for the normal case. + (howm-keyword-buffer-name): removed + (howm-get-keyword-buffer): removed + + * howm-common.el (howm-get-buffer-for-file): added + + * howm-misc.el (howm-basic-save-buffer): + doesn't show "Wrote..." message any more. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/193-194n + +2006-10-27 HIRAOKA Kazuyuki + + * howm-common.el (howm-message-nolog): message without logging + + * howm-view.el (riffle-post-update:howm): ditto. + +2006-10-25 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-backend.el + (howm-get-keyword-buffer): fix: argument is not optional any more. + (howm-keyword-buffer-name): new option. + (howm-keyword-buffer): buffer-name is now customizable. + +2006-10-15 HIRAOKA Kazuyuki + + * configure.in: test version + + * cheat-font-lock.el (cheat-font-lock-20040624-format-p): fix. + font-lock-compile-keywords may add a help-echo + in CVS-head emacs, and its result can be longer than expected. + see 2005-10-21 in lisp/ChangeLog. + http://lists.gnu.org/archive/html/emacs-commit/2005-10/msg00635.html + http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/lisp/font-lock.el.diff?tr1=1.276&tr2=1.277&r1=text&r2=text + +2006-10-03 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-backend.el (howm-page-open:file): fix. need widen. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/160-161n + +2006-09-12 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-reminder.el (howm-todo-priority-schedule-bottom): make it deeper + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/149 + + * howm-vars.el (howm-huge++): new parameter + +2006-09-10 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-version.el.in: remove howm-{en,ja}-dir + + * howm-lang-ja.el (howm-day-of-week-ja): Use a list instead of a string. + + * howm-lang-en.el (howm-day-of-week-en): ditto. + Use "Sun" instead of "S". + + * howm-menu.el (howm-day-of-week-string): + howm-day-of-week-{en,ja} can be a list. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/147 + +2006-07-26 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-menu.el (howm-menu-list-regexp): fix. + RET at "7" in "> 2006-07-26-015606 |" in menu buffer caused error. + thx > na-san + +2006-06-28 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-misc.el (howm-bayesian-set): new command. + +2006-06-27 HIRAOKA Kazuyuki + + * howm-mode.el (howm-expand-aliases-recursively): + CL function "copy-list" is replaced with built-in "copy-sequence". + + * howm-menu.el (howm-menu-shortcut-sort): ditto. + +2006-06-26 HIRAOKA Kazuyuki + + * howm-reminder.el (howm-list-active-todo): new command. + + * howm-view.el (howm-view-sort-by-summary-match-string): new feature. + + * howm-misc.el (howm-mode-set-buffer-name): new tool. + thx > Mielke-san (peter at exegenix.com) + http://lists.sourceforge.jp/mailman/archives/howm-eng/2006/000020.html + http://lists.sourceforge.jp/mailman/archives/howm-eng/2006/000022.html + thx > anonymous + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?ExternalTool + + * howm-vars.el (howm-menu-reminder-separators): fix. + "Between schedule and todo" corresponds to nil. + + * howm-reminder.el (howm-todo-separators): new option. + + * howm-backend.el + (howm-page-type): page can be nil. + (howm-make-page:nil): ditto. + (howm-item-page): ditto. + + * howm-reminder.el (howm-todo-insert-separators): + use nil-page item instead of string. + + * howm-menu.el (howm-menu-format-todo): ditto. + +2006-06-10 HIRAOKA Kazuyuki + + * COPYING: fix. + obsolete address of FSF is corrected. + thx > Fujimura Yuki san + +2006-06-05 HIRAOKA Kazuyuki + + * configure.in: version 1.3.3 + +2006-05-20 HIRAOKA Kazuyuki + + * configure.in: version 1.3.3rc1 + +2006-05-15 HIRAOKA Kazuyuki + + * configure.in: test version + +2006-05-13 HIRAOKA Kazuyuki + + * howm-common.el (howm-with-coding-system): + accept a pair (for-read . for-write). + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/96 + + * howm-vars.el (howm-process-coding-system): ditto. + +2006-05-09 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-common.el (howm-with-coding-system): fix. + howm-process-coding-system should be checked at runtime. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/94-95n + +2006-05-02 HIRAOKA Kazuyuki + + * configure.in: test version + +2006-05-01 HIRAOKA Kazuyuki + + * howm-misc.el (howm-remember-get-title): fix. + remove newline from title string. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/92 + +2006-04-29 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-misc.el (howm-remember-first-line-to-title): new option. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/72-75n + + * howm-common.el (howm-call-process): fix. + set coding-system for temporary buffer. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/63-83n + +2006-04-23 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-misc.el (howm-remember-submit): fix. + "%file" in howm-template now works even for howm-remember. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/61 + +2006-03-25 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-misc.el (howm-remember): new command. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/24-25n + +2006-03-22 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-view.el (howm-view-list-title-type): + experimental code to show title before summary of each item. + thx > Highfly san + http://lists.sourceforge.jp/mailman/archives/howm-eng/2006/000025.html + +2006-03-21 HIRAOKA Kazuyuki + + * illusion.el: require easy-mmode explicitly + + * honest-report.el (honest-report-window-list): + support emacs20 (and meadow-1.15). + +2006-03-12 HIRAOKA Kazuyuki + + * configure.in: test version + +2006-03-11 HIRAOKA Kazuyuki + + * howm-mode.el (howm-migemo-client-option): new option. + thx > http://pc11.2ch.net/test/read.cgi/unix/1141892764/9 + +2006-02-04 HIRAOKA Kazuyuki + + * configure.in: test version + +2006-02-02 HIRAOKA Kazuyuki + + * howm.el: fix. + howmz needs both howm-menu-command-table-{en,ja}. + + * configure.in: test version + + * howm.el: fix. + require howm-lang-* before it is really needed. + this may be necessary for howmz. + thx > (TxT) san + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?LinuxZaurus + http://noir.s7.xrea.com/archives/000136.html + +2006-01-23 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-menu.el (howm-menu-categorized-reminder): + howm-menu-categorized-todo is replaced with -reminder. + fix error when howm-menu-reminder-separators is not null. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/919 + +2006-01-19 HIRAOKA Kazuyuki + + * configure.in: test version + +2006-01-18 HIRAOKA Kazuyuki + + * howm-backend.el (howm-page-viewer:file): + list files in directory in contents buffer. + +2006-01-17 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-menu.el (howm-menu-categorized-todo): + misc. can be omitted. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/909 + +2006-01-16 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-menu.el (howm-menu-categorized-todo): new feature (experimental). + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/885 + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/890 + + * howm-cl.el (howm-cl-find-if): added + + * howm-backend.el (howm-folder-grep-internal:pages): cleaned. + + * howm-menu.el (howm-menu-general): cleaned. + you can make your own list in menu buffer more easily. + see howm-menu-schedule, howm-menu-todo, howm-menu-recent, and + howm-menu-search for example. + +2006-01-10 HIRAOKA Kazuyuki + + * howm-misc.el (howm-buffer-p): fix. + .howm-keys and its alternatives were overlooked. + thx > http://d.hatena.ne.jp/dasm/20060110 + +2006-01-07 HIRAOKA Kazuyuki + + * configure.in: test version + +2006-01-06 HIRAOKA Kazuyuki + + * howm.el: update copyright years + + * cheat-font-lock.el (cheat-font-lock-20040624-format-p): fix. + avoid "Font-lock trying to use keywords before setting them up" error + during 'make' for emacs-22.0.50.1 (CVS version). + thx > http://tty0.exblog.jp/2944244 + thx > http://d.hatena.ne.jp/yoshk/20060102 + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/867 + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/873-874n + +2005-12-17 HIRAOKA Kazuyuki + + * howm-vars.el (howm-custom-reminder-get-types): fix. + treat unknown marks correctly. + + * howm-reminder.el (howm-modify-reminder-types): + example is commented out. + +2005-12-10 HIRAOKA Kazuyuki + + * configure.in: test version + (packagedir): fix lispdir for xemacs with packagedir + +2005-12-09 HIRAOKA Kazuyuki + + * configure.in: endir and jadir are now obsolete. + --with-rel-datadir is canceled. + thx > HONJOH Eiji san. irodori@irodori.sakura.ne.jp + thx > ZENITANI Seiji san. zenitani@mac.com + + * howm-menu.el (howm-menu-initialize-skel): ditto. + read howm-menu-*.el instead of {en,ja}/0000-00-00-000000.howm + + * howm-mkmenu.el: ditto. + new script to make howm-menu-*.el from {en,ja}/0000-00-00-000000.howm + + * Makefile.am: ditto. + add howm-menu-*.el. delete en/ and ja/. + + * howm-lang-en.el: separate language-dependent variables + + * howm-lang-ja.el: ditto. + + * howm-menu.el (howm-lang-ref): ditto. + + * howm-common.el (howm-get-symbol): ditto. + + * Makefile.am (howm_LISP): ditto. + +2005-12-02 HIRAOKA Kazuyuki + + * configure.in: new option --with-howmdir + default lispdir is now .../site-lisp. + thx > HONJOH Eiji san. irodori@irodori.sakura.ne.jp + + * Makefile.am (howm_LISP): ditto. + + * acinclude.m4 (ac_output): ditto. + + * bcomp.el.in (bcomp-files): ditto. + +2005-11-30 HIRAOKA Kazuyuki + + * configure.in: test version + + * configure.in: new option --with-rel-datadir + previous --with-data-into-lispdir is canceled. + thx > ZENITANI Seiji san. zenitani@mac.com + thx > HONJOH Eiji san. irodori@irodori.sakura.ne.jp + +2005-11-29 HIRAOKA Kazuyuki + + * configure.in: test version + + * configure.in: new option --with-data-into-lispdir + thx > HONJOH Eiji san. irodori@irodori.sakura.ne.jp + +2005-11-27 HIRAOKA Kazuyuki + + * howm-vars.el (howm-mode-off-hook): fix. + remove duplicated defcustom. + thx > TAKEMURA Masayuki san. ICG04984@nifty.com + +2005-11-26 HIRAOKA Kazuyuki + + * howm-menu.el (howm-menu-skel): + - use symbol-value instead of eval. + - howm-en-dir and howm-ja-dir can be relative paths from the directory + of howm.elc or howm.el. (for Carbon emacs package) + thx > ZENITANI Seiji san. zenitani@mac.com + thx > HONJOH Eiji san. irodori@irodori.sakura.ne.jp + thx > ARAI Ryotaro san. misty@... + http://lists.sourceforge.jp/mailman/archives/macemacsjp-users/2005-November/000756.html + http://lists.sourceforge.jp/mailman/archives/macemacsjp-users/2005-November/000760.html + +2005-11-22 HIRAOKA Kazuyuki + + * howm-vars.el (howm-menu-todo-priority): change default. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/75-77n + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/842-846n + +2005-11-12 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-misc.el (howm-open-named-file): new command. + thx > Eduardo Ochs san + http://lists.sourceforge.jp/mailman/archives/howm-eng/2005/000010.html + +2005-11-11 HIRAOKA Kazuyuki + + * howm-reminder.el (howm-action-lock-forward-open): + don't depend on magic-return. + + * howm-date.el (howm-action-lock-date-search): + now it works even on menu buffer. + thx > Kaneko Kensuke san + http://d.hatena.ne.jp/a666666/20051110/1131621183 + + * howm-reminder.el (howm-action-lock-forward): + keep my text property for jump from menu. + + * howm-menu.el (howm-menu-list-action): + keyword is now optional. + + * howm-date.el (howm-action-lock-date-prompt): + misleading message is corrected. + thx > Kaneko Kensuke san + http://d.hatena.ne.jp/a666666/20051110/1131621183 + +2005-11-06 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-menu.el (howm-menu-list-action): fix. + history list was broken. + +2005-11-05 HIRAOKA Kazuyuki + + * howm-menu.el (howm-menu-list-action): + get text property not from buffer but from argument. + + * action-lock.el (action-lock-general): + keep text properties. + + * howm-common.el (howm-history): + disable expansion of %schedule etc. + + * configure.in: test version + +2005-11-04 HIRAOKA Kazuyuki + + * howm-common.el (howm-replace-region): + `format' in xemacs doesn't keep text properties. + + * howm-menu.el (howm-menu-list-format): + store item to text property so that we can open it directly + instead of searching text when RET is hit on ">" in menu buffer. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/823 + + * action-lock.el (action-lock-general): add docstring + + * configure.in: version 1.3.2 + + * howm-mode.el (howm-keyword-search-subr): + cancel the below change. this problem should be fixed + more fundamentally. + + * howm-mode.el (howm-keyword-search-subr): + search lines whose entire texts exactly match to the geven keyword + when open-unique-p is non-nil. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/823 + +2005-10-27 HIRAOKA Kazuyuki + + * configure.in: version 1.3.2rc4 + +2005-10-25 HIRAOKA Kazuyuki + + * howm-vars.el (howm-view-dired-keep-cursor): new option. + thx > 797 http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReport + +2005-10-24 HIRAOKA Kazuyuki + + * configure.in: version 1.3.2rc3 + something was wrong in 'cvs commit' of rc2. + +2005-10-20 HIRAOKA Kazuyuki + + * configure.in: version 1.3.2rc2 + + * howm-view.el + (howm-view-dired): fix. + require dired-vir for xemacs, and remove duplicates. + thx > 797 http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReport + +2005-10-16 HIRAOKA Kazuyuki + + * configure.in: version 1.3.2rc1 + +2005-10-15 HIRAOKA Kazuyuki + + * howm-common.el (howm-read-event): fix. + error when RET is hit on date format [2005-10-15] in menu buffer + in xemacs. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/797-801n + +2005-10-08 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-common.el (howm-view-in-background): fix. + This macro is moved from howm-view.el because it is used across files. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/789-791n + +2005-09-30 HIRAOKA Kazuyuki + + * configure.in: test version + +2005-09-27 HIRAOKA Kazuyuki + + * howm-backend.el (howm-occur): new command + +2005-09-26 HIRAOKA Kazuyuki + + * howm-vars.el (howm-view-contents-limit): default is changed to 10000 + +2005-09-07 HIRAOKA Kazuyuki + + * action-lock.el + (action-lock-open-regexp): include / at the end + (action-lock-browse-regexp): ditto + +2005-09-06 HIRAOKA Kazuyuki + + * configure.in: test version + + * honest-report.el (honest-report-screenshot): fix. + window-end (without update) can be negative when completion window + is displayed temporally. + +2005-09-05 HIRAOKA Kazuyuki + + * howm-common.el (howm-call-process-here): set coding system + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/784 + + * howm-vars.el (howm-process-coding-system): new option + +2005-09-01 HIRAOKA Kazuyuki + + * howm-backend.el (action-lock-find-file): expand-file-name + thx > hattori-san + http://www.tom.sfc.keio.ac.jp/~hattori/blog/setting/2005/08/howm.html + +2005-08-29 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-vars.el (howm-list-title): add howm-action-lock-date-search + so that title is shown for `howm-search-today' (C-c , , .) by default. + thx > nobu-san + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReport + + * howm-date.el (howm-action-lock-date-search): add `howm-set-command'. + +2005-08-24 HIRAOKA Kazuyuki + + * howm-view.el: add (require 'riffle) + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/782 + +2005-08-17 HIRAOKA Kazuyuki + + * configure.in: version 1.3.1 + +2005-08-13 HIRAOKA Kazuyuki + + * configure.in: version 1.3.1rc1 + + * howm-vars.el (howm-get-locale): fix. never return nil + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/780-781n + +2005-08-12 HIRAOKA Kazuyuki + + * howm-view.el (howm-view-summary-omit-same-name): new option + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/779 + +2005-08-11 HIRAOKA Kazuyuki + + * howm-view.el (howm-view-title-skip-regexp): new option + +2005-08-09 HIRAOKA Kazuyuki + + * howm-misc.el (howm-bug-shot): new command for bug report + +2005-08-08 HIRAOKA Kazuyuki + + * howm-misc.el (howm-bug-report): + call bugshot-version-assoc internally + + * honest-report.el: new tool for better bug report + +2005-08-03 HIRAOKA Kazuyuki + + * configure.in: test version + + * riffle.el (riffle-define-derived-mode): + defined to avoid slow down in xemacs. + +2005-08-02 HIRAOKA Kazuyuki + + * gfunc.el (gfunc-call): recursion is rewritten to loop. + recursion seems remarkably slow in xemacs. + + * configure.in: version 1.3.0 + +2005-07-28 HIRAOKA Kazuyuki + + * configure.in: version 1.3.0rc5 + +2005-07-27 HIRAOKA Kazuyuki + + * howm-view.el + (howm-view-summary-item): + don't show same name repeatedly. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/754 + (howm-view-summary-stripe): canceled. + the above should be better. + (howm-view-contents-mode): fix. + howm-view-summary-font-lock-keywords must not work in contents buffer. + (howm-view-summary-font-lock-keywords): add default. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/754 + + * howm-reminder.el (howm-with-schedule-summary-format): + use this macro and never use howm-view-summary-format directly. + +2005-07-26 HIRAOKA Kazuyuki + + * howm-view.el (howm-view-summary-stripe): new option. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/754 + + * configure.in: version 1.3.0rc4 again. mistake in packaging + +2005-07-25 HIRAOKA Kazuyuki + + * configure.in: version 1.3.0rc4 + + * howm-vars.el (howm-excluded-file-regexp-dir-char): fix. + Both "\" and "/" indicate directory in win. + +2005-07-23 HIRAOKA Kazuyuki + + * howm-common.el (howm-message-time): + Don't hide "No match" message even when howm-message-time is set. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/751 + + * riffle.el (riffle-summary): cleaned. + global varibale *howm-view-summary-nop* is replaced with optional + argument. + "No match" message is moved to howm-view-summary. + +2005-07-16 HIRAOKA Kazuyuki + + * howm-common.el (howm-call-process): + howm-call-process-last-command keeps all arguments + so that we can repeat the last call-process + by (apply #'howm-call-process howm-call-process-last-command). + +2005-07-14 HIRAOKA Kazuyuki + + * howm-vars.el (howm-content-from-region): fix. Labels are corrected. + +2005-07-11 HIRAOKA Kazuyuki + + * configure.in: version 1.3.0rc3 + +2005-07-08 HIRAOKA Kazuyuki + + * howm-menu.el (howm-menu-dynamic-setup): fix. + canceled change in this function on 2005-05-10, + so that underlines appear on come-from keywords + in reminder lines in menu. + +2005-06-26 HIRAOKA Kazuyuki + + * configure.in: version 1.3.0rc2 + +2005-06-25 HIRAOKA Kazuyuki + + * howm-vars.el (howm-menu-lang): + check locale to select default language. + +2005-06-21 HIRAOKA Kazuyuki + + * configure.in: version 1.3.0rc1 + +2005-06-17 HIRAOKA Kazuyuki + + * configure.in: test version + + * riffle.el (riffle-pop-to-buffer): fix. + howm-view-summary-window-size didn't work when it is greater than + half size. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/724 + +2005-06-13 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-mode.el (howm-template-receive-buffer): new option. + By default, previous buffer is also passed to howm-template + when it is a function. + thx > http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?Comment + +2005-06-10 HIRAOKA Kazuyuki + + * configure.in: test version + +2005-06-09 HIRAOKA Kazuyuki + + * howm-cl.el: cl functions are collected to single file + and defalias-ed to inhibit warning during byte-compilation + in emacs-22.0.50.1 (CVS version). + + * howm-misc.el (howm-auto-save-buffers-p): + Inhibit warning 'reference to free variable' + for auto-save-buffers-regexp during byte-compilation + in emacs-22.0.50.1 (CVS version). + +2005-06-08 HIRAOKA Kazuyuki + + * configure.in: test version + +2005-06-07 HIRAOKA Kazuyuki + + * howm-vars.el + (howm-action-lock-forward-kill-buffer): new option. + + * howm-reminder.el (howm-action-lock-forward-invoke): + call undo-boundary before modification. + howm-action-lock-forward-save-buffer shouldn't work when + the corresponding buffer is already modified before this action. + +2005-06-03 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-common.el (howm-time-difference-second): don't omit milliseconds. + I can't remember the reason of omission + and I cancel this change on 2005-03-09. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/709 + + * action-lock.el (action-lock-magic-return): fix. + snatched RET from pobox-newline in pobox-mode. + Indeed, old code snatched all RET wrongly from any modes. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/711 + +2005-06-02 HIRAOKA Kazuyuki + + * configure.in: test version + +2005-06-01 HIRAOKA Kazuyuki + + * howm-vars.el: fix. + write color condition in each defface + to avoid error on monochrome display. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/706 + +2005-05-31 HIRAOKA Kazuyuki + + * configure.in: test version + +2005-05-30 HIRAOKA Kazuyuki + + * howm-reminder.el + (howm-action-lock-forward): fix. + menu buffer was collapsed when one hits RET on "@" + in "[2005-05-30]@ foo" in menu buffer with below setting. + - (setq howm-menu-expiry-hours 2) + - (setq howm-action-lock-forward-save-buffer t) + - (setq howm-menu-refresh-after-save t) ;; this is default + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/705 + (howm-action-lock-forward-invoke): + kill-buffer when current-buffer was newly opened for this procedure. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/705 + +2005-05-29 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-vars.el (howm-funcall-if-defined): + cheat to avoid annoying "not known to be defined" warning + in byte-compilation. + thx > http://pc8.2ch.net/test/read.cgi/unix/1111816102/485 + + * howm-view.el (howm-view-sort-items): + defalias for compatibility. howmz needs it. + http://noir.s7.xrea.com/archives/000136.html + http://noir.s7.xrea.com/pub/zaurus/howmz.el + thx > (TxT) san + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?LinuxZaurus + +2005-05-27 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-reminder.el (howm-todo-menu): fix. + Insertion of separators was wrong. + At least one item was placed between separators regardless of priority. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/703 + +2005-05-25 HIRAOKA Kazuyuki + + * howm-vars.el (howm-action-lock-forward-save-buffer): 'defcustom'ed + +2005-05-24 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-mode.el: fix. + check direct requiring of howm-mode before loading howm-common. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/698 + +2005-05-23 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-vars.el + (howm-menu-list-face): Its default is empty now + so that we can avoid troubles of reverse-video for emacs -nw. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/697 + (howm-reminder-done-face): default is empty for light background + + * howm-mode.el (howm-refresh): C-c , r on menu calls howm-menu-refresh + because howm-initialize-buffer on menu erases all underlines. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/696 + +2005-05-21 HIRAOKA Kazuyuki + + * howm-mode.el (howm-keyword-aliases): + expand aliases of come-from keywords recursively + + * howm-vars.el (howm-keyword-list-alias-sep): + enable aliases of come-from keywords by default + +2005-05-20 HIRAOKA Kazuyuki + + * configure.in: test version + +2005-05-19 HIRAOKA Kazuyuki + + * howm-vars.el (howm-experimental): moved to howm group + + * howm-reminder.el (howm-highlight-date-regexp-format): new option. + Some people like to highlight 2005-05-19 rather than [2005-05-19] + as today, because they use [2005-05-19 20:52]@ for their schedule. + + * configure.in: test version + + * howm-backend.el (howm-folder-territory-p:dir): fix + wrongly returned nil for non-existing file name. + +2005-05-18 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-common.el (howm-first-n): fix. + avoid "Args out of range" error in xemacs. + It happened at %recent in menu when number of note files are small + or empty files exist. + thx > Nanashi-san + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReport + +2005-05-17 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-reminder.el (howm-todo-menu): + remove deep reminders before sorting + + * howm-vars.el (howm-menu-reminder-separators): new option + + * howm-menu.el (howm-menu-todo): item can be a separator string + +2005-05-16 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-mode.el (howm-keyword-search): + menu is searched only in howm-directory + + * howm-menu.el (howm-menu): fix + todo and schedule were searched only in howm-directory + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/685 + + * howm-view.el (howm-view-directory): + set font-lock-keywords only when howm-ruby-mode-bug is non-nil + + * howm-vars.el (howm-user-font-lock-keywords): new option + thx > taku-san + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?Idea + +2005-05-15 HIRAOKA Kazuyuki + + * howm-reminder.el + (howm-schedule-sort-converter): + aware of time part in "[2005-05-15 21:36]@" + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/683 + (howm-schedule-menu): show future schedule one more day + + * configure.in: test version + + * howm-vars.el (howm-after-save-hook): new hook + + * howm-misc.el (howm-set-mode-p): howm-directory can be rast folder + + * howm-backend.el + (howm-create-file): + use howm-folder-get-page-create instead of direct mkdir + (howm-make-folder:rast): rast folder + + * gfunc.el (gfunc-def): set lisp-indent-hook + + * howm-menu.el (howm-menu): + mkdir only when howm-directory is dir folder + so that howm-directory can be any folder. + At now, howm-menu-file should be defined in that case; + howm-menu-initialize-skel assumes dir folder. + +2005-05-14 HIRAOKA Kazuyuki + + * configure.in: test version + + * howm-misc.el (howm-prefix-names): renamed from howm-prex + + * howm-vars.el (howm-prefix): renaming to howm-prefix-key is canceled + +2005-05-13 HIRAOKA Kazuyuki + + * howm-vars.el (howm-excluded-file-regexp): fix: wrong const values + +2005-05-12 HIRAOKA Kazuyuki + + * howm-view.el (howm-item-list-rangeset): add doc-str around this func + +2005-05-11 HIRAOKA Kazuyuki + + * howm-vars.el (howm-prefix-key): renamed to distinguish from function. + use defvar instead of defcustom + since setting this variable after loading howm may cause confusion. + + * configure.in: test version + + * howm-mode.el (howm-default-key-table): update + some are added and some are now globally bound. + + * howm-view.el + (howm-view-list-title): + - remove-duplicates + - toggle title/notitle + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/427 + (howm-view-summary-rebuild): simplified code + + * howm-misc.el + (howm-random-walk): list all memo first when called on non-howm buffer. + (howm-auto-narrow): variable howm-auto-narrow can be t. + + * howm-vars.el: Some hidden features are moved to official sections. + +2005-05-10 HIRAOKA Kazuyuki + + * howm-menu.el + (howm-menu-shortcut-warn): show list of defined keys + (howm-menu-invisible): + tried to remove use of invisible property. but failed. + + * howm-view.el + (howm-view-search-in-result): aware of paragraph + (howm-view-remove-by-contents): aware of paragraph + (howm-view-list-title): aware of paragraph + (howm-view-filter-uniq): aware of paragraph + + * howm-vars.el (howm-file-name-format): added to howm-efficiency group + +2005-05-08 HIRAOKA Kazuyuki + + * riffle.el (howm-view-summary-window-size): + moved to howm-experimental group + + * howm-vars.el (howm-view-before-open-hook): fix. + used but not defined. + + * configure.in: test version + + * howm-vars.el: some variables are moved from howm-reminder.el. + (howm-todo-menu-types): "." (done) is included by default + so that one can easily customize several patterns by setting + howm-menu-todo-priority and howm-todo-priority-done-bottom. + Anyway, default value of howm-menu-todo-priority hides "." in menu. + Since it may cause slow response, I also added it into howm-efficiency + group. + (howm-viewer): new customize group + + * howm-menu.el (howm-menu-invoke): + RET in menu-mode causes jump when the current line matches + to howm-menu-list-regexp. No need to type C-a now. + + * howm-vars.el (howm-history-limit): 0 means 'no record' + + * howm-common.el (howm-write-history): remove duplicated entries + + * howm-view.el: follow the changes of riffle.el + +2005-05-07 HIRAOKA Kazuyuki + + * riffle.el: use gfunc instead of riffle-controller + + * howm.el: order of requires is modified; riffle.el requires gfunc.el. + + * configure.in: test version + + * howm-vars.el + (howm-view-grep-command): + use "grep -E" and "grep -F" instead of egrep and fgrep by default. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/670 + (howm-view-grep-file-stdin-option): + use "-f -" by default. + + * howm-backend.el (howm-real-grep-multi): + use howm-view-grep-command instead if howm-view-fgrep-command is nil. + + * howm-mode.el (howm-list-title): + show title by default for list of all/recent/around notes. + + * howm-vars.el: new file + begin to support defcustom + thx > + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?RoadMap + http://pc8.2ch.net/test/read.cgi/unix/1077881095/668 + + * configure.in: version 1.2.3 + +2005-05-06 HIRAOKA Kazuyuki + + * configure.in: version 1.2.3rc1 + + * howm-common.el (howm-with-schedule-interval): fix. + moved from howm-reminder.el because that macro is used + in another file howm-menu.el. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/669 + + * howm-mode.el (howm-search): fix. + call howm-list-all for empty regexp. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/668 + +2005-05-02 HIRAOKA Kazuyuki + + * configure.in: version 1.2.2 + +2005-04-29 HIRAOKA Kazuyuki + + * howm-view.el + (*howm-view-font-lock-keywords*): Spelling is corrected, and + worthless function howm-view-font-lock-keywords is removed. + (howm-view-contents-mode): hilight of searched keyword is prior + to howm-view-contents-font-lock-keywords + +2005-04-28 HIRAOKA Kazuyuki + + * cheat-font-lock.el: fix. + canceled the use of font-lock-add-keywords in + cheat-font-lock-merge-keywords because "compiled keywords" may be + passed from current implementation of riffle-contents-mode. + I guess this is also related to 2005-04-08 problem. + + * howm-common.el (howm-write-history): new option, howm-history-limit + +2005-04-26 HIRAOKA Kazuyuki + + * howm-reminder.el (howm-todo-parse-string): avoid warning + "variable dummy bound but not referenced" in xemacs + + * howm-common.el (howm-dont-warn-free-variable): + use macro for frequent trick to avoid warning + + * howm-mode.el (howm-image-file-name-regexps): fix. + Meadow-1.15 doesn't have image-file-name-regexps. + thx > Touhi-san + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReport + +2005-04-24 HIRAOKA Kazuyuki + + * howm-common.el (howm-exclude-p): fix. + No file was searched when howm-directory is a dot-directory + like "~/.howm". + My previous cleaning up on this function is canceled. + See the comment in the source code. + thx > taku-san + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReport + +2005-04-23 HIRAOKA Kazuyuki + + * howm-menu.el (howm-menu-copy-skel): fix. + When come-from keyword %menu% isn't found, + assume 0000-00-00-000000.howm as menu file if it exists. + This can happen when you write (setq howm-keyword-header "<==") + in sample/dot.emacs and then do 'make install && make test'. + thx > taku-san + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReport + + * howm-mode.el (howm-image-file-name-regexps): fix. + (image-file-name-regexp) caused an error on Meadow 2.10 + unless max-specpdl-size is increased from the default value 600. + thx > taku-san, Mo-san + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?MaxSpecpdlSize + + * Makefile.am (EXTRA_DIST): test.bat was not included in tar.gz + +2005-04-15 HIRAOKA Kazuyuki + + * howm-menu.el (howm-menu): swap priority of two variables + howm-menu-top and howm-menu-file. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/648 + +2005-04-08 HIRAOKA Kazuyuki + + * cheat-font-lock.el: use old code for emacs20 + New code may make howm-view-summary-open too slow. + +2005-04-02 HIRAOKA Kazuyuki + + * howm-backend.el (howm-real-grep-multi): new option variables + howm-view-grep-extended-option and howm-view-grep-fixed-option. + Now, we can use grep -E and grep -F instead of egrep and fgrep. + This will help linux-zaurus users. + +2005-03-30 HIRAOKA Kazuyuki + + * howm-menu.el (howm-menu-search): embed search result into menu + +2005-03-27 HIRAOKA Kazuyuki + + * howm-backend.el + (howm-folder-grep-internal:pages): fix. + list order was reversed when howm-list-all-title is non-nil + (howm-real-grep-single): fix. accept list of single pattern + (howm-folder-files:namazu): variable r bound but not referenced + +2005-03-20 HIRAOKA Kazuyuki + + * howm-view.el (howm-view-filter-by-contents): support C-u (= reject) + +2005-03-17 HIRAOKA Kazuyuki + + * howm-view.el (howm-view-contents-item): fix. + doubly displayed when matched to the last line of paragraph + +2005-03-09 HIRAOKA Kazuyuki + + * howm-common.el (howm-time-difference-second): omit microsecond + + * howm-misc.el (howm-elp): initialize profiler + +2005-03-08 HIRAOKA Kazuyuki + + * test.bat: invoke test environment for win + +2005-03-03 HIRAOKA Kazuyuki + + * howm-misc.el + (howm-random-walk-text): clean + (howm-random-walk): kill old buffers after jump + +2005-03-02 HIRAOKA Kazuyuki + + * howm-misc.el (howm-random-walk): automatic random walk + +2005-02-28 HIRAOKA Kazuyuki + + * howm-mode.el (howm-list-normalize): fix. + error when '[hoge' is searched. + +2005-02-25 HIRAOKA Kazuyuki + + * howm-misc.el (howm-bug-report): C-u to dump variables + + * howm-mode.el (howm-create-default-title-content): fix. + howm-title-from-search was ignored. + + * howm-backend.el (howm-list-buffers-exclude): new option + +2005-02-24 HIRAOKA Kazuyuki + + * howm-mode.el (howm-keyword-list): never return "" + +2005-02-23 HIRAOKA Kazuyuki + + * howm-common.el: fix for xemacs and emacs20 + +2005-02-22 HIRAOKA Kazuyuki + + * gfunc.el (gfunc-with): replace gfunc-def-with + + * howm-backend.el: howm-page-load is renamed to howm-page-open + + * howm-view.el (howm-view-set-item-list): comeback for howmoney + + * howm-backend.el (howm-folder-grep-internal:namazu): fix. + didn't work for 'or' patterns + +2005-02-21 HIRAOKA Kazuyuki + + * howm-backend.el + (howm-folder-grep-internal:pages): fix. + Specification of howm-page-type was changed. + (howm-folder-grep-internal:pages-buffers): fix. + must return list of items + + * howm-common.el (howm-exclude-p): fast check only + +2005-02-20 HIRAOKA Kazuyuki + + * howm-backend.el (howm-files-in-directory): clean up + + * howm-mode.el (howm-content-from-region): new option variable + +2005-02-18 HIRAOKA Kazuyuki + + * howm-mode.el (howm-excluded-file-regexp): add (image-file-name-regexp) + + * howm-backend.el (howm-fake-grep-file): check file name before search. + thx > Mocchan-san, Matsushita-san + http://www.bookshelf.jp/pukiwiki/pukiwiki.php?%BC%C1%CC%E4%BD%B8%2F42 + + * howm-mode.el (howm-exclude-p): fast check option + + * gfunc.el (gfunc-def): Description string is supported. + + * howm-backend.el: clean up + + * howm-common.el (howm-sort): renamed from howm-view-sort-items + + * illusion.el: renamed from proxy-buffer.el + + * gfunc.el + (gfunc-def): args-declaration is added. + (gfunc-def-with): new func + + * howm-backend.el: + (howm-search-path-folder): howm-search-path is list of 'folders'. + (howm-make-folder:namazu): namazu folder + (howm-make-folder:rot13dir): rot13 folder/page + + * proxy-buffer.el: new file diff --git a/site-lisp/howm/INSTALL b/site-lisp/howm/INSTALL new file mode 100755 index 0000000..b42a17a --- /dev/null +++ b/site-lisp/howm/INSTALL @@ -0,0 +1,182 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. diff --git a/site-lisp/howm/Makefile.am b/site-lisp/howm/Makefile.am new file mode 100644 index 0000000..5fcee42 --- /dev/null +++ b/site-lisp/howm/Makefile.am @@ -0,0 +1,86 @@ +# shamelessly copied from navi2ch-cvs-0.0.20031209 +# $Id: Makefile.am,v 1.23 2010-12-31 12:12:48 hira Exp $ + +howm_LISP = \ + howm.el \ + howm-menu.el \ + howm-reminder.el \ + howm-date.el \ + howm-misc.el \ + howm-mode.el \ + howm-view.el \ + howm-backend.el \ + howm-common.el \ + howm-vars.el \ + howm-version.el \ + howm-lang-en.el \ + howm-lang-ja.el \ + howm-menu-en.el \ + howm-menu-ja.el \ + honest-report.el \ + action-lock.el \ + riffle.el \ + gfunc.el \ + illusion.el \ + cheat-font-lock.el \ + howm-cl.el + +EXTRA_DIST = Makefile.old bcomp.el howm-mkmenu.el $(howm_LISP) \ + bcomp.el.in howm-version.el.in test.bat +BUILT_SOURCES = $(srcdir)/howm-version.el $(srcdir)/bcomp.el +SUBDIRS = doc ext en ja sample + +MENU_SRC = en/0000-00-00-000000.txt ja/0000-00-00-000000.txt +MENU_EL = $(srcdir)/howm-menu-en.el $(srcdir)/howm-menu-ja.el +TEST_INIT = sample/dot.emacs + +AM_MAKEFLAGS = HOWM_MAKE=t + +$(srcdir)/howm-version.el: $(srcdir)/howm-version.el.in $(srcdir)/configure.in Makefile + rm -f $@.tmp && \ + sed -e 's/~\(VERSION\)~/$(VERSION)/' \ + $(srcdir)/howm-version.el.in > $@.tmp && \ + mv $@.tmp $@ + +$(MENU_EL): $(srcdir)/howm-mkmenu.el $(MENU_SRC) + $(EMACS) -q -batch -l $(srcdir)/howm-mkmenu.el + +# snap: +# rm -f $(srcdir)/howm-version.el && \ +# $(MAKE) $(AM_MAKEFLAGS) VERSION=@VERSION@-`date +%y%m%d` dist elcdist && \ +# rm -f $(srcdir)/howm-version.el && \ +# $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/howm-version.el + +# recompile: $(howm_LISP) +# rm -f $(ELCFILES) && \ +# HOWM_MAKE=t EMACS="$(EMACS)" $(SHELL) $(srcdir)/elisp-comp $(howm_LISP) + +# elcdist: $(ELCFILES) +# rm -rf $(distdir) && \ +# mkdir $(distdir) && \ +# cp -p $(ELCFILES) $(distdir) && \ +# $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir)-elc.tar.gz && \ +# rm -rf $(distdir) + +$(srcdir)/bcomp.el: $(srcdir)/bcomp.el.in $(srcdir)/Makefile.am + rm -f $@ && \ + list=`for file in $(howm_LISP); do echo -n "\"$$file\" "; done` && \ + sed -e "s/@\(howm_LISP\)@/$$list/" < $(srcdir)/bcomp.el.in > $@ + +# $(ELCFILES): $(howm_LISP) +# $(MAKE) $(AM_MAKEFLAGS) recompile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$@ $(SHELL) ./config.status + +Makefiles: $(top_builddir)/config.status + $(SHELL) $(top_builddir)/config.status + +update: + ( cd $(srcdir); $(CVS) update -P -d ) && \ + $(MAKE) $(AM_MAKEFLAGS) Makefiles + +test: + HOWM_TEST=t $(EMACS) -q --no-site-file -l $(TEST_INIT) diff --git a/site-lisp/howm/Makefile.in b/site-lisp/howm/Makefile.in new file mode 100644 index 0000000..b1228c5 --- /dev/null +++ b/site-lisp/howm/Makefile.in @@ -0,0 +1,835 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# shamelessly copied from navi2ch-cvs-0.0.20031209 +# $Id: Makefile.am,v 1.23 2010-12-31 12:12:48 hira Exp $ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ + ChangeLog INSTALL NEWS config.guess config.sub elisp-comp \ + install-sh missing mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(howmdir)" +howmLISP_INSTALL = $(INSTALL_DATA) +LISP = $(howm_LISP) +am__ELFILES = action-lock.el cheat-font-lock.el gfunc.el \ + honest-report.el howm-backend.el howm-cl.el howm-common.el \ + howm-date.el howm-lang-en.el howm-lang-ja.el howm-menu-en.el \ + howm-menu-ja.el howm-menu.el howm-misc.el howm-mode.el \ + howm-reminder.el howm-vars.el howm-version.el howm-view.el \ + howm.el illusion.el riffle.el +am__ELCFILES = $(am__ELFILES:.el=.elc) +ELCFILES = $(LISP:.el=.elc) +elisp_comp = $(top_srcdir)/elisp-comp +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CVS = @CVS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EMACS = @EMACS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +howmdir = @howmdir@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +lispdir = @lispdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +packagedir = @packagedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +howm_LISP = \ + howm.el \ + howm-menu.el \ + howm-reminder.el \ + howm-date.el \ + howm-misc.el \ + howm-mode.el \ + howm-view.el \ + howm-backend.el \ + howm-common.el \ + howm-vars.el \ + howm-version.el \ + howm-lang-en.el \ + howm-lang-ja.el \ + howm-menu-en.el \ + howm-menu-ja.el \ + honest-report.el \ + action-lock.el \ + riffle.el \ + gfunc.el \ + illusion.el \ + cheat-font-lock.el \ + howm-cl.el + +EXTRA_DIST = Makefile.old bcomp.el howm-mkmenu.el $(howm_LISP) \ + bcomp.el.in howm-version.el.in test.bat + +BUILT_SOURCES = $(srcdir)/howm-version.el $(srcdir)/bcomp.el +SUBDIRS = doc ext en ja sample +MENU_SRC = en/0000-00-00-000000.txt ja/0000-00-00-000000.txt +MENU_EL = $(srcdir)/howm-menu-en.el $(srcdir)/howm-menu-ja.el +TEST_INIT = sample/dot.emacs +AM_MAKEFLAGS = HOWM_MAKE=t +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +elc-stamp: $(LISP) + @echo 'WARNING: Warnings can be ignored. :-)' + @rm -f elc-temp && touch elc-temp + if test "$(EMACS)" != no; then \ + set x; \ + list='$(LISP)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + set x "$$@" "$$d$$p"; shift; \ + done; \ + shift; \ + EMACS="$(EMACS)" $(SHELL) $(elisp_comp) "$$@" || exit 1; \ + else : ; fi + @mv -f elc-temp $@ +$(am__ELCFILES): elc-stamp + @if test "$(EMACS)" != no && test ! -f $@; then \ + trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \ + if mkdir elc-lock 2>/dev/null; then \ + rm -f elc-stamp; \ + $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \ + rmdir elc-lock; \ + else \ + while test -d elc-lock; do sleep 1; done; \ + test -f elc-stamp; exit $$?; \ + fi; \ + else : ; fi +install-howmLISP: $(howm_LISP) $(ELCFILES) + @$(NORMAL_INSTALL) + @if test "$(EMACS)" != no && test -n "$(howmdir)"; then \ + $(MKDIR_P) "$(DESTDIR)$(howmdir)"; \ + list='$(howm_LISP)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__strip_dir) \ + echo " $(howmLISP_INSTALL) '$$d$$p' '$(DESTDIR)$(howmdir)/$$f'"; \ + $(howmLISP_INSTALL) "$$d$$p" "$(DESTDIR)$(howmdir)/$$f" || exit $$?; \ + if test -f $${p}c; then \ + echo " $(howmLISP_INSTALL) '$${p}c' '$(DESTDIR)$(howmdir)/$${f}c'"; \ + $(howmLISP_INSTALL) "$${p}c" "$(DESTDIR)$(howmdir)/$${f}c" || exit $$?; \ + else : ; fi; \ + done; \ + else : ; fi + +uninstall-howmLISP: + @$(NORMAL_UNINSTALL) + @test "$(EMACS)" != no && test -n "$(howmdir)" || exit 0; \ + list='$(howm_LISP)'; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + echo " ( cd '$(DESTDIR)$(howmdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(howmdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(howmdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(howmdir)" && rm -f $$filesc + +clean-lisp: + -rm -f elc-stamp $(ELCFILES) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod u+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @$(am__cd) '$(distuninstallcheck_dir)' \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(LISP) $(ELCFILES) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(howmdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-recursive + +clean-am: clean-generic clean-lisp mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-howmLISP + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-howmLISP + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ + ctags-recursive install install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-lisp ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-howmLISP install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-howmLISP + + +$(srcdir)/howm-version.el: $(srcdir)/howm-version.el.in $(srcdir)/configure.in Makefile + rm -f $@.tmp && \ + sed -e 's/~\(VERSION\)~/$(VERSION)/' \ + $(srcdir)/howm-version.el.in > $@.tmp && \ + mv $@.tmp $@ + +$(MENU_EL): $(srcdir)/howm-mkmenu.el $(MENU_SRC) + $(EMACS) -q -batch -l $(srcdir)/howm-mkmenu.el + +# snap: +# rm -f $(srcdir)/howm-version.el && \ +# $(MAKE) $(AM_MAKEFLAGS) VERSION=@VERSION@-`date +%y%m%d` dist elcdist && \ +# rm -f $(srcdir)/howm-version.el && \ +# $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/howm-version.el + +# recompile: $(howm_LISP) +# rm -f $(ELCFILES) && \ +# HOWM_MAKE=t EMACS="$(EMACS)" $(SHELL) $(srcdir)/elisp-comp $(howm_LISP) + +# elcdist: $(ELCFILES) +# rm -rf $(distdir) && \ +# mkdir $(distdir) && \ +# cp -p $(ELCFILES) $(distdir) && \ +# $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir)-elc.tar.gz && \ +# rm -rf $(distdir) + +$(srcdir)/bcomp.el: $(srcdir)/bcomp.el.in $(srcdir)/Makefile.am + rm -f $@ && \ + list=`for file in $(howm_LISP); do echo -n "\"$$file\" "; done` && \ + sed -e "s/@\(howm_LISP\)@/$$list/" < $(srcdir)/bcomp.el.in > $@ + +# $(ELCFILES): $(howm_LISP) +# $(MAKE) $(AM_MAKEFLAGS) recompile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$@ $(SHELL) ./config.status + +Makefiles: $(top_builddir)/config.status + $(SHELL) $(top_builddir)/config.status + +update: + ( cd $(srcdir); $(CVS) update -P -d ) && \ + $(MAKE) $(AM_MAKEFLAGS) Makefiles + +test: + HOWM_TEST=t $(EMACS) -q --no-site-file -l $(TEST_INIT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/site-lisp/howm/Makefile.old b/site-lisp/howm/Makefile.old new file mode 100644 index 0000000..e69de29 diff --git a/site-lisp/howm/NEWS b/site-lisp/howm/NEWS new file mode 100644 index 0000000..bcbcc3f --- /dev/null +++ b/site-lisp/howm/NEWS @@ -0,0 +1 @@ +see doc/ diff --git a/site-lisp/howm/README b/site-lisp/howm/README new file mode 100644 index 0000000..bcbcc3f --- /dev/null +++ b/site-lisp/howm/README @@ -0,0 +1 @@ +see doc/ diff --git a/site-lisp/howm/acinclude.m4 b/site-lisp/howm/acinclude.m4 new file mode 100644 index 0000000..b0a7656 --- /dev/null +++ b/site-lisp/howm/acinclude.m4 @@ -0,0 +1,54 @@ +# serial 3 + +# AC_EMACS_LISP(var, code) +# Set `var' with output of elisp `code'. +# To avoid incompatibilities of "single-quote in back-quote" etc, +# temporary files are used to store emacs-lisp and output of it. +AC_DEFUN([AC_EMACS_LISP],[dnl +{ ac_temp=./conftemp.$$ +ac_output=confout.$$ +rm -f $ac_temp $ac_output +cat >$ac_temp <<\_ACEOF +(defun ac-temp-func () +$2 +(princ "\n") ; make sure the output has trailing newline. +) +_ACEOF +$EMACS -batch -q -l $ac_temp -f ac-temp-func | sed -e '/^ *$/d' > $ac_output +$1=`cat $ac_output` +rm -f $ac_temp $ac_output; }]) + +# grab and hack from lispdir.m4 + +## ------------------------ +## Emacs LISP file handling +## From Ulrich Drepper +## Almost entirely rewritten by Alexandre Oliva +## ------------------------ + +AC_DEFUN([AM_PATH_LISPDIR], + [AC_ARG_WITH(lispdir, + [ --with-lispdir Override the default lisp directory], + [ lispdir="$withval" + AC_MSG_CHECKING([where .elc files should go]) + AC_MSG_RESULT([$lispdir])], + [ + if test x${lispdir+set} != xset; then + AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [dnl + AC_EMACS_LISP(am_cv_lispdir,[dnl +(defvar result nil) +(setq load-path (nreverse load-path)) +(while load-path + (if (string-match "\\`\\(.+/site-lisp\\)/?\\'" (car load-path)) + (setq result (match-string 1 (car load-path)) + load-path nil) + (setq load-path (cdr load-path)))) +(princ (or result (expand-file-name "../site-lisp" data-directory)))]) + if test -z "$am_cv_lispdir"; then + am_cv_lispdir='${datadir}/emacs/site-lisp' + fi + ]) + lispdir="$am_cv_lispdir" + fi + ]) + AC_SUBST(lispdir)]) diff --git a/site-lisp/howm/aclocal.m4 b/site-lisp/howm/aclocal.m4 new file mode 100644 index 0000000..fd9f063 --- /dev/null +++ b/site-lisp/howm/aclocal.m4 @@ -0,0 +1,678 @@ +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([acinclude.m4]) diff --git a/site-lisp/howm/action-lock.el b/site-lisp/howm/action-lock.el new file mode 100644 index 0000000..020931b --- /dev/null +++ b/site-lisp/howm/action-lock.el @@ -0,0 +1,360 @@ +;;; action-lock.el --- invoke magic action by RET key on spell strings + +;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;; HIRAOKA Kazuyuki +;; $Id: action-lock.el,v 1.72 2011-12-31 15:07:28 hira Exp $ +;; +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 1, or (at your option) +;; any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; The GNU General Public License is available by anonymouse ftp from +;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;; USA. + +;;; Commentary: + +;;; Code: + +;; rules = (rule rule ...) +;; rule = (regexp action) or (regexp action hilit-pos) +;; action = function with one argument which corresponds to (interactive "P"). + +(require 'howm-cl) +(require 'easy-mmode) +(require 'font-lock) +(require 'cheat-font-lock) + +(defgroup action-lock nil + "Invoke magic action by RET key on spell strings." + :group 'convenience) + +(defvar action-lock-face 'action-lock-face + "*Face for action-lock spells.") + +(defface action-lock-face + (let ((underline (if (and (fboundp 'set-face-underline) + window-system) + '(((class color)) (:underline "dark cyan")) + '(((class color)) (:underline t)))) + (fail-safe '(t (:inverse-video t)))) + (list underline fail-safe)) + "*Face for action-lock spells." + :group 'action-lock + :group 'howm-faces) + +(defvar action-lock-magic-return-key "\C-m") +(put 'action-lock-magic-return-key 'risky-local-variable t) +(defvar action-lock-lighter " AL") +(defvar action-lock-silent t + "Inhibit font-lock-verbose if non-nil.") + +;; If you want to change these values, +;; you must set them before loading this file. +(defvar action-lock-switch-default '("{ }" "{*}" "{-}")) ;; any number +(defvar action-lock-date-default '("{_}" "[%Y-%m-%d %H:%M]")) ;; before after + +(easy-mmode-define-minor-mode action-lock-mode + "With no argument, this command toggles the mode. +Non-null prefix argument turns on the mode. +Null prefix argument turns off the mode. + +\\[action-lock-magic-return] Envoke the action on the field +" + nil ;; default = off + action-lock-lighter ;; mode-line + `( + (,action-lock-magic-return-key . action-lock-magic-return) + )) + +;; emacs20's easy-mmode-define-minor-mode can't have body. sigh... +(add-hook 'action-lock-mode-on-hook 'action-lock-initialize-buffer) +(add-hook 'action-lock-mode-off-hook 'action-lock-restore-buffer) + +(defvar action-lock-rules nil) +(defvar action-lock-original-font-lock-keywords nil) +(defvar action-lock-original-return nil) +(put 'action-lock-rules 'risky-local-variable t) +(put 'action-lock-original-font-lock-keywords 'risky-local-variable t) +(put 'action-lock-original-return 'risky-local-variable t) + +(make-variable-buffer-local 'action-lock-rules) +(make-variable-buffer-local 'action-lock-original-font-lock-keywords) +(make-variable-buffer-local 'action-lock-original-return) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; sample + +(defun action-lock-switch (label-list) + (let ((regexp (mapconcat 'regexp-quote label-list "\\|"))) +; (let ((regexp (regexp-opt label-list))) ;; emacs19 lacks regexp-opt + (list regexp + `(lambda (&optional dummy) + (let* ((b (match-beginning 0)) + (e (match-end 0)) + (ring ',(append label-list (list (car label-list)))) + (s (match-string-no-properties 0)) + (next (cadr (member s ring)))) + (delete-region b e) + (insert next) + (goto-char b)))))) + +(defun action-lock-date (regexp time-format) + (list regexp + `(lambda (&optional dummy) + (delete-region (match-beginning 0) (match-end 0)) + (insert (format-time-string ,time-format))))) + +(defun action-lock-open (regexp arg-pos &optional hilit-pos) + (action-lock-general #'action-lock-find-file + regexp arg-pos hilit-pos t)) +(defun action-lock-find-file (f u) + (if u + (find-file-other-window f) + (find-file f))) + +;; (defun action-lock-open (regexp arg-pos &optional hilit-pos) +;; (action-lock-general #'find-file regexp arg-pos hilit-pos)) + +(defvar action-lock-no-browser nil) +(defun action-lock-browse-url (url) + (setq url (replace-regexp-in-string "^[htp]+\\(s?\\)://" "http\\1://" url)) + (message "%s" url) + (if action-lock-no-browser + (kill-new url) + (browse-url url))) +(defun action-lock-browse (regexp arg-pos &optional hilit-pos) + (action-lock-general #'action-lock-browse-url regexp arg-pos hilit-pos)) + +(defun action-lock-general (func regexp arg-pos &optional hilit-pos arg-p) + "Generate an action-lock rule. +FUNC is called when action-lock is invoked on a string which matches +to REGEXP. ARG-POS specifies a position of subexpression in REGEXP, +and matched substring is passed to FUNC. +HILIT-POS specifies another position of subexpression in REGEXP, +and matched substring is highlighted in buffers. +FUNC will receive an additional argument for action, as is described +at the beginning of this file, when ARG-P is non-nil." + (list regexp + `(lambda (&optional arg) + (,func (match-string ,arg-pos) + ,@(and arg-p '(arg)))) + hilit-pos)) + +; (defun action-lock-escape-quote (s) +; (apply 'concat +; (mapcar '(lambda (x) (if (string= x "'") "\\x27" x)) ;; for zsh +; (split-string s "")))) + +;; copied and modified from thingatpt.el [2004-01-30] +(defvar action-lock-url-path-regexp + "\\([-!@#$%^&*()_+|=:~/?a-zA-Z0-9.,;]*[-!@#$%^&*()_+|=:~/?a-zA-Z0-9]+\\)" +;; "\\([^]\t\n \"'()<>[^`{}]*[^]\t\n \"'()<>[^`{}.,;]+\\)" + "A regular expression probably matching the host, path or e-mail part of a URL.") +;; (defvar action-lock-url-scheme-regexp +;; "\\<\\(https?://\\|ftp://\\|gopher://\\|telnet://\\|wais://\\|file:/\\|s?news:\\|mailto:\\)") +(defun action-lock-url-regexp (head &optional tail) + (concat head + action-lock-url-path-regexp + (or tail ""))) + +(defvar action-lock-open-regexp + (action-lock-url-regexp "\\/?\\)")) +(defvar action-lock-open-regexp-pos 2) + +;; emacs20 doesn't support "[htp]\\{3,5\\}" +(defvar action-lock-browse-regexp + (action-lock-url-regexp "\\<\\([htp][htp][htp][htp]?[htp]?s?\\|ftp\\)://" "\\>/?")) +(defvar action-lock-browse-regexp-pos 0) + +(defvar action-lock-default-rules + (list (action-lock-switch action-lock-switch-default) + (action-lock-date (regexp-quote (car action-lock-date-default)) + (second action-lock-date-default)) + (action-lock-open (action-lock-url-regexp "URL:\\(file://\\)?\\(localhost\\)?" ">))") + 3) ;; (()) + (action-lock-open action-lock-open-regexp + action-lock-open-regexp-pos) ;; file://... + (action-lock-browse action-lock-browse-regexp + action-lock-browse-regexp-pos) ;; http://... + )) +(put 'action-lock-default-rules 'risky-local-variable t) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; main + +(defvar action-lock-bury-minor-mode-p t) +(defun action-lock-initialize-buffer () + (interactive) + (action-lock-initialize-magic-return) + (action-lock-set-rules action-lock-default-rules) + (when action-lock-bury-minor-mode-p + (action-lock-bury-minor-mode 'action-lock-mode)) +) + +(defun action-lock-restore-buffer () + (action-lock-restore-font-lock)) + +(defun action-lock-magic-return (&optional arg) + (interactive "P") + (or (action-lock-invoke arg) + (if action-lock-mode + (let* ((action-lock-mode nil) + (f (key-binding action-lock-magic-return-key))) + (call-interactively f)) + ;; Can't happen normally + (call-interactively action-lock-original-return)))) + +(defun action-lock-invoke (&optional arg) +;; (interactive) + (let ((action (action-lock-get-action))) + (if (null action) + nil + (progn +;; (message "%s" action) ;; debug + (funcall action arg) +;; (apply action nil) + t)))) + +(defun action-lock-initialize-magic-return () + (when (null action-lock-original-return) + (let ((action-lock-mode nil)) + (setq action-lock-original-return + (key-binding action-lock-magic-return-key))))) + +(defun action-lock-rules () + action-lock-rules) +(defun action-lock-set-rules (rules) + (setq action-lock-rules (howm-cl-remove-duplicates* rules)) +;; (message "Font lock...") + (action-lock-font-lock) +;; (message "...Done.") + ) +(defun action-lock-add-rules (rules &optional prepend-p) + (action-lock-set-rules (if prepend-p + (append rules (action-lock-rules)) + (append (action-lock-rules) rules)))) + +(defun action-lock-bury-minor-mode (mode) + "Bury MODE to the last in minor-mode-map-alist" + (let ((pair (assoc mode minor-mode-map-alist))) + (when pair + (setq minor-mode-map-alist + ;; Duplications must be removed. + `(,@(remove pair minor-mode-map-alist) ,pair))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Font lock + +;; experimental [2003-10-25] +(defvar action-lock-case-fold-search nil) +(defvar action-lock-use-case-fold-search t) + +(defun action-lock-matcher (regexp) + (if action-lock-use-case-fold-search + `(lambda (limit) + (let ((case-fold-search action-lock-case-fold-search)) + (re-search-forward ,regexp limit t))) + regexp)) + +(defun action-lock-font-lock () + (cheat-font-lock-mode action-lock-silent) + (if (null action-lock-original-font-lock-keywords) + (setq action-lock-original-font-lock-keywords font-lock-keywords) + (setq font-lock-keywords action-lock-original-font-lock-keywords)) + (when action-lock-rules + (let* ((entries (mapcar (lambda (pair) + (let* ((regexp (car pair)) + (matcher (action-lock-matcher regexp)) + (pos (or (caddr pair) 0)) + (hilit (list pos 'action-lock-face + 'prepend))) + (cons matcher hilit))) + action-lock-rules))) + (cheat-font-lock-append-keywords entries) +;; (cheat-font-lock-prepend-keywords entries) + (cheat-font-lock-fontify t) + ))) + +(defun action-lock-restore-font-lock () + (setq font-lock-keywords action-lock-original-font-lock-keywords)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun action-lock-get-action () + (car (action-lock-get-action/range))) + +(defun action-lock-get-range () + (cdr (action-lock-get-action/range))) + +(defun action-lock-get-action/range () + (let* ((rules action-lock-rules) + (current nil) + (found nil)) + (while (and rules (not found)) + (save-excursion + (setq current (car rules) + rules (cdr rules)) + (let* ((regexp (car current)) + (action (cadr current)) + (pos (caddr current)) + (range (action-lock-regexp-range regexp pos))) + (if range + (setq found (cons action range)))))) + found)) + +(defun action-lock-regexp-range (regexp &optional pos) + (setq pos (or pos 0)) + (save-excursion + (let ((c (point)) + (eol (line-end-position)) + (range nil) + (case-fold-search (if action-lock-use-case-fold-search + action-lock-case-fold-search + case-fold-search)) + ) + (beginning-of-line) + (while (and (<= (point) c) + (re-search-forward regexp eol 'no-error) + (not range)) + (let ((beg (match-beginning pos)) + (end (match-end pos))) + (when (and (<= beg c) (< c end)) + (setq range (list beg end))))) + range))) + +(defun action-lock-regexp () + (mapconcat 'car action-lock-rules "\\|")) + +(defun action-lock-skip-one-link (reverse) + (let* ((r (action-lock-get-range)) + (border (if reverse 0 1))) + (when r + (goto-char (nth border r))))) + +(defun action-lock-goto-next-link (&optional reverse) + (interactive) + (let* ((move (if reverse #'backward-char #'forward-char))) + (action-lock-skip-one-link reverse) + (funcall move) + (while (not (action-lock-get-action)) + (funcall move)) + (when reverse + (action-lock-skip-one-link reverse)))) + +(defun action-lock-goto-previous-link () + (interactive) + (action-lock-goto-next-link t)) + +;;;;;;;;;;;;; + +(provide 'action-lock) + +;;; action-lock.el ends here diff --git a/site-lisp/howm/bcomp.el b/site-lisp/howm/bcomp.el new file mode 100644 index 0000000..c00592b --- /dev/null +++ b/site-lisp/howm/bcomp.el @@ -0,0 +1,23 @@ +;;; -*- Emacs-Lisp -*- +(require 'cl) + +(setq bcomp-files + '( + "howm.el" "howm-menu.el" "howm-reminder.el" "howm-date.el" "howm-misc.el" "howm-mode.el" "howm-view.el" "howm-backend.el" "howm-common.el" "howm-vars.el" "howm-version.el" "howm-lang-en.el" "howm-lang-ja.el" "howm-menu-en.el" "howm-menu-ja.el" "honest-report.el" "action-lock.el" "riffle.el" "gfunc.el" "illusion.el" "cheat-font-lock.el" "howm-cl.el" + )) + +(let* ((dir (expand-file-name default-directory)) + (load-path (cons dir load-path)) + file) + (message "deleting old .elc files...") + (dolist (elt bcomp-files) + (setq file (concat dir elt "c")) + (if (file-exists-p file) + (delete-file file))) + + (message "compiling...") + (dolist (elt bcomp-files) + (setq file (concat dir elt)) + (byte-compile-file file t)) + + (message "done")) diff --git a/site-lisp/howm/bcomp.el.in b/site-lisp/howm/bcomp.el.in new file mode 100644 index 0000000..e4460b6 --- /dev/null +++ b/site-lisp/howm/bcomp.el.in @@ -0,0 +1,23 @@ +;;; -*- Emacs-Lisp -*- +(require 'cl) + +(setq bcomp-files + '( + @howm_LISP@ + )) + +(let* ((dir (expand-file-name default-directory)) + (load-path (cons dir load-path)) + file) + (message "deleting old .elc files...") + (dolist (elt bcomp-files) + (setq file (concat dir elt "c")) + (if (file-exists-p file) + (delete-file file))) + + (message "compiling...") + (dolist (elt bcomp-files) + (setq file (concat dir elt)) + (byte-compile-file file t)) + + (message "done")) diff --git a/site-lisp/howm/cheat-font-lock.el b/site-lisp/howm/cheat-font-lock.el new file mode 100644 index 0000000..74611d6 --- /dev/null +++ b/site-lisp/howm/cheat-font-lock.el @@ -0,0 +1,111 @@ +;;; cheat-font-lock.el --- modify font-lock-keywords +;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: cheat-font-lock.el,v 1.24 2011-12-31 15:07:28 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;-------------------------------------------------------------------- + +;; depends on internal implementation of font-lock.el + +;; renamed from howm-font-lock.el [2003-12-12] + +(require 'font-lock) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; This code is canceled because it caused a bug on howm-1.2.2rc5. +;; cheat-font-lock-merge-keywords must support compiled keywords for current +;; implementation of riffle-contents-mode. [2005-04-28] +;; See below. +;; snap:///~/elisp/howm/howm-view.el#223:(define-derived-mode howm-view-contents-mode riffle-contents-mode "HowmC" +;; snap:///~/elisp/howm/howm-view.el#256:(cheat-font-lock-merge-keywords howm-view-contents-font-lock-keywords +;; +;; (if (and (fboundp 'font-lock-add-keywords) (>= emacs-major-version 21)) +;; (progn +;; (defun cheat-font-lock-merge-keywords (&rest keywords-list) +;; ;; compiled keywords are not supported in keywords-list. +;; (font-lock-add-keywords nil (apply #'append keywords-list) 'set)) +;; (defun cheat-font-lock-append-keywords (entries) +;; (font-lock-add-keywords nil entries 'append)) +;; (defun cheat-font-lock-prepend-keywords (entries) +;; (font-lock-add-keywords nil entries)) +;; ;; inhibit warning. sigh... +;; (defun cheat-font-lock-20040624-format-p () nil) +;; (defun cheat-font-lock-compiled-p (keywords) nil) +;; (defun cheat-font-lock-compiled-body (keywords) nil) +;; ) +;; (progn +;; ;; for xemacs and emacs20 +;; )) + +(defun cheat-font-lock-20040624-format-p () + ;; need to call font-lock-set-defaults before font-lock-compile-keywords. + ;; see http://lists.gnu.org/archive/html/emacs-diffs/2005-12/msg00961.html + (font-lock-set-defaults) + (>= (length (font-lock-compile-keywords '(("dummy" . 'dummy)))) 3)) ;; dirty +(defun cheat-font-lock-compiled-p (keywords) + (eq (car-safe keywords) t)) +(if (cheat-font-lock-20040624-format-p) + (defun cheat-font-lock-compiled-body (keywords) + (cddr keywords)) + (defun cheat-font-lock-compiled-body (keywords) + (cdr keywords))) +(defun cheat-font-lock-keywords (keywords) + (if (cheat-font-lock-compiled-p keywords) + (cheat-font-lock-compiled-body keywords) + keywords)) +(defun cheat-font-lock-merge-keywords (&rest keywords-list) + (let ((bodies-list (mapcar #'cheat-font-lock-keywords keywords-list))) + (setq font-lock-keywords + (apply #'append bodies-list)))) +(defun cheat-font-lock-append-keywords (entries) + (cheat-font-lock-merge-keywords font-lock-keywords entries)) +(defun cheat-font-lock-prepend-keywords (entries) + (cheat-font-lock-merge-keywords entries font-lock-keywords)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun cheat-font-lock-mode (&optional silent) + "Enable font-lock-mode without calling fontify-buffer." + ;; For xemacs. But this seems to have no effect. ;_; [2004-01-14] + (when silent + (set (make-local-variable 'font-lock-verbose) nil)) + ;; Keywords are not highlighted on the fly in emacs-21.3.50.1 + ;; when font-lock-defaults is nil. I don't understand this. [2003-11-28] + (when (null font-lock-defaults) + (set (make-local-variable 'font-lock-defaults) '(nil))) + ;; Without the next line, global value is changed to t. [2003-12-30] + ;; (emacs-20.7.2 on Vine Linux 2.6) + (make-local-variable 'font-lock-fontified) + (let* ((font-lock-fontified t) ;; adjourn fontify-buffer + (bname (buffer-name)) + (need-rename (eq (aref (buffer-name) 0) ?\ ))) + ;; Rename invisible buffer in order to force font-lock-mode. + ;; cf. snap:///usr/share/emacs/21.2/lisp/font-lock.el#694:(define-minor-mode font-lock-mode + (when need-rename + (rename-buffer (concat "xxx-" bname) t)) + (font-lock-mode 1) + (when need-rename + (rename-buffer bname))) + (font-lock-set-defaults)) + +(defun cheat-font-lock-fontify (&optional dummy) + (font-lock-fontify-buffer)) + +(provide 'cheat-font-lock) + +;;; cheat-font-lock.el ends here diff --git a/site-lisp/howm/config.guess b/site-lisp/howm/config.guess new file mode 100755 index 0000000..396482d --- /dev/null +++ b/site-lisp/howm/config.guess @@ -0,0 +1,1500 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2006-07-02' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + x86:Interix*:[3456]*) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T:Interix*:[3456]*) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/site-lisp/howm/config.sub b/site-lisp/howm/config.sub new file mode 100755 index 0000000..387c18d --- /dev/null +++ b/site-lisp/howm/config.sub @@ -0,0 +1,1608 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2006-07-02' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/site-lisp/howm/configure b/site-lisp/howm/configure new file mode 100755 index 0000000..66c1949 --- /dev/null +++ b/site-lisp/howm/configure @@ -0,0 +1,3890 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.67. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= +PACKAGE_URL= + +ac_unique_file="howm.el" +ac_subst_vars='LTLIBOBJS +LIBOBJS +extdir +howmdir +lispdir +packagedir +EMACS +LN_S +CVS +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +with_bash +with_xemacs +with_emacs +with_packagedir +with_lispdir +with_howmdir +with_docdir +with_extdir +with_endir +with_jadir +' + ac_precious_vars='build_alias +host_alias +target_alias' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-bash Use Bash to build + --with-xemacs Use XEmacs to build + --with-emacs Use Emacs to build + --with-packagedir[=DIR] Use package directory + (With XEmacs, this option also sets + docdir, lispdir, etc...) + --with-lispdir Override the default lisp directory + --with-howmdir=DIR Override the default howm directory + --with-docdir=DIR Override the default docs directory + --with-extdir=DIR Override the default ext directory + --with-endir=DIR Obsolete. no need. no effect. + --with-jadir=DIR Obsolete. no need. no effect. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.67 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.67. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5 ; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +am__api_version='1.11' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE=howm + VERSION="InsertVersionHere" + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + +# Emacs set environment variable EMACS as t +test "x$EMACS" = xt && unset EMACS + +emacsen="emacs xemacs" + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +case "$host_os" in +*cygwin*) + with_bash=yes + emacsen="$emacsen MeadowNT.exe Meadow95.exe Meadow.exe" + ;; +esac + + +# Check whether --with-bash was given. +if test "${with_bash+set}" = set; then : + withval=$with_bash; case "$withval" in +yes) SHELL=bash ;; +no) ;; +*) SHELL="$withval" ;; +esac +fi + + + +# Check whether --with-xemacs was given. +if test "${with_xemacs+set}" = set; then : + withval=$with_xemacs; case "$withval" in +yes) emacsen="xemacs" ;; +no) emacsen="emacs" ;; +*) EMACS="$withval" ;; +esac +fi + + + +# Check whether --with-emacs was given. +if test "${with_emacs+set}" = set; then : + withval=$with_emacs; case "$withval" in +yes) emacsen="emacs" ;; +no) emacsen="xemacs" ;; +*) EMACS="$withval" ;; +esac +fi + + +if test -n "${with_xemacs+set}" && test -n "${with_emacs+set}"; then + as_fn_error $? "specify one of --with-xemacs or --with-emacs" "$LINENO" 5 +fi + +# Extract the first word of "cvs", so it can be a program name with args. +set dummy cvs; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CVS+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CVS"; then + ac_cv_prog_CVS="$CVS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CVS="cvs -z3" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_CVS" && ac_cv_prog_CVS=":" +fi +fi +CVS=$ac_cv_prog_CVS +if test -n "$CVS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CVS" >&5 +$as_echo "$CVS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + + +for ac_prog in ${emacsen} +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_EMACS+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$EMACS"; then + ac_cv_prog_EMACS="$EMACS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_EMACS="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +EMACS=$ac_cv_prog_EMACS +if test -n "$EMACS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EMACS" >&5 +$as_echo "$EMACS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$EMACS" && break +done +test -n "$EMACS" || EMACS="no" + +if test "$EMACS" = "no"; then + as_fn_error $? "cannot find emacs" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking detecting your emacs type" >&5 +$as_echo_n "checking detecting your emacs type... " >&6; } +{ ac_temp=./conftemp.$$ +ac_output=confout.$$ +rm -f $ac_temp $ac_output +cat >$ac_temp <<\_ACEOF +(defun ac-temp-func () +(princ (cond ((featurep 'xemacs) 'xemacs) + ((>= emacs-major-version 21) 'emacs21) + ((= emacs-major-version 20) 'emacs20) + (t 'UNKNOWN))) +(princ "\n") ; make sure the output has trailing newline. +) +_ACEOF +$EMACS -batch -q -l $ac_temp -f ac-temp-func | sed -e '/^ *$/d' > $ac_output +emacstype=`cat $ac_output` +rm -f $ac_temp $ac_output; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacstype" >&5 +$as_echo "$emacstype" >&6; } + +if test -z "$emacstype" || test "$emacstype" = UNKNOWN; then + as_fn_error $? "this package does not work on your emacs" "$LINENO" 5 +fi + +# detect packagedir + +# Check whether --with-packagedir was given. +if test "${with_packagedir+set}" = set; then : + withval=$with_packagedir; { $as_echo "$as_me:${as_lineno-$LINENO}: checking where package files should go" >&5 +$as_echo_n "checking where package files should go... " >&6; } +test "$emacstype" != xemacs && as_fn_error $? "packagedir only works with XEmacs" "$LINENO" 5 +case "$withval" in +yes) { ac_temp=./conftemp.$$ +ac_output=confout.$$ +rm -f $ac_temp $ac_output +cat >$ac_temp <<\_ACEOF +(defun ac-temp-func () +(princ (expand-file-name "../site-packages" data-directory)) +(princ "\n") ; make sure the output has trailing newline. +) +_ACEOF +$EMACS -batch -q -l $ac_temp -f ac-temp-func | sed -e '/^ *$/d' > $ac_output +packagedir=`cat $ac_output` +rm -f $ac_temp $ac_output; } +;; +no) unset packagedir ;; +*) packagedir="$withval" ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $packagedir" >&5 +$as_echo "$packagedir" >&6; } +fi + + + + +if test "$emacstype" = xemacs && test -n "$packagedir"; then + lispdir='${packagedir}/lisp' + docdir='${datadir}/howm/doc' + extdir='${datadir}/howm/ext' +fi + + +# Check whether --with-lispdir was given. +if test "${with_lispdir+set}" = set; then : + withval=$with_lispdir; lispdir="$withval" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5 +$as_echo_n "checking where .elc files should go... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lispdir" >&5 +$as_echo "$lispdir" >&6; } +else + + if test x${lispdir+set} != xset; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5 +$as_echo_n "checking where .elc files should go... " >&6; } +if test "${am_cv_lispdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + { ac_temp=./conftemp.$$ +ac_output=confout.$$ +rm -f $ac_temp $ac_output +cat >$ac_temp <<\_ACEOF +(defun ac-temp-func () +(defvar result nil) +(setq load-path (nreverse load-path)) +(while load-path + (if (string-match "\\`\\(.+/site-lisp\\)/?\\'" (car load-path)) + (setq result (match-string 1 (car load-path)) + load-path nil) + (setq load-path (cdr load-path)))) +(princ (or result (expand-file-name "../site-lisp" data-directory))) +(princ "\n") ; make sure the output has trailing newline. +) +_ACEOF +$EMACS -batch -q -l $ac_temp -f ac-temp-func | sed -e '/^ *$/d' > $ac_output +am_cv_lispdir=`cat $ac_output` +rm -f $ac_temp $ac_output; } + if test -z "$am_cv_lispdir"; then + am_cv_lispdir='${datadir}/emacs/site-lisp' + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_lispdir" >&5 +$as_echo "$am_cv_lispdir" >&6; } + lispdir="$am_cv_lispdir" + fi + +fi + + + + +# Check whether --with-howmdir was given. +if test "${with_howmdir+set}" = set; then : + withval=$with_howmdir; howmdir="$withval" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where howm files should go" >&5 +$as_echo_n "checking where howm files should go... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $howmdir" >&5 +$as_echo "$howmdir" >&6; } +else + +if test -z "${howmdir}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where howm files should go" >&5 +$as_echo_n "checking where howm files should go... " >&6; } +if test "${ac_cv_howmdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_howmdir='${lispdir}/howm' + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_howmdir" >&5 +$as_echo "$ac_cv_howmdir" >&6; } + howmdir="$ac_cv_howmdir" +fi + +fi + + + +# Check whether --with-docdir was given. +if test "${with_docdir+set}" = set; then : + withval=$with_docdir; docdir="$withval" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where doc files should go" >&5 +$as_echo_n "checking where doc files should go... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $docdir" >&5 +$as_echo "$docdir" >&6; } +else + +if test -z "${docdir}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where doc files should go" >&5 +$as_echo_n "checking where doc files should go... " >&6; } +if test "${ac_cv_docdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_docdir='${datadir}/howm/doc' + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_docdir" >&5 +$as_echo "$ac_cv_docdir" >&6; } + docdir="$ac_cv_docdir" +fi + +fi + + + +# Check whether --with-extdir was given. +if test "${with_extdir+set}" = set; then : + withval=$with_extdir; extdir="$withval" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where ext files should go" >&5 +$as_echo_n "checking where ext files should go... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $extdir" >&5 +$as_echo "$extdir" >&6; } +else + +if test -z "${extdir}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where ext files should go" >&5 +$as_echo_n "checking where ext files should go... " >&6; } +if test "${ac_cv_extdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_extdir='${datadir}/howm/ext' + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extdir" >&5 +$as_echo "$ac_cv_extdir" >&6; } + extdir="$ac_cv_extdir" +fi + +fi + + + +# Check whether --with-endir was given. +if test "${with_endir+set}" = set; then : + withval=$with_endir; +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-endir is obsolete. no need. no effect." >&5 +$as_echo "$as_me: WARNING: --with-endir is obsolete. no need. no effect." >&2;} + +fi + + + +# Check whether --with-jadir was given. +if test "${with_jadir+set}" = set; then : + withval=$with_jadir; +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-jadir is obsolete. no need. no effect." >&5 +$as_echo "$as_me: WARNING: --with-jadir is obsolete. no need. no effect." >&2;} + +fi + + + + + + +# link files +if test `cd ${srcdir}; pwd` != `pwd`; then + ac_config_commands="$ac_config_commands link-lisp" + +# AC_CONFIG_LINKS(doc/howm.info:doc/howm.info) +fi + +ac_config_files="$ac_config_files Makefile doc/Makefile ext/Makefile en/Makefile ja/Makefile sample/Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.67. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.67, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +howm_ln_s="${LN_S}" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "link-lisp") CONFIG_COMMANDS="$CONFIG_COMMANDS link-lisp" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "ext/Makefile") CONFIG_FILES="$CONFIG_FILES ext/Makefile" ;; + "en/Makefile") CONFIG_FILES="$CONFIG_FILES en/Makefile" ;; + "ja/Makefile") CONFIG_FILES="$CONFIG_FILES ja/Makefile" ;; + "sample/Makefile") CONFIG_FILES="$CONFIG_FILES sample/Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "link-lisp":C) + rm -f *.el + ${howm_ln_s} ${ac_srcdir}/*.el . + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/site-lisp/howm/configure.in b/site-lisp/howm/configure.in new file mode 100644 index 0000000..31cddc3 --- /dev/null +++ b/site-lisp/howm/configure.in @@ -0,0 +1,169 @@ +# shamelessly copied from navi2ch-cvs-0.0.20031209 +# $Id: configure.in,v 1.225 2012-12-29 00:59:48 hira Exp $ + +AC_INIT(howm.el) +AM_INIT_AUTOMAKE(howm, "test130321") +AM_MAINTAINER_MODE + +# Emacs set environment variable EMACS as t +test "x$EMACS" = xt && unset EMACS + +emacsen="emacs xemacs" + +AC_CANONICAL_HOST + +case "$host_os" in +*cygwin*) + with_bash=yes + emacsen="$emacsen MeadowNT.exe Meadow95.exe Meadow.exe" + ;; +esac + +AC_ARG_WITH(bash, +[ --with-bash Use Bash to build], +[case "$withval" in +yes) SHELL=bash ;; +no) ;; +*) SHELL="$withval" ;; +esac]) + +AC_ARG_WITH(xemacs, +[ --with-xemacs Use XEmacs to build], +[case "$withval" in +yes) emacsen="xemacs" ;; +no) emacsen="emacs" ;; +*) EMACS="$withval" ;; +esac]) + +AC_ARG_WITH(emacs, +[ --with-emacs Use Emacs to build], +[case "$withval" in +yes) emacsen="emacs" ;; +no) emacsen="xemacs" ;; +*) EMACS="$withval" ;; +esac]) + +if test -n "${with_xemacs+set}" && test -n "${with_emacs+set}"; then + AC_MSG_ERROR(specify one of --with-xemacs or --with-emacs) +fi + +AC_CHECK_PROG(CVS, cvs, cvs -z3, :) +AC_PROG_LN_S + +AC_CHECK_PROGS(EMACS, ${emacsen}, no) +if test "$EMACS" = "no"; then + AC_MSG_ERROR(cannot find emacs) +fi + +AC_MSG_CHECKING([detecting your emacs type]) +AC_EMACS_LISP(emacstype, [dnl +(princ (cond ((featurep 'xemacs) 'xemacs) + ((>= emacs-major-version 21) 'emacs21) + ((= emacs-major-version 20) 'emacs20) + (t 'UNKNOWN)))]) +AC_MSG_RESULT([$emacstype]) + +if test -z "$emacstype" || test "$emacstype" = UNKNOWN; then + AC_MSG_ERROR(this package does not work on your emacs) +fi + +# detect packagedir +AC_ARG_WITH(packagedir, +[ --with-packagedir[[=DIR]] Use package directory + (With XEmacs, this option also sets + docdir, lispdir, etc...)], +[ AC_MSG_CHECKING([where package files should go]) +test "$emacstype" != xemacs && AC_MSG_ERROR(packagedir only works with XEmacs) +case "$withval" in +yes) AC_EMACS_LISP(packagedir, [dnl +(princ (expand-file-name "../site-packages" data-directory))]) +;; +no) unset packagedir ;; +*) packagedir="$withval" ;; +esac +AC_MSG_RESULT([$packagedir])]) + +AC_SUBST(packagedir) + +if test "$emacstype" = xemacs && test -n "$packagedir"; then + lispdir='${packagedir}/lisp' + docdir='${datadir}/howm/doc' + extdir='${datadir}/howm/ext' +fi + +AM_PATH_LISPDIR + +AC_ARG_WITH(howmdir, +[ --with-howmdir=DIR Override the default howm directory], +[ howmdir="$withval" +AC_MSG_CHECKING([where howm files should go]) +AC_MSG_RESULT([$howmdir])], +[ +if test -z "${howmdir}"; then + AC_CACHE_CHECK([where howm files should go], [ac_cv_howmdir], [dnl + ac_cv_howmdir='${lispdir}/howm' + ]) + howmdir="$ac_cv_howmdir" +fi +]) + +AC_ARG_WITH(docdir, +[ --with-docdir=DIR Override the default docs directory], +[ docdir="$withval" +AC_MSG_CHECKING([where doc files should go]) +AC_MSG_RESULT([$docdir])], +[ +if test -z "${docdir}"; then + AC_CACHE_CHECK([where doc files should go], [ac_cv_docdir], [dnl +dnl AC_EMACS_LISP(ac_cv_docdir,[dnl +dnl (princ (expand-file-name "howm/doc" data-directory))]) +dnl if test -z "$ac_cv_docdir"; then +dnl ac_cv_docdir='${datadir}/pixmaps/howm' +dnl fi + ac_cv_docdir='${datadir}/howm/doc' + ]) + docdir="$ac_cv_docdir" +fi +]) + +AC_ARG_WITH(extdir, +[ --with-extdir=DIR Override the default ext directory], +[ extdir="$withval" +AC_MSG_CHECKING([where ext files should go]) +AC_MSG_RESULT([$extdir])], +[ +if test -z "${extdir}"; then + AC_CACHE_CHECK([where ext files should go], [ac_cv_extdir], [dnl + ac_cv_extdir='${datadir}/howm/ext' + ]) + extdir="$ac_cv_extdir" +fi +]) + +AC_ARG_WITH(endir, +[ --with-endir=DIR Obsolete. no need. no effect.], +[ +AC_MSG_WARN([--with-endir is obsolete. no need. no effect.]) +]) + +AC_ARG_WITH(jadir, +[ --with-jadir=DIR Obsolete. no need. no effect.], +[ +AC_MSG_WARN([--with-jadir is obsolete. no need. no effect.]) +]) + +AC_SUBST(howmdir) +AC_SUBST(docdir) +AC_SUBST(extdir) + +# link files +if test `cd ${srcdir}; pwd` != `pwd`; then + AC_CONFIG_COMMANDS([link-lisp], + [ + rm -f *.el + ${howm_ln_s} ${ac_srcdir}/*.el . + ], [howm_ln_s="${LN_S}"]) +# AC_CONFIG_LINKS(doc/howm.info:doc/howm.info) +fi + +AC_OUTPUT([Makefile doc/Makefile ext/Makefile en/Makefile ja/Makefile sample/Makefile]) diff --git a/site-lisp/howm/doc/CL-HOWM.ja.rd b/site-lisp/howm/doc/CL-HOWM.ja.rd new file mode 100644 index 0000000..8db7cc8 --- /dev/null +++ b/site-lisp/howm/doc/CL-HOWM.ja.rd @@ -0,0 +1,148 @@ +=begin + += ChangeLog Memo と howm + +ChangeLog Memo 上でも howm が使えます. +(ChangeLog Memo 内で自己リンク) --- Case I + +また, ChangeLog Memo と howm の併用もできます. +(ChangeLog Memo と howm memo との間で相互リンク) --- Case II + +※ I と II の両立はできません. +インストール法なども違いますので, +どちらかを選んで該当する節をお読みください. + +== 何がうれしい? + +* ChangeLog Memo 上で howm のリンク機能が使える + +* M-x occur, clgrep に加えて + * @ を押せば表示形式をトグル (occur 風 ←→ clgrep 風) + * occur 風表示では, RET を押さなくてもリアルタイムに内容を表示 + * さらにソートや多段の絞り込みも可能 + +* 例の浮沈式 todo list が使える + +* メモ本体を汚さない + * いつでもやめて, 素の ChangeLog に戻れる + += ■ (Case I) ChangeLog Memo 上で howm + +ChangeLog Memo 内で自己リンクを張ります. + +== できること + +* 素の ChangeLog に加えて + * goto link + * 「>>> ほげ」の上で RET → 「ほげ」を検索 + * 「>>> ~/hoge.txt」の上で RET ×2 → ファイルを開く + * 「>>> ~/hoge.pdf」の上で RET ×2 → 外部 viewer で開く + * come-from link + * 「* ほげ: ふがふが」という entry を書けば, + メモ中の「ほげ」がすべてリンクに + * 「ほげ」の上で RET → 「ほげ」の一覧 + * wiki link + * [[ほげ]] の上で RET → entry 「ほげ」を追加 + * 以後は, [[ほげ]] の上で RET ×2 → entry 「ほげ」に飛ぶ + +== インストール + +* 想定例 + * ~/elisp/howm/ に一式を展開 + * ~/memo/clmemo.txt にメモをとる + +* 手順例 + * メニューファイルをコピー + cp ~/elisp/howm/ja/0000-00-00-000000.txt ~/.howm-menu + * 以下を .emacs に + ;; 設定に応じて + (setq load-path (cons "~/elisp/howm" load-path)) + (setq howm-directory "~/memo") + (setq howm-file-name-format "clmemo.txt") + ;; 以下は決まり文句 + (setq howm-menu-lang 'ja) + (setq howm-menu-file "~/.howm-menu") + (require 'howm-mode) + (howm-setup-change-log) + +* アンインストール例 + * メモ本体は汚さないので, これだけで OK + rm ~/.howm-* + rm -rf ~/elisp/howm + vi ~/.emacs + +== 使い方 + +* ふつうに ChangeLog Memo をとってください +* entry に下線がつくので, その上で RET → 検索結果の一覧 +* 一覧では + * RET → jump + * q → quit +* 詳しくは README 等を参照 + += ■ (Case II) ChangeLog Memo と howm の併用 + +ChangeLog Memo と howm memo との間で相互リンクを張ります. + +== できること + +* ChangeLog Memo 上でも「<<< ほげ」「>>> ほげ」「[[ほげ]]」が機能 +* <<< で指定したキーワードは, ChangeLog Memo 上でも下線 → ジャンプ + +== インストール + +* howm を普通にインストール +* .emacs に以下を追加 + (add-hook 'change-log-mode-hook 'howm-mode) + (eval-after-load "howm-view" + '(setq howm-view-title-regexp + (concat howm-view-title-regexp + "\\|^[0-9-]+[ \t]+<.*>$"))) + +== 使い方 + +* ~/howm/ChangeLog に ChangeLog Memo をとってください. +* ChangeLog から howm へ + * ChangeLog Memo 上で M-x howm-from-change-log + → howm で新規メモを開いてタイトルをコピー + * ChangeLog Memo 上で [[ほげ]] と書き, (カーソル戻して)その上で RET + → <<< ほげ という howm memo を作る +* howm から ChangeLog へ + * howm memo 上で M-x howm-to-change-log + → ChangeLog Memo を開いてタイトルをコピー +* 相互に + * どちらのメモからも, 日付上で RET + → その日付のメモを両方一覧 + +== 補足 + +howm memo で RD 形式をお使いの方は, +(()) +も併用すると便利かもしれません. +上の howm-to-change-log のかわりに, 次の機能が使えます. + +* M-x rd-to-change-log → ChangeLog Memo を開いて章・節のタイトルをコピー + * 例 + * howm memo にこう書いてたら… + = ほげ + … + == ふが + … + == ぴよ + … + ■ ← カーソル + * こんな ChangeLog ができる + 2003-12-03 Foo Bar + * ほげ + - ぴよ + * 注 + * カーソルが属する章(=), 節(==)のタイトルを抽出します + * 「ほげ」にカーソルを置いた場合, == のタイトルはコピーされません + * C-u M-x rd-to-change-log なら, その章のすべての節のタイトルを抽出します + 2003-12-03 Foo Bar + * ほげ + - ふが + - ぴよ + + +=end diff --git a/site-lisp/howm/doc/ChangeLog b/site-lisp/howm/doc/ChangeLog new file mode 100644 index 0000000..80f5cee --- /dev/null +++ b/site-lisp/howm/doc/ChangeLog @@ -0,0 +1,265 @@ +2012-12-29 HIRAOKA Kazuyuki + + * index-j.html: add link to howmm. fix link to howm-mode.vim. + +2011-01-01 HIRAOKA Kazuyuki + + * README.ja.rd: support new commands. + + * README.ja.rd: move old changelogs to OLD.rd + +2010-12-31 HIRAOKA Kazuyuki + + * README.ja.rd: update 2ch URL. add customization examples. + + * OLD.rd: ditto. + + * index-j.html: delete obsolete links. + + * index.html: ditto. + +2010-12-30 HIRAOKA Kazuyuki + + * index-j.html: add link to QFixHowm. + +2010-12-29 HIRAOKA Kazuyuki + + * README.ja.rd: update obsolete descriptions. + + * OLD.rd: ditto. + +2009-07-23 HIRAOKA Kazuyuki + + * README.ja.rd: update table of contents. + +2009-05-02 HIRAOKA Kazuyuki + + * index-j.html: fix link. + +2009-01-01 HIRAOKA Kazuyuki + + * README.ja.rd: + add summary-match-string. + delete emacs19. + link to howm-helper. + remove "todo" and "bug" sections. + update URLs. + + * index-j.html: link to howm-helper + +2008-12-30 HIRAOKA Kazuyuki + + * index-j.html: delete debian package + + * index.html: ditto. + +2008-07-16 HIRAOKA Kazuyuki + + * index-j.html: move old announce to OLD.rd + + * README.ja.rd: move old changes to OLD.rd + +2008-05-14 HIRAOKA Kazuyuki + + * index.html: link to howm-1.3.5 + +2008-04-07 HIRAOKA Kazuyuki + + * index.html: add customization example for efficiency + +2007-04-11 HIRAOKA Kazuyuki + + * README.ja.rd: add Whem. + +2007-03-01 HIRAOKA Kazuyuki + + * README.ja.rd: update 2ch URL. + +2007-01-18 HIRAOKA Kazuyuki + + * README.ja.rd: update 2ch URL. + +2006-09-12 HIRAOKA Kazuyuki + + * README.ja.rd: change on 2006-09-10 is canceled. + +2006-09-10 HIRAOKA Kazuyuki + + * README.ja.rd: + M-x customize-variable howm-menu-todo-priority for %reminder. + +2006-06-13 HIRAOKA Kazuyuki + + * README.ja.rd: + link to yaswiki is removed because of error response. + link to BugReportFAQ is added insteadly. + +2006-05-15 HIRAOKA Kazuyuki + + * README.ja.rd: + description about "always howm-remember" in menu mode. + thx > http://pc10.2ch.net/test/read.cgi/unix/1141892764/99 + +2006-05-11 HIRAOKA Kazuyuki + + * index.html: + link to "much kinder tutorial by Dave O'Toole san" is removed + because http://dto.twu.net/HowmTutorial.howm.html is not found now. + thx > ganba san + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?e.BBS + + * README.rd: ditto. + + * README.ja.rd: link to elscreen + +2006-02-12 HIRAOKA Kazuyuki + + * README.rd: fix typo (@ ==> -) and misspelling. + thx > Highfly san + http://lists.sourceforge.jp/mailman/archives/howm-eng/2006/000018.html + +2006-02-08 HIRAOKA Kazuyuki + + * README.ja.rd: + mention gc-cons-threshold + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/220-236n + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/934 + +2006-01-24 HIRAOKA Kazuyuki + + * README.ja.rd: + add thx link to http://pc8.2ch.net/test/read.cgi/unix/1077881095/42 + +2006-01-17 HIRAOKA Kazuyuki + + * README.ja.rd: link to BugReportFAQ + +2005-12-01 HIRAOKA Kazuyuki + + * README.ja.rd: update link to Hidemaru porting + + * index-j.html: ditto. + +2005-11-12 HIRAOKA Kazuyuki + + * README.ja.rd: jump from menu to each reminder + thx > Kaneko Kensuke san + http://d.hatena.ne.jp/a666666/20051110/1131621183 + + * README.ja.rd: link to Hidemaru porting + + * index-j.html: ditto. + +2005-11-11 HIRAOKA Kazuyuki + + * CL-HOWM.ja.rd: describe merits of sort and filter. + +2005-10-24 HIRAOKA Kazuyuki + + * Makefile.am (MAINTAINERCLEANFILES): + move *.html from CLEANFILES to MAINTAINERCLEANFILES + so that users can try make clean && make without rdtool. + +2005-10-21 HIRAOKA Kazuyuki + + * README.ja.rd: describe that 'configure --with-xemacs' changes + default lispdir to /usr/lib/xemacs/site-lisp/howm. + thx > 2ch 797 san + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReport + +2005-10-18 HIRAOKA Kazuyuki + + * README.ja.rd: explain configure --with-xemacs + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/810 + +2005-10-13 HIRAOKA Kazuyuki + + * README.ja.rd: remove incorrect description. + 'd' key on date format is never implemented. + +2005-09-13 HIRAOKA Kazuyuki + + * README.rd: 'search' is corrected to 'search for' + +2005-09-02 HIRAOKA Kazuyuki + + * README.ja.rd: explain howm-en-dir and howm-ja-dir + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/501-502n + thx > http://www.meadowy.org/meadow/netinstall/ticket/5 + +2005-08-29 HIRAOKA Kazuyuki + + * index-j.html: correct RD label + +2005-08-17 HIRAOKA Kazuyuki + + * index.html: email address is removed. + +2005-08-12 HIRAOKA Kazuyuki + + * README.ja.rd: fix + - my-howm-next-hit was broken. + - howm-view-search-in-result-correctly doesn't affect filter-by-date. + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/779 + +2005-08-01 HIRAOKA Kazuyuki + + * README.rd: add alias, customization, menu editing. + +2005-07-27 HIRAOKA Kazuyuki + + * README.ja.rd: update URL of howm-mode.vim + +2005-07-26 HIRAOKA Kazuyuki + + * README.ja.rd: add links to wema and LesserWiki + +2005-07-25 HIRAOKA Kazuyuki + + * index-j.html: correct anchor "#label:20" to "#label-20". + It depends on the version of rd2, perhaps. + +2005-07-16 HIRAOKA Kazuyuki + + * README.ja.rd: add comment on grep-2.5 multibyte feature + +2005-06-07 HIRAOKA Kazuyuki + + * Makefile.am (README.html): added to distribution. + + * README.rd: 'Repeat schedule' is added. + +2005-05-26 HIRAOKA Kazuyuki + + * index.html: M-x custom ==> M-x customize-group + +2005-05-24 HIRAOKA Kazuyuki + + * README.ja.rd: correct description of %here; args are quoted + +2005-05-08 HIRAOKA Kazuyuki + + * README.ja.rd: move old customize section to OLD.rd + +2005-05-06 HIRAOKA Kazuyuki + + * README.ja.rd: key bind R = [Update Menu] + +2005-04-02 HIRAOKA Kazuyuki + + * README.ja.rd: link to LinuxZaurus on howm-wiki + +2005-03-27 HIRAOKA Kazuyuki + + * OLD.rd: update 2ch URL (pc5 to pc8) + + * README.ja.rd: update 2ch URL (pc5 to pc8) + +2005-03-13 HIRAOKA Kazuyuki + + * index-j.html: update URL of howm-mode.vim + +2005-02-19 HIRAOKA Kazuyuki + + * index-j.html: add link to Meadow memo + diff --git a/site-lisp/howm/doc/Makefile.am b/site-lisp/howm/doc/Makefile.am new file mode 100644 index 0000000..596a4b8 --- /dev/null +++ b/site-lisp/howm/doc/Makefile.am @@ -0,0 +1,19 @@ +EXTRA_DIST = CL-HOWM.ja.rd OLD.rd README.ja.rd README.rd TUTORIAL.ja.rd \ + index-j.html index.html \ + README-j.html README.html \ + s-cat.png s-menu.png s-screen-shot.png s-search.png \ + come.png go.png updown.png todo.png +MAINTAINERCLEANFILES = README-j.html README.html + +doc_DATA = $(EXTRA_DIST) + +README-j.html: README.ja.rd + rd2 README.ja.rd > README-j.html + +README.html: README.rd + rd2 README.rd > README.html + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status diff --git a/site-lisp/howm/doc/Makefile.in b/site-lisp/howm/doc/Makefile.in new file mode 100644 index 0000000..d5149d4 --- /dev/null +++ b/site-lisp/howm/doc/Makefile.in @@ -0,0 +1,377 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(docdir)" +DATA = $(doc_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CVS = @CVS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EMACS = @EMACS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +howmdir = @howmdir@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +lispdir = @lispdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +packagedir = @packagedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = CL-HOWM.ja.rd OLD.rd README.ja.rd README.rd TUTORIAL.ja.rd \ + index-j.html index.html \ + README-j.html README.html \ + s-cat.png s-menu.png s-screen-shot.png s-search.png \ + come.png go.png updown.png todo.png + +MAINTAINERCLEANFILES = README-j.html README.html +doc_DATA = $(EXTRA_DIST) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +.PRECIOUS: Makefile + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-docDATA: $(doc_DATA) + @$(NORMAL_INSTALL) + test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" + @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ + done + +uninstall-docDATA: + @$(NORMAL_UNINSTALL) + @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(docdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(docdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-docDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-docDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-docDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-docDATA + + +README-j.html: README.ja.rd + rd2 README.ja.rd > README-j.html + +README.html: README.rd + rd2 README.rd > README.html + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/site-lisp/howm/doc/OLD.rd b/site-lisp/howm/doc/OLD.rd new file mode 100644 index 0000000..bcbcd56 --- /dev/null +++ b/site-lisp/howm/doc/OLD.rd @@ -0,0 +1,2435 @@ +=begin +$Id: OLD.rd,v 1.18 2012-08-16 09:52:06 hira Exp $ + +* 目次 + * ((<古い更新履歴>)) + * ((<古い告知>)) + * ((<旧版からの移行>)) + * ((<古いカスタマイズ法>)) + * ((<古い参考リンク>)) + += 古い更新履歴 + +== 1.3.x + +* リリース版 howm-1.3.9 [2010-12-30] + * Note + * ほとんど変更はありませんが, また一年ほどたったのでリリースしておきます. + * howm-test100702 との違いは, ドキュメントの微修正や ext/tag2plan の削除だけ. + * このリリースが済んだら, デフォルト設定を変えて + 隠し機能を公式化しただけのものを howm-1.4.0 としてリリースする予定です. + * fix + * メニューから y キー(または [予定] 上で RET)で予定表を開いたとき, + 内容バッファがカーソル位置のメモになっていなかった. + (()) + * ドキュメントの古い箇所を手直し + * メンテされていないツール(ext/tag2plan)を削除 + +* リリース版 howm-1.3.8 [2009-12-31] + * Note + * 大きな変更はありませんが, 一年たったのでリリースしておきます. + * howm-test090723 との違いは, howm-excluded-dirs に ".git" を + 追加しただけです. + * 変更・改良 + * 過ぎた〆切に着色 + (()) + * _darcs/ などを検索対象外に (howm-excluded-dirs). + (()) + * いまどきの GNU grep を使っているなら↓もしておくと無駄な検索を省けます. + (setq howm-view-grep-option "-Hnr --exclude-dir=_darcs") + * さらに, *.txt だけ検索するようにしたければ… + (setq howm-view-grep-option "-Hnr --exclude-dir=_darcs --include=*.txt") + * (()) との + 互換性のため, grep 呼び出し時にディレクトリ名末尾の / を削除. + (()) + * (()) + のために内部を少し掃除. + (()) + * fix + * C-c , l (howm-list-recent)時に該当ファイルが多すぎるとエラー. + (()) + (()) + * howm-view-use-grep を設定している場合に発症. + meadow だと "Spawning child process: exec format error" になるらしい. + * grep 呼び出し時のコマンドラインが howm-command-length-limit 以上に + 長いときは分割して呼び出すよう直しました. + * (setq howm-list-title t) していたら, + come-from リンク上で RET したときもタイトル一覧を表示するように. + (()) + * もし以前の動作がよければ, + M-x customize-variable RET howm-list-title RET し, + howm-keyword-search 以外をすべてセットしてください. + * メモを保存したときにメニューが自動更新されなくなっていた. + (howm-menu-expiry-hours を正に設定した場合のみ該当) + +* リリース版 howm-1.3.7 [2008-12-31] + * Note + * 内部的なコード整理と, こまごま改良・修正 + * howm-1.3.6 (もしくは howm-test080531) 以前で + 変数 howm-list-normalizer を設定していた場合は, + その設定を止め, 変数 howm-normalizer を設定してください + * 自動読みかえも一応試みてはいますが… + * howm-1.3.7rc4 とほぼ同じものです + * 不本意に "Wrote ..." が表示されるバグを直しました + * 変更・改良 + * 非互換な変更 + * 旧変数 howm-list-normalizer から新変数 howm-normalizer へ + * 移行方法 + * M-x customize で設定していたなら, + M-x customize-variable howm-list-normalizer RET で + 「Off」を設定し, + M-x customize-variable howm-normalizer RET で改めて設定しなおす + * .emacs 等で (setq howm-list-normalizer 'howm-view-sort-by-○○) + と設定していたなら, 次のように書きかえる + (setq howm-normalizer 'howm-sort-items-by-○○) + * (setq howm-list-normalizer …それ以外の何か…) + と設定していたなら, + * lisp がわかる方: + 次の仕様変更にあわせて修正する + * 旧変数: 「現在の一覧を並べかえて表示し直す関数」を指定 + * 新変数: 「与えられたリストに対し, その並べかえを返す関数」を指定 + * lisp がわからない方: + ((<2ch UNIX 板 howm スレ|URL:http://hibari.2ch.net/test/read.cgi/unix/1141892764/l50>)) + か + (()) + でご相談を + * もし旧変数をセットしたままにしておくと… + * 単純に読みかえられそうなら, 新変数に読みかえて新処理を実行 + * 読みかえられなかったら, 旧処理を実行 (非効率) + * 「今日と明日の日付」は [YYYY-MM-DD] でなく YYYY-MM-DD を着色 + (()) + (()) + * 一覧やメニューのファイル名も, マッチすれば着色 + * 前のように戻したければ… + ;; 今日と明日の日付は, [YYYY-MM-DD] の形式だけ着色 + (setq howm-highlight-date-regexp-format (regexp-quote "[%Y-%m-%d]")) + * 一覧バッファ + * 検索時の内部的な一覧バッファ再表示を抑制 + * 一覧バッファからの X (dired-x) 時に, カーソルを対応ファイル名へ置く + (()) + > 797 さん + * 1.3.2 の隠し機能を公式化 & デフォルト化. + 変数 howm-view-dired-keep-cursor は削除しました. + * howm-view-summary-previous-section も「各ファイルの最初のヒット行」で + 止まるよう変更 + (()) + * 内容バッファで一アイテムだけ表示しているときは, + 区切り線「====>>> xxx.txt」を描かない. + (()) + * 一覧バッファのソート基準に summary-match-string を追加 + * 指定した正規表現にマッチした文字列の順にソート + * 例: 「2006-06-..」を指定すれば, 2006年6月の項目を日付順に + * ちなみに, summary-match は, マッチしたものを上位にもってくるだけ + * マッチしたものどうしの上下比較はしない + * メニュー + * メニューの %recent や %random でもファイル名欄を桁そろえ. + (()) > Mielke-san (peter.mielke at gmail.com) + * 変数 howm-menu-list-format は %recent および %random 用に + * 新変数 howm-menu-reminder-format が %schedule および %todo 用 + * メニューの %random% で, 同じファイルからは一項目しか選ばれないように + (()) + * メニューの曜日表記をリストで指定するよう変更. + 英語表記のデフォルトも "Sun" 等に直した. + (()) + (setq howm-day-of-week-ja '("日" "月" "火" "水" "木" "金" "土")) + (setq howm-day-of-week-en '("Sun" "Mon" "Tue" "Wed" "Thu" "Fri" "Sat")) + * っていうか, わざわざ独自に定義せずに + (format-time-string "%a") 決め打ちでも構わない? + * 初期メニューにボタンの説明を追加. + (()) + * いろいろ + * howm-view-grep-option に複数のオプションを書けるように. + (()) + (setq howm-view-grep-option "-Hnr --include=*.txt") ;; *.txt のみ検索 + * 単純に split-string してるだけ. + もっとまじめなのが必要ならお知らせください. + * 単語の途中がたまたま come-from キーワードに一致しても下線を引かない設定. + (()) > Mielke-san (peter.mielke at gmail.com) + ;; ASCII 文字のみのキーワードは, 単語途中にマッチしても下線を引かない + (setq howm-check-word-break "^[[:ascii:]]+$") + * 予定表, ToDo リストにも超過日数を表示. + (()) > Mielke-san (peter.mielke at gmail.com) + * .howm-history まわりの挙動を改善. + (()) + (()) + * バッファ一覧に表示しない + * "Wrote ..." を表示しない + * make test 時に ~/.howm-history を汚さない + * fix + * howm-menu-categorized-reminder で表示されない項目があった + (()) + * (setq howm-view-list-title-type 2) のとき C-c , a でエラー + (()) + * タイトルのないメモが C-c , a で表示されなかった + * howmoney が使えなくなっていた. + (()) + (()) + * 予定や todo が一つもないときに予定表や todo リストを呼び出した場合. + (()) + * 予定表や todo リストで action-lock-mode が不本意にトグル. + * howm2, howmkara の -exclude オプションに不具合. + (()) > dareka さん + * (())で C-c , t が「No match」に + (()) > taku さん + * 互換性を修復 + * howm-occur で一覧バッファの検索語がハイライトされなくなっていた + * 「<<< テスト <<< Test」の「Test」上で RET を叩いても「テスト」が + 検索されなかった + * howm-keyword-case-fold-search をセットしていたときの大文字小文字がらみ + * C-c , l でいちいち日付を聞かないように + (()) + * [2007-04-02] に作り込んだバグ + * 検索結果の一覧で「<<< ほげ」が先頭にこない場合があった + (()) + * (setq howm-list-title t) していると発症 + * remove-duplicates の仕様をよく知らなかったせい. 勉強になりました. + * (setq howm-list-title t) だと一覧バッファに前回の内容が表示されるバグ + * howm-view-contents-limit が効いていなかった + * 日付での絞り込み結果が一日分多すぎた + * narrowing 関連の不具合(widen 抜け) + (()) + * メニューの「%reminder」の底に, 過ぎた予定が表示されていた. + (()) + * メニュー中の「> 2006-07-26-015606 | …」の「7」上で RET を叩くとエラー. + (()) > na さん + * 変数 howm-menu-list-regexp の定義をちょっと直しただけ + * 異なるディレクトリの同名ファイルが一覧表示で混同されていた. + (()) + * howm-view-split-horizontally が t でも nil でもないときの特別な動作を廃止. + (()) + * howm-1.2 〜 1.3.7rc2 で壊れていたが, バグレポートなし. + きっと誰も使っていない ^^; + +* リリース版 howm-1.3.6 [2008-05-31] + * fix: 2008-02-24 以降の CVS 先端 emacs で, 他バッファの着色が乱れる. + (()) + * minor mode が font-lock-keywords-only を直に触るのは行儀悪い? + * howm-test20080514 からのバックポート + * (howm-1.3.6rc1 と中身は同じです) + +* リリース版 howm-1.3.5 [2007-12-09] + * fix: 夏時間最終日に当日の予定がメニューに表示されなかった. + (()) > Mielke-san (peter.mielke at gmail.com) + * howm-test071108 からのバックポート + * fix: 順不同でバイトコンパイルできるように + * Wanderlust や Navi2ch を参考にして, + 巡回依存の扱い方(require の書き方)を修正 + * howm-test07-05-18 からのバックポート + * automake を 1.6 から 1.10 に + * howm-test07-05-05 からのバックポート + * automake-1.10 の elisp-comp が使えるようになった + * (howm-1.3.5rc1 と中身は同じです) + +* リリース版 howm-1.3.4 [2006-12-16] + * セキュリティ修正 + (()) + * 何が問題? + * Emacs には, ファイルごとにローカル変数を自動設定する機能があります. + これを悪用すると, howm 使用時に任意の命令を自動実行させることができます. + (()) + * どう直した? + * howm 関連の全シンボルに risky-local-variable 属性をセットし, + 上述の自動設定時にチェックが入るようにしました. + * バージョンアップしたくない/できないのですが? + * ソースの編集が可能なら, + howm.el の末尾に以下のコードを加えるのが確実です. + バイトコンパイルのしなおしもお忘れなく. + ;; howm-1.2.2 以降用. howm 関連の全シンボルに risky-local-variable 属性. + (mapcar (lambda (symbol) (put symbol 'risky-local-variable t)) + (howm-symbols)) + * それが困難な場合は .emacs に以下を加えてください. + (eval-after-load "howm" ; ← autoload/load/require の記述にあわせて + ;; howm-1.2.2 以降用. howm 関連の全シンボルに risky-local-variable 属性. + '(mapcar (lambda (symbol) (put symbol 'risky-local-variable t)) + (howm-symbols))) + * どちらにせよ, 修正が反映されたことをご確認ください. + * emacs を立ち上げ直し, howm を起動 + * 以下を *scratch* バッファに貼り, 閉じ括弧の後にカーソルを置いて C-j を + 押す + (get 'howm-version 'risky-local-variable) + * t と表示されれば OK + * ローカル変数の自動設定をあえて使いたいときは? + * 以下のように変数ごとに解禁してください. + ;; 例: 変数 howm-auto-narrow はファイルごとの自動設定を許可 + (put 'howm-auto-narrow 'risky-local-variable nil) + * howm に限らず, ローカル変数の自動設定を一切使えなくするには? + * .emacs に以下を加えてください. + ただし emacs のバージョンによっては不完全かもしれません. + (()) + ;; ローカル変数の自動設定をオフ + (setq enable-local-variables nil) + * fix: CVS 先端 emacs でメニューなどに色がつかない + (()) + * 修正は, cheat-font-lock-20040624-format-p の定義中の = を >= に直すだけ + * howm-test061015 からのバックポート + +* リリース版 howm-1.3.3 [2006-06-05] + * Note + * 最新の Emacs 22.0.50 (CVS HEAD) にたぶん対応 + * Meadow 3.00-dev や Carbon Emacs もこれに相当します. + これら「リリース前の開発版最先端 Emacs」 + を今後も追い続ける方は, howm もテスト版を覗いてみてください. + * ファイル構成を少々変更 + * make install 以外の方法でインストールする場合はご確認ください. + 初期メニュー 0000-00-00-000000.howm の手動コピーは不要になりました. + * メニューの todo 一覧では潜伏中の項目もデフォルトで表示 + * デフォルトは「安全側」に倒しておく方が良いでしょう. + これまで通り隠す方法は下の「変更」を参照ください. + * その他, grep の文字コードに関する修正や, 隠し機能など + * 隠し機能では, メモとりをさらに手軽にする M-x howm-remember が + 好評のようです. + * howm-1.3.3rc1 や howm-test060515 と中身は同じ + * meadow3 でハマった人が多そうなのでリリースする気になりました. + 「不安定な開発版」という感じじゃなくもう一般に普及しているのかな… + * 変更・改良 + * メニューの todo 一覧では潜伏中の項目もデフォルトで表示 + (()) + (()) + * 隠したければ M-x customize-variable howm-menu-todo-priority + * grep 時の文字コード設定 howm-process-coding-system で, + 入力と出力に別の値を指定できるようにした + (()) + ;; process (UTF-8)→ emacs + ;; emacs →(SJIS) process + (setq howm-process-coding-system '(utf-8-unix . sjis-unix)) + * メニューの「> …」で RET したとき, 「…」を検索するのでなく, + 対応ファイルを直接開く + (()) + * ファイル構成やインストール手順について + * 言語依存の変数を howm-lang-{en,ja}.el へ分離 + * configure の新オプション --with-howmdir. + thx > 本庄さん + * *.el と *.elc はここへインストールされる + * lispdir のデフォルトは, …/site-lisp/howm から …/site-lisp に変更 + * 初期メニューテンプレートのインストール法を変更 + thx > 本庄さん, 銭谷さん + (()) + (()) + * 従来は, /usr/local/share/howm/{en,ja}/0000-00-00-000000.howm + に置いて, 定数 howm-{en,ja}-dir でその位置を指定 + * インストールし忘れや相対パスにより, トラブルが生じていた + * インストールしない場合, 0000-00-00-000000.howm の手動コピーが必要 + * 今後は, howm-menu-{en,ja}.el + * howm を初めて使うときのみ, 定数 howm-menu-{en,ja} を読み込みます + * メモリにかかえ込むのがひんしゅくなら, + 「使用後に値を破棄」という小細工も考えられます. + もし必要だったらお知らせください. + (今どき数キロバイトなんて誤差範囲?) + * 0000-00-00-000000.howm の手動コピーは完全に不要となったつもり + * 結局こんな流れ + ja/0000-00-00-000000.howm + ↓リリース時に作者が生成 (実際は howm-mkmenu.el で自動化) + howm-menu-ja.el + ↓make install + $lispdir/howm/howm-menu-ja.elc + ↓howm を初めて使ったときだけ読み込んで自動生成 + ~/howm/0000-00-00-000000.howm + * fix + * CVS 先端 emacs で make するとエラー + "Font-lock trying to use keywords before setting them up". + (()) + (()) + (()) + (()) + (()) + (()) + (()) + (()) + * grep 時の howm-process-coding-system の処理タイミングにバグ + (()) + (()) + * migemo-client のオプションを追加指定可能に + (()) + (setq howm-migemo-client-option '("-H" "::1")) + * howm-view-grep-option あたりとの不統一が気になるので, + コマンド指定一般の拡張仕様案(とりあえず案だけ). おおげさすぎ? + nil ;; → デフォルト + "コマンド名" + ("コマンド名" "オプション" … "オプション") + 関数名 ;; → コマンドのかわりに elisp の関数を実行 + * howm-kill-all は .howm-keys バッファも消すべき + (()) + * howm-mode-off-hook の定義がだぶっていた. + thx > 竹村さん + * (()) + でエラーが出ていたそう. + (()) + > (TxT) さん + * emacs20 で M-x howm-bug-shot がエラーになっていた. + (()) + > 逃避さん + +* リリース版 howm-1.3.2 [2005-11-04] + * Note + * 主に, 小さなバグ修正だけ + * あとは隠し機能を少々 + * リリース予定版 1.3.2rc4 と同じものです + * 変更 + * メニューの [今日] (C-c , , .) でもデフォルトでタイトルを表示. + (()) + > nobu さん + * タイトル表示したくなければ… + * M-x customize-variable RET howm-list-title RET + * howm-action-lock-date-search のチェックをはずす + * [Save for Future Sessions] + * fix + * xemacs だと, メニュー内で [2005-10-15] のような + 日付上での RET がエラー + (()) + * xemacs だと, 一覧バッファからの X (dired-x) がエラー + (()) + > 797 さん + * ついでに, 同じファイルが何度も表示されるのを修正 + * howm-view.el に (require 'riffle) を追加 + (()) + * Makefile 以外の手順でバイトコンパイルすると M-x howm-menu がエラー + (()) + (()) + +* リリース版 howm-1.3.1 [2005-08-17] + * xemacs でやけに遅くなっていたのを修正 + (xemacs のバージョンにもよるのかも) + * 環境変数 LC_ALL, LC_CTYPE, LANG を設定しないとエラーが出ていたのを修正 + (()) + * この README の 修正 + (()) + * my-howm-next-hit のコードを更新 + * howm-view-search-in-result-correctly を設定しても, + date での絞り込みはファイル単位 + * 当面は仕様. 一日一ファイルまでなら問題ないはず. + * 一月一ファイル・全メモ一ファイルなどだと問題. + * 「指定月のメモ一覧」とかでっちあげようかとも思いましたが, + 自分の場合は長くなりすぎて役に立たなそうなので, やめました. + ご意見があればお聞かせください. + * 一覧で, 前と同じ名前もいちいち表示 + (()) + (setq howm-view-summary-omit-same-name nil) + * あとは隠し機能を少々 + * リリース予定版 1.3.1rc1 と同じものです + +* リリース版 howm-1.3.0 [2005-08-02] + * Note + * 目玉 + * come-from キーワードの alias + * M-x customize 対応 ([Applications] → [Howm]) + * この README の((<カスタマイズ>))はがさがさ削りました. + * 検索履歴 + * 一覧時のタイトル表示 + * 一覧に同じファイル名をくり返し表示しない + * 自動酔歩 + * メニューに最近のメモ一覧・ランダム選択一覧 + * メニューに [履歴] [酔歩] [設定] [時↓] を追加 + * すでに howm を使っていた場合, + make install しても勝手には追加されません. + メニューを自分で編集するか, + ja/0000-00-00-000000.howm を自分でコピーするかしてください. + * デフォルトを変更しました. 戻したければ .emacs などに↓を書いてください. + ;; タイトル表示は常時オフ + (setq howm-list-title nil) + ;; 検索履歴 + (setq howm-history-limit 0) ;; 検索履歴を記録しない + (setq howm-history-unique nil) ;; 検索履歴から重複を取り除かない + ;; grep -E/-F でなく egrep/fgrep + (setq howm-view-grep-command "egrep") + (setq howm-view-fgrep-command "fgrep") + (setq howm-view-grep-extended-option nil) + (setq howm-view-grep-fixed-option nil) + (setq howm-view-grep-file-stdin-option nil) ;; パターンは引数で渡す + ;; howm-template が関数だったときは, universal-argument を + ;; 引数にしてそいつを呼ぶ + (setq howm-template-receive-buffer nil) + ;; 一覧から RET で開くとき, 内容バッファのカーソル位置を保たない + (setq howm-view-summary-keep-cursor nil) + * テストにご協力くださる方は, ↓を試していただけると助かります. + ;; (隠し機能) + ;; 一ファイル複数メモのときも, 絞り込み等を + ;; ファイル単位じゃなくメモ単位に. + ;; ただし, date での絞り込みはファイル単位のまま. + (setq howm-view-search-in-result-correctly t) + * 内部実装の変更 (riffle.el) + * リリース予定版 howm-1.3.0rc5 と中身は同じです. + * 仕様変更 + * howm-template の値が関数だったときは, + 「universal-argument と((*直前のバッファ*))」を引数にしてそいつを呼ぶ + (()) + * 使用例 + ;; snap.el でのリンクを入れる + (setq howm-template #'my-howm-template) + (defun my-howm-template (which buf) ;; C-u 3 C-c , c なら which = 3 + (let ((snap (with-current-buffer buf + (or (snap-record-string) "")))) + (format "= %%title%%cursor\n%%date\n%s\n\n" snap))) + * 従来と互換に戻したければ… + ;; howm-template が関数だったときは, universal-argument を + ;; 引数にしてそいつを呼ぶ + (setq howm-template-receive-buffer nil) + * メニュー等からのリマインダ直叩き時, 叩き先の自動保存について… + * たとえ howm-action-lock-forward-save-buffer が non-nil でも, + 叩き前からすでに「該当バッファが modified」だったときは + 保存しない + * howm-todo-menu-types のデフォルトに "." も追加 + * デフォルト設定の変更 + * egrep/fgrep でなく grep -E/-F の方をデフォルトに. + 変数 howm-view-fgrep-command は将来廃止するかも. + (()) + * grep へは標準入力でパターンを渡す + * {全|最近|前後}メモ一覧にデフォルトでタイトル表示 + * 隠し機能の公式化 (▲ は「おすすめ」) + * 1.1.1.* 以前から + * howm-view-before-open-hook + * メニューの todo に旬度を表示可 + (()) + (setq howm-menu-todo-priority-format "(%8.1f)") + * デバッグ用変数 howm-call-process-last-command + * (setq howm-message-time t) すれば, 検索等に要した時間を表示 + * 1.2 から + * come-from キーワードの alias ▲ → ((<メモを書こう>)) + (()) + * メニュー + * メニューに「%recent」や「%random」 ▲ + (()) + (()) + * メニュー中に変数や関数の値を表示 + * 一覧 + * ソート法に「random」を追加 + (()) + * 一覧表示窓の行数設定 + (()) + (()) + (setq howm-view-summary-window-size 10) + * 「タイトル」の正規表現を, 機能ごとに変更可能 + (setq howm-list-title-regexp "^[*=] [^ ]") ;; 一覧表示 + (setq howm-menu-recent-regexp "^[*=] [^ ]") ;; メニュー中の %recent + * 一覧から RET で開くとき, 内容バッファのカーソル位置を保つ + (setq howm-view-summary-keep-cursor t) ;; ← デフォルトにしました + * ちょっと自信なし. 不具合出たら教えてください. + * 単語の途中にマッチしたものは後まわし + (setq howm-list-prefer-word t) + * 「euc」を検索したら, 「euclid」や「takeuchi」よりも, + 単語「euc」にマッチしたものを上に表示 + * ただし, 「<<< euclid」はあいかわらずてっぺんへ + * 新規メモ + * いま開いてるファイルに新規メモを追加: M-x howm-create-here + (()) + * 新規メモのファイル名を手動でつける: M-x howm-create-interactively + (()) + * こんな感じでしょうか? > 367 さん + * M-x howm-narrow-to-memo, M-x howm-toggle-narrow + (()) + * ついでに, M-x howm-toggle-narrow で, 隠す・見せるをトグル + * メモを開いたとき自動的に narrow に + (()) + (()) + (add-hook 'howm-view-open-hook 'howm-auto-narrow) + (add-hook 'howm-create-hook 'howm-auto-narrow) ;; 追加[2005-01-07] + * リマインダの「cancel」を違う言葉にカスタマイズ + (thx > NARA Shinsuke さん) + (setq howm-reminder-cancel-string "give up") + * 1.2.1 から + * M-x howm-history で検索履歴. 各履歴から RET で飛べる. ▲ + * (()) + や + (()) + に触発されて… + * 記録は, 「固定文字列検索」「絞り込み検索」「リンク」のみにしてみた + (()) + * 例によって「メニューに表示」もしたいけど, + 「メニューをキャッシュ」との兼ね合いが. + * 1.2.2 からは最大記録数を設定可 + * 1.3.0 からは重複を除去 + * 一ファイル複数メモのとき, 前・後・最初・最後のメモへ移動 + (narrowing も考慮) + (()) + * M-x howm-previous-memo + * M-x howm-next-memo + * M-x howm-first-memo + * M-x howm-last-memo + * ○○のときだけ自動 narrow. + ただし, 「>>> foo.howm」で foo.howm に飛んだときは narrow にしない. + (()) + ;; ↓デフォルトの動作に不満がなければ設定不要 + (setq howm-auto-narrow + ;; ↓に書いたコマンドでだけ narrow + '(howm-list-all howm-list-recent + howm-list-grep howm-list-grep-fixed howm-list-migemo + howm-list-related howm-list-around + howm-keyword-search)) ;; これは come-from リンク・goto リンク + * C-c , T (howm-insert-dtime) → [2004-09-01 23:26] とか記入 + (()) + (()) + (()) + * 1.2.2 から + * 自動酔歩 ▲ + * メニューに「%here%(howm-menu-search "ほげ")」と書けば, + 「ほげ」の検索結果を埋め込み ▲ + (thx > Konstantin Levinski (kostya@pmail.ntu.edu.sg)) + (()) + * 新規メモまわり + * 一ファイル複数メモのとき, 新しいメモは先頭に追加とする設定 ▲ + (()) + (setq howm-prepend t) + * 「ほげ」を検索して一覧した状態から新規メモを作ると, タイトルを「ほげ」に + (()) + (setq howm-title-from-search t) + * テキストを選択してから「新規メモ」 → そのテキストを自動挿入 + (()) + ;; transient-mark-mode でないと, この設定は無視される + (setq howm-content-from-region t) + * howm-create-here で, 有無を言わさず「現カーソル行に」新規メモ作成 + (()) + (setq howm-create-here-just t) + * 一覧からのソート基準に numerical-name を追加 + * 開発用 + * C-u M-x howm-bug-report で関連変数の一覧 + * M-x howm-elp で, プロファイラ elp の準備 + * その他の改良 + * M-x customize に対応 ([Applications] → [Howm]) + (()) + (()) + * 一覧バッファで, 同じファイル名をくり返し表示しない + (()) + * ついでに色もつけてみた. どなたかもっとましな配色をください. + (M-x customize-group RET howm-faces RET して, + howm-view-name-face と howm-view-empty-face) + * (参考) 関連する既存機能 + * TAB・ALT-TAB → 次・前のファイルへ + * u → 一つのメモは一行だけに + * @ → 連結表示すれば同じメモは一つにまとまる + * 一覧で T → タイトル表示を「トグル」 + * 1.2.1 の隠し機能から改良 + (()) + * メニュー内の一覧では, 行頭でなくても RET でジャンプ + * リマインダ直叩きで「臨時に開いたバッファ」を自動で閉じる + (()) + ;; 叩き先を自動で閉じる. undo できなくなるからおすすめしません. + (setq howm-action-lock-forward-kill-buffer t) + * howm-menu-lang のデフォルトは locale を見て決める + * ext/howm2 で「come-from キーワードの alias」をサポート + * あいかわらずやっつけ仕事. + …というか, 元がやっつけ仕事すぎて, もう解読できず. + * 内部実装 + * cl パッケージからの関数を howm-cl.el に分離. + いつか気合がはいれば追放しよう… + * make 時の警告「… not known to be defined」を抑制 + (()) + * riffle.el の仕様を変更(gfunc.el を使う). ユーザーには影響ないつもり. + (()) + もだいじょうぶと思うんだけど… + * バグ修正 + * 白黒機でエラー + (()) + * カラーディスプレイでないときは, 下線のかわりに反転表示して, + それ以外の飾りはなし + * %reminder の区切り線がずれる + (()) + * 一覧から T でタイトル表示したとき, 無タイトル分が多重表示されていた + * make test して C-c , s top [RET] T で発症 + * win で「…\.foo\…」などを検索対象としないように + (()) + * howm-message-time をセットしても「No match」メッセージを隠さないように + (()) + * メニューのリマインダ内で come-from キーワードに + 下線がつかなくなっていた. + (()) + +== 1.2.x + +* [2005-06-10] v1.2.4 + * bug fix + * howm-search-path 内の予定・todo がメニューに表示されなかった + (()) + * メニューに表示される予定の範囲が一日短かかった + * xemacs で, ファイルが少ないとメニューの %recent がエラーに + (()) + * メニュー上で C-c , r したときは「メニュー更新」 + (()) + * howm-menu-list-face のデフォルトを空に + (()) + * (require 'howm-mode) したら cl 未ロードでエラー + (()) + * howm-1.2 からは (require 'howm) が正式. + 「howm-mode」を require や autoload していたら, + 「howm」に直してください. + * (()) + でエラー (関数 howm-view-sort-items がない) + (()) + > (TxT) さん + * リマインダ直叩きでメニューが崩れる + (()) + * こんな設定で発症 + (setq howm-menu-expiry-hours 2) + (setq howm-action-lock-forward-save-buffer t) + * POBox の RET (変換確定)を奪ってしまう + * 実は POBox に限らず不本意な動作をしていた + (()) + * howm-message-time が真のときの所要時間表示は 1 秒未満も計測 + (()) + * [2005-03-09] にコメントアウトされていた(理由失念)のを戻した + * リリース予定版 howm-1.2.4rc7 との違いは… + * ext/howmkara, ext/hsplit.rb, doc/README.html を配布ファイルに追加 + +* [2005-05-07] v1.2.3 + * bug fix + * C-c , s RET のように空文字列を検索したときは, 全メモ一覧 + (()) + * make でなく手動 byte-compile したら(?), %reminder でエラー + (()) + * リリース予定版 howm-1.2.3rc1 [2005-05-06] とほとんど同じです + +* [2005-05-02] v1.2.2 + * Note + * 表面上ほぼ変化なし. 内部に手をいれて拡張性を高めた(バックエンド切り離し). + * 後述の隠し機能は, やっぱりまだ隠し + * 詰めが甘くても使ってくださるなら, このへんがおすすめ + * come-from キーワードの alias + * メニューに「%reminder」「%recent」「%random」 + 「%here%(howm-menu-search "ほげ")」 + * M-x howm-list-buffers, M-x howm-list-mark-ring + * M-x howm-random-walk + * 気になる指摘もあるけど, どうもはっきりせず, 見切り. + 再現できた方はお知らせください. + (()) + * 途中から ChangeLog をつけはじめたので, 細かい直しはそちらも参照 + * リリース予定版 howm-1.2.2rc6 [2005-04-29]と同じものです + * 仕様変更 (たいがい影響なさそう) + * 設定 howm-menu-top と howm-menu-file の優先順を逆に + (()) + * 旧: howm-menu-top が指定されているなら, howm-menu-file は無視 + * 新: howm-menu-file が指定されているなら, howm-menu-top は無視 + * なお, デフォルトでは, + howm-menu-top が指定済みで howm-menu-file が無指定 + * トップメニュー「<<< %menu%」を探す際は howm-search-path を無視. + howm-directory だけ検索. + * 改良 + * egrep, fgrep がないけど GNU grep はある, という環境(リナザウ?)に対応 + (()) + (()) + * contents での絞り込みも C-u に対応 (マッチしたメモを排除) + → ((<応用例|URL:http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?HidePrivateReminder>)) + (()) + * todo リストやメニューの %reminder でも, 旬度が同じなら文字列順ソート + (()) + * こまごま + * 一覧から「T」でタイトル表示したとき, 無タイトル分は最後にまわす + * 下線以外で RET 叩いたときの処理を若干丁寧に + * ext/howmkara で, 自身へのリンクを抑制. + ついでに Home へのリンクをフッタに追加. + * ext/hcal.rb の [2004-12-25]@3 記法対応 + * 英語メニューを充実. 英文 index.html に高速化オプションの説明. + * 表示用バッファには (buffer-disable-undo) + * 開発者向け + * バックエンドの切り離しに着手(howm-backend.el) + * おかげで, 特殊フォルダや特殊一覧が可能になった + * 不完全だけど, 使いながらこけた所を直していくっていう泥縄で + * gfunc.el (安直 generic function) + * howm-view-call-process → howm-call-process 等 + * cheat-font-lock.el を大掃除 + * win 用に, 「make test」相当の test.bat + * make test は --no-site-file に + * xemacs だと -no-site-file みたいだけど, 放置 + * howm-configuration-for-major-mode の例(howm-misc.el のコメント)を微修正 + (defalias 用) + * bug fix + * 検索がメモの最終行にマッチしたとき, 連結表示で二重表示になっていた + * howm-view-use-grep が non-nil のときエラー + (howm-view-grep-file-stdin-option が nil だと発症) + * howm-view-use-grep が nil のとき, howm-excluded-file-regexp に + 該当するファイルはスキャンしないように + (()) + * …というか, もっと根元から対象外ファイルのチェックを見直し + * ついでに, howm-excluded-file-regexp のデフォルトに + (image-file-name-regexp) 相当を追加 + * 0123-45-6789 みたな電話番号に下線を引かない (日付とみなす条件を厳しく) + (()) + * 「%」を含む message のエラー + * emacs20 でメニューを隠しバッファにすると色がつかない + (()) + * 一覧・内容バッファからメモを開く際の, narrowing 解除の判定ミス + (()) + * come-from 記法を変更した場合の手当て + (thx > taku さん) + (()) + * テスト版・リリース予定版の bug fix (抄) + * >>> ~/hoge.ps や file://~/hoge.ps を RET で開こうとするとエラー + (thx > Konstantin Levinski (kostya@pmail.ntu.edu.sg)) + * たぶん [2005-01-07] にやらかしたバグ + * emacs21 と 20 とで, font-lock-fontify-{block|buffer} を使いわけ + (()) + (()) + * 理解してなくて, インチキ手当です + * 一ファイルが長くて着色に時間のかかる方は, + emacs20 でなく emacs21 をおすすめします + * howm-list-all-title が non-nil のとき C-c , a の並び順が逆 + (()) + * メモを開くのが異常に遅く + (()) + … 直ったのか未確認 + * Meadow 2.10 で make がエラーに + (thx > taku さん, 「も」さん) + (()) + (()) + * Meadow-1.15 だと, image-file-name-regexps が未定義でエラー + (thx > 逃避さん) + (()) + * howm-directory が ~/.howm のようなドットディレクトリだと何も検索されず + (thx > taku さん) + (()) + +* [2004-12-11] v1.2.1 + * Note + * 表向きは, ほとんど bug fix のみ + * 隠し機能は, まだ隠し + * 改良・変更 + * 予定表で, 同じ日の予定は記述内容でソート + * 「[2004-11-04]@ 07:30 ほげほげ」みたいに書いとけば, 時刻順に並ぶはず + (()) + * 「同じ日のは重要度順でソート」って要望も, これ使ってなんとかなる? + (()) + (()) + (()) + * tag2plan は直していません. + * howm-template のデフォルトは howm-view-title-header に応じる + (()) + * howm-view-contents-persistent のデフォルト値を nil から t に変更 + * 内容バッファ *howmC* から RET で開いても, *howmS* や *howmC* は消えない + * 変数 howm-list-title の設定値に「howm-keyword-search」を追加 + * Fix + * メニューの予定表で, + 「howm-menu-schedule-days-before 日前から howm-menu-schedule-days 日後まで」 + のはずが「…日前から…日間」になっていた + * タイトル表示時に, タイトル欄「= 」がないメモを救出 + * タイトル表示オンをデフォルトにするための布石 + (()) + (()) + * ((<奥山さん版 auto-save-buffers|URL:http://homepage3.nifty.com/oatu/emacs/misc.html#asb>)) + との併用で, + 「.howm-keys has changed since visited or saved. Save anyway?」 + (()) + * [2004-09-01 23:26]@ とかの当日分がメニューに表示されなかった + (()) + * 表示されるってだけ. おすすめしません. + この書式を本気でサポートするか未定なので. + * meadow で, [2004-08-08]! の「!」で RET 叩くとエラー + (()) + * 再現できなかったけど, 何にせよこれで直るんじゃないかと + * メモを開いたときに narrow だと, 隠れてる部分の初期化ぬけ + (()) + * 内部整理 + * howm-list-migemo が直接 howm-view-search を叩かないよう + * howm-set-mode-p を howm-set-mode から分離 + (()) + (()) + * リマインダの action-lock を整理していじりやすく. 動作は変化ないはず. + (()) + * 副作用で, howm-reminder-regexp-XXX-pos のデフォルト値がひとつずれた + * その他 + * 一覧バッファと内容バッファを「o」で行き来 + (()) + …は, 書いてみたけど消しました. @ or 0 があれば不要ですよね? + +* [2004-08-24] v1.2 + * Note + * バグ修正 (narrowing, CVS 先端 emacs での着色) + * 1.1.1〜1.1.2 の隠し機能を公式化 (todo 直叩き, 保留「~」) + * ファイル構成の一部変更 (howm.el, riffle.el) → ((<インストール>)) + * その他こまごま改良 (file:// でも外部 viewer) + * 隠し機能追加 (メニューに最近&ランダム一覧) + * ほんとの目玉は come-from の alias なんだけど, まだしばらくは隠し機能 + * リリース予定版 howm-1.2rc6 [2004-08-16]と同じものです + * 隠し機能の公式化 + * 目玉 + * todo の新型: 保留「[2004-01-09]~100 ほげ」 + (()) + (()) + * メニュー・予定表・todo 一覧から, -+!@~. 上で RET を直接叩ける + (()) + (()) + (()) + (()) + (()) + (()) + * 小改造 + * 一覧 + * 表示切りかえ (0,1,2,v キー) + (()) + * T でタイトル表示, TAB・M-TAB で次・前のファイルへ + (()) + (()) + * リマインダの日付によるソート・絞り込み + (()) + (()) + (()) + * もうちょっと吟味して一般化したい気も (赤字箇所でソート, とか) + * 絞り込み基準に Region, Around を追加 + * ((<カスタマイズ>))参照 + * 一覧バッファへの色つけ + (()) + * ○○のときだけタイトル表示 + * howm-list-recent-title, howm-list-all-title はそのうち廃止の予定 + * howm-list-title には関数も指定可能 + (()) + * C-x 1 後は勝手にフレームを分割しない + (()) + (()) + * 検索 + * foo を検索したら [[foo]] を上位に + (()) + * デフォルトにしました. いやなら (setq howm-list-prefer-wiki nil) + * [[…]] をカスタマイズしたら, howm-wiki-format も要設定 + (setq howm-wiki-format "((<%s>))") ;; ((<…>)) に変更した例 + * howm で foo を検索した後は, C-s C-s も foo の検索に + (setq howm-view-update-search-ring t) + * 検索に使う関数を((<カスタマイズ>)) + (()) + * メニュー + * [今日] [昨日] を拡張 + (()) + * 一メモ一ファイルのときは, その日付文字列を検索. + 一日一ファイルのときは, その日付のファイルを開く. + * デフォルトのメニューに追加しました + * もっと便利そうな + ((<別解|URL:http://pc8.2ch.net/test/read.cgi/unix/1077881095/39>)) + がすでに :-) + * キー設定に C-i と M-C-i を追加 + (()) + * action-lock の((<カスタマイズ>)) + * 「file://…」や「http://…」 + (()) + * { } や {_} を変更しやすく + (()) + * {_} はテンプレート書式と連動した方がいいかと思って, 小細工してました + * howm の load 前に howm-dtime-format だけ設定すると, + howm-template-date-format もそれになる + * {_} の書式は howm 側で上書きするから, ↓は無効 + (setq action-lock-date-default '("{_}" "[%Y-%m-%d %H:%M]")) ;; 叩き前後 + * howm-action-lock-done-date-format なんて + README に書いてたのはウソ. 作ってませんでした ^^; + * リマインダ + * !+-~. の旬度の((<カスタマイズ>)) + (()) + * こまごま改良 + * file:// でも画像等は外部 viewer 起動 + (()) + * 日付形式の直叩き (メニューや todo 一覧から) + * メニューの %schedule, %todo, %recent, %random の action-lock を統一 + (()) + * 「>」で RET 叩くと「|」以降を検索 + * カスタマイズ + * 色の変更 + (set-face-foreground 'howm-menu-list-face "cyan") + * 書式の変更: 変数をいじる → + howm-menu-list-format, howm-menu-list-regexp, + howm-menu-list-regexp-key-pos, howm-menu-list-regexp-action-pos, + howm-menu-list-regexp-face-pos + * 激しい変更(日曜は赤, など): 関数をいじる → + howm-menu-list-format, howm-menu-list-rules, + howm-menu-font-lock-rules + * 「日付上で RET」「リマインダ上で RET」したときの動作を小賢しく + * 一文字コマンド → ただちに発動 (その後の RET は不要) + * 多文字コマンド → 続けてミニバッファから入力 + * 一覧から C-u f したときには「Reject」と表示 + * 予定表・todo 一覧に曜日を表示 + (()) + * 文書の更新 + * インストール法の説明は, make install の方をメインに + * index-j.html に画像と UNIX USER 記事へのリンクを追加 + * 実装・開発 + * 懸案のファイル名変更を決行 + * howm-mode-mode.el → howm-mode.el + * howm-mode.el → howm.el + * 小細工で, 従来の (require 'howm-mode) でも動くようにはなってる + * ぱらぱら一覧 riffle.el を, howm-view.el から分離 + * 仕様変更[2004-07-20] + * riffle-controller の insert-item → contents-item + * 内容を自分で書き出すんじゃなく, 内容を文字列で返す + * 「section」を廃止 + * howm-menu.el 整理 + * 内部仕様の変更 (howm-menu-display-rules まわり) + * 変数・関数の並べかえ + * howm-bug-report 改良 + * emacs バージョン表示を詳しく + * make しなくてもバージョンだけは表示 + * byte-compile, make, make test の有無も表示 + * howm2 から [[○○]] の処理を削除 + * 対応する <<< ○○ があるはずなので, そっちにまかせる + * hcal.rb, tag2plan の ruby オプション記法なおし + (()) + * Fix + * CVS 先端 emacs で色がつかない + (()) + (()) + * メモが narrow されてると, 検索されない・閲覧できない・開いても見えない + (()) + (()) + * 「>>> ファイル名」のときはタイトル表示を off + (()) + * >>> から画像を開いたあと, 元と違うバッファが表示されたりしてた + * 「<<<」上で RET (関連キーワード一覧)を正しく. 激遅に ;_; + * emacs と grep の正規表現の違いがまたもネック + * ちなみに仕様は, + 「そのキーワードに含まれるキーワードを含むキーワードの一覧」 + * 存在しないディレクトリを howm-directory に指定すると, + 初回の C-c , , でエラー (make install した場合) + * howm-from-change-log でタイトルがコピーされなくなってた + (thx > 'UCONNのポスドク'さん) + * howm-view-open-hook が二度呼ばれてた + * 設定によって, 全メモ一覧で「タイトル抽出」が二回呼ばれてたかも + * README 訂正 (howm-title-header → howm-view-title-header) + * Meadow 用の「ドライブ名の大文字小文字」対策を + 微修正(howm-normalize-file-name). 挙動は変化ないはず. + (()) + * テスト版のバグ(抄) + * 「メニューに %recent」で対象外ファイルのチェックを忘れてた + (()) + (()) + (()) + * ((<インストール>))の「はじめて C-c , , した時に読み込む」の設定抜け + * テスト版のバージョン表示が, ユーザが ./configure した日になってた. + * emacs -nw なとき, [2004-08-08]! の「!」で RET 叩くとエラー + (()) + * 各ファイル個別に byte-compile したときの不具合 + (()) + * マクロがマクロ扱いされてなかった + → ファイルまたいで使うマクロは howm-common.el に置き, + 各 howm-*.el が明示的に require + +== 1.1.2.x + +* [2004-05-09] v1.1.2.1 + * fix: make test がエラー + * パッケージングのミスで, ~/sample/ 以下のファイルに抜け + +* [2004-05-06] v1.1.2 + * Note + * 中途半端だけど, せっかくしばらく変更ないからリリースしとこうかと. + * 1.2 はまだ先. でも 1.1.1.x はもうメンテしたくない. ってことでつなぎに. + * 公式機能は 1.1.1.3 からたいして変更なし. + * 1.1.2rc1 から全く変更なし. + * 隠し機能 + * alias 試作, その他小改造 + * 微改造 + * 「一覧からの絞りこみ検索」のキー変更 (s → G) + * s は C-c , s の省略形とかぶってた + (()) + * 「make test」で「素の設定でのテスト」 + * メニュー中での「%|」による不可視トグルを公式機能に + * howm-view-real-grep は「パターンのリスト」も受けつける + (setq howm-view-grep-file-stdin-option "-f -") + * 特に linux 以外で grep 使用な方は, この設定をして不都合が出ないか, + 試していただけると助かります. + 見た目の動作は何も変わらないつもりですが… + * 「come-from キーワードの alias」に向けた布石です + (()) + * fix + * 「<<< foo {_}」の「<<<」で RET 叩いても no match + * grep 使用時のみ? ({}が特殊文字) + * やっつけ修正. 根本修正は「複数パターン grep」ができてから. + * come-from リンク「foo」上で RET しても, + 「<<< foo bar」の方が上に表示されたり + * come-from 書式を変更して「行末まで」じゃなくしたときは, + 変数 howm-keyword-regexp-format も設定してください + * howm-keyword-case-fold-search が真でも, + 正規表現を downcase しないよう修正 (\W とか意味変わってしまうから) + * M-x howm-mode で howm を off にしてから保存しようとするとエラー + * hcal.rb で保留記号が古いままだった (* → ~) + +== 1.1.1.x + +* [2004-04-29] v1.1.1.3 + * fix: C-c , d RET で今日の日付を入力したとき, 勝手に一覧へ飛んでた + (howm-insert-date-future が nil のとき) + * ついでに, howm-insert-date-future を設定して + おせっかいが発動したときは, メッセージを出すようにした + * v1.1.1.3rc1 [2004-04-14] と内容同じ + +* [2004-04-01] v1.1.1.2 + * Note + * 1.1.1.1 からの bug fix 一点のみ + * 1.1.1.2rc1 からの変更はありません + * fix: C-c , g foo で Foo がヒットしない (grep 不使用時) + (()) + * メニューの予定・todo 一覧の「>」で RET → no match + というバグも出ていた模様 + (howm-keyword-case-fold-search 設定時) + (()) + (()) + thx > NARA Shinsuke さん + +* [2004-03-16] v1.1.1.1 + * Note + * v1.1.1 からの bug fix 版です + * 「隠し機能」も少々追加 + * 微改良 + * migemo-server を不要に + (()) + * grep 使用ならまだ必要 + (→((<カスタマイズ>))) + (()) + * howm-menu-mode-map をふつうにキー定義可能に (buffer local じゃなくした) + (()) + * action-lock-set-rules は勝手に remove-duplicates + * fix + * (setq howm-list-title t) しても C-c , l でタイトルが出ない + (()) + * 日付入力で 01230 が 20001230 じゃなく 1230 と解釈されてた + * hcal.rb でも ~ は指定日まで潜伏するよう + * 内容バッファの C-t, M-C-t → C-i, M-C-i + * 「<<< [foo」で「[foo」を叩くとエラー (regexp-quote し忘れ) + * [2004-02-23] の修正はまちがってたので再修正 + * emacs20, meadow1.x(?) で http:// に下線がつかない + (拡張正規表現 "[htp]\\{3,5\\}") + (()) + * grep 不使用時, S → foo で「Foo」がひっかからない + (()) + * README の修正 + * todo 表示件数のカスタマイズ法を追記 + (()) + * {_} のカスタマイズ法の説明を修正 + (()) + +* [2004-02-21] v1.1.1 + * Note + * 大量のこまごま改良 + * 目玉改造(保留, todo 直叩き, ソースコード閲覧)は, + まだ「隠し機能」ってことで + * v1.1.0.* から, そのまま移行できるつもり. 書式変更などなし. + * v1.1.1rc3 と内容同じ + * 新設定 (→((<カスタマイズ>))) + * todo を RET 一発で済に (howm-action-lock-reminder-done-default) + (()) + * 内容バッファに色つけ (howm-view-contents-font-lock-keywords) + (()) + * ほんとはファイル冒頭と拡張子から自動判定すべきなんだけど, ひとまず. + * 一覧のソート基準 (howm-list-normalizer) + (()) + (()) + * メニューの予定表の表示範囲 (howm-menu-schedule-days-before) + (()) + * 日付の新規入力時に年や月を略したら未来と解釈 (howm-insert-date-future) + (()) + * howm-template を選択可能に + (()) + (()) + * (setq howm-list-title t) すれば, 一覧では常にタイトルを表示 + (()) + * howm-list-recent-title, howm-list-all-title は undocumented に. + そのうち廃止のつもり. + * 短縮ファイル名の設定を howm-abbreviate-file-name に一本化. + ついでに howm-keyword-to-kill-ring も短縮ファイル名に. + * キーワード一覧の置き場所 (howm-keyword-file) + * howm-create-file-hook を追加 + * ChangeLog メモとの併用 (→CL-HOWM.ja.rd) + (thx > 'UCONNのポスドク'さん) + * 新コマンド + * C-c , s で固定文字列検索 howm-list-grep-fixed (C-u C-c , g と同じ) + (()) + * C-c , SPC で howm なバッファと howm でないバッファとを切り替え. + howm なバッファがなければメニューを開く. + (()) + (()) + * 一覧表示・内容表示では n, p でもカーソル上下 + (()) + * 「file://…」上で C-u RET → find-file-other-window + (()) + * [今日] [昨日] まわり (一日一ファイルを想定) + (()) + * howm-open-today は, 新規作成時にテンプレート挿入 + * M-x howm-open-past で昨日を, + C-u 3 M-x howm-open-past で 3 日前を開く + * 変更 + * 一覧バッファ・内容バッファ + * 一組しか作らない(不評なら戻します). ((<カスタマイズ>))も参照. + * q したら, フレーム分割を強制解除 + (()) + * 「元の状態に復帰」は give up です. + ごめんなさい. 私の腕と気合では, 根本解決は難しそう… + (()) + (()) + * sort-by-date を「新しいものが上」に変更 + * 一覧表示から @ で連結表示に切りかえたら, window の分割を解除 + * 連結表示で, 各メモの最後の空行を省く + * 「>>> ファイル名」で RET×2 したら, window 分割状態を復元 + * メニュー + * > で RET → 該当行へ直ジャンプ + * 「済み」は表示しない + (()) + * 潜伏中のリマインダは表示しない (howm-menu-todo-priority) + (()) + * メニューのキャッシュを設定しない限り, メモ保存時のメニュー更新はオフ + * schedule, todo 欄に表題・書式説明を追加 + (()) + (()) + * %sdays (予定表の表示日数), %tnum (todo の表示件数)も + * howm2 + * メモ一覧にタイトルを表示 + (()) + * howm2 -r でファイル一覧を逆順に + (()) + * autoconf, automake に着手 + (()) + * navi2ch から恥知らずにコピー. よくわからないままいじる. + * doc/releng.txt よりメモ: tar.gz を作るには (開発者用) + aclocal && autoconf && automake && make Makefiles && make dist elcdist + * 参考: (()) + * デフォルトのインストール先が /usr/share/emacs/site-lisp/howm + になるように + (()) + * make install で doc, ext, en, ja もインストール + * 自分用メモ + make maintainer-clean; aclocal && automake && autoconf && ./configure --prefix=/tmp/hoge --with-lispdir=/tmp/hoge/el && make && make install + * 初回起動時に howm-directory やメニューファイルがなければ自動で作る + (make install したときのみ) + * その他 + * auto-save-buffers が呼ばれたら save 時の自動処理を off に + * 未保存の編集も, 検索や内容表示に反映 + (howm-view-use-grep が nil のときに限る) + (()) + * Wiki 風リンク [[hoge]] は hoge に下線 (「<<< hoge」の有無にかかわらず) + (→((<カスタマイズ>))) + (()) + (()) + (()) + * 従来は「]]」だけに下線. + 「作成済みかどうかを下線のつき方で区別できる」っていう + とんちだったんだけど, はまった方が複数. + * ttp:// の類も http:// に直してブラウザへ + (()) + (()) + * howm-toggle-search-other-dir で, 予定表や todo リストの検索範囲も拡大 + (()) + * ((<インストール>))の説明にバイトコンパイルを追加 + * howm-reminder-tomorrow-face の背景を茶色からピンクに + (()) + * ユーザーには関係なし + * ファイル構成の変更 (→((<実装について>))) + * howm-menu-action の引数仕様を変更 + * copy-list → copy-sequence (cl パッケージ → built-in) + * fix + * URL の抽出をちょっとだけましに + (()) + * 一覧バッファのむだな書きなおしを抑制 + * howm-list-normalize からむだに何度も howm-view-summary が呼ばれて… + * いちばんひどいとこだけ修正. まだむだは残ってる. + * meadow 向けに, ドライブレターの大文字小文字を無視 + (howm-normalize-file-name) + (()) + * 英語メニューの [String] と [Regexp] が逆 + * xemacs canna 対策 + (()) + * split-horizontally が t なら C-x 1 後も横並べに + ((()) + > ヽ(´ー`)ノさん) + * howm-menu-{schedule|todo} のメッセージ, + howm-view-call-process の戻り値チェック + (()) + * grep 不使用時の migemo 検索 (howm-list-migemo) + (thx > やまだあきらさん akira@arika.org) + * meadow 1.15 で他バッファの font-lock が注釈・文字列のみに + * font-lock-defaults の大域値を変えてしまってた + * 一覧で ! (shell) が xemacs や emacs20 でエラー + (replace-regexp-in-string や (buffer-size buf) がない) + (()) + * xemacs 関連: + thx > ((<笠原さん|URL:http://www.nc.kyushu-u.ac.jp/~kasahara/diary/2004/01b.html>)) + …こっそり言及返し :p + * 「(setq font-lock-verbose nil) で速くなるよ」 (→((<インストール>))) + * howm なバッファでは自動でこれを…と試みたけど, できてなさげ + * xemacs での byte-compile + * defvar を make-variable-buffer-local より前に + * action-locl.el: + action-lock-rules, + action-lock-original-font-lock-keywords, + action-lock-original-return + * howm-view.el: + howm-view-name, + howm-view-item-list, + howm-view-summary-last-line, + howm-view-contents-end + * ついでに凡ミスも多数露呈 + (reference to free variable / bound but not referenced) + * 「>>>」だけの行から次の行にかけて下線が引かれてた + * howm-menu.el を iso-2022-7bit に (for Meadow) + (()) + * .gz, .jpg, .gif, .png も検索対象から除外 + (()) + * 最終行に改行がないと, 内容表示でその行が出ない + (()) + * 一ファイル複数メモで (setq howm-list-title t) なとき, + 一覧で「S → date」をくり返すとソート順が入れかわる + (thx > NAKANO Yasuhiro さん ) + * 一部環境で, global-font-lock が効かなくなる + (emacs-20.7.2 on Vine Linux 2.6, Meadow1.15 on WindowsXP Professional). + (thx > NAKANO Yasuhiro さん ) + * 一覧表示のファイル名欄のデフォルト幅 + (thx > Jun Kuriyama さん ) + * Jargon のリンク切れ + (()) + * コード添削 + (()) + * skip-one-link → action-lock-skip-one-link + * *.el の先頭・末尾に定型コメント + * (()) + との併用でエラー + (()) + * 「<<<」で RET したときにも howm-keyword-case-fold-search を反映 + * (setq howm-list-title t) すると, 一覧と内容の上下が逆転 + (()) + * バイトコンパイル時の警告をほぼ退治 + * howm-keyword-regexp-header-pos → howm-keyword-regexp-hilit-pos + * howm2 のデフォルトで, ファイル #foo.bar や foo.bar~ も対象外に + (()) + * ruby 1.8 系で howm2 がエラー + (()) + (()) + * 明背景むけの配色 + * カーソルがタイトル上にあると + C-c , K (howm-keyword-to-kill-ring) に失敗 + * CVS 先端 emacs だと on-the-fly で色がつかない + (()) + * 一覧で ! による shell command の出力がすぐ消えてしまう + * ついでに, 出力が空のときは出力バッファを出さないようにした + * ついでに, これも短縮ファイル名に + * 連結表示で TAB を叩いてから RET 叩くとエラー + * CVS 先端 emacs で, 一覧・内容バッファに色がつかない + (()) + * howm-search-other-dir の説明を追加 + (()) + * テスト版からの変更 (抄) + * fix: (setq howm-insert-date-future t) の状態で, + [2004-01-23]に C-c , d して「215」 → 2005 年に + (howm-datestr-expand) + * テスト版 2003-12-27 〜 2004-01-21 のバグ + * テスト版 2005-01-23 で修正 + * yc 対策を柔軟に ← 結局廃止 + (()) + * eval-after-load だと (load "~/elisp/yc.el") がマッチしないので, + defadvice に変更 + * ほんとは, 同様のことを egg, anthy にもやるべき + (patch 募集. howm-misc.el 参照) ← やっぱやめ[2004-01-18] + * メニューでは [2004-01-10]! 等に下線をつけない ← 「直叩き」として復活 + (()) + * fix: メニューに旬度を表示したら > から飛べなくなってた + (()) + * fix: anthy との併用 ← 結局廃止 + (thx > Jun Kuriyama さん ) + * fix: index-j.html からのリンクずれ + (()) + * fix: ドキュメントのインストール先 + /usr/local/share/doc/howm → /usr/local/share/howm/doc + * fix: README のミス. 全メモ一覧は C-c, l じゃなく C-c , a + (()) + * fix: ロード後に howm-keyword-file をセットした場合でも, + 初回起動時に自動作成 + (()) + * fix: (()) + で「確定」の RET キーを howm が食う + (()) + (()) + * C-c , d → d で日時を挿入 ← 廃止 + (()) + (()) + * ついでに prompt に曜日 + * ((<カスタマイズ>)) の記述ミス: howm-directory → howm-keyword-file + (()) + * configure.in に Meadow.exe を追加 + ((()) + > Meadow2使いさん) + * 廃止 + * canna, egg, yc, anthy の個別対策 + (()) + * かわりに, action-lock-mode の優先度を最弱に. + * 以前の対策に戻すには, + (setq action-lock-bury-minor-mode-p nil) + (setq howm-ime-fix t) + * C-u C-c , c (新規メモに「>>> 元ファイル」を入れない)と + howm-template-use-file + * howm-view-quit-to-nonhowm (一覧で q → howm 以外の buffer へ) + * howm-template-file-abbrev, howm-view-header-abbrev + (howm-abbreviate-file-name に一本化) + +== 1.1.0.x + +* [2004-02-08] v1.1.0.4 + テスト版からの backport (thx > 皆様 …テスト版 README 参照) + * 潜伏中の項目はメニューの todo リストに表示しない + * C-c , s で固定文字列検索 howm-list-grep-fixed (C-u C-c , g と同じ) + * canna, egg, yc, anthy の個別対策を廃止. かわりに抜本対策. + * メニューのキャッシュを設定しない限り, メモ保存時のメニュー更新はオフ + * auto-save-buffers が呼ばれたら save 時の自動処理を off に + * .jpg, .gif, .png も検索対象から除外 + * 「xemacs では, (setq font-lock-verbose nil) で速くなるよ」 (→((<インストール>))) + * fix + * xemacs canna 対策 + (()) + * 英語メニューの [String] と [Regexp] が逆 + * howm-view-call-process の戻り値チェック + * meadow 1.15 で他バッファの font-lock が注釈・文字列のみに + * 一覧で ! (shell) が xemacs, emacs20 でエラー + * xemacs での byte-compile + * 「>>>」だけの行から次の行にかけて下線が引かれてた + * howm-menu.el を iso-2022-7bit に (for Meadow) + * CVS 先端 emacs だと on-the-fly で色がつかない + (()) + (()) + * 最終行に改行がない場合, その行が内容表示に出ない + (()) +* [2003-12-31] v1.1.0.3 + * fix: 一部環境で, global-font-lock が効かなくなる + (emacs-20.7.2 on Vine Linux 2.6, Meadow1.15 on WindowsXP Professional). + (thx > NAKANO Yasuhiro さん ) + * fix: 一覧表示のファイル名欄のデフォルト幅 + (thx > Jun Kuriyama さん ) +* [2003-12-29] v1.1.0.2 + * fix: anthy との併用 + (thx > Jun Kuriyama さん ) + * メニューに schedule・todo の表題と説明を追加 + (()) +* [2003-12-27] v1.1.0.1 + * fix: 連結表示で TAB を叩いてから RET 叩くとエラー + * fix: 明背景むけの配色 + * fix: egg, yc, mcomplete との併用 + * fix: Jargon のリンク切れ + (()) +* [2003-11-22] v1.1 + * Note + * 非互換な変更をまとめてやってしまおう版 + * オプションで, 従来どおりにも使えるようにしたつもり + * 「((<インストール>))」の移行例を参照 + * デフォルト書式の変更 + * リンク書式を <<, >> から <<<, >>> に変更 + (()) + * 対応して, hcal.rb の「今日マーク」を <<<<##>>>> に変更 + * 1 メモ 1 ファイルをデフォルトに + * リマインダの書式変更 (→((<リマインダ>))) + * 日付書式を [2003/10/21] から [2003-10-21] に変更 + → ((<参考|URL:http://www.kanzaki.com/docs/html/dtf.html>)) + * メニューをメモと統合 + * 「%○○%」を検索したら, 「<<< %○○%」を menu-mode で開く + * C-c , , で「<<< %menu%」を開く (menu.howm ではなく) + * 改良 + * <<< での大文字小文字の区別 (→((<カスタマイズ>))) + * <<< などに色つけ + (()) + * デフォルトのメニューにショートカットキーを追加 + * 日付形式「2003-10-30」の action-lock に「くり返し」を追加 + (()) + * XEmacs, CVS 先端 Emacs, Carbon Emacs に対応(?) + (()) + (()) + * 'や'さんの patch を取り込みました + * howm2 + * <<< と >>> がからむ場合を修正. 激遅になった ;_; + * 対象ファイルを選別可能に (-list) + * オプション追加 (-goto, -comefrom, -i) + * (()) + * 小変更 + * C-c , d と C-c , D を入れかえ + (()) + * ソースファイル分割 (howm-font-lock.el, howm-menu.el) + * デフォルトの major-mode を text-mode に + (()) + * [前後] にキー割りあて (C-c , A) + * 内容表示とテンプレートのファイル名は /home/hoge/… じゃなく ~/… に + (()) + * 新規メモ作成直後に undo すれば「>>> 元ファイル」を消せる + (()) + * 微変更 + * face を変数で指定 + * howm-menu-lang を設定しなければ, おせっかいに推測 + (()) + * howm-menu-refresh-after-save, howm-refresh-after-save を起動後も変更可に + * メニューの "...done" メッセージやっぱ復活 (schedule, todo のスキャン時) + * howm2 の index.html で, 数字じゃないファイル名を先に + * メニュー脱出時の bury-buffer を廃止. + * howm-ignore-comefrom-same を廃止 + * 隠し機能: howm-view-{summary|contents}-persistent に関数も設定可能 + ;; 例: 予定表・todo リストや全メモ一覧等だけ persistent + (setq howm-view-summary-persistent + (lambda () (member howm-view-name '("{schedule}" "{todo}" "")))) + * 気がかわる可能性あり + * 変数名 howm-reminder-regexp-date-pos → …-day-pos + * howm-template-{file|date}-format のデフォルト値は + howm-ref-header, howm-date-format を参照する + * *.elc も検索対象外 + * ドキュメント + * 「((<動きませんよ?>))」にチェックリストを追加 + * 「((<インストール>))」に設定例を追加 + (()) + * メニューは ~/howm/ja/*.howm じゃなく ~/howm/*.howm + (()) + * スクリーンショットをカラー版に + * goto, come-from の書式変更例を RD 風に + (→((<カスタマイズ>))) + (()) + * メニューバッファ隠しの別法を紹介 (→((<カスタマイズ>))) + * 実はコンソールでも使えてた + (()) + * <<< が RD の include とかぶってる旨の注意 + (()) + (→((<インストール>))) + * カスタマイズ例におまけを追加 + * 「インストール」の移行例に, GNU touch にがない場合のローテク版を追加 + (()) + * ((<カスタマイズ>))に「メニューをメモ扱いしない」設定を明記 + * yen.el の紹介 (→((<外部ツール>))) + * tag2plan の説明を修正 (-date_sep, ~/howm/*/*/*.howm) + * 「参考」に簑系・超簑を追加 + * fix + * grep 使用時は「-hoge」が検索できなかった + * 内容バッファの font-lock (仮修正) + (()) + * v1.0.4.1 のバグ: 検索文字列の色 + * [2003-10-05] のバグ: ファイル区切りの色 + * 一覧アからさらに一覧イを表示した後で q したら, 一覧アに戻る + (()) + * 「フレーム分割を復元」との折りあいに自信なし. + もし不具合が出たら, ↓で従来動作(アの前のバッファに戻る)に. + (setq howm-view-quit-to-nonhowm t) + * [前後] の実行直後の内容バッファ + * filter-by-date 等で「2003 年 9 月 * 日まで」と入力したら, + 「2003 年 9 月 31 日 (= 10 月 2 日)まで」と解釈されてた + * これ以外にもバグまみれだった[2003-10-26] + * 一覧バッファと内容バッファの位置が入れかわる症状 + (()) + * 再現法: 内容バッファの方にカーソル置いて, g で検索 → q + * 二日以上起動し続けると, メニュー(予定・todo)の当日と翌日の色つけが変 + * mailcap.el がないときの >>> /etc + * >>> の後に何も書いてないときは無視すべし + * 正規表現 [^…] を [^\r\n…] にひととおり直し + * テスト版からの変更・fix + * font-lock がどんどん重くなってた. よくこんなので動いてたなあ… + * fix: xemacs で font-lock が固まる + (()) + * やっぱりデフォルトは「タイトル表示なし」 + * 移行例の旧キー設定が, howm ロード前でも後でも反映されるように + * メニューが開かなかった (.howm-keys に「%menu%」追加) + * メニューが隠しバッファのとき, 下線がつかなかった + * メニューの footer がデフォルトでは出なくなってた + * メニューの %eval% や %call% でバッファ強制切りかえ + * 変数 howm-menu-persistent を廃止 + * howm-reminder-today-face が未定義だった + * {_} で RET したときも, 設定した日付書式に + * 「<<< http」があっても http://… はブラウザを起動すべし + * howm2 で URL をリンクにするのを忘れてた + * howm2 -type=rd で URL をリンクにするのを忘れてた + * [更新] ボタンは元のバッファに戻る + * 「>>> /foo/bar/」の一覧見出しが空になってた + * xemacs で mailcap.el がないときのエラー回避 + * howm-try-require の実装をすっきり + (()) + * ~/howm/CVS/* が検索対象になっていた + * howm-keyword-case-fold-search を設定したら, + キーワード補完でも大文字小文字を無視 + * デフォルトのファイル名を変更 (ごめんなさい) + * 20031030-202259.howm → 2003-10-30-202259.howm + * 変換手順 + * メモディレクトリに cd して, + find . -name '*.howm' -print | ruby -ne '$_.chop!; d = File::dirname $_; f = File::basename($_).sub(/^(\d{4})(\d{2})(\d{2})/){|s| "#$1-#$2-#$3"}; puts %~mv #$_ #{File::expand_path f, d}~' > ~/howm_kuzu + * ~/howm_kuzu の内容を確認し, 問題なければ + cat ~/howm_kuzu | /bin/sh + * 必要なら, 移行例のようにタイムスタンプをでっちあげ + * C-u C-c , c なら, 新規メモに「>>> 元ファイル」を入れず, タイトルも空欄 + (変数 howm-template-use-file でカスタマイズ) + (()) + … undocumented. そのうち廃止予定. + * こまごま fix + * >>> まわり + * 外部 viewer が常に off になってた + * howm-keyword-case-fold-search を設定したときの >>> /etc/X11 + * 日付形式「2003-10-30」の action-lock からの search 対象ファイル + * <<< や >>> で空白を含む文字列が検索できなくなってた + * タイトルが常に空欄になってた + * howm-keyword-case-fold-search を設定したら, + >>> foo でも「<<< FOO」は先頭にくるべき + * C-c , c でエラー + (()) + +== 1.0.x + +* [2003-10-27] v1.0.4.2 + * fix: font-lock がどんどん重くなってた. よくこんなので動いてたなあ… +* [2003-10-04] v1.0.4.1 + * fix: 「最近」がサブディレクトリをチェックしなくなってた + * fix: sort-by-date のデフォルトを「新しい順」に (以前はそうだった気が?) + * ショートカットの多重定義には警告表示 + * ついでにメニューの "...done" メッセージを廃止 + * TUTORIAL.rd に「日付を入れる」追加 +* [2003-10-02] v1.0.4 + * >> で外部 viewer (→((<メモを読もう>)),((<カスタマイズ>))) + (()) + (()) + * ディレクトリも対応. 「>> /usr/src」とか. + * キー割りあて微修正 + * (一覧モード) 一行スクロール: n,p → j,k + * (メニュー) スクロール: SPC, BS + * タイトルを kill-ring へ: C-c , k → C-c , K + (()) + * fix: contents-mode で C-h が未設定だった + * howm-mode なバッファの save 時に, 下線を引き直し, メニューも更新 + (→((<カスタマイズ>))) + (()) + * 検索対象ディレクトリの追加 (→((<カスタマイズ>))) + (()) + * ドットファイルは検索しない + (>> や howm-search-path で明示的に指定すれば探す) + (()) + (()) + * メニューを過剰に強化 + (→(())) + * HyperCard や Um4 に刺激されました. ほんとは別ツールにすべき. + * 現バッファのコピーを howm-mode で表示(M-x howm-show-buffer-as-howm) + (()) + * 需要不明なので様子見 + * action-lock の "...Done" メッセージを廃止 + * fix + * 「>> ファイル名」が howm-excluded-file-regexp に関わらず効くように + * call-process で STDERR は捨てる + * action-lock の説明に file://… を追加 + * 寸前の window 分割状況に関わらず, 一覧を上, 内容を下に表示 + (()) + * sort や filter にファイル名を使う際は, ディレクトリ部分を除去 + * howm-menu-refresh を M-x やキー割りあてから呼べるように + * テスト版のバグ + * 一覧表示した直後は内容が表示されない + (()) + * Wiki 風 link [[○○]] がエラー + * [メニュー更新] がエラー + (()) + * >> で該当ファイルが先頭に出なくなっていた + * 「参考」を整理 + * 以下も実装済みだけど, v1.1 まで寝かすつもり + * リマインダの書式変更 + * メニューとメモの統合 +* [2003-09-23] 反省してテスト版を分離 + * 二系統メンテする能力はないので… + * リリース版は放置 + * テスト版は遠慮なく更新 + * テスト版の更新が落ち着いたら, + その状態にバージョン番号つけて, リリース版ってことにする +* [2003/09/23] v1.0.3.4 + * 日付形式 [2003/09/21] の action-lock を拡張 (→((<メモを書こう>))) + (()) + * fix: howm2 のリンク一覧を相対パスに + * fix: template まわり + * 前のメモとの間に空行を入れる + (()) + * スペルミス cursol → cursor + * 新メモ template の %xxx 置きかえが, 前のメモにも及んでいた + * fix: 「次(前)のリンクへ」を修正 + * fix: canna 対策を, ロード順序に関わらず有効に +* [2003/09/21] v1.0.2.3 + * fix: 初めて起動したときに ~/.howm-keys を作成 + * fix: canna 対策 + (()) +* [2003/09/20] v1.0.2.2 + * HTML 化スクリプト howm2 でっちあがり (→((<外部ツール>))) + * fix: 「!」するとバッファ名が変 +* [2003/09/18] v1.0.2 + * HTML 化スクリプト howm2 の試作 (→((<外部ツール>))) + (()) + * 未保存だろうと委細構わず, howm-mode なバッファをすべて強制削除するコマンド + (→((<カスタマイズ>))) + (()) + * 「やさしい Emacs-Lisp 講座」の URL を修正. + いま howm があるのはこの本のおかげです. +* [2003/09/17] v1.0.1 + * 一覧モードで「!」 → shell でコマンド実行 (→((<メモを読もう>))) + (()) + * Dired-X でうまく逃げたつもりだったんだけど, 不評なので + * lisper たる者, 要求仕様の上を行かないと :-p +* [2003/09/17] v1.0.0.1 + * Dired-X について最低限の説明 + * fix: Dired-X の対象バッファを訂正 +* [2003/09/17] v1.0 + * メモディレクトリを階層化: ~/howm/年/月/年_月_日.howm + * こんなふうにディレクトリも指定できるようにした + (setq howm-file-name-format "%Y/%m/%Y_%m_%d.howm") + * 移行については, ((<インストール>))の「注意」 + +== 0.9.x + +* [2003/09/16] v0.9.9 + * メニュー (→((<メモを書こう>))) + * 前後のメモの一覧 + * 説明を補足 + (()) + * 一覧モードで「X」 → Dired-X を起動してファイル操作 + (()) + * howm-mode なバッファをすべて消す + * fix: window の状態を復元 + (()) + * どんなモードでも C-c , Q が効く + (()) +* [2003/09/16] v0.9.8.3 + * fix: タイトル一覧でエラー + (()) + * pure elisp 版のとき + * タイトルが一つもなかったとき + * menu.howm を一覧に出さない方法 (→((<カスタマイズ>))) + (()) +* [2003/09/16] v0.9.8.2 + * メニューをファイルにして編集を推奨 (→((<カスタマイズ>))) + * 同梱の ja/menu.howm を ~/howm/ にコピーしてください + * (()) + * デフォルトの変更 (→((<カスタマイズ>))) + * grep 使わない (バグ出し期待) + * メニューのキャッシュはオフ + * ファイルを開く際, 一覧を残す + * 楽しい連休でした :-) +* [2003/09/16] v0.9.7.1 + * Wiki 風リンク [[ほげ]] (→((<メモを書こう>))) + * 「<<」上でリターン叩くと「関連キーワード」へのリンク (→((<メモを書こう>))) + * 古い更新記録と移行例を移動 (→(())) + * howm-ignore-comefrom-same を undocumented に. そのうち廃止? + * fix: 曜日表示にも言語設定を反映 +* [2003/09/15] v0.9.6 + * 「n」と「p」で一行単位のスクロール + (()) +* [2003/09/15] v0.9.5 + * メニューに [全消] (howm-mode なバッファをすべて消す) + (()) +* [2003/09/14] v0.9.4.2 + * fix: タイトル一覧が裏に隠れてしまってた + (()) + * fix: 「カーソルを対応カラムへ」の微修正(マッチしなければ行頭へ) +* [2003/09/14] v0.9.4.1 + * grep 脱却の試み (→((<インストール>))) + * メモが大量だとやっぱりちょっと遅い ;_; + * fix: 「Wrong type argument: window-configuration-p, nil」 + * 一覧モードからファイルを開いたとき, カーソルを対応カラムへ: + (())に向けて +* [2003/09/13] v0.9.3 + * 一覧モードから抜ける際, window の状態を復元 + (()) + * C-u RET で一覧を残す (→((<メモを読もう>))) + * howm-view-summary-persistent (→((<カスタマイズ>))) + * howm-view-kill-buffer, howm-view-delete-other-windows を廃止 +* [2003/09/12] v0.9.2.1 + * fix: come-from リンクを最長一致に + * fix: (()) + * howm-view-kill-buffer の説明逆だった + * タイトル一覧表示の際, タイトルなし一覧が裏に残ってた + * howm-ignore-comefrom-same (→((<カスタマイズ>))) + * なんか不評なので, マニュアルを HTML 化 +* [2003/09/10] v0.9.1 + * デフォルトを英語に + * .emacs に以下を書けばメニューが日本語に + (setq howm-menu-lang 'ja) + * hcal.rb もデフォルト記号は ASCII 文字に +* [2003/09/09] v0.9 + * ruby, find 脱却. elisp がこんなに速かったとは… + * howm-view-kill-buffer の説明 (→((<カスタマイズ>))) + * ext/easy-mmode.el の同梱を廃止 (意味なさげ) + +== 0.8.x + +* [2003/08/31] v0.8.5 + * タイトルの一覧表示 (→((<カスタマイズ>))) + (()) + * 一覧モードやメニューモードで「?」を押すとヘルプ + * 「参考」に vim 版を追加 +* [2003/06/03] v0.8.4 + * 安直カレンダー hcal.rb (htodo.rb を改名・拡張) + * 予定表に済項目も表示 (→((<カスタマイズ>))) + * 「参考」に wikilog を追加 +* [2003/05/11] v0.8.3 + * fix: howm-excluded-file-regexp が menu, schedule, todo で効いてなかった + (()) + * README + * maxima についての注意 + * M-x howm-create → M-x howm-menu +* [2003/03/19] v0.8.2 + * 外部ツールに htodo.rb 追加 + * fix: todo 一覧で, 済項目(@[2003/03/19]. など)も日付順に並ぶよう +* [2003/02/20] v0.8.1.1 + * fix: 「@[2003/02/14] 501室」の laziness が 501 になってたのを修正 + * fix: バックアップファイル「.#foobar.baz」を検索対象外に +* [2002/12/14] v0.8.1 + * howm-congrats-hook + * ドットファイルも検索対象に (howm-excluded-file-regexp から削除) + * 「>> ファイル名」関連をまじめに修正するまでの暫定処置 +* [2002/11/03] v0.8 + * メニュー + * リマインダ + * 従来の「@[2002/10/21] !!」などは廃止 + * ローマ字検索 (migemo) + * 付随して, grep コマンドを egrep に変更 + * その他いろいろ + * action-lock の追加例 (namazu を使い, Message-ID からメールを検索) + * action-lock の「未処理」を {___} から {_} に変更 + * [2002/10/18] のような日付形式もリンクに + * howm-view-summary の一行表示で, 先頭空白は削除 + * howm-view-split-horizontally + * howm-insert-date + * 変数 howm-view-summary-format の仕様変更 + (縦分割なら todo 一覧にファイル名表示なし, のやっつけ実装のため) + * 一覧でのタイトル表示を一旦廃止 (複雑な割に役たたず) + * 一部キーバインド変更 + * fix: 「今日のメモ」上で C-c , c したときは「前に見てたファイル」は略 + +== 0.7.x + +* [2002/09/30] v0.7.6.1 + * howm-view-kill-buffer に関係なく, タグ一覧バッファだけは残す(やっつけ) + * fix: case-fold-search を設定しているときの, grep / grep -i の判定 +* [2002/09/26] v0.7.5 + * 検索で大文字小文字を区別しないよう変更 +* [2002/09/24] v0.7.4 + * fix: 検索で no match になったとき, 前バッファの色などが変に + (font-lock-keywords-only の大域値を誤って変更) +* [2002/09/20] v0.7.3 + * action-lock-no-browser + * fix: @ で一覧表示と連結表示とを切りかえたときカーソル位置がずれぬよう + * fix: マークを設定せず howm-create してもエラー出ぬよう +* [2002/09/19] v0.7.2 + * 一覧で summry 未スキャンの部分には「type 'p'」と表示 + * fix: .howm-keys への重複登録チェックでは大文字小文字を区別するように + * fix: ディレクトリ名は一覧対象外に (例: CVS/) +* [2002/09/18] v0.7.1 + * http:// で web browser 起動 + * fix: 「キーワードを kill-ring へ」→「タイトルを kill-ring へ」(迷い中) +* [2002/09/17] v0.7 + * 1 日 1 ファイルに + * タイトル = と come-from リンク << とを分離 + * 最近のメモの一覧 (キーバインドも変更) + * ファイル名を kill-ring へ (C-u C-c , k) + * 「>> ファイル名」 (file://… と (()) も残してはある) + * 用語変更: 明示・暗示 → goto・come-from + * 全メモ一覧にもヘッダ + * fix: 古い ruby-mode.el を使うと全メモ一覧に変な色がつくのをやっつけ修正 + +== 0.6.x + +* [2002/09/14] v0.6 全面書きなおし + * 「リンク」の廃止. すべては検索である. + * 検索結果のソート・絞りこみ・連結表示 + * キーワード一覧ファイル(~/.howm-keys)をしぶしぶ導入 + * 暗示リンクの書式を可変にするため + * emacs, grep, ruby の正規表現の違いに悩みたくないから, + 暗示リンク宣言のスキャン(正規表現検索!)は emacs 内で完結させたい + * 全ファイルの暗示リンク宣言を emacs でスキャンするのは + さすがに遅そう + * 逆手にとって, 何か検索するたんびに + その検索語を登録してしまおうかとも + * shell を使わない (…にしたつもり) + * パラグラフ指向は廃止 + * かわりに, 各パラグラフを 1 ファイルにして, 連結表示 + * migemo 検索が未実装 + * ファイル名は有無を言わさず勝手につける + +== 0.5.x 以前 + +* [2002/06/26] v0.5.3 (リリースせず[2002/09/12]) + * パラグラフ一覧の日時をハイライト +* [2002/06/25] v0.5.2 + * migemo 検索でもマッチをハイライト + * describe-mode にパラグラフ関連のキー設定も記述 + * rd-memo との併用設定例 +* [2002/06/24] v0.5.1 + * カーソルがパラグラフの先頭にあったときの挙動を修正 + * パラグラフを新規タイトルに移動したとき howm-create-title が効くよう +* [2002/06/23] v0.5 + * パラグラフ指向と時系列メモ (試用中) + * howm-default-directory + * howm-menu を廃止し, 普通に keymap を使用 + * 現題名を kill ring へ + * popview-mode からファイルを開くと, 見ていた箇所にカーソル移動 + * grep では題名でなくマッチ行を表示 + * その他, 微修正 + * migemo-client --type=egrep を明示 + * popview-mode の post-command-hook は buffer-local に + * popview-mode の update 要不要チェックは, キーワードじゃなく位置で + * popview-mode は 'popview でなく 'popview-mode を provide + * howm-create-file に補完 +* [2002/06/06] v0.4.2 + * migemo + * grep → egrep + * 題名の補完入力 + * tag2plan で「@[2002/06/06] foo」が登録されなかったのを修正 +* [2002/06/05] v0.4.1 + * grep に -i + * 空白行は題名とみなさない + * howm コマンドも題名書式のデフォルトを「一行目」に +* [2002/06/03] v0.4 題名書式を変更 (「= 題名」→ 一行目) +* [2002/06/03] v0.3.2 デバッグ(1ファイル複数タグ) +* [2002/06/02] v0.3.1 + * 各一覧のバッファを別に + * tag 一覧は今日の日付にカーソル移動 + * 新規作成時, 題名が空なら題名書式自体("= ")を省略 + * howm -pipe + * w3mmenu +* [2002/06/02] v0.3 + * コマンド追加 (次/前のリンクへ, tag, 絞りこみ検索, 新規, 複製) + * tag2plan + * popview-mode に最低限ドキュメント + * その他, 微修正 +* [2002/05/30] v0.2 コマンド追加 (refresh, 参照先/元一覧, 全題名一覧, 検索) +* [2002/05/29] v0.1 公開 + += 古い告知 + +* 夏時間のバグ 2007-11-09 + * howm-1.3.5 の更新記録を参照 + +* セキュリティ修正 2006-12-16 + * howm-1.3.4 の更新記録を参照 + +* テスト版にバグ: + [2003-12-27]〜[2004-01-21]のテスト版で + (setq howm-insert-date-future t) + を設定していた場合, + 「未来の日付を入力したのに, それをもう一段未来へ送ってしまう」 + というバグがありました. すみません. + * 予定・todo の一覧で, 年月にまちがいがないか確かめてください. + (特に, 「2004 年のつもりが 2005 年に」という症状をご注意ください) + * リリース版か、[2004-01-22]以降のテスト版に update してください. + += 旧版からの移行 +(必ずバックアップをとってから!) + +== v1.0.x からの移行例 + +* .emacs の修正 → ((<インストール>)) + * 「<<< で大文字小文字を区別しない」を設定した場合は, + キーワード一覧を作り直して重複を消すとよいでしょう +* 新体制に移行する場合 + * リマインダの書式変更 + @[2003/09/25]! → [2003/09/25]! + @[2003/09/25] → [2003/09/25]- + [2003/09/25]! → [2003/09/25]:! + [2003/09/25] → [2003/09/25] + * メモディレクトリに cd して, + find . -name '*.howm' -print | xargs -n 1 ruby -p -i.bak -e '$_.gsub!(%r~(@?)(\[[0-9]+/[0-9]+/[0-9]+\])([-+@!.]?)~){|s| if ($1 == %~~ && $3 == %~~); s; else; $2 + ($1 == %~@~ ? %~~ : %~:~) + ($3 == %~~ ? %~-~ : $3); end}' + * 確認後, *.bak を捨てる + * 日付の書式変更 + [2003/10/21] → [2003-10-21] + * メモディレクトリに cd して, + find . -name '*.howm' -print | xargs -n 1 ruby -p -i.bak -e '$_.gsub!(%r!(\D)(\d{4}/\d{2}/\d{2})(\D)!){|s| $1 + ($2.tr "/", "-") + $3}' + * 確認後, *.bak を捨てる + * リンクの書式変更 (<<, >> を <<<, >>> に) + * メモディレクトリに cd して, + find . -name '*.howm' -print | xargs -n 1 ruby -p -i.bak -e '$_.sub!(/(<<|>>).*/){|s| $1[0,1] + s}' + * 確認後, *.bak を捨てる + * やりたければ, メモを改名してもよい + 2003_10_18.howm → 2003-10-18-000000.howm + * メモディレクトリに cd して, + find . -name '*.howm' -print | ruby -ne '$_.chop!; d = File::dirname $_; f = File::basename($_).tr("_", "-").sub(/[.][^.]+$/){|s| "-000000" + s}; puts %~mv #$_ #{File::expand_path f, d}~' > ~/howm_kuzu + * ~/howm_kuzu の内容を確認し, 問題なければ + cat ~/howm_kuzu | /bin/sh + * 更新順と名前順が一致するよう, タイムスタンプをでっちあげ + * メモディレクトリに cd して, + * GNU touch の場合 + find . -name '*.howm' -print | sort -r | ruby -ne 'puts %~touch -d "#{ARGF.lineno} min ago" #$_~' > ~/howm_kuzu + * それ以外の場合 + find . -name '*.howm' -print | sort | ruby -ne '$_.chop!; puts %~sleep 1; touch #$_~' > ~/howm_kuzu + * ~/howm_kuzu の内容を確認し, 問題なければ + cat ~/howm_kuzu | /bin/sh + * メニューファイルのさしかえ (ja/* のコピー) → ((<インストール>)) + * 旧メニューファイルは捨てる +* 旧体制を貫く場合: .emacs (howm ロードより前)に + (setq howm-ref-header ">>") ; goto リンク + (setq howm-keyword-header "<<") ; come-from リンク + (setq howm-reminder-old-format t) ; リマインダの書式変更をしない + (setq howm-date-separator "/") ; 日付は 2003/10/21 の形式 + (setq howm-menu-keyword-regexp nil) ; 「%○○%」を menu-mode にしない + (setq howm-menu-top nil) ; C-c , , で「<< %menu%」を開かない + (setq howm-menu-file "menu.howm") ; C-c , , で menu.howm を開く + (setq howm-use-color nil) ; << などに色をつけない + (setq howm-menu-name-format " *howmM:%s*") ; メニューは隠し buffer + (setq howm-abbreviate-file-name nil) ; ファイル名表記は full path + ;; 旧デフォルト設定 + (setq howm-file-name-format "%Y/%m/%Y_%m_%d.howm") ; 1 日 1 ファイル + (add-to-list 'auto-mode-alist '("\\.howm$" . fundamental-mode)) + (setq howm-default-key-table + '( + ;; ("key" func list-mode-p global-p) + ("r" howm-initialize-buffer) + ("l" howm-list-recent t t) + ("a" howm-list-all t t) + ("g" howm-list-grep t t) + ("m" howm-list-migemo t t) + ("t" howm-list-todo t t) + ("y" howm-list-schedule t t) + ("c" howm-create t t) + ("," howm-menu t t) + ("d" howm-dup) + ("i" howm-insert-keyword) + ("D" howm-insert-date) + ("K" howm-keyword-to-kill-ring t t) + ("n" action-lock-goto-next-link) + ("p" action-lock-goto-previous-link) + ("Q" howm-kill-all t t) + )) + (when (featurep 'howm-mode) (howm-set-keymap)) + * 同梱ツールの使用時は, 次のオプションをつける + * howm2 -comefrom='<<' -goto='>>' + * hcal.rb -format=old -date_sep=/ + * tag2plan -format=old -date_sep=/ + +== v0.8.x, v0.9.x からの移行例 + +* メモディレクトリの階層化に応じて… + * 新体制に移行 + * 何もしなくてよい. + * やりたければ, ~/howm/2003/09/ などを作って旧メモを移動してもよい + * 旧体制を貫く: .emacs に + (setq howm-file-name-format "%Y_%m_%d.howm") + +== v0.7.x からの移行例 + +* リマインダの書式変更に伴い, 次のスクリプトでメモを変換 + * 変換スクリプト (~/kuzu.rb とする) + $d = '@\\[[0-9 :/]+\\]' + $_.gsub!(/(#$d) *!!!/){|s| "#$1! ★★"} + $_.gsub!(/(#$d) *!!/){|s| "#$1! ★"} + $_.gsub!(/(#$d) *!/){|s| "#$1!"} + $_.gsub!(/(#$d) *@@@/){|s| "#$1@ ★★"} + $_.gsub!(/(#$d) *@@/){|s| "#$1@ ★"} + $_.gsub!(/(#$d) *@/){|s| "#$1@"} + $_.gsub!(/(#$d) *~~~/){|s| "#$1+ ★★"} + $_.gsub!(/(#$d) *~~/){|s| "#$1+ ★"} + $_.gsub!(/(#$d) *~/){|s| "#$1+"} + END { + STDERR.print '.' + sleep 1 + } + * 変換手順 + cd ~/howm + ls *.howm | xargs -n 1 ruby -p -i.bak ~/kuzu.rb + (確認後, *.bak を捨てる) + +== v0.6 以前からの移行例 + +* come-from の書式変更に伴い, 以下のようにメモを変換 + cd ~/howm + ruby -p -i.bak -e '$_.sub! /^= /, "= << "; $_.sub! /^= << link$/, "= link"' *.howm + (確認後, *.bak を捨てる) + * rd-memo との互換性のために, 「= link」は変換しない +* さらに, ファイル名も変更 + * 新方式に移す場合 + * 次のようにして, 「cat ◯◯ ◯◯ > ◯◯」というコマンド列を作成 + cd ~/howm + ruby -e 'h=Hash::new []; ARGV.each{|f| f=~/^([0-9]+)-[0-9]+.*/ and h[$1] = h[$1] + [f]}; h.keys.sort.each{|k| puts "cat #{h[k].sort.join %! !} > #{k =~ /(....)(..)(..)/; %!#$1_#$2_#$3.howm!} && sleep 1"}' *.howm > howm_kuzu + * sleep 1 は, ファイル更新時刻順でちゃんと並ぶように + * howm_kuzu の内容を確認し, 問題なければ + cat howm_kuzu | /bin/sh + (確認後, 200*-*.howm を捨てる) + * 旧方式を貫く場合: ~/.emacs に + (setq howm-file-name-format "%Y%m%d-%H%M%S.howm") ;; 1 メモ 1 ファイル + (setq howm-file-name-format "%Y%m%d-000000.howm") ;; 1 日 1 ファイル + += 古いカスタマイズ法 + +== v1.2.3 のカスタマイズ [2005-05-08] + +~/.emacs (~/.emacs.el かも)に, 以下のように書く + +* 色 + * <<< などに色をつけない + (setq howm-use-color nil) + * 色かえ: howm のロードより後に + (set-face-foreground 'howm-mode-keyword-face "red") ;; <<< + (set-face-foreground 'howm-mode-ref-face "magenta") ;; >>> + (set-face-background 'howm-mode-wiki-face "green") ;; [[]] の背景 + (set-face-background 'howm-mode-title-face "yellow") ;; = の背景 + (set-face-foreground 'action-lock-face "blue") ;; 下線文字 + (set-face-underline 'action-lock-face t) ;; 下線は文字と同色 (Emacs 21) + (set-face-underline 'action-lock-face "dark cyan") ;; 下線 (Emacs 21) + (set-face-foreground 'howm-menu-key-face "orange") ;; メニューの shortcut + * 色名は M-x list-colors-display 参照 + * 内容バッファに rd-mode な色をつける + ;; rd-mode.el が読み込まれているという前提で + (setq howm-view-contents-font-lock-keywords rd-font-lock-keywords) + +* 便利キー + * 「カタカナ」でメニュー, 「Ctrl-カタカナ」で新規メモ + (define-key global-map [katakana] 'howm-menu) + (define-key global-map [(control katakana)] 'howm-create) + * [tab]([alt]-[tab])で次(前)のリンクに移動 + (define-key howm-mode-map [tab] 'action-lock-goto-next-link) + (define-key howm-mode-map [(meta tab)] 'action-lock-goto-previous-link) + * 本来の tab は C-i で + +* 保存場所 + * メモを ~/memo/ に置く + (setq howm-directory "~/memo/") + * メモ置き場/年/年月日-時分秒.howm に + (setq howm-file-name-format "%Y/%Y%m%d-%H%M%S.howm") + * ファイル名自体に年月日が入っていないと, filter-by-date が機能しない + * 1 日 1 ファイル (メモ置き場/年/月/年_月_日.howm に) + (setq howm-file-name-format "%Y/%m/%Y_%m_%d.howm") + * 不完全な点があります. 我慢できる人だけどうぞ + * メモ単位であるべき処理の一部がファイル単位に + (タイトル表示, 更新順一覧, 内容での絞りこみ, uniq) + * メニューに以下のボタンを書いておくと便利 + * [今日] → 今日のメモ + * [昨日] → 昨日のメモ + * キーワード一覧を ~/howm/.howm-keys に置く + (setq howm-keyword-file "~/howm/.howm-keys") ;; デフォルトは ~/.howm-keys + * こうしておけば, 違うマシンでも ~/howm/ 以下のコピーだけで済む. + * すでに書いたメモがあるなら, mv ~/.howm-keys ~/howm/ をしておくか, + 再構築する(→((<インストール>))). + * デメリット: 検索が遅くなる? (体感できるほどかは, やってみないと不明) + +* 一覧 + * タイトル一覧を表示 + (setq howm-list-title t) + * タイトルを書かないときでも, タイトル欄「= 」は残しておく方が安全でしょう + (対策はしたつもりですが…) + * ○○のときだけタイトル表示 + (setq howm-list-title + ;; ↓に書いたコマンドでだけタイトル表示 + '(howm-list-all howm-list-recent + howm-list-grep howm-list-grep-fixed howm-list-migemo + howm-list-related howm-list-around + howm-keyword-search)) ;; これは come-from リンク・goto リンク + * 関数を指定することも可能 + (setq howm-list-title (lambda () …)) + * 一覧バッファと内容バッファを横に並べる + (setq howm-view-split-horizontally t) + * 横に並べるけど, 一旦 C-x 1 した後は縦に並ぶ + (setq howm-view-split-horizontally 'hoge) ;; t, nil 以外を指定 + * 誰も使っていないのでこの機能は削除 [2008-10-07] + * [return] でファイルを開く際, 一覧バッファを消す. + C-u して [return] だと, 一覧を残す. + (setq howm-view-summary-persistent nil) + * 一覧で「!」したときの初期コマンドを変更 + (setq howm-view-summary-shell-last-file "_FILE_") + (setq howm-view-summary-shell-hist + '("mv _FILE_ ~/gomi" "touch _FILE_" "ls -l _FILE_")) + * 初期コマンドは「mv ファイル名 ~/gomi」 + * M-p 押していくと, 「touch ファイル名」や「ls -l ファイル名」 + * 一覧バッファ・内容バッファを検索ごとに個別に作る + (setq howm-view-summary-name "*howmS:%s*") + (setq howm-view-contents-name "*howmC:%s*") + * 一覧をデフォルトで日付順に + (setq howm-list-normalizer 'howm-view-sort-by-reverse-date) + * C-x 1 後は勝手にフレームを分割しない (SPC で再分割) + (setq howm-view-keep-one-window t) + * 一覧バッファの色つけ例 + (setq howm-view-summary-font-lock-keywords '(("^2003" . 'highlight))) + * foo を検索しても [[foo]] を上位にしない + (setq howm-list-prefer-wiki nil) + +* メニュー + * メニューの変更 + * メニューを開いて [menu 編集] 上でリターン → 自由に編集 + * よく開くメモへの goto リンクなどを書いておけば便利かと + * メニューの末尾に「R[menu 更新] E[menu 編集]」をつける + (setq howm-menu-footer "\n-- \n%\"R\"[menu 更新] %\"E\"[menu 編集]") + * メニューは隠しバッファに + (setq howm-menu-name-format " *howmM:%s*") + * ※ Emacs 豆知識 + * 空白で始まるバッファ名は, C-x b や C-x C-b で出てこない + * そんなバッファを見るには, C-x b C-q SPC SPC + * メニューをメモ扱いしない (メモ一覧・検索の対象外に) + ;; mv ~/howm/0000-00-00-000000.howm ~/hoge/fuga/menu.howm しといて… + (setq howm-menu-file "~/hoge/fuga/menu.howm") + * 予定表の表示範囲 + (setq howm-menu-schedule-days-before 2) ;; ○日前から + (setq howm-menu-schedule-days 7) ;; ○日後まで + * todo の表示件数 + (setq howm-menu-todo-num 50) + +* もっと軽く (cf. ((<富豪的プログラミング|URL:http://pitecan.com/fugo.html>))) + * メニューファイルを直接指定 + (setq howm-menu-file "0000-00-00-000000.howm") + * メニューを 2 時間キャッシュ + (setq howm-menu-expiry-hours 2) + * かわりに, メモ保存時にメニューを自動更新するようになる(かなり重い). + それも止めるなら + (setq howm-menu-refresh-after-save nil) + * セーブ後の下線引き直しをしない + (setq howm-refresh-after-save nil) + * 一覧でのタイトル表示を抑制 + ;; 「最近の」または「前後の」メモ一覧時に限る + (setq howm-list-title '(howm-list-recent howm-list-around)) + ;; 一切表示せず + ;(setq howm-list-title 'nil) + * 検索に grep を使う + (setq howm-view-use-grep t) + * この場合, ローマ字検索を使うには migemo-server を動かしておく必要あり + * GNU grep じゃないとだめかも. -H とか -r とか -e とか… + * grep コマンド名を変更するなら… + (setq howm-view-grep-command "egrep") + (setq howm-view-fgrep-command "fgrep") + * egrep, fgrep がないけど GNU grep はある, という環境(リナザウ?)なら… + (setq howm-view-grep-command "grep") + (setq howm-view-fgrep-command "grep") + (setq howm-view-grep-extended-option "-E") + (setq howm-view-grep-fixed-option "-F") + +* 外部 viewer + * ファイル名(正規表現)と viewer の対応を指定 (~/.mailcap より優先します) + (setq howm-view-external-viewer-assoc + '( + ("[.]\\(jpg\\|gif\\|png\\)$" . "display %s") + ("[.]dvi$" . "xdvi %s") + )) + * 「外部 viewer を使わない mime-type」の指定 (正規表現) + (setq howm-view-open-by-myself '("text/.*" "application/emacs-lisp")) + * ~/.mime-types や ~/.mailcap を参照しない + (setq howm-view-use-mailcap nil) + * この設定をしてなくても, ライブラリの load に失敗した場合は参照しません + * emacs-21.2.1 付属の gnus/mailcap に依存 + * 古い FLIM は conflict? + +* 検索 + * ドットファイルも探す + (setq howm-excluded-file-regexp + "^[.][.]\\|[~#]$\\|\\.bak$\\|/CVS/") + * 対象ディレクトリの追加 + * 全文検索のとき, メモに加えて指定ディレクトリ以下も再帰的に探す + (setq howm-search-path '("~/Mail" "~/News")) + (setq howm-search-other-dir t) ;; 下記のトグルの初期値 (t か nil) + * M-x howm-toggle-search-other-dir で, + 上記ディレクトリを検索対象にするかしないかトグル + * キーバインドしたければ各自で (インターフェース模索中につき…) + * 検索に使う関数をすりかえ + ;; t なら grep コマンド, nil ならデフォルトの elisp 関数を使用. + ;; これ以外なら, 指定した関数を使用. + (setq howm-view-use-grep #'my-grep-function) + (defun my-grep-function (str file-list + &optional fixed-p force-case-fold) + "STR を FILE-LIST (ファイル名のリスト)から検索. + 戻り値は, ((ファイル名 行番号 行内容) (ファイル名 行番号 行内容) …) + というリスト. + FIXED-P が真なら文字列 STR を, 偽なら正規表現 STR を検索する. + STR が大文字を含まないときや, 含んでも FORCE-CASE-FOLD が真のときは, + 大文字小文字の違いを無視する." + …) + * howm で foo を検索した後は, C-s C-s も foo の検索に + (setq howm-view-update-search-ring t) + * 正規表現は C-u C-s C-s なので注意 + +* 未保存だろうと委細構わず, howm-mode なバッファをすべて強制削除するコマンド + (おすすめしません. 使わないでください.) + * C-u C-c , Q + * メニューに書くなら [強制全消] + * 物騒なので, ↓を書いとかないと無効 + (setq howm-kill-all-enable-force t) + +* テンプレートの変更例 + * こんなふうに + Subject: タイトルバーに時計を表示 ←直前のリージョンの内容 + Date: Thu, 12 Sep 2002 15:45:59 +0900 + In-Reply-To: ←直前ファイル + + ■ ← カーソル + * ~/.emacs に + (setq howm-template "Subject: %title\nDate: %date\n%file\n%cursor") + (setq howm-template-date-format "%a, %d %b %Y %H:%M:%S %z") + (setq howm-template-file-format "In-Reply-To: <%s>\n") + * テンプレートを複数指定 + ;; C-u 2 C-c , c → 2 番目のテンプレートで新規メモ + ;; メニューから C-u 2 c でも同様 + (setq howm-template + '("= %title%cursor\n%date %file\n\n" "%date: %title%cursor")) + * ついでに, howm-template の値が関数なら + 「universal-argument を引数にしてそいつを呼ぶ」っていうのも仕込みました + +* 書式の変更例 (howm-*.el の load より前に) + * タイトル(メモ区切り) @@@ … + (setq howm-view-title-header "@@@") + * goto リンク ==>…, come-from リンク <==… + (setq howm-ref-header "==>") + (setq howm-keyword-header "<==") + * goto リンク ((<…>)), come-from リンク ((:…:)) + ;; <>:は半角に直してください + (setq howm-ref-regexp "((<\\([^>\r\n]+\\)>))") + (setq howm-ref-regexp-pos 1) + (setq howm-keyword-format "((:%s:))") + (setq howm-keyword-regexp "\\(((:\\)\\([^:\r\n]+\\):))") + (setq howm-keyword-regexp-hilit-pos 1) ;; 「関連キーワード」用 + (setq howm-keyword-regexp-pos 2) + (setq howm-keyword-regexp-format "%s") ;; M-x describe-variable 参照 + * wiki 風リンク [[hoge]] の下線を「]]」だけに + * 「<<< hoge」の作成後は, 「hoge」にも下線 + (setq howm-wiki-regexp "\\[\\[\\([^]\r\n]+\\)\\(\\]\\]\\)") + (setq howm-wiki-regexp-hilit-pos 2) + (setq howm-wiki-regexp-pos 1) + +* こまごま + * <<< で大文字小文字を区別しない + (setq howm-keyword-case-fold-search t) + * 日付入力(C-c , d または [日↓])で年や月を略したら, 「未来」と解釈 + (setq howm-insert-date-future t) + * 新規入力時のみです. 「[2003-12-27]」上で RET したときの動作は従来どおり. + * 「http://」でリターン押したら, URL を kill-ring へ + (setq action-lock-no-browser t) + +* 予定表・todo 一覧 + * 済項目を表示しない + (setq howm-schedule-types "[!@]") ;; 予定表 + (setq howm-todo-types "[-+~!]") ;; todo 一覧 + * リマインダ記号(!+-~@.)から RET 一発で「済」に + (setq howm-action-lock-reminder-done-default "") + * この場合, C-u RET で従来の動作 (キャンセル, 記号変更, …) + * 予定表・todo 一覧からリマインダ記号上で直接 RET したとき, + 叩かれ先バッファを自動 save + (setq howm-action-lock-forward-save-buffer t) + * 「自動 save」に抵抗ない方だけどうぞ + * 手動で C-x s (未保存バッファたちを save)なりする方が正道かと + * 保留の浮沈範囲 + (setq howm-todo-priority-defer-init -14) ;; 初期値 = 下限 + (setq howm-todo-priority-defer-peak 0) ;; 上限 + * !+-~. の旬度のカスタマイズ + * 例: メニューで, 「潜伏中は非表示」「済は表示」 + (setq howm-menu-todo-priority -50000) + (setq howm-todo-priority-done-bottom -44444) + * howm-todo-priority-normal-bottom 等. ソース(howm-reminder.el)参照. + +* action-lock + * { } (トグルスイッチ)の変更 + ;; howm の load 前に + (setq action-lock-switch-default '("{ }" "{*}" "{-}")) ;; 何個でも + * {_} (未処理)の変更 + (setq howm-dtime-format "[%a %b %d %H:%M:%S %Y]") ;; {_} + (setq howm-template-date-format "[%Y-%m-%d %H:%M]") ;; テンプレート + * 「file://…」や「http://…」の変更 (ましな設定募集) + (()) + ;; howm (正確には action-lock.el) のロードより前に. + ;; ・file://… + (setq action-lock-open-regexp + "\\") + (setq action-lock-open-regexp-pos 2) ;; 2 個目の「\\(…\\)」がファイル名 + ;; ・http://… + (setq action-lock-browse-regexp + "\\<\\([htp]\\{3,5\\}s?\\|ftp\\)://\\([-!@#$%^&*()_+|=:~/?a-zA-Z0-9.,;]*[-!@#$%^&*()_+|=:~/?a-zA-Z0-9]+\\)\\>" + (setq action-lock-browse-regexp-pos 0) ;; マッチした全体が URL + * action-lock 追加例: + 「Message-ID: …」でリターン押したら, 該当メールを namazu で検索 + ;; howm を load した後に + (defun my-howm-search-message-id (id) + (message "Searching...") + (let* ((query (format "+message-id:%s" id)) + (args `("-l" "-n" "1" ,query "/home/hoge/NMZ/Mail")) + (found (car (howm-call-process "namazu" args)))) + (if found + (progn + (find-file found) + (re-search-forward "^$" nil t) + (message "Done.")) + (message "No match.")))) + (setq action-lock-default-rules + (cons (action-lock-general 'my-howm-search-message-id + "Message-[Ii][Dd]: \\(.*\\)$" + 1) + action-lock-default-rules)) + +* メニューを更新するたびに, カレンダーへの export も更新 (→((<外部ツール>))) + (defun my-howm-menu-hook () + (shell-command "tag2plan ~/howm/*/*/*.howm > ~/.dayplan_tag &") + (switch-to-buffer howm-menu-name)) + (add-hook 'howm-menu-hook 'my-howm-menu-hook) + +* (())を使う場合: + ((<"行頭の * でエントリの開閉ができるように"|URL:http://pc.2ch.net/test/read.cgi/unix/1063800495/237-238n>)) + +* おまけ + (setq howm-congrats-format + '( + "%sキタ━━━━━(゜∀゜)━━━━━!!!!" + "(・∀・) %s!" + "(°Д°)%s?" + "( ´_ゝ`)< %s" + ;; …以下略… + )) + +* もっといろいろいじるには, *.el 冒頭を参照 + += 古い参考リンク + +* (()): + web で誰でも編集+お手軽リンク+お手軽フォーマット + * (()) + (EmacsWiki): Emacs での Wiki + * (()) + (RWiki): RWiki を Emacs から使う案 + * (()) + (増井俊之さん): PDA で Wiki + * (()) + (SHIMADA Keiki さん): パラグラフ指向 Wiki + * (()): + Wiki にとらわれないアイデア満載 + * ((<「日本発の wiki クローンリスト」|URL:http://www.yamdas.org/column/technique/clonelist.html>)) + ((<「2」|URL:http://www.yamdas.org/column/technique/clonelist2.html>)) + (yomoyomo さん) +* HyperCard: card 型 database 的 visual script 言語環境??? + * ((<「HyperCard」|URL:http://www.hyuki.com/yukiwiki/wiki.cgi?HyperCard>)) + (YukiWiki) + * ((<「HyperCardのリアルタイム性」|URL:http://web.archive.org/web/20040111061953/http://mwave.sppd.ne.jp/wiki/pukiwiki.php?%5b%5bHyperCard%A4%CE%A5%EA%A5%A2%A5%EB%A5%BF%A5%A4%A5%E0%C0%AD%5d%5d>)) + (SsPukiWiki) + * ((<「ハイパーカードでつくるオフィスシステム」|URL:http://www.kanzaki.com/hc/MacUser.html>)) + (神崎正英さん) +* メモとり環境 + * 分類せず, 時間順と全文検索で管理 + * (()) + (増井俊之さん): + PDA 版も + * ChangeLog メモ + * ((<「Unixのメモ技術」|URL:http://namazu.org/~satoru/unimag/1/>)) + (高林哲さん) + * ((<「私の ChangeLog メモ活用法」|URL:http://nais.to/~yto/doc/zb/0016.html>)) + (山下達雄さん) + * ((<「ChangeLog メモを試してみよう」|URL:http://pop-club.hp.infoseek.co.jp/emacs/changelog.html>)) + (安宅正之さん) + * ((<簑系・超簑|URL:http://www.google.com/search?q=%E2%C0%8Cn+%92%B4%96%AA>)) + (syo さん): ChangeLog + 目次・並べかえ・hyper link って感じ? + * スクラップブック + * ((<紙 2001|URL:http://www.vector.co.jp/soft/win95/writing/se120325.html>)) + (洛西一周さん): 定番 + * (()) + (中村聡史さん): すごくいいらしい + * その他の Emacs 用ツール + * (()) + (John Heidemann さん): + link の便利さを知りました + * (()) + (西本孝志さん) + * (()) + (原田哲治さん): MH 形式 → メールリーダでも読める + * (()) + (臼田拓史さん): いろいろ保存メニュー + * rd-memo + (拙作. 開発終了 → (())) + * ((<「コンピュータ環境でのメモ」|URL:http://pub.cozmixng.org/~the-rwiki/rw-cgi.rb?cmd=view;name=%A5%B3%A5%F3%A5%D4%A5%E5%A1%BC%A5%BF%B4%C4%B6%AD%A4%C7%A4%CE%A5%E1%A5%E2>)) + (Toshさん): Wiki に注目したきっかけ + * howm 関連 + * 移植 + * (()) + (七島功一さん) + ((<+α|URL:http://www.google.com/search?q=vim+howm+%82%AD%82%D3%82%F1>)): vim 版 + * (()) + (kimura さん)と + (()) + (deecay さん): xyzzy 版 + * (()) + (Mr.M さん) + ((<+α|URL:http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?HideMaru>)): 秀丸版 + * 浮沈式 todo リスト + * (()) + (Gonza さん): xyzzy エディタ用の, Wiki + ChangeLog メモ + → ((<経緯|URL:http://pc2.2ch.net/test/read.cgi/win/1053880433/n29-36>)) + * (()) + (鮎川さん): PHP での実装 + * (()) + (ふしはらかんさん): 付箋ベースの Wiki 的なもの. + 付箋自体が上下に移動. 脱帽. + * (()) + (yatsuさん): Ajax な Wiki + * (()) + (Nishimuraさん): Web用マルチユーザメモツール. goto/come-from リンクあり. +* お気にいり + * (()) + (OSHIRO Naoki さん): 箇条書き支援. べたぼれ. + * (()) + (OSHIRO Naoki さん): 今日の日付を反射的に入力. べたぼれ. + * (()) + (高林哲さん): ローマ字を入れるだけで日本語も検索. 愛用. + * (()) + (Toshさん): この README で使ってるドキュメントフォーマット. 愛用. + * (()) + (Naoto Morishimaさん): GNU screen の Emacs 版. 愛用. + +=end diff --git a/site-lisp/howm/doc/README-j.html b/site-lisp/howm/doc/README-j.html new file mode 100644 index 0000000..4054db4 --- /dev/null +++ b/site-lisp/howm/doc/README-j.html @@ -0,0 +1,1811 @@ + + + + +README.ja.rd + + +

howm (一人お手軽 Wiki もどき)

+

$Id: README.ja.rd,v 1.337 2012-12-29 00:59:48 hira Exp $

+

Emacs で断片的なメモをどんどんとるための環境です. +分類機能はあえてつけません. +かわりに, 全文検索とメモ間リンクが手軽にできるようにしました. +自由書式なので改宗も不要 :-)

+

目次

+ +

使い方

+ +

メモを書こう

+

(howm-mode)

+
    +
  • 手順 +
      +
    • C-c , , (M-x howm-menu) でメニューを出し, + [新規] にカーソル置いてリターン → 「今日のメモ」を開く +
        +
      • または, 直接 C-c , c (M-x howm-create)
      • +
    • +
    • こんなテンプレートが表示される

      +
      = ■ ←(タイトル欄)
      +[2002-09-16 20:08] >>> /home/hira/elisp/howm/howm-mode.el
      +↑(作成日 & その前に見てたファイル)
      +
        +
      • 見てたファイルが不要なら, undo (C-x u だか C-_ だか) で消す
      • +
      • テンプレート自体が不要なら, 続けてもう一度 undo
      • +
    • +
    • 好きなことを好きなように書く
    • +
    • そんだけ.
    • +
  • +
  • タイトル欄 (1 ファイル複数メモ) +
      +
    • 次のように書くと, foo と bar がタイトル

      +
      = foo
      +(… ほげほげ …)
      += bar
      +(… ふがふが …)
      +
        +
      • 連結表示では, (… ほげほげ …) や (… ふがふが …) がひとかたまり
      • +
    • +
    • 正確な書式は,

      +
      (行頭)=(空白)(タイトル)(行末)
      +
    • +
    • タイトルなしで, 単にメモの区切りとして使うだけでも OK

      +
      (… ほげほげ …)
      += 
      +(… ふがふが …)
      += 
      +(… へろへろ …)
    • +
  • +
  • 次のように書くとリンク +
      +
    • goto リンク: ファイル(ディレクトリ)名 or 含まれる文字列

      +
      >>> ~/.emacs
      +>>> /usr/src
      +>>> ほげほげ
      +
        +
      • 本文中に「ほげほげ」という文字列を含むメモへのリンク
      • +
    • +
    • come-from リンク: 他のメモで「ふがふが」という文字列が出てきたら, + ぜんぶこのメモへのリンクに

      +
      <<< ふがふが
      +
    • +
    • Wiki 風リンク: goto と同じ. ただし「<<< へろへろ」がもしなければ作る.

      +
      [[へろへろ]]
    • +
  • +
  • リンクには下線が引かれる. 下線にカーソル持ってってリターンキー! +
      +
    • 該当ファイルの一覧が表示される (→メモを読もう) +
        +
      • たとえば, 「>>> emacs」ならこんな一覧

        +
        <<< emacs             ← ずばりの come-from 宣言をしたメモ
        +<<< emacs lisp        ← 「emacs」を含む come-from を宣言したメモ
        +<<< 自作 emacs lisp
        +grep, ruby, emacs の regexp の違い ← 本文中に「emacs」を含むメモ
        +emacs 用検索ツール?[2001-08-13]       (新しい順)
        +…
      • +
      • 読みたいメモにカーソルあわせてリターンキー! + → そのメモを開く
      • +
    • +
    • 裏技 +
        +
      • come-from リンクの <<< 上でリターン → 「関連キーワード」へのリンク +
          +
        • 例 +
            +
          • 「自作」「lisp」が come-from キーワードのとき
          • +
          • 「<<< 自作の lisp」の上でリターン + → 「自作」「lisp」を含むキーワードがヒット
          • +
        • +
      • +
      • メモ中に「<<< foo <<< bar <<< baz」と書けば, 「alias」 +
          +
        • foo, bar, baz のどれでリターンを叩いても + 「foo または bar または baz」の検索になります
        • +
        • Tips: 互いにたぐりたいけど alias で混ぜるのは嫌, という場合には… +
            +
          • どこかに「<<< foo」
          • +
          • 別のどこかに「foo <<< bar」
          • +
          • こうすれば, foo・bar どちらで検索しても「foo <<< bar」が上位に
          • +
        • +
      • +
    • +
  • +
  • リンクの真相 +
      +
    • 実は単に, 「grep ふがふが」のショートカットだったり
    • +
    • come-from リンクの効果 +
        +
      • このキーワードが出てきたら, 自動的にリンク(= 検索)にしてくれ
      • +
      • そのキーワードを検索したときは, 先頭に表示してくれ
      • +
    • +
    • come-from リンクは… +
        +
      • なくてもよし
      • +
      • 1 つのメモ内に 2 個 3 個とあってもよし
      • +
      • 別のメモと同じキーワードがかぶってもよし
      • +
      • タイトルと兼ねるなら,

        +
        = <<< ふがふが
      • +
    • +
    • come-from, goto とも, 大文字小文字を区別 (→カスタマイズ)
    • +
    • 書式は変更可 (→カスタマイズ)
    • +
    • 以下, come-from リンクのキーワードを単に「キーワード」と表記
    • +
  • +
  • action-lock +
      +
    • 呪文の上でリターンキーたたくと魔法発動
    • +
    • { } と書くと「トグルスイッチ」. + たたくたんびに { } → {*} → {-} → { } → …
    • +
    • {_} と書くと「未処理」. + たたけば {_} → [2002-09-13 02:31]
    • +
    • http://… → ブラウザ起動 +
        +
      • browse-url を使用. 必要なら適当に設定.

        +
        (setq browse-url-browser-function 'browse-url-mozilla)
      • +
    • +
    • file://… → ファイルを開く +
        +
      • C-u RET なら窓を分割して開く
      • +
    • +
    • [2002-10-18] のような日付形式の上でリターン → minibuffer で… +
        +
      • そのままリターン → その日付を検索 (goto link)
      • +
      • 「+17」 → 17 日後の日付に書きかえ
      • +
      • 「20030921」 → [2003-09-21] に書きかえ +
          +
        • 年や月は省略可能 +
            +
          • 「6」 → [2002-10-06]
          • +
          • 「803」 → [2002-08-03]
          • +
          • 「31103」 → [2003-11-03]
          • +
        • +
      • +
      • 「~20031030」 → その行の複製を [2003-10-30] 分まで挿入 +
          +
        • 年や月は省略可能 (上と同様)
        • +
        • 「Every?」に対して +
            +
          • そのままリターン → 毎日
          • +
          • 3 → 3日ごと
          • +
          • w → 毎週
          • +
          • m → 毎月
          • +
          • y → 毎年
          • +
        • +
      • +
      • 「.」 → 今日の日付に書きかえ
      • +
      • ちなみに, メニューの [日↓] で日付形式を入力できます
      • +
    • +
    • リンクもこの呪文の一種 +
        +
      • 他におもしろいアイデアあったら教えてください
      • +
    • +
  • +
  • コマンド (★は howm-mode 以外でも常に有効) +
      +
    • C-c , , → メニューを開く ★
    • +
    • メニュー +
        +
      • キー +
          +
        • [space] と [backspace] → スクロール
        • +
        • TAB (M-TAB) → 次(前)の項目へ
        • +
        • [○○] や > の上でリターン → 実行 (ジャンプ)
        • +
        • ? → ヘルプ
        • +
        • q → 脱出
        • +
      • +
      • ボタン [○○] (コマンド) +
          +
        • 作成 +
            +
          • [速記] (C-c , e) → ぱぱっとメモとり (C-c C-c で保存) ★
          • +
          • [新規] (C-c , c) → 新規メモ作成 (現リージョンがタイトル) ★
          • +
          • [複製] (C-c , D) → 現メモを複製 (住所録テンプレートなどの用途を想定)
          • +
        • +
        • 一覧 +
            +
          • [一覧] (C-c , a) → 全メモの一覧 ★
          • +
          • [最近] (C-c , l) → 最近のメモの連結表示 ★ +
              +
            • (C-u 20 C-c , l) → 最近 20 日分の一覧
            • +
          • +
          • [前後] (C-c , A) → 前後のメモ (見てたメモを中心に全メモの日付順一覧) +
              +
            • 対象ファイルを(編集モードで)開いた状態からメニューを呼ぶこと
            • +
          • +
          • [履歴] (C-c , h) → 検索履歴 ★
          • +
          • [予定] (C-c , y) → 予定表: リマインダ参照 ★
          • +
          • [Todo] (C-c , t) → todo 一覧: リマインダ参照 ★
          • +
          • [全バ] (C-c , b) → バッファ一覧 ★
          • +
          • [mark] (C-c , x) → バッファ内のマーク位置一覧 ★
          • +
        • +
        • 検索 +
            +
          • [正規] (C-c , g) → 正規表現の検索 ★ +
              +
            • 基本的には大文字小文字の区別なし +
                +
              • 「Wiki」のように明示的に大文字を指定したときは区別
              • +
            • +
          • +
          • [固定] (C-c , s) → キーワードを補完入力して固定文字列の検索 ★ +
              +
            • C-u C-c , g や C-u C-c , m でも
            • +
          • +
          • [roma] (C-c , m) → ローマ字検索 (migemo) ★
          • +
          • [今日] (C-c , .) → 今日のメモ ★ +
              +
            • (C-u 20 C-c , .) → 20 日前のメモ
            • +
          • +
          • [昨日] (C-c , :) → 昨日のメモ ★ +
              +
            • (C-u 20 C-c , :) → 20 日前のメモ
            • +
          • +
          • [バ内] (C-c , o) → バッファ内を正規表現検索 ★
          • +
        • +
        • 編集: 対象ファイルを(編集モードで)開いた状態からメニューを呼ぶこと +
            +
          • [更新] (C-c , r) → 下線を引きなおす
          • +
          • [鍵↓] (C-c , i) → キーワードを補完入力して貼りつけ ★ +
              +
            • Tips: M-v で候補一覧に移って migemo 検索すると楽
            • +
          • +
          • [日↓] (C-c , d) → 今日の日付 [yyyy-mm-dd] を貼りつけ ★
          • +
          • [時↓] (C-c , T) → 今日の日時 [yyyy-mm-dd HH:MM] を貼りつけ ★
          • +
          • [題↑] (C-c , K) → 現メモのタイトルを kill ring へ (C-y で貼りつけ) ★ +
              +
            • タイトルがみつからなかったときはファイル名
            • +
          • +
          • [名↑] (C-u C-c , K) → ファイル名を kill ring へ ★
          • +
        • +
        • 特別 +
            +
          • [menu 更新] (R) → メニューの予定表などを更新
          • +
          • [menu 編集] → メニューを編集
          • +
          • [全消] (C-c , Q) → howm-mode なバッファをすべて消す (未保存は除く) ★
          • +
          • [酔歩] (C-c , w) → ランダムにリンクをたどって自動閲覧. C-g で停止. ★
          • +
        • +
      • +
    • +
    • その他 +
        +
      • [return] → リンク上なら該当ファイルを開く. さもなくば改行.
      • +
      • 移動 +
          +
        • C-c , n → 次のリンクへ
        • +
        • C-c , p → 前のリンクへ
        • +
        • 一ファイル複数メモのとき… +
            +
          • C-c , N → 次のメモへ
          • +
          • C-c , P → 前のメモへ
          • +
          • C-c , H → 最初のメモへ
          • +
          • C-c , L → 最後のメモへ
          • +
        • +
      • +
      • 新規メモ +
          +
        • C-c , C → いま開いてるファイルに追加 +
            +
          • メニューに [追加] と書くと, この動作のボタン. + 英語メニューなら [Add].
          • +
        • +
        • C-c , I → ファイル名を手動で (非推奨) +
            +
          • C-u C-c , I なら, カレントディレクトリに
          • +
        • +
      • +
      • narrow (1 ファイル複数メモのとき) +
          +
        • M-x howm-narrow-to-memo → 前後のメモを隠す. 戻すには M-x widen
        • +
        • M-x howm-toggle-narrow → 「隠す」「見せる」をトグル
        • +
      • +
      • C-c , SPC → howm なバッファと howm でないバッファとを切り替え ★
      • +
      • M-x howm-show-buffer-as-howm → 現バッファのコピーを howm-mode で表示 ★ +
          +
        • 需要不明なので様子見[2003-09-29]
        • +
      • +
    • +
  • +
+

メモを読もう

+

(一覧モード)

+
    +
  • コマンド(再掲) +
      +
    • C-c , , (M-x howm-menu) → メニュー
    • +
    • C-c , a (M-x howm-list-all) → 全メモ一覧
    • +
    • C-c , g (M-x howm-list-grep) → 全メモ検索 (正規表現)
    • +
    • C-c , s (M-x howm-list-grep-fixed) → 全メモ検索 (固定キーワード)
    • +
  • +
  • 検索やリンクジャンプをすると, 一覧モード +
      +
    • デフォルトは一覧表示 +
        +
      • 一覧バッファ + 内容バッファ
      • +
      • カーソル位置のメモの内容が表示される
      • +
    • +
    • 連結表示もできる +
        +
      • @ で連結表示. もう一度 @ で一覧表示に戻る.
      • +
      • ヒットしたメモの内容をぜんぶつなげて表示 +
          +
        • 断片的なメモをどんどん書く → つなげて読む
        • +
      • +
      • [tab] と [alt]-[tab] で次/前のメモへ
      • +
      • Tips: メモを探すとき, 検索である程度しぼりこんだら, + 連結表示して migemo 検索すると楽
      • +
    • +
    • 一覧表示で +
        +
      • 0 → 連結表示のトグル (@ と同じ)
      • +
      • 1 → 内容バッファを消す
      • +
      • 2 → 内容バッファを出す
      • +
      • v → 内容バッファをトグル
      • +
      • TAB, M-TAB → 次・前のファイルへ
      • +
      • T → タイトル表示をトグル
      • +
    • +
    • どちらの表示でも +
        +
      • n と p → 上下
      • +
      • [space] と [backspace] → スクロール
      • +
      • j と k → 一行スクロール
      • +
      • [return] → カーソル位置のメモを開く +
          +
        • C-u して [return] → メモを開いて一覧を消す
        • +
      • +
      • X → Dired-X を起動 (改名・削除などのファイル操作) +
          +
        • Dired-X の使い方は, info dired-x 等を参照

          +
          v → 中身を見る (q → 戻る)
          +d → 「消すぞ」マーク
          +x → マークしたファイルたちを本当に消す
        • +
      • +
      • ? → ヘルプ
      • +
      • q → 脱出
      • +
    • +
  • +
  • ソート +
      +
    • S → 何でソートするか聞いてくる (補完入力) +
        +
      • name: ファイル名
      • +
      • name-match: 指定したファイル名を上位に移す
      • +
      • date: 作成日
      • +
      • mtime: 更新時刻
      • +
      • summary: 一行表示の文字列
      • +
      • summary-match: 指定した正規表現を一行表示から検索して, 上位に移す
      • +
      • summary-match-string: 同上 + マッチした文字列順にソート
      • +
      • random: ランダムシャッフル
      • +
      • reminder: リマインダ順
      • +
      • numerical-name: ファイル名 (数字順. メールのソートを想定)
      • +
      • reverse: 現表示の逆順
      • +
    • +
    • C-u S ならデフォルトの逆順
    • +
    • R → reverse
    • +
  • +
  • 絞りこみ (and 検索) +
      +
    • f → 何で絞りこむか聞いてくる (補完入力) +
        +
      • name: ファイル名
      • +
      • date: 作成日
      • +
      • mtime: 更新時刻
      • +
      • summary: 一行表示の文字列
      • +
      • contents: 内容
      • +
      • reminder: リマインダの日付範囲
      • +
      • Region: 領域
      • +
      • Around: カーソル位置の周辺 +
          +
        • C-u 7 f → Around なら, 前後 7 つ
        • +
      • +
      • uniq: 同じファイル中で何箇所ヒットしても, 最初の一箇所だけ表示
      • +
    • +
    • C-u f なら, マッチしたものを取り除く
    • +
    • G → contents
    • +
    • u → uniq
    • +
  • +
  • howm-mode と共通 +
      +
    • l → 全メモの一覧
    • +
    • g → 検索 (grep) +
        +
      • C-u g → キーワードを補完入力して検索
      • +
    • +
    • m → ローマ字検索 (migemo) +
        +
      • C-u m → C-u g と同じ
      • +
    • +
    • c → 新規ファイル作成 (現リージョンがタイトル)
    • +
    • Q → howm-mode なバッファをすべて消す (未保存は除く)
    • +
  • +
  • その他 +
      +
    • 一覧表示で ! → shell でコマンド実行 +
        +
      • メモを手っ取り早く捨てたければ, これで mv なり rm なりしてください
      • +
      • 2 回目からは小賢しい挙動をします :-)
      • +
    • +
    • >>> hoge.png なら外部 viewer で画像を開く +
    • +
  • +
+

リマインダ

+

(予定表・todo)

+
    +
  • 機能 +
      +
    • メモ中に

      +
      [2002-10-20]+ ハイウェイ惑星 買おう
      +

      のように書いておくと, 一覧で見ることができます

      +
        +
      • C-c , y → 予定表 +
          +
        • . → 今日へ
        • +
      • +
      • C-c , t → todo 一覧 +
          +
        • 一覧中の上下どの位置に表示されるかは, 日付と種類しだい
        • +
      • +
    • +
    • 「最近の予定」と「todo 冒頭」はメニューにも表示されます + (ことあるごとにちらっと見えるのが重要かと) +
        +
      • メニューでは, 行頭の「>」上で RET を叩くとメモに飛びます + (それ以外の位置でも, 下線がない所なら同様)
      • +
    • +
    • カレンダーソフト plan への export も可能 (→外部ツール)
    • +
  • +
  • 書式 +
      +
    • 覚書 (-)

      +
      [2002-10-20]- ハイウェイ惑星 買おう
      +
        +
      • 指定日に浮きあがり, 以後は徐々に沈む
      • +
      • 指定日までは底に潜伏
      • +
      • 沈むのを遅くするには, 猶予日数で指定(デフォルト 1 日)

        +
        [2002-10-20]-14 ハイウェイ惑星 買おう → 14 日間ぐらいは気にかけよう
      • +
    • +
    • todo (+)

      +
      [2002-10-20]+ ハイウェイ惑星 買うべし
      +
        +
      • 指定日から, 徐々に浮きあがってくる
      • +
      • 指定日までは底に潜伏
      • +
      • 浮きあがる速さは, 猶予日数で指定(デフォルト 7 日)

        +
        [2002-10-20]+14 ハイウェイ惑星 買うべし → 14 日間ぐらいのうちに
      • +
    • +
    • 〆切 (!)

      +
      [2002-10-20]! ハイウェイ惑星 〆切
      +
        +
      • 指定日が近づくと, 浮きあがってくる
      • +
      • 指定日以降は, 一番上に浮きっぱなし
      • +
      • 何日前から浮きはじめるかは, 猶予日数で指定(デフォルト 7 日)

        +
        [2002-10-20]!14 ハイウェイ惑星 〆切 → 14 日前ぐらいからぼちぼち
      • +
      • 予定表(後述)にも表示
      • +
    • +
    • 保留 (~)

      +
      [2002-10-20]~ ハイウェイ惑星 買おうか
      +
        +
      • 指定日から, 浮き沈みをくりかえす
      • +
      • 指定日までは底に潜伏
      • +
      • 何日周期で浮き沈みするかは, 猶予日数で指定(デフォルト 30 日)

        +
        [2002-10-20]!14 ハイウェイ惑星 買おうか → 14 日周期
      • +
    • +
    • 予定 (@)

      +
      [2002-10-20]@ ハイウェイ惑星
      +
        +
      • todo 一覧ではなく, 予定表に表示
      • +
    • +
    • 済 (.)

      +
      [2002-10-20]. ハイウェイ惑星
      +
        +
      • 常に底
      • +
    • +
  • +
  • action-lock +
      +
    • +
      [2002-10-20]+9 ほげほげ
      +

      の「+9」にカーソル置いてリターンたたくと, ミニバッファにメニューが出て…

      +
        +
      • そのままリターン → 「済」

        +
        [2002-10-20]. [2002-10-20]:+9 ほげほげ
      • +
      • x を入力 → 「cancel」

        +
        [2002-10-20]. cancel [2002-10-20]:+9 ほげほげ
      • +
      • - を入力 → 種類を覚書に変更

        +
        [2002-10-20]-9 ほげほげ
      • +
      • 14 を入力 → 猶予日数を 14 日に変更

        +
        [2002-10-20]+14 ほげほげ
      • +
    • +
    • メニュー・予定表・todo 一覧からも直接叩けます
    • +
  • +
  • Tips (私の使い方) +
      +
    • 「todo」や「〆切」は本当に必要なものだけ +
        +
      • それ以外は「覚書」で沈むにまかせる (どうせ全部はできません :p)
      • +
      • 後ろめたければ, 猶予日数の長い「覚書」に

        +
        [2002-11-10]-10 ハイウェイ惑星
      • +
    • +
    • 緊急ではないが重要なこと

      +
      [2002-11-10]-999 ●ハイウェイ惑星
    • +
    • 目立たせたいこと

      +
      [2002-11-10]! ★★ハイウェイ惑星
    • +
  • +
+

導入法

+

インストール

+

自動インストールの場合

+
    +
  • インストール +
      +
    • ./configure して make して, root になって make install +
        +
      • *.el, *.elc は /usr/share/emacs/site-lisp/howm/ に
      • +
      • doc/, ext/ は /usr/local/share/howm/ に
      • +
    • +
    • xemacs の場合

      +
      ./configure --with-xemacs
      +
        +
      • *.el, *.elc は /usr/lib/xemacs/site-lisp/howm/ に
      • +
    • +
    • インストール先の変更例

      +
      ./configure --with-howmdir=$HOME/elisp --prefix=$HOME
      +
        +
      • *.el, *.elc は ~/elisp/ に
      • +
      • doc/, ext/ は ~/share/howm/ に
      • +
    • +
    • その他のオプションは ./configure --help を参照
    • +
  • +
  • 設定 +
      +
    • ~/.emacs (.emacs.el かも)に追加 +
        +
      • case 1: emacs 起動時に読み込む

        +
        (setq howm-menu-lang 'ja)
        +(require 'howm)
      • +
      • case 2: はじめて C-c , , した時に読み込む

        +
        (setq howm-menu-lang 'ja)
        +(global-set-key "\C-c,," 'howm-menu)
        +(autoload 'howm-menu "howm" "Hitori Otegaru Wiki Modoki" t)
      • +
      • いずれも, もし「Cannot open load file」とかエラーが出るなら, + 上記の前にこれを追加

        +
        (add-to-list 'load-path "/usr/share/emacs/site-lisp/howm/")
      • +
    • +
    • ~/howm/ の作成やメニューファイルのコピーは不要です + (メニュー起動時に自動作成)
    • +
  • +
+

手動インストールの場合

+
    +
  • *.el を適当な場所に置く (例: ~/elisp/howm) +
      +
    • ~/.emacs (.emacs.el かも)に +
    • +
    • お好みで, バイトコンパイル

      +
      cd ~/elisp/howm
      +\emacs -batch -q --no-site-file --eval '(progn (add-to-list (quote load-path) ".") (byte-recompile-directory "." 0))'
    • +
  • +
+

インストールの補足

+
    +
  • お好みで, ~/.emacs に設定を追加 (→カスタマイズ)

    +
    ;; 設定例
    +(define-key global-map [katakana] 'howm-menu) ; [カタカナ] キーでメニュー
    +(setq howm-file-name-format "%Y/%m/%Y_%m_%d.txt") ; 1 日 1 ファイル
    +(setq howm-keyword-case-fold-search t) ; <<< で大文字小文字を区別しない
    +(setq howm-list-title nil) ; 一覧時にタイトルを表示しない
    +(setq howm-menu-refresh-after-save nil) ; save 時にメニューを自動更新せず
    +(setq howm-refresh-after-save nil) ; save 時に下線を引き直さない
    +(setq howm-menu-expiry-hours 2) ; メニューを 2 時間キャッシュ
  • +
  • なお, キーワード一覧は ~/.howm-keys に記録される +
      +
    • 万一壊れても, 再構築は簡単. 大文字小文字の区別に応じて… +
        +
      • 区別する場合

        +
        find ~/howm -name '*.txt' -print | xargs ruby -ne '$_ =~ /<<<\s+(.+)$/ and puts $1.split(/\s*<<<\s*/).join "\t"' | sort -u > ~/.howm-keys
      • +
      • 区別しない場合

        +
        find ~/howm -name '*.txt' -print | xargs ruby -ne '$_ =~ /<<<\s+(.+)$/ and puts $1.downcase.split(/\s*<<<\s*/).join "\t"' | sort -u > ~/.howm-keys
      • +
    • +
  • +
  • 注意 +
      +
    • GNU Emacs 以外の場合: + 私はよくわからないので, 検索してください +
        +
      • meadow: + 設定済み Meadow + なら最初から使えます +
          +
        • cygwin + grep 使用のときは, + メモディレクトリとコマンドをドライブレターから指定する. +
            +
          • ~/.emacs(.emacs.el かも) で↓のように

            +
            (setq howm-directory "c:/cygwin/home/howm/")
          • +
          • cygwin から見た / と emacs から見た / が食い違うとかいう話.
          • +
        • +
      • +
      • xemacs: +
          +
        • font-lock のメッセージを抑制すると速くなるそう. + thx > 笠原さん

          +
          (setq font-lock-verbose nil)
        • +
      • +
      • Linux Zaurus: + Wiki + を参照ください. + thx > 100
      • +
    • +
    • SKK を使う場合 +
        +
      • .emacs に以下を書いておかないと, Dired-X に C-x C-j を奪われます

        +
        (setq dired-bind-jump nil)
      • +
    • +
    • viper-mode を使う場合 +
        +
      • viper-mode より先に howm-mode をロードしておく +
          +
        • post-command-hook に悪さする??
        • +
      • +
    • +
    • コンソール (emacs -nw) の場合 +
        +
      • 下線が表示されない端末なら

        +
        (set-face-foreground 'action-lock-face "blue") ;; 下線のかわりに色つけ
      • +
    • +
    • RDを使う場合 +
        +
      • <<< が RD の include とかぶる
      • +
      • 対策例 +
          +
        • include は使わない. 行のはじめに <<< を書かないよう注意する.
        • +
        • include は使わない. rd2 をかける前に howm2 -type=rd を通す.
        • +
        • リンク記号を変更する

          +
          ;; 例: .emacs (howm ロードより前)に
          +(setq howm-ref-header "==>") ; goto リンク
          +(setq howm-keyword-header "<==") ; come-from リンク
        • +
        • → howm wiki の「併用ツール」も参照
        • +
      • +
    • +
  • +
  • 旧版からの移行 (必ずバックアップをとってから!) → <URL:OLD.rd> +
      +
    • 新たに make install しても, 個人のメニューファイルを上書き更新はしません. + 必要なら, メニューを自分で編集するか, + ja/0000-00-00-000000.txt を自分でコピーするかしてください.
    • +
  • +
+

カスタマイズ

+

基本的には M-x customize → [Applications] → [Howm] で. +ぴんとこない項目も, [Show] でありがちな既定値から選択可能.

+

そこにない設定については, ~/.emacs (~/.emacs.el かも)へ, 以下のように直接書く. +(もっと網羅的だが古い解説は, <URL:OLD.rd>を参照)

+
    +
  • 色 +
      +
    • howm 関連の全バッファに共通の色設定

      +
      ;; 「ほげ」と「[ふが]」に着色
      +;; ・設定法の詳細は, 変数 font-lock-keywords のヘルプを参照
      +;; ・face の一覧は M-x list-faces-display
      +(setq howm-user-font-lock-keywords
      +  '(
      +    ("ほげ" . (0 'highlight prepend))
      +    ("\\[ふが\\]" . (0 'font-lock-doc-face prepend))
      +    ))
      +
        +
      • todo や予定の色わけにでも使ってはいかがかと.
      • +
    • +
    • 内容バッファに rd-mode な色をつける

      +
      ;; rd-mode.el が読み込まれているという前提で
      +(setq howm-view-contents-font-lock-keywords rd-font-lock-keywords)
    • +
  • +
  • 便利キー +
      +
    • 「カタカナ」でメニュー, 「Ctrl-カタカナ」で新規メモ

      +
      (define-key global-map [katakana] 'howm-menu)
      +(define-key global-map [(control katakana)] 'howm-create)
    • +
    • [tab]([alt]-[tab])で次(前)のリンクに移動

      +
      (define-key howm-mode-map [tab] 'action-lock-goto-next-link)
      +(define-key howm-mode-map [(meta tab)] 'action-lock-goto-previous-link)
      +
        +
      • 本来の tab は C-i で
      • +
    • +
  • +
  • 保存場所 +
      +
    • メモ置き場/年/年月日-時分秒.txt に

      +
      (setq howm-file-name-format "%Y/%Y%m%d-%H%M%S.txt")
      +
        +
      • ファイル名自体に年月日が入っていないと, filter-by-date が機能しない
      • +
    • +
    • 1 日 1 ファイル (メモ置き場/年/月/年_月_日.txt に)

      +
      (setq howm-file-name-format "%Y/%m/%Y_%m_%d.txt")
      +
        +
      • 不完全な点があります. 我慢できる人だけどうぞ +
          +
        • メモ単位であるべき処理の一部がファイル単位に + (タイトル表示, 更新順一覧, 内容での絞りこみ, uniq)
        • +
      • +
    • +
    • キーワード一覧を ~/howm/.howm-keys に置く

      +
      (setq howm-keyword-file "~/howm/.howm-keys") ;; デフォルトは ~/.howm-keys
      +
        +
      • こうしておけば, 違うマシンでも ~/howm/ 以下のコピーだけで済む.
      • +
      • すでに書いたメモがあるなら, mv ~/.howm-keys ~/howm/ をしておくか, + 再構築する(→インストール).
      • +
      • デメリット: 検索が遅くなる? (体感できるほどかは, やってみないと不明)
      • +
    • +
  • +
  • 一覧 +
      +
    • 一覧で「!」したときの初期コマンドを変更

      +
      (setq howm-view-summary-shell-last-file "_FILE_")
      +(setq howm-view-summary-shell-hist
      +  '("mv _FILE_ ~/gomi" "touch _FILE_" "ls -l _FILE_"))
      +
        +
      • 初期コマンドは「mv ファイル名 ~/gomi」
      • +
      • M-p 押していくと, 「touch ファイル名」や「ls -l ファイル名」
      • +
    • +
    • 一覧バッファの色つけ例

      +
      (setq howm-view-summary-font-lock-keywords '(("^2003" . 'highlight)))
    • +
  • +
  • メニュー +
      +
    • メニューの変更 +
        +
      • メニューを開いて [menu 編集] 上でリターン → 自由に編集
      • +
      • よく開くメモへの goto リンクなどを書いておけば便利かと
      • +
    • +
    • メニューファイルに「%recent」や「%random」と書くと, + 「最近のメモ」や「ランダムに選んだメモ」のタイトル一覧 +
        +
      • カスタマイズ

        +
        (setq howm-menu-recent-num 20)  ;; 表示する個数
      • +
    • +
    • メニュー中に変数や関数の値を表示 +
        +
      • メニュー中にこう書くと… +
          +
        • %here%foo → foo の値を表示
        • +
        • %here%(foo 3) → (foo '3) の結果を表示 +
            +
          • 例: %here%(howm-menu-search "ほげ") → 「ほげ」の検索結果を埋め込み
          • +
          • ただし, 登録した関数しか使えません (おっかないから)

            +
            (setq howm-menu-allow
            +      (append '(foo bar) howm-menu-allow)) ;; foo と bar を許可
          • +
        • +
      • +
    • +
    • メニューをメモ扱いしない (メモ一覧・検索の対象外に)

      +
      ;; mv ~/howm/0000-00-00-000000.txt ~/hoge/fuga/menu.txt しといて…
      +(setq howm-menu-file "~/hoge/fuga/menu.txt")
    • +
    • %reminder の仕切り例

      +
      (setq howm-menu-reminder-separators
      +      '(
      +        (-1  . "━━━━━━━今日↓↑超過━━━━━━━")
      +        (0   . "━━━━━━━予定↓━━━━━━━")
      +        (3   . "━━━━━━━もっと先↓↑3日後まで━━━━━━━")
      +        (nil . "━━━━━━━todo↓━━━━━━━") ;予定とtodoの境
      +        ))
    • +
  • +
  • もっと軽く (cf. 富豪的プログラミング) +
      +
    • 上述の M-x customize で [Howm Efficiency] を参照
    • +
    • 特に, 本気で使うには howm-view-use-grep の設定をおすすめします +
        +
      • grep 使用時の coding system 指定

        +
        (setq howm-process-coding-system 'euc-japan-unix) ;; 読み書き共通
        +(setq howm-process-coding-system '(utf-8-unix . sjis-unix)) ;; (読.書)
      • +
    • +
    • Tips: gc-cons-threshold の値を増やすと速くなる場合がある. + ref > 220,234-236

      +
      (setq gc-cons-threshold (* 4000 10000))
    • +
    • Tips: grep-2.5 では, 環境変数 LANG を C にしておくと, + マルチバイト対応がオフになって速くなる + ref
    • +
  • +
  • 検索 +
      +
    • 対象ディレクトリの追加 +
        +
      • 全文検索のとき, メモに加えて指定ディレクトリ以下も再帰的に探す

        +
        (setq howm-search-path '("~/Mail" "~/News"))
        +(setq howm-search-other-dir t) ;; 下記のトグルの初期値 (t か nil)
      • +
      • M-x howm-toggle-search-other-dir で, + 上記ディレクトリを検索対象にするかしないかトグル +
          +
        • キーバインドしたければ各自で (インターフェース模索中につき…)
        • +
      • +
    • +
  • +
  • 未保存だろうと委細構わず, howm-mode なバッファをすべて強制削除するコマンド + (おすすめしません. 使わないでください.) +
      +
    • C-u C-c , Q
    • +
    • メニューに書くなら [強制全消]
    • +
    • 物騒なので, ↓を書いとかないと無効

      +
      (setq howm-kill-all-enable-force t)
    • +
  • +
  • テンプレートの変更例 +
      +
    • こんなふうに

      +
      Subject: タイトルバーに時計を表示 ←直前のリージョンの内容
      +Date: Thu, 12 Sep 2002 15:45:59 +0900
      +In-Reply-To: </home/hira/sawfish/rich-title/rich-title.jl> ←直前ファイル
      +
      +■ ← カーソル
      +
        +
      • ~/.emacs に

        +
        (setq howm-template "Subject: %title\nDate: %date\n%file\n%cursor")
        +(setq howm-template-date-format "%a, %d %b %Y %H:%M:%S %z")
        +(setq howm-template-file-format "In-Reply-To: <%s>\n")
      • +
    • +
    • テンプレートを複数指定

      +
      ;; C-u 2 C-c , c → 2 番目のテンプレートで新規メモ
      +;; メニューから C-u 2 c でも同様
      +(setq howm-template
      +      '("= %title%cursor\n%date %file\n\n" "%date: %title%cursor"))
      +
        +
      • ついでに, howm-template の値が関数なら + 「universal-argument と直前のバッファを引数にしてそいつを呼ぶ」 + っていうのも仕込みました
      • +
    • +
  • +
  • 書式の変更例 (howm-*.el の load より前に) +
      +
    • タイトル(メモ区切り) @@@ …

      +
      (setq howm-view-title-header "@@@")
    • +
    • goto リンク ==>…, come-from リンク <==…

      +
      (setq howm-ref-header "==>")
      +(setq howm-keyword-header "<==")
    • +
    • goto リンク ((<…>)), come-from リンク ((:…:))

      +
      ;; <>:は半角に直してください
      +(setq howm-ref-regexp "((<\\([^>\r\n]+\\)>))")
      +(setq howm-ref-regexp-pos 1)
      +(setq howm-keyword-format "((:%s:))")
      +(setq howm-keyword-regexp "\\(((:\\)\\([^:\r\n]+\\):))")
      +(setq howm-keyword-regexp-hilit-pos 1) ;; 「関連キーワード」用
      +(setq howm-keyword-regexp-pos 2)
      +(setq howm-keyword-regexp-format "%s") ;; M-x describe-variable 参照
      +
        +
      • 注: come-from キーワードの alias では, + 次のどちらかしか想定していません. +
          +
        • 「…から後」型: <<< foo <<< bar <<< baz
        • +
        • 「…から…まで」型: ((:foo:)) ((:bar:)) ((:baz:))
        • +
      • +
    • +
    • wiki 風リンク [[hoge]] の下線を「]]」だけに +
        +
      • 「<<< hoge」の作成後は, 「hoge」にも下線

        +
        (setq howm-wiki-regexp "\\[\\[\\([^]\r\n]+\\)\\(\\]\\]\\)")
        +(setq howm-wiki-regexp-hilit-pos 2)
        +(setq howm-wiki-regexp-pos 1)
      • +
    • +
  • +
  • こまごま +
      +
    • 日付入力(C-c , d または [日↓])で年や月を略したら, 「未来」と解釈

      +
      (setq howm-insert-date-future t)
      +
        +
      • 新規入力時のみです. 「[2003-12-27]」上で RET したときの動作は従来どおり.
      • +
    • +
    • 「http://」でリターン押したら, URL を kill-ring へ

      +
      (setq action-lock-no-browser t)
    • +
  • +
  • 予定表・todo 一覧 +
      +
    • リマインダ記号(!+-~@.)から RET 一発で「済」に

      +
      (setq howm-action-lock-reminder-done-default "")
      +
        +
      • この場合, C-u RET で従来の動作 (キャンセル, 記号変更, …)
      • +
    • +
    • 予定表・todo 一覧からリマインダ記号上で直接 RET したとき, + 叩かれ先バッファを自動 save

      +
      (setq howm-action-lock-forward-save-buffer t)
      +
        +
      • 「自動 save」に抵抗ない方だけどうぞ
      • +
      • 手動で C-x s (未保存バッファたちを save)なりする方が正道かと
      • +
    • +
    • 保留の浮沈範囲

      +
      (setq howm-todo-priority-defer-init -14)  ;; 初期値 = 下限
      +(setq howm-todo-priority-defer-peak 0) ;; 上限
    • +
    • !+-~. の旬度のカスタマイズ +
        +
      • 例: メニューで, 「潜伏中は非表示」「済は表示」

        +
        (setq howm-menu-todo-priority -50000)
        +(setq howm-todo-priority-done-bottom -44444)
      • +
      • howm-todo-priority-normal-bottom 等. ソース(howm-reminder.el)参照.
      • +
    • +
    • todo 一覧(M-x howm-list-todo)の仕切り例

      +
      (setq howm-todo-separators
      +      '(
      +        (0  . "━━━━━━━↑超過━━━━━━━")
      +        (nil . "━━━━━━━潜伏中↓━━━━━━━")
      +        ))
      +
        +
      • 連結表示やソートをする場合にはじゃまかも…
      • +
    • +
  • +
  • action-lock +
      +
    • { } (トグルスイッチ)の変更

      +
      ;; howm の load 前に
      +(setq action-lock-switch-default '("{ }" "{*}" "{-}")) ;; 何個でも
    • +
    • {_} (未処理)の変更

      +
      (setq howm-dtime-format "[%a %b %d %H:%M:%S %Y]") ;; {_}
      +(setq howm-template-date-format "[%Y-%m-%d %H:%M]") ;; テンプレート
    • +
    • 「file://…」や「http://…」の変更 (ましな設定募集) + thx > 945

      +
      ;; howm (正確には action-lock.el) のロードより前に.
      +;; ・file://…
      +(setq action-lock-open-regexp
      +      "\\<file://\\(localhost\\)?\\([-!@#$%^&*()_+|=:~/?a-zA-Z0-9.,;]*[-!@#$%^&*()_+|=:~/?a-zA-Z0-9]+\\)\\>")
      +(setq action-lock-open-regexp-pos 2) ;; 2 個目の「\\(…\\)」がファイル名
      +;; ・http://…
      +(setq action-lock-browse-regexp
      +      "\\<\\([htp]\\{3,5\\}s?\\|ftp\\)://\\([-!@#$%^&*()_+|=:~/?a-zA-Z0-9.,;]*[-!@#$%^&*()_+|=:~/?a-zA-Z0-9]+\\)\\>"
      +(setq action-lock-browse-regexp-pos 0) ;; マッチした全体が URL
    • +
    • action-lock 追加例: + 「Message-ID: …」でリターン押したら, 該当メールを namazu で検索

      +
      ;; howm を load した後に
      +(defun my-howm-search-message-id (id)
      +  (message "Searching...")
      +  (let* ((query (format "+message-id:%s" id))
      +         (args `("-l" "-n" "1" ,query "/home/hoge/NMZ/Mail"))
      +         (found (car (howm-call-process "namazu" args))))
      +    (if found
      +        (progn
      +          (find-file found)
      +          (re-search-forward "^$" nil t)
      +          (message "Done."))
      +      (message "No match."))))
      +(setq action-lock-default-rules
      +      (cons (action-lock-general 'my-howm-search-message-id
      +                                 "Message-[Ii][Dd]: \\(.*\\)$"
      +                                 1)
      +            action-lock-default-rules))
    • +
  • +
  • RDを使う場合: + 行頭の * でエントリの開閉ができるように + → 237-238
  • +
  • おまけ

    +
    (setq howm-congrats-format
    +      '(
    +        "(´・ω・`) %s"
    +        "(`・ω・´) %s"
    +        ;; …以下略…
    +        ))
    +(setq howm-congrats-command '("play" "~/sound/fanfare.wav"))
  • +
  • もっといろいろいじるには, *.el 冒頭を参照
  • +
+

外部ツール

+

(同梱ツールは ext/ に)

+
    +
  • HTML への変換: howm2 (同梱. 要 ruby) +
      +
    • 例 +
        +
      • メモディレクトリ ~/howm/ を変換して ~/converted/ に吐く

        +
        ./howm2 ~/howm/ ~/converted/
      • +
      • <<< の大文字小文字を無視

        +
        ./howm2 -i ~/howm/ ~/converted/
      • +
      • リンク書式の指定

        +
        ./howm2 -comefrom='<<<' -goto='>>>' ~/howm/ ~/converted/
      • +
      • 「ほげ」を含むファイルだけ HTML 化

        +
        grep -rl 'ほげ' ~/howm/ | howm2 -list ~/converted/
      • +
    • +
    • 何も工夫してないので, 激遅かつメモリどか食い
    • +
    • alias の「再帰的な」展開は未サポート
    • +
  • +
  • カレンダー & todo 一覧: hcal.rb (同梱. 要 ruby) +
      +
    • カレンダー(予定・〆切・済みの一覧)を出力

      +
      hcal.rb -schedule_mark='○' -deadline_mark='●' -done_mark='/' ~/howm/*/*/*.txt
      +
        +
      • こんな感じでずらずら

        +
        ----------------<6>---------------- 2003
        +01 Sun 
        +02 Mon ●田中先生に連絡 ○B4輪講 小林 ○工学基礎実験 12:40 <<<<##>>>>
        +…
      • +
      • ●は〆切(@[2003-06-02]!), ○は予定(@[2003-06-02]@), /は済(@[2003-06-02].)
      • +
      • <<<<# は「今日」, #>>>> は「毎年の同月同日」 +
          +
        • こんな感じで alias しとくと便利

          +
          alias hcal="hcal.rb -schedule_mark='○' -deadline_mark='●' -done_mark='/' ~/howm/*/*/*.txt | less '+/<<<<#'"
        • +
      • +
    • +
    • 「旬度順 todo 一覧」を出力 + (howm を使うなら不要. ChangeLog 派な人へのおまけです) +
        +
      • コマンドラインで

        +
        hcal.rb -l memo.txt
      • +
      • emacs から M-x grep して

        +
        Run grep (like this): hcal.rb -l ~/memo/*.txt
      • +
    • +
  • +
  • 箇条書き支援: +
  • +
  • 簡易小遣い帳 +
      +
    • キーワードを決めて, 日記中に書いておく

      +
      $食費$ 500円 ラーメン
    • +
    • 「<<< $食費$」なり「>>> $食費$」なりで一覧を表示. + 絞り込み・ソートして範囲指定.
    • +
    • M-x yen-region で, 「◯◯円」を合計 + → yen.el
    • +
  • +
  • → howm wiki の「併用ツール」も参照
  • +
+

実装

+

実装について

+
    +
  • ファイル開くたんびにスキャンっていう安易実装 +
      +
    • ~/.howm-keys にキーワードの一覧
    • +
    • ファイルを開くときは… +
        +
      • .howm-keys の各キーワードについて, 出現の有無を検索
      • +
      • 出現キーワードを or でつないだ正規表現を作成
      • +
      • その正規表現を font-lock と action-lock に設定
      • +
    • +
    • ファイル保存時に内容をスキャンして, ~/.howm-keys を更新
    • +
  • +
  • 検索 +
      +
    • メモディレクトリ ~/howm/ 以下を再帰的に全検索. + ファイル名も拡張子も ~/howm/ 以下のディレクトリ構成も, どうでもよい. +
        +
      • ファイル名の制約は, +
          +
        • ファイル名に年月日が入っている (filter-by-date のため)
        • +
        • string<= でソートしたら日時順になる
        • +
      • +
    • +
    • 互換な検索関数を二本用意. 好きな方を使える. +
        +
      • real-grep (grep を呼ぶ)
      • +
      • fake-grep (elisp のみ)
      • +
    • +
  • +
  • ファイル構成 +
      +
    • howm 本体とは独立 +
        +
      • bcomp.el +
          +
        • make 時に使うだけ
        • +
        • navi2ch-cvs-0.0.20031209 から借用
        • +
      • +
      • cheat-font-lock.el +
          +
        • font-lock-keywords を後から変更するための関数
        • +
        • font-lock.el の内部実装に依存
        • +
      • +
      • action-lock.el +
          +
        • action-lock-mode (minor-mode) +
            +
          • 呪文(正規表現)と魔法(関数)の組を登録
          • +
          • リターンキー叩いたら +
              +
            • 呪文の上 → 魔法が発動
            • +
            • それ以外 → 本来のリターンキー
            • +
          • +
        • +
      • +
      • riffle.el +
          +
        • riffle-{summary|contents}-mode +
            +
          • 一覧・内容のぱらぱら表示, 内容の連結表示
          • +
          • 一覧では, post-command-hook で移動検出 → 内容表示を更新
          • +
          • バッファローカル変数 riffle-item-list に項目を保持
          • +
        • +
        • gfunc.el を使用
        • +
      • +
      • gfunc.el +
          +
        • 安直 generic function
        • +
      • +
      • illusion.el +
          +
        • illusion-mode (minor-mode)
        • +
        • ふつうの「ファイル」でない対象を, 開いて編集して保存
        • +
        • 今のところ活用されていない
        • +
      • +
      • honest-report.el +
          +
        • バグレポートの生成
        • +
      • +
    • +
    • howm 本体 +
        +
      • 主役 +
          +
        • howm-backend.el +
            +
          • バックエンドの分離
          • +
          • 抽象化 +
              +
            • ディレクトリ → folder
            • +
            • ファイル → page
            • +
            • マッチ箇所 → item
            • +
          • +
        • +
        • howm-view.el +
            +
          • howm-view-{summary|contents}-mode (major-mode) +
              +
            • riffle-{summary|contents}-mode から派生
            • +
            • 検索の実行
            • +
          • +
        • +
        • howm-mode.el (howm-mode-mode.el から改名[2004-07-14]) +
            +
          • howm-mode (minor-mode) +
              +
            • 上述のスキャンなど
            • +
          • +
        • +
      • +
      • 脇役 +
          +
        • howm-date.el +
            +
          • 日付入力の支援
          • +
        • +
        • howm-reminder.el +
            +
          • 浮沈式 todo
          • +
        • +
        • howm-menu.el +
            +
          • howm-menu-mode (major-mode)
          • +
        • +
      • +
      • 設定 +
          +
        • howm-version.el +
            +
          • 定数 howm-version を設定するだけ
          • +
        • +
        • howm-vars.el +
            +
          • defvar, defcustom, 等
          • +
        • +
        • howm-lang-*.el +
            +
          • 言語依存の変数
          • +
        • +
        • howm-menu-*.el +
            +
          • 初期メニューファイルの内容を文字列定数として定義
          • +
        • +
        • howm-mkmenu.el +
            +
          • howm-menu-*.el を ja/0000-00-00-000000.txt 等から生成するスクリプト
          • +
          • 作者以外は使う必要ないはず
          • +
        • +
      • +
      • 雑 +
          +
        • howm-cl.el +
            +
          • cl パッケージへの依存をまとめただけ
          • +
        • +
        • howm-common.el +
            +
          • howm-*.el で require
          • +
          • 特に, ファイルまたいで使うマクロはここへ (∵ byte-compile 対策)
          • +
        • +
        • howm-misc.el +
            +
          • +
        • +
        • howm.el (howm-mode.el から改名[2004-07-14]) +
            +
          • メインファイル. require するだけ.
          • +
        • +
      • +
    • +
  • +
+

動きませんよ?

+

(バグの指摘をくださる方へ)

+
    +
  • 以下のようにしていただくと, 調査しやすくなります +
      +
    • できるだけ make test をお願いします

      +
      cd howm-○.○.○
      +make test
    • +
    • win なら, test.bat をお願いします +
        +
      • test.bat 中の「HOWM_EMACS=…」を環境にあわせて修正
      • +
      • test.bat を実行
      • +
    • +
    • どちらも, emacs が立ちあがり, 質問票が表示されます
    • +
    • なんでわざわざ? → バグレポートFAQ
    • +
  • +
  • 補足: ガイシュツ上等 +
      +
    • 「仕様か」「既知のバグか」のチェックって, おっくうですよねえ.
    • +
    • howm に関しては, このチェックは不要です. + それよりも, 気軽にどんどん指摘していただく方がありがたいです.
    • +
    • ぜひ, 作者の目が届くところ(2ch か howm wiki)にたれ込んでください.
    • +
    • cf. + バグレポートFAQ, + YASWiki:オープンソースは下町気質
    • +
  • +
  • 作者覚書 +
      +
    • デバッグ用変数 howm-call-process-last-command
    • +
    • C-u M-x howm-bug-report で関連変数の一覧
    • +
    • M-x howm-elp で, プロファイラ elp の準備
    • +
  • +
+

備考

+

参考

+

元ネタ参照. +特に, Q-pocket・HashedWiki・ChangeLog メモからいっぱいまねしてます. 感謝.

+
    +
  • 広瀬雄二著「やさしい Emacs-Lisp 講座」(カットシステム, 1999) + ISBN 4-906391-70-2 + → + オンライン版 (抄?) +
      +
    • elisp はじめるなら圧倒的におすすめ
    • +
    • 6.4 章末問題の「サクサク dired」を参考にさせていただきました
    • +
  • +
+

更新記録

+

thx > patch・改良案・指摘をくださった皆様

+
    +
  • テスト版 +
      +
    • [2013-03-21] +
        +
      • fix: シンボリックリンク下で新規メモが howm-mode にならないバグ + thx
      • +
    • +
    • [2013-03-18] +
        +
      • fix: emacs 24.3.1 でバイトコンパイルせずに実行したときのエラー + "Can't detect type of ..." + thx
      • +
    • +
    • [2013-01-03] +
        +
      • コード掃除
      • +
    • +
    • [2012-12-30] +
        +
      • fix: バイトコンパイル時の警告
      • +
    • +
    • [2012-12-29] +
        +
      • コード整理
      • +
    • +
    • [2012-12-28] +
        +
      • C-c , a (howm-list-all) を高速化 + thx
      • +
    • +
    • [2012-12-27] +
        +
      • 一覧バッファで「ファイル | マッチ行」のかわりにこんな表示に. + このときタイトル先頭の「=」は表示しないように. + (experimental) + thx + thx + > Albert-san (areiner at tph.tuwien.ac.at)

        +
        タイトル A|
        +|マッチ行 A1
        +|マッチ行 A2
        +タイトル B|
        +|マッチ行 B1
        +|マッチ行 B2
        +
          +
        • 設定

          +
          (setq howm-view-list-title-type 2) ;; Show title before summary.
          +(setq howm-view-summary-format "") ;; If you want to delete file names.
          +(setq howm-entitle-items-style2-max-length 50)
          +(setq howm-entitle-items-style2-format "%-0s|%s") ;; for title and summary
          +(setq howm-entitle-items-style2-title-line t) ;; independent title line?
        • +
        • さらに, M-x customize-variable RET howm-list-title RET も設定を
        • +
        • 制限: 一ファイル複数メモで C-c , a (howm-list-all) したときは + 対応するタイトル行に飛んでくれない +
            +
          • そもそも行指向で作っていたので実装が無理矢理
          • +
          • きちんと直すのはめんどう. 強い需要がなければ…
          • +
        • +
      • +
    • +
  • +
  • リリース版 howm-1.4.1 [2012-12-27] +
      +
    • ~/.howm-keys が無かったら, 全メモをスキャンして再生成 + thx + > Albert-san (areiner at tph.tuwien.ac.at)
    • +
    • fix: *.txt と *.howm が混在しても一覧モードの表示がずれないように + thx
    • +
  • +
  • リリース版 howm-1.4.0 [2012-08-16] +
      +
    • Note +
        +
      • 非互換変更に注意! +
          +
        • 1.3.* どおりの挙動を望むなら↓

          +
          (setq howm-compatible-to-ver1dot3 t) ;; (require 'howm) より前に!
        • +
        • 個別に設定したければ, M-x customize-group RET howm-compatibility RET
        • +
      • +
      • 長いこと隠し機能だったものを公式機能にしました.
      • +
      • emacs-24 対応
      • +
      • howm-1.4.0rc2 と同内容です.
      • +
    • +
    • 変更 +
        +
      • howm-file-name-format のデフォルトを *.howm から *.txt に変更 +
          +
        • 拡張子のせいで他ツールとの連携に困っているらしい事例を見かけるので
        • +
      • +
      • 一ファイル複数メモのときも, 絞り込み等をファイル単位じゃなくメモ単位に. + ただし, date での絞り込みはファイル単位のまま.
      • +
      • タイトルが空のときは本文の一行目をタイトルに.
      • +
    • +
    • こまごま改良 +
        +
      • メニューに以下を書けば, タイムスタンプ順でなくファイル名順の上位を表示. + thx

        +
        %here%(howm-menu-recent identity)
      • +
      • ディレクトリに対してもビューアを設定できるように. + thx

        +
        ;; 「file://…/」や「>>> …/」は open コマンド(mac 用)で開く
        +(setq howm-view-external-viewer-assoc '(("/$" . "open %s")))
      • +
      • 変数 howm-normalizer のありがちな設定ミスを察するように + thx
      • +
      • ドキュメントの古い箇所を手直し
      • +
      • rast まわりの試作を削除
      • +
    • +
    • 隠し機能の公式化 +
        +
      • コマンド +
          +
        • C-c , e (howm-remember) + thx + thx + thx + thx + thx
        • +
        • C-c , b (howm-list-buffers)
        • +
        • C-c , x (howm-list-mark-ring)
        • +
        • C-c , o (howm-occur)
        • +
      • +
      • リマインダ +
          +
        • メニューに「%reminder」と書くと, 予定と todo の統合一覧 +
            +
          • 予定「@」は, + howm-menu-schedule-days-before 日前から + howm-menu-schedule-days 日後までを先頭に表示 +
              +
            • [2004-12-03]@5 などと書くと, 「5 日間」の意 + (当日も含むので「12月3日から12月7日まで」). + 一覧から消えるのがそれだけ猶予される. + thx
            • +
          • +
          • 〆切「!」も, 〆切日がその範囲までなら一緒に表示
          • +
          • それより下は従来どおり
          • +
          • 従来の %schedule + %todo とくらべると, スキャンが一回ですむぶん効率的
          • +
        • +
        • [2005-05-15 21:37]@ のような書式の予定は, 時刻順にソート + thx + thx + thx + thx
        • +
        • メニューからリマインダを直叩きしたときに, + 対応バッファの行数が多少ずれていても許す. + thx

          +
          (setq howm-action-lock-forward-fuzziness 5) ;; 何行までずれても許すか
        • +
      • +
      • カスタマイズ +
          +
        • 上記 %reminder や todo list 中の仕切り
        • +
        • grep 使用時の coding system 指定 + thx
        • +
        • howm 関連の全バッファに共通の色設定 + thx + thx + > taku さん
        • +
        • todo を済ませたときに指定コマンドを実行 (howm-congrats-command)
        • +
      • +
    • +
    • fix: 2012-01-21 以降の emacs-24 でエラー (void-variable inhibit-first-line-modes-regexps) + thx + thx > 佐々木 寛 さん (sasaki at fcc.ad.jp)
    • +
  • +
  • リリース版 howm-1.3.9.2 [2011-12-28] +
      +
    • こまごま fix (howm-1.3.9.2rc4 と同内容です) +
        +
      • mac で grep 使用時にエラーが出ていた + thx + thx +
          +
        • grep のデフォルトオプションを設定する前に, + --exclude-dir が通るか確認するようにしました.
        • +
      • +
      • 大きいフレームで一覧表示をしたときの余計なウィンドウ分割を修正 + thx
      • +
      • howm-vars.elc ロード時の警告「old-style backqoute detected!」を回避. + thx
      • +
    • +
  • +
  • リリース版 howm-1.3.9.1 [2011-01-02] +
      +
    • fix: emacs-24.0.50 でのエラー + (Symbol's function definition is void: make-local-hook). + thx > 山本 宗宏 さん (munepi at vinelinux.org)
    • +
  • +
  • 隠し機能 (experimental) +
      +
    • 1.1.1.* 以前から +
        +
      • ソースコードの読み書きも howm で +
          +
        • GNU global + () + もどきの on the fly 版めざして
        • +
        • まだ開発中. 味見するには… +
            +
          • 変数 howm-configuration-for-major-mode を設定 +
              +
            • major-mode に応じて, come-from リンク等の書式を変える
            • +
            • howm-misc.el のコメント参照
            • +
          • +
          • M-x howm-open-directory-independently して ~/elisp/howm などと入力
          • +
        • +
        • 正体は結局 grep なんだから, あまり賢い動作を期待してはいけない +
            +
          • elisp, tex では便利だけど, ruby じゃ使いものにならず. +
              +
            • ∵ elisp の関数名や tex のラベルは大域的に一意. ruby は否.
            • +
          • +
        • +
      • +
    • +
    • 1.2 +
        +
      • 一覧時の内容バッファにファイル全体を表示させる

        +
        (setq howm-view-preview-narrow nil)
        +
          +
        • 連結時は従来どおり(メモ区切りの範囲のみ)
        • +
        • howm-configuration-for-major-mode 以外で使う場面は, まあないでしょう
        • +
      • +
      • リマインダ +
          +
        • リマインダのカスタマイズ + thx

          +
          ;; 新しい型のリマインダ「*」を定義する例:
          +;; 「[2004-07-11]* ほげ」は, 指定日まで上昇し, そのあと下降.
          +;; (旬度 = - |遅れ / 猶予日数|. 猶予日数のデフォルトは 3)
          +;; 1. 旬度関数を準備 (遅れと猶予日数(とアイテム)を食って旬度を吐く)
          +;;    遅れ: 指定日から今日までの日数. まだならマイナス.
          +;;    猶予: 「[2004-07-11]*8」なら 8. 「[2004-07-11]*」だけなら nil.
          +;;    旬度: 大きいほど上. 「覚書」なら初日が 0 で毎日 1 ずつ減る.
          +;;    (アイテム: ふつうは使わないけどついでに. howm-backend.el 参照)
          +(defun my-priority (late lazy item)
          +  (let ((r (howm-todo-relative-late late lazy 3)))
          +    ;; r = late / lazy. 無指定時は lazy = 3.
          +    (- (abs r))))
          +;; 2. face を準備
          +(defface my-face '((t (:foreground "cyan"))) "my face")
          +(setq my-face 'my-face)
          +;; 3. 記号, 旬度関数, face を登録.
          +;; 残りの引数二つは, 「予定表に表示するか」「todo リストに表示するか」.
          +(howm-define-reminder "*" #'my-priority 'my-face nil t)
          +
            +
          • 参考: 既存の旬度関数のグラフが + UNIX USER 誌の記事 + に出てます
          • +
          • バグ +
              +
            • 一部の記号はこけそう (正規表現 […] 内で特別な意味を持つ記号は×)
            • +
            • 「[2004-07-11]- ほげ」から「-」上で RET して「*」を入力するとエラー
            • +
          • +
          • とりあえず叩き台. こんなんでいいんでしょうか?
          • +
        • +
      • +
      • 日付形式 +
          +
        • 日付上で RET×2 してから…

          +
          -, + → 前日, 翌日
          +(, ) → 前日, 翌日
          +{, } → 前月, 翌月
          +[, ] → 前年, 翌年
          +
            +
          • C-u 20 - → 20日前
          • +
          • ヒットしなかったらその先の日付を順に探す

            +
            (setq howm-date-forward-ymd-limit 90)  ;; 90日先で give up
          • +
          • もっとましなキー設定ないかねえ
          • +
        • +
        • 日付入力「C-c , d」したときの動作をさらに小賢しく

          +
          (setq howm-insert-date-pass-through t)
          +
            +
          • 日付コマンドについては元と同様
          • +
          • 日付コマンドじゃないときは, ただちに抜ける. + C-c , d hoge とか C-c , d C-a とか試せばわかります.
          • +
          • しまった. 「[2004-05-21]+」とか入力しようとするととまどう. + 「+ RET」で「+を挿入」にはしてみたけど…
          • +
        • +
      • +
    • +
    • 1.2.1 +
        +
      • Major +
          +
        • howm2 の作り直し? (ext/howmkara) +
            +
          • 必要にせまられてでっちあげ. 名前もてきとう. +
              +
            • 必要は満たされたから, また放置かも. 誰かどうにかしてくれれば…
            • +
          • +
          • 機能は退化. ソースは前よりはまし. +
              +
            • magic string がちらばってるのはけしからんけど…
            • +
          • +
          • 一メモ一ファイルに分割する ext/hsplit.rb も書いたけど, + これはさらに手抜き
          • +
        • +
      • +
      • Minor +
          +
        • hcal.rb の「[2004-09-02]?」対応(自分専用そのばしのぎ) + ref
        • +
        • M-x howm-return-to-list → 一覧表示に戻る + thx +
            +
          • とり急ぎ超雑でっちあげ. 反響に応じてまた考えよう.
          • +
          • 一覧表示にいちいち戻ることなく, 一覧の次項目を直接開く:

            +
            (defun my-howm-next-hit (n)
            +  (interactive "p")
            +  (let ((buf (save-window-excursion
            +               (howm-return-to-list)
            +               (when (not (eq major-mode 'howm-view-summary-mode))
            +                 (error "Sorry. This case is not cared."))
            +               (forward-line n)
            +               (let ((howm-view-summary-keep-cursor nil))
            +                 (howm-view-summary-open))
            +               (current-buffer))))
            +    (switch-to-buffer buf)))
            +(defun my-howm-previous-hit (n)
            +  (interactive "p")
            +  (my-howm-next-hit (- n)))
          • +
        • +
      • +
    • +
    • 1.2.2 +
        +
      • 特殊フォルダ +
          +
        • namazu folder 試作 +
            +
          • コード雑すぎ
          • +
          • +from: などに未対応
          • +
          • 直接検索するには M-x howm-search-namazu
          • +
        • +
        • rot13 folder/page 試作 + thx +
            +
          • これ自体はお遊びだけど, 「ふつうでないページ」の練習として
          • +
          • rot13:xxx バッファは, C-c C-c で「rot13 して保存」 +
              +
            • rot13 なファイルを開くには, M-x yarot13-find-file
            • +
          • +
        • +
        • howm-search-path に, 通常の「ディレクトリ」以外も書ける

          +
          ;; namazu folder と rot13 folder を検索対象に追加
          +;; (M-x howm-toggle-search-other-dir で有効・無効を切りかえ)
          +(let* ((nd "~/PATH/NMZ/Mail") ;; namazu インデックスのあるディレクトリ
          +       (rd "~/g/r13") ;; このディレクトリ以下のファイルは rot13 される
          +       (nf (howm-make-folder:namazu nd))
          +       (rf (howm-make-folder:rot13dir rd)))
          +  (setq howm-search-path (list nf rf)))
          +(howm-toggle-search-other-dir 1) ;; 0 なら初期状態は「無効」
        • +
      • +
      • [2004-12-13]_3 の猶予日数「3」の意味を 1 ずらした +
          +
        • いままでは, 省略と 0 と 1 が同じ意味になっていた
        • +
        • いずれ気が向いたら, もっとまじめに実装しなおすかも + thx
        • +
      • +
      • ext/hcal.rb に iCalendar 出力を追加, …の最低限のとっかかりだけ
      • +
    • +
    • 1.3.1 +
        +
      • 新しい「バグの指摘の手順」案 +
          +
        • make test で emacs を起動
        • +
        • バグを発症させる +
            +
          • 発症しなければ, 自分の .emacs から関連しそうなところを + sample/dot.emacs へコピーして, もう一度 make test
          • +
        • +
        • 発症したらすかさず M-x howm-bug-shot +
            +
          • バージョンやスクリーンショットなどが表示されます
          • +
        • +
        • コメントを加えて 2ch に貼る
        • +
      • +
    • +
    • 1.3.3 +
        +
      • 新規メモ作成をすべて howm-remember にするには…

        +
        ;; howm-create をすべて howm-remember にすりかえる
        +(defadvice howm-create (around remember activate)
        +  (if (interactive-p)
        +      (howm-remember)
        +    ad-do-it))
        +(setcdr (assoc "[新規]" howm-menu-command-table-ja)
        +        '(howm-remember current))  ;; [2006-05-15] 修正
        +
          +
        • メニュー上で c を押したとき, 「メニューの前に表示していたバッファ」 + を出す方が好みなら, 「current」を「previous」と直してください
        • +
      • +
      • カテゴリ別の todo list + thx + thx + thx + thx +
          +
        • 「分類」の要望はつっぱねてきたんだけど, 今日は気まぐれに気が向いたので + お試し. 正式機能にしていくかどうかは未定.
        • +
        • メニューにこう書くと, 「foo」「bar」「baz」を含む todo を + 分類して表示

          +
          %here%(howm-menu-categorized-reminder ("foo" "bar" "baz"))
          +
            +
          • ちなみに, %here% ではクオートは不要です
          • +
        • +
        • さらに, 各行の「foo」「bar」「baz」を消したければ

          +
          %here%(howm-menu-categorized-reminder ("foo" "bar" "baz") nil t)
        • +
        • 「misc.」を非表示にしたければ

          +
          %here%(howm-menu-categorized-reminder ("foo" "bar" "baz") nil nil t)
        • +
      • +
      • 一覧バッファのマッチ内容の左にタイトルを表示. + ちなみに従来のは, 「マッチ内容のかわりにタイトルを表示」. + thx > Highfly さん

        +
        (setq howm-view-list-title-type 2) ;; マッチ内容の左にタイトルを表示
        +(setq howm-view-summary-format "") ;; ファイル名を消したければ
      • +
      • C-c , M で「ファイル名を指定してメモを開く」 + thx > Eduardo Ochs さん
      • +
    • +
    • 1.3.7 +
        +
      • 一覧時にウィンドウ分割を壊さない設定. + thx

        +
        (setq riffle-keep-window t)
        +(setq riffle-window-initializer nil)
        +
          +
        • 内容バッファは表示されません.
        • +
        • とりあえず叩き台. 今後変更の可能性あり.
        • +
      • +
      • M-x howm-list-active-todo で, 現在有効な(=潜伏中でない) todo のみを一覧. + thx +
          +
        • ついでに, M-x howm-list-sleeping-todo で, 潜伏中の todo のみを一覧.
        • +
        • とりあえず関数だけ試作. インタフェースの案があればお聞かせください.
        • +
        • ちなみに, メニューから潜伏中 todo を消すには, + M-x customize-variable RET howm-menu-todo-priority RET で + 「Hide sleeping reminders」を設定してください.
        • +
      • +
      • バッファ名を, ファイル名ではなくタイトルにする. + thx > Mielke-san (peter at exegenix.com), + thx

        +
        ;; emacs 上でのバッファ名を, ファイル名ではなくタイトルに.
        +;; (ファイル名自体は変更しない)
        +(add-hook 'howm-mode-hook 'howm-mode-set-buffer-name)
        +(add-hook 'after-save-hook 'howm-mode-set-buffer-name)
        +
          +
        • タイトル「ほげ」のメモのバッファ名を「=ほげ」に + thx

          +
          ;; タイトルが AAA ならバッファ名を =AAA に.
          +;; 下の howm-mode-set-buffer-name を設定した上で…
          +(setq howm-buffer-name-format "=%s")
        • +
        • 本当は howm と独立したツールにする方がいいけど, + おっくうなのでひとまず.
        • +
      • +
    • +
    • 1.3.8 +
        +
      • M-x howm-extend-deadlines で, + 指定日を過ぎた〆切(!)をすべて一定日数後へ延期. + thx +
          +
        • 仕様もインタフェースもまだ叩き台.
        • +
        • メモを勝手に書きかえる危険な操作なので, バックアップをとってから!
        • +
      • +
    • +
    • 1.3.9 +
        +
      • メニューに「%here%(howm-menu-search "[断]片的" full t)」と書けば, + 「断片的」を含むメモの内容全体をメニューに埋め込み. + thx + > Morgan Veyret さん (morgan.veyret at gmail.com). +
          +
        • 単に "断片的" としないのは, メニューファイル自身がヒットするのを避ける小細工
        • +
      • +
    • +
  • +
  • …履歴抜粋… (<URL:OLD.rd> 参照) +
      +
    • [2010-12-30] 1.3.9 微修正
    • +
    • [2009-12-31] 1.3.8 過ぎた〆切に着色
    • +
    • [2008-12-31] 1.3.7 内部コード整理 (副作用を分離). + howm-list-normalizer から howm-normalizer へ.
    • +
    • [2008-05-31] 1.3.6 着色の不具合修正
    • +
    • [2007-12-09] 1.3.5 夏時間の不具合修正
    • +
    • [2006-12-16] 1.3.4 セキュリティ修正
    • +
    • [2005-08-02] 1.3.0 alias. M-x customize. タイトル表示.
    • +
    • [2005-05-02] 1.2.2 バックエンド切り離し. gfunc.el
    • +
    • [2004-08-24] 1.2 保留「~」の公式化. howm.el, riffle.el
    • +
    • [2004-05-06] 1.1.2 make test
    • +
    • [2004-02-27] 2ch howm スレ 2
    • +
    • [2004-02-21] 1.1.1 「隠し機能」制度を導入
    • +
    • [2004-01-25] sf.jp へ移動
    • +
    • [2005-01-08] UNIX USER 2004.2
    • +
    • [2003-12-27] howm wiki
    • +
    • [2003-11-22] 1.1 デフォルトの変更 + (リンク・日付・リマインダの書式, 一メモ一ファイル, メニューもメモの一種)
    • +
    • [2003-10-27] 1.0.4.2 重くなるバグを修正. よくこんなので動いてたなあ…
    • +
    • [2003-10-02] 1.0.4 外部 viewer, メニューの過剰強化
    • +
    • [2003-09-23] 「テスト版」を導入
    • +
    • [2003-09-18] 1.0.2 HTML 化スクリプト howm2
    • +
    • [2003-09-17] 2ch howm スレ
    • +
    • [2003-09-17] 1.0 メモディレクトリを階層化
    • +
    • [2003-09-16] 0.9.7.1 Wiki 風リンク [[ほげ]]
    • +
    • [2003-09-14] 0.9.4.1 grep 脱却
    • +
    • [2003-09-09] 0.9 ruby 脱却
    • +
    • [2003-08-31] 0.8.5 タイトル一覧
    • +
    • [2003-06-03] 0.8.4 安直カレンダー hcal.rb
    • +
    • [2002-11-03] 0.8 メニュー, 旬度順 todo @[2003/09/20]+
    • +
    • [2002-09-17] 0.7 1 日 1 ファイル, come-from リンク <<
    • +
    • [2002-09-14] 0.6 リンク廃止(すべては「検索」)
    • +
    • [2002-06-10] 日本発の wiki クローンリスト
    • +
    • [2002-05-29] 0.1 公開
    • +
  • +
+

アドレス

+ + + + diff --git a/site-lisp/howm/doc/README.html b/site-lisp/howm/doc/README.html new file mode 100644 index 0000000..7cb4e43 --- /dev/null +++ b/site-lisp/howm/doc/README.html @@ -0,0 +1,241 @@ + + + + +README.rd + + +

howm tutorial

+

First day

+

Write a note.

+
    +
  • Type Ctrl-C , , to open the menu.

    +
    [New] Search([String] [Regexp]) [Dup] [<Title] [<Name] [Date>] [Key>] [Update]
    +[All] [Recent] [Schedule] [Todo] [Update Menu]
  • +
  • Confirm the cursor is on [New], and type [return] there to open new note.

    +
    = 
    +[2002-09-16 20:08] >>> /home/hira/elisp/howm/howm-mode.el
  • +
  • Write anything.

    +
    = First note
    +[2002-09-16 20:08] >>> /home/hira/elisp/howm/howm-mode.el
    +foo
    +bar
    +baz
  • +
+

Second day

+

Write today's note.

+
    +
  • Type Ctrl-C , , and type [return] on [New]. Then, write freely.
  • +
+

Read notes.

+
    +
  • Type Ctrl-C , , to open the menu.

    +
    [New] Search([String] [Regexp]) [Dup] [<Title] [<Name] [Date>] [Key>] [Update]
    +[All] [Recent] [Schedule] [Todo] [Update Menu]
  • +
  • Move the cursor to [All] and type [return] there to browse all notes.
  • +
  • Move the cursor up and down to view each note.
  • +
  • Type [space] and [backspace] to scroll the note.
  • +
  • Type [return] to open the note.
  • +
+

Concatenate notes.

+
    +
  • Type Ctrl-C , , to open the menu.
  • +
  • Move the cursor to [All] and type [return].
  • +
  • Type @ to concatenate all notes.
  • +
  • Type [space] and [backspace] to scroll the notes.
  • +
  • Type @ to toggle summary-view and concatenated-view.
  • +
  • Type [return] to open the note.
  • +
+

Search a word in notes.

+
    +
  • Type Ctrl-C , , to open the menu.
  • +
  • Move the cursor to [String] and type [return] there to search for a string.

    +
    Keyword:
  • +
  • Input a string.

    +
    Keyword: foo
  • +
  • Type [return] to browse matched notes.
  • +
+

Search a phrase in notes.

+
    +
  • Type Ctrl-C , , to open the menu.
  • +
  • Move the cursor to [String] and type [return].
  • +
  • Input a string. Type Ctrl-q and [space] to input a whitespace.

    +
    Keyword: hoge fuga
  • +
  • Type [return] to browse matched notes.
  • +
+

Third day

+

Try goto link.

+
    +
  • Ctrl-C , , and [return] on [New] to open new note.
  • +
  • Write '>>> foo'.

    +
    = 
    +[2002-09-17 20:15]
    +>>> foo
  • +
  • A line is drawn under it. + Move the cursor on it and type [return] to search for 'foo' in all notes.
  • +
+

Try come-from link.

+
    +
  • Write '<<< hoge' in today's note.

    +
    = 
    +[2002-09-17 20:15]
    +>>> foo
    +<<< hoge
  • +
  • Move the cursor on '<<<' and type [return] to search for 'hoge' in all notes.
  • +
  • Select the first day's note and type [return] to open it.
  • +
  • A line is drawn under 'hoge'. + Move the cursor on it and type [return] to search for 'hoge' in all notes.
  • +
  • Remember that '<<< hoge' is always shown first when you search for 'hoge'. + Others are sorted by their modification time.
  • +
+

Search come-from keyword with completion.

+
    +
  • Ctrl-C , , and [return] on [String] to search for a keyword.

    +
    Keyword:
  • +
  • Type 'ho' and type [space] to complete come-from keyword 'hoge'.

    +
    Keyword: hoge
  • +
  • Type [return] to search for 'hoge'.
  • +
+

Fourth day

+

Sort notes.

+
    +
  • Ctrl-C , , and [return] on [All] to browse all notes.
  • +
  • Type S to sort notes.

    +
    Sort by:
  • +
  • Type [space] to show available criteria.
  • +
  • Type 'da' and type [space] to complete 'date'.

    +
    Sort by: date
  • +
  • Type [return] to execute it.
  • +
+

Filter notes.

+
    +
  • Ctrl-C , , and [return] on [All] to browse all notes.
  • +
  • Type f to filter notes.

    +
    Filter by:
  • +
  • Type [space] to show available criteria.
  • +
  • Type 'co' and type [space] to complete 'contents'.

    +
    Filter by: contents
  • +
  • Type [return] and input 'foo'.

    +
    Search in result (grep): foo
  • +
  • Type [return] to execute it.
  • +
+

Read help.

+
    +
  • Ctrl-C , , and [return] on [All] to browse all notes.
  • +
  • Type ? and read the help message.
  • +
+

Use shortcut.

+
    +
  • Type Ctrl-C , c to create new note.
  • +
+

Fifth day

+

Input todo.

+
    +
  • Type Ctrl-C , c to create new note.
  • +
  • Write as follows.

    +
    [2003-09-10]- foo
    +[2003-09-10]+ bar
    +[2003-09-10]! baz
    +[2003-09-10]~ qux
  • +
+

Browse todo.

+
    +
  • Ctrl-C , , and [return] on [Todo] to browse all todo.
  • +
  • Move cursor and type [return] to open the note.
  • +
  • Type Ctrl-C , , to show the head of todo under the menu.
  • +
  • Items are sorted by a magic criterion.

    +
    - sink after the date (reminder)
    ++ float after the date (todo)
    +! float until the date (deadline)
    +~ sink and float periodically after the date (defer)
  • +
+

Finish todo.

+
    +
  • Ctrl-C , , and [return] on [Todo] to browse all todo.
  • +
  • Move cursor and type [return] to open the note.

    +
    [2003-09-10]- foo
  • +
  • Move cursor on - and type [return] to show todo-menu.

    +
    RET (done), x (cancel), symbol (type), num(laziness): 
  • +
  • Type [return] to finish this todo.

    +
    [2003-09-10]. [2003-09-10]:- foo
  • +
+

Input schedule.

+
    +
  • Type Ctrl-C , c to create new note.
  • +
  • Write as follows.

    +
    [2003-09-10]@ hoge
  • +
+

Browse schedule.

+
    +
  • Ctrl-C , , and [return] on [Schedule] to browse all schedule.
  • +
  • Type [space] and [backspace] to scroll the list.
  • +
  • Type . to jump to today.
  • +
  • Type Ctrl-C , , to show the head of schedule under the menu.
  • +
  • Type [return] on > at the beginning of line to open the corresponding note.
  • +
+

Input recurring tasks.

+
    +
  • move cursor to '2003-09-10' on the below form in the opened note.

    +
    [2003-09-10]@ hoge
  • +
  • Type [return] to show date-menu.

    +
    [Wed] RET(goto), +num(shift), yymmdd(set), ~yymmdd(repeat), .(today): 
  • +
  • Input ~031231 [return] and then type m [return] to the below question.

    +
    Every? [RET(all), num(days) w(week), m(month), y(year)] 
  • +
  • And monthly tasks are added automatically until 2003-12-31.

    +
    [2003-09-10]@ hoge
    +[2003-10-10]@ hoge
    +[2003-11-10]@ hoge
    +[2003-12-10]@ hoge
  • +
  • You can use '~1231' instead of '~031231' to input same-year items.
  • +
+

Sixth day

+

Try action-lock { }.

+
    +
  • Type Ctrl-C , c to create new note.
  • +
  • Write { }.

    +
    { }
  • +
  • Move cursor on { } and type [return].

    +
    {*}
  • +
  • Type [return] again.

    +
    {-}
  • +
+

Try action-lock {_}.

+
    +
  • Type Ctrl-C , c to create new note.
  • +
  • Write {_}.

    +
    {_}
  • +
  • Move cursor on {_} and type [return].

    +
    [2003-09-10 04:12]
  • +
+

Try aliases.

+
    +
  • Write '<<< hoge <<< fuga <<< piyo' in a note.

    +
    = 
    +[2002-09-17 20:15]
    +<<< hoge <<< fuga <<< piyo
  • +
  • Write 'hoge' in another note.
  • +
  • Write 'fuga' in yet another note.
  • +
  • Put cursor on 'fuga' and type [return]. + You will see all 'hoge', 'fuga', and 'piyo' are found together.
  • +
+

Seventh day

+

Try customization.

+
    +
  • Type Ctrl-C , , to show the menu.
  • +
  • Move cursor on [Preference] and type [return].
  • +
  • Watch customization items and modify them if you like.
  • +
+

Try editing menu.

+
    +
  • Type Ctrl-C , , to show the menu.
  • +
  • Move cursor on [Edit Menu] and type [return].
  • +
  • Delete the line '%random', and type Ctrl-C , , to observe its effect.
  • +
  • Again try [Edit Menu] and write '%random' to restore it.
  • +
  • Type Ctrl-C , , and move cursor to '%Editing Menu%' at the bottom.
  • +
  • Type [return] and read documentation of menu syntax.
  • +
+ + + diff --git a/site-lisp/howm/doc/README.ja.rd b/site-lisp/howm/doc/README.ja.rd new file mode 100644 index 0000000..817c3e3 --- /dev/null +++ b/site-lisp/howm/doc/README.ja.rd @@ -0,0 +1,1307 @@ +=begin + += howm (一人お手軽 Wiki もどき) +$Id: README.ja.rd,v 1.337 2012-12-29 00:59:48 hira Exp $ + +Emacs で断片的なメモをどんどんとるための環境です. +分類機能はあえてつけません. +かわりに, 全文検索とメモ間リンクが手軽にできるようにしました. +自由書式なので改宗も不要 :-) + +== 目次 + +* ((<使い方>)) … + ((<メモを書こう>))/((<メモを読もう>))/((<リマインダ>)) +* ((<導入法>)) … + ((<インストール>))/((<カスタマイズ>))/((<外部ツール>)) +* ((<実装>)) … + ((<実装について>))/((<動きませんよ?>)) +* ((<備考>)) … + ((<参考>))/((<更新記録>))/((<アドレス>)) + +== 使い方 + +* いろいろありすぎて何が何やら + → 先に((<チュートリアル|URL:TUTORIAL.ja.rd>))をどうぞ +* 自由度ありすぎてどう使えばいいやら + → ((<こんなふうに使えます|URL:index-j.html#hint>)) + +=== メモを書こう +(howm-mode) + +* 手順 + * C-c , , (M-x howm-menu) でメニューを出し, + [新規] にカーソル置いてリターン → 「今日のメモ」を開く + * または, 直接 C-c , c (M-x howm-create) + * こんなテンプレートが表示される + = ■ ←(タイトル欄) + [2002-09-16 20:08] >>> /home/hira/elisp/howm/howm-mode.el + ↑(作成日 & その前に見てたファイル) + * 見てたファイルが不要なら, undo (C-x u だか C-_ だか) で消す + * テンプレート自体が不要なら, 続けてもう一度 undo + * 好きなことを好きなように書く + * そんだけ. + +* タイトル欄 (1 ファイル複数メモ) + * 次のように書くと, foo と bar がタイトル + = foo + (… ほげほげ …) + = bar + (… ふがふが …) + * 連結表示では, (… ほげほげ …) や (… ふがふが …) がひとかたまり + * 正確な書式は, + (行頭)=(空白)(タイトル)(行末) + * 書式は変更可 (→((<カスタマイズ>))) + * タイトルなしで, 単にメモの区切りとして使うだけでも OK + (… ほげほげ …) + = + (… ふがふが …) + = + (… へろへろ …) + +* 次のように書くとリンク + * goto リンク: ファイル(ディレクトリ)名 or 含まれる文字列 + >>> ~/.emacs + >>> /usr/src + >>> ほげほげ + * 本文中に「ほげほげ」という文字列を含むメモへのリンク + * come-from リンク: 他のメモで「ふがふが」という文字列が出てきたら, + ぜんぶこのメモへのリンクに + <<< ふがふが + * 参考 + ((<"Jargon: COME-FROM"|URL:http://catb.org/~esr/jargon/html/C/COME-FROM.html>)) + * Wiki 風リンク: goto と同じ. ただし「<<< へろへろ」がもしなければ作る. + [[へろへろ]] + +* リンクには下線が引かれる. 下線にカーソル持ってってリターンキー! + * 該当ファイルの一覧が表示される (→((<メモを読もう>))) + * たとえば, 「>>> emacs」ならこんな一覧 + <<< emacs ← ずばりの come-from 宣言をしたメモ + <<< emacs lisp ← 「emacs」を含む come-from を宣言したメモ + <<< 自作 emacs lisp + grep, ruby, emacs の regexp の違い ← 本文中に「emacs」を含むメモ + emacs 用検索ツール?[2001-08-13] (新しい順) + … + * 読みたいメモにカーソルあわせてリターンキー! + → そのメモを開く + * 裏技 + * come-from リンクの <<< 上でリターン → 「関連キーワード」へのリンク + * 例 + * 「自作」「lisp」が come-from キーワードのとき + * 「<<< 自作の lisp」の上でリターン + → 「自作」「lisp」を含むキーワードがヒット + * メモ中に「<<< foo <<< bar <<< baz」と書けば, 「alias」 + * foo, bar, baz のどれでリターンを叩いても + 「foo または bar または baz」の検索になります + * Tips: 互いにたぐりたいけど alias で混ぜるのは嫌, という場合には… + * どこかに「<<< foo」 + * 別のどこかに「foo <<< bar」 + * こうすれば, foo・bar どちらで検索しても「foo <<< bar」が上位に + +* リンクの真相 + * 実は単に, 「grep ふがふが」のショートカットだったり + * come-from リンクの効果 + * このキーワードが出てきたら, 自動的にリンク(= 検索)にしてくれ + * そのキーワードを検索したときは, 先頭に表示してくれ + * come-from リンクは… + * なくてもよし + * 1 つのメモ内に 2 個 3 個とあってもよし + * 別のメモと同じキーワードがかぶってもよし + * タイトルと兼ねるなら, + = <<< ふがふが + * come-from, goto とも, 大文字小文字を区別 (→((<カスタマイズ>))) + * 書式は変更可 (→((<カスタマイズ>))) + * 以下, come-from リンクのキーワードを単に「キーワード」と表記 + +* action-lock + * 呪文の上でリターンキーたたくと魔法発動 + * { } と書くと「トグルスイッチ」. + たたくたんびに { } → {*} → {-} → { } → … + * {_} と書くと「未処理」. + たたけば {_} → [2002-09-13 02:31] + * http://… → ブラウザ起動 + * browse-url を使用. 必要なら適当に設定. + (setq browse-url-browser-function 'browse-url-mozilla) + * file://… → ファイルを開く + * C-u RET なら窓を分割して開く + * [2002-10-18] のような日付形式の上でリターン → minibuffer で… + * そのままリターン → その日付を検索 (goto link) + * 「+17」 → 17 日後の日付に書きかえ + * 「20030921」 → [2003-09-21] に書きかえ + * 年や月は省略可能 + * 「6」 → [2002-10-06] + * 「803」 → [2002-08-03] + * 「31103」 → [2003-11-03] + * 「~20031030」 → その行の複製を [2003-10-30] 分まで挿入 + * 年や月は省略可能 (上と同様) + * 「Every?」に対して + * そのままリターン → 毎日 + * 3 → 3日ごと + * w → 毎週 + * m → 毎月 + * y → 毎年 + * 「.」 → 今日の日付に書きかえ + * ちなみに, メニューの [日↓] で日付形式を入力できます + * リンクもこの呪文の一種 + * 他におもしろいアイデアあったら教えてください + +* コマンド (★は howm-mode 以外でも常に有効) + * C-c , , → メニューを開く ★ + * メニュー + * キー + * [space] と [backspace] → スクロール + * TAB (M-TAB) → 次(前)の項目へ + * [○○] や > の上でリターン → 実行 (ジャンプ) + * ? → ヘルプ + * q → 脱出 + * ボタン [○○] (コマンド) + * 作成 + * [速記] (C-c , e) → ぱぱっとメモとり (C-c C-c で保存) ★ + * [新規] (C-c , c) → 新規メモ作成 (現リージョンがタイトル) ★ + * [複製] (C-c , D) → 現メモを複製 (住所録テンプレートなどの用途を想定) + * 一覧 + * [一覧] (C-c , a) → 全メモの一覧 ★ + * [最近] (C-c , l) → 最近のメモの連結表示 ★ + * (C-u 20 C-c , l) → 最近 20 日分の一覧 + * [前後] (C-c , A) → 前後のメモ (見てたメモを中心に全メモの日付順一覧) + * 対象ファイルを(編集モードで)開いた状態からメニューを呼ぶこと + * [履歴] (C-c , h) → 検索履歴 ★ + * [予定] (C-c , y) → 予定表: ((<リマインダ>))参照 ★ + * [Todo] (C-c , t) → todo 一覧: ((<リマインダ>))参照 ★ + * [全バ] (C-c , b) → バッファ一覧 ★ + * [mark] (C-c , x) → バッファ内のマーク位置一覧 ★ + * 検索 + * [正規] (C-c , g) → 正規表現の検索 ★ + * 基本的には大文字小文字の区別なし + * 「Wiki」のように明示的に大文字を指定したときは区別 + * [固定] (C-c , s) → キーワードを補完入力して固定文字列の検索 ★ + * C-u C-c , g や C-u C-c , m でも + * [roma] (C-c , m) → ローマ字検索 (migemo) ★ + * [今日] (C-c , .) → 今日のメモ ★ + * (C-u 20 C-c , .) → 20 日前のメモ + * [昨日] (C-c , :) → 昨日のメモ ★ + * (C-u 20 C-c , :) → 20 日前のメモ + * [バ内] (C-c , o) → バッファ内を正規表現検索 ★ + * 編集: 対象ファイルを(編集モードで)開いた状態からメニューを呼ぶこと + * [更新] (C-c , r) → 下線を引きなおす + * [鍵↓] (C-c , i) → キーワードを補完入力して貼りつけ ★ + * Tips: M-v で候補一覧に移って migemo 検索すると楽 + * [日↓] (C-c , d) → 今日の日付 [yyyy-mm-dd] を貼りつけ ★ + * [時↓] (C-c , T) → 今日の日時 [yyyy-mm-dd HH:MM] を貼りつけ ★ + * [題↑] (C-c , K) → 現メモのタイトルを kill ring へ (C-y で貼りつけ) ★ + * タイトルがみつからなかったときはファイル名 + * [名↑] (C-u C-c , K) → ファイル名を kill ring へ ★ + * 特別 + * [menu 更新] (R) → メニューの予定表などを更新 + * [menu 編集] → メニューを編集 + * [全消] (C-c , Q) → howm-mode なバッファをすべて消す (未保存は除く) ★ + * [酔歩] (C-c , w) → ランダムにリンクをたどって自動閲覧. C-g で停止. ★ + * その他 + * [return] → リンク上なら該当ファイルを開く. さもなくば改行. + * 移動 + * C-c , n → 次のリンクへ + * C-c , p → 前のリンクへ + * 一ファイル複数メモのとき… + * C-c , N → 次のメモへ + * C-c , P → 前のメモへ + * C-c , H → 最初のメモへ + * C-c , L → 最後のメモへ + * 新規メモ + * C-c , C → いま開いてるファイルに追加 + * メニューに [追加] と書くと, この動作のボタン. + 英語メニューなら [Add]. + * C-c , I → ファイル名を手動で (非推奨) + * C-u C-c , I なら, カレントディレクトリに + * narrow (1 ファイル複数メモのとき) + * M-x howm-narrow-to-memo → 前後のメモを隠す. 戻すには M-x widen + * M-x howm-toggle-narrow → 「隠す」「見せる」をトグル + * C-c , SPC → howm なバッファと howm でないバッファとを切り替え ★ + * M-x howm-show-buffer-as-howm → 現バッファのコピーを howm-mode で表示 ★ + * 需要不明なので様子見[2003-09-29] + +=== メモを読もう +(一覧モード) + +* コマンド(再掲) + * C-c , , (M-x howm-menu) → メニュー + * C-c , a (M-x howm-list-all) → 全メモ一覧 + * C-c , g (M-x howm-list-grep) → 全メモ検索 (正規表現) + * C-c , s (M-x howm-list-grep-fixed) → 全メモ検索 (固定キーワード) + +* 検索やリンクジャンプをすると, 一覧モード + * デフォルトは一覧表示 + * 一覧バッファ + 内容バッファ + * カーソル位置のメモの内容が表示される + * 連結表示もできる + * @ で連結表示. もう一度 @ で一覧表示に戻る. + * ヒットしたメモの内容をぜんぶつなげて表示 + * 断片的なメモをどんどん書く → つなげて読む + * [tab] と [alt]-[tab] で次/前のメモへ + * Tips: メモを探すとき, 検索である程度しぼりこんだら, + 連結表示して migemo 検索すると楽 + * 一覧表示で + * 0 → 連結表示のトグル (@ と同じ) + * 1 → 内容バッファを消す + * 2 → 内容バッファを出す + * v → 内容バッファをトグル + * TAB, M-TAB → 次・前のファイルへ + * T → タイトル表示をトグル + * どちらの表示でも + * n と p → 上下 + * [space] と [backspace] → スクロール + * j と k → 一行スクロール + * [return] → カーソル位置のメモを開く + * C-u して [return] → メモを開いて一覧を消す + * X → Dired-X を起動 (改名・削除などのファイル操作) + * Dired-X の使い方は, info dired-x 等を参照 + v → 中身を見る (q → 戻る) + d → 「消すぞ」マーク + x → マークしたファイルたちを本当に消す + * ? → ヘルプ + * q → 脱出 + +* ソート + * S → 何でソートするか聞いてくる (補完入力) + * name: ファイル名 + * name-match: 指定したファイル名を上位に移す + * date: 作成日 + * mtime: 更新時刻 + * summary: 一行表示の文字列 + * summary-match: 指定した正規表現を一行表示から検索して, 上位に移す + * summary-match-string: 同上 + マッチした文字列順にソート + * random: ランダムシャッフル + * reminder: リマインダ順 + * numerical-name: ファイル名 (数字順. メールのソートを想定) + * reverse: 現表示の逆順 + * C-u S ならデフォルトの逆順 + * R → reverse + +* 絞りこみ (and 検索) + * f → 何で絞りこむか聞いてくる (補完入力) + * name: ファイル名 + * date: 作成日 + * mtime: 更新時刻 + * summary: 一行表示の文字列 + * contents: 内容 + * reminder: リマインダの日付範囲 + * Region: 領域 + * Around: カーソル位置の周辺 + * C-u 7 f → Around なら, 前後 7 つ + * uniq: 同じファイル中で何箇所ヒットしても, 最初の一箇所だけ表示 + * C-u f なら, マッチしたものを取り除く + * G → contents + * u → uniq + +* howm-mode と共通 + * l → 全メモの一覧 + * g → 検索 (grep) + * C-u g → キーワードを補完入力して検索 + * m → ローマ字検索 (migemo) + * C-u m → C-u g と同じ + * c → 新規ファイル作成 (現リージョンがタイトル) + * Q → howm-mode なバッファをすべて消す (未保存は除く) + +* その他 + * 一覧表示で ! → shell でコマンド実行 + * メモを手っ取り早く捨てたければ, これで mv なり rm なりしてください + * 2 回目からは小賢しい挙動をします :-) + * >>> hoge.png なら外部 viewer で画像を開く + * 設定は((<カスタマイズ>))参照 + +=== リマインダ +(予定表・todo) + +* 機能 + * メモ中に + [2002-10-20]+ ハイウェイ惑星 買おう + のように書いておくと, 一覧で見ることができます + * C-c , y → 予定表 + * . → 今日へ + * C-c , t → todo 一覧 + * 一覧中の上下どの位置に表示されるかは, 日付と種類しだい + * 「最近の予定」と「todo 冒頭」はメニューにも表示されます + (ことあるごとにちらっと見えるのが重要かと) + * メニューでは, 行頭の「>」上で RET を叩くとメモに飛びます + (それ以外の位置でも, 下線がない所なら同様) + * カレンダーソフト plan への export も可能 (→((<外部ツール>))) + +* 書式 + * 覚書 (-) + [2002-10-20]- ハイウェイ惑星 買おう + * 指定日に浮きあがり, 以後は徐々に沈む + * 指定日までは底に潜伏 + * 沈むのを遅くするには, 猶予日数で指定(デフォルト 1 日) + [2002-10-20]-14 ハイウェイ惑星 買おう → 14 日間ぐらいは気にかけよう + * todo (+) + [2002-10-20]+ ハイウェイ惑星 買うべし + * 指定日から, 徐々に浮きあがってくる + * 指定日までは底に潜伏 + * 浮きあがる速さは, 猶予日数で指定(デフォルト 7 日) + [2002-10-20]+14 ハイウェイ惑星 買うべし → 14 日間ぐらいのうちに + * 〆切 (!) + [2002-10-20]! ハイウェイ惑星 〆切 + * 指定日が近づくと, 浮きあがってくる + * 指定日以降は, 一番上に浮きっぱなし + * 何日前から浮きはじめるかは, 猶予日数で指定(デフォルト 7 日) + [2002-10-20]!14 ハイウェイ惑星 〆切 → 14 日前ぐらいからぼちぼち + * 予定表(後述)にも表示 + * 保留 (~) + [2002-10-20]~ ハイウェイ惑星 買おうか + * 指定日から, 浮き沈みをくりかえす + * 指定日までは底に潜伏 + * 何日周期で浮き沈みするかは, 猶予日数で指定(デフォルト 30 日) + [2002-10-20]!14 ハイウェイ惑星 買おうか → 14 日周期 + * 予定 (@) + [2002-10-20]@ ハイウェイ惑星 + * todo 一覧ではなく, 予定表に表示 + * 済 (.) + [2002-10-20]. ハイウェイ惑星 + * 常に底 + +* action-lock + * 例 + [2002-10-20]+9 ほげほげ + の「+9」にカーソル置いてリターンたたくと, ミニバッファにメニューが出て… + * そのままリターン → 「済」 + [2002-10-20]. [2002-10-20]:+9 ほげほげ + * x を入力 → 「cancel」 + [2002-10-20]. cancel [2002-10-20]:+9 ほげほげ + * - を入力 → 種類を覚書に変更 + [2002-10-20]-9 ほげほげ + * 14 を入力 → 猶予日数を 14 日に変更 + [2002-10-20]+14 ほげほげ + * メニュー・予定表・todo 一覧からも直接叩けます + +* Tips (私の使い方) + * 「todo」や「〆切」は本当に必要なものだけ + * それ以外は「覚書」で沈むにまかせる (どうせ全部はできません :p) + * 後ろめたければ, 猶予日数の長い「覚書」に + [2002-11-10]-10 ハイウェイ惑星 + * 緊急ではないが重要なこと + [2002-11-10]-999 ●ハイウェイ惑星 + * 目立たせたいこと + [2002-11-10]! ★★ハイウェイ惑星 + +== 導入法 + +=== インストール + +==== 自動インストールの場合 + +* インストール + * ./configure して make して, root になって make install + * *.el, *.elc は /usr/share/emacs/site-lisp/howm/ に + * doc/, ext/ は /usr/local/share/howm/ に + * xemacs の場合 + ./configure --with-xemacs + * *.el, *.elc は /usr/lib/xemacs/site-lisp/howm/ に + * インストール先の変更例 + ./configure --with-howmdir=$HOME/elisp --prefix=$HOME + * *.el, *.elc は ~/elisp/ に + * doc/, ext/ は ~/share/howm/ に + * その他のオプションは ./configure --help を参照 +* 設定 + * ~/.emacs (.emacs.el かも)に追加 + * case 1: emacs 起動時に読み込む + (setq howm-menu-lang 'ja) + (require 'howm) + * case 2: はじめて C-c , , した時に読み込む + (setq howm-menu-lang 'ja) + (global-set-key "\C-c,," 'howm-menu) + (autoload 'howm-menu "howm" "Hitori Otegaru Wiki Modoki" t) + * いずれも, もし「Cannot open load file」とかエラーが出るなら, + 上記の前にこれを追加 + (add-to-list 'load-path "/usr/share/emacs/site-lisp/howm/") + * ~/howm/ の作成やメニューファイルのコピーは不要です + (メニュー起動時に自動作成) + +==== 手動インストールの場合 + +* *.el を適当な場所に置く (例: ~/elisp/howm) + * ~/.emacs (.emacs.el かも)に + * 置き場に応じて, ↓のように記述 + (add-to-list 'load-path "~/elisp/howm/") + * さらに, ((<自動インストールの場合>))と同様の記述を追加 + * お好みで, バイトコンパイル + cd ~/elisp/howm + \emacs -batch -q --no-site-file --eval '(progn (add-to-list (quote load-path) ".") (byte-recompile-directory "." 0))' + +==== インストールの補足 + +* お好みで, ~/.emacs に設定を追加 (→((<カスタマイズ>))) + ;; 設定例 + (define-key global-map [katakana] 'howm-menu) ; [カタカナ] キーでメニュー + (setq howm-file-name-format "%Y/%m/%Y_%m_%d.txt") ; 1 日 1 ファイル + (setq howm-keyword-case-fold-search t) ; <<< で大文字小文字を区別しない + (setq howm-list-title nil) ; 一覧時にタイトルを表示しない + (setq howm-menu-refresh-after-save nil) ; save 時にメニューを自動更新せず + (setq howm-refresh-after-save nil) ; save 時に下線を引き直さない + (setq howm-menu-expiry-hours 2) ; メニューを 2 時間キャッシュ + +* なお, キーワード一覧は ~/.howm-keys に記録される + * 万一壊れても, 再構築は簡単. 大文字小文字の区別に応じて… + * 区別する場合 + find ~/howm -name '*.txt' -print | xargs ruby -ne '$_ =~ /<<<\s+(.+)$/ and puts $1.split(/\s*<<<\s*/).join "\t"' | sort -u > ~/.howm-keys + * 区別しない場合 + find ~/howm -name '*.txt' -print | xargs ruby -ne '$_ =~ /<<<\s+(.+)$/ and puts $1.downcase.split(/\s*<<<\s*/).join "\t"' | sort -u > ~/.howm-keys + +* 注意 + * GNU Emacs 以外の場合: + 私はよくわからないので, 検索してください + * meadow: + ((<設定済み Meadow|URL:http://www.bookshelf.jp/cgi-bin/goto.cgi?file=meadow&node=meadowmemo%20edition>)) + なら最初から使えます + * cygwin + grep 使用のときは, + メモディレクトリとコマンドをドライブレターから指定する. + * ~/.emacs(.emacs.el かも) で↓のように + (setq howm-directory "c:/cygwin/home/howm/") + * cygwin から見た / と emacs から見た / が食い違うとかいう話. + * xemacs: + * font-lock のメッセージを抑制すると速くなるそう. + thx > ((<笠原さん|URL:http://eron.info/k/diary/>)) + (setq font-lock-verbose nil) + * Linux Zaurus: + (()) + を参照ください. + thx > ((<100|URL:http://www.bookshelf.jp/2ch/unix/1063800495.html>)) + * SKK を使う場合 + * .emacs に以下を書いておかないと, Dired-X に C-x C-j を奪われます + (setq dired-bind-jump nil) + * viper-mode を使う場合 + * viper-mode より先に howm-mode をロードしておく + * post-command-hook に悪さする?? + * コンソール (emacs -nw) の場合 + * 下線が表示されない端末なら + (set-face-foreground 'action-lock-face "blue") ;; 下線のかわりに色つけ + * (())を使う場合 + * <<< が RD の include とかぶる + * 対策例 + * include は使わない. 行のはじめに <<< を書かないよう注意する. + * include は使わない. rd2 をかける前に howm2 -type=rd を通す. + * リンク記号を変更する + ;; 例: .emacs (howm ロードより前)に + (setq howm-ref-header "==>") ; goto リンク + (setq howm-keyword-header "<==") ; come-from リンク + * ((<→ howm wiki の「併用ツール」|URL:http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?ExternalTool>))も参照 + +* 旧版からの移行 (必ずバックアップをとってから!) → (()) + * 新たに make install しても, 個人のメニューファイルを上書き更新はしません. + 必要なら, メニューを自分で編集するか, + ja/0000-00-00-000000.txt を自分でコピーするかしてください. + +=== カスタマイズ + +基本的には M-x customize → [Applications] → [Howm] で. +ぴんとこない項目も, [Show] でありがちな既定値から選択可能. + +そこにない設定については, ~/.emacs (~/.emacs.el かも)へ, 以下のように直接書く. +(もっと網羅的だが古い解説は, (())を参照) + +* 色 + * howm 関連の全バッファに共通の色設定 + ;; 「ほげ」と「[ふが]」に着色 + ;; ・設定法の詳細は, 変数 font-lock-keywords のヘルプを参照 + ;; ・face の一覧は M-x list-faces-display + (setq howm-user-font-lock-keywords + '( + ("ほげ" . (0 'highlight prepend)) + ("\\[ふが\\]" . (0 'font-lock-doc-face prepend)) + )) + * todo や予定の色わけにでも使ってはいかがかと. + * 内容バッファに rd-mode な色をつける + ;; rd-mode.el が読み込まれているという前提で + (setq howm-view-contents-font-lock-keywords rd-font-lock-keywords) + +* 便利キー + * 「カタカナ」でメニュー, 「Ctrl-カタカナ」で新規メモ + (define-key global-map [katakana] 'howm-menu) + (define-key global-map [(control katakana)] 'howm-create) + * [tab]([alt]-[tab])で次(前)のリンクに移動 + (define-key howm-mode-map [tab] 'action-lock-goto-next-link) + (define-key howm-mode-map [(meta tab)] 'action-lock-goto-previous-link) + * 本来の tab は C-i で + +* 保存場所 + * メモ置き場/年/年月日-時分秒.txt に + (setq howm-file-name-format "%Y/%Y%m%d-%H%M%S.txt") + * ファイル名自体に年月日が入っていないと, filter-by-date が機能しない + * 1 日 1 ファイル (メモ置き場/年/月/年_月_日.txt に) + (setq howm-file-name-format "%Y/%m/%Y_%m_%d.txt") + * 不完全な点があります. 我慢できる人だけどうぞ + * メモ単位であるべき処理の一部がファイル単位に + (タイトル表示, 更新順一覧, 内容での絞りこみ, uniq) + * キーワード一覧を ~/howm/.howm-keys に置く + (setq howm-keyword-file "~/howm/.howm-keys") ;; デフォルトは ~/.howm-keys + * こうしておけば, 違うマシンでも ~/howm/ 以下のコピーだけで済む. + * すでに書いたメモがあるなら, mv ~/.howm-keys ~/howm/ をしておくか, + 再構築する(→((<インストール>))). + * デメリット: 検索が遅くなる? (体感できるほどかは, やってみないと不明) + +* 一覧 + * 一覧で「!」したときの初期コマンドを変更 + (setq howm-view-summary-shell-last-file "_FILE_") + (setq howm-view-summary-shell-hist + '("mv _FILE_ ~/gomi" "touch _FILE_" "ls -l _FILE_")) + * 初期コマンドは「mv ファイル名 ~/gomi」 + * M-p 押していくと, 「touch ファイル名」や「ls -l ファイル名」 + * 一覧バッファの色つけ例 + (setq howm-view-summary-font-lock-keywords '(("^2003" . 'highlight))) + +* メニュー + * メニューの変更 + * メニューを開いて [menu 編集] 上でリターン → 自由に編集 + * よく開くメモへの goto リンクなどを書いておけば便利かと + * メニューファイルに「%recent」や「%random」と書くと, + 「最近のメモ」や「ランダムに選んだメモ」のタイトル一覧 + * カスタマイズ + (setq howm-menu-recent-num 20) ;; 表示する個数 + * メニュー中に変数や関数の値を表示 + * メニュー中にこう書くと… + * %here%foo → foo の値を表示 + * %here%(foo 3) → (foo '3) の結果を表示 + * 例: %here%(howm-menu-search "ほげ") → 「ほげ」の検索結果を埋め込み + * ただし, 登録した関数しか使えません (おっかないから) + (setq howm-menu-allow + (append '(foo bar) howm-menu-allow)) ;; foo と bar を許可 + * メニューをメモ扱いしない (メモ一覧・検索の対象外に) + ;; mv ~/howm/0000-00-00-000000.txt ~/hoge/fuga/menu.txt しといて… + (setq howm-menu-file "~/hoge/fuga/menu.txt") + * %reminder の仕切り例 + (setq howm-menu-reminder-separators + '( + (-1 . "━━━━━━━今日↓↑超過━━━━━━━") + (0 . "━━━━━━━予定↓━━━━━━━") + (3 . "━━━━━━━もっと先↓↑3日後まで━━━━━━━") + (nil . "━━━━━━━todo↓━━━━━━━") ;予定とtodoの境 + )) + +* もっと軽く (cf. ((<富豪的プログラミング|URL:http://pitecan.com/fugo.html>))) + * 上述の M-x customize で [Howm Efficiency] を参照 + * 特に, 本気で使うには howm-view-use-grep の設定をおすすめします + * grep 使用時の coding system 指定 + (setq howm-process-coding-system 'euc-japan-unix) ;; 読み書き共通 + (setq howm-process-coding-system '(utf-8-unix . sjis-unix)) ;; (読.書) + * Tips: gc-cons-threshold の値を増やすと速くなる場合がある. + ref > ((<220,234-236|URL:http://www.bookshelf.jp/2ch/unix/1077881095.html>)) + (setq gc-cons-threshold (* 4000 10000)) + * Tips: grep-2.5 では, 環境変数 LANG を C にしておくと, + マルチバイト対応がオフになって速くなる + (()) + +* 検索 + * 対象ディレクトリの追加 + * 全文検索のとき, メモに加えて指定ディレクトリ以下も再帰的に探す + (setq howm-search-path '("~/Mail" "~/News")) + (setq howm-search-other-dir t) ;; 下記のトグルの初期値 (t か nil) + * M-x howm-toggle-search-other-dir で, + 上記ディレクトリを検索対象にするかしないかトグル + * キーバインドしたければ各自で (インターフェース模索中につき…) + +* 未保存だろうと委細構わず, howm-mode なバッファをすべて強制削除するコマンド + (おすすめしません. 使わないでください.) + * C-u C-c , Q + * メニューに書くなら [強制全消] + * 物騒なので, ↓を書いとかないと無効 + (setq howm-kill-all-enable-force t) + +* テンプレートの変更例 + * こんなふうに + Subject: タイトルバーに時計を表示 ←直前のリージョンの内容 + Date: Thu, 12 Sep 2002 15:45:59 +0900 + In-Reply-To: ←直前ファイル + + ■ ← カーソル + * ~/.emacs に + (setq howm-template "Subject: %title\nDate: %date\n%file\n%cursor") + (setq howm-template-date-format "%a, %d %b %Y %H:%M:%S %z") + (setq howm-template-file-format "In-Reply-To: <%s>\n") + * テンプレートを複数指定 + ;; C-u 2 C-c , c → 2 番目のテンプレートで新規メモ + ;; メニューから C-u 2 c でも同様 + (setq howm-template + '("= %title%cursor\n%date %file\n\n" "%date: %title%cursor")) + * ついでに, howm-template の値が関数なら + 「universal-argument と直前のバッファを引数にしてそいつを呼ぶ」 + っていうのも仕込みました + +* 書式の変更例 (howm-*.el の load より前に) + * タイトル(メモ区切り) @@@ … + (setq howm-view-title-header "@@@") + * goto リンク ==>…, come-from リンク <==… + (setq howm-ref-header "==>") + (setq howm-keyword-header "<==") + * goto リンク ((<…>)), come-from リンク ((:…:)) + ;; <>:は半角に直してください + (setq howm-ref-regexp "((<\\([^>\r\n]+\\)>))") + (setq howm-ref-regexp-pos 1) + (setq howm-keyword-format "((:%s:))") + (setq howm-keyword-regexp "\\(((:\\)\\([^:\r\n]+\\):))") + (setq howm-keyword-regexp-hilit-pos 1) ;; 「関連キーワード」用 + (setq howm-keyword-regexp-pos 2) + (setq howm-keyword-regexp-format "%s") ;; M-x describe-variable 参照 + * 注: come-from キーワードの alias では, + 次のどちらかしか想定していません. + * 「…から後」型: <<< foo <<< bar <<< baz + * 「…から…まで」型: ((:foo:)) ((:bar:)) ((:baz:)) + * wiki 風リンク [[hoge]] の下線を「]]」だけに + * 「<<< hoge」の作成後は, 「hoge」にも下線 + (setq howm-wiki-regexp "\\[\\[\\([^]\r\n]+\\)\\(\\]\\]\\)") + (setq howm-wiki-regexp-hilit-pos 2) + (setq howm-wiki-regexp-pos 1) + +* こまごま + * 日付入力(C-c , d または [日↓])で年や月を略したら, 「未来」と解釈 + (setq howm-insert-date-future t) + * 新規入力時のみです. 「[2003-12-27]」上で RET したときの動作は従来どおり. + * 「http://」でリターン押したら, URL を kill-ring へ + (setq action-lock-no-browser t) + +* 予定表・todo 一覧 + * リマインダ記号(!+-~@.)から RET 一発で「済」に + (setq howm-action-lock-reminder-done-default "") + * この場合, C-u RET で従来の動作 (キャンセル, 記号変更, …) + * 予定表・todo 一覧からリマインダ記号上で直接 RET したとき, + 叩かれ先バッファを自動 save + (setq howm-action-lock-forward-save-buffer t) + * 「自動 save」に抵抗ない方だけどうぞ + * 手動で C-x s (未保存バッファたちを save)なりする方が正道かと + * 保留の浮沈範囲 + (setq howm-todo-priority-defer-init -14) ;; 初期値 = 下限 + (setq howm-todo-priority-defer-peak 0) ;; 上限 + * !+-~. の旬度のカスタマイズ + * 例: メニューで, 「潜伏中は非表示」「済は表示」 + (setq howm-menu-todo-priority -50000) + (setq howm-todo-priority-done-bottom -44444) + * howm-todo-priority-normal-bottom 等. ソース(howm-reminder.el)参照. + * todo 一覧(M-x howm-list-todo)の仕切り例 + (setq howm-todo-separators + '( + (0 . "━━━━━━━↑超過━━━━━━━") + (nil . "━━━━━━━潜伏中↓━━━━━━━") + )) + * 連結表示やソートをする場合にはじゃまかも… + +* action-lock + * { } (トグルスイッチ)の変更 + ;; howm の load 前に + (setq action-lock-switch-default '("{ }" "{*}" "{-}")) ;; 何個でも + * {_} (未処理)の変更 + (setq howm-dtime-format "[%a %b %d %H:%M:%S %Y]") ;; {_} + (setq howm-template-date-format "[%Y-%m-%d %H:%M]") ;; テンプレート + * 「file://…」や「http://…」の変更 (ましな設定募集) + thx > ((<945|URL:http://www.bookshelf.jp/2ch/unix/1063800495.html>)) + ;; howm (正確には action-lock.el) のロードより前に. + ;; ・file://… + (setq action-lock-open-regexp + "\\") + (setq action-lock-open-regexp-pos 2) ;; 2 個目の「\\(…\\)」がファイル名 + ;; ・http://… + (setq action-lock-browse-regexp + "\\<\\([htp]\\{3,5\\}s?\\|ftp\\)://\\([-!@#$%^&*()_+|=:~/?a-zA-Z0-9.,;]*[-!@#$%^&*()_+|=:~/?a-zA-Z0-9]+\\)\\>" + (setq action-lock-browse-regexp-pos 0) ;; マッチした全体が URL + * action-lock 追加例: + 「Message-ID: …」でリターン押したら, 該当メールを namazu で検索 + ;; howm を load した後に + (defun my-howm-search-message-id (id) + (message "Searching...") + (let* ((query (format "+message-id:%s" id)) + (args `("-l" "-n" "1" ,query "/home/hoge/NMZ/Mail")) + (found (car (howm-call-process "namazu" args)))) + (if found + (progn + (find-file found) + (re-search-forward "^$" nil t) + (message "Done.")) + (message "No match.")))) + (setq action-lock-default-rules + (cons (action-lock-general 'my-howm-search-message-id + "Message-[Ii][Dd]: \\(.*\\)$" + 1) + action-lock-default-rules)) + +* (())を使う場合: + 行頭の * でエントリの開閉ができるように + → ((<237-238|URL:http://www.bookshelf.jp/2ch/unix/1063800495.html>)) + +* おまけ + (setq howm-congrats-format + '( + "(´・ω・`) %s" + "(`・ω・´) %s" + ;; …以下略… + )) + (setq howm-congrats-command '("play" "~/sound/fanfare.wav")) + +* もっといろいろいじるには, *.el 冒頭を参照 + +=== 外部ツール +(同梱ツールは ext/ に) + +* HTML への変換: howm2 (同梱. 要 ruby) + * 例 + * メモディレクトリ ~/howm/ を変換して ~/converted/ に吐く + ./howm2 ~/howm/ ~/converted/ + * <<< の大文字小文字を無視 + ./howm2 -i ~/howm/ ~/converted/ + * リンク書式の指定 + ./howm2 -comefrom='<<<' -goto='>>>' ~/howm/ ~/converted/ + * 「ほげ」を含むファイルだけ HTML 化 + grep -rl 'ほげ' ~/howm/ | howm2 -list ~/converted/ + * 何も工夫してないので, 激遅かつメモリどか食い + * alias の「再帰的な」展開は未サポート + +* カレンダー & todo 一覧: hcal.rb (同梱. 要 ruby) + * カレンダー(予定・〆切・済みの一覧)を出力 + hcal.rb -schedule_mark='○' -deadline_mark='●' -done_mark='/' ~/howm/*/*/*.txt + * こんな感じでずらずら + ----------------<6>---------------- 2003 + 01 Sun + 02 Mon ●田中先生に連絡 ○B4輪講 小林 ○工学基礎実験 12:40 <<<<##>>>> + … + * ●は〆切(@[2003-06-02]!), ○は予定(@[2003-06-02]@), /は済(@[2003-06-02].) + * <<<<# は「今日」, #>>>> は「毎年の同月同日」 + * こんな感じで alias しとくと便利 + alias hcal="hcal.rb -schedule_mark='○' -deadline_mark='●' -done_mark='/' ~/howm/*/*/*.txt | less '+/<<<<#'" + * 「旬度順 todo 一覧」を出力 + (howm を使うなら不要. ChangeLog 派な人へのおまけです) + * コマンドラインで + hcal.rb -l memo.txt + * emacs から M-x grep して + Run grep (like this): hcal.rb -l ~/memo/*.txt + +* 箇条書き支援: + * (()) + +* 簡易小遣い帳 + * キーワードを決めて, 日記中に書いておく + $食費$ 500円 ラーメン + * 「<<< $食費$」なり「>>> $食費$」なりで一覧を表示. + 絞り込み・ソートして範囲指定. + * M-x yen-region で, 「◯◯円」を合計 + → (()) + +* ((<→ howm wiki の「併用ツール」|URL:http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?ExternalTool>))も参照 + +== 実装 + +=== 実装について + +* ファイル開くたんびにスキャンっていう安易実装 + * ~/.howm-keys にキーワードの一覧 + * ファイルを開くときは… + * .howm-keys の各キーワードについて, 出現の有無を検索 + * 出現キーワードを or でつないだ正規表現を作成 + * その正規表現を font-lock と action-lock に設定 + * ファイル保存時に内容をスキャンして, ~/.howm-keys を更新 + +* 検索 + * メモディレクトリ ~/howm/ 以下を再帰的に全検索. + ファイル名も拡張子も ~/howm/ 以下のディレクトリ構成も, どうでもよい. + * ファイル名の制約は, + * ファイル名に年月日が入っている (filter-by-date のため) + * string<= でソートしたら日時順になる + * 互換な検索関数を二本用意. 好きな方を使える. + * real-grep (grep を呼ぶ) + * fake-grep (elisp のみ) + +* ファイル構成 + * howm 本体とは独立 + * bcomp.el + * make 時に使うだけ + * navi2ch-cvs-0.0.20031209 から借用 + * cheat-font-lock.el + * font-lock-keywords を後から変更するための関数 + * font-lock.el の内部実装に依存 + * action-lock.el + * action-lock-mode (minor-mode) + * 呪文(正規表現)と魔法(関数)の組を登録 + * リターンキー叩いたら + * 呪文の上 → 魔法が発動 + * それ以外 → 本来のリターンキー + * riffle.el + * riffle-{summary|contents}-mode + * 一覧・内容のぱらぱら表示, 内容の連結表示 + * 一覧では, post-command-hook で移動検出 → 内容表示を更新 + * バッファローカル変数 riffle-item-list に項目を保持 + * gfunc.el を使用 + * gfunc.el + * 安直 generic function + * illusion.el + * illusion-mode (minor-mode) + * ふつうの「ファイル」でない対象を, 開いて編集して保存 + * 今のところ活用されていない + * honest-report.el + * バグレポートの生成 + * howm 本体 + * 主役 + * howm-backend.el + * バックエンドの分離 + * 抽象化 + * ディレクトリ → folder + * ファイル → page + * マッチ箇所 → item + * howm-view.el + * howm-view-{summary|contents}-mode (major-mode) + * riffle-{summary|contents}-mode から派生 + * 検索の実行 + * howm-mode.el (howm-mode-mode.el から改名[2004-07-14]) + * howm-mode (minor-mode) + * 上述のスキャンなど + * 脇役 + * howm-date.el + * 日付入力の支援 + * howm-reminder.el + * 浮沈式 todo + * howm-menu.el + * howm-menu-mode (major-mode) + * 設定 + * howm-version.el + * 定数 howm-version を設定するだけ + * howm-vars.el + * defvar, defcustom, 等 + * howm-lang-*.el + * 言語依存の変数 + * howm-menu-*.el + * 初期メニューファイルの内容を文字列定数として定義 + * howm-mkmenu.el + * howm-menu-*.el を ja/0000-00-00-000000.txt 等から生成するスクリプト + * 作者以外は使う必要ないはず + * 雑 + * howm-cl.el + * cl パッケージへの依存をまとめただけ + * howm-common.el + * howm-*.el で require + * 特に, ファイルまたいで使うマクロはここへ (∵ byte-compile 対策) + * howm-misc.el + * 雑 + * howm.el (howm-mode.el から改名[2004-07-14]) + * メインファイル. require するだけ. + +=== 動きませんよ? + +(バグの指摘をくださる方へ) + +* 以下のようにしていただくと, 調査しやすくなります + * できるだけ make test をお願いします + cd howm-○.○.○ + make test + * win なら, test.bat をお願いします + * test.bat 中の「HOWM_EMACS=…」を環境にあわせて修正 + * test.bat を実行 + * どちらも, emacs が立ちあがり, 質問票が表示されます + * ((<なんでわざわざ? → バグレポートFAQ|URL:http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReportFAQ>)) + +* 補足: ガイシュツ上等 + * 「仕様か」「既知のバグか」のチェックって, おっくうですよねえ. + * howm に関しては, このチェックは不要です. + それよりも, 気軽にどんどん指摘していただく方がありがたいです. + * ぜひ, 作者の目が届くところ(2ch か howm wiki)にたれ込んでください. + * cf. + ((<バグレポートFAQ|URL:http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReportFAQ>)), + (()) + +* 作者覚書 + * デバッグ用変数 howm-call-process-last-command + * C-u M-x howm-bug-report で関連変数の一覧 + * M-x howm-elp で, プロファイラ elp の準備 + +== 備考 + +=== 参考 + +((<元ネタ|URL:http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?IdeaSource>))参照. +特に, Q-pocket・HashedWiki・ChangeLog メモからいっぱいまねしてます. 感謝. + +* 広瀬雄二著「やさしい Emacs-Lisp 講座」(カットシステム, 1999) + ISBN 4-906391-70-2 + → + ((<オンライン版 (抄?)|URL:http://www.gentei.org/~yuuji/elisp/>)) + * elisp はじめるなら圧倒的におすすめ + * 6.4 章末問題の「サクサク dired」を参考にさせていただきました + +=== 更新記録 + +thx > patch・改良案・指摘をくださった皆様 + +* テスト版 + * [2013-03-21] + * fix: シンボリックリンク下で新規メモが howm-mode にならないバグ + (()) + * [2013-03-18] + * fix: emacs 24.3.1 でバイトコンパイルせずに実行したときのエラー + "Can't detect type of ..." + (()) + * [2013-01-03] + * コード掃除 + * [2012-12-30] + * fix: バイトコンパイル時の警告 + * [2012-12-29] + * コード整理 + * [2012-12-28] + * C-c , a (howm-list-all) を高速化 + (()) + * [2012-12-27] + * 一覧バッファで「ファイル | マッチ行」のかわりにこんな表示に. + このときタイトル先頭の「=」は表示しないように. + (experimental) + (()) + (()) + > Albert-san (areiner at tph.tuwien.ac.at) + タイトル A| + |マッチ行 A1 + |マッチ行 A2 + タイトル B| + |マッチ行 B1 + |マッチ行 B2 + * 設定 + (setq howm-view-list-title-type 2) ;; Show title before summary. + (setq howm-view-summary-format "") ;; If you want to delete file names. + (setq howm-entitle-items-style2-max-length 50) + (setq howm-entitle-items-style2-format "%-0s|%s") ;; for title and summary + (setq howm-entitle-items-style2-title-line t) ;; independent title line? + * さらに, M-x customize-variable RET howm-list-title RET も設定を + * 制限: 一ファイル複数メモで C-c , a (howm-list-all) したときは + 対応するタイトル行に飛んでくれない + * そもそも行指向で作っていたので実装が無理矢理 + * きちんと直すのはめんどう. 強い需要がなければ… + +* リリース版 howm-1.4.1 [2012-12-27] + * ~/.howm-keys が無かったら, 全メモをスキャンして再生成 + (()) + > Albert-san (areiner at tph.tuwien.ac.at) + * fix: *.txt と *.howm が混在しても一覧モードの表示がずれないように + (()) + +* リリース版 howm-1.4.0 [2012-08-16] + * Note + * ((*非互換変更*))に注意! + * 1.3.* どおりの挙動を望むなら↓ + (setq howm-compatible-to-ver1dot3 t) ;; (require 'howm) より前に! + * 個別に設定したければ, M-x customize-group RET howm-compatibility RET + * 長いこと隠し機能だったものを公式機能にしました. + * emacs-24 対応 + * howm-1.4.0rc2 と同内容です. + * 変更 + * howm-file-name-format のデフォルトを *.howm から *.txt に変更 + * 拡張子のせいで他ツールとの連携に困っているらしい事例を見かけるので + * 一ファイル複数メモのときも, 絞り込み等をファイル単位じゃなくメモ単位に. + ただし, date での絞り込みはファイル単位のまま. + * タイトルが空のときは本文の一行目をタイトルに. + * こまごま改良 + * メニューに以下を書けば, タイムスタンプ順でなくファイル名順の上位を表示. + (()) + %here%(howm-menu-recent identity) + * ディレクトリに対してもビューアを設定できるように. + (()) + ;; 「file://…/」や「>>> …/」は open コマンド(mac 用)で開く + (setq howm-view-external-viewer-assoc '(("/$" . "open %s"))) + * 変数 howm-normalizer のありがちな設定ミスを察するように + (()) + * ドキュメントの古い箇所を手直し + * rast まわりの試作を削除 + * 隠し機能の公式化 + * コマンド + * C-c , e (howm-remember) + (()) + (()) + (()) + (()) + (()) + * C-c , b (howm-list-buffers) + * C-c , x (howm-list-mark-ring) + * C-c , o (howm-occur) + * リマインダ + * メニューに「%reminder」と書くと, 予定と todo の統合一覧 + * 予定「@」は, + howm-menu-schedule-days-before 日前から + howm-menu-schedule-days 日後までを先頭に表示 + * [2004-12-03]@5 などと書くと, 「5 日間」の意 + (当日も含むので「12月3日から12月7日まで」). + 一覧から消えるのがそれだけ猶予される. + (()) + * 〆切「!」も, 〆切日がその範囲までなら一緒に表示 + * それより下は従来どおり + * 従来の %schedule + %todo とくらべると, スキャンが一回ですむぶん効率的 + * [2005-05-15 21:37]@ のような書式の予定は, 時刻順にソート + (()) + (()) + (()) + (()) + * メニューからリマインダを直叩きしたときに, + 対応バッファの行数が多少ずれていても許す. + (()) + (setq howm-action-lock-forward-fuzziness 5) ;; 何行までずれても許すか + * ((<カスタマイズ>)) + * 上記 %reminder や todo list 中の仕切り + * grep 使用時の coding system 指定 + (()) + * howm 関連の全バッファに共通の色設定 + (()) + (()) + > taku さん + * todo を済ませたときに指定コマンドを実行 (howm-congrats-command) + * fix: 2012-01-21 以降の emacs-24 でエラー (void-variable inhibit-first-line-modes-regexps) + (()) + thx > 佐々木 寛 さん (sasaki at fcc.ad.jp) + +* リリース版 howm-1.3.9.2 [2011-12-28] + * こまごま fix (howm-1.3.9.2rc4 と同内容です) + * mac で grep 使用時にエラーが出ていた + (()) + (()) + * grep のデフォルトオプションを設定する前に, + --exclude-dir が通るか確認するようにしました. + * 大きいフレームで一覧表示をしたときの余計なウィンドウ分割を修正 + (()) + * howm-vars.elc ロード時の警告「old-style backqoute detected!」を回避. + (()) + +* リリース版 howm-1.3.9.1 [2011-01-02] + * fix: emacs-24.0.50 でのエラー + (Symbol's function definition is void: make-local-hook). + thx > 山本 宗宏 さん (munepi at vinelinux.org) + +* 隠し機能 (experimental) + * 1.1.1.* 以前から + * ソースコードの読み書きも howm で + * (()) + (((<例|URL:http://www.tamacom.com/tour/lang/ruby/S/21.html>))) + もどきの on the fly 版めざして + * まだ開発中. 味見するには… + * 変数 howm-configuration-for-major-mode を設定 + * major-mode に応じて, come-from リンク等の書式を変える + * howm-misc.el のコメント参照 + * M-x howm-open-directory-independently して ~/elisp/howm などと入力 + * 正体は結局 grep なんだから, あまり賢い動作を期待してはいけない + * elisp, tex では便利だけど, ruby じゃ使いものにならず. + * ∵ elisp の関数名や tex のラベルは大域的に一意. ruby は否. + * 1.2 + * 一覧時の内容バッファにファイル全体を表示させる + (setq howm-view-preview-narrow nil) + * 連結時は従来どおり(メモ区切りの範囲のみ) + * howm-configuration-for-major-mode 以外で使う場面は, まあないでしょう + * リマインダ + * リマインダのカスタマイズ + (()) + ;; 新しい型のリマインダ「*」を定義する例: + ;; 「[2004-07-11]* ほげ」は, 指定日まで上昇し, そのあと下降. + ;; (旬度 = - |遅れ / 猶予日数|. 猶予日数のデフォルトは 3) + ;; 1. 旬度関数を準備 (遅れと猶予日数(とアイテム)を食って旬度を吐く) + ;; 遅れ: 指定日から今日までの日数. まだならマイナス. + ;; 猶予: 「[2004-07-11]*8」なら 8. 「[2004-07-11]*」だけなら nil. + ;; 旬度: 大きいほど上. 「覚書」なら初日が 0 で毎日 1 ずつ減る. + ;; (アイテム: ふつうは使わないけどついでに. howm-backend.el 参照) + (defun my-priority (late lazy item) + (let ((r (howm-todo-relative-late late lazy 3))) + ;; r = late / lazy. 無指定時は lazy = 3. + (- (abs r)))) + ;; 2. face を準備 + (defface my-face '((t (:foreground "cyan"))) "my face") + (setq my-face 'my-face) + ;; 3. 記号, 旬度関数, face を登録. + ;; 残りの引数二つは, 「予定表に表示するか」「todo リストに表示するか」. + (howm-define-reminder "*" #'my-priority 'my-face nil t) + * 参考: 既存の旬度関数のグラフが + (()) + に出てます + * バグ + * 一部の記号はこけそう (正規表現 […] 内で特別な意味を持つ記号は×) + * 「[2004-07-11]- ほげ」から「-」上で RET して「*」を入力するとエラー + * とりあえず叩き台. こんなんでいいんでしょうか? + * 日付形式 + * 日付上で RET×2 してから… + -, + → 前日, 翌日 + (, ) → 前日, 翌日 + {, } → 前月, 翌月 + [, ] → 前年, 翌年 + * C-u 20 - → 20日前 + * ヒットしなかったらその先の日付を順に探す + (setq howm-date-forward-ymd-limit 90) ;; 90日先で give up + * もっとましなキー設定ないかねえ + * 日付入力「C-c , d」したときの動作をさらに小賢しく + (setq howm-insert-date-pass-through t) + * 日付コマンドについては元と同様 + * 日付コマンドじゃないときは, ただちに抜ける. + C-c , d hoge とか C-c , d C-a とか試せばわかります. + * しまった. 「[2004-05-21]+」とか入力しようとするととまどう. + 「+ RET」で「+を挿入」にはしてみたけど… + * 1.2.1 + * Major + * howm2 の作り直し? (ext/howmkara) + * 必要にせまられてでっちあげ. 名前もてきとう. + * 必要は満たされたから, また放置かも. 誰かどうにかしてくれれば… + * 機能は退化. ソースは前よりはまし. + * magic string がちらばってるのはけしからんけど… + * 一メモ一ファイルに分割する ext/hsplit.rb も書いたけど, + これはさらに手抜き + * Minor + * hcal.rb の「[2004-09-02]?」対応(自分専用そのばしのぎ) + (()) + * M-x howm-return-to-list → 一覧表示に戻る + (()) + * とり急ぎ超雑でっちあげ. 反響に応じてまた考えよう. + * 一覧表示にいちいち戻ることなく, 一覧の次項目を直接開く: + (defun my-howm-next-hit (n) + (interactive "p") + (let ((buf (save-window-excursion + (howm-return-to-list) + (when (not (eq major-mode 'howm-view-summary-mode)) + (error "Sorry. This case is not cared.")) + (forward-line n) + (let ((howm-view-summary-keep-cursor nil)) + (howm-view-summary-open)) + (current-buffer)))) + (switch-to-buffer buf))) + (defun my-howm-previous-hit (n) + (interactive "p") + (my-howm-next-hit (- n))) + * 1.2.2 + * 特殊フォルダ + * namazu folder 試作 + * コード雑すぎ + * +from: などに未対応 + * 直接検索するには M-x howm-search-namazu + * rot13 folder/page 試作 + (()) + * これ自体はお遊びだけど, 「ふつうでないページ」の練習として + * rot13:xxx バッファは, C-c C-c で「rot13 して保存」 + * rot13 なファイルを開くには, M-x yarot13-find-file + * howm-search-path に, 通常の「ディレクトリ」以外も書ける + ;; namazu folder と rot13 folder を検索対象に追加 + ;; (M-x howm-toggle-search-other-dir で有効・無効を切りかえ) + (let* ((nd "~/PATH/NMZ/Mail") ;; namazu インデックスのあるディレクトリ + (rd "~/g/r13") ;; このディレクトリ以下のファイルは rot13 される + (nf (howm-make-folder:namazu nd)) + (rf (howm-make-folder:rot13dir rd))) + (setq howm-search-path (list nf rf))) + (howm-toggle-search-other-dir 1) ;; 0 なら初期状態は「無効」 + * [2004-12-13]_3 の猶予日数「3」の意味を 1 ずらした + * いままでは, 省略と 0 と 1 が同じ意味になっていた + * いずれ気が向いたら, もっとまじめに実装しなおすかも + (()) + * ext/hcal.rb に iCalendar 出力を追加, …の最低限のとっかかりだけ + * 1.3.1 + * 新しい「バグの指摘の手順」案 + * make test で emacs を起動 + * バグを発症させる + * 発症しなければ, 自分の .emacs から関連しそうなところを + sample/dot.emacs へコピーして, もう一度 make test + * 発症したらすかさず M-x howm-bug-shot + * バージョンやスクリーンショットなどが表示されます + * コメントを加えて 2ch に貼る + * 1.3.3 + * 新規メモ作成をすべて howm-remember にするには… + ;; howm-create をすべて howm-remember にすりかえる + (defadvice howm-create (around remember activate) + (if (interactive-p) + (howm-remember) + ad-do-it)) + (setcdr (assoc "[新規]" howm-menu-command-table-ja) + '(howm-remember current)) ;; [2006-05-15] 修正 + * メニュー上で c を押したとき, 「メニューの前に表示していたバッファ」 + を出す方が好みなら, 「current」を「previous」と直してください + * カテゴリ別の todo list + (()) + (()) + (()) + (()) + * 「分類」の要望はつっぱねてきたんだけど, 今日は気まぐれに気が向いたので + お試し. 正式機能にしていくかどうかは未定. + * メニューにこう書くと, 「foo」「bar」「baz」を含む todo を + 分類して表示 + %here%(howm-menu-categorized-reminder ("foo" "bar" "baz")) + * ちなみに, %here% ではクオートは不要です + * さらに, 各行の「foo」「bar」「baz」を消したければ + %here%(howm-menu-categorized-reminder ("foo" "bar" "baz") nil t) + * 「misc.」を非表示にしたければ + %here%(howm-menu-categorized-reminder ("foo" "bar" "baz") nil nil t) + * 一覧バッファのマッチ内容の左にタイトルを表示. + ちなみに従来のは, 「マッチ内容のかわりにタイトルを表示」. + (()) > Highfly さん + (setq howm-view-list-title-type 2) ;; マッチ内容の左にタイトルを表示 + (setq howm-view-summary-format "") ;; ファイル名を消したければ + * C-c , M で「ファイル名を指定してメモを開く」 + (()) > Eduardo Ochs さん + * 1.3.7 + * 一覧時にウィンドウ分割を壊さない設定. + (()) + (setq riffle-keep-window t) + (setq riffle-window-initializer nil) + * 内容バッファは表示されません. + * とりあえず叩き台. 今後変更の可能性あり. + * M-x howm-list-active-todo で, 現在有効な(=潜伏中でない) todo のみを一覧. + (()) + * ついでに, M-x howm-list-sleeping-todo で, 潜伏中の todo のみを一覧. + * とりあえず関数だけ試作. インタフェースの案があればお聞かせください. + * ちなみに, メニューから潜伏中 todo を消すには, + M-x customize-variable RET howm-menu-todo-priority RET で + 「Hide sleeping reminders」を設定してください. + * バッファ名を, ファイル名ではなくタイトルにする. + (()) > Mielke-san (peter at exegenix.com), + (()) + ;; emacs 上でのバッファ名を, ファイル名ではなくタイトルに. + ;; (ファイル名自体は変更しない) + (add-hook 'howm-mode-hook 'howm-mode-set-buffer-name) + (add-hook 'after-save-hook 'howm-mode-set-buffer-name) + * タイトル「ほげ」のメモのバッファ名を「=ほげ」に + (()) + ;; タイトルが AAA ならバッファ名を =AAA に. + ;; 下の howm-mode-set-buffer-name を設定した上で… + (setq howm-buffer-name-format "=%s") + * 本当は howm と独立したツールにする方がいいけど, + おっくうなのでひとまず. + * 1.3.8 + * M-x howm-extend-deadlines で, + 指定日を過ぎた〆切(!)をすべて一定日数後へ延期. + (()) + * 仕様もインタフェースもまだ叩き台. + * メモを勝手に書きかえる危険な操作なので, バックアップをとってから! + * 1.3.9 + * メニューに「%here%(howm-menu-search "[断]片的" full t)」と書けば, + 「断片的」を含むメモの内容全体をメニューに埋め込み. + (()) + > Morgan Veyret さん (morgan.veyret at gmail.com). + * 単に "断片的" としないのは, メニューファイル自身がヒットするのを避ける小細工 + +* …履歴抜粋… ((()) 参照) + * [2010-12-30] 1.3.9 微修正 + * [2009-12-31] 1.3.8 過ぎた〆切に着色 + * [2008-12-31] 1.3.7 内部コード整理 (副作用を分離). + howm-list-normalizer から howm-normalizer へ. + * [2008-05-31] 1.3.6 着色の不具合修正 + * [2007-12-09] 1.3.5 夏時間の不具合修正 + * [2006-12-16] 1.3.4 セキュリティ修正 + * [2005-08-02] 1.3.0 alias. M-x customize. タイトル表示. + * [2005-05-02] 1.2.2 バックエンド切り離し. gfunc.el + * [2004-08-24] 1.2 保留「~」の公式化. howm.el, riffle.el + * [2004-05-06] 1.1.2 make test + * [2004-02-27] ((<"2ch howm スレ 2"|URL:http://pc8.2ch.net/test/read.cgi/unix/1077881095/>)) + * [2004-02-21] 1.1.1 「隠し機能」制度を導入 + * [2004-01-25] ((<"sf.jp"|URL:http://howm.sourceforge.jp/>)) へ移動 + * [2005-01-08] ((<"UNIX USER 2004.2"|URL:http://www.unixuser.jp/magazine/2004/200402.html>)) + * [2003-12-27] (()) + * [2003-11-22] 1.1 デフォルトの変更 + (リンク・日付・リマインダの書式, 一メモ一ファイル, メニューもメモの一種) + * [2003-10-27] 1.0.4.2 重くなるバグを修正. よくこんなので動いてたなあ… + * [2003-10-02] 1.0.4 外部 viewer, メニューの過剰強化 + * [2003-09-23] 「テスト版」を導入 + * [2003-09-18] 1.0.2 HTML 化スクリプト howm2 + * [2003-09-17] ((<2ch howm スレ|URL:http://pc.2ch.net/test/read.cgi/unix/1063800495/>)) + * [2003-09-17] 1.0 メモディレクトリを階層化 + * [2003-09-16] 0.9.7.1 Wiki 風リンク [[ほげ]] + * [2003-09-14] 0.9.4.1 grep 脱却 + * [2003-09-09] 0.9 ruby 脱却 + * [2003-08-31] 0.8.5 タイトル一覧 + * [2003-06-03] 0.8.4 安直カレンダー hcal.rb + * [2002-11-03] 0.8 メニュー, 旬度順 todo @[2003/09/20]+ + * [2002-09-17] 0.7 1 日 1 ファイル, come-from リンク << + * [2002-09-14] 0.6 リンク廃止(すべては「検索」) + * [2002-06-10] ((<"日本発の wiki クローンリスト"|URL:http://www1.neweb.ne.jp/wa/yamdas/column/technique/clonelist.html>)) + * [2002-05-29] 0.1 公開 + +=== アドレス + +* 最新版: (()) +* 連絡先: email アドレスはソースファイル冒頭を参照ください + +=end diff --git a/site-lisp/howm/doc/README.rd b/site-lisp/howm/doc/README.rd new file mode 100644 index 0000000..1662a54 --- /dev/null +++ b/site-lisp/howm/doc/README.rd @@ -0,0 +1,246 @@ +=begin + += howm tutorial + +== First day + +=== Write a note. + +* Type Ctrl-C , , to open the menu. + [New] Search([String] [Regexp]) [Dup] [] [Key>] [Update] + [All] [Recent] [Schedule] [Todo] [Update Menu] +* Confirm the cursor is on [New], and type [return] there to open new note. + = + [2002-09-16 20:08] >>> /home/hira/elisp/howm/howm-mode.el +* Write anything. + = First note + [2002-09-16 20:08] >>> /home/hira/elisp/howm/howm-mode.el + foo + bar + baz + + +== Second day + +=== Write today's note. + +* Type Ctrl-C , , and type [return] on [New]. Then, write freely. + +=== Read notes. + +* Type Ctrl-C , , to open the menu. + [New] Search([String] [Regexp]) [Dup] [] [Key>] [Update] + [All] [Recent] [Schedule] [Todo] [Update Menu] +* Move the cursor to [All] and type [return] there to browse all notes. +* Move the cursor up and down to view each note. +* Type [space] and [backspace] to scroll the note. +* Type [return] to open the note. + +=== Concatenate notes. + +* Type Ctrl-C , , to open the menu. +* Move the cursor to [All] and type [return]. +* Type @ to concatenate all notes. +* Type [space] and [backspace] to scroll the notes. +* Type @ to toggle summary-view and concatenated-view. +* Type [return] to open the note. + +=== Search a word in notes. + +* Type Ctrl-C , , to open the menu. +* Move the cursor to [String] and type [return] there to search for a string. + Keyword: +* Input a string. + Keyword: foo +* Type [return] to browse matched notes. + +=== Search a phrase in notes. + +* Type Ctrl-C , , to open the menu. +* Move the cursor to [String] and type [return]. +* Input a string. Type Ctrl-q and [space] to input a whitespace. + Keyword: hoge fuga +* Type [return] to browse matched notes. + + +== Third day + +=== Try goto link. + +* Ctrl-C , , and [return] on [New] to open new note. +* Write '>>> foo'. + = + [2002-09-17 20:15] + >>> foo +* A line is drawn under it. + Move the cursor on it and type [return] to search for 'foo' in all notes. + +=== Try come-from link. + +* Write '<<< hoge' in today's note. + = + [2002-09-17 20:15] + >>> foo + <<< hoge +* Move the cursor on '<<<' and type [return] to search for 'hoge' in all notes. +* Select the first day's note and type [return] to open it. +* A line is drawn under 'hoge'. + Move the cursor on it and type [return] to search for 'hoge' in all notes. +* Remember that '<<< hoge' is always shown first when you search for 'hoge'. + Others are sorted by their modification time. + +=== Search come-from keyword with completion. + +* Ctrl-C , , and [return] on [String] to search for a keyword. + Keyword: +* Type 'ho' and type [space] to complete come-from keyword 'hoge'. + Keyword: hoge +* Type [return] to search for 'hoge'. + + +== Fourth day + +=== Sort notes. + +* Ctrl-C , , and [return] on [All] to browse all notes. +* Type S to sort notes. + Sort by: +* Type [space] to show available criteria. +* Type 'da' and type [space] to complete 'date'. + Sort by: date +* Type [return] to execute it. + +=== Filter notes. + +* Ctrl-C , , and [return] on [All] to browse all notes. +* Type f to filter notes. + Filter by: +* Type [space] to show available criteria. +* Type 'co' and type [space] to complete 'contents'. + Filter by: contents +* Type [return] and input 'foo'. + Search in result (grep): foo +* Type [return] to execute it. + +=== Read help. + +* Ctrl-C , , and [return] on [All] to browse all notes. +* Type ? and read the help message. + +=== Use shortcut. + +* Type Ctrl-C , c to create new note. + + +== Fifth day + +=== Input todo. + +* Type Ctrl-C , c to create new note. +* Write as follows. + [2003-09-10]- foo + [2003-09-10]+ bar + [2003-09-10]! baz + [2003-09-10]~ qux + +=== Browse todo. + +* Ctrl-C , , and [return] on [Todo] to browse all todo. +* Move cursor and type [return] to open the note. +* Type Ctrl-C , , to show the head of todo under the menu. +* Items are sorted by a magic criterion. + - sink after the date (reminder) + + float after the date (todo) + ! float until the date (deadline) + ~ sink and float periodically after the date (defer) + +=== Finish todo. + +* Ctrl-C , , and [return] on [Todo] to browse all todo. +* Move cursor and type [return] to open the note. + [2003-09-10]- foo +* Move cursor on - and type [return] to show todo-menu. + RET (done), x (cancel), symbol (type), num(laziness): +* Type [return] to finish this todo. + [2003-09-10]. [2003-09-10]:- foo + +=== Input schedule. + +* Type Ctrl-C , c to create new note. +* Write as follows. + [2003-09-10]@ hoge + +=== Browse schedule. + +* Ctrl-C , , and [return] on [Schedule] to browse all schedule. +* Type [space] and [backspace] to scroll the list. +* Type . to jump to today. +* Type Ctrl-C , , to show the head of schedule under the menu. +* Type [return] on > at the beginning of line to open the corresponding note. + +=== Input recurring tasks. + +* move cursor to '2003-09-10' on the below form in the opened note. + [2003-09-10]@ hoge +* Type [return] to show date-menu. + [Wed] RET(goto), +num(shift), yymmdd(set), ~yymmdd(repeat), .(today): +* Input ~031231 [return] and then type m [return] to the below question. + Every? [RET(all), num(days) w(week), m(month), y(year)] +* And monthly tasks are added automatically until 2003-12-31. + [2003-09-10]@ hoge + [2003-10-10]@ hoge + [2003-11-10]@ hoge + [2003-12-10]@ hoge +* You can use '~1231' instead of '~031231' to input same-year items. + + +== Sixth day + +=== Try action-lock { }. + +* Type Ctrl-C , c to create new note. +* Write { }. + { } +* Move cursor on { } and type [return]. + {*} +* Type [return] again. + {-} + +=== Try action-lock {_}. + +* Type Ctrl-C , c to create new note. +* Write {_}. + {_} +* Move cursor on {_} and type [return]. + [2003-09-10 04:12] + +=== Try aliases. + +* Write '<<< hoge <<< fuga <<< piyo' in a note. + = + [2002-09-17 20:15] + <<< hoge <<< fuga <<< piyo +* Write 'hoge' in another note. +* Write 'fuga' in yet another note. +* Put cursor on 'fuga' and type [return]. + You will see all 'hoge', 'fuga', and 'piyo' are found together. + + +== Seventh day + +=== Try customization. + +* Type Ctrl-C , , to show the menu. +* Move cursor on [Preference] and type [return]. +* Watch customization items and modify them if you like. + +=== Try editing menu. + +* Type Ctrl-C , , to show the menu. +* Move cursor on [Edit Menu] and type [return]. +* Delete the line '%random', and type Ctrl-C , , to observe its effect. +* Again try [Edit Menu] and write '%random' to restore it. +* Type Ctrl-C , , and move cursor to '%Editing Menu%' at the bottom. +* Type [return] and read documentation of menu syntax. + +=end diff --git a/site-lisp/howm/doc/TUTORIAL.ja.rd b/site-lisp/howm/doc/TUTORIAL.ja.rd new file mode 100644 index 0000000..242f7cd --- /dev/null +++ b/site-lisp/howm/doc/TUTORIAL.ja.rd @@ -0,0 +1,191 @@ +=begin + += Tutorial + +これを読むよりも, ↓の方がわかりやすくておすすめです + +* ((<"Meadow/Emacs memo での紹介"|URL:http://www.bookshelf.jp/cgi-bin/goto.cgi?file=meadow&node=howm>)) +* ヽ(´ー`)ノさんの + (()) +* (()) + +== メモを書く + +「ChangeLog 風」「Wiki 風」のどちらか好きな方をまずお試しください + +=== ChangeLog 風に + +* 「C-c , ,」でメニューが開く +* [新規] の上にカーソルを置いてリターンキー → メモが開く + = + [2003-09-16 06:16] + +* 適当に編集・保存 + = 最初のメモ + [2003-09-16 06:16] + 使ってみたよ + +* 一旦, 別のファイルを開く +* また「C-c , ,」でメニューを開き, [新規] にカーソル置いてリターンキー + → 次のメモが開く + = + [2003-09-16 06:18] >>> /home/hoge/gomi/kuzu + +* 適当に編集・保存 + = 次のメモ + [2003-09-16 06:18] >>> /home/hoge/gomi/kuzu + 開いてたファイルがこんなとこに書いてあるね↑ + +* 「>>> /home/hoge/gomi/kuzu」には下線がつく. そこにカーソル置いてリターンキー×2 + → そのファイルに飛ぶ + +=== Wiki 風に + +* 「C-c , ,」でメニューが開く +* [menu 編集] の上にカーソルを置いてリターンキー + → メニューの元ファイルが開く +* 元ファイルを編集・保存. たとえば次のように. + ためしに[[SandBox]]と書いてみた. + [新規] 検索([固定] [正規] [roma]) [複製] [題↑] [名↑] [更新] [鍵↓] + … +* [[SandBox]]の閉じ括弧には下線がつく. その上にカーソルを置いてリターンキー + → 「SandBox」のメモが作られる. + = <<< SandBox + [2003-09-16 05:50] + +* 適当に編集・保存 + = <<< SandBox + [2003-09-16 05:50] + [[練習]]しよう. + +* この[[練習]]の閉じ括弧(下線がつく)にカーソルを置いてリターンキー + → 「練習」のメモが作られる + = <<< 練習 + [2003-09-16 05:53] + +* 適当に編集・保存 + = <<< 練習 + [2003-09-16 05:53] + SandBox はどうかな? + +* 「SandBox」には下線がつく (Wiki で言う AutoLink) + * つかないときは, 「C-c , ,」でメニューを開き, [更新] でリターンキー +* 「SandBox」にカーソル置いてリターンキー×2 → 「SandBox」のメモに飛ぶ + * リターンキー 1 回目で「SandBox」の全文検索 + * リターンキー 2 回目でその先頭を開く + * 先頭は必ず「<<< SandBox」なので心配無用 + +* さっきの [[練習]] にカーソル置いてリターンキー×2 → 「練習」のメモに飛ぶ + +== メモを読む + +* 「C-c , ,」でメニューを開き, [一覧] の上にカーソル置いてリターンキー + → 全メモの一覧が出る (一覧バッファ + 内容バッファ) + * カーソル上下でファイルを選択 (リアルタイムに内容を表示) + * SPC と BS で内容をスクロール + * リターンでそのファイルを開く + +* 「C-c , ,」でメニューを開き, 「検索」の [固定] でリターンキー + → 検索語を入力 + Keyword: ほげ + → 一覧が出る. 操作は同様. + +* 「C-c , ,」でメニューを開き, [最近] でリターンキー + → 最近書いたメモの連結表示. 「@」で一覧表示と連結表示をトグル. + +* さらにソート・絞り込みもできるんだけど, 略. + +== リンクを張る + +* 「>>> ほげ」と書いて, その上でリターンキー + → 「ほげ」を含むメモの一覧 + +* 「>>> /etc/services」と書いて, その上でリターンキー×2 + → /etc/services を開く + * リターンキー 1 回目で「/etc/services」の全文検索 + * リターンキー 2 回目でその先頭を開く + * 先頭は必ず /etc/services 自身なので心配無用 + +* 「<<< ほげ」と書くと, 全メモ中の「ほげ」に下線がつく + * つかないときは, 「C-c , ,」でメニューを開き, [更新] でリターンキー +* 「ほげ」の上でリターンキー + → 「ほげ」を含むメモの一覧 + * 「<<< ほげ」は必ず先頭 + +== action-lock で遊ぶ + +* メモ中に { } と書くと「トグルスイッチ」 + * その上でリターン叩くと, 叩くたんびに記号が変化 + { } → {*} → {-} → { } → … + +* メモ中に {_} と書くと「未処理」 + * その上でリターン叩くと, 日時を挿入 + {_} → [2002-09-13 02:31] + +== 日付を入れる + +* 「C-c , ,」でメニューを開き, [日↓] でリターンキー + * 今日の日付 [2003-10-04] が挿入され, ミニバッファが入力待ちに + Command? [RET (ok), +num (shift), yymmdd (set), ~yymmdd(repeat), .(today)] + * そのままリターンキー → 確定 + +* 「C-c , ,」でメニューを開き, [日↓] でリターンキー叩いて, + ミニバッファで 7 と入力 → [2003-10-07] が挿入される + +* 同様に, [日↓] からミニバッファで… (※) + * 25 → [2003-10-25] + * 401 → [2003-04-01] + * 1224 → [2003-12-24] + * 10203 → [2001-02-03] + * +3 → [2003-10-07] (3 日後) + * -14 → [2003-09-20] (14 日前) + +* 日付には下線が引かれる. その上でリターンキー + * またミニバッファが入力待ちに + Command? [RET (goto), +num (shift), yymmdd (set), ~yymmdd(repeat), .(today)] + * そのままリターンキー → 「2003-10-04」を全メモから検索 + +* 同様に, 日付上でリターンキー叩いてミニバッファで… + * (※)のように入力 → 日付を変更 + * . → 今日の日付に変更 + * d → 現在の日時に変更 + +* 次のように入力しておいて, 日付上でリターンキー + [2003-10-30] ほげほげ + * ミニバッファで「~20031102」と入力 + * またミニバッファが入力待ちに + Every? [RET(all), num(days), w(week), m(month), y(year)] + * そのままリターン → その行の複製を [2003-11-02] 分まで挿入 + [2003-10-30] ほげほげ + [2003-10-31] ほげほげ + [2003-11-01] ほげほげ + [2003-11-02] ほげほげ + +* 今の [2003-11-02] の上でリターンキー叩いて, 「~1231」と入力 + * 「Every?」に対して… + * 9 → 9日ごと + [2003-11-02] ほげほげ + [2003-11-11] ほげほげ + [2003-11-20] ほげほげ + … + [2003-12-26] ほげほげ + * w → 毎週 + [2003-11-02] ほげほげ + [2003-11-09] ほげほげ + [2003-11-16] ほげほげ + … + [2003-12-28] ほげほげ + * 同様に, + * m → 毎月 + * y → 毎年 + +== スケジュール・todo list を使う + +* まだ +* 浮沈方式 + * 覚書: 徐々に沈む + * todo: 徐々に浮かぶ + * 〆切: 指定日が近づくと浮かぶ + * 保留: 周期的に浮き沈み + +=end diff --git a/site-lisp/howm/doc/cat.png b/site-lisp/howm/doc/cat.png new file mode 100644 index 0000000000000000000000000000000000000000..b908e893b5836c590a432283af7abb6e84969a89 GIT binary patch literal 15701 zcmb_@WmHsO`0ij3g5Z$S3eqJpG@=4SHw+BjF?1uTU{C`N-QC?CqI61khja-;!#)1~ zcip@0_q*o9K4Q@hJun;PIk zet%$3`R}?$yB|W+ohIF1aNX0Ve9y)z63zLQLz5o*#g0u2OEg*G%?n>nhrF zI*L-4E<1+5>ZT4jTl))HtZFjbRnx5?{G`LhFaD&_a(gES%QN`@_;PQ4o95-cQZ z?{cd`yEr*(@)qubod=M_qgn)Ly)nV$FvO|#S_M4fq}J`kBV%~O-&aYI4f`1 zpQmMwt3(95?Zl*@l4Eg%9pH$i`)WIXr)WYy3x5xHyZm3%&=l$dgJ!I` z_CkkRYPyn+EBTaF-SV!7(dd0*G(piVynRgu2_prOh>n-#2Gjlt&9qOtR^D9^l zlBp~OmminAC_F-f&R@)<=3A54r`0##Z1W3=7ckxG?8|1F^_9AFewd9r%`bQs`5qwZ z)LH~)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o1d`0)2=xhJ}tN)M{kjxjIpKVijR zM*_gaFXrwPDZ0bR0T)|6>5I8L=YAnZbl%frOv>rBW3Cv-I{%45UdU1In5X64OozoF zCCUpq%CF{%51mDhtI0X@zM7XqxZxInu)|l$3br4)4Mvon5-eKi6^m105o}> za(k-CIy|G)M=!1m+m`A~G$%W;O8WHTy0C5YM1{^Q-PIJaoppAJzNTb{eJLh%hAGZo z$`1Q7O+4r-Kie4MI8z`L*@+PAkMnSZOIxSl@|Dvyzt2iAvJBXPXi(6Gv-Bw$WT z4CM7aQGK}iQqIW!H%6F-Ypuus$-=4_$iEwKCng3LUk55<4vtsC#Kfu?#(6_y1x(u8 zW*{niATz6CAeZC}v}PYZx8ew5E-L^X`HGj0NDSmX^k^{DPWa6!_$;{#^SU>gSQW!K z@AhYezG8^PYd|`1F{uj^t70I>Kp?2)p>tnGM#a$Eg^`!s^W-J>JbB4IPo7Ke=uSr3 zL|C!tUFwLuFX?L!R<~lrazw8Ff7$f=A&I_I@+L32=gCX%dGeBbp1kCqCoj3@Nfb|= zT~V`@u%O$Mn@h>cMYuir6w-p8JI=l2o+mH4=gD))nO)U +howm: Hitori Otegaru Wiki Modoki + + + + +English +
+ +

howm: 一人お手軽 Wiki もどき

+ +

+Emacs で断片的なメモをどんどんとるための環境です. +分類機能はあえてつけません. +かわりに, 全文検索とメモ間リンクが手軽にできるようにしました. +自由書式なので改宗も不要 :-) +

+ + +

+ +
+ +

こんな雰囲気

+ +screen shot +メモ間リンク (Wiki 風)
+screen shot +全文検索 (一覧表示 + 内容表示)
+screen shot +連結表示 (検索されたメモの内容をつなげて)
+ +
+ +

次のように書くだけでリンク

+
    +
  • goto リンク: ファイル名 or 含まれる文字列 +
    +      >>> ~/BabyloniaWave.txt
    +      >>> ハイウェイ惑星
    +      
    +
  • come-from リンク +
      +
    • ファイル A に +
      +       <<< 結晶星団
      +            
      + と書いておくと… +
    • 他のファイル中の「結晶星団」という文字列はすべて A へのリンクに +
    +
  • Wiki 風リンク: goto と同じ. ただし, 対応する come-from がなければ作る +
    +      [[結晶星団]]
    +      
    +
+goto link +come-from link + +

全文検索をフル活用

+
    +
  • 上の文字列リンクも, 実は全文検索のショートカット +
  • ヒットしたファイルを全部つなげて表示する機能 + (→ 断片的メモをばんばんとって OK) +
+ +

改宗不要. 慣れたスタイルに組み合わせて.

+
    +
  • べたテキストファイル自由書式 +
  • マイナーモードで実装 → 他のモードと併用可 +
  • リンク書式も変更可 + +
+ +

HTML への変換が可能

+
    +
  • 将来やめても, メモはむだになりません +
+ +
+ +

予定表・todo

+ +screen shot +「旬度」順 (≠重要順, 日付順) + +

カレンダーへの転記なんて不便

+
    +
  • 次の形式でメモ中に書けば, 自動抽出 +
    +      [2002-10-22]@ ほげほげ
    +
    +
  • 一覧からメモへ一発ジャンプ +
  • カレンダーソフトへの export も +
+todo list +

見ようとしないと見えないんじゃ見ない

+
    +
  • メニューに予定表・todo を表示 → ことあるごとに目に +
  • 「分類」はしない +
+

todo リストなんてすぐあふれる

+件数ふえる → 「重要」しか見ない → ちょっとしたのも「重要」で登録 +→ インフレ → 破綻 +
    +
  • 「重要度」は廃止 +
  • かわりに「浮沈方式」で表示順を工夫 +
      +
    • 覚書: 徐々に沈む (どうせ全部はできません :p) +
    • todo: 徐々に浮かぶ +
    • 〆切: 指定日が近づくと浮かぶ +
    +
+magic sorting + +
+ +

こんなふうに使えます

+ +

日記の気分で

+
    +
  • いつでも C-c , c で新規メモ +
  • 書いたメモを日付順一覧で眺める +
+ +

ChangeLog メモの気分で

+
    +
  • C-c , c → メモを開き, 日時や見てたファイル名を自動挿入 +
  • メモファイルの名前や書く場所で迷うことなし. + 連結表示で実質的に「ポケット一つ時間順配置」. +
  • clgrep 相当の「検索 → ヒットしたメモを日付順ソート → 連結表示」 +
+ +

リンクつきテキストの気分で

+
    +
  • 「>>> ~/BabyloniaWave.txt」の上でリターン×2 + → BabyloniaWave.txt を開く +
  • 「>>> ~/BabyloniaWave.png」の上でリターン×2 + → 画像 viewer を起動 +
  • 「>>> ハイウェイ惑星」の上でリターン + → 「ハイウェイ惑星」を検索 +
  • 特に, 「研究メモには必ず {S} と書く」のような記号を決めておけば, + 「研究メモ一覧 >>> {S}」のようなショートカットができる +
+ +

Wiki の気分で

+
    +
  • 「[[結晶星団]]」の上でリターンたたくと, WikiName 「結晶星団」のページを作成 +
  • 他のページの「結晶星団」には下線がつく. + リターン 2 回たたくと上のページへジャンプ. +
+ + + +

こづかい帳の気分で

+
    +
  • こづかい記号(例: $$$)を決めて, どこかに「<<< $$$」と書いておく +
  • こづかいを使ったら, 日記中に「$$$ 651円 バビロニアウェーブ」のように書く + (日記に埋め込むのがミソ) +
  • 「$$$」には下線がつく. リターン 1 回たたくとこづかい一覧が出る. +
  • 日付範囲や正規表現で絞りこみ +
  • 一覧上でリターンたたくと該当日記へジャンプ +
+ +

テーマ別掲示板の気分で

+
    +
  • テーマごとに, 「<<< テーマ名」と書いたメモを作っておく +
  • テーマ「結晶星団」の掲示板に投稿するには, + メモを書き, どこかに「結晶星団」と書いておく +
  • 「結晶星団」には下線がつく. リターン 1 回たたくと一覧が出るので, + @ で連結表示 → 新しい順で投稿が並ぶ +
+ +

「資料(ストック型メモ) + コメント(フロー型メモ)」の気分で

+
    +
  • 資料を書き, どこかに「<<< 資料名」と書いておく +
  • 資料「結晶星団」にコメントするには, + メモを書き, どこかに「結晶星団」と書いておく +
  • 一覧 → 連結表示で, 先頭に資料, 後に新しい順でコメントが並ぶ +
+ + + +
+$Id: index-j.html,v 1.279 2012-12-29 08:57:18 hira Exp $
+email アドレスはソースファイル冒頭を参照ください + +SourceForge.jp + diff --git a/site-lisp/howm/doc/index.html b/site-lisp/howm/doc/index.html new file mode 100644 index 0000000..b5a12fc --- /dev/null +++ b/site-lisp/howm/doc/index.html @@ -0,0 +1,300 @@ + +howm: note-taking tool on Emacs + + + + +Japanese +
+ +

howm: Write fragmentarily and read collectively.

+ + + +
+ +Howm is a note-taking tool on Emacs. +It is similar to emacs-wiki.el; +you can enjoy hyperlinks and full-text search easily. +It is not similar to emacs-wiki.el; +it can be combined with any format. + +

+screen shot +screen shot +screen shot +screen shot +
+(Title bar? See rich-title.) +

+ +
+ +

Hyperlinks

+ +
    +
  • goto link: file name or keyword +
    +      >>> ~/BabyloniaWave.txt
    +      >>> highway planet
    +
    +
  • come-from link: + If you write +
    +      <<< crystal star cluster
    +
    + in file A, + all strings 'crystal star cluster' in other files are automatically linked to A. +
+goto link +come-from link + +

Full-text search

+ +
    +
  • Everything is based on full-text search (grep); + the above 'links' are shortcuts to grep. +
  • Write fragmentarily and read collectively; + you can concatenate all matched notes into a single buffer. +
+ +

No conversion

+You can keep your favorite style. :-) +
    +
  • text file and free format +
  • implemented as a minor mode; can be combined with other modes. +
+ +

Todo list with magic sorting

+
    +
  • Reminder: sinks slowly. +
  • Todo: floats slowly. +
  • Deadline: floats rapidly when the date is approaching. +
+ +
+ +

Install

+ +
    +
  • './configure', 'make', and 'make install'. + Files are installed to /usr/share/emacs/site-lisp/howm/ + and /usr/local/share/howm/. +
  • Write below in your .emacs. +
    +        (require 'howm)
    +      
    +
  • If you see 'cannot open load file' error, put this before + the above description. +
    +        (add-to-list 'load-path "/usr/share/emacs/site-lisp/howm/")
    +      
    +
  • (Optional) + When howm runs too slow, try + 'M-x customize-group RET howm-efficiency RET'. + In particular, the below settings will be necessary for heavy users. +
    +        (setq howm-view-use-grep t)  ;; use external grep
    +        (setq howm-menu-refresh-after-save nil)
    +        (setq howm-menu-expiry-hours 6)  ;; cache menu N hours
    +        (setq howm-menu-file "0000-00-00-000000.txt")  ;; don't *search*
    +      
    +
+ +

Update from old version

+ +

1.4.0 to 1.4.1

+ +

+small bug fix, etc. +

+ +

1.3.9.2 to 1.4.0

+ +

+INCOMPATIBLE update. +If you need compatibility with 1.3.*, +put (setq howm-compatible-to-ver1dot3 t) before (require 'howm) in your .emacs. +See M-x customize-group RET howm-compatibility RET for details. +

+ +

+Though howm-1.4.0 has a new menu file, +your old menu file is not updated automatically. +Copy en/0000-00-00-000000.txt into howm/ directory if you like. +Alternatively, you can cut and paste some parts of it to your +howm/0000-00-00-000000.txt by hand. +

+ +

1.3.9.1 to 1.3.9.2

+ +

+small bug fix. +

+ +

1.3.9 to 1.3.9.1

+ +

+bug fix for emacs-24.0.50. +

+ +

1.3.8 to 1.3.9

+ +

+small bug fix, etc. +

+ +

1.3.7 to 1.3.8

+ +

+highlight late deadlines. +small bug fix, etc. +

+ +

1.3.6 to 1.3.7

+ +

+Maintenance release (internal cleaning). +The variable howm-list-normalizer is obsolete now. +Use howm-normalizer instead: +

    +
  • (Case 0) What is howm-list-normalizer? I don't know it at all. + --- You need to do nothing. :-) +
  • (Case 1) I've set it in M-x customize-variable. + --- M-x customize-variable howm-list-normalizer RET and select Off. + Then M-x customize-variable howm-normalizer RET and select + the corresponding item again. +
  • (Case 2) I've written (setq howm-list-normalizer 'howm-view-sort-by-XXX) + in my .emacs. + --- Rewrite it to + (setq howm-normalizer 'howm-sort-items-by-XXX). +
  • (Case 3) I've written (setq howm-list-normalizer ...my_original_elisp...). + --- Modify it correspondingly with the below change. +
      +
    • Old (howm-list-normalizer): + Specify a function that sorts and REDISPLAYS CURRENT items. +
    • New (howm-normalizer): + Specify a function that RETURNS the sorted list of items + for the GIVEN items. +
    + Or, Ask me in + + howm-eng ML. +
+

+ +

1.3.5 to 1.3.6

+ +

+Maintenance release. +Font-lock problem was fixed for CVS-head emacs. +

+ +

1.3.4 to 1.3.5

+ +

+Maintenance release. +Today's schedule didn't appear on menu on the last day of DST. +(cf. patch for 1.3.4) +

+ +

1.3.3 to 1.3.4

+ +

+Maintenance release (security fix). +All symbols are marked as risky-local-variable. +

+ +

1.3.2 to 1.3.3

+ +

+Maintenance release. +Several bugs are fixed (for CVS-head emacs, etc). +From this version, sleeping reminders can appear in todo list +in menu buffer. +If you don't like this behavior, please try +M-x customize-variable howm-menu-todo-priority. +

+ +

1.3.1 to 1.3.2

+ +

+Maintenance release. +A few bugs are fixed (mainly for xemacs). +Default value of an option is changed so that +[Today] function will show titles instead of matched lines themselves. +If you don't like this change, try below steps. +

    +
  • M-x customize-variable RET howm-list-title RET +
  • Remove check mark on howm-action-lock-date-search. +
  • [Save for Future Sessions] +
+

+ +

1.3.0 to 1.3.1

+ +

+Maintenance release. +A few bugs (locale, xemacs) are fixed. +

+ +

1.2.* to 1.3.0

+ + + +

+Though howm-1.3.0 has a new menu file, +your old menu file is not updated automatically. +Copy en/0000-00-00-000000.txt into howm/ directory if you like. +Alternatively, you can cut and paste some parts of it to your +howm/0000-00-00-000000.txt by hand. +

+ +

+Among several new features in howm-1.3.0, +the most useful one will be 'aliases'. +See README for details. +

+ +

Customization

+ +For customization, try 'M-x customize-group RET howm RET'. + +
+ +

Contact

+ +My email address is written at the beginning of source files. + +
+$Id: index.html,v 1.47 2012-12-27 03:23:31 hira Exp $ +SourceForge.jp + diff --git a/site-lisp/howm/doc/menu.png b/site-lisp/howm/doc/menu.png new file mode 100644 index 0000000000000000000000000000000000000000..ff9be6b3cb960d9a391ea0ba52d8915b8b6a5d25 GIT binary patch literal 22098 zcmZ6zcOYBs-#>m-O9$1etyF98y@jGEYSiANirTgJ=s;^!Yt|mMN9@|8HbLwa619T} zf|MA)^u9mO^L>7we{xPvlIuFox!&V7j?dbfDx|mRZUX>7s`~ty4gg$B1OS4Ho7eD1 z*abWj@SE%Q@*460P#t&Y-1-Loy@Z#Nk(aKUotLk*hb>@az+_#ud-4`|#X-15k`Y%9n{Tc%=fSvi-@nSYvo1auy>Tp0f; zbk6IOh@f%nm14}o4QzBUer91`{MjCI3G?JDyM@zTmQ76MhP_Y<=Ih~@FDB$=Wr_+; zgx^gN?9kJiGh8T8ZOrNkh=iYI>$s|gh%JHTOn+=eYlEJ#b{MuN7IFGNN^|?g4q6)Z zhlQHx7pn!ds8s4z(padSrh6e0VjDct!FR;kx1B?fM&z%inu6d2x6am$!0O{87O#>X zTWM4(uR=>)Bu%N?nn z%7D6qGbfYAQ6ke-=aVZ{v2WVBPMf;oRz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&m7$^V$ literal 0 HcmV?d00001 diff --git a/site-lisp/howm/doc/s-screen-shot.png b/site-lisp/howm/doc/s-screen-shot.png new file mode 100644 index 0000000000000000000000000000000000000000..739f07c3c2a589d14fd1de8024c8a28bf5692675 GIT binary patch literal 21340 zcmXtg1z1+g_w}JcX^;j%q(K_#Zje?9r8`6v5RmQ;1qG3ok`@p|x|Qyd29c5!k^FD& z@B7Yup2PdTo|xIQXV2Pe?YR+J8cKNAsIDOhf~TS^uY({c-0-;(8x_u*dvvq#2h&_l zNglbp`Y*E~|26!A^Hka3IfBrcAqY_m$`Bi>Km3U0s&Y>OYZMoa9G&il!08Ht&?74H zGI}2Gw|rjc>vf%6z6@qP$z>%ZL&2k!kui+E%`0XbX#3$&MdqtXLHD5*``%%iy66&SzAcnLiq#y}@6Ma>>=!PMvZb#dWgMltaFRwlE3|Jve|P5;X|&zau$ zl>I5UXhak9ADAGNe3oaqTI{sAV;kbC1d?@`VM2B|1b&6wUv<_q^+b{8uA5RHLl7Qk zV`oIGi2E0RHJh;jZH)5E`p9$(@d#-Zb~>c0c*FiuNUd5ZWOxo!b@l5#A_2HucHGlxLl;%PH03-o#)L~l;`0V6R$$K z<%BVEtT&%)cKmUSt3R8ZaYdww`V6g=1^1hmK30sGl(J8BHqB&Yh(+Qv%HB2+HHfYg zr^|(PiV7!_EGdWQsE(zM#VFF_kOmG*vftl{A}{0D#c`n!{H~e1vAtl5j}$#n5Ef3( zF+r~S(#X!2qR)bcM$60Sd{FP%aBxr-N3$Mvj#5N1>19++tQdP(QL~fzzyu!fmM~21 z?UVAln54+DTka9h#*3#g;!&RBT;6%CidBm~_@zHROc8x=JwNO?T-VE=5G(Iu!sLLL zHCocyc&9Dwz<^Aa2A}r(2+O0K029AHrH4$%$IC&SjIX8O-{Yht+h>|N%w6ZK5n)$W z&EYQMrCoRww#)IK32zxhh7cXaqmnuftt=|n)0~8%;&niWK}Hj?=*{OUl7lkF1LfaLc*RAyeo|-(GQ_BVbsv#1JP~7#y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Fa-&11qMGZ7LtlwceKr>oy9Z5>oE z%s{^9gXJZXYCq#WCpif z#o0}QL4Q)_d_}Ti2e(+=UOuB)Xo`CfO&rv$*N|DR=v-^TMJ? zfE;F1o>4aC>pP?AZ%0KI!bXCP%#x`I!|!(D2CW^4m*D_VKr`T!`YWMZ{M(4yMD5&F@7?2F(lH8A;ri?US)N-0fCdz5{Q}jw}Mvm40=4Wdo6(LYI9kGYTKE0@_ly^ z#{E#-X8iO~wigccJK7m6q5v@@b34)gd~+<%yh#ty9o6llEh?jBlbaE;F~V(=ILa^8 zM)@UfK!3p4%_TD_OI3~Wwo%)!%eC8c{Wy%f0R8n#Y*RGAM2$;(Xfu?rV0tWeD7lqG zMQY+hQ)fz8#0dF;Ypv%5?5i9f`lgp6p%cfbuitPaj)*lK_eDYpww!P&B@$R|Xyy(D zv)kdDv$L~Og6Jdbjky!=Ip$W`T=r)geK6fLM{^fUZZC@!Q`^xja#oj68&g>eT0+^H z>IX6l2Oyq?^Jp=;D^S_1xcK&|RBrz^PUA8R`oH!A}FX+`Pd4wy}kWmKyh2KJ1IGtY-9j> zeRG2pL&nDmJnt%I50I6~TPc|0W4rFEtYq#vW>Xi>aPkwQ3Qf$-lchOH`YD8a0;C6B z@q-`AjxO%#nB#k_%*@UI!{9EJ?qOe*o@`N3(V>xZ=FRusk-LBYN^`I4p&*5IBt>Ir zV5X=`4Xv)y6TqFCdMdWk%>(NW;0;EGx-r`qccA`>!lZP%)I3aB@Zr7}3f&BM^FAZ4 z#;n*AGxE>P{{h_EIyEh|&4Yi2JE|VZARPdBUr)|AUSErwM>6 Ls6(pdED-+#Ca@a; literal 0 HcmV?d00001 diff --git a/site-lisp/howm/doc/screen-shot.png b/site-lisp/howm/doc/screen-shot.png new file mode 100644 index 0000000000000000000000000000000000000000..6d327d47dd3bb57a1eaef2dcfa9d77e044e25b93 GIT binary patch literal 14254 zcmb`u1yCDb-#;2ERFJkfLHfg`I0On5Xp4IT1d12e;O-UNy?7zTf=h4@?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Y%CGP1VB7i@PeRX*piI^ZzNUzTsoaD_buUX z?i-&VO|%Mx8pg*{Dmx6#I*RYSvdSZS+eZsQmL literal 0 HcmV?d00001 diff --git a/site-lisp/howm/elisp-comp b/site-lisp/howm/elisp-comp new file mode 100755 index 0000000..2d1eb65 --- /dev/null +++ b/site-lisp/howm/elisp-comp @@ -0,0 +1,89 @@ +#!/bin/sh +# Copyright (C) 1995, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. + +scriptversion=2005-05-14.22 + +# Franc,ois Pinard , 1995. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +case $1 in + '') + echo "$0: No files. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: elisp-comp [--help] [--version] FILES... + +This script byte-compiles all `.el' files listed as FILES using GNU +Emacs, and put the resulting `.elc' files into the current directory, +so disregarding the original directories used in `.el' arguments. + +This script manages in such a way that all Emacs LISP files to +be compiled are made visible between themselves, in the event +they require or load-library one another. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "elisp-comp $scriptversion" + exit $? + ;; +esac + +if test -z "$EMACS" || test "$EMACS" = "t"; then + # Value of "t" means we are running in a shell under Emacs. + # Just assume Emacs is called "emacs". + EMACS=emacs +fi + +tempdir=elc.$$ + +# Cleanup the temporary directory on exit. +trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0 +trap '(exit $?); exit' 1 2 13 15 + +mkdir $tempdir +cp "$@" $tempdir + +( + cd $tempdir + echo "(setq load-path (cons nil load-path))" > script + $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $? + mv *.elc .. +) || exit $? + +(exit 0); exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/site-lisp/howm/en/0000-00-00-000000.txt b/site-lisp/howm/en/0000-00-00-000000.txt new file mode 100644 index 0000000..1811da6 --- /dev/null +++ b/site-lisp/howm/en/0000-00-00-000000.txt @@ -0,0 +1,98 @@ += <<< %menu% + %"e"[Remember] %"c"[New] %"D"[Dup] Search(%"s"[String] %"g"[Regexp] %"o"[Occur]) + %"a"[All] %"l"[Recent] %"A"[Around] %"y"[Schedule] %"t"[Todo] %"b"[Buffers] %"x"[Marks] + %"K"[] %"i"[Key>] %"r"[Update] %"w"[Random Walk] [Killall] + %"."[Today] %":"[Yesterday] %"h"[History] %"R"[Update Menu] [Edit Menu] [Preference] +------------------------------------- +[Schedule, Todo] -- @schedule, !deadline (until %sdays days from now) +!deadline, +todo, -reminder, ~defer (top %tnum entries) +%reminder +------------------------------------- +Recent +%recent +------------------------------------- +Random -- If you do not like this, [Edit Menu] to erase it. +%random +------------------------------------- + +Format of schedule and todo (Please replace {} with []): +{2002-10-21}@1 schedule -- (shown in schedule part. @3 = "3 days schedule to 10-23") +{2002-10-21}+7 todo -- float up slowly from the date in 7 days +{2002-10-21}!7 deadline -- float up fast from 7 days before the date +{2002-10-21}-1 reminder -- float at the date and sink slowly one unit per 1 day +{2002-10-21}~30 defer -- float at the date and repeat sinking and floating with 30 days period +{2002-10-21}. done -- sink forever +(Numbers after marks are default values.) + +How to remember: +* Schedule at(@) the date +* Reminder sinks down(-). +* Todo floats up(+). +* Deadline needs attention! +* Defer waves(~) up and down. +* Done is the end(.). + +------------------------------------- + +You can edit this menu itself. +>>> %Editing Menu% + + += <<< %Editing Menu% +[Edit Menu] Hit RET on the left button to edit this menu. +[Update Menu] Hit RET on the left button to update this menu. +-------------------------------------------------------- + +*** Format of the menu file *** +(Please hit RET on [Edit Menu] and read the source file.) + +== Basic format + +As you see... + +* [xxx] is button. +* %REMINDER (in small letters) is schedule and todo list. +* %RECENT (in small letters) is list of recent entries. +* %RANDOM (in small letters) is list of random entries. + +You can arrange their places as you like. +Writing favorite files or goto links may be also convenient. +(ex) file:///etc/services >>> wiki + +== Shortcut + +%"foo"[All] +This is displayed as foo[All], and the key "f" executes [All]. +Exactly speaking, it executes the following sequence: +(1) move to closing ", (2) move to next underline, and (3) hit it. + +%"bar%" +If you put % at the tail like this, the key "b" means "move cursor here". + +== For lispers + +Display: +%here%howm-congrats-count ;; embed value of variable howm-congrats-count +%here%(howm-menu-search "search") +;; embed result of (...), that is, search "search" and embed matched lines +Functions must be registered for safety. +(setq howm-menu-allow (append '(foo bar) howm-menu-allow)) ;; allow foo, bar + +Action: +%eval%(message (buffer-name)) ;; evaluate S expr +%call%find-file ;; call function interactively +Both are evaluated in the previous buffer before raising menu. + +== Hiding + +'%' + '|' toggles invisibility +like this: visible%|invisible%|appear%|disappear - until the end of line +(Newline is removed when the end of line is invisible.) + +== Multiple menus + +Links to %xxx% open "<< < %xxx%" with menu-mode: >>> %menu% +When you add new menu, [[%menu%]] may be more convenient because corresponding +entry is generated automatically. + +%eval%(howm-menu-open "00000000-000000.txt") -- open file with menu-mode diff --git a/site-lisp/howm/en/ChangeLog b/site-lisp/howm/en/ChangeLog new file mode 100644 index 0000000..9675a3d --- /dev/null +++ b/site-lisp/howm/en/ChangeLog @@ -0,0 +1,20 @@ +2011-01-01 HIRAOKA Kazuyuki + + * 0000-00-00-000000.txt: support new commands. + +2010-12-31 HIRAOKA Kazuyuki + + * 0000-00-00-000000.txt: use %reminder instead of %schedule and %todo. + +2005-12-09 HIRAOKA Kazuyuki + + * Makefile.am: no need to install 0000-00-00-000000.howm. + +2005-05-11 HIRAOKA Kazuyuki + + * 0000-00-00-000000.howm: added [Preference], %recent, %random + +2005-05-06 HIRAOKA Kazuyuki + + * 0000-00-00-000000.howm: bind R = [Update Menu] + diff --git a/site-lisp/howm/en/Makefile.am b/site-lisp/howm/en/Makefile.am new file mode 100644 index 0000000..c37714d --- /dev/null +++ b/site-lisp/howm/en/Makefile.am @@ -0,0 +1,6 @@ +EXTRA_DIST = 0000-00-00-000000.txt + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status diff --git a/site-lisp/howm/en/Makefile.in b/site-lisp/howm/en/Makefile.in new file mode 100644 index 0000000..4502e65 --- /dev/null +++ b/site-lisp/howm/en/Makefile.in @@ -0,0 +1,315 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = en +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CVS = @CVS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EMACS = @EMACS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +howmdir = @howmdir@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +lispdir = @lispdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +packagedir = @packagedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = 0000-00-00-000000.txt +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu en/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu en/Makefile +.PRECIOUS: Makefile + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/site-lisp/howm/ext/ChangeLog b/site-lisp/howm/ext/ChangeLog new file mode 100644 index 0000000..5c6d357 --- /dev/null +++ b/site-lisp/howm/ext/ChangeLog @@ -0,0 +1,44 @@ +2010-12-29 HIRAOKA Kazuyuki + + * tag2plan: removed (not maintained) + +2008-02-12 HIRAOKA Kazuyuki + + * howm2 (ls_R): fix. + string =~ string is obsolete. + thx > dareka + http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?BugReport + + * howmkara + (ls_R): ditto. + (Book::interpret): ditto. + +2005-10-05 HIRAOKA Kazuyuki + + * howmkara + (String::offsets): avoid warning. + (Book::search): escape $ in regexp. + +2005-09-15 HIRAOKA Kazuyuki + + * hcal.rb (ical_item): don't use Date + +2005-07-18 HIRAOKA Kazuyuki + + * hcal.rb + (ical): fix. + iCalendar PRODID was merely copied from output of vPim + without consideration. + (usage): update URL + +2005-05-20 HIRAOKA Kazuyuki + + * howm2: support aliases of come-from keywords + +2005-05-15 HIRAOKA Kazuyuki + + * Makefile.am (EXTRA_DIST): + howmkara, hsplit.rb, howm-rast-register.rb, howm-rast-search.rb + are added. + + diff --git a/site-lisp/howm/ext/Makefile.am b/site-lisp/howm/ext/Makefile.am new file mode 100644 index 0000000..e6e83c4 --- /dev/null +++ b/site-lisp/howm/ext/Makefile.am @@ -0,0 +1,12 @@ +EXTRA_DIST = \ + hcal.rb \ + howm2 \ + howmkara \ + hsplit.rb + +ext_DATA = $(EXTRA_DIST) + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status diff --git a/site-lisp/howm/ext/Makefile.in b/site-lisp/howm/ext/Makefile.in new file mode 100644 index 0000000..3fb5729 --- /dev/null +++ b/site-lisp/howm/ext/Makefile.in @@ -0,0 +1,369 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ext +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(extdir)" +DATA = $(ext_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CVS = @CVS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EMACS = @EMACS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +howmdir = @howmdir@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +lispdir = @lispdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +packagedir = @packagedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = \ + hcal.rb \ + howm2 \ + howmkara \ + hsplit.rb + +ext_DATA = $(EXTRA_DIST) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ext/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ext/Makefile +.PRECIOUS: Makefile + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-extDATA: $(ext_DATA) + @$(NORMAL_INSTALL) + test -z "$(extdir)" || $(MKDIR_P) "$(DESTDIR)$(extdir)" + @list='$(ext_DATA)'; test -n "$(extdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(extdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(extdir)" || exit $$?; \ + done + +uninstall-extDATA: + @$(NORMAL_UNINSTALL) + @list='$(ext_DATA)'; test -n "$(extdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(extdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(extdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(extdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-extDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-extDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-extDATA \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ + uninstall-am uninstall-extDATA + + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/site-lisp/howm/ext/hcal.rb b/site-lisp/howm/ext/hcal.rb new file mode 100755 index 0000000..fd9805d --- /dev/null +++ b/site-lisp/howm/ext/hcal.rb @@ -0,0 +1,280 @@ +#!/usr/bin/ruby -sKe +# -*- Ruby -*- + +# require 'jcode' +require 'iconv' +require 'date' + +def usage + name = File::basename $0 + print < '-'} +$date_sep = '-' + +def item_regexp(types) + x = $date_sep + if $format == 'old' + $todo_types ||= '[-+~!.]?' + %r|(@\[(\d\d\d\d)#{x}(\d\d)#{x}(\d\d)\](#{types})(\d*)\s+(.*))$| + else + $todo_types ||= '[-+~!.]' + %r|(\[(\d\d\d\d)#{x}(\d\d)#{x}(\d\d)\](#{types})(\d*)\s+(.*))$| + end +end + +# calendar + +$comment_width ||= 12 +$comment_width = $comment_width.to_i + +$schedule_mark ||= '@' +$deadline_mark ||= '!' +$done_mark ||= '.' +$type_display = { + '@' => $schedule_mark, + '!' => $deadline_mark, + '.' => $done_mark, + '?' => '▲' +} +$type_order = {'@' => 2, '!' => 1, '.' => 3, '?' => 4} +$today_mark ||= ' <<<<##>>>>' +$same_day_mark ||= ' #>>>>' + +# todo + +$priority_func = { +# '' => lambda{|lt, lz| pr_normal lt, lz}, + '-' => lambda{|lt, lz| pr_normal lt, lz}, + '+' => lambda{|lt, lz| pr_todo lt, lz}, + '~' => lambda{|lt, lz| pr_defer lt, lz}, + '!' => lambda{|lt, lz| pr_deadline lt, lz}, + '@' => lambda{|lt, lz| pr_schedule lt, lz}, + '.' => lambda{|lt, lz| pr_done lt, lz}, + '?' => lambda{|lt, lz| 0}, +} + +# defaults +$lz_normal = 1 +$lz_todo = 7 +$lz_defer = 30 +$lz_deadline = 7 + +# init +$pr_todo = -7 +$pr_defer = -14 +$pr_defer_peak = 0 +$pr_deadline = -2 + +$huge = 77777 +$huger = 88888 +$pr_normal_bottom = - $huge +$pr_todo_bottom = - $huge +$pr_defer_bottom = - $huge +$pr_deadline_bottom = - $huge +$pr_deadline_top = $huge +$pr_done_bottom = - $huger + +# misc + +$now = Time::now.to_f +$daysec = 60 * 60 * 24 + +############################################ +# func + +def late(time) + ($now - time.to_f) / $daysec +end + +# def late(y, m, d, now) +# ($now - Time::local(y,m,d,0,0,0).to_f) / $daysec +# end + +def relative_late(late, laziness, default) + laziness = default if laziness == 0 + late / laziness +end + +def pr_normal(lt, lz) + r = relative_late lt, lz, $lz_normal + r >= 0 ? - r : $pr_normal_bottom + r +end + +def pr_todo(lt, lz) + r = relative_late lt, lz, $lz_todo + c = - $pr_todo + r >= 0 ? c * (r - 1) : $pr_todo_bottom + r +end + +def pr_defer(lt, lz) + r = relative_late lt, lz, $lz_defer + c = $pr_defer_peak - $pr_defer + v = 2 * (((r % 1) - 0.5).abs) + r >= 0 ? $pr_defer_peak - c * v : $pr_defer_bottom + r +end + +def pr_deadline(lt, lz) + r = relative_late lt, lz, $lz_deadline + c = - $pr_deadline + if r > 0 + $pr_deadline_top + r + elsif r < -1 + $pr_deadline_bottom + r + else + c * r + end +end + +# dummy +def pr_schedule(lt, lz) + 0 +end + +def pr_done(lt, lz) + $pr_done_bottom + lt +end + +############################################ +# main + +if ($help || $h) + usage + exit 0 +end + +def item(types) + ARGF.grep(item_regexp(types)){|x| + h = Hash::new + h[:text] = $1 + y, m, d = [$2, $3, $4].map{|s| s.to_i} +# h[:y] = y = $2.to_i +# h[:m] = m = $3.to_i +# h[:d] = d = $4.to_i + h[:time] = time = Time::mktime(y, m, d) + h[:type] = type = $type_alias[$5] || $5 + h[:laziness] = laziness = $6.to_i + h[:comment] = $7 + h[:priority] = - $priority_func[type].call(late(time), laziness) + h[:file] = ARGF.filename + h[:line] = ARGF.file.lineno + h + } +end + +# def select_type(item, types) +# item.select{|h| types.member? h[:type]} +# end + +### todo + +def todo() + item($todo_types).sort{ + |a, b| a[:priority] <=> b[:priority] + }.each{|a| + puts "#{a[:file]}:#{a[:line]}:#{a[:text]}" + } +end + +### ical + +$conv = Iconv.new("UTF-8", "EUC-JP") + +def ical() + puts <<_EOS_ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//howm.sourceforge.jp//hcal.rb $Revision: 1.12 $//EN +CALSCALE:Gregorian +#{item($schedule_types).map{|h| ical_item h}.select{|z| z}.join.chomp} +END:VCALENDAR +_EOS_ +end + +def ical_item(h) +# if !Date.valid_date?(h[:y], h[:m], 1) +# $stderr.puts 'Invalid date:#{h[:file]}:#{h[:line]}:#{h[:text]}' +# return nil +# end +# # convert 2005-09-31 to 2005-10-01 +# d = Date.new(h[:y], h[:m], 1) + (h[:d] - 1) +# d = Date.new h[:y], h[:m], h[:d] +# s, e = [d, d+1].map{|z| z.strftime '%Y%m%d'} + s, e = [h[:time], h[:time] + 86400].map{|z| z.strftime '%Y%m%d'} + return <<_EOS_ +BEGIN:VEVENT +DTSTART:#{s} +DTEND:#{e} +SUMMARY:#{$conv.iconv(h[:type] + h[:comment])} +END:VEVENT +_EOS_ +end + +### schedule + +def schedule() + cal = Hash::new + item($schedule_types).each{|h| + t = h[:time] + cal[t] ||= Array::new + cal[t].push h + # [2004-12-25]@3 ==> [2004-12-25]@ [2004-12-26]@ [2004-12-27]@ + if h[:type] == '@' && h[:laziness] > 1 + (1...h[:laziness]).each{|d| + td = t + 60 * 60 * 24 * d + cal[td] ||= Array::new + cal[td].push h + } + end + } + min_time = cal.keys.min + max_time = cal.keys.max + t = min_time + while t <= max_time + c = cal[t] || [] + puts if t.wday == 0 + puts "----------------<#{t.month}>---------------- #{t.year}" if t.day == 1 + day = t.strftime '%d %a' + text = c.sort{|a,b| + x, y = [a, b].map{|z| [$type_order[z[:type]], z[:comment]]} + x <=> y +# $type_order[a[:type]] <=> $type_order[b[:type]] + }.map{|h| + h[:comment].sub!(%r|^(cancel)? *\[[#{$date_sep}0-9]+\][!+]?[0-9]*\s*|){|s| $1 ? 'x' : ''} if h[:type] == '.' # adhoc! + $type_display[h[:type]] + h[:comment].split(//)[0, $comment_width].join + }.join ' ' + mark = if t.strftime('%Y%m%d') == Time::now.strftime('%Y%m%d') + $today_mark + elsif t.strftime('%m%d') == Time::now.strftime('%m%d') + $same_day_mark + else + '' + end + puts "#{day} #{text}#{mark}" + t += 60*60*24 + end +end + +### main + +if $l + todo +elsif $i + ical +else + schedule +end diff --git a/site-lisp/howm/ext/howm2 b/site-lisp/howm/ext/howm2 new file mode 100755 index 0000000..806218c --- /dev/null +++ b/site-lisp/howm/ext/howm2 @@ -0,0 +1,534 @@ +#!/usr/bin/ruby -s +# -*- coding: euc-jp -*- +# -*- Ruby -*- +# $Id: howm2,v 1.10 2010-12-31 12:12:47 hira Exp $ + +# Convert ~/howm/ to HTML or other formats. +# Only RD format is supported unless you will give me patches. :p + +require 'cgi' + +def usage + name = File::basename $0 + print < lambda{|str| CGI::escapeHTML str}, + :unescaper => lambda{|str| CGI::unescapeHTML str}, + # body page + :namer => appender('.b.html'), + :header => lambda{|file| + %!#{file}
\n!
+  },
+  :come_tag => lambda{|a|
+    # Fix me.
+    %!#{a[:orig]}!
+  },
+  :come_jump => lambda{|a|
+    %!#{a[:orig]}!
+  },
+  :come_anchor => lambda{|a|
+    %!!
+  },
+  :go_tag => lambda{|a|
+    %!#{a[:orig]}!
+  },
+  :go_anchor => lambda{|a|
+    %!!
+#     %!#{a[:key]}!
+  },
+  :url => lambda{|a|
+    %!#{CGI::unescapeHTML a[:url]}!
+  },
+  :footer => lambda{|file|
+    %!

index\n! + }, + # reference page + :ref_namer => appender('.r.html'), + :ref_header => lambda{|file| + "#{file}

References: #{file}

\n" + }, + :ref_itemer => lambda{|a| + go = a[:goto_file] + url = go ? "file://#{a[:goto_file]}" : "#{a[:path]}\##{a[:anch]}" + ocs = a[:occur] + %!

#{a[:key]} (#{ocs.length})

\n
    \n! + + ocs.map{|oc| + %!
  1. #{oc[:file]} #{oc[:text]}\n! + }.join + + "
\n" + }, + :ref_footer => constant("\n"), + # index page + :index_namer => constant('index.html'), + :index_header => constant("#{$title}

#{$title}

\n"), + :index_keyworder => lambda{|as| + "

Keywords (#{as.length})

\n" + + as.map{|a| %!#{a[:key]}!}.join(" /\n") + + "\n" + }, + :index_filer => lambda{|as| + "

Files (#{as.length})

\n
    \n" + + as.map{|a| %!
  1. #{a[:file]}: #{a[:title]}\n!}.join + + "
\n" + }, + :index_footer => constant("\n"), +} + +$formatter['rd'] = { # RD doesn't have anchor? + :escaper => no_change, + :unescaper => no_change, + # body page + :namer => appender('.b.rd'), + :header => empty, + :come_tag => lambda{|a| %!((<"#{a[:orig]}"|URL:#{a[:rpath]}>))!}, + :come_jump => lambda{|a| %!((<"#{a[:orig]}"|URL:#{a[:path]}>))!}, + :come_anchor => constant(''), + :footer => empty, + :go_tag => lambda{|a| %!((<"#{a[:orig]}"|URL:#{a[:rpath]}>))!}, + :go_anchor => constant(''), + :url => lambda{|a| %!((<"#{a[:url]}"|URL:#{a[:url]}>))!}, + # reference page + :ref_namer => appender('.r.rd'), + :ref_header => lambda{|file| "=begin\n= References: #{file}\n"}, + :ref_itemer => lambda{|a| + go = a[:goto_file] + url = go ? "file://#{go}" : "#{a[:path]}" + %!== ((<"#{a[:key]}"|URL:#{url}>))\n! + + a[:occur].map{|oc| + %!* ((<"#{oc[:file]}"|URL:#{oc[:path]}>)) #{oc[:text]}\n! + }.join + + "\n" + }, + :ref_footer => constant("=end\n"), + # index page + :index_namer => constant('index.rd'), + :index_header => constant("=begin\n= #{$title}\n"), + :index_keyworder => lambda{|as| + "== Keywords (#{as.length})\n" + + as.map{|a| %!((<"#{a[:key]}"|URL:#{a[:dest]}>))!}.join(" /\n") + + "\n" + }, + :index_filer => lambda{|as| + "== Files (#{as.length})\n" + + as.map{|a| %!* ((<"#{a[:file]}"|URL:#{a[:dest]}>)): #{a[:title]}\n!}.join + }, + :index_footer => constant("=end\n"), +} + +b = $formatter['rd'].dup +b[:header] = constant "=begin\n" +b[:footer] = constant "=end\n" +$formatter['rdbody'] = b + +##################################### + +class String + def indices(substr) + a = Array::new + pos = 0 + while (i = index substr, pos) + a.push(substr.is_a?(Regexp) ? [i, $&] : i) + pos = i + 1 + end + return a + end +end + +class HashList < Hash + def cons(key, val) + self[key] ||= Array::new + self[key].push val + end +end + +def ls_R(dir) + a = Array::new + Dir::open(dir){|d| d.each{|f| a.push f}} # map doesn't work?? + b = Array::new + a.each{|f| + next if f =~ /#$exclude/ + path = File::expand_path f, dir + b.push f if FileTest::file? path + b += ls_R(path).map{|g| "#{f}/#{g}"} if FileTest::directory? path + } + return b +end + +# FixMe :-( +def bundle(file_list) + fs = file_list.map{|f| File::expand_path f} + ds = fs.map{|f| File::dirname f} + common = ds[0] || '' + ds.each{|d| + while common != d + if common.length <= d.length + d = File::dirname d + else + common = File::dirname common + end + end + } + rs = fs.map{|f| f[(common.length + 1)..-1]} # +1 for '/' + return [common, rs] +end + +# Fixme :-( +def mkdir_p(path) + parent = File::dirname path + return true if parent == path # root dir + mkdir_p parent + if !FileTest::exist? path + Dir::mkdir path + end +end + +# Fixme :-( +def relative_path(target, origin) + return target if origin == '.' + sep = '/' + parent = '..' + root = origin.split(sep).map{|any| parent}.join(sep) + return root + sep + target +end + +def to_index(origin) + relative_path $formatter[$type][:index_namer].call, File::dirname(origin) +end + +$unique_id = ':000000' +def unique_name(base) + base + $unique_id.succ!.dup +end + +##################################### + +$titles_in_file = HashList::new # dirty! +def come_go_master(files, dir, formatter) + h = HashList::new # key => master files + aliases = [] + files.each{|f| + open(File::expand_path(f, dir)){|io| + io.each_line{|line| + if (t = title_match line) + $titles_in_file.cons f, t + end + if (found = come_go_match line) + equiv_key = [] + equiv_raw = [] + found.each{|m| + type, key, raw = m + s = formatter[:escaper].call raw + k = formatter[:escaper].call key + g = formatter[:namer].call f + r = formatter[:ref_namer].call f + a = CGI::escape(k) + arg = { + :type => type, + :raw => s, + :key => k, + :occur => Array::new, + :file => f, + :dest => g, + :ref => r, + :anch => a, + } + case type + when :comefrom + h.cons s, [:come_tag, arg] + h.cons k, [:come_jump, arg] + h.cons k, [:come_anchor, arg] + equiv_key.push k + equiv_raw.push s + when :goto + h.cons s, [:go_tag, arg] + h.cons k, [:go_anchor, arg] + end + } + if equiv_key.length > 1 + aliases += [equiv_key, equiv_raw] + end + end + } + } + } + return h, aliases +end + +def format_line(line, prog) + match = HashList::new # pos => key + prog.each{|rule| + regexp, func, greedy = [:regexp, :func, :greedy].map{|k| rule[k]} + line.indices(regexp).each{|r| + i, k = r + match.cons i, [k, func, greedy] + } + } + p match if $debug + cursor = 0 + done = "" + match.keys.sort.each{|i| + skipping = (i < cursor) + if !skipping + done += line[cursor..(i - 1)] if i > 0 # 'foobar'[0..-1] is 'foobar' + cursor = i + end + match[i].each{|com| + key, func, greedy = com + next if greedy && skipping + done += func.call(key, line) + if greedy + cursor = i + key.length + break + end + } + } + if (cursor <= (len = line.length)) + done += line[cursor..len] + end + return done +end + +def format_io(input, output, prog_src, compiler, escaper) + a = input.readlines.map{|s| escaper.call s} + whole = a.join + matched_rules = prog_src.select{|rule| + whole =~ rule[:regexp] + } + prog = matched_rules.map{|r| compiler.call r} + a.each{|line| + output.print format_line(line, prog) + } +end + +##################################### + +def notice(str) + STDERR.print str if !$silent +end + +if $list + dest_dir = ARGV.shift + src_dir, files = bundle(STDIN.readlines.map{|s| s.chomp}) +else + src_dir, dest_dir = ARGV + files = ls_R src_dir +end +notice "#{files.length} files " +fmt = $formatter[$type] +k2m, aliases = come_go_master files, src_dir, fmt +aliases = [] if $no_alias +notice "(#{k2m.length} entries)\n" +p k2m if $debug + +aliases.each{|equiv| + key0 = equiv.shift + type0, arg0 = k2m[key0][0] + equiv.each{|key| + k2m[key].each{|m| + type, arg = m + [:occur, :file, :dest, :ref].each{|x| + arg[x] = arg0[x] + } + arg[:anch_alias] = arg0[:anch] if type == :come_tag + } + } +} + +notice 'body pages: ' +greedy = Array::new +nongreedy = Array::new +k2m.each_pair{|k, v| + v.each{|m| + type, arg = m + r = /#{Regexp::escape k}/ + g = [:come_tag, :come_jump, :go_tag].member?(type) + z = g ? greedy : nongreedy + h = {:raw => k, :regexp => r, :type => type, :arg => arg, :greedy => g} + z.push h + } +} +greedy.sort!{|x, y| x[:raw].length <=> y[:raw].length} +greedy.reverse! +p greedy if $debug +p nongreedy if $debug +u = {:regexp => $url_regexp, :type => :url, :arg => Hash::new, :greedy => true} +prog_src = nongreedy + [u] + greedy +files.each{|f| + notice $progress + g = fmt[:namer].call f + r = fmt[:ref_namer].call f + spath = File::expand_path f, src_dir + dpath, rpath = [g, r].map{|x| File::expand_path x, dest_dir} + mkdir_p File::dirname(dpath) + compiler = lambda{|h| + func = lambda{|k, s| + type = h[:type] + arg = h[:arg] + if type == :url + arg[:url] = k + else + dir = File::dirname(f) + arg[:path] = relative_path arg[:dest], dir + arg[:rpath] = relative_path arg[:ref], dir + a = unique_name arg[:anch] + path = relative_path(g, dir) + occur = { + :file => f, :path => path, :text => s.chop, + :anch => a, :type => type, + } + arg[:occur].unshift occur + arg[:orig] = k + arg[:anch_n] = arg[:anch_alias] || arg[:anch] + end + fmt[type].call arg + } + reg = h[:regexp] + ignore_case = [:come_tag, :come_jump, :come_anchor].member?(h[:type]) && $i + reg = /#{reg.source}/i if ignore_case + {:regexp => reg, :func => func, :greedy => h[:greedy]} + } + open(spath){|input| + open(dpath, 'w'){|output| + output.print fmt[:header].call(f) + format_io input, output, prog_src, compiler, fmt[:escaper] + output.print fmt[:footer].call(f) + } + } +} +notice "\n" + +notice 'reference pages: ' +m2a = HashList::new +k2m.each_pair{|k, v| + v.each{|z| + type, arg = z + next if arg[:anch_alias] + m2a.cons arg[:file], arg if [:come_anchor, :go_anchor].member? type + } +} +m2a.each_pair{|f, v| + notice $progress + body = fmt[:namer].call f + ref = fmt[:ref_namer].call f + rpath = File::expand_path ref, dest_dir + mkdir_p File::dirname(rpath) + open(rpath, 'w'){|output| + output.print fmt[:ref_header].call(f) + v.each{|arg| + g = fmt[:unescaper].call arg[:key] + arg[:goto_file] = g if arg[:type] == :goto && FileTest::exist?(g) + arg[:occur].reject!{|oc| ![:come_anchor, :go_anchor].member? oc[:type]} + arg[:occur].sort!{|a,b| - (a[:file] <=> b[:file])} + output.print fmt[:ref_itemer].call(arg) + } + output.print fmt[:ref_footer].call(f) + } +} +notice "\n" + +notice 'index page: ' +path = File::expand_path fmt[:index_namer].call(), dest_dir +open(path, 'w'){|output| + output.print fmt[:index_header].call + output.print fmt[:index_keyworder].call(k2m.keys.sort.map{|k| + k2m[k].map{|m| + type, arg = m + [:come_anchor].member?(type) ? arg : nil + }.select{|a| a} + }.flatten) + # alphabet files precede numerical files + z = files.sort{|f, g| + a, b = [f, g].map{|h| (h =~ /^[0-9]/ ? 'z' : 'a') + h} + a <=> b + } + z.reverse! if $r + output.print fmt[:index_filer].call(z.map{|f| + g = fmt[:namer].call f +# ts = $titles_in_file[f].reject{|t| t =~ /^\s*$/} || [] + ts = $titles_in_file[f] || [] + {:file => f, :dest => g, :title => ts.join(' / ')} + }) + output.print fmt[:index_footer].call +} +notice ".\n" diff --git a/site-lisp/howm/ext/howmkara b/site-lisp/howm/ext/howmkara new file mode 100755 index 0000000..96ebc92 --- /dev/null +++ b/site-lisp/howm/ext/howmkara @@ -0,0 +1,361 @@ +#!/usr/bin/ruby -s +# -*- coding: euc-jp -*- +# -*- Ruby -*- +# $Id: howmkara,v 1.7 2010-12-31 12:12:47 hira Exp $ + +# Convert ~/howm/ to HTML or other formats. +# Only RD format is supported unless you will give me patches. :p + +############################################################# + +require 'cgi' + +def usage + name = File::basename $0 + print <#{CGI::escapeHTML str}! + when :list + items = command.shift + @result += "
    \n" + items.each{|i| @result += '
  1. '; put_one i; @result += "\n"} + @result += "
\n" + end + end + def wrapped_result(title) + etitle = CGI::escapeHTML title + <<_EOS_ + +#{etitle} + +

#{etitle}

+
+#{@result} +
+Home +Files +Keywords + + +_EOS_ + end + def write(title, file, dir) + f = File::expand_path(file, dir) + '.html' + mkdir_p File::dirname(f) + open(f, 'w'){|io| io.puts wrapped_result(title)} + end +end + +class Book + include Bundle + attr_accessor :files, :base_dir + def initialize(files, base_dir) + @files = files + @base_dir = base_dir + end + def first_page + link_tag(@files[0]) + end + def write(dest_dir, formatter) + index = Index::new @files, @base_dir + write_each dest_dir, formatter, index + write_list dest_dir, formatter + index.write dest_dir, formatter + end + def write_list(dest_dir, formatter) + formatter.newpage + formatter.put [:list, @files.sort.map{|f| + link_tag f +# first_line = open(File::expand_path f, @base_dir){|io| io.gets.chop} +# [:link, f + '.b', f + ': ' + first_line[0, $summary_length]] + }] + formatter.write 'Files', 'book.h', dest_dir + notice ".\n" + end + def write_each(dest_dir, formatter, index) + @files.each{|f| + formatter.newpage + formatter.put [:pre, interpret(expand_readlines(f), index, f)] + formatter.write first_line(f), f + '.b', dest_dir +# formatter.write f, f + '.b', dest_dir + notice '.' + } + notice "\n" + end + def interpret(src, index, f) + hit = search src, index, f + cursor = 0 + ret = [] + while !hit.empty? + h = hit.shift + b, e, key = h + case cursor <=> b + when -1 # eat until beginning of this hit, and retry + ret.push [:as_is, src[cursor...b]] + hit.unshift h + cursor = b + when 0 # expand this hit + s = src[b...e] + if key == :url + link = [:url, s] + elsif key == :decl + s =~ /#$come_from/ + w = Regexp::last_match[$come_from_pos] + link = CGI::escape(CGI::escape(w)) + '.i' + else + decl = index.decl[key] + link = decl.member?(f) ? nil : decl[0] + '.b' + end + ret.push(link ? [:link, link, s] : [:as_is, s]) + cursor = e + when 1 # discard this hit + end + end + ret.push [:as_is, src[cursor..-1]] + ret + end + def search(src, index, f) + hit = [] + index.decl.each_key{|k| + offsets = src.offsets k + index.used.cons k, f if !offsets.empty? && !index.decl[k].member?(f) + hit += offsets.map{|o| o.push k} + } + hit += src.offsets(%r{http://[-!@#\$%^&*()_+|=:~/?a-zA-Z0-9.,;]*[-!@#\$%^&*()_+|=:~/?a-zA-Z0-9]+}).map{|o| o.push :url} + hit += src.offsets($come_from).map{|o| o.push :decl} + hit.sort{|h1, h2| earlier_longer h1, h2} + end + def earlier_longer(h1, h2) + [h1[0], - h1[1]] <=> [h2[0], - h2[1]] + end +end + +class Index + include Bundle + attr_accessor :files, :base_dir + attr_reader :decl, :used + def initialize(files, base_dir) + @files = files + @base_dir = base_dir + @decl = HashList::new + @used = HashList::new + search_decl + end + def search_decl + @files.each{|f| + expand_readlines(f).scan($come_from){|hit| @decl.cons hit[0], f} + } + end + def write(dest_dir, formatter) + write_each dest_dir, formatter + write_list dest_dir, formatter + end + def write_list(dest_dir, formatter) + formatter.newpage + formatter.put [ + :list, + @decl.keys.sort.map{|key| + [:link, CGI::escape(CGI::escape(key)) + '.i', key + " (#{(@used[key]||[]).length})"] + } + ] + formatter.write 'Keywords', 'index.h', dest_dir + notice ".\n" + end + def write_each(dest_dir, formatter) + @decl.each_key{|key| + f = CGI::escape(key) + '.i' + to_decl = @decl[key].map{|g| link_tag g} + to_used = (@used[key] || []).map{|g| link_tag g} + to_rel = related_keys(key).map{|g| [:link, @decl[g][0] + '.b', g]} +# to_decl = @decl[key].map{|g| [:link, g + '.b', g]} +# to_used = (@used[key] || []).map{|g| [:link, g + '.b', g]} +# to_rel = related_keys(key).map{|g| [:link, @decl[g][0] + '.b', g]} + formatter.newpage + c = [ + [:as_is, "Declared:\n"], + [:list, to_decl], + [:as_is, "Linked:\n"], + [:list, to_used], + [:as_is, "Related:\n"], + [:list, to_rel], + ] + formatter.put *c + formatter.write key, f, dest_dir + notice '.' + } + notice "\n" + end + def related_keys(key) + sub = included_keys key + sub.map{|k| @decl.keys.select{|x| x.include? k and x != key}}.flatten.uniq.sort + end + def included_keys(key) + @decl.keys.select{|k| key.include? k} + end +end + +############################################################# + +if $list + dest_dir = ARGV.shift + src_dir, files = split_base(STDIN.readlines.map{|s| s.chomp}) +else + src_dir, dest_dir = ARGV + files = ls_R src_dir +end +notice "#{files.length} files " + +b = Book::new files, src_dir +i = Index::new files, src_dir +notice "(#{i.decl.length} entries)\n" + +$home ||= b.first_page[1] + '.html' +fmt = Formatter::new $home +b.write dest_dir, fmt diff --git a/site-lisp/howm/ext/hsplit.rb b/site-lisp/howm/ext/hsplit.rb new file mode 100755 index 0000000..cd583da --- /dev/null +++ b/site-lisp/howm/ext/hsplit.rb @@ -0,0 +1,33 @@ +#!/usr/bin/ruby -s +# -*- coding: euc-jp -*- +# -*- Ruby -*- + +def usage + name = File::basename $0 + print < 0 + open($prefix + ext, 'w'){|io| io.print x} + ext.succ! +} diff --git a/site-lisp/howm/gfunc.el b/site-lisp/howm/gfunc.el new file mode 100644 index 0000000..8dffc0d --- /dev/null +++ b/site-lisp/howm/gfunc.el @@ -0,0 +1,121 @@ +;;; gfunc.el --- support for generic function +;;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: gfunc.el,v 1.16 2011-12-31 15:07:29 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;;-------------------------------------------------------------------- + +;; sample +;; +;; (defun less-than:num (x y) +;; (< x y)) +;; (defun less-than:str (x y) +;; (string< x y)) +;; (defun type-of (x y) +;; (cond ((numberp x) ':num) +;; ((stringp x) ':str))) +;; (defvar disp-list (list #'type-of)) +;; (gfunc-define-function less-than (x y) disp-list) ;; --- <*> +;; (less-than 3 8) ;; (less-than:num 3 8) ==> t +;; (less-than "xyz" "abc") ;; (less-than:str "xyz" "abc") ==> nil +;; (pp (macroexpand '(gfunc-def less-than (x y) disp-list))) +;; +;; ;; This is equivalent to above <*>. +;; (gfunc-with disp-list +;; (gfunc-def less-than (x y)) +;; ;; You can insert more methods here. For example... +;; ;; (less-or-equal (x y)) +;; ;; (more-than (x y)) +;; ) + +(defvar *gfunc-dispatchers-var* nil + "For internal use") +(put '*gfunc-dispatchers-var* 'risky-local-variable t) + +;; loop version +(defun gfunc-call (base-name dispatchers args) + (let (type) + (catch 'done + (while dispatchers + (setq type (apply (car dispatchers) args)) + (if type + (throw 'done + (apply (intern-soft (format "%s%s" base-name type)) + args)) + (setq dispatchers (cdr dispatchers)))) + (error "Can't detect type of %s for %s." args base-name)))) + +;; (defun gfunc-call (base-name dispatchers args) +;; (if (null dispatchers) +;; (error "Can't detect type of %s for %s." args base-name) +;; (let ((type (apply (car dispatchers) args))) +;; (if (null type) +;; (gfunc-call base-name (cdr dispatchers) args) +;; (let ((f (intern-soft (format "%s%s" base-name type)))) +;; (apply f args)))))) + +;; (put 'gfunc-def 'lisp-indent-hook 2) +(defmacro gfunc-define-function (base-name args-declaration dispatchers-var + &optional description) + "Define generic function. +BASE-NAME is name of generic function. +ARGS-DECLARATION has no effect; it is merely note for programmers. +DISPATCHERS-VAR is name of variable whose value is list of type-detectors. +Type-detector receives arguments to the function BASE-NAME, and returns +its 'type' symbol. +Then, BASE-NAME + type is the name of real function. +Type detector must return nil if it cannot determine the type, so that +the task is chained to next detector." + (let ((desc-str (format "%s + +ARGS = %s + +Internally, %s___ is called according to the type of ARGS. +The type part ___ is determined by functions in the list `%s'. +This function is generated by `gfunc-define-function'." + (or description "Generic function.") + args-declaration + base-name + dispatchers-var))) + `(defun ,base-name (&rest args) + ,desc-str + (gfunc-call (quote ,base-name) ,dispatchers-var args)))) + +(defmacro gfunc-def (base-name args-declaration &optional description) + "Define generic function like `gfunc-define-function'. +The only difference is omission of dispatchers; it must be specified +by `gfunc-with' outside." + (declare (indent 2)) + `(gfunc-define-function ,base-name ,args-declaration ,*gfunc-dispatchers-var* + ,description)) + +(defmacro gfunc-with (dispatchers-var &rest body) + "With the defalut DISPATCHERS-VAR, execute BODY. +BODY is typically a set of `gfunc-def', and DISPATCHERS-VAR is used +as their dispatchers. +This macro cannot be nested." + (declare (indent 1)) + ;; Be careful to etc/NEWS in Emacs 24.3 or + ;; http://www.masteringemacs.org/articles/2013/03/11/whats-new-emacs-24-3/ + ;; "Emacs tries to macroexpand interpreted (non-compiled) files during load." + (setq *gfunc-dispatchers-var* dispatchers-var) + `(eval-and-compile + ,@body)) + +(provide 'gfunc) + +;;; gfunc.el ends here diff --git a/site-lisp/howm/gfunc.el.rej b/site-lisp/howm/gfunc.el.rej new file mode 100644 index 0000000..047e263 --- /dev/null +++ b/site-lisp/howm/gfunc.el.rej @@ -0,0 +1,21 @@ +--- gfunc.el 2013-01-03 16:15:54.000000000 +0900 ++++ gfunc.el 2013-03-18 04:46:14.000000000 +0900 +@@ -109,14 +109,12 @@ + as their dispatchers. + This macro cannot be nested." + (declare (indent 1)) ++ ;; Be careful to etc/NEWS in Emacs 24.3 or ++ ;; http://www.masteringemacs.org/articles/2013/03/11/whats-new-emacs-24-3/ ++ ;; "Emacs tries to macroexpand interpreted (non-compiled) files during load." ++ (setq *gfunc-dispatchers-var* dispatchers-var) + `(eval-and-compile +- ;; I want to use let instead of setq. +- ;; But, let doesn't work when this file is byte-compiled. +- ;; I don't understand the problem around macro and byte-compilation. +- (setq *gfunc-dispatchers-var* (quote ,dispatchers-var)) + ,@body)) +-;; (let ((*gfunc-dispatchers-var* (quote ,dispatchers-var))) +-;; ,@body))) + + (provide 'gfunc) + diff --git a/site-lisp/howm/honest-report.el b/site-lisp/howm/honest-report.el new file mode 100644 index 0000000..f5e7e23 --- /dev/null +++ b/site-lisp/howm/honest-report.el @@ -0,0 +1,138 @@ +;;; honest-report.el --- make bug report with screenshot and keylog + +;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;; HIRAOKA Kazuyuki +;; $Id: honest-report.el,v 1.13 2011-12-31 15:07:29 hira Exp $ +;; +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 1, or (at your option) +;; any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; The GNU General Public License is available by anonymouse ftp from +;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;; USA. + +;;; Commentary: + +;; (For users) +;; This small tool helps you write clear bug report. +;; Just type M-x honest-report to show recent keys and screen shots. +;; Copy them into your bug report. + +;; (For programmers) +;; Write a wrapper of `honest-report' with your favorite header and footer. + +;; (Bug) +;; Text properties are ignored in screen shot. +;; In particular, too large region can be copied for outline-mode +;; because all closed items are shown as opened. + +;;; Code: + +(defun honest-report (&optional header footer) + (interactive) + (let ((ver (honest-report-version)) + (key (honest-report-recent-keys)) + (msg (honest-report-message)) + (scr (honest-report-screenshot))) + (honest-report-setup) + (mapc (lambda (a) (apply #'honest-report-insert a)) + `( + ("Header" ,header) + ("Emacs version" ,ver) + ("Recent keys" ,key) + ("Recent messages" ,msg) + ("Screen shot" ,scr) + ("Footer" ,footer) + )) + (goto-char (point-max)))) + +(defun honest-report-insert (title content) + (when content + (insert "* " title ":\n\n" content "\n\n"))) + +;;;;;;;;;;;;; + +(defun honest-report-setup () + (let ((report-buf (format-time-string "honest-report-%Y%m%d-%H%M%S"))) + (switch-to-buffer report-buf))) + +;; snap:///usr/share/emacs/21.4/lisp/mail/emacsbug.el#136:(insert (mapconcat (lambda (key) +(defun honest-report-recent-keys () + (mapconcat (lambda (key) + (if (or (integerp key) + (symbolp key) + (listp key)) + (single-key-description key) + (prin1-to-string key nil))) + (recent-keys) + " ")) + +(defun honest-report-screenshot () + (mapconcat (lambda (w) + (with-current-buffer (window-buffer w) + (let ((b (max (window-start w) (point-min))) + (e (min (window-end w t) (point-max)))) + (format "--- %s ---\n%s" + w + (buffer-substring-no-properties b e))))) + (honest-report-window-list) + "\n")) + +(defun honest-report-window-list () + "Mimic `window-list'. +This function exists only for emacs20 (and meadow-1.15), +which lack `window-list'." + (let ((ws nil)) + (walk-windows (lambda (w) (setq ws (cons w ws)))) + (reverse ws))) + +(defun honest-report-message () + (with-current-buffer (or (get-buffer "*Messages*") + (get-buffer " *Message-Log*")) + (save-excursion + (goto-char (point-max)) + (forward-line -10) + (buffer-substring-no-properties (point) (point-max))))) + +(defun honest-report-version () + (mapconcat (lambda (sv) (format "[%s] %s" (car sv) (cdr sv))) + (honest-report-version-assoc) + "\n")) + +(defun honest-report-version-assoc () + (remove nil + `( + ("Emacs" . ,(format "%s (%s) of %s" + emacs-version + system-configuration + (honest-report-emacs-build-time))) + ("system" . ,system-type) + ("window system" . ,window-system) + ,(let ((f 'Meadow-version)) + ;; cheat to avoid warning while byte-compilation. + (and (fboundp f) + (cons "Meadow" (funcall f)))) + ("ENV" . ,(mapconcat (lambda (v) (format "%s=%s" v (getenv v))) + '("LC_ALL" "LC_CTYPE" "LANGUAGE" "LANG") + ", ")) + ))) + +(defun honest-report-emacs-build-time () + (if (stringp emacs-build-time) + emacs-build-time ;; xemacs + (format-time-string "%Y-%m-%d" + emacs-build-time))) + +;;;;;;;;;;;;; + +(provide 'honest-report) + +;;; honest-report.el ends here diff --git a/site-lisp/howm/howm-backend.el b/site-lisp/howm/howm-backend.el new file mode 100644 index 0000000..cf753c0 --- /dev/null +++ b/site-lisp/howm/howm-backend.el @@ -0,0 +1,980 @@ +;;; howm-backend.el --- Wiki-like note-taking tool +;;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm-backend.el,v 1.50 2012-12-29 08:57:18 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;-------------------------------------------------------------------- + +(provide 'howm-backend) +(require 'howm) + +;; in preparation at now. +;; many WRONG COMMENTS and TENTATIVE CODES. + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; class Folder + +(defun howm-folder () + (howm-make-folder:files (howm-search-path))) + +;; * class Folder: abstraction of directory + +;; (Wrong comments. Ignore me.) +;; * grep(pattern, fixed, case_insensitive) +;; * list of items +;; * new_page +;; * all_pages +;; * all_keys +;; * add_keys +;; * keys_in(page) +;; * This method is optional. + +(defun howm-folder-type (folder &rest r) + (cond ((stringp folder) ':dir) + ((eq folder 'buf) ':buf) + ((listp folder) (car folder)))) + +(howm-defvar-risky howm-folder-dispatchers (list #'howm-folder-type)) + +(gfunc-with howm-folder-dispatchers + (gfunc-def howm-folder-items (folder &optional recursive-p) + "All pages in FOLDER is returned as list of items. +When RECURSIVE-P is non-nil, pages in subfolders are also listed.") + (gfunc-def howm-folder-grep-internal (folder pattern &optional fixed-p) + "In FOLDER, PATTERN is searched. +Result is returned as list of items. When FIXED-P is nil, PATTERN is +regarded as regular expression.") + ;; need to suppor below for howm-directory + (gfunc-def howm-folder-get-page-create (folder page-name) + "In FOLDER, get page whose name is PAGE-NAME. +If corresponding page does not exist, new page is created. +Return value is a cons pair of page and flag. +Flag is non-nil if new page is created.") + (gfunc-def howm-folder-territory-p (folder name) + "Non nil if FOLDER should own NAME.") + ) + +;; (gfunc-def-with howm-folder-dispatchers +;; (howm-folder-items (folder &optional recursive-p) +;; "All pages in FOLDER is returned as list of items. +;; When RECURSIVE-P is non-nil, pages in subfolders are also listed.") +;; (howm-folder-grep-internal (folder pattern &optional fixed-p) +;; "In FOLDER, PATTERN is searched. +;; Result is returned as list of items. When FIXED-P is nil, PATTERN is +;; regarded as regular expression.") +;; ) + +(defun howm-folder-match-under-p (dir regexp filename) + (and (eq (howm-folder-type dir) ':dir) + (string-match regexp (file-relative-name filename dir)))) + +(defun howm-make-folder-from-items (items) + (howm-make-folder:pages (howm-cl-remove-duplicates* (mapcar #'howm-item-page + items) + :test #'howm-page=))) + +;;; +;;; dir folder: single directory +;;; + +(defun howm-make-folder:dir (dir) + dir) + +(defun howm-folder-items:dir (dir &optional recursive-p) + (let ((files (if recursive-p + (howm-files-in-directory dir) + (directory-files dir t)))) + (howm-folder-items:files (howm-make-folder:files files)))) + +(defun howm-folder-grep-internal:dir (folder pattern &optional fixed-p) + (howm-grep-items pattern folder fixed-p #'howm-exclude-p)) + +(defun howm-files-in-directory (path &optional dummy-exclusion-checker) + "List files in PATH recursively, when PATH is a directory. +When PATH is a file, list of it is returned. +Some files and directories are ignored according to `howm-exclude-p'. +DUMMY-EXCLUSION-CHECKER has no effect; it should be removed soon." + (howm-files-in-directory-sub (expand-file-name path))) + +(defun howm-files-in-directory-sub (full-path &optional under) + (let* ((top-call-p (null under)) + (excluded-p (if top-call-p + nil + (or (howm-exclude-p full-path) + ;; exclude "." & ".." + (not (howm-subdirectory-p under full-path + 'strict)))))) + (cond (excluded-p + nil) + ((file-directory-p full-path) + (howm-cl-mapcan (lambda (s) + (howm-files-in-directory-sub s full-path)) + (directory-files full-path t))) + ((file-exists-p full-path) + (list full-path)) + (t + nil)))) + +;; ;; list files recursively +;; (defun howm-files-in-directory (dir &optional exclusion-checker) +;; (when (null exclusion-checker) +;; (setq exclusion-checker (lambda (x) nil))) +;; (cond ((file-directory-p dir) (howm-files-in-directory-sub dir +;; exclusion-checker)) +;; ((file-exists-p dir) (list dir)) +;; (t nil))) + +;; (defun howm-files-in-directory-sub (dir exclusion-checker) +;; (howm-cl-mapcan (lambda (f) +;; (cond +;; ((funcall exclusion-checker f) nil) +;; ((file-directory-p f) (if (howm-subdirectory-p dir f t) +;; (howm-files-in-directory f exclusion-checker) +;; nil)) ;; exclude "." & ".." +;; ((file-regular-p f) (list f)) +;; (t nil))) +;; (directory-files dir t))) + +(defun howm-folder-get-page-create:dir (folder page-name) + (let* ((file (expand-file-name page-name folder)) + (dir (file-name-directory file)) + (createp (not (file-exists-p file)))) + (make-directory dir t) + (cons (howm-make-page:file file) createp))) + +(defun howm-folder-territory-p:dir (folder name) + (howm-subdirectory-p folder name)) + +;;; +;;; pages folder: list of 'pages' +;;; + +(defun howm-make-folder:pages (pages) + (cons ':pages pages)) + +(defun howm-folder-pages:pages (folder) + (cdr folder)) + +(defun howm-folder-items:pages (folder &optional recursive-p) + (let ((summary "")) + (mapcar (lambda (p) (howm-make-item p summary)) + (howm-folder-pages:pages folder)))) + +;; should be removed, or renamed at least +(defun howm-folder-files:pages (folder &optional exclusion-checker) + (remove nil (mapcar #'howm-page-name (howm-folder-pages:pages folder)))) + +(defun howm-folder-grep-internal:pages (folder pattern &optional fixed-p) + (let ((h (howm-classify #'howm-page-type (howm-folder-pages:pages folder) t))) + ;; get result for each type + (apply #'append (mapcar (lambda (p) + (let ((type (car p)) + (searcher (cdr p))) + (let ((pages (reverse (cdr (assoc type h))))) + (funcall searcher pages pattern fixed-p)))) + howm-folder-grep-internal:pages-searcher)))) + +(howm-defvar-risky howm-folder-grep-internal:pages-searcher + '((:file . howm-folder-grep-internal:pages-files) + (:buf . howm-folder-grep-internal:pages-buffers))) +(defun howm-folder-grep-internal:pages-files (pages pattern fixed-p) + (let ((files (mapcar #'howm-page-name pages))) + (howm-folder-grep-internal:files (howm-make-folder:files files) + pattern fixed-p))) +(defun howm-folder-grep-internal:pages-buffers (pages pattern fixed-p) + (let ((bufs pages) + (r (howm-fake-grep-regexp pattern fixed-p)) + (c *howm-view-force-case-fold-search*)) + (let ((grep-result (howm-cl-mapcan + (lambda (b) + (if (howm-buffer-killed-p b) + nil + (with-current-buffer b + (howm-fake-grep-current-buffer r b c)))) + bufs))) + (mapcar (lambda (g) + (let ((buf (car g)) + (place (second g)) + (content (third g))) + (howm-make-item (howm-make-page:buf buf) content place))) + grep-result)))) + +(defun howm-list-buffers (&optional all) + "Show buffer list. If ALL is non-nil, hidden buffers are also listed." + (interactive "P") + (let* ((bufs (if all + (buffer-list) + (howm-cl-remove-if + (lambda (b) + (let ((name (buffer-name b))) + (or (null name) + (string-match "^ " name) + (member name howm-list-buffers-exclude) + (with-current-buffer b + (member major-mode + '(howm-view-summary-mode + howm-view-contents-mode)))))) + (buffer-list)))) + (pages (mapcar (lambda (b) (howm-make-page:buf b)) bufs)) + (folder (howm-make-folder:pages pages))) + (howm-view-directory folder))) +(defun howm-occur (regexp) + "Show all lines in the current buffer containing a match for REGEXP." + (interactive "sSearch (regexp): ") + (let ((howm-view-use-grep (if howm-occur-force-fake-grep + nil + howm-view-use-grep))) + (howm-view-search-folder regexp + (howm-make-folder:pages + (list (howm-make-page:buf (current-buffer))))))) +(defun howm-list-mark-ring () + "Show all marks in the current buffer." + (interactive) + (let* ((page (howm-make-page:buf (current-buffer))) + (items (mapcar (lambda (m) + (let ((place (riffle-get-place m)) + (summary (save-excursion + (goto-char m) + (let ((b (line-beginning-position)) + (e (line-end-position))) + (buffer-substring b e))))) + (howm-make-item page summary place))) + (howm-cl-remove-duplicates* + (cons (mark-marker) mark-ring) + :test #'howm-mark-same-line-p)))) + (howm-view-summary "" items))) +(defun howm-mark-same-line-p (m1 m2) + (apply #'= + (mapcar (lambda (m) + (save-excursion + (goto-char m) + (line-beginning-position))) + (list m1 m2)))) + +;;; +;;; files folder: list of file names +;;; + +;;; This folder is treated specially for efficient search. + +;;; Fix me: [2005-02-17] +;;; Sorry. I can't remember whether 'file' means really 'file' only. +;;; It may be 'file or directory'. + +;; Try this to check it. +;; (setq howm-menu-top nil) +;; (setq howm-menu-file (expand-file-name "sample/0000-00-00-000000.howm")) +;; (setq howm-directory (howm-make-folder:files (mapcar (lambda (f) (expand-file-name f "sample/")) '("top.txt" "search.txt")))) + +(defun howm-make-folder:files (files) + (cons ':files files)) + +(defun howm-folder-items:files (folder &optional recursive-p) + (let ((summary "")) + (mapcar (lambda (f) + (howm-make-item (howm-make-page:file f) summary)) + (howm-folder-files:files folder)))) + +(defun howm-folder-grep-internal:files (folder pattern &optional fixed-p) + (howm-grep-items pattern (howm-folder-files:files folder) fixed-p)) + +;; should be removed, or renamed at least +(defun howm-folder-files:files (folder &optional exclusion-checker) + (cdr folder)) + +;;; +;;; nest folder: list of folders +;;; + +;; Try this to check it. +;; (setq howm-menu-top nil) +;; (setq howm-menu-file (expand-file-name "sample/0000-00-00-000000.howm")) +;; (setq howm-directory (howm-make-folder:nest (mapcar #'expand-file-name '("sample" "/usr/share/emacs/site-lisp/navi2ch")))) + +(defun howm-make-folder:nest (list-of-folders) + (cons ':nest list-of-folders)) + +(defun howm-folder-subfolders (self) + (cdr self)) + +(defun howm-folder-items:nest (folder &optional recursive-p) + (howm-cl-mapcan (lambda (f) (howm-folder-items f recursive-p)) + (howm-folder-subfolders folder))) + +(defun howm-folder-grep-internal:nest (folder pattern &optional fixed-p) + (howm-cl-mapcan (lambda (f) (howm-folder-grep-internal f pattern fixed-p)) + (howm-folder-subfolders folder))) + +;;; +;;; namazu folder: namazu index directory +;;; + +;; (cf.) Namazu: a Full-Text Search Engine http://www.namazu.org/index.html.en + +;; test: +(defun howm-search-namazu (dir pattern) + (interactive "Dindex directory: +ssearch: ") + (let ((folder (howm-make-folder:namazu (expand-file-name dir)))) + (howm-view-summary "" + (howm-view-search-folder-items pattern folder)))) + +(defun howm-make-folder:namazu (index-dir) + (cons ':namazu (expand-file-name index-dir))) + +(defun howm-folder-items:namazu (folder &optional recursive-p) + (let ((files (howm-folder-files:namazu folder))) + (howm-folder-items:files (howm-make-folder:files files)))) + +;; should be removed, or renamed at least +(defun howm-folder-files:namazu (folder &optional exclusion-checker) + (with-temp-buffer + (insert-file-contents (expand-file-name "NMZ.r" + (cdr folder))) + (split-string (buffer-substring-no-properties (point-min) + (point-max)) + "[\n\r\v]+"))) + +(defun howm-folder-grep-internal:namazu (folder pattern-list &optional fixed-p) + (let* ((index-dir (cdr folder)) + (namazu-pattern (mapconcat #'identity pattern-list " or ")) + (hits (with-temp-buffer + (call-process "namazu" nil t nil + "-l" "-a" namazu-pattern index-dir) + (split-string (buffer-substring-no-properties (point-min) + (point-max)) + "[\n\r\v]+"))) + (files (howm-cl-remove-if (lambda (f) (not (file-exists-p f))) hits))) + ;; grep again + (let ((howm-view-use-grep nil)) ;; Japanese encoding is annoying. + (howm-folder-grep-internal (howm-make-folder:files files) + pattern-list fixed-p)))) + +;;; +;;; rot13dir folder: almost same as dir folder except that files are rot13ed. +;;; + +(defun howm-make-folder:rot13dir (dir) + (cons ':rot13dir dir)) + +(defun howm-folder-items:rot13dir (folder &optional recursive-p) + (let ((files (if recursive-p + (howm-files-in-directory (cdr folder)) + (directory-files (cdr folder) t)))) + (mapcar (lambda (f) + (howm-make-item (howm-make-page:rot13file f))) + files))) + +(defun howm-folder-grep-internal:rot13dir (folder pattern-list &optional fixed-p) + (let* ((dir (cdr folder)) + (ps (mapcar (lambda (p) (yarot13-rotate-string p)) pattern-list)) + (is (howm-folder-grep-internal:dir dir ps fixed-p))) + (mapc (lambda (i) + (let ((file (howm-page-name (howm-item-page i))) + (summary (howm-item-summary i))) + (howm-item-set-page i (howm-make-page:rot13file file)) + (howm-item-set-summary i (yarot13-rotate-string summary)))) + is) + is)) + +;;; For backward compatibility. Don't use it any more. + +(defalias 'howm-view-directory-items #'howm-folder-items) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Grep + +;; Fix me: +;; Name of arguments are inappropriate. +;; Pattern and str may be list of strings. +;; File-list may be a string. + +(defun howm-folder-grep (folder pattern &optional fixed-p) + (when (stringp pattern) + (setq pattern (list pattern))) + (howm-folder-grep-internal folder pattern fixed-p)) + +(defvar *howm-view-force-case-fold-search* nil) ;; dirty! +(howm-defvar-risky howm-view-grep-log-file nil) +(defvar howm-view-grep-log-format "> %s | %s") + +(defun howm-grep-items (str file-list &optional fixed-p exclusion-checker) + (let* ((found (howm-grep str file-list fixed-p)) + (items (mapcar (lambda (z) + (let ((file (car z)) + (place (second z)) + (content (third z))) + (if (and exclusion-checker + (funcall exclusion-checker file)) + nil + (howm-make-item file content place)))) + found))) + (if exclusion-checker + (remove nil items) + items))) + +(defun howm-grep (str file-list &optional fixed-p) + (when howm-view-grep-log-file + (howm-write-log str howm-view-grep-log-format howm-view-grep-log-file)) + (when (stringp file-list) + (setq file-list (list file-list))) + (let ((grep-func (cond ((eq howm-view-use-grep t) 'howm-real-grep) + ((null howm-view-use-grep) 'howm-fake-grep) + ((functionp howm-view-use-grep) howm-view-use-grep) + (t (error "No function %s." howm-view-use-grep))))) + (funcall grep-func + str file-list fixed-p *howm-view-force-case-fold-search*))) + +(defun howm-real-grep (str file-list &optional fixed-p force-case-fold) + "Call grep and parse its result. +'((file line-number line) (file line-number line) ...) +" + (if (howm-grep-multi-p) + (howm-real-grep-multi str file-list fixed-p force-case-fold) + (howm-real-grep-single str file-list fixed-p force-case-fold))) + +(defun howm-grep-multi-p () + howm-view-grep-file-stdin-option) + +;; obsolete +(defun howm-real-grep-single (str file-list + &optional fixed-p force-case-fold) + "Call grep and parse its result. +'((file line-number line) (file line-number line) ...) +" + (when (listp str) + (if (null (cdr str)) + (setq str (car str)) + (error "Multiple patterns are not supported: %s" str))) + (let ((grep-command (or (and fixed-p howm-view-fgrep-command) + howm-view-grep-command)) + (opt (split-string howm-view-grep-option)) + (eopt (and howm-view-grep-expr-option + (list howm-view-grep-expr-option))) + (case-fold (or force-case-fold + (not (let ((case-fold-search nil)) + (string-match "[A-Z]" str)))))) + (labels ((add-opt (pred x) (when (and pred x) (setq opt (cons x opt))))) + (add-opt case-fold howm-view-grep-ignore-case-option) + (add-opt fixed-p howm-view-grep-fixed-option) + (add-opt (not fixed-p) howm-view-grep-extended-option)) + (with-temp-buffer + (let* ((fs (howm-expand-file-names file-list)) + (lines (howm-call-process* grep-command + `(,@opt ,@eopt ,str) fs)) + (parsed (mapcar 'howm-grep-parse-line lines))) + (remove nil parsed))))) + +(defun howm-real-grep-multi (str file-list &optional fixed-p force-case-fold) + (let ((grep-command (or (and fixed-p howm-view-fgrep-command) + howm-view-grep-command)) + (opt (split-string howm-view-grep-option)) + (eopt (split-string howm-view-grep-file-stdin-option))) + (let* ((str-list (cond ((stringp str) (list str)) + ((listp str) str) + (t (error "Wrong type: %s" str)))) + (caps-p (howm-cl-member-if (lambda (s) (howm-capital-p s)) str-list)) + (case-fold (or force-case-fold (not caps-p)))) + (labels ((add-opt (pred x) (when (and pred x) (setq opt (cons x opt))))) + (add-opt case-fold howm-view-grep-ignore-case-option) + (add-opt fixed-p howm-view-grep-fixed-option) + (add-opt (not fixed-p) howm-view-grep-extended-option)) + (with-temp-buffer + (let* ((fs (howm-expand-file-names file-list)) + (pat (apply #'concat + (mapcar (lambda (s) (concat s "\n")) str-list))) + (lines (howm-call-process* grep-command + `(,@opt ,@eopt) fs + nil pat)) + (parsed (mapcar 'howm-grep-parse-line lines))) + (remove nil parsed)))))) + +(defun howm-fake-grep (str file-list &optional fixed-p force-case-fold) + "Search STR in files. +Return a list ((name number str) (name number str) ...), where +name is file name, number is line number, and str is line content. +FILE-LIST is list of file names. +If FIXED-P is non-nil, regexp search is performed. +If FIXED-P is nil, fixed string search is performed. +When STR has no capital letters or FORCE-CASE-FOLD is non-nil, +difference of capital letters and small letters are ignored. + +Extended feature: +STR can be list of strings. They are regarded as 'or' pattern of all elements." + (howm-cl-mapcan (lambda (file) + (howm-fake-grep-file (howm-fake-grep-regexp str fixed-p) + file force-case-fold)) + (howm-cl-mapcan #'howm-files-in-directory file-list))) + +(defun howm-fake-grep-regexp (str &optional fixed-p) + (let ((str-list (if (stringp str) (list str) str))) + (if fixed-p + (regexp-opt str-list) + (mapconcat (lambda (s) (format "\\(%s\\)" s)) str-list "\\|")))) + +(defun howm-fake-grep-file (reg file force-case-fold) + (let ((b (get-file-buffer file))) + (if (and b howm-view-watch-modified-buffer) + (with-current-buffer b + (howm-fake-grep-current-buffer reg file force-case-fold)) + (with-temp-buffer + (insert-file-contents file) + (howm-fake-grep-current-buffer reg file force-case-fold))))) + +(defun howm-fake-grep-current-buffer (reg file force-case-fold) + (save-excursion + (save-restriction + (widen) + (goto-char (point-max)) + (let* ((found nil) + (case-fold-search (or force-case-fold (not (howm-capital-p reg))))) + (while (re-search-backward reg nil t) + (beginning-of-line) + (setq found + (cons (list file + (riffle-get-place) + (buffer-substring-no-properties (point) + (line-end-position))) + found))) + found)))) + +(defun howm-grep-parse-line (line) + (if (string-match "^\\(\\([a-zA-Z]:/\\)?[^:]*\\):\\([0-9]*\\):\\(.*\\)$" + line) + (let ((file (match-string 1 line)) + (line (string-to-number (match-string 3 line))) + (content (match-string 4 line))) + (list file line content)) + nil)) + +;; For backward compatibility. Don't use them any more. +(defalias 'howm-view-grep #'howm-grep) +(defalias 'howm-view-call-process #'howm-call-process) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; class Page + +;; * class Page: abstraction of file + +;; Fix me: confusion between 'page name' and 'file name', +;; especially for a buffer. + +;; (Wrong comments. Ignore me.) +;; * folder +;; * name +;; * created_time +;; * modified_time +;; * load +;; * save(text) + +(defun howm-page-type (page &rest r) + (cond ((stringp page) ':file) + ((bufferp page) ':buf) + ((null page) ':nil) + ((listp page) (car page)))) + +(howm-defvar-risky howm-page-dispatchers (list #'howm-page-type)) + +(gfunc-with howm-page-dispatchers + (gfunc-def howm-page-name (page)) + (gfunc-def howm-page-mtime (page)) + (gfunc-def howm-page-open (page)) + (gfunc-def howm-page-insert (page)) + (gfunc-def howm-page-viewer (page)) + (gfunc-def howm-page-set-configuration (page)) + ) + +(defun howm-page= (x y) + (equal x y)) + +(defun howm-page-abbreviate-name (page) + (howm-abbreviate-file-name (format "%s" (howm-page-name page)))) + +(defalias 'howm-save-buffer #'save-buffer) + +(defun howm-insert-buffer-contents (buffer) + (insert (with-current-buffer buffer + (save-restriction + (widen) + (let ((limit (point-max))) + (when howm-view-contents-limit + (setq limit (min limit howm-view-contents-limit))) + (buffer-substring-no-properties (point-min) limit)))))) + +(defun howm-insert-file-contents (file) + (insert-file-contents file nil nil howm-view-contents-limit)) + +;; (defun howm-page-insert-range () +;; (let ((limit (point-max))) +;; (when howm-view-contents-limit +;; (setq limit (min limit howm-view-contents-limit))) +;; (list (point-min) limit))) + +;; (defun howm-page-save (&optional args) +;; (interactive "p") +;; (with-current-buffer (get-file-buffer (howm-page-name howm-buffer-page)) +;; (apply #'save-buffer args))) + +;; (defun howm-save-buffer (&optional args) +;; (interactive "p") +;; (prog1 +;; (save-buffer args) +;; (howm-after-save))) + +;;; +;;; file page: name of file +;;; + +(defun howm-make-page:file (filename) + filename) + +(defun howm-page-name:file (page) + page) + +(defun howm-page-mtime:file (page) + (nth 5 (file-attributes (howm-page-name page)))) + +(defun howm-page-open:file (page) + (find-file (howm-page-name page)) + ;; widen is desired when corresponding file is already opened and + ;; its buffer is narrowed. + (widen)) + +(defun howm-page-insert:file (page) + (let ((b (get-file-buffer page))) + (if (and b + howm-view-watch-modified-buffer + (not howm-view-use-grep)) + (howm-insert-buffer-contents b) + (howm-insert-file-contents page)))) + +(defun howm-page-viewer:file (page) + (let* ((ls (lambda (dir) + (with-temp-buffer + (insert-directory dir "-l") + (buffer-substring-no-properties (point-min) (point-max))))) + (dir-viewer (and (file-directory-p page) + (howm-make-viewer:func #'find-file ls))) + (viewer (cdr (howm-cl-assoc-if (lambda (reg) (string-match reg page)) + howm-view-external-viewer-assoc)))) + (or viewer dir-viewer + (and howm-view-use-mailcap + (let* ((ext (if (string-match "\\.[^\\.]+$" page) + (match-string 0 page) + "")) + (type (howm-funcall-if-defined + (mailcap-extension-to-mime ext))) + (type-match (lambda (r) (string-match r type)))) + (cond ((null type) + nil) + ((howm-cl-member-if type-match howm-view-open-by-myself) + nil) + (t + (howm-funcall-if-defined + (mailcap-mime-info type))))))))) + +(defun howm-page-set-configuration:file (page) + (howm-set-configuration-for-file-name page)) + +;;; +;;; buffer page: buffer object +;;; + +(defun howm-make-page:buf (buf) + buf) + +(defun howm-page-name:buf (page) + (buffer-name page)) + +(defconst howm-dummy-mtime (encode-time 0 0 9 1 1 1970) + "Dummy mtime which has no meaning.") + +(defun howm-page-mtime:buf (page) + howm-dummy-mtime) + +(defun howm-page-open:buf (page) + (switch-to-buffer page)) + +(defun howm-page-insert:buf (page) + (when (not (howm-buffer-killed-p page)) + (howm-insert-buffer-contents page))) + +(defun howm-page-viewer:buf (page) + nil) +;; (howm-make-viewer:func #'switch-to-buffer)) + +(defun howm-page-set-configuration:buf (page) + (when (buffer-file-name page) + (howm-set-configuration-for-file-name (buffer-file-name page)))) + +;;; +;;; nil page: dummy page +;;; + +(defun howm-make-page:nil () + nil) + +(defun howm-page-name:nil (page) + "") + +(defun howm-page-mtime:nil (page) + howm-dummy-mtime) + +(defun howm-page-open:nil (page) + "Do nothing." + nil) + +(defun howm-page-insert:nil (page) + "Do nothing." + nil) + +(defun howm-page-viewer:nil (page) + nil) + +(defun howm-page-set-configuration:nil (page) + "Do nothing." + nil) + +;;; +;;; rot13file page: almost same as file except that it is rot13ed +;;; + +(defun howm-make-page:rot13file (filename) + (cons ':rot13file filename)) + +(defun howm-page-name:rot13file (page) + (howm-page-name (cdr page))) + +(defun howm-page-mtime:rot13file (page) + (howm-page-mtime:file (cdr page))) + +(defun howm-page-open:rot13file (page) + (yarot13-find-file (howm-page-name page)) + ) + +(defun howm-page-insert:rot13file (page) + (yarot13-insert-file-contents (howm-page-name page))) + +(defun howm-page-viewer:rot13file (page) + nil) + +(defun howm-page-set-configuration:rot13file (page) + (howm-set-configuration-for-file-name (howm-page-name page))) + +;;; Clean me. + +;; (defun howm-file-path (&optional time) +;; (expand-file-name (howm-file-name time) howm-directory)) + +(defun howm-create-file (&optional keep-cursor-p) + (let* ((pc (howm-folder-get-page-create howm-directory (howm-file-name))) + (page (car pc)) + (createp (cdr pc))) + (howm-page-open page) + (when (not keep-cursor-p) + (widen) + (goto-char (point-max))) + (when createp + (run-hooks 'howm-create-file-hook)) + createp)) + +;; (defun howm-create-file (&optional keep-cursor-p) +;; (let* ((file (howm-file-path)) +;; (dir (file-name-directory file)) +;; (createp (not (file-exists-p file)))) +;; (make-directory dir t) +;; (howm-page-open file) +;; (when createp +;; (run-hooks 'howm-create-file-hook)) +;; (when (not keep-cursor-p) +;; (widen) +;; (goto-char (point-max))) +;; createp)) + +;;; viewer + +;; Viewer is one of the following. +;; func ==> (func) is called after (find-file page). +;; (func) ==> (func page) is called. +;; (func . previewer) +;; ==> (func page) and (previewer page) are called for open and preview +;; (previewer must return a string). +;; "str" ==> (format "str" page) is externally executed on shell. + +(defun howm-viewer-type (viewer &rest r) + (cond ((stringp viewer) ':str) + ((functionp viewer) ':func0) + ((listp viewer) ':func))) + +(howm-defvar-risky howm-viewer-dispatchers (list #'howm-viewer-type)) + +(gfunc-with howm-viewer-dispatchers + (gfunc-def howm-viewer-call (viewer page)) + (gfunc-def howm-viewer-indicator (viewer page)) +) + +(defun howm-make-viewer:func (f &optional previewer) + (cons f previewer)) + +(when howm-view-use-mailcap + (require 'mailcap) + (howm-funcall-if-defined (mailcap-parse-mailcaps)) + (howm-funcall-if-defined (mailcap-parse-mimetypes))) + +(defun howm-viewer-call:str (viewer page) + (start-process "howm-view-external-viewer" nil + shell-file-name + shell-command-switch + (format viewer (howm-page-name page)))) +(defun howm-viewer-call:func0 (viewer page) + (howm-page-open page) + (funcall viewer)) +(defun howm-viewer-call:func (viewer page) + (funcall (car viewer) page)) + +(defvar howm-viewer-indicator-format "%%%%%% %s %%%%%%") +(defun howm-viewer-indicator-gen (fmt &rest args) + (format howm-viewer-indicator-format + (apply #'format (cons fmt args)))) +(defun howm-viewer-indicator:str (viewer page) + (howm-viewer-indicator-gen viewer (howm-page-name page))) +(defun howm-viewer-indicator:func0 (viewer page) + (howm-viewer-indicator-gen "%S %S" viewer page)) +(defun howm-viewer-indicator:func (viewer page) + (let ((func (car viewer)) + (previewer (cdr viewer))) + (if previewer + (funcall previewer page) + (howm-viewer-indicator-gen "(%S %S)" func page)))) + +(defadvice action-lock-find-file (around external-viewer (f u) activate) + (let ((viewer (howm-page-viewer f))) + (if viewer + (howm-viewer-call viewer (expand-file-name f)) + ad-do-it))) + +;; For backward compatibility. Don't use them any more. +(defalias 'howm-view-external-viewer #'howm-page-viewer) +(defalias 'howm-view-call-external-viewer #'howm-viewer-call) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; class Item + +;; Fix me: confusion between howm-item-page and howm-item-name + +;; * class Item: abstraction of hit position in file +;; * page +;; * place +;; * and conventional properties + +(defun howm-make-item (page &optional summary place offset home privilege) + (list page summary place offset home privilege)) +(defun howm-item-page (item) (nth 0 item)) ;; page can be nil. +(defun howm-item-summary (item) (howm-item-nth 1 item "")) +(defun howm-item-place (item) (howm-item-nth 2 item nil)) +(defun howm-item-offset (item) (howm-item-nth 3 item nil)) +(defun howm-item-home (item) (howm-item-nth 4 item nil)) +(defun howm-item-privilege (item) (howm-item-nth 5 item nil)) +(defun howm-item-nth (n item default) + (or (nth n item) default)) +(defun howm-item-set-page (item val) + (setf (nth 0 item) val)) +(defun howm-item-set-summary (item val) + (setf (nth 1 item) val)) +(defun howm-item-set-offset (item val) + (setf (nth 3 item) val)) +(defun howm-item-set-home (item val) + (setf (nth 4 item) val)) +(defun howm-item-set-privilege (item val) + (setf (nth 5 item) val)) + +(defun howm-item-name (item) + (format "%s" (howm-page-name (howm-item-page item)))) + +(defun howm-item-dup (item) (mapcar #'identity item)) + +;; For backward compatibility. Don't use them any more. +;; ;; item = (filename summary place offset home) +(defun howm-view-make-item (filename &rest r) + (apply #'howm-make-item (cons (howm-make-page:file filename) r))) +(defalias 'howm-view-item-filename #'howm-item-name) +(defalias 'howm-view-item-summary #'howm-item-summary) +(defalias 'howm-view-item-place #'howm-item-place) +(defalias 'howm-view-item-offset #'howm-item-offset) +(defalias 'howm-view-item-home #'howm-item-home) +(defalias 'howm-view-item-privilege #'howm-item-privilege) +(defalias 'howm-view-item-set-summary #'howm-item-set-summary) +(defalias 'howm-view-item-set-offset #'howm-item-set-offset) +(defalias 'howm-view-item-set-home #'howm-item-set-home) +(defalias 'howm-view-item-set-privilege #'howm-item-set-privilege) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; search path + +;; historical & awkward mechanism + +(howm-defvar-risky howm-search-path nil) +(defvar howm-search-other-dir nil) +(defvar *howm-independent-directories* nil) ;; for internal use + +(defun howm-independent-search-path () + (let ((c default-directory)) + (and c + (car (howm-cl-member-if (lambda (dir) (howm-subdirectory-p dir c)) + *howm-independent-directories*))))) + +(defun howm-search-path (&optional ignore-independent-search-path) + (let ((d (howm-independent-search-path))) + (cond ((and d (not ignore-independent-search-path)) (list d)) + (howm-search-other-dir (howm-search-path-multi)) + (t (howm-search-path-single))))) +(defun howm-search-path-single () + (list howm-directory)) +(defun howm-search-path-multi () + (cons howm-directory howm-search-path)) + +(defun howm-search-path-folder (&optional ignore-independent-search-path) + (howm-make-folder:nest (howm-search-path ignore-independent-search-path))) + +(defun howm-toggle-search-other-dir (&optional arg) + "Change whether `howm-search-path' is searched or not. +With arg, search `howm-search-path' iff arg is positive." + (interactive "P") + (setq howm-search-other-dir + (if arg + (> (prefix-numeric-value arg) 0) + (not howm-search-other-dir))) + (message "howm search-path = %s" (howm-search-path))) + +(defun howm-open-directory-independently (dir) + (interactive "DDirectory: ") + (add-to-list '*howm-independent-directories* + (expand-file-name dir)) + (let ((default-directory dir)) + (howm-normalize-show "" (howm-folder-items dir t)) + (howm-keyword-add-items (howm-view-item-list)))) + +(defvar howm-keyword-buffer-name-format " *howm-keys:%s*") +(defun howm-keyword-buffer () + (let* ((dir (howm-independent-search-path)) + (buffer-name (format howm-keyword-buffer-name-format + (if dir (expand-file-name dir) "")))) + (if dir + (get-buffer-create buffer-name) + (howm-get-buffer-for-file (howm-keyword-file) buffer-name)))) + +;;; howm-backend.el ends here diff --git a/site-lisp/howm/howm-cl.el b/site-lisp/howm/howm-cl.el new file mode 100644 index 0000000..0f2db6e --- /dev/null +++ b/site-lisp/howm/howm-cl.el @@ -0,0 +1,56 @@ +;;; howm-cl.el --- Wiki-like note-taking tool +;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm-cl.el,v 1.14 2011-12-31 15:07:29 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;;-------------------------------------------------------------------- + +;; I know requiring cl is evil. +;; Each defalias should be replaced to defun without cl. + +;; (personal note [2005-06-09]) +;; $ grep howm-cl *.el | grep -v '^howm' | grep -v '^bcomp' +;; action-lock.el:(require 'howm-cl) +;; action-lock.el: (setq action-lock-rules (howm-cl-remove-duplicates rules)) +;; riffle.el:(require 'howm-cl) +;; riffle.el: (stops (howm-cl-remove-duplicates +;; riffle.el: (pos (howm-cl-position c stops)) + +(require 'cl) + +(defalias 'howm-cl-assoc-if 'assoc-if) +(defalias 'howm-cl-find-if 'find-if) +(defalias 'howm-cl-find-if-not 'find-if-not) +(defalias 'howm-cl-gensym 'gensym) +(defalias 'howm-cl-mapcan 'mapcan) +(defalias 'howm-cl-mapcar* 'mapcar*) +(defalias 'howm-cl-member* 'member*) +(defalias 'howm-cl-member-if 'member-if) +(defalias 'howm-cl-position 'position) +(defalias 'howm-cl-position-if 'position-if) +(defalias 'howm-cl-remove-duplicates 'remove-duplicates) +(defalias 'howm-cl-remove-if 'remove-if) +(defalias 'howm-cl-remove-if-not 'remove-if-not) +(defalias 'howm-cl-subseq 'subseq) + +(defun howm-cl-remove-duplicates* (&rest args) + ":from-end version of `remove-duplicates'" + (apply #'howm-cl-remove-duplicates `(,@args :from-end t))) + +(provide 'howm-cl) + +;;; howm-cl.el ends here diff --git a/site-lisp/howm/howm-common.el b/site-lisp/howm/howm-common.el new file mode 100644 index 0000000..78ff342 --- /dev/null +++ b/site-lisp/howm/howm-common.el @@ -0,0 +1,635 @@ +;;; howm-common.el --- Wiki-like note-taking tool +;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm-common.el,v 1.90 2012-12-29 08:57:18 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;-------------------------------------------------------------------- + +(require 'howm-cl) +(require 'howm-vars) + +(defun howm-sort (evaluator comparer obj-list) + (let* ((orig (mapcar (lambda (obj) (cons (funcall evaluator obj) obj)) + obj-list)) + (sorted (sort orig (lambda (x y) + (funcall comparer (car x) (car y)))))) + (mapcar #'cdr sorted))) + +(defun howm-subdirectory-p (dir target &optional strict) + "For the directory DIR, check whether TARGET is under it. +When TARGET and DIR are same, (not STRICT) is returned." + (and (stringp dir) + (progn + (setq target (howm-normalize-file-name target)) + (setq dir (howm-normalize-file-name dir)) + (if (string= target dir) + (not strict) + (and (string-match (regexp-quote dir) target) + (= 0 (match-beginning 0))))))) + +(defvar howm-abbreviate-file-name t) +(defun howm-abbreviate-file-name (f) + (if (howm-abbreviate-file-name-p) + (abbreviate-file-name f) + f)) +;; for compatibility (incomplete) +(howm-dont-warn-free-variable howm-template-file-abbrev) +(howm-dont-warn-free-variable howm-view-header-abbrev) +(defun howm-abbreviate-file-name-p () + (cond ((boundp 'howm-template-file-abbrev) howm-template-file-abbrev) + ((boundp 'howm-view-header-abbrev) howm-view-header-abbrev) + (t howm-abbreviate-file-name))) +;; (defun howm-abbreviate-file-name-p () howm-abbreviate-file-name) + +(defun howm-expand-file-names (file-list) + (mapcar (lambda (f) (directory-file-name (expand-file-name f))) + file-list)) + +(defun howm-fontify (&optional i-dont-understand-this) + (cheat-font-lock-fontify i-dont-understand-this)) + +;;; for XEmacs fallback +;; (if (not (fboundp 'font-lock-fontify-block)) +;; (defalias 'font-lock-fontify-block 'font-lock-fontify-buffer)) +;;; If you use APEL, you can replace a below block with (require 'poe). +(if (not (fboundp 'line-beginning-position)) + (defalias 'line-beginning-position 'point-at-bol)) +(if (not (fboundp 'line-end-position)) + (defalias 'line-end-position 'point-at-eol)) +;;; Imported from APEL 10.6 +(if (not (fboundp 'match-string-no-properties)) + ;; Emacs 20.3 and later: (match-string-no-properties NUM &optional STRING) + (defun match-string-no-properties (num &optional string) + "Return string of text matched by last search, without text properties. +NUM specifies which parenthesized expression in the last regexp. + Value is nil if NUMth pair didn't match, or there were less than NUM pairs. +Zero means the entire text matched by the whole regexp or whole string. +STRING should be given if the last search was by `string-match' on STRING." + (if (match-beginning num) + (if string + (let ((result + (substring string (match-beginning num) (match-end num)))) + (set-text-properties 0 (length result) nil result) + result) + (buffer-substring-no-properties (match-beginning num) + (match-end num)))))) + +(defmacro howm-message-time (name &rest body) + (declare (indent 1)) + `(let ((howm-message-time-0 (current-time))) + (prog1 + (progn + ,@body) + (when howm-message-time + (message "%s (%s: %.2f sec)" + (or (current-message) "") + ,name + (howm-time-difference-second (current-time) + howm-message-time-0)))))) +;; (defun howm-message-time-from (ti0) +;; (when howm-message-time +;; (let ((ti1 (current-time))) +;; (message "took %.2f sec." +;; (howm-time-difference-second ti1 ti0))))) +(defun howm-time-difference-second (ti1 ti0) + (let ((h (- (car ti1) (car ti0))) + (l (- (second ti1) (second ti0))) + (m (- (third ti1) (third ti0))) + ) + (+ (* h 65536) l + (* m 1e-6) + ))) + +(defun howm-xor (a b) + (if a (not b) b)) +(defun howm-buffer-empty-p (&optional buf) + ;; emacs20 doesn't have (buffer-size buf) + (with-current-buffer (or buf (current-buffer)) + (= (buffer-size) 0))) +(defun howm-point-beginning-of-line () + (save-excursion + (beginning-of-line) + (point))) +(defun howm-point-end-of-line () + (save-excursion + (end-of-line) + (point))) + +(defun howm-inhibit-warning-in-compilation (&rest dummy) + (error "This is dummy function to inhibit warning in compilation.")) + +;; (defvar howm-reminder-quick-check-key ";") + +(defun howm-get-value (z) + (if (functionp z) + (funcall z) + z)) + +;; (howm-map-with-index #'cons '(a b c)) ==> ((a . 0) (b . 1) (c . 2)) +(defun howm-map-with-index (f seq) + "Map with index. For example, +(howm-map-with-index #'cons '(a b c)) returns ((a . 0) (b . 1) (c . 2))." + (let ((howm-map-with-index-count -1)) + (mapcar (lambda (x) + (setq howm-map-with-index-count (1+ howm-map-with-index-count)) + (apply f (list x howm-map-with-index-count))) + seq))) + +(defun howm-capital-p (str) + "Return nil iff STR has no capital letter." + (let ((case-fold-search nil)) + (string-match "[A-Z]" str))) + +(defun howm-single-element-p (a) + (and a (null (cdr a)))) + +(defun howm-read-string (prompt &optional immediate-chars continued-chars + pass-through pass-ret-through) + "Read a string from minibuffer with some extensions to `read-string'. +(1) When the first input char is in IMMEDIATE-CHARS string, +this function returns the char as one letter string +without waiting for rest input and RET key. +(2) Otherwise, when the char is in CONTINUED-CHARS, +this function is equivalent to read-string. +(3) When the char is not in either IMMEDIATE-CHARS or CONTINUED-CHARS, +the behavior depends on PASS-THROUGH. +If PASS-THROUGH is nil, error is raised. +If PASS-THROUGH is non-nil, the input event is unread and nil is returned. +(4) Note that RET key at the first char is the special case. +If PASS-RET-THROUGH is nil, empty string is returned. +If PASS-RET-THROUGH is non-nil, RET is unread and nil is returned. +" + (if (null immediate-chars) + (read-string prompt) + (save-window-excursion + (message "%s" prompt) + (select-window (minibuffer-window)) + (let* ((ev (howm-read-event)) + (ch (howm-event-to-character ev))) + (cond ((howm-characterp ch) + (howm-read-string-sub ev ch + prompt immediate-chars continued-chars + pass-through pass-ret-through)) + (t + (howm-read-string-fail ev pass-through pass-ret-through))))))) + +(defun howm-read-string-sub (event char + prompt immediate-chars continued-chars + pass-through pass-ret-through) + (let* ((ichars (string-to-list (or immediate-chars ""))) + (cchars (string-to-list (or continued-chars ""))) + (first-char char) + (first-str (char-to-string first-char))) + (cond ((member first-char ichars) + first-str) + ((member first-char cchars) + (read-string prompt (cons first-str (1+ (length first-str))))) + (t + (howm-read-string-fail event pass-through pass-ret-through))))) + +(defun howm-read-string-fail (event pass-through pass-ret-through) + (cond ((and (howm-ret-key-event-p event) (not pass-ret-through)) + "") + (pass-through + (progn + (howm-unread-event event) + nil)) + (t + (error "Invalid input.")))) + +(defun howm-unread-event (event) + (setq unread-command-events + (cons event unread-command-events))) + +(defun howm-first-n (seq n) + "Return the subsequence of SEQ from start to N-th item. +(howm-first-n '(a b c d e) 3) ==> (a b c) +(howm-first-n '(a b c d e) 10) ==> (a b c d e) +" + ;; GNU emacs: (subseq '(a b c d e) 0 7) ==> (a b c d e nil nil) + ;; xemacs: (subseq '(a b c d e) 0 7) ==> Args out of range + (if (<= (length seq) n) + seq + (howm-cl-subseq seq 0 n))) + +;; check +(let ((seq '(a b c d e)) + (qa '((0 . nil) + (4 . (a b c d)) + (5 . (a b c d e)) + (7 . (a b c d e))))) + (mapc (lambda (z) + (let ((ans (howm-first-n seq (car z)))) + (when (not (equal ans (cdr z))) + (error "howm-first-n is wrong: %s for %s" ans z)))) + qa)) + +(defun howm-replace-region (beg end val) + (delete-region beg end) + ;; `format' in xemacs doesn't keep text properties. + (insert (if (stringp val) + val + (format "%s" val)))) + +(defmacro howm-edit-read-only-buffer (&rest body) + (declare (indent 0)) + `(progn + (buffer-disable-undo) + (setq buffer-read-only nil) + ,@body + (set-buffer-modified-p nil) + (setq buffer-read-only t))) + +(defmacro howm-rewrite-read-only-buffer (&rest body) + (declare (indent 0)) + `(howm-edit-read-only-buffer + (erase-buffer) + ,@body)) + +;; (put 'howm-rewrite-read-only-buffer 'lisp-indent-hook 0) +;; (defmacro howm-rewrite-read-only-buffer (&rest body) +;; `(progn +;; (setq buffer-read-only nil) +;; (erase-buffer) +;; ,@body +;; (set-buffer-modified-p nil) +;; (setq buffer-read-only t))) + +(defun howm-get-buffer-for-file (file &optional buffer-name) + "Get buffer for FILE, and rename buffer if BUFFER-NAME is given." + ;; This may cause "File XXX no longer exists!" message if the file + ;; is deleted and the corresponding buffer still exists. + (let ((buf (find-file-noselect file))) + (when buffer-name + (with-current-buffer buf + (rename-buffer buffer-name))) + buf)) + +(defvar howm-log-buffer-name-format " *howm-log:%s*") +(defun howm-write-log (message fmt file &optional limit remove-fmt) + "Write MESSAGE with format FMT to the top of FILE. +FORMAT must have two %s; the formar is time and the latter is message. +When LIMIT is non-nil, only that number of recent messages are recorded. +When REMOVE-FMT is non-nil, it is used to generate regular expression +to remove matched lines. REMOVE-FMT must have one %s." + (save-excursion + (let ((buffer-name (format howm-log-buffer-name-format + (file-name-nondirectory file)))) + (with-current-buffer (howm-get-buffer-for-file file buffer-name) + (goto-char (point-min)) + (when remove-fmt + (save-excursion + (flush-lines (format remove-fmt (regexp-quote message))))) + (insert (format fmt + (format-time-string howm-dtime-format (current-time)) + message) + "\n") + (when limit + ;; Since I don't understand `selective-display' in goto-line, + ;; I avoid it. + (goto-char (point-min)) + (when (= (forward-line limit) 0) ;; buffer lines > LIMIT + (delete-region (point) (point-max)))) + (howm-basic-save-buffer))))) + +(defun howm-get-symbol (soft &rest args) + "Return the canonical symbol for a specified name. +If SOFT is non-nil, return nil when the corresponding symbol does not exist. +Name of returned symbol is concatenation of ARGS. +Both strings and symbols are acceptable in ARGS." + (funcall (if soft #'intern-soft #'intern) + (mapconcat (lambda (s) + (cond ((sequencep s) s) + ((symbolp s) (symbol-name s)) + (t (error "Not supported: %S" s)))) + args + ""))) + +;; snap://Info-mode/elisp#Killing Buffers +(defun howm-buffer-killed-p (buffer) + "Return t if BUFFER is killed." + (not (buffer-name buffer))) + +(defun howm-classify (classifier lis &optional reverse) + "Classify elements in given list. +CLASSIFIER is criterion of classification for list LIS. +If REVERSE is non-nil, order of elements are reversed (faster). +For example, + (howm-classify (lambda (s) (substring s 0 1)) '(\"aaa\" \"abc\" \"xyz\")) +returns ((\"a\" \"aaa\" \"abc\") (\"x\" \"xyz\"))." + (let ((ans nil)) + (mapc (lambda (x) + (let* ((label (funcall classifier x)) + (pair (assoc label ans))) + (if (null pair) + (setq ans (cons (cons label (list x)) ans)) + (setcdr pair (cons x (cdr pair)))))) + lis) + (if reverse + ans + (reverse (mapcar (lambda (pair) (cons (car pair) (reverse (cdr pair)))) + ans))))) +;; (howm-classify (lambda (s) (substring s 0 1)) '("aaa" "abc" "xyz")) + +(defun howm-message-nolog (str &rest args) + (let ((message-log-max nil)) + (apply #'message `(,str ,@args)))) + +(defun howm-decode-time (&optional specified-time) + "Decode SPECIFIED-TIME and remove DOW, DST, ZONE. +When we do something like (encode-time (decode-time)), we use this function +instead of the original `decode-time', so that we can force +current timezone rule uniformly to avoid inconsistency." + (butlast (decode-time specified-time) 3)) + +(defmacro howm-with-need (&rest body) + "Execute BODY where (need xxx) exits from this form if xxx is nil." + (declare (indent 0)) + (let ((g (howm-cl-gensym))) + `(catch ',g + (labels ((need (x) (or x (throw ',g nil)))) + ,@body)))) + +(defun howm-goto-line (n) + ;; see the document of `goto-line' + (goto-char (point-min)) (forward-line (1- n))) + +;; view-in-background + +(defvar *howm-view-in-background* nil + "for internal use. +Don't set this variable directly. +Use `howm-view-in-background' and `howm-view-in-background-p' instead.") + +(defmacro howm-view-in-background (&rest body) + "Obsolete. Do not use this any more." + (declare (indent 0)) + `(let ((*howm-view-in-background* t)) + ,@body)) + +(defun howm-view-in-background-p () + *howm-view-in-background*) + +;;; exclusion + +;; Fix me on inefficiency. +;; +;; [2005-02-18] I can't remember why I checked relative path in old versions. +;; [2005-04-24] Now I remember the reason. +;; Some people like ~/.howm/ rather than ~/howm/ as their howm-directory. +;; It must be included even if it matches to howm-excluded-file-regexp. +;; +;; Bug: (howm-exclude-p "~/howm/CVS") != (howm-exclude-p "~/howm/CVS/") +(defun howm-exclude-p (filename) + (not (howm-cl-find-if-not + (lambda (dir) (howm-folder-match-under-p dir + howm-excluded-file-regexp + filename)) + (howm-search-path)))) + +;;; history of search + +(defvar howm-history-format "> %s | %s") +(defvar howm-history-remove-format "| %s$") + +(defun howm-write-history (message) + (when (and howm-history-file + (or (null howm-history-limit) (> howm-history-limit 0))) + (howm-write-log message howm-history-format howm-history-file + howm-history-limit + (and howm-history-unique howm-history-remove-format)))) + +(defun howm-history () + (interactive) + (unless (file-exists-p howm-history-file) + (error "No history.")) + ;; disable expansion of %schedule etc. + (let ((howm-menu-display-rules nil)) ;; dirty + (howm-menu-open howm-history-file))) + +;; (defvar howm-history-exclude +;; (let ((strings '("[0-9][0-9][0-9][0-9]" "^[*=] [^ ]"))) +;; `("| %.*%$" +;; ,(mapconcat 'regexp-quote strings "\\|")))) +;; (defun howm-history () +;; (interactive) +;; (howm-menu-open howm-history-file) +;; (howm-edit-read-only-buffer +;; (mapc #'flush-lines +;; howm-history-exclude))) + +;;; call process + +(defvar howm-call-process-last-command nil + "List of arguments for last `howm-call-process'. +This variable exists only for debug. You can reproduce the last call +with the below code. + (apply #'howm-call-process howm-call-process-last-command)") + +(defmacro howm-with-coding-system (coding-system &rest body) + "With CODING-SYSTEM, execute BODY. +examples: + (howm-with-coding-system 'euc-jp-unix ...) ;; for both read and write + (howm-with-coding-system '(utf-8-unix . sjis-unix) ...) ;; (read . write) + (howm-with-coding-system nil ...) ;; howm-process-coding-system is used." + (declare (indent 1)) + (let ((g (howm-cl-gensym)) + (cs (or coding-system 'howm-process-coding-system))) + `(let* ((,g ,cs) + (coding-system-for-read (or (car-safe ,g) ,g)) + (coding-system-for-write (or (cdr-safe ,g) ,g))) + ,@body))) + +(defun howm-call-process (command args + &optional expected-return-value stdin-string) + (setq howm-call-process-last-command (list command args + expected-return-value + stdin-string)) + (with-temp-buffer + (howm-with-coding-system nil + (let ((r (howm-call-process-here command args stdin-string))) + (when (and expected-return-value + (not (= expected-return-value r))) + (error "Process returns %s instead of expected %s." + r expected-return-value)) + (howm-buffer-lines))))) + +(defun howm-call-process-here (command args &optional stdin-string) + (let* ((beg (point)) + (end (progn + (insert (or stdin-string "")) + (point))) + (a `(,beg ,end ,command t (t nil) nil ,@args))) + (howm-with-coding-system nil + (apply #'call-process-region a)))) + +(defun howm-buffer-lines (&optional buf) + (save-excursion + (when buf + (set-buffer buf)) + (split-string (buffer-substring (point-min) (point-max)) "\n"))) + +(defun howm-call-process* (command common-args rest-args &rest options) + ;; (howm-call-process* "grep" '("pattern") '("001" ... "999")) + ;; is expanded to concatenation of + ;; (howm-call-process "grep" '("pattern" "001" ... "099")) + ;; (howm-call-process "grep" '("pattern" "101" ... "199")) + ;; ..., depending on howm-command-length-limit. + (labels ((div (a limit measure) + ;; (div '(3 1 4 1 5 9 2 6 5 3 5 8 9 7 9 3 2 3 8) 20 #'identity) + ;; ==> ((3 1 4 1 5) (9 2 6) (5 3 5) (8 9) (7 9 3) (2 3 8)) + ;; [create new group when sum >= 20] + (let ((sum limit) ;; measure >= 0 is assumed. + (ans nil)) + (mapc (lambda (x) + (let* ((w (funcall measure x)) + (new-sum (+ sum w))) + (if (< new-sum limit) + (setq sum new-sum + ans (cons (cons x (car ans)) (cdr ans))) + (setq sum w + ans (cons (list x) ans))))) + a) + (reverse (mapcar #'reverse ans))))) + ;; XEmacs 21.4 lacks "string-bytes". + (let* ((len (symbol-function + (howm-cl-find-if #'fboundp '(string-bytes length)))) + (limit (apply #'- howm-command-length-limit + (mapcar len (cons command common-args)))) + (as (div rest-args limit len))) + (howm-cl-mapcan (lambda (args) + (apply #'howm-call-process + command (append common-args args) options)) + as)))) + +;;; schedule-interval & reminder-setting (clean me) + +(defvar howm-reminder-schedule-interval nil + "For internal use. Do not setq this variable. +Use `howm-with-schedule-interval' instead.") +(defun howm-reminder-schedule-interval-from () + (car howm-reminder-schedule-interval)) +(defun howm-reminder-schedule-interval-to () + (cdr howm-reminder-schedule-interval)) +(defmacro howm-with-schedule-interval (interval &rest body) + "Set the interval of visible schedule items in reminder list on menu. +INTERVAL is a form like (-1 2), which means 'from yesterday to the day +after tomorrow'. BODY is evaluated under this setting; +`howm-reminder-schedule-interval-from' returns -1 and +`howm-reminder-schedule-interval-to' returns 2." + (declare (indent 1)) + `(let ((howm-reminder-schedule-interval ,(cons 'cons interval))) + ,@body)) + +(defmacro howm-with-reminder-setting (&rest body) + (declare (indent 0)) + `(howm-with-schedule-interval + (howm-menu-schedule-days-before howm-menu-schedule-days) + (let ((howm-todo-menu-types howm-reminder-menu-types)) ;; dirty! + ,@body))) + +;;; xemacs + +;; http://www.bookshelf.jp/cgi-bin/goto.cgi?file=meadow&node=switch%20config +;; http://pc2.2ch.net/test/read.cgi/software/1056601345/510 +(eval-and-compile + (defun howm-xemacsp () + (featurep 'xemacs))) + +(defmacro howm-defun-xemacs (func args emacs-f xemacs-f) + (declare (indent 'defun)) + `(defun ,func ,args + ,(if (howm-xemacsp) + xemacs-f + emacs-f))) + +(howm-defun-xemacs howm-deactivate-mark () + (deactivate-mark) + (zmacs-deactivate-region)) + +(howm-defun-xemacs howm-read-event () + (read-event) + ;; We have to skip # when howm-action-lock-date is + ;; called (RET is hit on date format like [2005-10-15]) in menu buffer. + ;; + ;; Though (make-event 'key-press `(key ,(read-char))) looks to be a simpler + ;; solution, it causes error when RET RET is hit in the above situation. + ;; I don't have enough time to examine it now. + (let ((ev (next-event))) + (if (key-press-event-p ev) + ev + (howm-read-event)))) + +;; Though this function is used only once, I dare to define it +;; with howm-defun-xemacs macro in order to avoid warning +;; in byte-compilation on GNU emacs. I don't have enough energy now. +(howm-defun-xemacs howm-ret-key-event () + (event-convert-list '(return)) + (make-event 'key-press '(key return))) + +(defvar howm-ret-key-event (howm-ret-key-event)) + +(defun howm-ret-key-event-p (event) + (or (equal event 13) (equal event howm-ret-key-event))) + +(howm-defun-xemacs howm-event-to-character (event) + (and (howm-characterp event) event) + (event-to-character event)) + +(howm-defun-xemacs howm-characterp (x) + (numberp x) + (characterp x)) + +(defvar howm-infinity + (if (howm-xemacsp) + 1.0e+100 ;; xemacs info on my machine is broken :( + 1.0e+INF)) + +;;; cl + +;; (defmacro howm-define-maybe (fname fargs &rest fbody) +;; (when (not (fboundp fname)) +;; `(defun ,fname ,fargs +;; ,@fbody))) + +;; (howm-define-maybe caddr (x) +;; (car (cdr (cdr x)))) + +;; (howm-define-maybe second (x) +;; (cadr x)) + +;; (howm-define-maybe third (x) +;; (caddr x)) + +;;; regexp + +;; (defun howm-regexp-opt (strings &optional paren) +;; "Imitation of `regexp-opt' without optimization. +;; This is used for large set of strings when `regexp-opt' causes an error +;; \"Variable binding depth exceeds max-specpdl-size\"." +;; (let* ((open (if paren "\\(" "")) +;; (close (if paren "\\)" "")) +;; (re (concat open (mapconcat 'regexp-quote strings "\\|") close))) +;; (if (eq paren 'words) +;; (concat "\\<" re "\\>") +;; re))) + +;;; + +(provide 'howm-common) + +;;; howm-common.el ends here diff --git a/site-lisp/howm/howm-date.el b/site-lisp/howm/howm-date.el new file mode 100644 index 0000000..986e803 --- /dev/null +++ b/site-lisp/howm/howm-date.el @@ -0,0 +1,275 @@ +;;; howm-date.el --- Wiki-like note-taking tool +;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm-date.el,v 1.35 2011-12-31 15:07:29 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;-------------------------------------------------------------------- + +(provide 'howm-date) +(require 'howm) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; insert & action-lock + +(defvar howm-insert-date-pass-through nil) + +(defun howm-insert-date () + (interactive) + (let ((date (format-time-string howm-date-format))) + (insert (format howm-insert-date-format date)) + (howm-action-lock-date date t howm-insert-date-future))) + +(defun howm-insert-dtime () + (interactive) + (insert (format-time-string howm-dtime-format))) + +;; Sorry for ugly behavior around "new" to keep backward compatibility. +(defun howm-action-lock-date (date &optional new future-p) + (let* ((pass-through (and new howm-insert-date-pass-through)) + (prompt (howm-action-lock-date-prompt date new pass-through)) + (immediate-chars (if pass-through "" ".")) + (c (howm-read-string prompt immediate-chars "+-~0123456789" + pass-through pass-through))) + (cond + ((null c) nil) ;; pass through + ((string= c "") + (if new + t + (howm-action-lock-date-search date))) + ((string-match "^[-+][0-9]+$" c) + (howm-action-lock-date-shift (string-to-number c) date)) + ((string-match "^[0-9]+$" c) + (howm-action-lock-date-set c date future-p)) + ((string-match "^~\\([0-9]+\\)$" c) + (howm-action-lock-date-repeat (match-string-no-properties 1 c) date)) + ((string-match "^[.]$" c) + (howm-datestr-replace (howm-time-to-datestr))) + ((and (string-match "^[-+~]$" c) pass-through) + (insert c)) + (t (error (format "Can't understand %s." c)))))) + +(defun howm-action-lock-date-prompt (date new pass-through) + (let* ((dow (howm-datestr-day-of-week date)) + (common-help "+num(shift), yymmdd(set), ~yymmdd(repeat)") + (today-help ", .(today)") + (help (cond ((and new pass-through) + common-help) + ((and new (not pass-through)) + (concat "RET(ok), " common-help today-help)) + ((not new) + (concat "RET(list), " common-help today-help)) + (t + (error "Can't happen."))))) + (format "[%s] %s: " dow help))) + +(defun howm-action-lock-date-search (date) + (howm-set-command 'howm-action-lock-date-search) + (prog1 + (howm-search date t) + (howm-action-lock-forward-escape))) + +(defun howm-search-today () + (interactive) + (howm-search-past 0)) + +(defun howm-search-past (&optional days-before) + (interactive "P") + (let* ((n (or days-before 0)) + (today (format-time-string howm-date-format)) + (target (howm-datestr-shift today 0 0 (- n)))) + (howm-action-lock-date-search target))) + +(defun howm-action-lock-date-shift (n date) + (howm-datestr-replace (howm-datestr-shift date 0 0 n))) + +(defun howm-action-lock-date-set (val date &optional future-p) + (howm-datestr-replace (howm-datestr-expand val date future-p))) + +(defvar howm-action-lock-date-repeat-max 200) +(defun howm-action-lock-date-repeat (until date) + (let ((every (read-from-minibuffer "Every? [RET(all), num(days), w(week), m(month), y(year)] "))) + (let ((max-d (howm-datestr-expand until date t)) + (offset-y (if (string= every "y") 1 0)) + (offset-m (if (string= every "m") 1 0)) + (offset-d (or (cdr (assoc every '(("y" . 0) ("m" . 0) ("w" . 7)))) + (max (string-to-number every) 1)))) + (let ((d date) + (i 0) + (check t)) + (catch 'too-many + (while (progn + (setq d (howm-datestr-shift d offset-y offset-m offset-d)) + (howm-datestr<= d max-d)) + (when (and check (>= i howm-action-lock-date-repeat-max)) + (if (y-or-n-p (format "More than %d lines. Continue? " i)) + (setq check nil) + (throw 'too-many nil))) + (howm-duplicate-line) + (howm-datestr-replace d) + (setq i (+ i 1)))))))) + +(defun howm-make-datestr (y m d) + (let ((ti (encode-time 0 0 0 d m y))) + (format-time-string howm-date-format ti))) + +(defun howm-datestr-parse (date) + (string-match howm-date-regexp date) + (mapcar (lambda (pos) + (string-to-number (match-string-no-properties pos date))) + (list howm-date-regexp-year-pos + howm-date-regexp-month-pos + howm-date-regexp-day-pos))) + +(defun howm-datestr-to-time (date) + (let* ((ymd (howm-datestr-parse date)) + (y (car ymd)) + (m (second ymd)) + (d (third ymd))) + (encode-time 0 0 0 d m y))) + +(defun howm-time-to-datestr (&optional time) + (let ((x (decode-time time))) + (howm-make-datestr (nth 5 x) (nth 4 x) (nth 3 x)))) + +(defun howm-datestr-day-of-week (date) + (format-time-string "%a" (howm-datestr-to-time date))) + +(defun howm-datestr-expand (date base &optional future-p) + (if future-p + (howm-datestr-expand-future date base) + (howm-datestr-expand-general date base future-p))) + +(defun howm-datestr-expand-future (date base) + (let ((raw (howm-datestr-expand-general date base nil)) + (future (howm-datestr-expand-general date base t))) + (when (not (string= raw future)) + (message "Future date")) + future)) + +(defun howm-datestr-expand-general (date base &optional future-p) + (let* ((base-ymd (howm-datestr-parse base)) + (nval (format "%8s" date)) + (given-ymd-str (mapcar (lambda (r) + (substring nval (car r) (second r))) + '((0 4) (4 6) (6 8)))) + (ys (car given-ymd-str)) + (ms (second given-ymd-str)) + (ds (third given-ymd-str))) + (when (string-match "^ +0+$" ys) + (setq ys "2000")) + (let* ((given-ymd (mapcar #'string-to-number (list ys ms ds))) + (carry nil) ;; to force future date + (dmy (howm-cl-mapcar* (lambda (ox nx) + (when future-p + (when (and carry (= nx 0)) + (setq ox (+ ox 1))) + (setq carry + (cond ((= nx 0) nil) + ((= nx ox) carry) + ((< nx ox) t) + (t nil)))) + (if (= nx 0) ox nx)) + (reverse base-ymd) (reverse given-ymd))) + (d (car dmy)) + (m (second dmy)) + (y (third dmy))) + (howm-make-datestr (if (<= y 99) (+ y 2000) y) m d)))) + +(defun howm-datestr-shift (date y m d) + (let* ((ymd (howm-datestr-parse date)) + (oy (car ymd)) + (om (second ymd)) + (od (third ymd))) + (howm-make-datestr (+ oy y) (+ om m) (+ od d)))) + +(defun howm-datestr<= (date1 date2) + (or (string< date1 date2) + (string= date1 date2))) + +(defun howm-datestr-replace (date) + (let ((p (point))) + (while (not (looking-at howm-date-regexp)) + (backward-char)) + (replace-match date t t) + (goto-char p))) + +(defun howm-duplicate-line () + (let ((c (current-column)) + (s (buffer-substring (line-beginning-position) (line-end-position)))) + (end-of-line) + (insert "\n" s) + (move-to-column c))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; search for next/previous date + +(defvar howm-date-current nil) +(make-variable-buffer-local 'howm-date-current) + +(defadvice howm-action-lock-date-search (around remember-date (date) activate) + ad-do-it + (setq howm-date-current date)) + +(defvar howm-date-forward-ymd-msg "Searching %s...") +(defvar howm-date-forward-ymd-limit 35) +(defun howm-date-forward-ymd (y m d) + (when (not howm-date-current) + (error "Not in date search.")) + (let* ((new-date (howm-datestr-shift howm-date-current y m d)) + (b (current-buffer)) + (step (if (> (+ y m d) 0) +1 -1)) + (c 0)) + (when (catch :found + (while (progn + (when (howm-action-lock-date-search new-date) + (throw :found t)) + (< c howm-date-forward-ymd-limit)) + (setq new-date (howm-datestr-shift new-date 0 0 step)) + (setq c (1+ c)) + (when howm-date-forward-ymd-msg + (format howm-date-forward-ymd-msg new-date))) + (error "Not found within %d days." howm-date-forward-ymd-limit)) + (when (not (eq (current-buffer) b)) + (with-current-buffer b + (howm-view-kill-buffer))) + (howm-view-summary-check t)))) + +(defmacro howm-date-defun-f/b (func y m d) + `(defun ,func (&optional k) + (interactive "P") + (let ((n (or k 1))) + (howm-date-forward-ymd ,y ,m ,d)))) + +(howm-date-defun-f/b howm-date-forward 0 0 n) +(howm-date-defun-f/b howm-date-forward-month 0 n 0) +(howm-date-defun-f/b howm-date-forward-year n 0 0) +(howm-date-defun-f/b howm-date-backward 0 0 (- n)) +(howm-date-defun-f/b howm-date-backward-month 0 (- n) 0) +(howm-date-defun-f/b howm-date-backward-year (- n) 0 0) + +(let ((m howm-view-summary-mode-map)) + (define-key m "+" 'howm-date-forward) + (define-key m "-" 'howm-date-backward) + (define-key m ")" 'howm-date-forward) + (define-key m "(" 'howm-date-backward) + (define-key m "}" 'howm-date-forward-month) + (define-key m "{" 'howm-date-backward-month) + (define-key m "]" 'howm-date-forward-year) + (define-key m "[" 'howm-date-backward-year) + ) + +;;; howm-date.el ends here diff --git a/site-lisp/howm/howm-lang-en.el b/site-lisp/howm/howm-lang-en.el new file mode 100644 index 0000000..77f2cb6 --- /dev/null +++ b/site-lisp/howm/howm-lang-en.el @@ -0,0 +1,60 @@ +;;; howm-lang-en.el --- Wiki-like note-taking tool +;;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm-lang-en.el,v 1.11 2011-12-31 15:07:29 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;-------------------------------------------------------------------- + +(provide 'howm-lang-en) + +(defvar howm-day-of-week-en '("Sun" "Mon" "Tue" "Wed" "Thu" "Fri" "Sat")) + +(defvar howm-menu-command-table-en + `( + ("[Remember]" howm-remember previous) + ("[New]" (lambda () (howm-create ,howm-menu-action-arg))) + ("[Add]" (lambda () (howm-create-here ,howm-menu-action-arg))) + ("[Dup]" howm-dup) + ("[Update]" howm-initialize-buffer previous) + ("[Regexp]" howm-list-grep) + ("[String]" howm-list-grep-fixed) + ;; ("[roma]" howm-list-migemo) + ("[Today]" howm-find-today) + ("[Yesterday]" howm-find-yesterday) + ("[All]" howm-list-all) + ("[Recent]" howm-list-recent) + ("[Around]" howm-list-around) + ("[Schedule]" howm-list-schedule) + ("[Occur]" (lambda () (call-interactively 'howm-occur)) previous) + ("[Buffers]" (lambda () (howm-list-buffers ,howm-menu-action-arg))) + ("[Marks]" howm-list-mark-ring previous) + ("[History]" howm-history) + ("[]" howm-insert-keyword previous) + ("[Date>]" howm-insert-date previous) + ("[DTime>]" howm-insert-dtime previous) + ("[Todo]" howm-list-todo) + ("[Killall]" howm-kill-all) + ("[Force Killall]" (lambda () (interactive) (howm-kill-all t))) + ("[Edit Menu]" howm-menu-edit current) + ("[Update Menu]" howm-menu-refresh current) + ("[Preference]" (lambda () (customize-group 'howm))) + ("[Random Walk]" howm-random-walk previous) + )) + +;;; howm-lang-en.el ends here diff --git a/site-lisp/howm/howm-lang-ja.el b/site-lisp/howm/howm-lang-ja.el new file mode 100644 index 0000000..a0594fb --- /dev/null +++ b/site-lisp/howm/howm-lang-ja.el @@ -0,0 +1,61 @@ +;;; howm-lang-ja.el --- Wiki-like note-taking tool +;;; -*- Coding: iso-2022-7bit -*- +;;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm-lang-ja.el,v 1.11 2011-12-31 15:07:29 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;-------------------------------------------------------------------- + +(defvar howm-day-of-week-ja '("$BF|(B" "$B7n(B" "$B2P(B" "$B?e(B" "$BLZ(B" "$B6b(B" "$BEZ(B")) + +(defvar howm-menu-command-table-ja + `( + ("[$BB.5-(B]" howm-remember previous) + ("[$B?75,(B]" (lambda () (howm-create ,howm-menu-action-arg))) + ("[$BDI2C(B]" (lambda () (howm-create-here ,howm-menu-action-arg))) + ("[$BJ#@=(B]" howm-dup) + ("[$B99?7(B]" howm-initialize-buffer previous) + ("[$B@55,(B]" howm-list-grep) + ("[$B8GDj(B]" howm-list-grep-fixed) + ("[roma]" howm-list-migemo) + ("[$B:#F|(B]" howm-find-today) + ("[$B:rF|(B]" howm-find-yesterday) + ("[$B0lMw(B]" howm-list-all) + ("[$B:G6a(B]" howm-list-recent) + ("[$BA08e(B]" howm-list-around) + ("[$BM=Dj(B]" howm-list-schedule) + ("[$B%PFb(B]" (lambda () (call-interactively 'howm-occur)) previous) + ("[$BA4%P(B]" (lambda () (howm-list-buffers ,howm-menu-action-arg))) + ("[mark]" howm-list-mark-ring previous) + ("[$BMzNr(B]" howm-history) + ("[$BBj",(B]" howm-keyword-to-kill-ring) + ("[$BL>",(B]" (lambda () (howm-keyword-to-kill-ring t))) + ("[$B80"-(B]" howm-insert-keyword previous) + ("[$BF|"-(B]" howm-insert-date previous) + ("[$B;~"-(B]" howm-insert-dtime previous) + ("[Todo]" howm-list-todo) + ("[$BA4>C(B]" howm-kill-all) + ("[$B6/@)A4>C(B]" (lambda () (interactive) (howm-kill-all t))) + ("[menu $BJT=8(B]" howm-menu-edit current) + ("[menu $B99?7(B]" howm-menu-refresh current) + ("[$B@_Dj(B]" (lambda () (customize-group 'howm))) + ("[$B?lJb(B]" howm-random-walk previous) + )) + +(provide 'howm-lang-ja) + +;;; howm-lang-ja.el ends here diff --git a/site-lisp/howm/howm-menu-en.el b/site-lisp/howm/howm-menu-en.el new file mode 100644 index 0000000..ff4bd69 --- /dev/null +++ b/site-lisp/howm/howm-menu-en.el @@ -0,0 +1,106 @@ +;;; automatically generated from en/0000-00-00-000000.txt +;;; by howm-mkmenu.el. + +(require 'howm-vars) + +(howm-defconst-risky howm-menu-en "= <<< %menu% + %\"e\"[Remember] %\"c\"[New] %\"D\"[Dup] Search(%\"s\"[String] %\"g\"[Regexp] %\"o\"[Occur]) + %\"a\"[All] %\"l\"[Recent] %\"A\"[Around] %\"y\"[Schedule] %\"t\"[Todo] %\"b\"[Buffers] %\"x\"[Marks] + %\"K\"[] %\"i\"[Key>] %\"r\"[Update] %\"w\"[Random Walk] [Killall] + %\".\"[Today] %\":\"[Yesterday] %\"h\"[History] %\"R\"[Update Menu] [Edit Menu] [Preference] +------------------------------------- +[Schedule, Todo] -- @schedule, !deadline (until %sdays days from now) +!deadline, +todo, -reminder, ~defer (top %tnum entries) +%reminder +------------------------------------- +Recent +%recent +------------------------------------- +Random -- If you do not like this, [Edit Menu] to erase it. +%random +------------------------------------- + +Format of schedule and todo (Please replace {} with []): +{2002-10-21}@1 schedule -- (shown in schedule part. @3 = \"3 days schedule to 10-23\") +{2002-10-21}+7 todo -- float up slowly from the date in 7 days +{2002-10-21}!7 deadline -- float up fast from 7 days before the date +{2002-10-21}-1 reminder -- float at the date and sink slowly one unit per 1 day +{2002-10-21}~30 defer -- float at the date and repeat sinking and floating with 30 days period +{2002-10-21}. done -- sink forever +(Numbers after marks are default values.) + +How to remember: +* Schedule at(@) the date +* Reminder sinks down(-). +* Todo floats up(+). +* Deadline needs attention! +* Defer waves(~) up and down. +* Done is the end(.). + +------------------------------------- + +You can edit this menu itself. +>>> %Editing Menu% + + += <<< %Editing Menu% +[Edit Menu] Hit RET on the left button to edit this menu. +[Update Menu] Hit RET on the left button to update this menu. +-------------------------------------------------------- + +*** Format of the menu file *** +(Please hit RET on [Edit Menu] and read the source file.) + +== Basic format + +As you see... + +* [xxx] is button. +* %REMINDER (in small letters) is schedule and todo list. +* %RECENT (in small letters) is list of recent entries. +* %RANDOM (in small letters) is list of random entries. + +You can arrange their places as you like. +Writing favorite files or goto links may be also convenient. +(ex) file:///etc/services >>> wiki + +== Shortcut + +%\"foo\"[All] +This is displayed as foo[All], and the key \"f\" executes [All]. +Exactly speaking, it executes the following sequence: +(1) move to closing \", (2) move to next underline, and (3) hit it. + +%\"bar%\" +If you put % at the tail like this, the key \"b\" means \"move cursor here\". + +== For lispers + +Display: +%here%howm-congrats-count ;; embed value of variable howm-congrats-count +%here%(howm-menu-search \"search\") +;; embed result of (...), that is, search \"search\" and embed matched lines +Functions must be registered for safety. +(setq howm-menu-allow (append '(foo bar) howm-menu-allow)) ;; allow foo, bar + +Action: +%eval%(message (buffer-name)) ;; evaluate S expr +%call%find-file ;; call function interactively +Both are evaluated in the previous buffer before raising menu. + +== Hiding + +'%' + '|' toggles invisibility +like this: visible%|invisible%|appear%|disappear - until the end of line +(Newline is removed when the end of line is invisible.) + +== Multiple menus + +Links to %xxx% open \"<< < %xxx%\" with menu-mode: >>> %menu% +When you add new menu, [[%menu%]] may be more convenient because corresponding +entry is generated automatically. + +%eval%(howm-menu-open \"00000000-000000.txt\") -- open file with menu-mode +") + +(provide 'howm-menu-en) diff --git a/site-lisp/howm/howm-menu-ja.el b/site-lisp/howm/howm-menu-ja.el new file mode 100644 index 0000000..74aae32 --- /dev/null +++ b/site-lisp/howm/howm-menu-ja.el @@ -0,0 +1,166 @@ +;;; -*- Coding: iso-2022-7bit -*- +;;; automatically generated from ja/0000-00-00-000000.txt +;;; by howm-mkmenu.el. + +(require 'howm-vars) + +(howm-defconst-risky howm-menu-ja "= <<< %menu% + %\"e\"[$BB.5-(B] %\"c\"[$B?75,(B] %\"D\"[$BJ#@=(B] $B8!:w(B(%\"s\"[$B8GDj(B] %\"g\"[$B@55,(B] %\"m\"[roma] %\"o\"[$B%PFb(B]) %\":\"[$B:rF|(B] %\".\"[$B:#F|(B] + %\"a\"[$B0lMw(B] %\"l\"[$B:G6a(B] %\"A\"[$BA08e(B] %\"h\"[$BMzNr(B] %\"y\"[$BM=Dj(B] %\"t\"[Todo] %\"b\"[$BA4%P(B] %\"x\"[mark] %\"w\"[$B?lJb(B] [$B@_Dj(B] + %\"K\"[$BBj",(B] [$BL>",(B] %\"d\"[$BF|"-(B] %\"T\"[$B;~"-(B] %\"i\"[$B80"-(B] %\"r\"[$B99?7(B] %\"R\"[menu $B99?7(B] [menu $BJT=8(B] [$BA4>C(B] +------------------------------------- +[$BM=Dj!&(BTodo] $B!D(B $BM=Dj(B@, $B!:@Z(B! $B$r(B %sdays $BF|@h$^$GI=<((B. +$B!:@Z(B!, todo+, $B3P=q(B-, $BJ]N1(B~ $B$r>e0L(B %tnum $B8D$^$GI=<((B. +%reminder +------------------------------------- +$B:G6a$N%a%b(B +%recent +------------------------------------- +$B%i%s%@%`%;%l%/%H(B ($BITMW$J$i(B[menu $BJT=8(B]$B$G3:Ev2U=j$r:o=|$7$F$/$@$5$$(B) +%random +------------------------------------- + +$BM=Dj!&(Btodo $B$N=q<0(B ($B3Q$G(B) +[2002-10-21]$B!w(B1 $BM=Dj(B ($BM=DjI=$KI=<(!#$b$7!w(B3$B$J$i(B3$BF|4V$NM=Dj!"$D$^$j(B23$BF|$^$G$N0UL#(B) +[2002-10-21]$B!\(B7 todo $B;XDjF|$K$J$C$F$+$i(B7$BF|4V$+$1$F=y!9$KIb$+$SB3$1$k(B +[2002-10-21]$B!*(B7 $B!:@Z(B $B;XDjF|$N(B7$BF|A0$+$i=y!9$KIb$+$S!";XDjF|0J9_Ib$-$C$Q$J$7(B +[2002-10-21]$B!](B1 $B3P=q(B $B;XDjF|$KIb$+$S>e$,$j!"0J9_(B1$BF|$+$1$FC10LNL$@$1=y!9$KD@$`(B +[2002-10-21]$B!A(B30 $BJ]N1(B $B;XDjF|$KIb$+$S>e$,$j!"0J9_(B30$BF|<~4|$GIb$-D@$_$r$/$j$+$($9(B +[2002-10-21]$B!%(B $B:Q$_(B $B>o$KDl(B +($B5-9f$N8e$N?t;z$O%G%U%)%k%HCM(B) + +$B3P$(J}(B +$B!&M=Dj$O$=$NF|$K7k$SIU$1$i$l$F$k$+$i(B@(at) +$B!&3P=q$OD@$s$G$$$/$+$i(B- +$B!&(Btodo$B$OIb$+$S>e$,$C$F$/$k$+$i(B+ +$B!&!:@Z$O$=$NF|$KCm0U$7$J$1$l$P$J$i$J$$$+$i(B! +$B!&J]N1$OGHBG$D$+$i(B~ +$B!&:Q$_$O=*$o$j$@$+$i(B. + +------------------------------------- + +[$B!{!{(B]$B$O2?(B? >>> %$B%\%?%s$N@bL@(B% +$B$3$N%a%K%e!<<+BN$rJT=8$G$-$^$9(B >>> %$B%a%K%e!<$NJT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1(B +* Tips: M-v $B$G8uJd0lMw$K0\$C$F(B migemo $B8!:w$9$k$H3Z(B + +[$BF|"-(B] $B"*(B $B:#F|$NF|IU(B [yyyy-mm-dd] $B$rE=$j$D$1(B +[$B;~"-(B] $B"*(B $B:#F|$NF|;~(B [yyyy-mm-dd HH:MM] $B$rE=$j$D$1(B +[$BBj",(B] $B"*(B $B8=%a%b$N%?%$%H%k$r(B kill ring $B$X(B (C-y $B$GE=$j$D$1(B) +* $B%?%$%H%k$,$_$D$+$i$J$+$C$?$H$-$O%U%!%$%kL>(B +[$BL>",(B] $B"*(B $B%U%!%$%kL>$r(B kill ring $B$X(B + +$B"!(B $BFCJL(B + +[menu $B99?7(B] $B"*(B $B%a%K%e!<$NM=DjI=$J$I$r99?7(B +[menu $BJT=8(B] $B"*(B $B%a%K%e!<$rJT=8(B +[$BA4>C(B] $B"*(B howm-mode $B$J%P%C%U%!$r$9$Y$F>C$9(B ($BL$J]B8$O=|$/(B) +[$B?lJb(B] $B"*(B $B%i%s%@%`$K%j%s%/$r$?$I$C$F<+F01\Mw(B. C-g $B$GDd;_(B. + += <<< %$B9bB.2=$K$D$$$F(B% + +$B%a%b$,A}$($F8!:w$,CY$/$J$C$F$-$?$i(B, $B9bB.2=$N$?$a$N%*%W%7%g%s@_Dj$r(B +$B8!F$$7$F$/$@$5$$(B. + +$B:G$b8z2L$,Bg$-$$$N$O(B, $B8!:w$K(B grep $B%3%^%s%I$r;H$&$3$H$G$9(B. +Unix $B7O$NI8=`E*$J4D6-$J$i(B, $B$?$$$F$$LdBj$J$/;H$($k$G$7$g$&(B. +$B$=$l0J30$N4D6-$G$O(B, $B2?$i$+$N=`Hw$,I,MW$K$J$k$+$b$7$l$^$;$s(B. + +$B3F4D6-$G6qBNE*$K$I$&$9$l$P$h$$$+$O!D>pJs$r$*BT$A$7$F$$$^$9(B. +$B!&(Bhttp://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?Windows +$B!&(Bhttp://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?LinuxZaurus + +grep $B$N;HMQ$r@_Dj$9$k$K$O(B, + M-x customize-variable howm-view-use-grep +$B$HF~NO$9$k$+(B, $B=i4|2=%U%!%$%k(B(.emacs $BEy(B)$B$KD>@\(B + (setq howm-view-use-grep t) +$B$H=q$/$+(B, $B$"$k$$$O:#$3$N2hLL$G!V(B%\"!$B!W$r2!$7$F$/$@$5$$(B.\" %| %eval%(customize-variable 'howm-view-use-grep) %| + +$B$=$NB>$N%*%W%7%g%s$K$D$$$F$O(B, +[$B@_Dj(B] $B$+$i!V(BHowm Efficiency$B!W$N9`L\$r;2>H$/$@$5$$(B. + + += <<< %$B%a%K%e!<$NJT=8$K$D$$$F(B% +[menu $BJT=8(B] $B$G$3$N%a%K%e!<$rJT=8(B +[menu $B99?7(B] $B$G$3$N%a%K%e!<$r99?7(B +-------------------------------------------------------- + +$B%a%K%e!<$N=q$-J}(B +([menu $BJT=8(B] $B>e$G%j%?!<%s$rC!$-(B, $B85%U%!%$%k$rFI$s$G$/$@$5$$(B) + +$B"!(B $B4pK\(B +$B8+$l$P$o$+$k$G$7$g$&$,(B, +$B!&(B[$B!{!{(B] $B$H=q$$$?=j$,%\%?%s(B +$B!&!s(Breminder $B$H(B($BH>3Q$G(B)$B=q$$$?=j$,M=DjI=$H(B todo list +$B!&!s(Brecent $B$H(B($BH>3Q$G(B)$B=q$$$?=j$,(B, $B:G6a$N%a%b0lMw(B +$B!&!s(Brandom $B$H(B($BH>3Q$G(B)$B=q$$$?=j$,(B, $B%i%s%@%`$J%a%b0lMw(B +$B$K$J$j$^$9(B. +$B$I$3$K=q$$$F$b5!G=$7$^$9$+$i(B, $BJB$Y$+$($k$J$j$J$s$J$j(B, $B$*9%$-$K$I$&$>(B. +$B$h$/;H$&%U%!%$%k$d(B goto link $B$b=q$$$F$*$1$PJXMx$+$b(B. +($BNc(B) file:///etc/services >>> wiki + +$B"!(B $B%7%g!<%H%+%C%H(B +%\"hoge\"[$B0lMw(B] +$B",$3$&=q$$$F$*$/$H(B, $B!V(Bhoge[$B0lMw(B]$B!W$HI=<($5$l(B, $B%-!<(B h $B$G0lMw$r5/F0(B +($B@53N$K$O(B, (1) $BJD$8!V(B\"$B!W$X0\F0(B (2) $B2A$5$l$^$9(B + +$B"!(B $BIT2D;k(B +$B!V!s(B|$B!W$H(B($BH>3Q$G(B)$B=q$/$H(B, $B2D;k!&IT2D;k$r%H%0%k(B. +$B$3$s$J$U$&$K(B $B"*(B $B8+$($k(B%|$B8+$($J$$(B%|$B2D;k(B%|$BIT2D;k!D9TKv$^$G(B +($B9TKv$,IT2D;k$@$H(B, $B2~9T$b>C$($^$9(B) + +$B"!(B $BJ#?t%a%K%e!<(B +$B!V(B%$B!{!{(B%$B!W$X$N%j%s%/$O(B, $B!V!c!c!c(B %$B!{!{(B%$B!W$r%a%K%e!<%b!<%I$G3+$-$^$9(B: >>> %menu% +$B?75,%a%K%e!<$rDI2C$7$?$$$H$-$O(B [[%menu%]] $B$NJ}$,JXMx$G$7$g$&(B ($B<+F0@8@.$9$k$N$G(B) +$B;XDj%U%!%$%k$r%a%K%e!<%b!<%I$G3+$/(B: %eval%(howm-menu-open \"00000000-000000.txt\") +") + +(provide 'howm-menu-ja) diff --git a/site-lisp/howm/howm-menu.el b/site-lisp/howm/howm-menu.el new file mode 100644 index 0000000..988b837 --- /dev/null +++ b/site-lisp/howm/howm-menu.el @@ -0,0 +1,965 @@ +;;; howm-menu.el --- Wiki-like note-taking tool +;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm-menu.el,v 1.106 2012-09-23 11:34:59 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;;-------------------------------------------------------------------- + +(provide 'howm-menu) +(require 'howm) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; customize + +;;; general + +(howm-defvar-risky howm-menu-mode-map nil) +(let ((m (make-keymap))) + (define-key m action-lock-magic-return-key 'howm-menu-invoke) + (define-key m [tab] 'action-lock-goto-next-link) + (define-key m [(meta tab)] 'action-lock-goto-previous-link) + (define-key m "\C-i" 'action-lock-goto-next-link) + (define-key m "\M-\C-i" 'action-lock-goto-previous-link) + (define-key m " " 'scroll-up) + (define-key m [backspace] 'scroll-down) + (define-key m "\C-h" 'scroll-down) + (define-key m "q" 'bury-buffer) + (define-key m "?" 'describe-mode) + (setq howm-menu-mode-map m) + ) + +;;; schedule, todo, recent, random + +;; Set random seed. +;; snap://Info-mode/elisp#Random Numbers +(defvar howm-randomize t) +(when howm-randomize + (random t)) + +(defvar howm-menu-reminder-format "> %s | %s" + "Format to show schedule/todo list in `howm-menu-mode'.") +(defvar howm-menu-list-format + (let* ((path (format-time-string howm-file-name-format)) + (width (length (file-name-sans-extension + (file-name-nondirectory path))))) + (concat "> %-" (format "%s" width) "s | %s")) + "Format to show recent/random list in `howm-menu-mode'.") +(defvar howm-menu-list-regexp "^\\(>\\([^|\r\n]*|\\)\\) +\\(.*\\)$" + "Regexp to find and parse schedule/todo/recent/random list in `howm-menu-mode'. +`howm-menu-list-regexp-action-pos' must cover header part. +Otherwise, `howm-action-lock-forward' may be invoked unintentionally.") +(defvar howm-menu-list-regexp-key-pos 3 + "Position of target string for action-lock in history buffer. +This target is searched when action-lock is invoked.") +(defvar howm-menu-list-regexp-action-pos 1 + "Position of action-lock hilight on schedule/todo/recent/random list +in `howm-menu-mode'.") +(defvar howm-menu-list-regexp-face-pos 2 + "Position to apply `howm-menu-list-face' on schedule/todo/recent/random list +in `howm-menu-mode'.") + +;;; shortcut + +;; %"..." or %"...%" +(defvar howm-menu-key-regexp + "%\"\\(\\([^\r\n%\"]\\)[^\r\n%\"]*\\(%+[^\r\n%\"]+\\)*\\)\\(%\\)?\"") +(defvar howm-menu-key-regexp-word-pos 1) +(defvar howm-menu-key-regexp-key-pos 2) +(defvar howm-menu-key-regexp-moveonly-pos 4) + +;;; dynamic contents + +(howm-defvar-risky howm-menu-allow + '(howm-menu-schedule + howm-menu-todo + howm-menu-reminder + howm-menu-recent + howm-menu-random + howm-menu-search + howm-menu-categorized-reminder + )) + +(howm-defvar-risky howm-menu-display-rules + `( + ;; static + ("%sdays" . "%here%howm-menu-schedule-days") + ("%tnum" . "%here%howm-menu-todo-num") + ("%schedule" . "%here%(howm-menu-schedule)") + ("%todo" . "%here%(howm-menu-todo)") + ("%reminder" . "%here%(howm-menu-reminder)") + ("%recent" . "%here%(howm-menu-recent)") + ("%random" . "%here%(howm-menu-random)") + ;; dynamic + ("%here%" . howm-menu-here) + (,howm-menu-key-regexp . howm-menu-shortcut) + ) + "List of rules for dynamic contents in howm menu. +((R1 . T1) (R2 . T2) ...): +Regexp R1 is replaced by T1 if T1 is a string. +(T1) is called at R1 if T1 is a function.") + +;;; command table + +;; howm-menu-command-table-* = ((MATCHER FUNC ONBUF) ...) +;; +;; (FUNC) is evalueted on ONBUF when return key is hit on MATCHER. +;; +;; MATCHER = regexp | (regexp position) +;; (optional) ONBUF = nil | 'previous | 'current +;; nil: previous non-menu buffer (set-buffer) +;; 'previous: previous non-menu buffer (switch-to-buffer) +;; 'current: current menu buffer + +(howm-defvar-risky howm-menu-command-table-common + '( + (("%eval%\\(.*$\\)" 1) howm-menu-eval previous) + (("%call%\\(.*$\\)" 1) howm-menu-call previous) + )) + +(howm-defvar-risky howm-menu-action-arg 'howm-menu-action-arg-name) + +;;; which is opened as menu? + +(howm-defvar-risky howm-menu-keyword-regexp "^%.*%$") +(howm-defvar-risky howm-menu-top "%menu%") + +;;; misc. + +(howm-defvar-risky howm-menu-toggle-invisible "%|") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; internal + +(defvar *howm-menu-force-refresh* nil) ;; dirty. clean me. [2003/09/29 21:39] + +(defvar *howm-menu-shortcut-keys* nil) +(defvar *howm-menu-shortcut-multidef-keys* nil) +(defvar *howm-menu-shortcut-markers* nil) +(make-variable-buffer-local '*howm-menu-shortcut-markers*) + +(defvar howm-menu-previous-buffer nil) +(defvar howm-menu-next-expiry-time (current-time)) +(defvar howm-menu-last-time (current-time)) +(defvar howm-menu-buffer-file nil) +(defvar howm-menu-buffer-file-place nil) +(howm-defvar-risky howm-menu-mode-local-map nil) +(make-variable-buffer-local 'howm-menu-previous-buffer) +(make-variable-buffer-local 'howm-menu-next-expiry-time) +(make-variable-buffer-local 'howm-menu-last-time) +(make-variable-buffer-local 'howm-menu-buffer-file) +(make-variable-buffer-local 'howm-menu-buffer-file-place) +(make-variable-buffer-local 'howm-menu-mode-local-map) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; mode + +(defun howm-menu-mode () + "howm menu +key binding +--- ------- +\\[action-lock-magic-return] Follow link +\\[action-lock-goto-next-link] Next link +\\[action-lock-goto-previous-link] Prev link +\\[describe-mode] This help +\\[bury-buffer] Quit +" + (interactive) + (setq major-mode 'howm-menu-mode + mode-name "HM") + (setq howm-menu-mode-local-map (copy-keymap howm-menu-mode-map)) + (use-local-map howm-menu-mode-local-map) + ) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; main + +(defun howm-menu (&optional force-refresh last-chance) + (interactive) + (when (and (eq (howm-folder-type howm-directory) ':dir) + (not (file-exists-p howm-directory))) + (make-directory howm-directory t)) + (let ((*howm-menu-force-refresh* force-refresh) + ;; force to use the original howm-directory + (*howm-independent-directories* nil)) + (if (and howm-menu-keyword-regexp (null howm-menu-file)) + (let ((m (howm-keyword-search howm-menu-top))) + (when (and (cdr (assoc 'menu-p m)) + (not (cdr (assoc 'keyword-matched m)))) + (howm-menu-initialize-skel last-chance))) + (howm-menu-open howm-menu-file)))) + +(defun howm-menu-open (file &optional place name) + (setq name (or name (howm-menu-name file))) + (let ((f (if (file-name-absolute-p file) + file + (expand-file-name file howm-directory)))) + (if (file-exists-p f) + (howm-menu-open-sub f place name) + (progn + (find-file f) + (howm-mode))))) + +(defun howm-menu-open-sub (f place name) + (let* ((pb (current-buffer)) + (pm major-mode) + (b (get-buffer name)) + (mtime (nth 5 (file-attributes f)))) + (if (or *howm-menu-force-refresh* + (null b) + (progn + (set-buffer b) + (or (howm-time< howm-menu-last-time mtime) + (howm-time< howm-menu-next-expiry-time + (current-time))))) + (howm-menu-refresh f place name) + (switch-to-buffer b)) + (let ((cm major-mode)) + (save-excursion + (while (eq pm cm) + (set-buffer pb) + (setq pb howm-menu-previous-buffer) + (set-buffer pb) + (setq pm major-mode))) + (setq howm-menu-previous-buffer pb)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; refresh + +(howm-defvar-risky howm-menu-shortcut-assoc nil) +(make-variable-buffer-local 'howm-menu-shortcut-assoc) +(howm-defvar-risky howm-menu-invisible t + "*Non nil if 'invisible' property should be used in menu. +This must be t at now. +When this is nil, delete-region is used instead, and bug appears.") + +(defun howm-menu-refresh (&optional file place name) + (interactive) + ;; preprocess + (when name + (switch-to-buffer (get-buffer-create name))) + (howm-menu-mode) + (setq howm-menu-buffer-file (or file howm-menu-buffer-file)) + (setq howm-menu-buffer-file-place (or place + howm-menu-buffer-file-place + 1)) + (setq howm-menu-shortcut-assoc nil) + ;; main + (howm-rewrite-read-only-buffer + (howm-menu-insert-paragraph howm-menu-buffer-file + howm-menu-buffer-file-place) + (howm-menu-dynamic-setup) ;; shotcut & dynamic contents + (howm-menu-set-face)) + ;; postprocess + (goto-char (point-min)) + (setq howm-menu-last-time (current-time)) + (setq howm-menu-next-expiry-time + (howm-days-after (current-time) 0 + howm-menu-expiry-hours)) + (howm-menu-shortcut-warn) + (run-hooks 'howm-menu-hook)) + +(defun howm-menu-insert-paragraph (file place) + (insert-file-contents (expand-file-name file + howm-directory)) + (howm-view-set-place place) + (let* ((r (howm-view-paragraph-region)) + (b (car r)) + (e (second r))) + (delete-region e (point-max)) + (delete-region (point-min) b)) + (goto-char (point-max)) + (insert (howm-menu-footer))) + +;; (defun howm-menu-dynamic-setup () +;; (let* ((action-lock-default-rules (howm-menu-action-lock-rules))) +;; (if howm-mode +;; (howm-initialize-buffer) +;; (howm-mode 1))) +;; (howm-menu-shortcut-initialize) +;; (howm-menu-replace howm-menu-display-rules)) + +(defun howm-menu-dynamic-setup () + (howm-menu-shortcut-initialize) + (howm-menu-replace howm-menu-display-rules) + (let* ((action-lock-default-rules (howm-menu-action-lock-rules))) + (if howm-mode + (howm-initialize-buffer) + (howm-mode 1)))) + +(defun howm-menu-set-face () + (set (make-local-variable 'font-lock-keywords-only) t) + (howm-menu-add-font-lock) + (font-lock-fontify-buffer) + (when howm-menu-toggle-invisible + (howm-menu-make-invisible))) + +(defun howm-menu-footer () + (or howm-menu-footer + (let* ((r (howm-menu-command-table-raw)) + (buttons (mapcar (lambda (f) + (cdr (assoc f + (mapcar (lambda (z) + (cons (second z) + (car z))) + r)))) + '(howm-menu-refresh howm-menu-edit))) + (footer (apply #'concat `("\n-- \n" ,@buttons)))) + (setq howm-menu-footer footer) + footer))) + +(defun howm-menu-refresh-background () + ;; save-current-buffer doesn't work on GNU Emacs 21.4.1 + (let ((b (current-buffer))) + (howm-menu t) + (switch-to-buffer b))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; action-lock + +(defun howm-menu-invoke (arg) + (interactive "P") + (cond ((save-excursion + (beginning-of-line) + (looking-at howm-menu-list-regexp)) + (beginning-of-line) + (action-lock-invoke arg)) + ((howm-menu-list-get-item) + (howm-view-open-item (howm-menu-list-get-item))) + (t + (error "Not on spell string.")))) + +(defun howm-menu-action-lock-rules () + (let* ((d action-lock-default-rules) + (f (howm-action-lock-reminder-forward-rules)) + (j (howm-menu-list-rules)) + (m (mapcar (lambda (pair) + (let* ((h (car pair)) + (r (if (listp h) (car h) h)) + (n (if (listp h) (second h) nil)) + (args (if n + `(list (match-string-no-properties ,n)) + nil)) + (functab (cdr pair)) + (c (howm-menu-action functab args))) + (list r c))) + (howm-menu-command-table)))) + (append m d j f))) + +;; Elisp is not Scheme. Lambda is not closure. Don't forget dynamic binding. +;; Check +;; (pp (car (howm-menu-action-lock-rules))) +;; for debug. [2003/09/25] +(defun howm-menu-action (function-table args) + (let* ((func (car function-table)) + (onbuf (second function-table)) + (switch-p (eq onbuf 'previous))) + (let* ((s-buf (if (eq onbuf 'current) 'cur 'prev)) + (s-switch `(switch-to-buffer ,s-buf)) + (s-apply `(apply #',func ,(if args 'a nil)))) +;; (s-apply `(apply #',func ,(if args '(list a) nil)))) + (let* ((s-body (if switch-p + `(progn ,s-switch ,s-apply) + `(with-current-buffer ,s-buf ,s-apply)))) + `(lambda (&optional ,howm-menu-action-arg) + (let ((a ,args) + (cur (current-buffer)) + (prev (if (howm-buffer-alive-p howm-menu-previous-buffer) + howm-menu-previous-buffer + (current-buffer)))) + ,s-body)))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; shortcut + +(defun howm-menu-shortcut-get-marker () + (let ((m (make-marker))) + (set-marker m (point)) + (add-to-list '*howm-menu-shortcut-markers* m) + m)) + +(defun howm-menu-shortcut-clear-markers () + (mapc (lambda (m) (set-marker m nil)) + *howm-menu-shortcut-markers*) + (setq *howm-menu-shortcut-markers* nil)) + +(defun howm-menu-shortcut-initialize () + (setq *howm-menu-shortcut-keys* nil) + (setq *howm-menu-shortcut-multidef-keys* nil) + (howm-menu-shortcut-clear-markers)) + +(defun howm-menu-shortcut-sort (keys) + (mapconcat #'identity + (sort (copy-sequence keys) #'string<) + "")) + +(defun howm-menu-shortcut-warn () + (when *howm-menu-shortcut-multidef-keys* + (beep) + (message "Multiple definitions for key(s): \"%s\" in \"%s\"" + (howm-menu-shortcut-sort *howm-menu-shortcut-multidef-keys*) + (howm-menu-shortcut-sort *howm-menu-shortcut-keys*)))) + +;; Check howm-menu-mode-local-map if you want to debug howm-menu-shortcut. +(defun howm-menu-shortcut () + (let* ((beg (match-beginning 0)) + (end (match-end 0)) + (wbeg (match-beginning howm-menu-key-regexp-word-pos)) + (wend (match-end howm-menu-key-regexp-word-pos)) + (key (match-string-no-properties howm-menu-key-regexp-key-pos)) + (move-only (match-beginning howm-menu-key-regexp-moveonly-pos))) + ;; 'end' must be first. + ;; howm-menu-invisible-region can be delete-region indeed, + ;; and points after the region can be slided. + (howm-menu-invisible-region wend end) + (howm-menu-invisible-region beg wbeg) + (let ((p (howm-menu-shortcut-get-marker))) + (setq howm-menu-shortcut-assoc + (cons (cons key p) howm-menu-shortcut-assoc)) + (define-key howm-menu-mode-local-map key + (howm-menu-shortcut-func key p move-only))) + (when (member key *howm-menu-shortcut-keys*) + (setq *howm-menu-shortcut-multidef-keys* + (cons key *howm-menu-shortcut-multidef-keys*))) + (setq *howm-menu-shortcut-keys* + (cons key *howm-menu-shortcut-keys*)))) + +(defun howm-menu-shortcut-func (key p move-only) + (if howm-menu-invisible + (howm-menu-shortcut-func1 p move-only) + (howm-menu-shortcut-func2 key p move-only))) + +;; old code. it works. +(defun howm-menu-shortcut-func1 (p move-only) + `(lambda (arg) + (interactive "P") + (let ((pos ,p)) + (if ,move-only + (goto-char pos) + (save-excursion + (goto-char pos) + (let ((case-fold-search nil)) ;; temporaly + (when (null (action-lock-get-action)) + (action-lock-goto-next-link)) + (action-lock-invoke arg))))))) + +;; new code. broken. +;; It doesn't work because action can be +;; (let ((s (match-string-no-properties 0))) (howm-keyword-search s nil nil)). +(defun howm-menu-shortcut-func2 (key p move-only) + (if move-only + `(lambda (arg) (interactive "P") (goto-char ,p)) + (save-excursion + (goto-char p) + (let ((case-fold-search nil)) ;; temporaly + (when (null (action-lock-get-action)) + (action-lock-goto-next-link)) + (let ((action (action-lock-get-action))) + (if (null action) + (lambda (arg) (interactive "P") nil) + (progn + (rplacd (assoc key howm-menu-shortcut-assoc) + action) + `(lambda (arg) + (interactive "P") + (funcall (cdr (assoc ,key howm-menu-shortcut-assoc)) + arg))))))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; action + +(defun howm-menu-edit () + (interactive) + (let ((place howm-menu-buffer-file-place)) + (find-file (expand-file-name howm-menu-buffer-file howm-directory)) + (howm-mode t) + (when place + (howm-view-set-place place) + (recenter 0)))) + +(defun howm-menu-eval (s) + (let ((expr (read s))) + (eval expr))) + +(defun howm-menu-call (s) + (let ((expr (read s))) + (call-interactively expr))) + +(defun howm-open-today () + (interactive) + (and (howm-create-file t) + (howm-insert-template "")) + (howm-set-mode)) + +(defun howm-open-past (&optional days-before) + (interactive "p") + (setq days-before (or days-before 1)) + (if (= days-before 0) + (howm-open-today) + (howm-open-past-sub days-before))) + +(defun howm-open-past-sub (days-before) + (let ((f (expand-file-name (howm-file-name (howm-days-after (current-time) + (- days-before))) + howm-directory))) + (if (file-exists-p f) + (find-file f) + (error "No such file: %s" f))) + (howm-set-mode)) + +(defun howm-find-past (&optional days-before) + (interactive "p") + (cond ((howm-one-file-one-day-p) (howm-open-past days-before)) + (t (howm-search-past days-before)))) + +(defun howm-find-today (&optional days-before) + (interactive "P") + (howm-find-past (or days-before 0))) + +(defun howm-find-yesterday (&optional days-before) + (interactive) + (howm-find-past (or days-before 1))) + +(defun howm-one-file-one-day-p () + (let* ((now (decode-time)) + (d (nth 3 now)) + (m (nth 4 now)) + (y (nth 5 now)) + (beginning-of-day (encode-time 0 0 0 d m y)) + (end-of-day (encode-time 59 59 23 d m y))) + (string= (howm-file-name beginning-of-day) + (howm-file-name end-of-day)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; face + +(defun howm-menu-make-invisible () + (save-excursion + (goto-char (point-min)) + (let (visible-p + invisible-beg) + (while (not (= (point) (point-max))) + (setq visible-p t) + (while (re-search-forward howm-menu-toggle-invisible + (line-end-position) t) + (if visible-p + (setq invisible-beg (match-beginning 0)) + (howm-menu-invisible-region invisible-beg (match-end 0))) + (setq visible-p (not visible-p))) + (when (not visible-p) + (howm-menu-invisible-region invisible-beg + (save-excursion (forward-line) (point)))) + (forward-line))))) + +(defun howm-menu-font-lock-rules () + `((,howm-menu-key-regexp + (,howm-menu-key-regexp-key-pos howm-menu-key-face t)) + ;; In menu-list form "> FILE-NAME | ", + ;; I want to hide annoying long underlines drawn by action-lock. + (,howm-menu-list-regexp + (,howm-menu-list-regexp-face-pos howm-menu-list-face t)) + ;; But some users may want to highlight today's YYYY-MM-DD even if + ;; it is a part of a FILE-NAME. + ;; The next code makes duplicated entries; they are already put into + ;; font-lock-keywords by howm-reminder-add-font-lock + ;; in howm-initialize-buffer because menu is howm-mode. + ;; They are hidden by the above rule in FILE-NAME columns, + ;; and I need to put them again now. Sigh... + ;; Clean me! + ,@(howm-reminder-today-font-lock-keywords))) +(defun howm-menu-add-font-lock () + (cheat-font-lock-append-keywords (howm-menu-font-lock-rules))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; dynamic contents + +(defun howm-menu-replace (rules) + (mapc (lambda (pair) + (let* ((reg (car pair)) + (to (cdr pair))) + (goto-char (point-min)) + (while (re-search-forward reg nil t) + (cond ((stringp to) (replace-match to)) + ((functionp to) (funcall to)) + (t (error "Invalid to-part: %s." to)))))) + rules)) + +;; (defun howm-menu-func () +;; (let ((b (match-beginning 0)) +;; (e (match-end 0)) +;; (f (read (match-string-no-properties 1)))) +;; (if (or (eq howm-menu-allow t) +;; (member f howm-menu-allow)) +;; (howm-replace-region b e (funcall f)) +;; (message "%s is not allowed." f)))) + +;; (defun howm-menu-var () +;; (let ((b (match-beginning 0)) +;; (e (match-end 0)) +;; (f (read (match-string-no-properties 1)))) +;; (howm-replace-region b e (eval f)))) + +(defun howm-menu-here () + (let* ((beg (match-beginning 0)) + (expr-beg (match-end 0)) + (expr-end (progn (forward-sexp) (point))) + (expr (read (buffer-substring-no-properties expr-beg expr-end)))) + (cond ((symbolp expr) (howm-menu-here-var expr beg expr-end)) + ((listp expr) (howm-menu-here-func (car expr) (cdr expr) + beg expr-end)) + (t (message "Unknown expr: %s" expr))))) + +(defun howm-menu-here-var (expr beg end) + (if (boundp expr) + (howm-replace-region beg end (symbol-value expr)) + (message "Unknown symbol: %s" expr))) + +(defun howm-menu-here-func (func args beg end) +;; (let ((allowed (or (eq howm-menu-allow t) (member func howm-menu-allow)))) + (let ((allowed (member func howm-menu-allow))) + (cond ((not allowed) (message "Not allowed: %s" func)) + ((not (fboundp func)) (message "Unknown function: %s" func)) + (t (howm-replace-region beg end (apply func args)))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; schedule, todo, recent, random + +;;; command + +(defun howm-menu-schedule () + (howm-menu-general "schedule" 'schedule + (howm-schedule-menu howm-menu-schedule-days + howm-menu-schedule-days-before))) + +(defvar howm-menu-todo-show-day-of-week t) +(defun howm-menu-todo () + (howm-menu-general "todo" 'todo + (howm-todo-menu howm-menu-todo-num + howm-menu-todo-priority + howm-menu-reminder-separators))) +(defun howm-menu-reminder () + (howm-menu-general "reminder" 'todo + (howm-reminder-menu howm-menu-todo-num + howm-menu-todo-priority + howm-menu-reminder-separators))) + +(defun howm-menu-recent (&optional evaluator label) + (howm-menu-general (or label "recent") + nil + (howm-recent-menu howm-menu-recent-num evaluator))) + +(defun howm-menu-random () (howm-menu-recent t "random")) + +(defun howm-menu-general (label formatter item-list) + "Generate output string for items in howm menu. +LABEL is only used for message. +FORMATTER is a function which receives an item and returns an output string + (without newline). +FORMATTER can be nil for standard style, 'todo for todo style, +'schedule for schedule style, or 'full for full note. +ITEM-LIST is list of items which should be shown." + (let ((f (cond ((null formatter) #'howm-menu-format-item) + ((eq 'todo formatter) #'howm-menu-format-todo) + ((eq 'schedule formatter) #'howm-menu-format-reminder) + ((eq 'full formatter) #'howm-menu-format-full) + (t formatter)))) + (let* ((msg "scanning %s...") + (msg-done (concat msg "done"))) + (message msg label) + ;; (delete-region (match-beginning 0) (match-end 0)) + (prog1 + (mapconcat f item-list "\n") + (message msg-done label))))) + +;;; schedule/todo + +(defun howm-menu-format-todo (item) + ;; item can be a separator. + (if (eq (howm-page-type (howm-item-page item)) ':nil) + (howm-item-summary item) + (let ((dow-str (cond (howm-menu-todo-show-day-of-week nil) + (t " ")))) + (howm-menu-format-reminder item dow-str t)))) + +(defun howm-menu-format-reminder (item &optional day-of-week-str show-priority) + (let* ((p (howm-todo-parse item)) + (late (floor (car p))) + (dow (fourth p)) + (dow-str (or day-of-week-str + (howm-day-of-week-string dow))) + (priority (if (and howm-menu-todo-priority-format + show-priority) + (format howm-menu-todo-priority-format + (howm-todo-priority item)) + "")) + (h (format "%s%3s%s" dow-str late priority))) + (howm-menu-list-format h (howm-view-item-summary item) item + howm-menu-reminder-format))) + +(defun howm-day-of-week-string (&optional day-of-week) + ;; 0 = Sunday + (let ((dow (or day-of-week (nth 6 (decode-time)))) + (names (howm-day-of-week))) + (cond ((stringp names) (substring names dow (1+ dow))) ;; backward compatibility + ((listp names) (nth dow names)) + (t " ")))) + +(defun howm-menu-format-full (item) + (let ((text (format "%s %s\n%s" + howm-ref-header + (howm-item-name item) + (with-temp-buffer + (howm-page-insert (howm-item-page item)) + (howm-view-set-place (howm-view-item-place item)) + (apply 'buffer-substring-no-properties + (howm-view-paragraph-region)))))) + (howm-menu-list-put-item text item) + text)) + +;;; recent/random + +(defun howm-recent-menu (num &optional evaluator) + ;; Bug: (length howm-recent-menu) can be smaller than NUM + ;; when empty files exist. + (let* ((randomp (eq evaluator t)) + (summarizer #'(lambda (file line content) content)) + ;; Unique name is needed for dynamic binding. Sigh... + (h-r-m-evaluator (if randomp + (lambda (f) (number-to-string (random))) + (or evaluator #'howm-view-mtime))) + (sorted (howm-sort (lambda (f) (funcall h-r-m-evaluator f)) + #'howm-view-string> + (mapcar #'howm-item-name + (howm-folder-items howm-directory t)))) + (files (howm-first-n sorted num))) + (let ((r (howm-menu-recent-regexp))) + (if randomp + (howm-cl-mapcan (lambda (f) + (let ((is (howm-view-search-items r (list f) + summarizer))) + (and is (list (nth (random (length is)) + is))))) + files) + (howm-first-n (howm-view-search-items r files summarizer) num))))) + +(defun howm-menu-recent-regexp () + (or howm-menu-recent-regexp (howm-view-title-regexp-grep))) + +;;; common + +(defun howm-menu-list-put-item (text item) + ;; put it to whole text, because I don't assume "> ..." format here. + (put-text-property 0 (length text) 'howm-menu-list-item item text)) +(defun howm-menu-list-get-item (&optional text) + (get-text-property (if text 0 (point)) 'howm-menu-list-item text)) +(defun howm-menu-list-getput-item (from-text to-text) + (howm-menu-list-put-item to-text + (howm-menu-list-get-item from-text))) + +(defun howm-menu-list-action (&optional keyword) + (let ((item (howm-menu-list-get-item keyword))) + (cond (item (howm-view-open-item item)) ;; schedule, todo, etc. + (keyword (howm-keyword-search keyword)) ;; history + (t (error "Target is not specified."))))) ;; can't happen + +(defun howm-menu-format-item (item &optional list-format) + (let* ((info (file-name-sans-extension (howm-view-item-basename item))) + (line (howm-view-item-summary item))) + (howm-menu-list-format info line item list-format))) + +(defun howm-menu-list-format (info line item &optional list-format) + (let ((s (format (or list-format howm-menu-list-format) info line))) + (howm-menu-list-put-item s item) + s)) + +(defun howm-menu-list-rules () + (list (action-lock-general #'howm-menu-list-action + howm-menu-list-regexp + howm-menu-list-regexp-key-pos + howm-menu-list-regexp-action-pos))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; embed search result + +(defun howm-menu-search (key &optional formatter regexp-p) + "Embed search result of KEY into menu. +See `howm-menu-general' for FORMATTER. +KEY is a regular expression if REGEXP-P is not nil. + +Bugs: If you write %here%(howm-menu-search \"foo\" full) in your menu, +- menu file itself is also searched. +Write %here%(howm-menu-search \"[f]oo\" full t) insteadly. +- same note is shown twice if \"foo\" is hit twice in it." + (let ((fixed-p (not regexp-p))) + (howm-menu-general "menu-search" + formatter + (howm-view-search-folder-items key (howm-folder) + nil fixed-p)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; categorized todo-list + +;; Experimental [2006-01-16] + +(defun howm-menu-classified-reminder (classifier &optional comparer + title-format) + "Generate string of classified reminder-list. +CLASSIFIER is a function which receives an item and answers its class. +Class can be an arbitrary lisp object. +When class is nil, corresponding item is not shown in this list. +COMPARER is a function which receives two keys and answer t or nil. +It is used for sorting of keys. +TITLE-FORMAT is a format string for class title." + (let* ((a (howm-classify classifier + (howm-reminder-menu nil + howm-menu-todo-priority + nil))) + ;; key 'nil' is skipped. + (keys (remove nil (mapcar #'car a))) + (tform (concat (or title-format "--%s--") "\n"))) + (when comparer + (setq keys (sort keys comparer))) + (mapconcat (lambda (k) + (let* ((item-list (howm-first-n (cdr (assoc k a)) + howm-menu-todo-num)) + (is (howm-with-reminder-setting + (howm-todo-insert-separators + item-list + howm-menu-reminder-separators + t)))) + (concat (format tform k) + (howm-menu-general (format "reminder(%s)" k) 'todo + is)))) + keys "\n"))) + +(defun howm-menu-categorized-reminder (categories &optional title-format + erase-p omit-misc-p) + "Generate string of categorized reminder-list. + +Write %here%(howm-menu-categorized-reminder (\"foo\" \"bar\" \"baz\")) +to show categorized list in menu. (You don't need quote(') +before the above list; arguments are not evaluated in %here% +because I don't have enough courage to call eval.) + +If you like to erase category label from summary string, try +%here%(howm-menu-categorized-reminder (\"foo\" \"bar\" \"baz\") nil t) +instead. + +If you don't like misc. category, try +%here%(howm-menu-categorized-reminder (\"foo\" \"bar\" \"baz\") nil nil t)." + ;; Using categories, matcher, etc. in lambda is bad indeed + ;; because of dynamic binding. + (let* ((matcher (lambda (cat str item) + (and (string-match (regexp-quote cat) str) + (progn + (when erase-p + (howm-item-set-summary item + (replace-match "" nil nil + str))) + t)))) + (classifier (lambda (item) + (let ((s (howm-item-summary item))) + (or (howm-cl-find-if (lambda (c) + (funcall matcher c s item)) + categories) + (if omit-misc-p nil "misc."))))) + (pos (lambda (c) (or (howm-cl-position c categories) howm-infinity))) + (comparer (lambda (a b) (< (funcall pos a) (funcall pos b))))) + (howm-menu-classified-reminder classifier comparer title-format))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; generate initial menu + +(defun howm-menu-initialize-skel (&optional dummy) + (let ((menu-name (howm-get-symbol nil "howm-menu-" howm-menu-lang))) + (require menu-name) + (howm-menu-copy-skel (symbol-value menu-name)) + (howm-view-kill-buffer) + (howm-menu nil t))) + +(defun howm-menu-copy-skel (contents) + (let ((menu-file (or howm-menu-file + (expand-file-name "0000-00-00-000000.txt" + howm-directory))) + (r "^=")) + (if (file-exists-p menu-file) + ;; I have no courage to erase existing file. + (progn + (setq howm-menu-file menu-file) + (message "Assume %s as menu file." menu-file)) + (progn + (find-file menu-file) + (insert contents) + (goto-char (point-min)) + (while (re-search-forward r nil t) + (replace-match howm-view-title-header nil nil)) + (howm-mode 1) + (save-buffer))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; switch language + +(defun howm-require-lang (&optional lang) + (require (howm-get-symbol nil "howm-lang-" (or lang howm-menu-lang)))) + +(defun howm-lang-ref (var) + (let ((lang howm-menu-lang)) + (howm-require-lang lang) + ;; For backward compatibility, I use howm-day-of-week-en + ;; rather than howm-day-of-week:en. + (symbol-value (howm-get-symbol t var "-" lang)))) + +(defun howm-menu-command-table-raw () + (howm-lang-ref "howm-menu-command-table")) + +(defun howm-menu-command-table () + (append howm-menu-command-table-common + (mapcar (lambda (pair) (cons (regexp-quote (car pair)) (cdr pair))) + (howm-menu-command-table-raw)))) + +(defun howm-day-of-week () + (howm-lang-ref "howm-day-of-week")) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; misc. + +(defun howm-menu-p () + (string= major-mode "howm-menu-mode")) + +(defun howm-menu-name (file) + (format howm-menu-name-format file)) + +(defun howm-buffer-alive-p (buf) + (and buf (buffer-name buf))) + +(defun howm-menu-keyword-p (keyword) + (and howm-menu-keyword-regexp + (stringp keyword) ;; perhaps unnecessary + (string-match howm-menu-keyword-regexp keyword))) + +(defun howm-time< (t1 t2) + (or (< (car t1) (car t2)) + (and (= (car t1) (car t2)) + (< (second t1) (second t2))))) + +(defun howm-menu-invisible-region (beg end) + (if howm-menu-invisible + (put-text-property beg end 'invisible t) + (delete-region beg end)) +;; (put-text-property beg end 'intangible t) + ) + +;;; howm-menu.el ends here diff --git a/site-lisp/howm/howm-misc.el b/site-lisp/howm/howm-misc.el new file mode 100644 index 0000000..d684255 --- /dev/null +++ b/site-lisp/howm/howm-misc.el @@ -0,0 +1,1174 @@ +;;; howm-misc.el --- Wiki-like note-taking tool +;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm-misc.el,v 1.96 2012-12-29 08:57:18 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;;-------------------------------------------------------------------- + +(provide 'howm-misc) +(require 'howm) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Misc. + +(defun howm-version () + (interactive) + (message "howm-%s" howm-version)) + +(defun howm-keyword-file () + ;; create .howm-keys + (when (not (file-exists-p howm-keyword-file)) + (save-excursion + (find-file howm-keyword-file) + (when howm-menu-top + (goto-char (point-min)) + (insert howm-menu-top "\n")) + (set-buffer-modified-p t) + (save-buffer) + (kill-buffer nil) + (message "Generating %s ..." howm-keyword-file) + (howm-keyword-add-items (howm-all-items)) + (message "Done."))) + howm-keyword-file) + +(add-hook 'howm-view-open-hook 'howm-set-mode) +(defun howm-set-mode () + (when (howm-set-mode-p) + (howm-set-configuration-for-major-mode major-mode) + (howm-mode 1))) + +(defun howm-set-mode-p (&optional buf) + (with-current-buffer (or buf (current-buffer)) + (let ((hdir (car (howm-search-path)))) + (and (buffer-file-name) + (howm-folder-territory-p hdir (buffer-file-name)))))) + +(defun howm-normalize-file-name (filename) + (let ((f (file-truename (expand-file-name filename)))) + ;; for meadow + (if (string-match "^[A-Z]:" f) + (let ((drive (substring f 0 1)) + (rest (substring f 1))) + (concat (downcase drive) rest)) + f))) + +(defvar howm-configuration-for-major-mode nil) +;; ;; sample +;; (setq howm-configuration-for-major-mode +;; '( +;; ;; fix me +;; (emacs-lisp-mode +;; . ( +;; (howm-keyword-format . "(def[a-z*]+ +%s[ \t\r\n]") +;; (howm-keyword-regexp-format . "%s") +;; (howm-keyword-regexp . "(\\(def[a-z]+\\) +'?\\([-+=*/_~!@$%^&:<>{}?a-zA-Z0-9]+\\)") ;; ' for (defalias 'xxx ...) +;; (howm-keyword-regexp-hilit-pos . 1) +;; (howm-keyword-regexp-pos . 2) +;; (howm-view-title-regexp . "^(.*$") +;; ;; (howm-view-title-regexp . "^[^; \t\r\n].*$") +;; (howm-view-title-regexp-pos . 0) +;; (howm-view-title-regexp-grep . "^[^; \t\r\n].*$") +;; (howm-mode-title-face . nil) +;; (howm-keyword-list-alias-sep . nil) +;; (howm-view-preview-narrow . nil) +;; )) +;; (scheme-mode +;; . ( +;; (howm-keyword-format . "(def[a-z]+ +[(]?%s[) \t\r\n]") +;; (howm-keyword-regexp-format . "%s") +;; (howm-keyword-regexp . "(\\(def[a-z]+\\) +[(]?\\([-+=*/_~!@$%^&:<>{}?a-zA-Z0-9]+\\)") +;; (howm-keyword-regexp-hilit-pos . 1) +;; (howm-keyword-regexp-pos . 2) +;; (howm-view-title-regexp . "^[^; \t\r\n].*$") +;; (howm-view-title-regexp-pos . 0) +;; (howm-view-title-regexp-grep . "^[^; \t\r\n].*$") +;; (howm-mode-title-face . nil) +;; (howm-keyword-list-alias-sep . nil) +;; (howm-view-preview-narrow . nil) +;; )) +;; (ruby-mode +;; . ( +;; (howm-keyword-format . "\\(def\\|class\\) +%s\\b") +;; (howm-keyword-regexp-format . "%s") +;; (howm-keyword-regexp . "\\(def\\|class\\) +\\([-+=*/_~!@$%^&:<>{}?a-zA-Z0-9]+\\)") +;; (howm-keyword-regexp-hilit-pos . 1) +;; (howm-keyword-regexp-pos . 2) +;; (howm-view-title-regexp . "^[^# \t\r\n].*$") +;; (howm-view-title-regexp-pos . 0) +;; (howm-view-title-regexp-grep . "^[^# \t\r\n].*$") +;; (howm-mode-title-face . nil) +;; (howm-keyword-list-alias-sep . nil) +;; (howm-view-preview-narrow . nil) +;; )) +;; (yatex-mode +;; . ( +;; (howm-keyword-format . "\\\\label%s") +;; (howm-keyword-regexp-format . "%s") +;; (howm-keyword-regexp . "\\(\\\\label\\)\\({[^}\r\n]+}\\)") +;; (howm-keyword-regexp-hilit-pos . 1) +;; (howm-keyword-regexp-pos . 2) +;; (howm-view-title-regexp . "\\\\\\(\\(sub\\)*section\\|chapter\\|part\\|begin\\)") +;; (howm-view-title-regexp-pos . 0) +;; (howm-view-title-regexp-grep . "\\\\((sub)*section|chapter|part|begin)") +;; (howm-mode-title-face . nil) +;; (howm-keyword-list-alias-sep . nil) +;; (howm-view-preview-narrow . nil) +;; )) +;; )) + +(defun howm-set-configuration-for-file-name (f) + (let ((mode (howm-auto-mode f))) + (howm-set-configuration-for-major-mode mode))) + +(defun howm-set-configuration-for-major-mode (mode) + (let ((a (cdr (assoc mode howm-configuration-for-major-mode)))) + (when a ;; I know this is redundant. + (mapc (lambda (sv) + (let ((symbol (car sv)) + (value (cdr sv))) + (set (make-local-variable symbol) value))) + a)))) + +(defmacro howm-if-unbound (var &rest alt-body) + `(if (boundp ',var) ,var ,@alt-body)) + +;; copied and modified from set-auto-mode in /usr/share/emacs/21.2/lisp/files.el +;; (I don't want to set the mode actually. Sigh...) +(howm-dont-warn-free-variable auto-mode-interpreter-regexp) +(defvar howm-auto-mode-interpreter-regexp + (howm-if-unbound auto-mode-interpreter-regexp + ;; xemacs doesn't have it. + "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)")) +(defun howm-auto-mode (&optional file-name) + "Major mode appropriate for current buffer. +This checks for a -*- mode tag in the buffer's text, +compares the filename against the entries in `auto-mode-alist', +or checks the interpreter that runs this file against +`interpreter-mode-alist'. + +It does not check for the `mode:' local variable in the +Local Variables section of the file; for that, use `hack-local-variables'. + +If `enable-local-variables' is nil, this function does not check for a +-*- mode tag. + +This function merely returns the mode; it does not set the mode. +" + ;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*- + (let (beg end done modes ans) + (save-excursion + (goto-char (point-min)) + (skip-chars-forward " \t\n") + (and enable-local-variables + ;; Don't look for -*- if this file name matches any + ;; of the regexps in inhibit-first-line-modes-regexps. + (let ((temp (howm-if-unbound inhibit-first-line-modes-regexps + inhibit-local-variables-regexps)) + (name (file-name-sans-versions (or file-name "")))) + (while (let ((sufs (howm-if-unbound inhibit-first-line-modes-suffixes + inhibit-local-variables-suffixes))) + (while (and sufs (not (string-match (car sufs) name))) + (setq sufs (cdr sufs))) + sufs) + (setq name (substring name 0 (match-beginning 0)))) + (while (and temp + (not (string-match (car temp) name))) + (setq temp (cdr temp))) + (not temp)) + (search-forward "-*-" (save-excursion + ;; If the file begins with "#!" + ;; (exec interpreter magic), look + ;; for mode frobs in the first two + ;; lines. You cannot necessarily + ;; put them in the first line of + ;; such a file without screwing up + ;; the interpreter invocation. + (end-of-line (and (looking-at "^#!") 2)) + (point)) t) + (progn + (skip-chars-forward " \t") + (setq beg (point)) + (search-forward "-*-" + (save-excursion (end-of-line) (point)) + t)) + (progn + (forward-char -3) + (skip-chars-backward " \t") + (setq end (point)) + (goto-char beg) + (if (save-excursion (search-forward ":" end t)) + ;; Find all specifications for the `mode:' variable + ;; and execute them left to right. + (while (let ((case-fold-search t)) + (or (and (looking-at "mode:") + (goto-char (match-end 0))) + (re-search-forward "[ \t;]mode:" end t))) + (skip-chars-forward " \t") + (setq beg (point)) + (if (search-forward ";" end t) + (forward-char -1) + (goto-char end)) + (skip-chars-backward " \t") + (push (intern (concat (downcase (buffer-substring beg (point))) "-mode")) + modes)) + ;; Simple -*-MODE-*- case. + (push (intern (concat (downcase (buffer-substring beg end)) + "-mode")) + modes))))) + ;; If we found modes to use, set done. + (dolist (mode (nreverse modes)) + (when (functionp mode) + (setq ans mode) + (setq done t))) + ;; If we didn't find a mode from a -*- line, try using the file name. + (if (and (not done) file-name) + (let ((name file-name) + (keep-going t)) + ;; Remove backup-suffixes from file name. + (setq name (file-name-sans-versions name)) + (while keep-going + (setq keep-going nil) + (let ((alist auto-mode-alist) + (mode nil)) + ;; Find first matching alist entry. + (let ((case-fold-search + (memq system-type '(vax-vms windows-nt)))) + (while (and (not mode) alist) + (if (string-match (car (car alist)) name) + (if (and (consp (cdr (car alist))) + (nth 2 (car alist))) + (setq mode (car (cdr (car alist))) + name (substring name 0 (match-beginning 0)) + keep-going t) + (setq mode (cdr (car alist)) + keep-going nil))) + (setq alist (cdr alist)))) + (if mode + (setq ans mode) + ;; If we can't deduce a mode from the file name, + ;; look for an interpreter specified in the first line. + ;; As a special case, allow for things like "#!/bin/env perl", + ;; which finds the interpreter anywhere in $PATH. + (let ((interpreter + (save-excursion + (goto-char (point-min)) + (if (looking-at howm-auto-mode-interpreter-regexp) + (match-string 2) + ""))) + elt) + ;; Map interpreter name to a mode. + (setq elt (assoc (file-name-nondirectory interpreter) + interpreter-mode-alist)) + (if elt + (setq ans (cdr elt))))))))) + ans + )) + +;; copied from /usr/share/emacs/21.2/lisp/subr.el +;; for emacs20 and xemacs +(when (not (fboundp 'replace-regexp-in-string)) + (defun replace-regexp-in-string (regexp rep string &optional + fixedcase literal subexp start) + "Replace all matches for REGEXP with REP in STRING. + +Return a new string containing the replacements. + +Optional arguments FIXEDCASE, LITERAL and SUBEXP are like the +arguments with the same names of function `replace-match'. If START +is non-nil, start replacements at that index in STRING. + +REP is either a string used as the NEWTEXT arg of `replace-match' or a +function. If it is a function it is applied to each match to generate +the replacement passed to `replace-match'; the match-data at this +point are such that match 0 is the function's argument. + +To replace only the first match (if any), make REGEXP match up to \\' +and replace a sub-expression, e.g. + (replace-regexp-in-string \"\\(foo\\).*\\'\" \"bar\" \" foo foo\" nil nil 1) + => \" bar foo\" +" + + ;; To avoid excessive consing from multiple matches in long strings, + ;; don't just call `replace-match' continually. Walk down the + ;; string looking for matches of REGEXP and building up a (reversed) + ;; list MATCHES. This comprises segments of STRING which weren't + ;; matched interspersed with replacements for segments that were. + ;; [For a `large' number of replacments it's more efficient to + ;; operate in a temporary buffer; we can't tell from the function's + ;; args whether to choose the buffer-based implementation, though it + ;; might be reasonable to do so for long enough STRING.] + (let ((l (length string)) + (start (or start 0)) + matches str mb me) + (save-match-data + (while (and (< start l) (string-match regexp string start)) + (setq mb (match-beginning 0) + me (match-end 0)) + ;; If we matched the empty string, make sure we advance by one char + (when (= me mb) (setq me (min l (1+ mb)))) + ;; Generate a replacement for the matched substring. + ;; Operate only on the substring to minimize string consing. + ;; Set up match data for the substring for replacement; + ;; presumably this is likely to be faster than munging the + ;; match data directly in Lisp. + (string-match regexp (setq str (substring string mb me))) + (setq matches + (cons (replace-match (if (stringp rep) + rep + (funcall rep (match-string 0 str))) + fixedcase literal str subexp) + (cons (substring string start mb) ; unmatched prefix + matches))) + (setq start me)) + ;; Reconstruct a string from the pieces. + (setq matches (cons (substring string start l) matches)) ; leftover + (apply #'concat (nreverse matches))))) + ) + +(howm-defvar-risky howm-kill-all-enable-force nil) +(defun howm-kill-all (&optional force-p) + "Kill all buffers which is howm-mode and unmodified." + (interactive "P") + (let ((anyway (and force-p howm-kill-all-enable-force))) + (when (if anyway + (yes-or-no-p "Discard all unsaved changes on howm-mode buffers? ") + (y-or-n-p "Kill all howm-mode buffers? ")) + (when (eq major-mode 'howm-view-summary-mode) + (howm-view-restore-window-configuration)) + (mapc (lambda (b) + (when (howm-buffer-p b) + (when anyway + (switch-to-buffer b) + (set-buffer-modified-p nil)) ;; dangerous! + (when (not (buffer-modified-p b)) + (kill-buffer b)))) + (buffer-list)) + (message "Done.")))) + +(defun howm-toggle-buffer () + (interactive) + (if (howm-buffer-p) + (howm-switch-to-nonhowm-buffer) + (howm-switch-to-howm-buffer))) +(defun howm-switch-to-howm-buffer () + (interactive) + (let ((b (howm-find-buffer #'howm-buffer-p))) + (if b + (switch-to-buffer b) + (howm-menu)))) +(defun howm-switch-to-nonhowm-buffer () + (interactive) + (switch-to-buffer (or (howm-find-buffer #'(lambda (b) + (not (howm-buffer-p b)))) + (error "No nonhowm buffer")))) + +(defun howm-find-buffer (pred) + (catch :found + (mapc (lambda (b) + (cond ((howm-internal-buffer-p b) nil) ;; skip + ((funcall pred b) (throw :found b)) + (t t))) + (buffer-list)) + nil)) + +(defun howm-internal-buffer-p (buf) + (string= (substring (buffer-name buf) 0 1) " ")) + +(defun howm-buffer-p (&optional buf) + (let* ((indep-dirs (cons nil *howm-independent-directories*)) + (keyword-bufs (mapcar + (lambda (d) + (let ((default-directory (or d default-directory))) + (howm-keyword-buffer))) + indep-dirs))) + (with-current-buffer (or buf (current-buffer)) + (or howm-mode + (member major-mode + '(howm-view-summary-mode + howm-view-contents-mode)) + (member buf keyword-bufs))))) + +(defun howm-mode-add-font-lock () + (cheat-font-lock-append-keywords (howm-mode-add-font-lock-internal))) + +(defun howm-mode-add-font-lock-internal () + (when howm-use-color + `(,@howm-user-font-lock-keywords + (,howm-view-title-regexp + (0 howm-mode-title-face prepend)) + (,howm-keyword-regexp + (,howm-keyword-regexp-hilit-pos howm-mode-keyword-face prepend)) + (,howm-ref-regexp + (,howm-ref-regexp-hilit-pos howm-mode-ref-face prepend)) + (,howm-wiki-regexp + (,howm-wiki-regexp-pos howm-mode-wiki-face prepend)) + ))) + +;;; unofficial. may be removed if no one needs them. + +(defun howm-show-buffer-as-howm () + (interactive) + (let* ((name (buffer-name)) + (pos (point)) + (s (buffer-substring-no-properties (point-min) (point-max))) + (b (get-buffer-create (format "*howm[%s]*" name)))) + (set-buffer b) + (howm-rewrite-read-only-buffer + (insert s) + (howm-mode 1) + (howm-initialize-buffer)) +;; (howm-fontify) + (goto-char pos) + (switch-to-buffer b))) + +;;; narrowing + +(defun howm-narrow-to-memo () + (interactive) + (apply #'narrow-to-region (howm-view-paragraph-region t))) + +(defun howm-toggle-narrow () + (interactive) + (if (howm-narrow-p) + (widen) + (howm-narrow-to-memo))) + +(put 'howm-narrow-to-memo 'disabled t) +(put 'howm-toggle-narrow 'disabled t) + +(defun howm-narrow-p () + (let ((b (point-min)) + (e (point-max))) + (save-restriction + (widen) + (not (and (equal b (point-min)) + (equal e (point-max))))))) + +(defun howm-auto-narrow () + (when (cond (*howm-view-item-privilege* nil) + ((eq howm-auto-narrow t) t) + (t (member (howm-command) howm-auto-narrow))) + (howm-narrow-to-memo))) +;; (when (and (member (howm-command) howm-auto-narrow) +;; (not *howm-view-item-privilege*)) + +;;; select file for new memo by hand + +(defun howm-create-interactively (&optional use-current-directory) + (interactive "P") + (find-file (read-file-name "Memo file: " + (if use-current-directory + nil + howm-directory))) + (goto-char (point-max)) + (howm-create-here)) + +;;; next/previous memo + +(defmacro howm-save-narrowing (&rest body) + (declare (indent 0)) + `(let ((narrowp (howm-narrow-p))) + (when narrowp + (widen)) + (unwind-protect + (progn + ,@body) + (when narrowp + (howm-narrow-to-memo))))) + +(defun howm-next-memo (n) + (interactive "p") + (howm-save-narrowing + (when (looking-at howm-view-title-regexp) + (setq n (+ n 1))) + (re-search-forward howm-view-title-regexp nil nil n))) + +(defun howm-previous-memo (n) + (interactive "p") + (howm-save-narrowing + (when (not (looking-at howm-view-title-regexp)) + (setq n (+ n 1))) + (re-search-backward howm-view-title-regexp nil nil n))) + +(defun howm-first-memo () + (interactive) + (howm-save-narrowing + (goto-char (point-min)))) + +(defun howm-last-memo () + (interactive) + (howm-save-narrowing + (goto-char (point-max))) + (re-search-backward howm-view-title-regexp)) + +;;; random walk + +(defvar howm-random-walk-buf nil "for internal use") +(defvar howm-random-walk-ro t "for internal use") + +(defun howm-random-walk () + (interactive) + (let ((orig-bufs (buffer-list)) + (howm-history-file nil)) + (while (let ((v (frame-visible-p (selected-frame)))) + (and v (not (eq v 'icon)) + (not (input-pending-p)))) + (unwind-protect + (cond ((eq major-mode 'howm-view-summary-mode) + (howm-random-walk-summary)) + (howm-mode + (howm-random-walk-text)) + (t + (howm-list-all) + (howm-random-walk-summary))) + (mapc (lambda (b) + (when (and (not (member b orig-bufs)) + (null (get-buffer-window b))) + (kill-buffer b))) + (buffer-list))) + (sit-for howm-random-walk-wait)))) + +(defun howm-random-walk-summary () + (let ((n (length (riffle-item-list)))) + (goto-char (point-min)) + (forward-line (random n)) + (howm-view-summary-check) + (sit-for howm-random-walk-wait) + (howm-view-summary-open))) + +(defun howm-random-walk-text () + (let* ((ks (howm-keyword-for-goto)) + (k (nth (random (length ks)) ks)) + (d (- (point-max) (point-min)))) + (goto-char (+ (point-min) (random d))) + (if (search-forward k nil t) + (goto-char (match-beginning 0)) + (search-backward k nil t)) + (sit-for howm-random-walk-wait) + (howm-keyword-search k))) + +;; named note + +(defun howm-open-named-file () + "Ask a file name and open it as howm note if it is under howm directory." + (interactive) + (let* ((item-dir (lambda (item) (file-name-directory (howm-item-name item)))) + (dir (cond ((eq major-mode 'howm-view-summary-mode) + (funcall item-dir (howm-view-summary-current-item))) + ((eq major-mode 'howm-view-contents-mode) + (funcall item-dir (howm-view-contents-current-item))) + (t + howm-directory))) + (fname (read-file-name "Howm file name: " dir))) + (find-file fname) + (if (file-exists-p fname) + (howm-set-mode) + (progn + (howm-insert-template "") + (howm-create-finish))))) + +;; imitation of remember.el +;; http://www.emacswiki.org/cgi-bin/emacs-en/RememberMode + +;; shamelessly copied from http://newartisans.com/johnw/Emacs/remember.el +;; (I cannot browse http://sacha.free.net.ph/notebook/emacs/dev today.) + +(defvar howm-remember-wconf nil + "for internal use") +(defvar howm-remember-buffer-name "*howm-remember*") +(defvar howm-remember-mode-hook nil) +(let ((m (make-sparse-keymap))) + (define-key m "\C-c\C-c" 'howm-remember-submit) + (define-key m "\C-c\C-k" 'howm-remember-discard) + (howm-defvar-risky howm-remember-mode-map m)) + +(defun howm-remember () + "Add text to new note in howm." + (interactive) + (setq howm-remember-wconf (current-window-configuration)) + (switch-to-buffer-other-window (get-buffer-create howm-remember-buffer-name)) + (howm-remember-mode) + (apply #'message + `("Remember (%s) or discard (%s)." + ,@(mapcar (lambda (f) + (key-description + (where-is-internal f howm-remember-mode-map t))) + '(howm-remember-submit howm-remember-discard))))) + +(defun howm-remember-mode () + "Major mode for `howm-remember'. + +\\{howm-remember-mode-map}" + (interactive) + (kill-all-local-variables) + (text-mode) + (use-local-map howm-remember-mode-map) + (setq major-mode 'howm-remember-mode + mode-name "HowmRemember") + (run-hooks 'howm-remember-mode-hook)) + +(defun howm-remember-submit () + (interactive) + (save-excursion + (let* ((title (howm-remember-get-title)) ;; has side effect + (s (buffer-substring-no-properties (point-min) (point-max)))) + (set-window-configuration howm-remember-wconf) + (howm-create-file-with-title title) + (insert s "\n") + (save-buffer) + (kill-buffer (current-buffer)))) + (howm-remember-discard)) + +(defun howm-remember-get-title () + (if (not howm-remember-first-line-to-title) + "" + (progn + (goto-char (point-min)) + (prog1 + (buffer-substring-no-properties (point-min) + (line-end-position)) + (forward-line 1) + (delete-region (point-min) (point)))))) + +(defun howm-remember-discard () + (interactive) + (kill-buffer (current-buffer)) + (set-window-configuration howm-remember-wconf)) + +;; Rename buffer +;; +;; You can rename howm buffers based on their titles. +;; Only buffer names in emacs are changed; file names are kept unchanged. +;; +;; Add the next lines to your .emacs if you like this feature. +;; (add-hook 'howm-mode-hook 'howm-mode-set-buffer-name) +;; (add-hook 'after-save-hook 'howm-mode-set-buffer-name) +;; +;; The original idea and code are given by Mielke-san (peter at exegenix.com). +;; http://lists.sourceforge.jp/mailman/archives/howm-eng/2006/000020.html +;; thx! + +(defvar howm-buffer-name-limit 20) +(defvar howm-buffer-name-total-limit howm-buffer-name-limit) +(defvar howm-buffer-name-format "%s" + "Buffer name format for `howm-mode-set-buffer-name'. +For example, buffer name is _ABC_ if title is ABC and the value of +this variable is \"_%s_\".") + +(defun howm-truncate-string (string limit &optional dots-str) + "Truncate STRING if it is longer than LIMIT. +For example, \"1234567...\" is returned if string is \"123456789012\" +and limit is 10. +When DOTS-STR is non-nil, it is used instead of \"...\"." + (let ((dots (or dots-str "..."))) + (when (> (length dots) limit) + (setq dots (substring dots 0 limit))) + (if (> (length string) limit) + (concat (substring string 0 (- limit (length dots))) + dots) + string))) + +(defun howm-set-buffer-name-from-title (checker title-regexp title-regexp-pos) + "Set the buffer name to the title(s) of the file." + (when (funcall checker) + (save-excursion + (goto-char 0) + (let ((titles nil)) + (while (re-search-forward title-regexp nil t) + (setq titles + (cons (match-string-no-properties title-regexp-pos) + titles))) + (let ((name0 (mapconcat + (lambda (s) + (howm-truncate-string s howm-buffer-name-limit)) + (reverse (howm-cl-remove-if (lambda (s) (string= s "")) + titles)) + "/"))) + (when (not (string= name0 "")) ;; exclude "no title" case + (let ((name (format howm-buffer-name-format + (howm-truncate-string + name0 + howm-buffer-name-total-limit)))) + (rename-buffer name t)))))))) + +(defun howm-mode-set-buffer-name () + (howm-set-buffer-name-from-title (lambda () + (and howm-mode (buffer-file-name))) + howm-view-title-regexp + howm-view-title-regexp-pos)) + +;; memoize: used in howm-bayesian-set + +(defun howm-memoize-put (fname value) + (put fname 'howm-memoize value)) +(defun howm-memoize-get (fname) + (get fname 'howm-memoize)) + +(defun howm-memoize-call (fname func args) + (let* ((p (assoc args (howm-memoize-get fname)))) + (if p + (progn +;; (message "hit %s" p) + (cdr p)) + (let ((r (apply func args))) + ;; We need to get it again because func can change memory. + (howm-memoize-put fname `((,args . ,r) ,@(howm-memoize-get fname))) + r)))) + +(defun howm-memoize-reset (fname) + (howm-memoize-put fname nil)) + +(defmacro howm-defun-memoize (fname args &rest body) + (declare (indent 2)) + `(progn + (howm-memoize-reset ',fname) + (defun ,fname ,args + "Function generated by `howm-defun-memoize'" + (howm-memoize-call ',fname (lambda ,args ,@body) (list ,@args))))) + +;; ;; test +;; (howm-memoize-reset 'fib) +;; (howm-defun-memoize fib (n) (if (<= n 1) 1 (+ (fib (- n 1)) (fib (- n 2))))) +;; (fib 5) +;; (howm-memoize-get 'fib) + +;; Bayesian set +;; +;; "M-x howm-bayesian-set RET lisp scheme haskell RET" to estimate +;; related keywords with lisp, scheme, and haskell. +;; If you are lucky, you may find ruby, elisp, gauche, etc. +;; in estimated candidates. +;; +;; (ref.) +;; Zoubin Ghahramani and Katherine Heller: "Bayesian Sets", +;; Advances in Neural Information Processing Systems, +;; Vol. 18, pp. 435-442, MIT Press, 2006. +;; http://books.nips.cc/nips18.html +;; http://books.nips.cc/papers/files/nips18/NIPS2005_0712.pdf + +(defun howm-bset-nodup (f &rest args) + (howm-cl-remove-duplicates (apply f args) :test #'equal)) +(defun howm-bset-mapcar (func lis) + (howm-bset-nodup #'mapcar func lis)) +(defun howm-bset-mapcan (func lis) + (howm-bset-nodup (lambda (f z) (apply #'append (mapcar f z))) + func lis)) + +(defun howm-bset-message (&rest args) + (let (message-log-max) ;; prevent it from being logged + (apply #'message args))) + +(defun howm-bset-matched-files (query) +;; (howm-bset-message "Finding files for query (%s)..." query) + (howm-bset-mapcar #'howm-item-name + (howm-view-search-folder-items query (howm-folder) + nil t))) + +(howm-defun-memoize howm-bset-keywords-in-file* (file keyword-list) +;; (howm-bset-message "Finding keywords in file (%s)..." file) + (with-temp-buffer + (insert-file-contents file) + (howm-keyword-for-goto keyword-list))) + +(defun howm-bset-keywords-in-file (file) + (howm-bset-keywords-in-file* file nil)) + +(defun howm-bset-candidate-keywords (query-list) +;; (howm-bset-message "Collecting keywords...") + (let ((files (howm-bset-mapcan #'howm-bset-matched-files + query-list))) + (howm-bset-mapcan (lambda (f) + (howm-bset-message "Collecting keywords in file (%s)..." + f) + (howm-bset-keywords-in-file f)) + files))) + +(howm-defun-memoize howm-bset-file-score (file query-list + coef number-of-all-keywords) +;; (howm-bset-message "Scoring file (%s)..." file) + (let* ((m (/ (length (howm-bset-keywords-in-file file)) + (float number-of-all-keywords))) + (a (* coef m)) + (b (* coef (- 1 m))) + (s (length (howm-bset-keywords-in-file* file query-list))) + (a2 (+ a s)) + (b2 (+ b (- (length query-list) s)))) + ;; log{(a2/a) * (b/b2)} + (- (- (log a2) (log a)) (- (log b2) (log b))))) + +(howm-defun-memoize howm-bset-keyword-score (keyword query-list + coef + number-of-all-keywords) + (howm-bset-message "Scoring keyword (%s)..." keyword) + (apply #'+ + (mapcar (lambda (file) + (howm-bset-file-score file query-list coef + number-of-all-keywords)) + (howm-bset-matched-files keyword)))) + +(defun howm-bset-reset () + (mapc #'howm-memoize-reset '(howm-bset-file-score + howm-bset-keyword-score + howm-bset-keywords-in-file*))) + +(defun howm-bset (query-list) + (howm-bset-reset) + (unwind-protect + (let ((n (length (howm-keyword-list))) + (c 2.0)) ;; heuristic value + (sort (copy-sequence (howm-bset-candidate-keywords query-list)) + (lambda (k1 k2) + (apply #'> + (mapcar (lambda (k) + (howm-bset-keyword-score k query-list c n)) + (list k1 k2)))))) + (howm-bset-reset))) + +(defun howm-bayesian-set (query-str) + (interactive "sQueries: ") + (switch-to-buffer (get-buffer-create "*howm-bayesian-set*")) + (howm-rewrite-read-only-buffer + (insert (mapconcat #'identity + (howm-bset (split-string query-str)) + "\n")) + (howm-mode 1)) + (goto-char (point-min)) + (howm-bset-message "Done.")) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Fellowship + +;; xemacs: add-to-list doesn't have APPEND +;; (add-to-list 'auto-mode-alist '("\\.howm$" . text-mode) t) +(setq auto-mode-alist (append auto-mode-alist + (list '("\\.howm$" . text-mode)))) + +;; xyzzy doesn't have eval-after-load. +;; It will be useless anyway. +(when (not (fboundp 'eval-after-load)) + (defun eval-after-load (file form) + nil)) + +;; xemacs canna doesn't use minor-mode. [2004-01-30] +(defvar action-lock-mode-before-canna nil) +(make-variable-buffer-local 'action-lock-mode-before-canna) +(defadvice canna:enter-canna-mode (around action-lock-fix activate) + (setq action-lock-mode-before-canna action-lock-mode) + (setq action-lock-mode nil) + ad-do-it) +(defadvice canna:quit-canna-mode (around action-lock-fix activate) + (setq action-lock-mode action-lock-mode-before-canna) + ad-do-it) + +;; (obsolete) +;; +;; If you have a trouble on behavior of RET key, check this first: +;; (progn (print (mapcar #'car minor-mode-map-alist)) nil) + +(defvar howm-ime-fix nil) +(when howm-ime-fix + (progn + (defun howm-raise-in-minor-mode-map-alist (mode) + "Raise MODE to the top in minor-mode-map-alist" + (let* ((pair (assoc mode minor-mode-map-alist))) + (when pair + (setq minor-mode-map-alist + (cons pair + ;; Duplications must be removed for canna. Sigh... + (remove pair minor-mode-map-alist)))))) + + ;; for canna [2003/09/21] + ;; canna modes should be prior to howm modes. + (defun howm-canna-fix () + (mapc #'howm-raise-in-minor-mode-map-alist + '(canna:*fence-mode* canna:*select-mode*))) + ;; I don't understand curious behavior on duplicate canna:*fence-mode* + ;; in minor-mode-map-alist. It happens *after* '.emacs'. + (defadvice canna-toggle-japanese-mode (around howm-fix activate) + (howm-canna-fix) + ad-do-it + (howm-canna-fix)) + + ;; for yc.el [2003-11-29][2004-01-15] + ;; http://www.ceres.dti.ne.jp/~knak/yc.html + (defun howm-yc-fix () + (mapc #'howm-raise-in-minor-mode-map-alist + '(yc-mode + yc-henkan-mode + yc-input-mode + yc-edit-mode + yc-select-mode + yc-defword-mode + yc-wclist-mode))) + (defadvice yc-rK-trans (around howm-fix activate) + (howm-yc-fix) + ad-do-it) + ;; (eval-after-load "yc" + ;; '(mapc #'howm-raise-in-minor-mode-map-alist + ;; '(yc-mode + ;; yc-henkan-mode + ;; yc-input-mode + ;; yc-edit-mode + ;; yc-select-mode + ;; yc-defword-mode + ;; yc-wclist-mode))) + + ;; for tamago [2003-12-20] + (eval-after-load "egg" + '(mapc #'howm-raise-in-minor-mode-map-alist + '(egg:henkan-mode-in-use egg-mode egg:*in-fence-mode*))) + + ;; for anthy [2003-12-29] + (eval-after-load "anthy" + '(mapc #'howm-raise-in-minor-mode-map-alist + '(anthy-minor-mode))) + )) + +;; for mcomplete.el [2003-12-17] +;; http://homepage1.nifty.com/bmonkey/emacs/elisp/mcomplete.el +;; error when this-command is (lambda () (interactive) ...) +(defadvice mcomplete-p (around symbol-check activate) + (and (symbolp this-command) + ad-do-it)) + +;; for auto-save-buffers.el [2004-01-10] +;; http://www.namazu.org/~satoru/auto-save/ +;; http://homepage3.nifty.com/oatu/emacs/misc.html +;; http://www.bookshelf.jp/cgi-bin/goto.cgi?file=meadow&node=auto%20save +(defvar howm-auto-save-buffers-disposed nil) +(howm-dont-warn-free-variable auto-save-buffers-regexp) +(howm-dont-warn-free-variable auto-save-reject-buffers-regexp) +(defun howm-auto-save-buffers-p () + (let ((f (howm-file-name))) + (and (if (boundp 'auto-save-buffers-regexp) + (string-match auto-save-buffers-regexp f) + nil) + (if (boundp 'auto-save-reject-buffers-regexp) + (not (string-match auto-save-reject-buffers-regexp f)) + t)))) +(defun howm-auto-save-buffers-dispose () + (setq howm-menu-refresh-after-save nil) + (setq howm-refresh-after-save nil) + (setq howm-auto-save-buffers-disposed t) + (message "howm: Automatic refresh is disabled when auto-save-buffers is called.")) +(defadvice auto-save-buffers (around howm-dispose activate) + (if (or howm-auto-save-buffers-disposed + (not (howm-auto-save-buffers-p))) + ad-do-it + (howm-auto-save-buffers-dispose))) +(defun howm-basic-save-buffer () + "Silent version of `basic-save-buffer' without \"Wrote ...\" message." + (let ((original-write-region (symbol-function 'write-region))) + ;; make silent `write-region', which doesn't say "Wrote ...". + ;; I borrowed the idea from Okuyama's auto-save-buffers. thx. + ;; http://homepage3.nifty.com/oatu/emacs/misc.html + (flet ((write-region (start end filename + &optional append visit lockname must) + (funcall original-write-region + start end filename append + 'dont-say-wrote-foobar + lockname must))) + (basic-save-buffer))) + ;; As a side effect, basic-save-buffer does not update buffer-modified-p. + (set-visited-file-modtime) + (set-buffer-modified-p nil)) + +;; howm on ChangeLog Memo +(defun howm-setup-change-log () + (setq howm-keyword-format "\t* %s") + (setq howm-keyword-regexp "^\t\\(\\*\\)[ \t]+\\([^:\r\n]+\\)") + (setq howm-keyword-regexp-hilit-pos 1) ;; 「関連キーワード」用 + (setq howm-keyword-regexp-pos 2) + (setq howm-view-title-regexp "^$") + (setq howm-view-title-regexp-pos 0) + (setq howm-view-title-regexp-grep 'sorry-not-yet) + (setq howm-use-color nil) + (setq howm-menu-top nil) + (defadvice howm-exclude-p (around change-log (filename) activate) + (setq ad-return-value + (not (find-if (lambda (dir) + (string= (howm-file-name) + (file-relative-name filename dir))) + (howm-search-path))))) + (defadvice howm-create-file-with-title (around change-log (title) activate) + (howm-create-file) + (when (string-match howm-keyword-regexp title) + (setq title (match-string-no-properties howm-keyword-regexp-pos + title))) + (insert title)) + (defadvice howm-create-file (around change-log + (&optional keep-cursor-p) activate) + (let* ((default (howm-file-name)) + (file (expand-file-name default howm-directory)) + (dir (file-name-directory file)) + (buffer-file-name file)) ;; don't insert file name + (make-directory dir t) + (add-change-log-entry nil file))) + (add-hook 'change-log-mode-hook 'howm-mode) + ) + +;; howm with ChangeLog Memo +(defvar howm-change-log-file-name "ChangeLog") +(defun howm-to-change-log () + (interactive) + (let* ((title (howm-title-at-current-point)) + (file (expand-file-name howm-change-log-file-name howm-directory)) + ;; cheat add-change-log-entry + (buffer-file-name title) + (default-directory howm-directory)) + (add-change-log-entry nil file))) +(defun howm-from-change-log () + (interactive) + (let* ((title-regexp "^\t[*][ \t]*\\(.*\\)$") + (title-regexp-pos 1) + (title (howm-title-at-current-point nil + title-regexp title-regexp-pos))) + (howm-create-file-with-title title))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Bug Report + +;; Japanese is assumed at now. + +(defun howm-test () + "Show bug report template for howm." + (howm-set-lang) + (howm-bug-report)) + +(defun howm-set-lang () + (set-language-environment "Japanese") + (set-default-coding-systems 'euc-jp) + (set-buffer-file-coding-system 'euc-jp-unix) + (set-terminal-coding-system 'euc-jp) + (set-keyboard-coding-system 'euc-jp) + ) + +(defun howm-compiled-p () + (byte-code-function-p (symbol-function 'howm-compiled-p))) +(defun howm-make-file-p () + (eval-when-compile + (getenv "HOWM_MAKE"))) +(defun howm-test-p () + (getenv "HOWM_TEST")) + +(defun howm-bug-report (&optional show-sym) + (interactive "P") + (let ((report-buf (format-time-string "howm-bug-report-%Y%m%d-%H%M%S")) + (template "sample/bug-report.txt")) + (switch-to-buffer report-buf) + (when (not (howm-buffer-empty-p)) + (error "Buffer %s exists (and not empty)." report-buf)) + (if (file-exists-p template) + (insert-file-contents template) + (insert "Please copy the following text to your bug report.\n\n")) + (goto-char (point-max)) + (mapc (lambda (sv) + (insert (format "%s: %s\n" (car sv) (cdr sv)))) + `( + ("howm" . ,(howm-version-long)) + ,@(honest-report-version-assoc) + )) + (when (eq howm-view-use-grep t) + (insert + (format "grep: %s - %s\n" + (howm-cl-mapcan (lambda (d) + (let ((f (expand-file-name + howm-view-grep-command d))) + (and (file-executable-p f) + (list f)))) + exec-path) + (car (howm-call-process "grep" '("--version")))))) + (when show-sym + (goto-char (point-max)) + (insert "\n(List of variables)\n") + (insert (howm-symbols-desc))) + (goto-char (point-min)))) + +(defun howm-version-long () + (format "%s (compile: %s, make: %s, test: %s)" + howm-version + (howm-compiled-p) + (howm-make-file-p) + (howm-test-p))) + +(defun howm-symbols-desc (&optional max-desc-len) + (when (null max-desc-len) + (setq max-desc-len 50)) + (apply #'concat + (mapcar (lambda (sym) + (when (boundp sym) + (let ((v (format "%S" (symbol-value sym)))) + (when (and (numberp max-desc-len) + (< max-desc-len (length v))) + (setq v + (let* ((tl (/ max-desc-len 4)) + (hd (- max-desc-len tl))) + (concat (substring v 0 hd) + " ... " + (substring v (- tl)))))) + (format "%s: %s\n" (symbol-name sym) v)))) + (sort (howm-symbols) + (lambda (x y) + (string< (symbol-name x) (symbol-name y))))))) + +(defvar howm-required-features '( + cheat-font-lock + action-lock + riffle + gfunc + illusion + honest-report + ) + "List of features which are required for, and distributed with, howm itself.") + +(defun howm-prefix-names () + (mapcar #'symbol-name (cons 'howm howm-required-features))) + +(defun howm-symbols () + (let* ((reg (format "^%s" (regexp-opt (howm-prefix-names) t))) + (a nil)) + (mapatoms (lambda (s) + (when (string-match reg (symbol-name s)) + (setq a (cons s a))))) + a)) + +(defun howm-elp () + (interactive) + (mapcar #'elp-instrument-package + (howm-prefix-names))) + +(defvar howm-sample-directory (expand-file-name "sample/") + "for internal use") +(defun howm-bug-shot () + (interactive) + (let* ((version (concat "[howm] " (howm-version-long))) + (init (and (howm-test-p) + (let ((f (expand-file-name "dot.emacs" + howm-sample-directory))) + (and (file-readable-p f) + (with-temp-buffer + (insert-file-contents f) + (buffer-substring-no-properties (point-min) + (point-max))))))) + (header (if init + (concat version "\n\n[init]\n" init) + version)) + (footer "--- your comment ---")) + (honest-report header footer) + (message "Please copy this buffer to your report."))) + +;;; howm-misc.el ends here diff --git a/site-lisp/howm/howm-mkmenu.el b/site-lisp/howm/howm-mkmenu.el new file mode 100644 index 0000000..23fb4f7 --- /dev/null +++ b/site-lisp/howm/howm-mkmenu.el @@ -0,0 +1,73 @@ +;;; howm-mkmenu.el --- Wiki-like note-taking tool +;;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm-mkmenu.el,v 1.11 2011-12-31 15:07:29 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;-------------------------------------------------------------------- + +;; emacs -q --no-site-file -batch -l + +(defvar howm-mkmenu-rules + '( + ;; ( [ ]) ==> .el + (howm-menu-en "en/0000-00-00-000000.txt") + (howm-menu-ja "ja/0000-00-00-000000.txt" euc-jp iso-2022-7bit) + )) + +(defmacro howm-mkmenu-insert (&rest clauses) + (declare (indent 0)) + (let ((commands (mapcar (lambda (c) + (let ((format (car c)) + (parameters (cdr c))) + `(insert (format ,(concat format "\n") + ,@parameters)))) + clauses))) + `(progn ,@commands))) + +(defun howm-mkmenu (rule) + (let ((var (car rule)) + (src (cadr rule)) + (opt (cddr rule))) + (let ((dest (concat (symbol-name var) ".el")) + (src-coding (and opt (car opt))) + (dest-coding (and opt (cadr opt)))) + ;; read src + (when (and src-coding (featurep 'mule)) + (prefer-coding-system src-coding)) + (with-temp-buffer + (insert-file-contents src) + (let ((str (buffer-substring-no-properties (point-min) (point-max)))) + ;; write to dest + (find-file dest) + (delete-region (point-min) (point-max)) + (when dest-coding + (set-buffer-file-coding-system dest-coding) + (howm-mkmenu-insert + (";;; -*- Coding: %s -*-" dest-coding))) + (howm-mkmenu-insert + (";;; automatically generated from %s" src) + (";;; by %s.\n" (file-name-nondirectory load-file-name)) + ("(require 'howm-vars)\n") + ("(howm-defconst-risky %s %S)\n" var str) + ("(provide '%s)" var)) + (let ((make-backup-files nil)) + (basic-save-buffer)) + t))))) + +(mapcar #'howm-mkmenu howm-mkmenu-rules) + +;;; howm-mkmenu.el ends here diff --git a/site-lisp/howm/howm-mode.el b/site-lisp/howm/howm-mode.el new file mode 100644 index 0000000..3d5f1a9 --- /dev/null +++ b/site-lisp/howm/howm-mode.el @@ -0,0 +1,1234 @@ +;;; howm-mode.el --- Wiki-like note-taking tool +;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm-mode.el,v 1.318 2012-12-29 08:57:18 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;;-------------------------------------------------------------------- + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Backward compatibility + +;; (require 'howm-mode) in .emacs is obsolete. Use (require 'howm) instead. + +;; This must be earlier than (require 'howm-common), because +;; howm-common needs cl, and (require 'cl) should be written in howm.el. +(when (not (featurep 'howm-version)) + (message "Warning: Requiring howm-mode is obsolete. Require howm instead.") +;; (beep) +;; (sit-for 1) + (require 'howm)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Require + +(provide 'howm-mode) +(require 'howm) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Customize + +;;; --- level 1 --- + +;; You can easily modify them. + +(howm-defvar-risky howm-template + (concat howm-view-title-header " %title%cursor\n%date %file\n\n") + "Contents of new file. %xxx are replaced with specified items. +If it is a list, -th one is used when you type C-u M-x howm-create. +If it is a function, it is called to get template string with the argument .") +(defvar howm-keyword-header "<<<" + "Header string for declaration of keyword (implicit link).") +(defvar howm-ref-header ">>>" + "Header string for explicit link.") +(defvar howm-lighter " howm" + "Mode line for howm-mode") + +(defvar howm-inhibit-title-file-match t + "If non-nil, inhibit howm-list-title when search string matches file name") +(defvar howm-list-all-title nil) ;; obsolete [2003-11-30] +(defvar howm-list-recent-title nil) ;; obsolete [2003-11-30] +(defvar howm-date-separator "-") ;; "-" ==> 2003-10-21 + +(defvar howm-default-key-table + '( + ;; ("key" func list-mode-p global-p) + ("r" howm-refresh) + ("l" howm-list-recent t t) + ("a" howm-list-all t t) + ("g" howm-list-grep t t) + ("s" howm-list-grep-fixed t t) + ("m" howm-list-migemo t t) + ("t" howm-list-todo t t) + ("y" howm-list-schedule t t) + ("b" howm-list-buffers t t) + ("x" howm-list-mark-ring t t) + ("o" howm-occur t t) + ("c" howm-create t t) + ("e" howm-remember t t) + ("," howm-menu t t) + ("." howm-find-today nil t) + (":" howm-find-yesterday nil t) + ("A" howm-list-around) + ("h" howm-history nil t) + ("D" howm-dup) + ("i" howm-insert-keyword nil t) + ("d" howm-insert-date nil t) + ("T" howm-insert-dtime nil t) + ("K" howm-keyword-to-kill-ring t t) + ("n" action-lock-goto-next-link) + ("p" action-lock-goto-previous-link) + ("Q" howm-kill-all t t) + (" " howm-toggle-buffer nil t) + ("N" howm-next-memo) + ("P" howm-previous-memo) + ("H" howm-first-memo) + ("L" howm-last-memo) + ("C" howm-create-here nil t) + ("I" howm-create-interactively nil t) + ("w" howm-random-walk nil t) + ("M" howm-open-named-file t t) + ) + "List of (key function list-mode-p global-p). +`howm-prefix' + this key is real stroke. +If optional argument list-mode-p is non-nil, +same key is also available in view mode. +It is further registered globally if global-p is non-nil." + ) + +(howm-defvar-risky howm-migemo-client nil + "Command name of migemo-client. +Try (setq howm-migemo-client \"migemo-client\") for howm-migemo-*.") +(howm-defvar-risky howm-migemo-client-option nil + "List of option for migemo-client. +e.g. (\"-H\" \"::1\")") + +;;; --- level 2 --- + +;; Be careful to keep consistency. + +(howm-defvar-risky howm-keyword/ref-regexp-format + "\\(%s\\)[ \t]*\\([^ \t\r\n].*\\)") +(howm-defvar-risky howm-keyword-format + (format "%s %%s" howm-keyword-header) + "Format for declaration of keyword. See `format'.") +(howm-defvar-risky howm-keyword-regexp + (format howm-keyword/ref-regexp-format (regexp-quote howm-keyword-header))) +(howm-defvar-risky howm-keyword-regexp-hilit-pos 1) +(howm-defvar-risky howm-keyword-regexp-pos 2) +(howm-defvar-risky howm-ref-regexp + (format howm-keyword/ref-regexp-format (regexp-quote howm-ref-header)) + "Regexp for explicit link.") +(howm-defvar-risky howm-ref-regexp-hilit-pos 0 + "Position of search string in `howm-ref-regexp'") +(howm-defvar-risky howm-ref-regexp-pos 2 + "Position of search string in `howm-ref-regexp'") +(howm-defvar-risky howm-wiki-regexp "\\[\\[\\([^]\r\n]+\\)\\]\\]" + "Regexp for explicit link.") +(howm-defvar-risky howm-wiki-regexp-hilit-pos 1 + "Position of hilight in `howm-wiki-regexp'") +(howm-defvar-risky howm-wiki-regexp-pos 1 + "Position of search string in `howm-wiki-regexp'") +(howm-defvar-risky howm-wiki-format "[[%s]]" + "Format for declaration of wiki word. See `format'.") + +;; Fix me: redundant (howm-date-* & howm-reminder-*) +;; (cf.) howm-reminder-regexp-grep-* howm-reminder-today-format +(defvar howm-date-regexp-grep + (concat "[1-2][0-9][0-9][0-9]" howm-date-separator + "[0-1][0-9]" howm-date-separator + "[0-3][0-9]")) +(defvar howm-date-regexp + (concat "\\([1-2][0-9][0-9][0-9]\\)" howm-date-separator + "\\([0-1][0-9]\\)" howm-date-separator + "\\([0-3][0-9]\\)")) +(defvar howm-date-regexp-year-pos 1) +(defvar howm-date-regexp-month-pos 2) +(defvar howm-date-regexp-day-pos 3) +(defvar howm-date-format + (concat "%Y" howm-date-separator "%m" howm-date-separator "%d")) +(defvar howm-dtime-body-format + (concat howm-date-format " %H:%M")) +(defvar howm-dtime-format + (concat "[" howm-dtime-body-format "]")) +(defvar howm-insert-date-format "[%s]") +(defvar howm-insert-date-future nil) + +(howm-defvar-risky howm-template-rules + '(("%title" . howm-template-title) + ("%date" . howm-template-date) + ("%file" . howm-template-previous-file) + ("%cursor" . howm-template-cursor))) ;; Cursor must be the last rule. +(defvar howm-template-date-format howm-dtime-format + "%date is replaced with `howm-template-date-format' +in `howm-template'. See `format-time-string'") +(defvar howm-template-file-format (concat howm-ref-header " %s") + "%file is replaced with `homw-template-file-format' +in `howm-template'. %s is replaced with name of last file. See `format'.") + +;;; --- level 3 --- + +;; As you like. + +(defun howm-action-lock-general (command regexp pos + &optional hilit-pos + &rest options) + (list regexp + `(lambda (&optional dummy) + (let ((s (match-string-no-properties ,pos))) +;; (when howm-keyword-case-fold-search +;; (setq s (downcase s))) + (,command s ,@options))) + (or hilit-pos 0) + t)) + +(defun howm-action-lock-search (regexp + pos + &optional hilit-pos create-p open-unique-p) + (howm-action-lock-general 'howm-keyword-search + regexp pos hilit-pos create-p open-unique-p)) +(defun howm-action-lock-related (regexp pos hilit-pos) + (howm-action-lock-general 'howm-list-related regexp pos hilit-pos)) + +(defun howm-action-lock-date-rule () + (action-lock-general 'howm-action-lock-date howm-date-regexp 0 0)) + +(defun howm-action-lock-quote-keyword (keyword) + (let ((q (regexp-quote keyword))) + ;; when a regexp is specified, leave unmatched keywords. + (if (and (stringp howm-check-word-break) + (not (string-match howm-check-word-break keyword))) + q + ;; add word break checks + (concat "\\b" q "\\b")))) + +(defun howm-action-lock-setup () + (setq action-lock-case-fold-search howm-keyword-case-fold-search) + (action-lock-mode t) + (let* ((date-al (action-lock-date "{_}" howm-dtime-format))) + ;; override the rule in action-lock.el + (action-lock-add-rules (list date-al) t)) + (let* ((ks (howm-keyword-for-goto)) + (r (mapconcat (if howm-check-word-break + #'howm-action-lock-quote-keyword + #'regexp-quote) + ks "\\|")) + ;; The following optimization causes an error + ;; "Variable binding depth exceeds max-specpdl-size". + ;; (r (cond ((stringp howm-check-word-break) + ;; (mapconcat #'howm-action-lock-quote-keyword ks "\\|")) + ;; (t + ;; (regexp-opt ks (and howm-check-word-break 'word))))) + (wiki (howm-action-lock-search howm-wiki-regexp + howm-wiki-regexp-pos + howm-wiki-regexp-hilit-pos + t)) + (explicit (howm-action-lock-search howm-ref-regexp + howm-ref-regexp-pos + howm-ref-regexp-hilit-pos)) + (implicit (howm-action-lock-search r 0)) + (rev (howm-action-lock-related howm-keyword-regexp + howm-keyword-regexp-pos + howm-keyword-regexp-hilit-pos)) + (date (howm-action-lock-date-rule)) + (done (howm-action-lock-reminder-done-rule)) + (all `( + ,explicit + ,rev + ,@(if ks (list implicit) nil) + ,wiki + ,@(if (howm-menu-p) nil (list date done)) + )) + ) + ;; don't override the rule in action-lock.el + ;; esp. http://xxx should call browser even if "<<< http" exists + (action-lock-add-rules all))) + +(defun howm-file-name (&optional time) + (format-time-string howm-file-name-format + (or time (current-time)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Definitions + +(easy-mmode-define-minor-mode howm-mode + "With no argument, this command toggles the mode. +Non-null prefix argument turns on the mode. +Null prefix argument turns off the mode. + +When the mode is enabled, underlines are drawn on texts which match +to titles of other files. Typing \\[action-lock-magic-return] there, +you can jump to the corresponding file. + +key binding +--- ------- +\\[action-lock-magic-return] Follow link +\\[howm-refresh] Refresh buffer +\\[howm-list-all] List all files +\\[howm-list-grep] Search (grep) +\\[howm-create] Create new file +\\[howm-dup] Duplicate current file +\\[howm-insert-keyword] Insert keyword +\\[howm-insert-date] Insert date +\\[howm-insert-dtime] Insert date with time +\\[howm-keyword-to-kill-ring] Copy current keyword to kill ring +\\[action-lock-goto-next-link] Go to next link +\\[action-lock-goto-previous-link] Go to previous link +\\[howm-next-memo] Go to next entry in current buffer +\\[howm-previous-memo] Go to previous entry in current buffer +\\[howm-first-memo] Go to first entry in current buffer +\\[howm-last-memo] Go to last entry in current buffer +\\[howm-create-here] Add new entry to current buffer +\\[howm-create-interactively] Create new file interactively (not recommended) +\\[howm-random-walk] Browse random entries automtically +" + nil ;; default = off + howm-lighter ;; mode-line + (mapcar (lambda (entry) + (let ((k (car entry)) + (f (second entry))) + (cons (concat howm-prefix k) f))) + howm-default-key-table) + ) + +;; emacs20's easy-mmode-define-minor-mode can't have body. sigh... +(add-hook 'howm-mode-on-hook 'howm-initialize-buffer) +(add-hook 'howm-mode-off-hook 'howm-restore-buffer) + +(defun howm-set-keymap () + (mapc (lambda (entry) + (let* ((k (car entry)) + (f (second entry)) + (list-mode-p (third entry)) + (global-p (fourth entry)) + (pk (concat howm-prefix k))) + (define-key howm-mode-map pk f) + (when list-mode-p + (mapc (lambda (m) + (define-key m k f) + (define-key m pk f)) + (list howm-view-summary-mode-map + howm-view-contents-mode-map))) + (when global-p + (define-key global-map pk f)))) + howm-default-key-table) + (define-key howm-mode-map "\C-x\C-s" 'howm-save-buffer)) +(howm-set-keymap) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Main functions + +(defun howm-refresh () + (interactive) + (if (howm-menu-p) + (howm-menu-refresh) + (howm-initialize-buffer))) + +(defun howm-initialize-buffer () + (interactive) + (when (not howm-mode) + (error "Not howm-mode")) + (howm-message-time "init-buf" + (save-restriction + (widen) + (howm-set-configuration-for-major-mode major-mode) + (howm-action-lock-setup) + (howm-mode-add-font-lock) + (howm-reminder-add-font-lock) + ;; font-lock-fontify-buffer is necessary for emacs20, + ;; while -block is necessary for emacs21. + ;; I don't understand this. [2004-12-18] + (howm-fontify t) + ;; make-local-hook is obsolete for emacs >= 21.1. + (howm-funcall-if-defined (make-local-hook 'after-save-hook)) + (add-hook 'after-save-hook 'howm-after-save t t)))) + +(defun howm-after-save () + (when howm-mode + (howm-keyword-add-current-buffer) + (when howm-refresh-after-save + (howm-initialize-buffer)) + (when (and howm-menu-refresh-after-save + (> howm-menu-expiry-hours 0)) + (howm-menu-refresh-background)) + (run-hooks 'howm-after-save-hook))) + +(defun howm-restore-buffer () + (action-lock-mode 0)) + +(defun howm-list-all () + (interactive) + (howm-set-command 'howm-list-all) + (howm-normalize-show "" (howm-all-items)) + ;; for backward compatibility + (cond ((howm-list-title-p) t) ;; already done in howm-normalize-show + (howm-list-all-title (howm-list-title-internal)))) + +(defun howm-all-items () + "Returns list of all items in the first search path." + (howm-folder-items (car (howm-search-path)) t)) + +(defun howm-list-recent (&optional days) + (interactive "P") + (howm-set-command 'howm-list-recent) + (let* ((d (or days howm-list-recent-days)) + (now (current-time)) + (from (howm-days-before now d)) + (item-list (howm-folder-items howm-directory t))) + (howm-normalize-show "" (howm-filter-items-by-mtime item-list from now)) + ;; clean me [2003-11-30] + (cond ((howm-list-title-p) t) ;; already done in howm-normalize-show + (howm-list-recent-title (howm-list-title-internal)) + ((not days) (howm-view-summary-to-contents))))) + +;; clean me: direct access to howm-view-* is undesirable. + +(defvar howm-list-title-previous nil + "For internal use") +(make-variable-buffer-local 'howm-list-title-previous) +(defun howm-list-title-put-previous (&optional item-list) + (when howm-list-title-undo + (setq howm-list-title-previous (or item-list (howm-view-item-list))))) +(defun howm-list-title-clear-previous () + (setq howm-list-title-previous nil)) +(defun howm-list-title-get-previous () + (if howm-list-title-undo + (let ((prev howm-list-title-previous)) + (setq howm-list-title-previous nil) + (howm-view-summary-rebuild prev)) + (error "Undo is not enabled."))) +(defun howm-list-title-regexp () + (or howm-list-title-regexp (howm-view-title-regexp-grep))) +(defalias 'howm-list-title 'howm-list-toggle-title) ;; backward compatibility +(defun howm-list-toggle-title (&optional undo) + (interactive "P") + (if (or undo howm-list-title-previous) + (howm-list-title-get-previous) + (howm-list-title-internal))) +(defun howm-list-title-internal () + (let ((b (current-buffer))) + (howm-list-title-put-previous) + (howm-view-list-title (howm-list-title-regexp)) + ;; (howm-view-filter-by-contents (howm-list-title-regexp)) + (let ((c (current-buffer))) + (when (not (eq b c)) + (set-buffer b) + (howm-view-kill-buffer) + (switch-to-buffer c) + (howm-view-summary-check t))))) + +(defun howm-list-title-p () + (let ((a (howm-get-value howm-list-title))) + (cond ((null a) nil) ;; I know this is redundant. + ((listp a) (member (howm-command) a)) + (t a)))) + +(defun howm-days-after (ti days &optional hours) + (let* ((ne (howm-decode-time ti)) + (hour-pos 2) + (day-pos 3) + (nh (nth hour-pos ne)) + (nd (nth day-pos ne))) + (setf (nth hour-pos ne) (+ nh (or hours 0))) + (setf (nth day-pos ne) (+ nd days)) + (apply #'encode-time ne))) + +(defun howm-days-before (ti days) + (howm-days-after ti (- days))) + +(defun howm-list-grep (&optional completion-p) + (interactive "P") + (howm-set-command 'howm-list-grep) + (howm-list-grep-general completion-p)) + +(defun howm-list-grep-fixed () + (interactive) + (howm-set-command 'howm-list-grep-fixed) + (howm-list-grep-general t)) + +(defun howm-list-grep-general (&optional completion-p) + (let* ((regexp (if completion-p + (howm-completing-read-keyword) + (read-from-minibuffer "Search all (grep): ")))) + (when completion-p ;; Goto link works only for fixed string at now. + (howm-write-history regexp)) + (howm-search regexp completion-p))) + +(defun howm-search (regexp fixed-p &optional emacs-regexp filter) + (if (string= regexp "") + (howm-list-all) + (howm-message-time "search" + (let* ((trio (howm-call-view-search-internal regexp fixed-p emacs-regexp)) + (kw (car trio)) + (name (second trio)) + (items (third trio))) + (when filter + (setq items (funcall filter items))) + (howm-normalize-show name items (or emacs-regexp regexp) nil nil kw) + (howm-record-view-window-configuration))))) + +(defvar *howm-view-window-configuration* nil + "For internal use") +(defun howm-view-window-configuration () + *howm-view-window-configuration*) +(defun howm-set-view-window-configuration (conf) + (setq *howm-view-window-configuration* conf)) +(defun howm-record-view-window-configuration () + (howm-set-view-window-configuration (current-window-configuration))) +(defun howm-restore-view-window-configuration () + (set-window-configuration (howm-view-window-configuration))) +(defun howm-return-to-list () + (interactive) + (howm-restore-view-window-configuration)) + +(defun howm-call-view-search-internal (regexp fixed-p &optional emacs-regexp) + (let ((hilit (if emacs-regexp + `((,emacs-regexp . howm-view-hilit-face)) + nil))) + (howm-view-search-folder-internal regexp (howm-search-path-folder) + nil nil fixed-p hilit))) + +(defun howm-list-migemo (&optional completion-p) + (interactive "P") + (howm-set-command 'howm-list-migemo) + (if completion-p + (howm-list-grep t) + (let* ((roma (read-from-minibuffer "Search all (migemo): ")) + (e-reg (howm-migemo-get-pattern roma "emacs")) + (g-reg (if howm-view-use-grep + (howm-migemo-get-pattern roma "egrep") + e-reg))) + (if (and e-reg g-reg) + (howm-search g-reg nil e-reg) + (message "No response from migemo-client."))))) + +(defun howm-migemo-get-pattern (roma type) + (when (and (null howm-migemo-client) (not howm-view-use-grep)) + (require 'migemo)) + (if (and (featurep 'migemo) (string= type "emacs")) + (howm-funcall-if-defined (migemo-get-pattern roma)) +;; (migemo-get-pattern roma) + (car (howm-call-process (or howm-migemo-client "migemo-client") + `(,@howm-migemo-client-option "-t" ,type ,roma) + 0)))) + +;; (defun howm-migemo-get-pattern (roma type) +;; (when (and (null (howm-migemo-client)) (not howm-view-use-grep)) +;; (require 'migemo)) +;; (if (and (featurep 'migemo) (string= type "emacs")) +;; (howm-funcall-if-defined (migemo-get-pattern roma)) +;; ;; (migemo-get-pattern roma) +;; (car (howm-call-process (howm-migemo-client) +;; `(,@(howm-migemo-client-option) "-t" ,type ,roma) +;; 0)))) + +;; (defun howm-migemo-client () +;; (if (stringp howm-migemo-client) +;; howm-migemo-client +;; (or (car howm-migemo-client) "migemo-client"))) + +;; (defun howm-migemo-client-option () +;; (cdr-safe howm-migemo-client)) + +(defun howm-normalize-oldp () + howm-list-normalizer) + +;; ;; generate conv in howm-normalizer-pair +;; (let ((methods '("random" "name" "numerical-name" "date" "reverse-date" +;; "summary" "reminder" "mtime" "reverse"))) +;; (mapcar (lambda (m) +;; (let ((command +;; (howm-get-symbol nil "howm-view-sort-by-" m)) +;; (internal +;; (howm-get-symbol nil "howm-sort-items-by-" m))) +;; (cons command internal))) +;; methods)) + +(defun howm-normalizer-pair () + (let* ((old howm-list-normalizer) + (new howm-normalizer) + (conv '((howm-view-sort-by-random . howm-sort-items-by-random) + (howm-view-sort-by-name . howm-sort-items-by-name) + (howm-view-sort-by-numerical-name + . howm-sort-items-by-numerical-name) + (howm-view-sort-by-date . howm-sort-items-by-date) + (howm-view-sort-by-reverse-date + . howm-sort-items-by-reverse-date) + (howm-view-sort-by-summary . howm-sort-items-by-summary) + (howm-view-sort-by-reminder . howm-sort-items-by-reminder) + (howm-view-sort-by-mtime . howm-sort-items-by-mtime) + (howm-view-sort-by-reverse . howm-sort-items-by-reverse))) + (p (assoc old conv)) + (q (assoc new conv))) + (when q + (message "Warning: %s is wrong for howm-normalizer. Use %s." (car q) (cdr q)) + (setq new (cdr q))) + (cond ((null old) (cons old new)) + (p (cons nil (cdr p))) + (t (cons old #'identity))))) + +(defmacro howm-with-normalizer (&rest body) + (declare (indent 0)) + (let ((g (howm-cl-gensym))) + `(progn + (when (howm-normalize-oldp) + (message + "Warning: howm-list-normalizer is obsolete. Use howm-normalizer.")) + (let* ((,g (howm-normalizer-pair)) + (howm-list-normalizer (car ,g)) + (howm-normalizer (cdr ,g))) + ,@body)))) + +(defun howm-normalize-show (name item-list + &optional keyword comefrom-regexp no-list-title + fl-keywords) + ;; comefrom-regexp and no-list-title are never used now. [2009-07-23] + (howm-with-normalizer + (if (howm-normalize-oldp) + ;; for backward compatibility. + (progn + (howm-view-summary name item-list fl-keywords) + (howm-list-normalize-old keyword comefrom-regexp no-list-title)) + (let* ((r (howm-normalize item-list keyword + comefrom-regexp no-list-title))) + (howm-call-view-summary name (cdr r) fl-keywords) + (car r))))) + +(defun howm-call-view-summary (name item-list-pair fl-keywords) + (let ((orig (car item-list-pair)) + (entitled (cdr item-list-pair))) + (howm-view-summary name (or entitled orig) fl-keywords) + ;; side effect + (if entitled + (howm-list-title-put-previous orig) + (howm-list-title-clear-previous)))) + +(defun howm-normalize (item-list + &optional keyword comefrom-regexp no-list-title) + ;; no-list-title is never used now. [2009-07-23] + "Sort ITEM-LIST in the standard order." + (let ((matched nil) + (entitled-item-list nil)) + (setq item-list (funcall howm-normalizer item-list)) + (when keyword + (let ((key-reg (or comefrom-regexp + (howm-make-keyword-regexp1 keyword))) + (word-reg (format "\\<%s\\>" + (if (stringp keyword) + (regexp-quote keyword) + (regexp-opt keyword t)))) + (wiki-reg (regexp-quote (howm-make-wiki-string keyword))) + (file-reg (and + (stringp keyword) + (format "^%s$" + (regexp-quote (expand-file-name keyword))))) + (case-fold-search howm-keyword-case-fold-search)) + (labels ((check (tag flag reg &optional tag-when-multi-hits) + (when flag + (let ((r (howm-normalize-check item-list tag reg + tag-when-multi-hits))) + (setq matched (append (car r) matched)) + (setq item-list (cdr r)))))) + ;; not efficient. should I do them at once? + (check 'word howm-list-prefer-word word-reg) + (check 'wiki howm-list-prefer-wiki wiki-reg) + (check 'related-keyword t howm-keyword-regexp) + (check 'keyword t key-reg 'keyword-multi-hits) + (check 'file file-reg file-reg)))) + (when (and (howm-list-title-p) + (not no-list-title) + (not (and (member 'file matched) + howm-inhibit-title-file-match))) + (setq entitled-item-list + (howm-entitle-items (howm-list-title-regexp) item-list))) + (cons matched (cons item-list entitled-item-list)))) + +(defun howm-normalize-check (item-list tag reg tag-when-multi-hits) + (let* ((r (if (eq tag 'file) + (howm-view-lift-by-path-internal item-list reg) + (howm-view-lift-by-summary-internal item-list reg))) + (m (car r)) + (item-list (cdr r)) + (matched (cond ((and tag-when-multi-hits (eq m 'multi)) + (list tag-when-multi-hits tag)) + (m (list tag)) + (t nil)))) + (cons matched item-list))) + +(defun howm-list-normalize-old (&optional keyword comefrom-regexp no-list-title) + "Sort displayed items in the standard order. +This function is obsolete. Use `howm-normalize' insteadly. +--- Sorry, below documentation is incomplete. --- +When KEYWORD is given, matched items are placed on the top. +KEYWORD can be a string or a list of strings. +" + (prog1 + (howm-view-in-background + (howm-list-normalize-subr keyword comefrom-regexp no-list-title)) + (howm-view-summary))) + +(defun howm-list-normalize-subr (keyword comefrom-regexp no-list-title) + "Obsolete. Do not use this any more." + (let ((matched nil)) + (funcall howm-list-normalizer) + (when keyword + (let ((key-reg (or comefrom-regexp + (howm-make-keyword-regexp1 keyword))) + (word-reg (format "\\<%s\\>" + (if (stringp keyword) + (regexp-quote keyword) + (regexp-opt keyword t)))) + (wiki-reg (regexp-quote (howm-make-wiki-string keyword))) + (file-reg (and + (stringp keyword) + (format "^%s$" + (regexp-quote (expand-file-name keyword))))) + (case-fold-search howm-keyword-case-fold-search)) + ;; clean me. + (let ((check (lambda (tag flag reg &optional tag-when-multi-hits) + (when flag + (let ((m (if (eq tag 'file) + (howm-view-lift-by-name nil reg t) + (howm-view-lift-by-summary nil reg)))) + (when m + (setq matched (cons tag matched))) + (when (and tag-when-multi-hits (eq m 'multi)) + (setq matched + (cons tag-when-multi-hits matched)))))))) + (funcall check 'word howm-list-prefer-word word-reg) + (funcall check 'wiki howm-list-prefer-wiki wiki-reg) + (funcall check 'related-keyword t howm-keyword-regexp) + (funcall check 'keyword t key-reg 'keyword-multi-hits) + (funcall check 'file file-reg file-reg)))) + (when (and (howm-list-title-p) + (not no-list-title) + (not (and (member 'file matched) + howm-inhibit-title-file-match))) + (howm-list-title-internal)) + matched)) + +(defun howm-make-keyword-string (keyword) + (format howm-keyword-format keyword)) +(defun howm-make-wiki-string (keyword) + (format howm-wiki-format keyword)) + +;; clean me +(defvar howm-keyword-regexp-format "%s$" + "Format to make entire-match regexp from keyword string. +Default is \"%s$\" because we want to make regexp \"<<< foo$\" +from keyword string \"<<< foo\", +so that we can accept \"<<< foo\" and reject \"<<< foobar\". +We need entire-match in order to +(1) place \"<<< foo\" on the top when \"foo\" is searched, and +(2) judge existence of \"<<< foo\" when [[foo]] is hit.") +(defun howm-make-keyword-regexp1 (keyword) + (howm-make-keyword-regexp-general keyword #'howm-make-keyword-regexp1-sub)) +(defun howm-make-keyword-regexp2 (keyword) + (howm-make-keyword-regexp-general keyword #'howm-make-keyword-regexp2-sub)) +(defun howm-make-keyword-regexp1-sub (keyword) + (format howm-keyword-regexp-format + (regexp-quote (howm-make-keyword-string keyword)))) +(defun howm-make-keyword-regexp2-sub (keyword) + (format howm-keyword-regexp-format + (howm-make-keyword-string (regexp-quote keyword)))) +(defun howm-make-keyword-regexp-general (keyword regexp-generator) + (cond ((stringp keyword) + (funcall regexp-generator keyword)) + ((listp keyword) + (mapconcat (lambda (s) + (concat "\\(" + (funcall regexp-generator s) + "\\)")) + keyword + "\\|")) + (t (error "Wrong type: %s" keyword)))) + +(defun howm-list-related (str) + (howm-set-command 'howm-list-related) + (let* ((keys (mapcar (lambda (k) + (if howm-keyword-case-fold-search + (downcase k) + k)) + (howm-subkeyword str))) + (filter `(lambda (items) + (howm-filter-items-by-summary items ,(regexp-opt keys))))) + ;; Note that regexp-opt returns a regexp for emacs (not for grep). + (howm-search (howm-make-keyword-string ".*") nil nil filter))) + +(defun howm-subkeyword (str) + (with-temp-buffer + (insert str) + (howm-keyword-for-goto))) + +(defun howm-list-around () + (interactive) + (howm-set-command 'howm-list-around) + (let ((f (buffer-file-name)) + (item-list (howm-view-sort-by-reverse-date-internal + (howm-all-items)))) + (howm-view-summary "" item-list) + (let ((pos (howm-cl-position-if (lambda (item) + (string= (howm-item-name item) f)) + item-list))) + (goto-char (point-min)) + (when pos + (forward-line pos))) + (howm-view-summary-check t))) + +(defvar *howm-command* nil + "For internal use") +(defun howm-set-command (com) + (setq *howm-command* com)) +(defun howm-command () + *howm-command*) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Create + +(defun howm-create (&optional which-template here) + (interactive "p") + (let* ((t-c (howm-create-default-title-content)) + (title (car t-c)) + (content (cdr t-c))) + (howm-create-file-with-title title which-template nil here content))) + +(howm-dont-warn-free-variable transient-mark-mode) +(howm-dont-warn-free-variable mark-active) +(defun howm-create-default-title-content () + (let* ((p (point)) + (m (or (mark t) -777)) + (beg (min p m)) + (end (max p m)) + (search-str (howm-view-name))) + (let* ((transient-mark-p (and (boundp 'transient-mark-mode) + transient-mark-mode)) + (mark-active-p (and (boundp 'mark-active) mark-active)) + (active-p (if transient-mark-p + mark-active-p + t)) + (strictly-active-p (and transient-mark-p mark-active-p)) + (title-p (let* ((b (line-beginning-position)) + (e (line-end-position))) + (and active-p + (< 0 beg) (<= b beg) (<= end e) (not (= beg end))))) + (content-p (and strictly-active-p + howm-content-from-region)) + (search-p (and howm-title-from-search + (stringp search-str))) + (s (cond ((or title-p content-p) (buffer-substring-no-properties beg + end)) + (search-p search-str)))) + (cond ((null s) (cons "" "")) + ((eq content-p t) (cons "" s)) + ((or title-p search-p) (cons s "")) + (content-p (cons "" s)) + (t (cons "" "")))))) + +(defun howm-create-here (&optional which-template) + (interactive "p") + (howm-create which-template t)) + +(defun howm-create-file-with-title (title &optional + which-template not-use-file here content) + (let ((b (current-buffer))) + (when (not here) + (howm-create-file)) + (cond ((howm-buffer-empty-p) nil) + ((and here howm-create-here-just) (beginning-of-line)) + (t (howm-create-newline))) + (let ((p (point)) + (insert-f (lambda (switch) + (howm-insert-template (if switch title "") + b which-template (not switch)))) + (use-file (not not-use-file))) + ;; second candidate which appears when undo is called + (let ((end (funcall insert-f not-use-file))) + (save-excursion + (goto-char end) + (insert (or content ""))) + (undo-boundary) + (delete-region p end)) + (funcall insert-f use-file)) + (howm-create-finish))) + +(defun howm-create-finish () + (howm-set-mode) + (run-hooks 'howm-create-hook)) + +(defun howm-create-newline () + (widen) + (if howm-prepend + (howm-create-newline-prepend) + (howm-create-newline-append))) +(defun howm-create-newline-prepend () + (goto-char (point-min))) +(defun howm-create-newline-append () + (goto-char (point-max)) + (delete-blank-lines) + (when (not (= (line-beginning-position) (point))) ;; not empty line + (insert "\n")) + (insert "\n")) + +(defun howm-insert-template (title &optional + previous-buffer which-template not-use-file) + (let* ((beg (point)) + (f (buffer-file-name previous-buffer)) + (af (and f (howm-abbreviate-file-name f)))) + (insert (howm-template-string which-template previous-buffer)) + (let* ((date (format-time-string howm-template-date-format)) + (use-file (not not-use-file)) + (file (cond ((not use-file) "") + ((null f) "") + ((string= f (buffer-file-name)) "") + (t (format howm-template-file-format af))))) + (let ((arg `((title . ,title) (date . ,date) (file . ,file))) + (end (point-marker))) + (howm-replace howm-template-rules arg beg end) + end)))) + +(defvar howm-template-receive-buffer t + "Non nil if howm-template should receive previous-buffer +when howm-template is a function. +Set this option to nil if backward compatibility with howm-1.2.4 or earlier +is necessary.") + +(defun howm-template-string (which-template previous-buffer) + ;; which-template should be 1, 2, 3, ... + (setq which-template (or which-template 1)) + (cond ((stringp howm-template) howm-template) + ((functionp howm-template) (let ((args (if howm-template-receive-buffer + (list which-template + previous-buffer) + (list which-template)))) + (apply howm-template args))) + ((listp howm-template) (nth (- which-template 1) howm-template)))) + +(defun howm-replace (rules arg &optional beg end) + (mapc (lambda (pair) + (let ((spell (car pair)) + (disp-f (cdr pair))) + (goto-char (or beg (point-min))) + (while (re-search-forward spell end t) + (delete-region (match-beginning 0) (match-end 0)) + (funcall disp-f arg)))) + rules)) + +;; Use dynamic bindings dirtily! +(defun howm-template-title (arg) + (insert (cdr (assoc 'title arg)))) +(defun howm-template-date (arg) + (insert (cdr (assoc 'date arg)))) +(defun howm-template-previous-file (arg) + (insert (cdr (assoc 'file arg)))) +(defun howm-template-cursor (arg)) ;; do nothing + +(defun howm-dup () + (interactive) + (let* ((r (howm-view-paragraph-region)) + (s (buffer-substring-no-properties (car r) (second r)))) + (howm-create-file) + (howm-set-mode) + (insert "\n" s))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Keyword + +(defun howm-completing-read-keyword () + (message "Scanning...") + (let* ((kl (howm-keyword-list)) + (table (mapcar #'list kl)) + (completion-ignore-case howm-keyword-case-fold-search)) + (completing-read "Keyword: " table))) + +(defun howm-insert-keyword () + (interactive) + (insert (howm-completing-read-keyword))) + +(defun howm-keyword-to-kill-ring (&optional filename-p) + (interactive "P") + (let ((title (howm-title-at-current-point filename-p))) + (if title + (howm-string-to-kill-ring title) + (error "No keyword.")))) + +(defun howm-title-at-current-point (&optional filename-p + title-regexp title-regexp-pos) + (let ((reg (or title-regexp howm-view-title-regexp)) + (pos (or title-regexp-pos howm-view-title-regexp-pos))) + (save-excursion + (end-of-line) + (cond ((and (not filename-p) + (re-search-backward reg nil t)) + (match-string-no-properties pos)) + ((buffer-file-name) + (howm-abbreviate-file-name (buffer-file-name))) + (t nil))))) + +(defun howm-string-to-kill-ring (str) + (if str + (progn + (kill-new str) + (message "%s" str)) + (error "Empty."))) + +(defun howm-keyword-for-comefrom () + (save-excursion + (goto-char (point-min)) + (let ((keyword-list nil)) + (while (re-search-forward howm-keyword-regexp nil t) + (setq keyword-list + (cons (match-string-no-properties howm-keyword-regexp-pos) + keyword-list))) + (reverse keyword-list)))) + +(defun howm-keyword-list () + (let ((sep (format "[\n%s]" (or howm-keyword-list-alias-sep "")))) + (with-current-buffer (howm-keyword-buffer) + (delete "" + (split-string (buffer-substring (point-min) (point-max)) sep))))) + +(defun howm-keyword-add (keyword-list) + (interactive "sKeyword: ") + (setq keyword-list (if (stringp keyword-list) + (list keyword-list) + keyword-list)) + (with-current-buffer (howm-keyword-buffer) + (save-excursion + (goto-char (point-max)) + (mapc (lambda (k) + (when (howm-keyword-new-p k) + (insert k "\n"))) + keyword-list) + (when (buffer-file-name) + (howm-basic-save-buffer))))) + +(defun howm-keyword-new-p (str) + (save-excursion + (let ((r (format "^%s$" (regexp-quote str))) + (case-fold-search howm-keyword-case-fold-search)) + (goto-char (point-min)) + (not (re-search-forward r nil t))))) + +(defun howm-support-aliases-p () + howm-keyword-list-alias-sep) +(defun howm-aliases () + (if (howm-support-aliases-p) + (howm-read-aliases) + nil)) +(defun howm-read-aliases () + (with-current-buffer (howm-keyword-buffer) + (save-excursion + (let ((ans nil)) + (goto-char (point-min)) + (while (search-forward howm-keyword-list-alias-sep nil t) + (let* ((line (buffer-substring-no-properties (line-beginning-position) + (line-end-position))) + (keys (split-string line howm-keyword-list-alias-sep)) + (ks (if howm-keyword-case-fold-search + (mapcar #'downcase keys) + keys))) + (setq ans (cons ks ans)) + (end-of-line))) + ans)))) + +(defun howm-expand-aliases-recursively (keyword aliases) + (let ((keys (list keyword)) + (prev nil)) + (labels ((expand (keys) + (sort (howm-cl-remove-duplicates + (howm-cl-mapcan (lambda (k) + (howm-cl-mapcan + (lambda (a) (if (member k a) + (copy-sequence a) + nil)) + aliases)) + keys) :test #'string=) + #'string<))) + (while (not (equal prev keys)) + (setq prev keys) + (setq keys (expand keys)))) + keys)) +(assert (equal (howm-expand-aliases-recursively "a" + '(("d" "e" "f") ("a" "b" "c"))) + '("a" "b" "c"))) +(assert (equal (howm-expand-aliases-recursively "a" + '(("d" "e" "b") ("a" "b" "c"))) + '("a" "b" "c" "d" "e"))) + +(defun howm-keyword-aliases (keyword) + "List of strings which are equivalent to KEYWORD. +KEYWORD itself is always at the head of the returneded list. +" + ;; Return the original keyword (not downcased) for backward compatibility. + ;; I'm not sure whether this behavior is really needed. + (let* ((key (if howm-keyword-case-fold-search + (downcase keyword) + keyword)) + (aliases (howm-aliases)) + (equiv (if howm-keyword-aliases-recursive + (howm-expand-aliases-recursively key aliases) + (howm-cl-remove-duplicates + (apply #'append + (howm-cl-remove-if-not (lambda (a) (member key a)) + aliases)))))) + (if (null equiv) + keyword + (cons keyword (remove key equiv))))) + +(defun howm-keyword-search (keyword &optional create-p open-unique-p) + (howm-message-time "key-search" + (howm-set-command 'howm-keyword-search) + (howm-with-normalizer + (howm-keyword-search-subr keyword create-p open-unique-p)))) + +(defun howm-keyword-search-subr (keyword create-p open-unique-p) + (let* ((aliases (if (howm-support-aliases-p) + (howm-keyword-aliases keyword) + keyword)) + (menu-p (howm-menu-keyword-p keyword)) + (comefrom-regexp (if menu-p ;; clean me + nil + (howm-make-keyword-regexp2 aliases))) + (trio (let ((howm-search-other-dir (if menu-p ;; clean me + nil + howm-search-other-dir)) + (*howm-view-force-case-fold-search* + howm-keyword-case-fold-search)) ;; dirty! + (howm-call-view-search-internal aliases t))) +;; code for . +;; but this change is canceled; I'll try more fundamental fix. [2005-11-04] +;; (if open-unique-p +;; (let ((r (concat "^" (regexp-quote keyword) "$"))) +;; (howm-call-view-search r nil)) +;; (howm-call-view-search aliases t)))) + (kw (car trio)) + (name (second trio)) + (items (third trio)) + (items-pair nil) + (found (if items t nil)) ;; want to forget items as soon as possible + (matched (and found + (let* ((howm-keyword-format + (if menu-p ;; clean me + (default-value 'howm-keyword-format) + howm-keyword-format)) + (r (howm-normalize items aliases + comefrom-regexp))) + (setq items-pair (cdr r)) + (car r)))) + (keyword-matched (member 'keyword matched)) + (keyword-matched-multi (member 'keyword-multi-hits matched)) + (file-matched (member 'file matched)) + (title (howm-make-keyword-string keyword))) + ;; main processing (clean me!) [2003-12-01] + (cond + ;; for %foo% + ((and menu-p keyword-matched) + (howm-keyword-search-open-menu keyword (car items-pair) + keyword-matched-multi)) + ;; for [[foo]] + ((and create-p (not keyword-matched)) + (howm-keyword-search-create title)) + ;; open if unique match + ((and open-unique-p (howm-single-element-p items)) + (howm-keyword-search-open-unique items)) + (t + (howm-call-view-summary name items-pair kw) + (when (howm-normalize-oldp) + ;; sorry for redundancy & inefficiency + (howm-list-normalize-old aliases comefrom-regexp t)))) + ;; record history + (when (not menu-p) + (howm-write-history keyword)) + ;; return information + `((menu-p . ,menu-p) + (found . ,found) + (matched . ,matched) + (keyword-matched . ,keyword-matched) + (create-p . ,create-p)) + )) + +(defun howm-keyword-search-open-menu (keyword item-list multi-hits-p) + "Open KEYWORD as menu." + ;; dirty. peeking howm-view.el + (let* ((item (car item-list)) + (fname (howm-view-item-filename item)) + (place (howm-view-item-place item))) + (let ((howm-search-other-dir nil)) + (howm-menu-open fname place (howm-menu-name keyword)))) + (when multi-hits-p + (message "Warning: found two or more %s." keyword))) + +(defun howm-keyword-search-create (title) + "create new memo <<< TITLE." + (howm-create-file-with-title title) + (message "New keyword.")) + +(defun howm-keyword-search-open-unique (items) + "Open unique match." + (howm-view-open-item (car items))) + +;; (defvar *howm-keyword-buffer* nil) ;; for internal use +(defun howm-keyword-for-goto (&optional keyword-list) + (save-excursion + (let ((case-fold-search howm-keyword-case-fold-search)) + (sort (howm-cl-mapcan (lambda (k) + (goto-char (point-min)) + ;; when howm-check-word-break is non-nil, + ;; checking word breaks is desired for efficiency. + ;; it is not implemented yet. + (if (search-forward k nil 'noerr) + (list k) + nil)) + (or keyword-list (howm-keyword-list))) + (lambda (x y) + (> (length x) (length y))))))) + +(defun howm-keyword-add-current-buffer () + (save-excursion + (goto-char (point-min)) + (let ((m (current-message)) + (keyword-list nil)) + (while (re-search-forward howm-keyword-regexp nil t) + (let ((key-str (if howm-keyword-list-alias-sep + (mapconcat #'identity + (howm-keyword-read) + howm-keyword-list-alias-sep) + (match-string-no-properties howm-keyword-regexp-pos)))) + (setq keyword-list (cons key-str keyword-list)))) + (howm-keyword-add keyword-list) + (message "%s" m)))) +(defun howm-keyword-add-items (items) + (let ((files (mapcar #'howm-view-item-filename items))) + (with-temp-buffer + (mapc (lambda (f) + (erase-buffer) + (insert-file-contents f) + (howm-set-configuration-for-file-name f) + (howm-keyword-add-current-buffer)) + files)))) + +(defun howm-keyword-read () + (let ((ks nil) + (beg (line-beginning-position))) + (end-of-line) + (skip-chars-backward " ") + (while (re-search-backward howm-keyword-regexp beg t) + (setq ks (cons (match-string-no-properties howm-keyword-regexp-pos) ks)) + (skip-chars-backward " ")) + (end-of-line) + ks)) + +;;; howm-mode.el ends here diff --git a/site-lisp/howm/howm-reminder.el b/site-lisp/howm/howm-reminder.el new file mode 100644 index 0000000..57405fe --- /dev/null +++ b/site-lisp/howm/howm-reminder.el @@ -0,0 +1,918 @@ +;;; howm-reminder.el --- Wiki-like note-taking tool +;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm-reminder.el,v 1.83 2012-12-29 08:57:18 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;-------------------------------------------------------------------- + +(provide 'howm-reminder) +(require 'howm) + +(defvar howm-list-schedule-name "{schedule}") +(defvar howm-list-todo-name "{todo}") +; "This is used for buffer name of `howm-list-reminder'. +; See `howm-view-summary-name'.") + +(howm-defvar-risky howm-todo-priority-func + '(("-" . howm-todo-priority-normal) + (" " . howm-todo-priority-normal) + ("+" . howm-todo-priority-todo) + ("~" . howm-todo-priority-defer) + ("!" . howm-todo-priority-deadline) + ("@" . howm-todo-priority-schedule) + ("." . howm-todo-priority-done))) +(defvar howm-todo-priority-normal-laziness 1) +(defvar howm-todo-priority-todo-laziness 7) +(defvar howm-todo-priority-todo-init -7) +(defvar howm-todo-priority-defer-laziness 30) +(defvar howm-todo-priority-defer-init -14) +(defvar howm-todo-priority-defer-peak 0) +(defvar howm-todo-priority-deadline-laziness 7) +(defvar howm-todo-priority-deadline-init -2) +(defvar howm-todo-priority-schedule-laziness 1) +(defvar howm-todo-priority-normal-bottom (- howm-huge)) +(defvar howm-todo-priority-todo-bottom (- howm-huge)) +(defvar howm-todo-priority-defer-bottom (- howm-huge)) +(defvar howm-todo-priority-deadline-bottom (- howm-huge)) +(defvar howm-todo-priority-schedule-bottom (- howm-huge++) + "Base priority of schedules in the bottom. +Its default value is extremely negative so that you never see +schedules outside the range in %reminder in the menu.") +(defvar howm-todo-priority-deadline-top howm-huge) +(defvar howm-todo-priority-schedule-top howm-huge) +(defvar howm-todo-priority-unknown-top howm-huge+) + +(defvar howm-action-lock-reminder-done-default nil) + +(defvar howm-congrats-count 0) + +;;; --- level ? --- + +;; Fix me: redundant (howm-date-* & howm-reminder-*) + +;; (defun howm-reminder-regexp-grep (types) +;; (howm-inhibit-warning-in-compilation)) +;; (defun howm-reminder-regexp (types) +;; (howm-inhibit-warning-in-compilation)) + +(if howm-reminder-old-format + (progn ;; old format + (defvar howm-reminder-regexp-grep-format + "@\\[[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]\\]%s") + (defvar howm-reminder-regexp-format + "\\(@\\)\\[\\([0-9][0-9][0-9][0-9]\\)/\\([0-9][0-9]\\)/\\([0-9][0-9]\\)\\]\\(%s\\)\\([0-9]*\\)") + (defun howm-reminder-regexp-grep (types) + (format howm-reminder-regexp-grep-format types)) + (defun howm-reminder-regexp (types) + (format howm-reminder-regexp-format types)) + (defvar howm-reminder-regexp-command-pos 1) + (defvar howm-reminder-regexp-year-pos 2) + (defvar howm-reminder-regexp-month-pos 3) + (defvar howm-reminder-regexp-day-pos 4) + (defvar howm-reminder-regexp-type-pos 5) + (defvar howm-reminder-regexp-laziness-pos 6) + (defvar howm-reminder-today-format "@[%Y/%m/%d]") + (howm-defvar-risky howm-reminder-font-lock-keywords + `( + (,(howm-reminder-regexp "[-]?") (0 howm-reminder-normal-face prepend)) + (,(howm-reminder-regexp "[+]") (0 howm-reminder-todo-face prepend)) + (,(howm-reminder-regexp "[~]") (0 howm-reminder-defer-face prepend)) + (,(howm-reminder-regexp "[!]") + (0 howm-reminder-deadline-face prepend) + (,howm-reminder-regexp-type-pos (howm-reminder-deadline-type-face) prepend)) + (,(howm-reminder-regexp "[@]") (0 howm-reminder-schedule-face prepend)) + (,(howm-reminder-regexp "[.]") (0 howm-reminder-done-face prepend)) + )) + (defun howm-reminder-font-lock-keywords () + howm-reminder-font-lock-keywords) + (defun howm-action-lock-done (&optional command) + (save-excursion + (let ((at-beg (match-beginning howm-reminder-regexp-command-pos)) + (at-end (match-end howm-reminder-regexp-command-pos)) + (type-beg (match-beginning howm-reminder-regexp-type-pos)) + (type-end (match-end howm-reminder-regexp-type-pos)) + (lazy-beg (match-beginning howm-reminder-regexp-laziness-pos)) + (lazy-end (match-end howm-reminder-regexp-laziness-pos))) + (let* ((s (or command + (read-from-minibuffer + "RET (done), x (cancel), symbol (type), num (laziness): "))) + (c (cond ((string= s "") ".") + ((= 0 (string-to-number s)) ". give up") + (t nil)))) + (when (string= s "") + (howm-congrats)) + (if c + (progn + (goto-char at-beg) + (delete-region at-beg at-end) + (insert (howm-reminder-today)) + (insert (format "%s " c))) + (progn + (goto-char lazy-beg) + (delete-region lazy-beg lazy-end) + (when (string= (buffer-substring-no-properties type-beg type-end) + " ") + (goto-char type-beg) + (insert "-")) ;; "no type" = "normal" + (insert s))))))) + ) + (progn ;; new format + (defvar howm-reminder-regexp-grep-format + (concat "\\[" howm-date-regexp-grep "[ :0-9]*\\]%s")) + (defvar howm-reminder-regexp-format + (concat "\\(\\[" howm-date-regexp "[ :0-9]*\\]\\)\\(\\(%s\\)\\([0-9]*\\)\\)")) +;; (defvar howm-reminder-regexp-grep-format +;; (concat "\\[" howm-date-regexp-grep "\\]%s")) +;; (defvar howm-reminder-regexp-format +;; (concat "\\[" howm-date-regexp "\\]\\(\\(%s\\)\\([0-9]*\\)\\)")) + (defun howm-reminder-regexp-grep (types) + (format howm-reminder-regexp-grep-format types)) + (defun howm-reminder-regexp (types) + (format howm-reminder-regexp-format types)) + (defvar howm-reminder-regexp-date-pos 1) + (defvar howm-reminder-regexp-year-pos (+ howm-date-regexp-year-pos 1)) + (defvar howm-reminder-regexp-month-pos (+ howm-date-regexp-month-pos 1)) + (defvar howm-reminder-regexp-day-pos (+ howm-date-regexp-day-pos 1)) + (defvar howm-reminder-regexp-command-pos 5) + (defvar howm-reminder-regexp-type-pos 6) + (defvar howm-reminder-regexp-laziness-pos 7) + (defvar howm-reminder-today-format + (format howm-insert-date-format howm-date-format)) + (howm-defvar-risky howm-reminder-font-lock-keywords + `( + (,(howm-reminder-regexp "[-]") (0 howm-reminder-normal-face prepend)) + (,(howm-reminder-regexp "[+]") (0 howm-reminder-todo-face prepend)) + (,(howm-reminder-regexp "[~]") (0 howm-reminder-defer-face prepend)) + (,(howm-reminder-regexp "[!]") + (0 howm-reminder-deadline-face prepend) + (,howm-reminder-regexp-type-pos (howm-reminder-deadline-type-face) prepend)) + (,(howm-reminder-regexp "[@]") (0 howm-reminder-schedule-face prepend)) + (,(howm-reminder-regexp "[.]") (0 howm-reminder-done-face prepend)) + )) + (defun howm-reminder-font-lock-keywords () + howm-reminder-font-lock-keywords) + (defun howm-action-lock-done-prompt () + (format "RET (done), x (%s), symbol (type), num (laziness): " + howm-reminder-cancel-string)) + (defun howm-action-lock-done (&optional command) + ;; parse line + (let* ((pos (point)) + (beg (match-beginning 0)) + (end (match-end 0)) + (date (match-string-no-properties howm-reminder-regexp-date-pos)) + (type (match-string-no-properties howm-reminder-regexp-type-pos)) + (lazy (match-string-no-properties howm-reminder-regexp-laziness-pos)) + (desc (buffer-substring-no-properties end (line-end-position)))) + ;; parse input command + (let* ((s (or command + (howm-read-string (howm-action-lock-done-prompt) + "x-+~!.@" + "0123456789"))) + (type-or-lazy (string-match (format "^\\(%s?\\)\\([0-9]*\\)$" + howm-reminder-types) + s)) + (new-type (and type-or-lazy (match-string-no-properties 1 s))) + (new-lazy (and type-or-lazy (match-string-no-properties 2 s)))) + (when (string= new-type "") + (setq new-type type)) + (when (string= new-lazy "") + (setq new-lazy lazy)) + ;; dispatch and get new contents + (let ((new (cond ((string= s "") + (howm-action-lock-done-done date type lazy desc)) + ((string= s "x") + (howm-action-lock-done-cancel date type lazy + desc)) + (type-or-lazy + (howm-action-lock-done-modify date + new-type new-lazy + desc)) + (t + (error "Can't understand %s" s))))) + ;; replace contents + (goto-char beg) + (delete-region (point) (line-end-position)) + (insert new) + (goto-char pos))))) + (defun howm-action-lock-done-done (date type lazy desc &optional done-mark) + (when (null done-mark) + (setq done-mark ".") + (howm-congrats)) + (concat (howm-reminder-today) done-mark " " + date ":" type lazy desc)) + (defun howm-action-lock-done-cancel (date type lazy desc) + (howm-action-lock-done-done date type lazy desc + (format ". %s" howm-reminder-cancel-string))) + (defun howm-action-lock-done-modify (date type lazy desc) + (concat date type lazy desc)) + )) + +(defun howm-reminder-deadline-type-face () + (let ((late (cadr (howm-todo-parse-string (match-string-no-properties 0))))) + (if (>= late 0) + howm-reminder-late-deadline-face + howm-reminder-deadline-face))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Reminder: schedule & todo + +(define-key howm-view-summary-mode-map "." 'howm-reminder-goto-today) + +;; Clean me. +;; I cannot remember why I wrote howm-with-schedule-summary-format. +(defmacro howm-with-schedule-summary-format (&rest body) + (declare (indent 0)) + `(let ((howm-view-summary-format (if howm-view-split-horizontally ;; dirty! + "" + howm-view-summary-format))) + ,@body)) + +(defun howm-list-schedule () + (interactive) + (howm-with-need + (howm-with-schedule-summary-format + (let ((items (need (howm-list-reminder-internal howm-schedule-types)))) + (howm-list-reminder-final-setup howm-list-schedule-name + (howm-schedule-sort-items items))) + (howm-reminder-goto-today) + (howm-view-summary-check)))) + +(defun howm-list-reminder-internal (types) + (let* ((r (howm-reminder-regexp types)) + (rg (howm-reminder-regexp-grep types)) + (summarizer (howm-reminder-summarizer r t)) + (folder (howm-reminder-search-path-folder))) + (third (howm-view-search-folder-internal rg folder nil summarizer)))) + +(defun howm-list-reminder-final-setup (&optional name item-list) + (howm-view-summary name item-list + (append (howm-reminder-add-font-lock-internal) + (howm-mode-add-font-lock-internal))) + (let ((action-lock-default-rules + (howm-action-lock-reminder-forward-rules t))) + (action-lock-mode t))) + +(let ((rs (mapcar #'regexp-quote + (list howm-date-format howm-reminder-today-format)))) + (defcustom howm-highlight-date-regexp-format (car rs) + "Time format for highlight of today and tommorow. +This value is passed to `format-time-string', and the result must be a regexp." + :type `(radio ,@(mapcar (lambda (r) `(const ,r)) rs) + string) + :group 'howm-faces)) + +(defun howm-reminder-today-font-lock-keywords () + (let ((today (howm-reminder-today 0 howm-highlight-date-regexp-format)) + (tomorrow (howm-reminder-today 1 howm-highlight-date-regexp-format))) + `((,today (0 howm-reminder-today-face prepend)) + (,tomorrow (0 howm-reminder-tomorrow-face prepend))))) + +(defun howm-reminder-add-font-lock () + (cheat-font-lock-append-keywords (howm-reminder-add-font-lock-internal))) + +(defun howm-reminder-add-font-lock-internal () + (append (howm-reminder-font-lock-keywords) + (howm-reminder-today-font-lock-keywords))) + +(defun howm-reminder-omit-before (regexp str) + (string-match regexp str) + (substring str (match-beginning 0))) + +(defun howm-reminder-summarizer (regexp &optional show-day-of-week) + `(lambda (file line content) + (let ((s (howm-reminder-omit-before ,regexp content))) +;; (string-match ,regexp content) +;; (substring content (match-beginning 0))))) + ,(if show-day-of-week + '(let* ((p (howm-todo-parse-string s)) + (late (floor (nth 1 p))) + (dow (howm-day-of-week-string (nth 4 p)))) + (format "%s%3s %s" dow late s)) + 's)))) + +(defun howm-reminder-today (&optional days-after fmt) + (format-time-string (or fmt howm-reminder-today-format) + (howm-days-after (current-time) (or days-after 0)))) + +;; dirty. peek howm-view-* +(defun howm-reminder-goto-today () + (interactive) + (let* ((today (howm-reminder-today)) + (r (howm-reminder-regexp ".")) + (summaries (mapcar (lambda (item) + (howm-reminder-omit-before + r (howm-view-item-summary item))) + (howm-view-item-list)))) +;; (summaries (mapcar 'howm-view-item-summary (howm-view-item-list)))) + (let ((rest summaries) + (n 0)) + (while (and rest + (string< (car rest) today)) + (setq rest (cdr rest) + n (1+ n))) + (howm-goto-line (1+ n))))) + +(defun howm-schedule-menu (days &optional days-before) + (let* ((today (howm-encode-day t)) + (from (- today (or days-before 0))) + (to (+ today days 1)) + (howm-schedule-types howm-schedule-menu-types) ;; dirty + (raw (howm-reminder-search howm-schedule-types)) + (filtered (howm-cl-remove-if #'(lambda (item) + (let ((s (howm-schedule-date item))) + (or (< s from) + (< to s)))) + raw))) + (howm-schedule-sort-items filtered))) + +(defun howm-schedule-sort-items (items &optional reverse-p) + (when reverse-p + (error "Not supported.")) + (howm-with-schedule-summary-format + (howm-sort #'howm-schedule-sort-converter #'howm-schedule-sort-comparer + items))) +(defun howm-schedule-sort-by-date () + (interactive) + (howm-view-sort-doit #'howm-schedule-sort-items)) +(defun howm-schedule-sort-converter (item) + (let ((z (howm-reminder-parse item))) + (cons (car z) + (if howm-schedule-sort-by-time + (howm-item-summary item) + (nth 5 z))))) +(defun howm-schedule-sort-comparer (a b) + (if (= (car a) (car b)) + (string< (cdr a) (cdr b)) + (< (car a) (car b)))) + +(defun howm-schedule-date (item) + (car (howm-reminder-parse item))) + +(defun howm-reminder-search (types) + (let* ((r (howm-reminder-regexp types)) + (rg (howm-reminder-regexp-grep types)) + (summarizer (howm-reminder-summarizer r)) + (folder (howm-reminder-search-path-folder))) + (howm-view-search-folder-items rg folder summarizer))) + +(defun howm-list-todo () + (interactive) + (howm-list-todo-sub)) + +;; experimental [2006-06-26] +(defun howm-todo-sleeping-p (item) + ;; (- howm-huge-) should be replaced with an appropreate variable. + (< (howm-todo-priority item) (- howm-huge-))) +(defun howm-list-active-todo () + (interactive) + (howm-list-todo-sub (lambda (item) + (not (howm-todo-sleeping-p item))))) +(defun howm-list-sleeping-todo () + (interactive) + (howm-list-todo-sub #'howm-todo-sleeping-p)) + +(defun howm-list-todo-sub (&optional pred) + (howm-with-need + (howm-with-schedule-summary-format + (let ((items (need (howm-list-reminder-internal howm-todo-types)))) + (when pred + (setq items + (need (howm-cl-remove-if-not pred items)))) + (setq items (howm-todo-sort-items items)) + (when howm-todo-separators + (setq items + (howm-todo-insert-separators items + howm-todo-separators))) + (howm-list-reminder-final-setup howm-list-todo-name items))))) + +(defun howm-todo-menu (n limit-priority separators) + "Find top N todo items, or all todo items if N is nil. +Returned value is a sorted list of items (see `howm-make-item'). +Items whose priority is worse than LIMIT-PRIORITY are eliminated. +Separator strings are inserted to the returned list according to +the rule given as SEPARATORS. +See docstring of the variable `howm-menu-reminder-separators' for details." + (let* ((cutted (howm-cl-remove-if (lambda (item) + (< (howm-todo-priority item) + limit-priority)) + (howm-reminder-search howm-todo-menu-types))) + (sorted (howm-todo-sort-items cutted))) + (howm-todo-insert-separators (if n (howm-first-n sorted n) sorted) + separators t))) + +(defun howm-reminder-menu (n limit-priority separators) + (howm-with-reminder-setting + (howm-todo-menu n limit-priority separators))) + +(defun howm-todo-insert-separators (item-list separators + &optional relative-date-p) + (let ((is (mapcar (lambda (item) (cons (howm-todo-priority item) item)) + item-list)) + (sep (mapcar (lambda (pair) + (cons (if relative-date-p + (- howm-todo-priority-schedule-top + (or (car pair) howm-huge-)) + (or (car pair) (- howm-huge-))) + (howm-make-item (howm-make-page:nil) (cdr pair)))) + separators))) + (mapcar #'cdr + (sort (append is sep) #'(lambda (x y) (> (car x) (car y))))))) + +(defun howm-todo-sort-items (items &optional reverse-p) + (when reverse-p + (error "Not supported.")) + (howm-sort #'howm-todo-priority-ext #'howm-todo-priority-ext-gt + items)) + +(defun howm-todo-sort-by-priority () + (howm-view-sort-doit #'howm-todo-sort-items)) + +;; Clean me. +(defun howm-reminder-parse (item) + (howm-todo-parse-string (howm-view-item-summary item))) +(defun howm-todo-parse (item) + (cdr (howm-reminder-parse item))) +(defun howm-todo-parse-string (str) + "Parse reminder format. +Example: (howm-todo-parse-string \"abcde [2004-11-04]@ hogehoge\") +==> (12725.625 0.022789351851315587 \"@\" nil 4 \" hogehoge\")" + (let ((summary str)) + (string-match (howm-reminder-regexp ".") summary) + (let ((y (match-string-no-properties howm-reminder-regexp-year-pos + summary)) + (m (match-string-no-properties howm-reminder-regexp-month-pos + summary)) + (d (match-string-no-properties howm-reminder-regexp-day-pos + summary)) + (ty (match-string-no-properties howm-reminder-regexp-type-pos + summary)) + (lz (match-string-no-properties howm-reminder-regexp-laziness-pos + summary)) + (description (substring str (match-end 0)))) + (let* ((day (howm-encode-day d m y)) + (today (howm-encode-day)) + (late (- today day)) + (type (substring (or ty "-") 0 1)) ;; "-" for old format + (lazy (cond ((string= type " ") nil) + ((null lz) nil) + (t (let ((z (string-to-number lz))) + (if (= z 0) nil z))))) + ;; (lazy (if (string= type " ") + ;; 0 + ;; (string-to-number (or lz "0")))) + (day-of-week (nth 6 + (decode-time (apply #'encode-time + (mapcar #'string-to-number + (list "0" "0" "0" + d m y))))))) + (list day late type lazy day-of-week description))))) + +(defun howm-todo-priority (item) + (let* ((p (howm-todo-parse item)) + (late (car p)) + (type (second p)) + (lazy (third p)) + (f (or (cdr (assoc type howm-todo-priority-func)) + #'howm-todo-priority-unknown))) + (funcall f late lazy item))) + +(defun howm-todo-priority-ext (item) + (cons (howm-todo-priority item) (howm-view-item-summary item))) +(defun howm-todo-priority-ext-gt (e1 e2) + "Compare two results E1 and E2 of `howm-todo-priority-ext'. +Return true if E1 has higher priority than E2." + (cond ((> (car e1) (car e2)) t) + ((< (car e1) (car e2)) nil) + (t (string< (cdr e1) (cdr e2))))) + +(defun howm-todo-relative-late (late laziness default-laziness) + (/ late (float (or laziness default-laziness)))) + +(defun howm-todo-priority-normal (late lz item) + (let ((r (howm-todo-relative-late late lz + howm-todo-priority-normal-laziness))) + (cond ((< r 0) (+ r howm-todo-priority-normal-bottom)) + (t (- r))))) + +(defun howm-todo-priority-todo (late lz item) + (let ((r (howm-todo-relative-late late lz + howm-todo-priority-todo-laziness)) + (c (- howm-todo-priority-todo-init))) + (cond ((< r 0) (+ r howm-todo-priority-todo-bottom)) + (t (* c (- r 1)))))) + +(defun howm-todo-priority-defer (late lz item) + (let* ((r (howm-todo-relative-late late lz + howm-todo-priority-defer-laziness)) + (p howm-todo-priority-defer-peak) + (c (- p howm-todo-priority-defer-init))) + (let ((v (* 2 (abs (- (mod r 1) 0.5))))) + (cond ((< r 0) (+ r howm-todo-priority-defer-bottom)) + (t (- p (* c v))))))) + +;; ;; Clean me. +;; (defvar howm-todo-schedule-days nil) +;; (defvar howm-todo-schedule-days-before nil) +;; (defmacro howm-with-schedule-days (days days-before &rest body) +;; `(let ((howm-todo-schedule-days ,days) +;; (howm-todo-schedule-days-before ,days-before)) +;; ,@body)) +;; (put 'howm-with-schedule-days 'lisp-indent-hook 2) +;; (defun howm-todo-priority-schedule (late lz item) +;; (setq lz (or lz howm-todo-priority-schedule-laziness)) +;; (cond ((< late (- howm-todo-schedule-days)) +;; (+ late howm-todo-priority-schedule-bottom)) +;; ((< late (+ lz howm-todo-schedule-days-before)) +;; (+ late howm-todo-priority-schedule-top)) +;; (t +;; (+ late howm-todo-priority-schedule-bottom)))) + +(defun howm-todo-priority-deadline (late lz item) + (if howm-reminder-schedule-interval + (howm-todo-priority-deadline-1 late lz item) + (howm-todo-priority-deadline-2 late lz item))) + +(defun howm-todo-priority-deadline-1 (late lz item) + (let ((r (howm-todo-relative-late late lz + howm-todo-priority-deadline-laziness)) + (c (- howm-todo-priority-deadline-init)) + (d (- (howm-reminder-schedule-interval-to))) + (top howm-todo-priority-deadline-top) + (bot howm-todo-priority-deadline-bottom)) + ;; I dare to use late in the first case below so that + ;; deadline behaves like schedule after its deadline date. + (cond ((< d late) (+ top late)) + ((< r -1) (+ bot r)) + (t (* c r))))) + +(defun howm-todo-priority-deadline-2 (late lz item) + "This function may be obsolete in future. +`howm-todo-priority-deadline-1' will be used instead." + (let ((r (howm-todo-relative-late late lz + howm-todo-priority-deadline-laziness)) + (c (- howm-todo-priority-deadline-init))) + (cond ((> r 0) (+ r howm-todo-priority-deadline-top)) + ((< r -1) (+ r howm-todo-priority-deadline-bottom)) + (t (* c r))))) + +(defun howm-todo-priority-schedule (late lz item) + (if howm-reminder-schedule-interval + (howm-todo-priority-schedule-1 late lz item) + (howm-todo-priority-schedule-2 late lz item))) + +(defun howm-todo-priority-schedule-1 (late lz item) + (let ((lazy (or lz howm-todo-priority-schedule-laziness)) + (from (howm-reminder-schedule-interval-from)) + (to (howm-reminder-schedule-interval-to)) + (top howm-todo-priority-schedule-top) + (bot howm-todo-priority-schedule-bottom)) + (cond ((< late (- to)) (+ bot late)) + ((< late (+ from lazy)) (+ top late)) + (t (+ bot late))))) + +(defun howm-todo-priority-schedule-2 (late lz item) + "This function may be obsolete in future. +`howm-todo-priority-schedule-1' will be used instead." + (let ((r (howm-todo-relative-late late lz + howm-todo-priority-schedule-laziness))) + (cond ((> r 0) (+ r howm-todo-priority-schedule-bottom)) + (t r)))) + +(defun howm-todo-priority-done (late lz item) + (+ late howm-todo-priority-done-bottom)) + +(defun howm-todo-priority-unknown (late lz item) + (+ late howm-todo-priority-unknown-top)) + +(defun howm-encode-day (&optional d m y) + "Convert date Y-M-D to a float number, days from the reference date. +When D is omitted, the current time is encoded. +When D is t, the beginning of today is encoded." + (let* ((e (apply #'encode-time (cond ((eq d t) + (let ((now (howm-decode-time))) + (append '(0 0 0) (cdddr now)))) + (d + (mapcar #'string-to-number + (list "0" "0" "0" d m y))) + (t + (howm-decode-time))))) + (hi (car e)) + (low (second e)) + (daysec (* 60 60 24.0))) + (+ (* hi (/ 65536 daysec)) (/ low daysec)))) + +(defun howm-congrats () + (setq howm-congrats-count (1+ howm-congrats-count)) + (let* ((n (length howm-congrats-format)) + (r (random n))) + (message (nth r howm-congrats-format) howm-congrats-count) + (when howm-congrats-command + (howm-congrats-run howm-congrats-command)) + (run-hooks 'howm-congrats-hook))) +(defun howm-congrats-run (com-arg-list) + (let* ((name "howm-congrats") + (command (car com-arg-list)) + (args (cdr com-arg-list)) + (prev (get-process name))) + (when prev + (delete-process prev)) + (apply #'start-process-shell-command `(,name nil ,command ,@args)))) + +(defun howm-action-lock-reminder-done-rule () + (list (howm-reminder-regexp howm-reminder-types) + `(lambda (&optional arg) + (let ((command (if arg + nil + howm-action-lock-reminder-done-default))) + (howm-action-lock-done command))) + howm-reminder-regexp-command-pos)) + +(defun howm-reminder-search-path () + (howm-search-path t)) + +(defun howm-reminder-search-path-folder () + (howm-search-path-folder t)) + +;;; direct manipulation of items from todo list + +;; I'm sorry for dirty procedure here. +;; If we use naive howm-date-regexp, it matches to file name "2004-05-11.txt" +;; in summary mode. +(defun howm-action-lock-reminder-forward-rules (&optional summary-mode-p) + (let* ((action-maker (lambda (pos) + `(lambda (&optional dummy) + (howm-action-lock-forward (match-beginning ,pos))))) + (reminder-rule (list (howm-reminder-regexp howm-reminder-types) + (funcall action-maker 0) + howm-reminder-regexp-command-pos)) + (summary-date-reg (format ".*%s.*\\(%s\\)" + (regexp-quote howm-view-summary-sep) + howm-date-regexp)) + (summary-date-reg-pos 1) + (summary-date-rule (list summary-date-reg + (funcall action-maker summary-date-reg-pos) + summary-date-reg-pos)) + (menu-date-rule (list howm-date-regexp + (funcall action-maker 0))) + (date-rule (if summary-mode-p + summary-date-rule + menu-date-rule))) + (list reminder-rule date-rule))) + +(defvar howm-action-lock-forward-wconf nil + "for internal use") +(defun howm-action-lock-forward-escape () + (setq howm-action-lock-forward-wconf + (current-window-configuration))) +(defmacro howm-action-lock-forward-block (&rest body) + (declare (indent 0)) + `(prog2 + (setq howm-action-lock-forward-wconf nil) + (progn + ,@body) + (when howm-action-lock-forward-wconf + (set-window-configuration howm-action-lock-forward-wconf)))) + +(defun howm-action-lock-forward (form-pos) + (howm-action-lock-forward-block + (let* ((cursor-pos (point)) + (form-reg (howm-line-tail-regexp form-pos)) + (cursor-reg (howm-line-tail-regexp cursor-pos))) + (let* ((mt (buffer-modified-tick)) + (original-tail (buffer-substring form-pos (line-end-position))) + (modified-tail (howm-action-lock-forward-invoke form-reg + cursor-reg)) + (untouched-p (= mt (buffer-modified-tick)))) + ;; Current-buffer may be already updated according to + ;; howm-menu-refresh-after-save because save-buffer in + ;; howm-action-lock-forward-invoke can run howm-after-save-hook. + ;; We have to exclude such cases. + (when (and untouched-p + (not (string= original-tail modified-tail))) + (let ((buffer-read-only nil)) + (howm-menu-list-getput-item original-tail modified-tail) + (delete-region form-pos (line-end-position)) + (insert modified-tail))) + (goto-char cursor-pos) + (howm-action-lock-forward-update))))) + +(defun howm-line-tail-regexp (pos) + (concat (regexp-quote (buffer-substring-no-properties pos + (line-end-position))) + "$")) + +(defun howm-action-lock-forward-invoke (form-reg cursor-reg) + (howm-modify-in-background (lambda (&rest dummy) + ;; open the target file + ;; and go to the corresponding line + (howm-action-lock-forward-open)) + (lambda (form-reg cursor-reg) + (howm-action-lock-forward-modify-current-line + form-reg cursor-reg)) + howm-action-lock-forward-save-buffer + howm-action-lock-forward-kill-buffer + form-reg + cursor-reg)) + +(defun howm-modify-in-background (opener modifier save-p kill-p &rest args) + (save-excursion + (save-window-excursion + (let ((original-buffers (buffer-list))) + (apply opener args) + ;; We are in the target buffer now. + (let ((initially-modified-p (buffer-modified-p))) + (prog1 + (apply modifier args) + (when (and save-p + (not initially-modified-p) + (buffer-modified-p)) + (save-buffer)) + (when (and kill-p + (not (buffer-modified-p)) + (not (member (current-buffer) original-buffers))) + (kill-buffer (current-buffer))))))))) + +(defun howm-action-lock-forward-modify-current-line (form-reg cursor-reg) + (howm-modify-form #'action-lock-invoke form-reg cursor-reg)) + +(defun howm-modify-form (proc form-reg cursor-reg &rest args) + (labels + ((f-cursor () + (beginning-of-line) + (re-search-forward cursor-reg + (line-end-position + (+ 1 howm-action-lock-forward-fuzziness)) + t)) + (b-cursor () + (end-of-line) + (re-search-backward cursor-reg + (line-beginning-position + (- 1 howm-action-lock-forward-fuzziness)) + t)) + (b-form () + (end-of-line) + (re-search-backward form-reg (line-beginning-position) t))) + (or (save-excursion (and (f-cursor) (b-form))) + (save-excursion (and (b-cursor) (b-form))) + (error "Can't find corresponding line."))) + (goto-char (match-beginning 0)) + ;; Now we are at the beginning of the form. + ;; Remember this position to report the modified tail. + (save-excursion + (when (not (re-search-forward cursor-reg (line-end-position) t)) + (error "Can't find corresponding string.")) + (goto-char (match-beginning 0)) + ;; update display. I don't understand why this is needed. + ;; Without this, cursor is placed at the end of buffer if I delete many + ;; lines before the form position in the below setting (GNU Emacs 21.4.1). + ;; (setq howm-menu-refresh-after-save nil) + ;; (setq howm-menu-expiry-hours 3) + ;; (setq howm-action-lock-forward-fuzziness 20000) + ;; Sigh... + (switch-to-buffer (current-buffer) t) + ;; Now we are at the corresponding position. + ;; Let's call proc to modify the form! + (undo-boundary) + (apply proc args)) + ;; We are back to the beginning of the form. + ;; Report the modified tail. + (buffer-substring-no-properties (point) (line-end-position))) + +(defun howm-action-lock-forward-open () + (cond ((eq major-mode 'howm-menu-mode) + (progn + (howm-menu-list-action) + (when (eq major-mode 'howm-view-summary-mode) + (error "Several candidates.")))) + ((eq major-mode 'howm-view-summary-mode) + (howm-view-summary-open)) + (t + (error "Not supported on this buffer.")))) + +(defun howm-action-lock-forward-update () + (cond ((eq major-mode 'howm-menu-mode) + nil) ; do nothing + ((eq major-mode 'howm-view-summary-mode) + (howm-view-summary-check t)) + (t + (error "Not supported on this buffer.")))) + +;;; extend deadlines (experimental) + +(put 'howm-extend-deadlines 'disabled t) +(defun howm-extend-deadlines (days) + "Extend all overdue deadlines for DAYS from today." + (interactive "nHow many days? ") + (let ((hit (howm-cl-remove-if (lambda (item) + (< (second (howm-reminder-parse item)) 0)) + (howm-reminder-search "!")))) + (mapc (lambda (item) + (howm-modify-in-background (lambda (item dummy) + (howm-view-open-item item)) + #'howm-extend-deadline-here + nil nil item days)) + hit) + (howm-menu-refresh-background) + (message "Extended %s deadline(s)." (length hit)))) + +(defun howm-extend-deadline-here (item days) + (apply (lambda (form-reg cursor-reg) ;; use apply for destructuring-bind + (howm-modify-form #'howm-extend-deadline-doit + form-reg cursor-reg days)) + (let ((summary (howm-item-summary item))) + (string-match (howm-reminder-regexp ".") summary) + (mapcar (lambda (p) + (concat (regexp-quote + (substring summary (match-beginning p))) + "$")) + (list howm-reminder-regexp-date-pos + howm-reminder-regexp-year-pos))))) + +(defun howm-extend-deadline-doit (days) + (or (looking-at howm-date-regexp) + (re-search-backward howm-date-regexp (line-beginning-position) t) + (error "Can't find corresponding date form.")) + (howm-datestr-replace + (howm-datestr-shift (howm-time-to-datestr) 0 0 days))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; customize + +(defun howm-define-reminder (letter priority-func face schedule todo + &optional reminder) + "Define reminder type LETTER whose priority is determined by PRIORITY-FUNC. +It appears with FACE in schedule list when SCHEDULE is non-nil, and in +todo list when TODO is non-nil. It also appears in menu if SCHEDULE +or TODO is t." + (add-to-list 'howm-todo-priority-func + (cons letter priority-func)) + (add-to-list 'howm-reminder-font-lock-keywords + `(,(howm-reminder-regexp (format "[%s]" letter)) + (0 ,face prepend))) + (let* ((schedule-menu (eq schedule t)) + (todo-menu (eq todo t)) + (reminder-menu (or schedule-menu todo-menu))) + ;; Don't modify howm-reminder-marks. + ;; Otherwise, defcustom will be confused for howm-reminder-menu-types, etc. + (howm-cl-mapcar* (lambda (var flag) + (howm-modify-reminder-types var letter flag)) + '(howm-reminder-types + howm-schedule-types howm-todo-types + howm-schedule-menu-types howm-todo-menu-types + howm-reminder-menu-types) + (list t schedule todo + schedule-menu todo-menu reminder-menu)))) + +(defun howm-modify-reminder-types (var letter flag) + "Modify variable VAR whose value is \"[...]\". +Example: + (setq foo \"[abc]\") + (howm-modify-reminder-types 'foo \"d\" t) foo ==> \"[abcd]\" + (howm-modify-reminder-types 'foo \"b\" nil) foo ==> \"[acd]\" +" + (let ((val (symbol-value var))) + (when (not (string-match "^\\[\\(.*\\)\\]$" val)) + (error "Wrong format - %s: %s" var val)) + (let* ((old (match-string-no-properties 1 val)) + (removed (remove (string-to-char letter) old)) + (new (if flag + ;; This order is important when val is "[-+~!.]". + (concat removed letter) + removed))) + (set var (format "[%s]" new))))) + +;; (example) +;; If you write like below in your memo, it will appear +;; under today's schedule in reminder list. +;; The date "2004-11-01" is dummy and "0" means the position "today - 0". +;; [2004-11-01]_0 ======================== +;; (defun howm-todo-priority-separator (late lazy item) +;; (- howm-huge (or lazy 0) -1)) +;; (defface howm-reminder-separator-face +;; ;; invisible :p +;; '((((class color) (background light)) (:foreground "white")) +;; (((class color) (background dark)) (:foreground "black")) +;; (t ())) +;; "Face for `howm-list-reminder'. This is obsolete and will be removed in future." +;; :group 'howm-faces) +;; (defvar howm-reminder-separator-face 'howm-reminder-separator-face) +;; (defvar howm-reminder-separator-type "_") +;; (howm-define-reminder howm-reminder-separator-type +;; #'howm-todo-priority-separator +;; 'howm-reminder-separator-face t t) + +;;; howm-reminder.el ends here diff --git a/site-lisp/howm/howm-test130318-emacs24.3.patch b/site-lisp/howm/howm-test130318-emacs24.3.patch new file mode 100644 index 0000000..9f6253f --- /dev/null +++ b/site-lisp/howm/howm-test130318-emacs24.3.patch @@ -0,0 +1,21 @@ +--- howm-test130103/gfunc.el 2013-01-03 16:15:54.000000000 +0900 ++++ howm-test130318/gfunc.el 2013-03-18 04:46:14.000000000 +0900 +@@ -109,14 +109,12 @@ + as their dispatchers. + This macro cannot be nested." + (declare (indent 1)) ++ ;; Be careful to etc/NEWS in Emacs 24.3 or ++ ;; http://www.masteringemacs.org/articles/2013/03/11/whats-new-emacs-24-3/ ++ ;; "Emacs tries to macroexpand interpreted (non-compiled) files during load." ++ (setq *gfunc-dispatchers-var* dispatchers-var) + `(eval-and-compile +- ;; I want to use let instead of setq. +- ;; But, let doesn't work when this file is byte-compiled. +- ;; I don't understand the problem around macro and byte-compilation. +- (setq *gfunc-dispatchers-var* (quote ,dispatchers-var)) + ,@body)) +-;; (let ((*gfunc-dispatchers-var* (quote ,dispatchers-var))) +-;; ,@body))) + + (provide 'gfunc) + \ No newline at end of file diff --git a/site-lisp/howm/howm-vars.el b/site-lisp/howm/howm-vars.el new file mode 100644 index 0000000..744a5fa --- /dev/null +++ b/site-lisp/howm/howm-vars.el @@ -0,0 +1,1198 @@ +;;; howm-vars.el --- Wiki-like note-taking tool +;;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm-vars.el,v 1.59 2011-12-31 15:07:29 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;-------------------------------------------------------------------- + +(require 'howm-cl) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Util + +(defmacro howm-define-risky-command (risky orig) + "Define a macro RISKY which is risky-version of ORIG." + (let* ((gsymbol (howm-cl-gensym)) + (gargs (howm-cl-gensym)) + (docstring (format "Do `%s' and set risky-local-variable property." + orig))) + `(defmacro ,risky + (,gsymbol &rest ,gargs) + ,docstring + (declare (indent 'defun)) + (howm-define-risky-command-body ',orig ,gsymbol ,gargs)))) + +;; [2011-01-13] +;; I split this function from howm-define-risky-command for avoiding +;; nested backquotes. Nested backquotes are byte-compiled to +;; old-style-backquotes, that cause warnings when *.elc is loaded. +(defun howm-define-risky-command-body (command symbol args) + `(progn + (,command ,symbol ,@args) + (put ',symbol 'risky-local-variable t))) + +;; ;; This code is byte-compiled to old-style-backquotes. Sigh... +;; (defmacro howm-define-risky-command (risky orig) +;; "Define a macro RISKY which is risky-version of ORIG." +;; (let* ((gsymbol (howm-cl-gensym)) +;; (gargs (howm-cl-gensym)) +;; (docstring (format "Do `%s' and set risky-local-variable property." +;; orig))) +;; `(progn +;; (put ',risky 'lisp-indent-hook 'defun) +;; (defmacro ,risky +;; (,gsymbol &rest ,gargs) +;; ,docstring +;; (let ((command ',orig) +;; (symbol ,gsymbol) +;; (args ,gargs)) +;; `(progn +;; ;; (,',orig ...) doesn't work. +;; ;; So I need to bind temporal variables outside nested backquote. +;; (,command ,symbol ,@args) +;; (put ',symbol 'risky-local-variable t))))))) + +(howm-define-risky-command howm-defvar-risky defvar) +(howm-define-risky-command howm-defcustom-risky defcustom) +(howm-define-risky-command howm-defconst-risky defconst) + +;; ;; Should I use this? +;; (defmacro howm-boundp-q (var) +;; `(prog1 +;; (boundp ,var) +;; (howm-dont-warn-free-variable ,var))) +(defmacro howm-dont-warn-free-variable (var) + "No effect except for inhibition of warning in byte-compilation. +Without this trick, compiler says 'reference to free variable' even when +we have checked availability like (if (boundp xxx) ...)." + `(when (boundp (quote ,var)) + (defvar ,var nil))) + +(defmacro howm-funcall-if-defined (call &rest not-defined) + "Execute CALL if its car is defined as a function. +Otherwise, execute expressions in NOT-DEFINED. +This is cheat to avoid warning while byte-compilation. +Byte-compiler says \"not known to be defined\" even for codes like + (if (fboundp 'foo) (foo bar)). + +\(macroexpand '(howm-funcall-if-defined (migemo-get-pattern roma) nil)) +==> (if (fboundp 'migemo-get-pattern) + (let ((howm-funcall-if-defined-f 'migemo-get-pattern)) + (funcall howm-funcall-if-defined-f roma)) + nil) +" + (declare (indent 1)) + (let ((func (car call)) + (args (cdr call))) + `(if (fboundp (quote ,func)) + (let ((howm-funcall-if-defined-f (quote ,func))) + (funcall howm-funcall-if-defined-f ,@args)) + ,@not-defined))) + +;; copied and modified from mule-cmds.el +;; snap:///usr/share/emacs/21.2/lisp/international/mule-cmds.el#1870:(defun set-locale-environment (locale-name) +(defun howm-get-locale () + (let ((vars '("LC_ALL" "LC_CTYPE" "LANG")) + (locale nil)) + (while (and vars (not (setq locale (getenv (car vars))))) + (setq vars (cdr vars))) + (or locale ""))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Top + +(defgroup howm nil + "Wiki-like note-taking tool." + :group 'applications) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Compatibility + +(defvar howm-compatible-to-ver1dot3 nil + "If non-nil, compatible values to howm-1.3.* are used +as default of some variables; put (setq howm-compatible-to-ver1dot3 t) +*before* (require 'howm) if you like.") + +(defgroup howm-compatibility nil + "Compatibility to howm-1.3.*." + :group 'howm) + +(defmacro howm-if-ver1dot3 (oldval def) + (declare (indent 1)) + (destructuring-bind (command var val &rest args) def + `(,command ,var (if howm-compatible-to-ver1dot3 ,oldval ,val) + ,@args + :group 'howm-compatibility))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Files + +(defgroup howm-files nil + "Names of files and directories." + :group 'howm) + +(howm-defcustom-risky howm-directory "~/howm/" + "*All files under this directory are scanned recursively." + :type 'directory + :group 'howm-files) + +(let ((default-format "%Y/%m/%Y-%m-%d-%H%M%S.txt")) + (howm-if-ver1dot3 "%Y/%m/%Y-%m-%d-%H%M%S.howm" + (defcustom howm-file-name-format default-format + "Name of new file. See `format-time-string'. +For example, set as \"%Y/%m/%Y-%m-%d-%H%M%S.txt\" to separate each entry +to its own file. You must guarantee (string< oldfile newfile)." + :type `(radio (const :tag "One file for one entry" ,default-format) + (const :tag "One file for one day" "%Y/%m/%Y-%m-%d.txt") + (const :tag "One file for one month" "%Y/%Y-%m.txt") + (const :tag "One file for one year" "%Y.txt") + string) + :group 'howm-efficiency + :group 'howm-files))) + +(howm-defcustom-risky howm-keyword-file "~/.howm-keys" + "*Keywords (WikiNames) are stored in this file." + :type 'file + :group 'howm-files) + +;; inhibit warning in compilation. +(howm-dont-warn-free-variable image-file-name-regexps) +(defvar howm-image-file-name-regexps + (let ((exts-regexp "\\.\\(GIF\\|JP\\(?:E?G\\)\\|P\\(?:BM\\|GM\\|NG\\|PM\\)\\|TIFF?\\|X\\(?:[BP]M\\)\\|gif\\|jp\\(?:e?g\\)\\|p\\(?:bm\\|gm\\|ng\\|pm\\)\\|tiff?\\|x\\(?:[bp]m\\)\\)\\'") + (image-file-name-regexps (and (boundp 'image-file-name-regexps) + image-file-name-regexps))) + ;; copied from image-file-name-regexp. + (if image-file-name-regexps + (mapconcat 'identity + (if exts-regexp + (cons exts-regexp image-file-name-regexps) + image-file-name-regexps) + "\\|") + exts-regexp)) + "Regular expression that matches image-file filenames. +Default value is equal to the result of `image-file-name-regexp' +on GNU Emacs 21.2.1. + +In order to use `image-file-name-regexp' on Meadow 2.10 (ASAGAO), +max-specpdl-size must be increased from the default value 600. +Otherwise, an error occurs both in byte-compilation and in run time. +To avoid such troubles, this variable is prepared as a fixed string.") + +(defvar howm-excluded-dirs '("RCS" "CVS" ".svn" ".git" "_darcs")) + +(defvar howm-excluded-file-regexp-common-list + (list "[~#]$" + "\\.\\(bak\\|elc\\|gz\\|aux\\|toc\\|idx\\|dvi\\)$" + howm-image-file-name-regexps)) +(defvar howm-excluded-file-regexp-dir-sep + (if (let ((case-fold-search t)) + (string-match "windows" (symbol-name system-type))) + "[/\\\\]" ;; / or \ for win + "/")) ;; / otherwise +(let ((dir-head (concat "\\(^\\|" howm-excluded-file-regexp-dir-sep "\\)")) + (excluded-dirs (concat (regexp-opt howm-excluded-dirs t) + howm-excluded-file-regexp-dir-sep))) + (defvar howm-excluded-file-regexp-dots-ok + (mapconcat #'identity + `(,(concat dir-head excluded-dirs) + "^[.][.]" + ,@howm-excluded-file-regexp-common-list) + "\\|")) + (defvar howm-excluded-file-regexp-dots-ng + (mapconcat #'identity + `(,(concat dir-head "\\([.]\\|" excluded-dirs "\\)") + ,@howm-excluded-file-regexp-common-list) + "\\|"))) + +(howm-defcustom-risky howm-excluded-file-regexp howm-excluded-file-regexp-dots-ng + "Regexp for excluded files. +It is checked for relative paths from howm-directory and howm-search-path. +A file is excluded iff this regexp matches with all the relative paths." + :type `(radio (const :tag "Don't search dot files" + ,howm-excluded-file-regexp-dots-ng) + (const :tag "Search dot files" + ,howm-excluded-file-regexp-dots-ok) + regexp) + :group 'howm-files + ) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Menu + +(defgroup howm-menu nil + "Menu." + :group 'howm) + +(defcustom howm-menu-lang + (if (or (and (boundp 'current-language-environment) + (string= current-language-environment "Japanese")) + (string-match "^ja" (howm-get-locale))) + 'ja + 'en) + "*Language of menu." + :type '(radio (const en) (const ja)) + :group 'howm-menu) + +(howm-defcustom-risky howm-menu-file nil + "*Specify menu file explicitly, or set as nil to search every time." + :type '(radio (const :tag "Search every time" nil) + (const "0000-00-00-000000.txt") + file) + :group 'howm-files + :group 'howm-efficiency + :group 'howm-menu) + +(defcustom howm-menu-expiry-hours 0 + "*Cache menu contents for this number of hours." + :type 'number + :group 'howm-efficiency + :group 'howm-menu) + +(defcustom howm-menu-refresh-after-save t + "*If non-nil, refresh menu contents after you save howm note." + :type 'boolean + :group 'howm-efficiency + :group 'howm-menu) + +(defcustom howm-menu-name-format "*howmM:%s*" + "*Name format of menu buffer." + :type '(radio (const :tag "Never show in normal buffer list" " *howmM:%s*") + string) + :group 'howm-menu) + +(defcustom howm-menu-footer nil + "Footer string for each menu. Nil means no footer." + :type '(radio (const :tag "Off" nil) + string) + :group 'howm-menu) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Reminder + +(defgroup howm-reminder nil + "Schedule and todo list." + :group 'howm) + +(defvar howm-reminder-old-format nil) + +(defvar howm-reminder-marks + ;; Be careful to order of characters. + ;; "-" must be first so that regexp "[-+~!@.]" makes sense. + (if howm-reminder-old-format "-+~!@. " "-+~!@.")) +(defvar howm-reminder-types + (format "[%s]" howm-reminder-marks)) + +(defun howm-custom-reminder-get-types (symbol) + (let ((reg (default-value symbol)) + (default-types (split-string howm-reminder-marks ""))) + ;; return list of types for standard cases + ;; and string itself for nonstandard cases + (if (not (string-match "^\\[\\(.*\\)\\]" reg)) + reg + (let ((types (split-string (match-string-no-properties 1 reg) ""))) + (if (howm-cl-find-if-not (lambda (x) (member x default-types)) + types) + reg + (howm-cl-remove-if-not (lambda (x) (member x types)) + default-types)))))) +(defun howm-custom-reminder-set-types (symbol types) + (when (listp types) + (setq types (apply #'concat `("[" ,@types "]")))) + (set-default symbol types)) +(defun howm-custom-reminder-list-types () + `(radio (set ,@(mapcar (lambda (ty) (list 'const ty)) + (split-string howm-reminder-marks ""))) + string)) + +(defcustom howm-schedule-types "[!@.]" + "*Regular expression of reminder types which are listed as schedule." + :get #'howm-custom-reminder-get-types + :set #'howm-custom-reminder-set-types + :type (howm-custom-reminder-list-types) + :group 'howm-efficiency + :group 'howm-reminder) + +(defcustom howm-todo-types + (if howm-reminder-old-format "[-+~! .]" "[-+~!.]") + "*Regular expression of reminder types which are listed as todo." + :get #'howm-custom-reminder-get-types + :set #'howm-custom-reminder-set-types + :type (howm-custom-reminder-list-types) + :group 'howm-efficiency + :group 'howm-reminder) + +(defcustom howm-congrats-format '("Finished %s tasks!") + "List of format strings to generate message when a reminder is finished. +One of elements is chosen randomly every time." + :type '(repeat string) + :group 'howm-reminder) + +(howm-defcustom-risky howm-congrats-command nil + "*If non-nil, this command is executed when a reminder is finished. +Example: (\"play\" \"~/sound/fanfare.wav\") for calling the command +\"play ~/sound/fanfare.wav\"." + :type '(repeat string) + :group 'howm-reminder) + +(defcustom howm-reminder-cancel-string "cancel" + "*This string is inserted automatically when a reminder is canceled." + :type 'string + :group 'howm-reminder) + +(defcustom howm-action-lock-forward-save-buffer nil + "*Non nil if direct manipulation on reminder list should cause auto-save." + :type 'boolean + :group 'howm-reminder) + +(defcustom howm-action-lock-forward-kill-buffer nil + "*Non nil if direct manipulation on reminder list should cause kill-buffer. +Be careful that you cannot undo the result of action-lock after kill-buffer." + :type 'boolean + :group 'howm-reminder) + +(howm-if-ver1dot3 0 + (defcustom howm-action-lock-forward-fuzziness 5 + "*Maximum lines of permitted inconsistency for `howm-action-lock-forward'." + :type 'integer + :group 'howm-reminder)) + +(let* ((sep "- - - - - - - - - - - - - - - - - - -") + (reminder-default `((-1 . ,sep) (0 . ,sep) (nil . ,sep))) + (todo-default `((0 . ,sep) (nil . ,sep)))) + (howm-if-ver1dot3 nil + (defcustom howm-menu-reminder-separators reminder-default + "Assoc list to specify positions and strings of separators in reminder +in menu. For each element, car is days from now, and cdr is separator string. +If car is nil, it means the border between schedule and todo. +This option is prepared for `howm-menu-reminder'." + :type `(radio (const :tag "No separators" nil) + (const :tag "Default separators" ,reminder-default) + (alist :key-type + (radio number + (const :tag "Between schedule and todo" nil)) + :value-type string)) + :group 'howm-reminder)) + (defcustom howm-todo-separators nil + "Assoc list to specify positions and strings of separators in todo buffer. +For each element, car is priority and cdr is separator string. +If car is nil, it means the border between active and sleeping reminders." + :type `(radio (const :tag "No separators" nil) + (const :tag "Default separators" ,todo-default) + (alist :key-type number + :value-type string)) + :group 'howm-reminder)) + +(howm-if-ver1dot3 nil + (defcustom howm-schedule-sort-by-time t + "Non nil if `howm-schedule-sort-converter' should consider time part." + :type 'boolean + :group 'howm-reminder)) + +(defcustom howm-reminder-menu-types + (if howm-reminder-old-format "[-+~!@ ]" "[-+~!@]") + "*Regular expression of reminder types which are shown in menu." + :get #'howm-custom-reminder-get-types + :set #'howm-custom-reminder-set-types + :type (howm-custom-reminder-list-types) + :group 'howm-reminder) + +;;; +;;; Menu reminder +;;; + +(defgroup howm-menu-reminder nil + "Reminders shown in menu." + :group 'howm-menu + :group 'howm-reminder) + +(defcustom howm-schedule-menu-types "[!@]" + "*Regular expression of reminder types which are shown in menu as schedule." + :get #'howm-custom-reminder-get-types + :set #'howm-custom-reminder-set-types + :type (howm-custom-reminder-list-types) + :group 'howm-efficiency + :group 'howm-menu-reminder) + +(defcustom howm-todo-menu-types + (if howm-reminder-old-format "[-+~! .]" "[-+~!.]") + "*Regular expression of reminder types which are shown in menu as todo." + :get #'howm-custom-reminder-get-types + :set #'howm-custom-reminder-set-types + :type (howm-custom-reminder-list-types) + :group 'howm-efficiency + :group 'howm-menu-reminder) + +(defcustom howm-menu-schedule-days 7 + "*Show schedule in menu until this number of days from now." + :type 'number + :group 'howm-menu-reminder) + +(defcustom howm-menu-schedule-days-before 0 + "*Show schedule in menu from this number of days ago." + :type 'number + :group 'howm-menu-reminder) + +(defcustom howm-menu-todo-num 50 + "*Maximum number of todo items shown in menu." + :type 'number + :group 'howm-menu-reminder) + +(defvar howm-huge- 66666) +(defvar howm-huge 77777) +(defvar howm-huge+ 88888) +(defvar howm-huge++ 99999) + +(defcustom howm-menu-todo-priority (- howm-huge+) + "*Limit priority for elimination of reminders in menu." + :type `(radio (const :tag "Show sleeping reminders",(- howm-huge+)) + (const :tag "Hide sleeping reminders" ,(- howm-huge-)) + number) + :group 'howm-menu-reminder) + +(defcustom howm-todo-priority-done-bottom (- howm-huge+) + "*Base priority of done reminder. + = + " + :type `(radio (const :tag "Deeper than sleeping reminders" ,(- howm-huge+)) + (const :tag "Shallower than sleeping reminders" + ,(- howm-huge-)) + number) + :group 'howm-menu-reminder) + +(defcustom howm-menu-recent-num 20 + "*Maximum number of recent items shown in menu." + :type 'number + :group 'howm-menu-reminder) + +(defcustom howm-menu-recent-regexp nil + "Regexp which is regarded as title line in recent list in menu. +When it is nil, `howm-view-title-regexp' is used." + :type '(radio (const :tag "Default" nil) + regexp) + :group 'howm-title + :group 'howm-menu-reminder) + +(defcustom howm-menu-todo-priority-format nil + "*Format for priority display in todo list in menu, or nil for no display." + :type '(radio (const :tag "Off" nil) + (const "(%8.1f)") + string) + :group 'howm-devel + :group 'howm-menu-reminder) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; List + +(defgroup howm-list nil + "Style of list view." + :group 'howm) + +(defcustom howm-view-contents-limit nil + "*Max length for howm-view-contents. Nil means no limit." + :type '(radio (const :tag "No limit" nil) + integer) + :group 'howm-list) + +(defcustom howm-view-summary-keep-cursor t + "*If non-nil, keep cursor position when you open a note from summary list." + :type 'boolean + :group 'howm-list) + +(defcustom howm-view-summary-omit-same-name t + "*If non-nil, same name is not written repeatedly in summary list." + :type 'boolean + :group 'howm-list) + +(defcustom howm-list-recent-days 7 + "*This number of days are listed by `howm-list-recent'." + :type 'integer + :group 'howm-list) + +(defcustom howm-list-buffers-exclude + '("*Messages*" ".howm-keys" ".howm-history") + "*List of excluded buffer names for `howm-list-buffers'." + :type '(repeat string) + :group 'howm-list) + +;; +;; Sort +;; + +(defgroup howm-sort nil + "Sorting and filtering of matched entries." + :group 'howm-list) + +(howm-defcustom-risky howm-list-normalizer nil + "*Obsolete. Use `howm-normalizer' insteadly." + :type '(radio (const :tag "Off (strongly recommended)" nil) + (function-item :tag "Sort by edit-time" + howm-view-sort-by-mtime) + (function-item :tag "Sort by create-time" + howm-view-sort-by-reverse-date) + function) + :group 'howm-sort) + +(howm-defcustom-risky howm-normalizer 'howm-sort-items-by-mtime + "*Default method to list matched notes. +For backward compatibility, this value is overridden +if `howm-list-normalizer' is non-nil." + :type '(radio (function-item :tag "Sort by edit-time" + howm-sort-items-by-mtime) + (function-item :tag "Sort by create-time" + howm-sort-items-by-reverse-date) + function) + :group 'howm-sort) + +(defcustom howm-list-prefer-word nil + "*Matches to whole word are listed first in summary buffer." + :type 'boolean + :group 'howm-sort) + +(defcustom howm-list-prefer-wiki t + "*Matches to wiki tags are listed first in summary buffer." + :type 'boolean + :group 'howm-sort) + +;; +;; Title +;; + +(defgroup howm-title nil + "Title of each entry." + :group 'howm-list) + +;; I don't know the way to generate this list automatically. Sigh... +(defvar howm-custom-command-list + `(set ,@(mapcar (lambda (com) (list 'const com)) + '(howm-list-all + howm-list-recent + howm-list-around + howm-keyword-search + howm-list-grep + howm-list-grep-fixed + howm-list-migemo + howm-list-related + howm-action-lock-date-search + )))) + +(howm-defcustom-risky howm-list-title + '( + howm-list-all + howm-list-recent + howm-list-around + ; howm-keyword-search + ; howm-list-grep howm-list-grep-fixed howm-list-migemo + ; howm-list-related + howm-action-lock-date-search + ) + "List of commands in which titles are listed instead of matched lines. +T means 'always'. +If it is a function, the evaluated value is used instead of itself." + :type `(radio (const :tag "Always" t) + (const :tag "Never" nil) + ,howm-custom-command-list +;; (set (const howm-list-all) +;; (const howm-list-recent) +;; (const howm-list-around) +;; (const howm-keyword-search) +;; (const howm-list-grep) +;; (const howm-list-grep-fixed) +;; (const howm-list-migemo) +;; (const howm-list-related)) + function) + :group 'howm-efficiency + :group 'howm-title) + +(defcustom howm-list-title-regexp nil + "Regexp which is regarded as title line in summary buffer. +When it is nil, `howm-view-title-regexp' is used." + :type '(radio (const :tag "Default" nil) + regexp) + :group 'howm-title) + +(defcustom howm-list-title-undo t + "*Non-nil if `howm-list-toggle-title' should toggle whether title is shown +or not." + :type 'boolean + :group 'howm-efficiency + :group 'howm-title) + +;; +;; BufWin +;; + +(defgroup howm-list-bufwin nil + "Buffers and windows for listing search result." + :group 'howm-list) + +(defcustom howm-view-summary-name "*howmS*" + "Format string of buffer name for summary. +%s is replaced with searched string. See `format'." + :type '(radio (const :tag "Use one common buffer" "*howmS*") + (const :tag "Make new buffer for each search" "*howmS:%s*") + string) + :group 'howm-list-bufwin) + +(defcustom howm-view-contents-name "*howmC*" + "Format string of buffer name for contents. +%s is replaced with searched string. See `format'." + :type '(radio (const :tag "Use one common buffer" "*howmC*") + (const :tag "Make new buffer for each search" "*howmC:%s*") + string) + :group 'howm-list-bufwin) + +(howm-defcustom-risky howm-view-summary-persistent t + "*If non-nil, keep summary buffer on howm-view-summary-open by default. +If it is a function, the evaluated value is used instead of itself." + :type 'boolean + :group 'howm-list-bufwin) + +(howm-defcustom-risky howm-view-contents-persistent t + "*If non-nil, keep contents buffer on howm-view-contents-open by default. +If it is a function, the evaluated value is used instead of itself." + :type 'boolean + :group 'howm-list-bufwin) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Search + +(defgroup howm-search nil + "Search methods." + :group 'howm) + +(defcustom howm-keyword-case-fold-search nil + "*Non-nil if searches of come-from keywords should ignore case." + :type 'boolean + :group 'howm-search) + +(defcustom howm-check-word-break nil + "*Non-nil if come-from keywords within a word should not linked. +When the value is a string (regexp), word breaks are checked +only for matched keywords. " + :type '(radio (const :tag "Always" t) + (const :tag "Never" nil) + (const :tag "ASCII only" "^[[:ascii:]]+$") + string) + :group 'howm-search) + +(defcustom howm-view-update-search-ring nil + "*Non-nil if search-ring should be updated in howm search." + :type 'boolean + :group 'howm-search) + +(defcustom howm-message-time nil + "*Non nil if search etc. should show took time." + :type 'boolean + :group 'howm-devel + :group 'howm-search) + +(howm-defcustom-risky howm-history-file "~/.howm-history" + "*Search history is recorded to that file." + :type 'file + :group 'howm-files + :group 'howm-search) + +(defcustom howm-history-limit 50 + "*Limit number of recorded search history, or nil for no limit. +Set 0 to inhibit recording." + :type '(radio (const :tag "No limit" nil) + integer) + :group 'howm-search) + +(defcustom howm-history-unique t + "*If non-nil, duplicated entries are removed from search history." + :type 'boolean + :group 'howm-search) + +(defcustom howm-keyword-list-alias-sep "\t" + "*Separator string for alias keywords in the keyword file `howm-keyword-file'. +If it is nil, alias of come-from keyword is disabled." + :type '(radio (const :tag "Disable aliases" nil) + (const :tag "Tab" "\t") + string) + :group 'howm-search) + +(defcustom howm-keyword-aliases-recursive t + "*Non nil if aliases of come-from keywords should be expanded recursively." + :type 'boolean + :group 'howm-search) + +;;; +;;; grep +;;; + +(defgroup howm-grep nil + "Use external grep command for fast search." + :group 'howm-efficiency + :group 'howm-search) + +(howm-defcustom-risky howm-view-use-grep nil + "*If non-nil, use external grep command for search. +Performance must be improved greatly if you set this. +When the value is elisp function, it is used instead of `howm-fake-grep'." + :type '(radio (const :tag "On" t) + (const :tag "Off" nil) + function) + :group 'howm-grep) + +;; These variables should be renamed: howm-view-xxx ==> howm-xxx. +(howm-defcustom-risky howm-view-grep-command "grep" + "*Command name for grep." + :type 'string + :group 'howm-grep) +(howm-defvar-risky howm-view-fgrep-command nil + "*Command name for fgrep. +This variable is obsolete and may be removed in future.") +(defvar howm-view-grep-default-option + (labels ((ed (d) (concat "--exclude-dir=" d))) + (let* ((has-ed (condition-case nil + (eq 0 (call-process howm-view-grep-command nil nil nil + (ed "/") "--version")) + (error nil))) + (opts (cons "-Hnr" (and has-ed (mapcar #'ed howm-excluded-dirs))))) + (mapconcat #'identity opts " ")))) +(howm-defcustom-risky howm-view-grep-option howm-view-grep-default-option + "*Common grep option for howm." + :type `(radio (const :tag "scan all files" + ,howm-view-grep-default-option) + (const :tag "scan *.howm only" + ,(concat howm-view-grep-default-option + " --include=*.howm")) + string) + :group 'howm-grep) +(howm-defcustom-risky howm-view-grep-extended-option "-E" + "*Grep option for extended regular expression." + :type 'string + :group 'howm-grep) +(howm-defcustom-risky howm-view-grep-fixed-option "-F" + "*Grep option to search fixed strings." + :type 'string + :group 'howm-grep) +(howm-defcustom-risky howm-view-grep-ignore-case-option "-i" + "*Grep option for ignoring case distinctions." + :type 'string + :group 'howm-grep) +(howm-defcustom-risky howm-view-grep-expr-option "-e" + "*Grep option for pattern." + :type 'string + :group 'howm-grep) +(howm-defcustom-risky howm-view-grep-file-stdin-option "-f -" + "*Grep option for receiving patterns from standard input. +If this is nil, pattern is received as command line argument." + :type '(radio (const :tag "Off" nil) + string) + :group 'howm-grep) + +(howm-defcustom-risky howm-command-length-limit 10000 + "*Maximum length of command line for call-process." + :type 'integer + :group 'howm-grep) + +(defcustom howm-process-coding-system nil + "*Default coding system for grep command in howm. +If the value is a symbol, it is used for both read and write. +If the value is a cons pair, its car and cdr are used for read and write, +respectively. + +Example: + (setq howm-process-coding-system 'euc-japan-unix) + (setq howm-process-coding-system '(utf-8-unix . sjis-unix))" + :type '(radio (const :tag "Off" nil) + coding-system + (cons coding-system coding-system)) + :group 'howm-grep) + +(howm-if-ver1dot3 nil + (defcustom howm-occur-force-fake-grep t + "*If non-nil, force `howm-occur' to use `howm-fake-grep' +so that highlighting works correctly." + :type 'boolean + :group 'howm-grep)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Misc + +(defgroup howm-misc nil + "Miscellaneous customization." + :group 'howm) + +(defvar howm-prefix "\C-c," + "Howm commands are invoked by this prefix + some keys.") + +(defcustom howm-random-walk-wait 2 + "*Seconds of wait in `howm-random-walk'." + :type 'number + :group 'howm-misc) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Create + +(defgroup howm-create nil + "Create new note." + :group 'howm-misc) + +(defcustom howm-prepend nil + "*Non nil if new entries should be prepended to previous entries. +Otherwise, they are appended." + :type '(radio (const :tag "Append" nil) + (const :tag "Prepend" t)) + :group 'howm-create) + +(defcustom howm-content-from-region nil + "*When the value non-nil, selected string is inserted as default content. +Unless the value is t, single-line selection is inserted as title instead. +This variable is ignored when `transient-mark-mode' is nil." + :type '(radio (const :tag "Off" nil) + (const :tag "Single line selection is copied as title" 1) + (const :tag "Any selection is copied as content" t)) + :group 'howm-create) + +(defcustom howm-title-from-search nil + "*Non nil if searched keyword is inserted as default title +when `howm-create' is called on summary buffer." + :type 'boolean + :group 'howm-create) + +(defcustom howm-create-here-just nil + "*Non nil if `howm-create-here' should insert new entry into cursor position +rather than append or prepend." + :type '(radio (const :tag "Append or prepend" nil) + (const :tag "Just here" t)) + :group 'howm-create) + +(defcustom howm-remember-first-line-to-title nil + "If non-nil, the first line in `howm-remember' is set to %title +and the rest lines are inserted to the position at %cursor in `howm-template. +If nil, all the lines are simply inserted at %cursor." + :type 'boolean + :group 'howm-create) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Viewer + +(defgroup howm-viewer nil + "External viewers for images, movies, sounds, etc." + :group 'howm-misc) + +(defun howm-try-require (feature) + (and (locate-library (symbol-name feature)) + (require feature))) + +;; These variables should be renamed. + +(howm-defcustom-risky howm-view-external-viewer-assoc nil + "List of viewer specifications. +Each specification must be a cons pair of type and format. +Type is a regular expression of file names. +Format is a command string in which %s is replaced with file name. +This setting is prior to mailcap. + +This variable is marked as a risky local variable +because `howm-viewer-dispatchers' `howm-viewer-indicator' +and `howm-viewer-type' accept functions instead of format strings. + +Example: + (setq howm-view-external-viewer-assoc + '( + (\"[.]\\(jpg\\|gif\\|png\\)$\" . \"display %s\") + (\"[.]dvi$\" . \"xdvi %s\") + )) +" + :type '(alist :key-type regexp :value-type string) + :group 'howm-viewer) + +(defcustom howm-view-use-mailcap + (and (howm-try-require 'mailcap) + (fboundp 'mailcap-parse-mailcaps) + (fboundp 'mailcap-parse-mimetypes)) + "*Non nil if external viewers should be selected according to mailcap. +Mailcap processing depends on gnus/mailcap, and old FLIM library may +cause conflicts." + :type 'boolean + :group 'howm-viewer) + +(defcustom howm-view-open-by-myself '("text/.*" "application/emacs-lisp") + "List of regular expressions for mime types which should be opened normally." + :type '(repeat regexp) + :group 'howm-viewer) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Narrow + +(defgroup howm-narrow nil + "Narrowing to each entry." + :group 'howm-misc) + +(defcustom howm-auto-narrow t + "List of commands after which the function `howm-auto-narrow' can work. +If the value is t, it means 'always'." + :type `(radio (const :tag "Never" nil) + (const :tag "Always" t) + ,howm-custom-command-list) + :group 'howm-narrow) + +(mapc (lambda (hook) (custom-add-option hook 'howm-auto-narrow)) + '(howm-view-open-hook howm-create-hook)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Efficiency + +(defgroup howm-efficiency nil + "To improve performance, use grep and turn off expensive options." + :group 'howm) + +(defcustom howm-refresh-after-save t + "*Redraw links after you save howm note." + :type 'boolean + :group 'howm-efficiency) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Face + +(defgroup howm-faces nil + "Colors and fonts." + :group 'faces + :group 'howm) + +(howm-defcustom-risky howm-user-font-lock-keywords nil + "Font lock keywords for all howm-related buffers. +See help of `font-lock-keywords' for details." + ;; :type '(repeat (radio (cons regexp (list (const quote) face)) + ;; sexp)) + :type 'sexp + :group 'howm-faces) + +(defcustom howm-use-color t + "*If non-nil, highlight tags in howm-mode verbosely." + :type 'boolean + :group 'howm-faces) + +(defface howm-view-hilit-face + '((((class color)) (:foreground "red")) + (t ())) + "*Face for matched word." + :group 'howm-faces) + +(defface howm-view-name-face + '((((class color)) (:foreground "white" :background "blue")) + (t ())) + "*Face for file name in summary buffer." + :group 'howm-faces) + +(defface howm-view-empty-face + '((((class color)) (:background "midnight blue")) + (t ())) + "*Face for empty field in summary buffer." + :group 'howm-faces) + +(defface howm-mode-title-face ;; = + '((((class color)) (:foreground "RoyalBlue")) + (t ())) + "*Face for title." + :group 'howm-faces) +(defface howm-mode-ref-face ;; >>> + '((((class color) (background light)) (:foreground "blue")) + (((class color) (background dark)) (:foreground "cyan")) + (t ())) + "*Face for goto link." + :group 'howm-faces) +(defface howm-mode-keyword-face ;; <<< + '((((class color)) (:foreground "white" :background "blue")) + (t ())) + "*Face for come-from link." + :group 'howm-faces) +(defface howm-mode-wiki-face ;; [[]] + '((((class color) (background light)) (:foreground "blue")) + (((class color) (background dark)) (:foreground "cyan")) + (t ())) + "*Face for wiki link." + :group 'howm-faces) + +(defface howm-reminder-normal-face + '((((class color)) (:foreground "blue")) + (t ())) + "*Face for normal reminder." + :group 'howm-faces) +(defface howm-reminder-todo-face + '((((class color) (background light)) (:foreground "purple")) + (((class color) (background dark)) (:foreground "yellow")) + (t ())) + "*Face for todo." + :group 'howm-faces) +(defface howm-reminder-defer-face + '((((class color)) (:foreground "magenta")) + (t ())) + "*Face for defer." + :group 'howm-faces) +(defface howm-reminder-deadline-face + '((((class color)) (:foreground "red")) + (t ())) + "*Face for deadline." + :group 'howm-faces) +(defface howm-reminder-late-deadline-face + '((((class color)) (:background "red" :foreground "black")) + (t ())) + "*Face for late deadline." + :group 'howm-faces) +(defface howm-reminder-schedule-face + '((((class color) (background light)) (:foreground "dark green")) + (((class color) (background dark)) (:foreground "green")) + (t ())) + "*Face for schedule." + :group 'howm-faces) +(defface howm-reminder-done-face + '((((class color) (background light)) ()) + (((class color) (background dark)) (:foreground "gray")) + (t ())) + "*Face for done reminder." + :group 'howm-faces) +(defface howm-reminder-today-face + '((((class color)) (:foreground "black" :background "orange")) + (t ())) + "*Face for today." + :group 'howm-faces) +(defface howm-reminder-tomorrow-face + '((((class color)) (:foreground "black" :background "pink")) + (t ())) + "*Face for tommorow." + :group 'howm-faces) + +(defface howm-menu-list-face ;; item header in menu-mode list (schedule, todo) + '((t ())) + "*Face for list in menu." + :group 'howm-faces) +(defface howm-menu-key-face ;; shortcut key in menu-mode + '((((class color) (background light)) (:foreground "dark red")) + (((class color) (background dark)) (:foreground "orange")) + (t ())) + "*Face for key binding in menu." + :group 'howm-faces) + +(defvar howm-view-hilit-face 'howm-view-hilit-face + "*Face for matched word.") +(defvar howm-view-name-face 'howm-view-name-face + "*Face for file name in summary buffer.") +(defvar howm-view-empty-face 'howm-view-empty-face + "*Face for empty field in summary buffer.") +(defvar howm-mode-title-face 'howm-mode-title-face + "*Face for title.") +(defvar howm-mode-ref-face 'howm-mode-ref-face + "*Face for goto link.") +(defvar howm-mode-keyword-face 'howm-mode-keyword-face + "*Face for come-from link.") +(defvar howm-mode-wiki-face 'howm-mode-wiki-face + "*Face for wiki link.") +(defvar howm-reminder-normal-face 'howm-reminder-normal-face + "*Face for normal reminder.") +(defvar howm-reminder-todo-face 'howm-reminder-todo-face + "*Face for todo.") +(defvar howm-reminder-defer-face 'howm-reminder-defer-face + "*Face for defer.") +(defvar howm-reminder-deadline-face 'howm-reminder-deadline-face + "*Face for deadline.") +(defvar howm-reminder-late-deadline-face 'howm-reminder-late-deadline-face + "*Face for late deadline.") +(defvar howm-reminder-schedule-face 'howm-reminder-schedule-face + "*Face for schedule.") +(defvar howm-reminder-done-face 'howm-reminder-done-face + "*Face for done reminder.") +(defvar howm-reminder-today-face 'howm-reminder-today-face + "*Face for today.") +(defvar howm-reminder-tomorrow-face 'howm-reminder-tomorrow-face + "*Face for tommorow.") +(defvar howm-menu-list-face 'howm-menu-list-face + "*Face for list in menu.") +(defvar howm-menu-key-face 'howm-menu-key-face + "*Face for key binding in menu.") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Hook + +(defgroup howm-hooks nil + "Hooks." + :group 'howm) + +(defcustom howm-mode-hook nil + "Hook run at the end of function `howm-mode'" + :type 'hook + :group 'howm-hooks) + +(defcustom howm-mode-on-hook nil + "Hook run when `howm-mode' is turned on." + :type 'hook + :group 'howm-hooks) + +(defcustom howm-mode-off-hook nil + "Hook run when `howm-mode' is turned off." + :type 'hook + :group 'howm-hooks) + +(defcustom howm-view-open-hook nil + "Hook run when open a note from summary/contents buffer." + :type 'hook + :group 'howm-narrow + :group 'howm-hooks) + +(defcustom howm-view-before-open-hook nil + "Hook run before open something from summary or contents buffer." + :type 'hook + :group 'howm-hooks) + +(defcustom howm-create-file-hook nil + "Hook run when buffer for new note is created." + :type 'hook + :group 'howm-hooks) + +(defcustom howm-create-hook nil + "Hook run after new note is created and set up." + :type 'hook + :group 'howm-narrow + :group 'howm-hooks) + +(defcustom howm-menu-hook nil + "Hook run at the end of `howm-menu-refresh'." + :type 'hook + :group 'howm-hooks) + +(defcustom howm-congrats-hook nil + "Hook run at the end of `howm-congrats'." + :type 'hook + :group 'howm-hooks) + +(defcustom howm-after-save-hook nil + "Hook run at the end of `howm-after-save'." + :type 'hook + :group 'howm-hooks) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Devel + +(defgroup howm-devel nil + "Developers' diagnoses." + :group 'howm) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Experimental + +(defgroup howm-experimental nil + "Test of experimental features." + :group 'howm) + +;;; + +(provide 'howm-vars) + +;;; howm-vars.el ends here diff --git a/site-lisp/howm/howm-version.el b/site-lisp/howm/howm-version.el new file mode 100644 index 0000000..09d8a7c --- /dev/null +++ b/site-lisp/howm/howm-version.el @@ -0,0 +1,8 @@ +;;; howm-version.el --- Wiki-like keyword jump between files +;;; -*- Emacs-Lisp -*- +;;; @configure_input@ + +(provide 'howm-version) +(defconst howm-version "InsertVersionHere") + +;;; howm-version.el ends here diff --git a/site-lisp/howm/howm-version.el.in b/site-lisp/howm/howm-version.el.in new file mode 100644 index 0000000..d6ba815 --- /dev/null +++ b/site-lisp/howm/howm-version.el.in @@ -0,0 +1,8 @@ +;;; howm-version.el --- Wiki-like keyword jump between files +;;; -*- Emacs-Lisp -*- +;;; @configure_input@ + +(provide 'howm-version) +(defconst howm-version "~VERSION~") + +;;; howm-version.el ends here diff --git a/site-lisp/howm/howm-view.el b/site-lisp/howm/howm-view.el new file mode 100644 index 0000000..b3ba603 --- /dev/null +++ b/site-lisp/howm/howm-view.el @@ -0,0 +1,1603 @@ +;;; howm-view.el --- Wiki-like note-taking tool +;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm-view.el,v 1.251 2012-12-29 08:57:18 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;-------------------------------------------------------------------- + +(provide 'howm-view) +(require 'howm) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; variables + +;; customize +(defvar howm-view-summary-sep "|") +(defvar howm-view-summary-format + (let* ((path (format-time-string howm-file-name-format)) + (width (length (file-name-nondirectory path)))) + (concat "%-" (format "%s" (1+ width)) "s" howm-view-summary-sep " "))) +(defvar howm-view-header-format + "\n==========================>>> %s\n" + "Format string of header for howm-view-contents. +%s is replaced with file name. See `format'.") +(defvar howm-view-header-regexp "^==========================>>> .*$") +(defvar howm-view-open-recenter howm-view-search-recenter) +(defvar howm-view-title-header "=") +;; howm-view-title-regexp is assumed to have a form "^xxxxxxx$" +(defvar howm-view-title-regexp (format "^%s\\( +\\(.*\\)\\|\\)$" + (regexp-quote howm-view-title-header))) +(defvar howm-view-title-regexp-pos 2) +(defvar howm-view-title-regexp-grep (format "^%s +" + (regexp-quote howm-view-title-header))) +(defun howm-view-title-regexp-grep () + (if howm-view-use-grep + howm-view-title-regexp-grep + howm-view-title-regexp)) + +(howm-defvar-risky howm-view-sort-methods + '(("random" . howm-view-sort-by-random) + ("name" . howm-view-sort-by-name) + ("name-match" . howm-view-lift-by-name) + ("numerical-name" . howm-view-sort-by-numerical-name) + ("summary" . howm-view-sort-by-summary) + ("summary-match" . howm-view-lift-by-summary) + ("summary-match-string" . howm-view-lift-by-summary-substring) +; ("atime" . howm-view-sort-by-atime) ;; nonsense +; ("ctime" . howm-view-sort-by-ctime) ;; needless + ("mtime" . howm-view-sort-by-mtime) + ("date" . howm-view-sort-by-reverse-date) + ("reminder" . howm-view-sort-by-reminder) + ("reverse" . howm-view-sort-reverse))) + +(howm-defvar-risky howm-view-filter-methods + '(("name" . howm-view-filter-by-name) + ("summary" . howm-view-filter-by-summary) + ("mtime" . howm-view-filter-by-mtime) +; ("ctime" . howm-view-filter-by-ctime) ;; needless + ("date" . howm-view-filter-by-date) + ("reminder" . howm-view-filter-by-reminder) + ("contents" . howm-view-filter-by-contents) + ("Region" . howm-view-filter-by-region) + ("Around" . howm-view-filter-by-around) +; ("uniq" . howm-view-filter-uniq)) + )) + +;; referred only when howm-view-use-grep is nil +(defvar howm-view-watch-modified-buffer t) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; item + +(defun howm-view-item-basename (item &optional nonempty) + (let* ((f (howm-item-name item)) + (b (file-name-nondirectory f))) + (if (and (string= b "") nonempty) + f + b))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; riffle + +(defalias 'riffle-home:howm 'howm-view-item-home) +(defalias 'riffle-summary-item:howm 'howm-view-summary-item) +(defalias 'riffle-contents-item:howm 'howm-view-contents-item) +(defalias 'riffle-summary-set-mode:howm 'howm-view-summary-mode) +(defalias 'riffle-contents-set-mode:howm 'howm-view-contents-mode) + +(defun riffle-summary-name-format:howm () + howm-view-summary-name) +(defun riffle-contents-name-format:howm () + howm-view-contents-name) +(defun riffle-post-update:howm (item) + (howm-message-nolog "View: %s" (howm-view-item-filename item))) + +;;; aliases + +;; Only howm-view.el should call riffle-xxx. +;; Define alias if it is used in howm-xxx besides howm-view.el. +(defalias 'howm-view-name #'riffle-name) +(defalias 'howm-view-item-list #'riffle-item-list) +(defalias 'howm-view-line-number #'riffle-line-number) +(defalias 'howm-view-summary-check #'riffle-summary-check) +(defalias 'howm-view-persistent-p #'riffle-persistent-p) +(defalias 'howm-view-kill-buffer #'riffle-kill-buffer) +(defalias 'howm-view-set-place #'riffle-set-place) +(defalias 'howm-view-get-place #'riffle-get-place) +(defalias 'howm-view-summary-current-item #'riffle-summary-current-item) +(defalias 'howm-view-contents-current-item #'riffle-contents-current-item) +(defalias 'howm-view-summary-to-contents #'riffle-summary-to-contents) +(defalias 'howm-view-restore-window-configuration #'riffle-restore-window-configuration) + +;; for howmoney.el +;; http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?howmoney +(defun howm-view-get-buffer (name-format &optional name new) + (let ((riffle-type ':howm)) ;; cheat + (riffle-get-buffer name-format name new))) +(defun howm-view-summary-buffer (&optional new) + (let ((riffle-type ':howm)) ;; cheat + (riffle-summary-buffer new))) +(defalias 'howm-view-summary-show 'riffle-summary-show) +(defalias 'howm-view-set-item-list 'riffle-set-item-list) + +;; for howmz +;; http://noir.s7.xrea.com/archives/000136.html +;; http://noir.s7.xrea.com/pub/zaurus/howmz.el +(defalias 'howm-view-sort-items 'howm-sort) + +;;; variables + +(defvar howm-view-font-lock-silent t + "Inhibit font-lock-verbose if non-nil.") +(howm-defvar-risky howm-view-summary-font-lock-keywords + `((,(concat "\\(^[^ \t\r\n].*?\\)" (regexp-quote howm-view-summary-sep)) + 1 howm-view-name-face) + ("^ +" . howm-view-empty-face))) +(howm-defvar-risky howm-view-contents-font-lock-keywords nil) + +(howm-defvar-risky *howm-view-font-lock-keywords* nil + "For internal use. Don't set this variable. +This is a shameful global variable and should be clearned in future.") +(howm-defvar-risky howm-view-font-lock-keywords nil + "For internal use.") +(defvar howm-view-font-lock-first-time t + "For internal use.") +(make-variable-buffer-local 'howm-view-font-lock-keywords) +(make-variable-buffer-local 'howm-view-font-lock-first-time) + +;;; modes + +(riffle-define-derived-mode howm-view-summary-mode riffle-summary-mode "HowmS" + "memo viewer (summary mode) +key binding +--- ------- +\\[howm-view-summary-open] Open file +\\[next-line] Next item +\\[previous-line] Previous item +\\[riffle-pop-or-scroll-other-window] Pop and scroll contents +\\[scroll-other-window-down] Scroll contents +\\[riffle-scroll-other-window] Scroll contents one line +\\[riffle-scroll-other-window-down] Scroll contents one line +\\[riffle-summary-to-contents] Concatenate all contents +\\[howm-view-filter-uniq] Remove duplication of same file +\\[howm-view-summary-shell-command] Execute command in inferior shell + +\\[delete-other-windows] Delete contents window +\\[riffle-pop-window] Pop contents window +\\[riffle-toggle-window] Toggle contents window +\\[howm-list-toggle-title] Show/Hide Title + +\\[howm-view-filter] Filter (by date, contents, etc.) +\\[howm-view-filter-by-contents] Search (= filter by contents) +\\[howm-view-sort] Sort (by date, summary line, etc.) +\\[howm-view-sort-reverse] Reverse order +\\[howm-view-dired] Invoke Dired-X +\\[describe-mode] This help +\\[riffle-kill-buffer] Quit +" + (make-local-variable 'font-lock-keywords) + (cheat-font-lock-mode howm-view-font-lock-silent) + (when howm-view-font-lock-first-time + (setq howm-view-font-lock-first-time nil) + (cheat-font-lock-merge-keywords howm-user-font-lock-keywords + howm-view-summary-font-lock-keywords + ;; dirty! Clean dependency between files. + (howm-reminder-today-font-lock-keywords))) + (when *howm-view-font-lock-keywords* + (setq howm-view-font-lock-keywords *howm-view-font-lock-keywords*)) + (when howm-view-font-lock-keywords + (cheat-font-lock-merge-keywords howm-view-font-lock-keywords + howm-user-font-lock-keywords + howm-view-summary-font-lock-keywords)) + ;; font-lock-set-defaults removes these local variables after 2008-02-24 + (set (make-local-variable 'font-lock-keywords-only) t) + (set (make-local-variable 'font-lock-keywords-case-fold-search) t) + ;; (setq font-lock-keywords-case-fold-search + ;; howm-view-grep-ignore-case-option) + (howm-fontify) + ) + +(riffle-define-derived-mode howm-view-contents-mode riffle-contents-mode "HowmC" + "memo viewer (contents mode) +key binding +--- ------- +\\[howm-view-contents-open] Open file +\\[next-line] Next line +\\[previous-line] Previous line +\\[scroll-up] Scroll up +\\[scroll-down] Scroll down +\\[riffle-scroll-up] Scroll one line up +\\[riffle-scroll-down] Scroll one line down +\\[riffle-contents-to-summary] Summary +\\[riffle-contents-goto-next-item] Next item +\\[riffle-contents-goto-previous-item] Previous item + +\\[howm-view-filter] Filter (by date, contents, etc.) +\\[howm-view-filter-by-contents] Search (= filter by contents) +\\[howm-view-sort] Sort +\\[howm-view-sort-reverse] Reverse order +\\[howm-view-dired] Invoke Dired-X +\\[describe-mode] This help +\\[riffle-kill-buffer] Quit +" +; (kill-all-local-variables) + (make-local-variable 'font-lock-keywords) + (cheat-font-lock-mode howm-view-font-lock-silent) + (let ((ck `((,howm-view-header-regexp (0 howm-view-hilit-face)))) + (sk (or (howm-view-font-lock-keywords) + *howm-view-font-lock-keywords*))) +;; ;; extremely dirty!! [2003/10/06 21:08] +;; (sk (or (with-current-buffer (riffle-summary-buffer) +;; font-lock-keywords) +;; *howm-view-font-lock-keywords*))) + (cheat-font-lock-merge-keywords sk ck + howm-user-font-lock-keywords + howm-view-contents-font-lock-keywords) + ;; font-lock-set-defaults removes these local variables after 2008-02-24 + (set (make-local-variable 'font-lock-keywords-only) t) + (set (make-local-variable 'font-lock-keywords-case-fold-search) + howm-view-grep-ignore-case-option) + (howm-fontify) + )) + +(defun howm-view-font-lock-keywords () + (with-current-buffer (riffle-summary-buffer) + howm-view-font-lock-keywords)) + +;;; keymaps + +;; (defvar howm-view-summary-mode-map nil) +;; (defvar howm-view-contents-mode-map nil) + +(defun howm-view-define-common-key (keymap) + (let ((m keymap)) +;; (define-key m "?" 'howm-view-help) + (define-key m "f" 'howm-view-filter) + (define-key m "G" 'howm-view-filter-by-contents) + (define-key m "S" 'howm-view-sort) + (define-key m "R" 'howm-view-sort-reverse) + (define-key m "q" 'howm-view-kill-buffer) + (define-key m "X" 'howm-view-dired) + )) + +(let ((m howm-view-summary-mode-map)) + (define-key m "\C-m" 'howm-view-summary-open) + (define-key m "\C-j" 'howm-view-summary-open) + (define-key m "u" 'howm-view-filter-uniq) + (define-key m "!" 'howm-view-summary-shell-command) + (define-key m "T" 'howm-list-toggle-title) ;; defined in other file. dirty! + ;; (define-key m howm-reminder-quick-check-key 'howm-reminder-quick-check) + ;; (define-key m ";" 'howm-view-invoke-action-lock) + (define-key m "\C-i" 'howm-view-summary-next-section) + (define-key m "\M-\C-i" 'howm-view-summary-previous-section) + (define-key m [tab] 'howm-view-summary-next-section) + (define-key m [(meta tab)] 'howm-view-summary-previous-section) + (howm-view-define-common-key m)) + +(let ((m howm-view-contents-mode-map)) + (define-key m "\C-m" 'howm-view-contents-open) + (define-key m "\C-j" 'howm-view-contents-open) + (howm-view-define-common-key m)) + +;;; summary + +(defun howm-view-summary (&optional name item-list fl-keywords) + (let* ((*howm-view-font-lock-keywords* fl-keywords) ;; ok? [2008-07-11] + (r (riffle-summary name item-list ':howm + (howm-view-in-background-p)))) + (if (null r) + (message "No match") + ;; We want to entry font-lock keywords even when background-p. + (when *howm-view-font-lock-keywords* + (setq howm-view-font-lock-keywords *howm-view-font-lock-keywords*))) + r)) + +;; (defun howm-view-summary (&optional name item-list) +;; (let ((*howm-view-font-lock-keywords* t)) +;; (riffle-summary name item-list ':howm))) + +(defun howm-view-summary-open (&optional reverse-delete-p) + (interactive "P") + (when (not (and howm-view-summary-keep-cursor + (get-buffer-window (riffle-contents-buffer)))) + (riffle-summary-check t)) + (let* ((p (riffle-persistent-p howm-view-summary-persistent)) + (persistent (if reverse-delete-p + (not p) + p))) + (howm-record-view-window-configuration) + (howm-view-summary-open-sub (not persistent)))) + +(defun howm-view-summary-open-sub (&optional kill) + (interactive "P") + (let ((b (riffle-contents-buffer)) + (looking-at-str (buffer-substring-no-properties (point) + (line-end-position)))) + (riffle-pop-to-buffer b howm-view-summary-window-size) + (let ((howm-view-open-hook nil)) ;; Don't execute it in contents-open. + (howm-view-contents-open-sub kill)) + (end-of-line) + (or (search-backward looking-at-str (line-beginning-position) t) + (beginning-of-line)) + (run-hooks 'howm-view-open-hook))) + +(defvar howm-view-summary-item-previous-name nil + "for internal use") +(defun howm-view-summary-item (item) + ;; Clean me. This depends on implementation of `riffle-summary-show' + ;; severely. + (when (eq (point) (point-min)) + (setq howm-view-summary-item-previous-name "")) + (let* ((f (howm-item-name item)) + (name (if (and howm-view-summary-omit-same-name + (string= f howm-view-summary-item-previous-name)) + "" + (progn + (setq howm-view-summary-item-previous-name f) + (howm-view-item-basename item t)))) + (h (format howm-view-summary-format name))) + (concat h (howm-view-item-summary item)))) + +(defun howm-view-summary-next-section (&optional n) + (interactive "P") + (setq n (or n 1)) + (let ((i (abs n)) + (step (if (>= n 0) 1 -1))) + (while (and (> i 0) + (howm-view-summary-next-section-sub step)) + (setq i (1- i))))) +(defun howm-view-summary-previous-section (&optional n) + (interactive "P") + (setq n (or n 1)) + (howm-view-summary-next-section (- n))) +(defun howm-view-summary-next-section-sub (step) + ;; inefficient. so what? + (let* ((f (lambda () + (howm-view-item-filename (riffle-summary-current-item)))) +;; (riffle-controller 'section (riffle-summary-current-item)))) + (cont-p (lambda () + (save-excursion + (let ((a (funcall f))) + (forward-line -1) + (string= a (funcall f))))))) + (while (and (= (forward-line step) 0) + (funcall cont-p)) + ;; no body + ))) + +;;; contents + +(defun howm-view-contents-open (&optional reverse-delete-p) + (interactive "P") + (let* ((p (riffle-persistent-p howm-view-contents-persistent)) + (persistent (if reverse-delete-p + (not p) + p))) + (howm-record-view-window-configuration) + (howm-view-contents-open-sub (not persistent)))) + +(defvar *howm-view-item-privilege* nil) ;; dirty + +(defun howm-view-contents-open-sub (&optional kill) + (let* ((item (riffle-contents-current-item)) + (page (howm-item-page item)) + (offset (howm-view-item-offset item)) + (pos (- (point) offset)) + (viewer (howm-view-external-viewer page))) + (when kill + (riffle-kill-buffer)) + (when (howm-view-item-privilege item) + (riffle-restore-window-configuration)) ;; force without mode check + (setq *howm-view-item-privilege* (howm-view-item-privilege item)) ;; dirty + (run-hooks 'howm-view-before-open-hook) + (if viewer + (howm-view-call-external-viewer viewer page) + (howm-view-open-item item + (lambda () + (when (or (< pos (point-min)) (<= (point-max) pos)) + (widen)) + (goto-char pos)) + t)) + (run-hooks 'howm-view-open-hook))) + +(defun howm-view-open-item (item &optional position-setter merely) + (howm-page-open (howm-item-page item)) + (howm-view-set-mark-command) + (if position-setter + (funcall position-setter) + (howm-view-set-place (howm-item-place item))) + (recenter howm-view-open-recenter) + (when (not merely) + (howm-view-open-postprocess))) +(defun howm-view-open-postprocess () + (run-hooks 'howm-view-open-hook)) + +(defvar howm-view-previous-section-page nil "For internal use") +(defvar howm-view-previous-section-beg nil "For internal use") +(defvar howm-view-previous-section-end nil "For internal use") + +(defun howm-view-contents-item (item) + (when (howm-buffer-empty-p) + (setq howm-view-previous-section-page "" + howm-view-previous-section-beg nil + howm-view-previous-section-end nil)) + (let* ((page (howm-item-page item)) + (place (howm-view-item-place item)) + (peq (howm-page= page howm-view-previous-section-page)) ;; dirty! + (done-p (if place + (and peq + (<= howm-view-previous-section-beg place) + (<= place howm-view-previous-section-end)) + peq))) + (if done-p + "" + (let* ((header (if (null (cdr (howm-view-item-list))) ;; dirty! + "" + (format howm-view-header-format + (howm-page-abbreviate-name page)))) + (header-length (howm-view-string-point-count header)) + (viewer (howm-view-external-viewer page))) + (concat header + (howm-view-contents-item-sub item page place header viewer + (+ (point) header-length))))))) + +(defvar howm-view-string-point-count-strict nil) +(defun howm-view-string-point-count (str) + "Count points of string STR. +Namely, it is the difference between start position and end position +of STR if STR is inserted to a buffer. +It looks to be simply equal to (length STR) on emacs-21.1.1. +But I'm not sure for multi-byte characters on other versions of emacsen." + (if howm-view-string-point-count-strict + (with-temp-buffer + (insert str) + (- (point) (point-min))) + ;; I assume (length (buffer-substring-no-properties START END)) + ;; is equal to (abs (- START END))). Is it correct? + ;; (cf.) snap://Info-mode/elisp#Positions + (length str))) + +(defun howm-view-contents-item-sub (item page place header viewer c) + (with-temp-buffer + (let (b e h) + (if viewer + (howm-view-contents-indicator viewer page) + (howm-page-insert page)) + (if place + (progn + (riffle-set-place place) + (setq h (point)) + (let ((r (howm-view-contents-region page))) + (setq b (car r) + e (second r)))) + (setq b (point-min) + e (point-max) + h b)) + (howm-view-item-set-offset item (- c b)) + (howm-view-item-set-home item (+ c (- b) h)) + (setq howm-view-previous-section-page page ;; dirty! + howm-view-previous-section-beg (riffle-get-place b) + howm-view-previous-section-end (riffle-get-place e)) + (buffer-substring-no-properties b e)))) + +(defvar howm-view-preview-narrow t) +(defun howm-view-contents-region (filename) + (when filename + (howm-page-set-configuration filename)) + (if (or howm-view-preview-narrow + (not (riffle-preview-p))) + (howm-view-paragraph-region) + (list (point-min) (point-max)))) + +(defun howm-view-contents-indicator (viewer fname) + (insert (howm-viewer-indicator viewer fname))) + +(defun howm-view-paragraph-region (&optional include-following-blank-p) + (let ((b (save-excursion + (end-of-line) + (re-search-backward howm-view-title-regexp + nil 'to-limit) + (line-beginning-position))) + (e (save-excursion + (end-of-line) + (let ((found (re-search-forward howm-view-title-regexp + nil 'to-limit))) + (if include-following-blank-p + (if found (match-beginning 0) (point-max)) + (progn + (if found + (forward-line -1) + (goto-char (point-max))) +; (end-of-line) + (while (and (looking-at "^$") + (= (forward-line -1) 0)) ;; successful + nil) ;; dummy + (end-of-line) + (point))))))) + (list b e))) + +(defun howm-view-set-mark-command () + (set-mark-command nil) + (howm-deactivate-mark)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; misc. + +(defun howm-view-file-list (&optional item-list) + (howm-cl-remove-duplicates* (mapcar #'howm-view-item-filename + (or item-list (howm-view-item-list))) + :test #'howm-page=)) + +(defun howm-view-mtime (file) + (howm-view-time-to-string (howm-page-mtime file))) + +;; (defun howm-view-xtime (file x) +;; (let* ((a (file-attributes file)) +;; (n (cdr (assoc x '((a . 4) (m . 5) (c . 6))))) +;; (ti (nth n a))) +;; (howm-view-time-to-string ti))) + +(defun howm-view-time-to-string (ti) + (format-time-string "%Y%m%d-%H%M%S" ti)) + +(defun howm-view-string> (a b) + (string< b a)) + +(defun howm-view-string<= (a b) + (not (string< b a))) + +(defun howm-view-string< (a b) + (string< a b)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; dir + +(defun howm-view-directory (dir &optional recursive-p) + (howm-view-summary "" (howm-folder-items dir recursive-p))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; filter + +(defun howm-view-filter (&optional remove-p) + (interactive "P") + (let* ((table howm-view-filter-methods) + (command (completing-read (if remove-p + "(Reject) filter by: " + "filter by: ") + table nil t))) + (call-interactively (cdr (assoc command table))))) + +(defun howm-view-filter-uniq () + (interactive) + (howm-view-filter-doit #'howm-filter-items-uniq)) + +(defun howm-view-filter-by-name (&optional remove-p regexp) + (interactive "P") + (howm-view-filter-by-name/summary #'howm-filter-items-by-name + regexp remove-p)) + +(defun howm-view-filter-by-summary (&optional remove-p regexp) + (interactive "P") + (howm-view-filter-by-name/summary #'howm-filter-items-by-summary + regexp remove-p)) + +(defun howm-view-filter-by-name/summary (filter regexp remove-p) + (let* ((r (or regexp (howm-view-filter-read-from-minibuffer "Regexp: " + remove-p))) + (f `(lambda (item-list rmv-p) + (funcall #',filter item-list ,r rmv-p)))) + (howm-view-filter-doit f remove-p))) + +(defun howm-view-filter-by-date (&optional remove-p) + (interactive "P") + (howm-view-filter-by-time-range #'howm-filter-items-by-date + remove-p)) + +(defun howm-view-filter-by-reminder (&optional remove-p) + (interactive "P") + (howm-view-filter-by-time-range #'howm-filter-items-by-reminder remove-p)) + +(defun howm-view-filter-by-mtime (&optional remove-p range) + (interactive "P") + (howm-view-filter-by-time-range #'howm-filter-items-by-mtime remove-p range)) + +(defun howm-view-filter-by-time-range (filter &optional remove-p range) + (let* ((r (or range (howm-view-ask-time-range remove-p))) + (from (car r)) + (to (second r)) + (f `(lambda (item-list rmv-p) + (funcall #',filter item-list ',from ',to rmv-p)))) + (howm-view-filter-doit f remove-p))) + +(defun howm-view-filter-by-region (beg end) + (interactive "r") + (let ((r (mapcar #'howm-view-line-number (list beg end)))) + (howm-view-filter-by-line-range (car r) (second r)))) + +(defvar howm-view-filter-by-around-default 10) +(defun howm-view-filter-by-around (&optional distance) + (interactive "P") + (let* ((d (or distance howm-view-filter-by-around-default)) + (c (howm-view-line-number))) + (howm-view-filter-by-line-range (- c d) (+ c d)))) + +(defun howm-view-filter-by-line-range (beg end) + (let ((f `(lambda (item-list remove-p) + (when remove-p + (error "Not supported.")) + ;; beg and end are counted as 1,2,3,... + (howm-cl-subseq item-list + (max (1- ,beg) 0) + ;; end is included. + (min ,end (length item-list)))))) + (howm-view-filter-doit f))) + +(defun howm-view-filter-by-contents (&optional remove-p regexp) + (interactive "P") + (let ((r (or regexp (howm-view-filter-read-from-minibuffer + "Search in result (grep): " + remove-p)))) + (if remove-p + (howm-view-remove-by-contents r) + (howm-view-search-in-result r)))) + +(howm-if-ver1dot3 nil + (defcustom howm-view-search-in-result-correctly t + "*Non nil if search-in-result should be aware of paragraph." + :type 'boolean + :group 'howm-search)) + +(defun howm-view-search-in-result (regexp) +;; (interactive "sSearch in result (grep): ") + (let* ((orig (howm-view-name)) + (name (if (string= orig "") + regexp + (format "%s&%s" orig regexp))) + (orig-item-list (howm-view-item-list)) + (folder (howm-make-folder-from-items orig-item-list))) + (howm-write-history regexp) + (howm-view-search-folder regexp folder name) + (when howm-view-search-in-result-correctly + (howm-view-summary-rebuild (howm-item-list-filter (howm-view-item-list) + orig-item-list))))) + +(defun howm-view-remove-by-contents (regexp) +;; (interactive "s(Reject) Search in result (grep): ") + (let ((howm-v-r-b-c-regexp regexp)) + (howm-view-sort/filter-doit + (lambda (item-list switch) + (howm-filter-items-by-contents item-list howm-v-r-b-c-regexp t))))) + +(defun howm-view-sort/filter-doit (proc &optional switch) + (let ((kw font-lock-keywords)) + (prog1 + ;; return item-list for + ;; http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?HidePrivateReminder + (howm-view-summary-rebuild (funcall proc (howm-view-item-list) switch)) + (setq font-lock-keywords kw)))) + +(defalias 'howm-view-filter-doit 'howm-view-sort/filter-doit) + +;; For backward compatibility with howmoney. Don't use this. +(defun howm-view-filter-general (pred) + (howm-view-filter-doit (lambda (item-list dummy) + (howm-cl-remove-if-not pred item-list)))) +;; (defun howm-view-filter-general (pred &optional remove-p with-index) +;; (let* ((item-list (howm-view-item-list)) +;; (s (if with-index +;; (howm-map-with-index #'list item-list) +;; item-list)) +;; (r (if remove-p +;; (howm-cl-remove-if pred s) +;; (howm-cl-remove-if-not pred s))) +;; (filtered (if with-index +;; (mapcar #'car r) +;; r))) +;; (howm-view-summary-rebuild filtered))) + +(defmacro howm-filter-items (pred lis &optional remove-p) + `(if ,remove-p + (howm-cl-remove-if ,pred ,lis) + (howm-cl-remove-if-not ,pred ,lis))) + +(defun howm-filter-items-uniq (item-list &optional remove-p) + (when remove-p + (error "Not supported.")) + (let* ((howm-view-filter-uniq-prev (if howm-view-search-in-result-correctly + (cons "" nil) + "")) + (pred (if howm-view-search-in-result-correctly + (lambda (item) + (let ((page (howm-item-page item)) + (place (howm-item-place item)) + (range (howm-item-range item)) + (p-page (car howm-view-filter-uniq-prev)) + (p-range (cdr howm-view-filter-uniq-prev))) + (prog1 + (not (and (howm-page= page p-page) + (and place p-range + (<= (car p-range) place) + (<= place (second p-range))))) + (setq howm-view-filter-uniq-prev (cons page range))))) + ;; old code + (lambda (item) + (let ((f (howm-view-item-filename item))) + (prog1 + (not (howm-page= f howm-view-filter-uniq-prev)) + (setq howm-view-filter-uniq-prev f))))))) + (howm-cl-remove-if-not pred item-list))) + +(defun howm-filter-items-by-name (item-list regexp &optional remove-p) + (howm-filter-items-by-name/summary #'howm-view-item-basename + item-list regexp remove-p)) + +(defun howm-filter-items-by-summary (item-list regexp &optional remove-p) + (howm-filter-items-by-name/summary #'howm-view-item-summary + item-list regexp remove-p)) + +(defun howm-filter-items-by-name/summary (accessor item-list regexp remove-p) + (howm-filter-items (lambda (item) + (string-match regexp (funcall accessor item))) + item-list remove-p)) + +(defun howm-filter-items-by-date (item-list from to &optional remove-p) + (let* ((form (howm-view-file-name-format)) + (fts (mapcar (lambda (x) + (file-name-nondirectory (format-time-string form x))) + (list from to))) + (fs (car fts)) + (ts (second fts))) + (howm-filter-items (lambda (item) + (let ((cs (howm-view-item-basename item))) + (and (howm-view-string<= fs cs) + (howm-view-string< cs ts)))) + item-list remove-p))) + +(defun howm-filter-items-by-reminder (item-list from to &optional remove-p) + (let* ((from-str (format-time-string howm-date-format from)) + (to-str (format-time-string howm-date-format to)) + (reg (howm-reminder-regexp howm-reminder-types))) + (howm-filter-items + (lambda (item) + (let ((s (howm-view-item-summary item))) + (and (string-match reg s) + (let* ((x (match-string-no-properties 0 s)) ;; [2004-02-07]@ + (d (and (string-match howm-date-regexp x) + (match-string-no-properties 0 x)))) ;; [2004-02-07] + (and (howm-view-string<= from-str d) + (howm-view-string< d to-str)))))) + item-list remove-p))) + +(defun howm-filter-items-by-mtime (item-list from to &optional remove-p) + (let ((fs (howm-view-time-to-string from)) + (ts (howm-view-time-to-string to))) + (howm-filter-items + (lambda (item) + (let ((cs (howm-view-mtime (howm-view-item-filename item)))) + (and (howm-view-string<= fs cs) + (howm-view-string< cs ts)))) + item-list remove-p))) + +(defun howm-filter-items-by-contents (item-list regexp &optional remove-p) + (let* ((match (howm-view-search-folder-items-fi regexp item-list))) + (if howm-view-search-in-result-correctly + (howm-item-list-filter item-list match remove-p) + ;; old behavior + (let ((match-names (howm-cl-remove-duplicates* + (mapcar #'howm-item-name match)))) + (howm-filter-items (lambda (item) + (member (howm-item-name item) match-names)) + item-list remove-p))))) + +(defun howm-view-file-name-format () + howm-file-name-format) ;; defined in howm-common.el + +(defun howm-view-ask-time-range (&optional remove-p) + (let* ((now (current-time)) + (from (howm-view-ask-time "From" now t remove-p)) + (to (howm-view-ask-time "To" from nil remove-p))) + (list from to))) + +(defvar howm-view-min-year 1950) +(defvar howm-view-max-year 2030) +(defun howm-view-ask-time (prompt default &optional from-p remove-p) + (let* ((z (decode-time default)) + (yd (nth 5 z)) + (md (nth 4 z)) + (dd (nth 3 z))) + (let (y0 m0 d0 hour0 min0 sec0) + (if from-p + (setq y0 howm-view-min-year m0 1 d0 1 + hour0 0 min0 0 sec0 0) + (setq y0 howm-view-max-year m0 12 d0 'last-day-of-month + hour0 24 min0 0 sec0 0)) + (let ((y (howm-ask-time-sub prompt "year" yd remove-p))) + (if (null y) + (howm-view-encode-time sec0 min0 hour0 d0 m0 y0) + (let ((m (howm-ask-time-sub prompt "month" md remove-p))) + (if (null m) + (howm-view-encode-time sec0 min0 hour0 d0 m0 y) + (let ((d (or (howm-ask-time-sub prompt "date" dd remove-p) d0))) + (howm-view-encode-time sec0 min0 hour0 d m y))))))))) + +(defun howm-ask-time-sub (prompt ymd default remove-p) + (let* ((message (format "%s %s (* = no limit) [%d]: " prompt ymd default)) + (raw (howm-view-filter-read-from-minibuffer message remove-p)) + (n (if (string= raw "") + default + (string-to-number raw)))) + (if (= n 0) + nil + n))) + +(defun howm-view-encode-time (sec min hour d m y) + (when (eq d 'last-day-of-month) + (setq m (+ m 1)) + (setq d -1)) + (encode-time sec min hour d m y)) + +(defun howm-view-filter-read-from-minibuffer (message &optional remove-p) + (read-from-minibuffer (if remove-p + (concat "(Reject) " message) + message))) + +(defun howm-view-summary-rebuild (item-list &optional fl-keywords) + (howm-view-summary (howm-view-name) item-list fl-keywords)) + +(let* ((h (regexp-quote howm-view-title-header)) + (t1 (format "Skip \"%s \"" howm-view-title-header)) + (r1 (format "^\\(%s\\)? *$" h)) + (t2 (format "Skip \"%s \" and \"[xxxx-xx-xx xx:xx]\"" + howm-view-title-header)) + (r2 (format "\\(%s\\)\\|\\(^\\[[-: 0-9]+\\]\\)" r1))) + (howm-if-ver1dot3 nil + (defcustom howm-view-title-skip-regexp r2 + "*Regular expression for lines which should not be titles. +If the original title matches this regexp, the first non-matched line +is shown as title instead. +Nil disables this feature. + +This feature does not work when `howm-view-search-in-result-correctly' is nil." + :type `(radio (const :tag "Off" nil) + (const :tag ,t1 ,r1) + (const :tag ,t2 ,r2) + regexp) + :group 'howm-title + :group 'howm-efficiency))) + +(defcustom howm-view-list-title-type 1 + "*Type of showing title in summary buffer. +Value 1 means \"show title instead of summary\". +Value 2 means \"show title before summary\". +You may want to set `howm-view-summary-format' to be \"\" if you never need +to see file names." + :type '(radio (const :tag "title instead of summary" + 1) + (const :tag "title before summary" + 2)) + :group 'howm-experimental) + +(defun howm-view-list-title (title-regexp) + (howm-view-summary-rebuild (howm-entitle-items + title-regexp (howm-view-item-list)))) + +(defun howm-entitle-items (title-regexp item-list) + (if (= howm-view-list-title-type 1) + (howm-entitle-items-style1 title-regexp item-list) + (howm-entitle-items-style2 title-regexp item-list))) + +(defun howm-entitle-items-style1 (title-regexp item-list) + "Put title instead of summary." + (let ((items (howm-view-search-folder-items-fi title-regexp item-list))) + (if howm-view-search-in-result-correctly + (let* ((r (howm-item-list-filter items item-list 'with-rest)) + (hit-items (car r)) + (nohit-items (cdr r)) + ;; should I use (howm-classify #'howm-item-place nohit-items) ? + (noplace-nohit-items + (howm-cl-remove-if #'howm-item-place nohit-items)) + (rest-items + (howm-item-list-filter (howm-cl-remove-if-not #'howm-item-place + nohit-items) + items t)) + (all-items (append hit-items noplace-nohit-items rest-items))) + (when howm-view-title-skip-regexp + (mapc #'howm-view-change-title all-items)) + all-items) + (let* ((pages (howm-cl-remove-duplicates* (mapcar #'howm-item-page + item-list))) + (hit-pages (mapcar #'howm-item-page items)) + (nohit-pages (howm-cl-remove-if + (lambda (p) (howm-cl-member* p hit-pages + :test #'howm-page=)) + pages)) + (nohit-items (mapcar #'howm-make-item nohit-pages)) + (all-items (if (null nohit-items) + items + (append items nohit-items)))) + all-items)))) + +(defvar howm-entitle-items-style2-max-length 20) +(defvar howm-entitle-items-style2-format "%-13s | %s") ;; for title and summary +(defvar howm-entitle-items-style2-title-line nil) ;; independent title line? +(defun howm-entitle-items-style2 (title-regexp item-list) + "Put title before summary." + ;; fix me: howm-item-place is not set for howm-list-all + (let ((last-title "")) + (howm-cl-mapcan + (lambda (item) + (let ((orig (howm-item-summary item)) + (titles (howm-item-titles item))) + (howm-cl-mapcan + (lambda (s) + (if (string= s last-title) + (setq s "") + (setq last-title s)) + (when (> (length s) howm-entitle-items-style2-max-length) + (setq s (substring s 0 howm-entitle-items-style2-max-length))) + (mapcar (lambda (x) + (let ((i (howm-item-dup item))) + (howm-item-set-summary i x) + i)) + (if (and howm-entitle-items-style2-title-line + (not (string= s ""))) + (list (format howm-entitle-items-style2-format + s "") + (format howm-entitle-items-style2-format + "" orig)) + (list (format howm-entitle-items-style2-format + s orig))))) + (or titles (list ""))))) + item-list))) + +;;; detect items in same paragraph (= entry = memo. sorry for inconsistent terminology) + +(defun howm-item-with-temp-buffer (item proc) + (with-temp-buffer + (howm-page-insert (howm-item-page item)) + (let* ((p (howm-item-place item)) + (r (if (null p) + (list (point-min) (point-max)) + (progn + (riffle-set-place p) + (howm-view-paragraph-region))))) + (narrow-to-region (car r) (second r)) + (funcall proc item)))) + +(defun howm-item-titles (item) + "List of titles of ITEM. +When place (see `howm-item-place') is specified, ITEM has at most one title. +Otherwise, ITEM can have two or more titles." + (howm-item-with-temp-buffer + item + (lambda (i) + (let ((titles nil)) + (goto-char (point-min)) + (while (re-search-forward (howm-list-title-regexp) nil t) + (setq titles + (cons (buffer-substring-no-properties (match-beginning 0) + (line-end-position)) + titles))) + (mapcar (lambda (x) + (if (string-match howm-view-title-regexp x) + (match-string-no-properties howm-view-title-regexp-pos x) + x)) + (reverse titles)))))) + +(defun howm-item-range (item) + "List of beginning-place and end-place of paragraph to which ITEM belongs." + (howm-item-with-temp-buffer + item + (lambda (i) + (let ((r (list (point-min) (point-max)))) + (widen) + (list (progn + (goto-char (car r)) + (riffle-get-place)) + (progn + (goto-char (second r)) + (riffle-get-place))))))) +;; (with-temp-buffer +;; (howm-page-insert (howm-item-page item)) +;; (let* ((p (howm-item-place item)) +;; (r (if (null p) +;; (list (point-min) (point-max)) +;; (progn +;; (riffle-set-place p) +;; (howm-view-paragraph-region))))) +;; (list (progn +;; (goto-char (car r)) +;; (riffle-get-place)) +;; (progn +;; (goto-char (second r)) +;; (riffle-get-place)))))) + +(defun howm-item-list-rangeset (item-list) + "Make assoc list of page to rangeset. +ITEM-LIST is list of items. +Return value is assoc list; each element of it is a cons pair of page +and rangeset which indicates ranges of places of paragraphs to which items +in ITEM-LIST belongs." + (let ((alist nil)) ;; key = page, value = rangeset of place + (labels ((add-to-alist (page rs) + (setq alist (cons (cons page rs) alist)))) + (mapc (lambda (item) + (let* ((page (howm-item-page item)) + (place (howm-item-place item)) + (rs (cdr (assoc page alist)))) + (cond ((null place) + (add-to-alist page (howm-make-rangeset))) + ((null rs) + (add-to-alist page (howm-make-rangeset + (howm-item-range item)))) + ((howm-rangeset-belong-p place rs) + nil) ;; do nothing + (t + (howm-rangeset-add! rs (howm-item-range item)))))) + item-list) + alist))) + +(defun howm-item-list-filter (item-list reference-item-list + &optional remove-match) + "Select items in ITEM-LIST according to REFERENCE-ITEM-LIST. +When REMOVE-MATCH is nil, return value is list of items i in ITEM-LIST +which satisfy the condition \"there exists i' in REFERENCE-ITEM-LIST +such that i and i' belong to same paragraph\" (case 1). +When REMOVE-MATCH is non-nil and not the symbol 'with-rest', +return value is complement of the above list; +list of items in ITEM-LIST which do not satisfy the above condition (case 2). +When REMOVE-MATCH is the symbol 'with-rest', +return value is (A . B), where A is the return value of case 1 and +B is items in REFERENCE-ITEM-LIST that do not match in case 1." + ;; + ;; split no-place items: + ;; Though implementation 1 calls grep many times, + ;; implementation 2 is slower in construction of folder from items. + ;; [2012-12-28] + ;; + ;; implementation 1 (call grep many times) + (setq item-list + (howm-cl-mapcan (lambda (item) + (if (howm-item-place item) + (list item) + (or (howm-view-search-folder-items-fi + (howm-view-title-regexp-grep) (list item)) + (list item)))) + item-list)) + ;; + ;; ;; implementation 2 (making items-folder is slow) + ;; (let* ((place-items (howm-cl-remove-if-not #'howm-item-place item-list)) + ;; (no-place-items (howm-cl-remove-if #'howm-item-place item-list)) + ;; (split-items (howm-view-search-folder-items-fi + ;; (howm-view-title-regexp-grep) no-place-items)) + ;; ;;; !!!!!!!!! use CL !!!!!!!!!!!!!!!!!!!!!!!!!!!! + ;; (no-title-items (set-difference no-place-items split-items + ;; :key #'howm-item-page))) + ;; (setq item-list (append place-items split-items no-title-items))) + ;; + (let* ((alist (howm-item-list-rangeset reference-item-list)) + (matcher (lambda (item) + (let* ((page (howm-item-page item)) + (place (howm-item-place item)) + (rs (cdr (assoc page alist)))) + (cond ((null rs) nil) + ((howm-rangeset-belong-p place rs) rs) + (t nil)))))) + (cond ((eq remove-match 'with-rest) + (let ((match (howm-cl-remove-if-not + (lambda (item) + (let ((rs (funcall matcher item))) + (and rs (howm-rangeset-hit! rs)))) + item-list))) + (cons match + (howm-cl-mapcan + (lambda (a) (and (not (howm-rangeset-hit-p (cdr a))) + (list (howm-make-item (car a))))) + alist)))) + (remove-match (howm-cl-remove-if matcher item-list)) + (t (howm-cl-remove-if-not matcher item-list))))) + +;;; rangeset +;;; ex. +;;; (*rangeset* (1 . 4) (5 . 6) (8 . 14)) +;;; (*rangeset*) ==> "almighty" +;;; (*rangeset-hit* (1 . 4) (5 . 6) (8 . 14)) ==> "hit" is recorded + +(defun howm-make-rangeset (&optional beg-end) + (if (null beg-end) + (cons '*rangeset* nil) + (let ((rs (howm-make-rangeset))) + (howm-rangeset-add! rs beg-end)))) + +(defun howm-rangeset-belong-p (point rs) + (or (null (cdr rs)) + (howm-cl-member-if (lambda (pair) + (and (<= (car pair) point) (<= point (cdr pair)))) + (cdr rs)))) + +(defun howm-rangeset-add! (rs beg-end) + ;; "almighty" is ignored here. sorry for confusion... + ;; c = cursor (pointing its cdr) + ;; p = pair + (let ((c rs) + (beg (car beg-end)) + (end (second beg-end))) + (while (and (cdr c) beg) + (let ((p (cadr c))) + (cond ((< end (car p)) ;; insert [beg, end] here + (rplacd c (cons (cons beg end) (cdr c))) + (setq beg nil)) + ((< (cdr p) beg) ;; skip this + (setq c (cdr c))) + (t ;; merge into [beg, end] + (setq beg (min beg (car p)) + end (max end (cdr p))) + (rplacd c (cddr c)))))) + (when beg + (rplacd c (list (cons beg end))))) + rs) + +(defvar howm-rangeset-hit-indicator '*rangeset-hit*) + +(defun howm-rangeset-hit! (rs) + (setcar rs howm-rangeset-hit-indicator)) + +(defun howm-rangeset-hit-p (rs) + (eq (car rs) howm-rangeset-hit-indicator)) + +;; check + +(let ((tests '( + (() + ()) + (((3 . 5)) + ((3 . 5))) + (((3 . 5) (0 . 1)) + ((0 . 1) (3 . 5))) + (((3 . 5) (6 . 8)) + ((3 . 5) (6 . 8))) + (((3 . 5) (1 . 4)) + ((1 . 5))) + (((3 . 5) (4 . 7)) + ((3 . 7))) + (((3 . 5) (1 . 9)) + ((1 . 9))) + (((3 . 1) (4 . 1) (5 . 9)) + ((1 . 4) (5 . 9))) + (((3 . 1) (4 . 1) (5 . 9) (2 . 6) (5 . 3)) + ((1 . 9))) + )) + ;; inhibit 'reference to free variable' warning in byte-compilation + (check nil)) + (labels ((check (ans result) + (cond ((null ans) (null result)) + ((not (equal (car ans) (car result))) nil) + (t (funcall check (cdr ans) (cdr result)))))) + (mapc (lambda (z) + (apply (lambda (prob ans) + (let* ((rs (howm-make-rangeset))) + (mapc (lambda (pair) + (let ((a (car pair)) + (b (cdr pair))) + (howm-rangeset-add! rs + (list (min a b) + (max a b))))) + prob) + (when (not (equal (cdr rs) ans)) + (error "howm-rangeset-add: %s ==> %s" prob rs)))) + z)) + tests))) + +(let ((rs '(*rangeset* (1 . 4) (5 . 6) (8 . 14)))) + (if (and (howm-rangeset-belong-p 1 rs) + (howm-rangeset-belong-p 3 rs) + (howm-rangeset-belong-p 4 rs) + (howm-rangeset-belong-p 5 rs) + (not (howm-rangeset-belong-p 0 rs)) + (not (howm-rangeset-belong-p 4.5 rs)) + (not (howm-rangeset-belong-p 7 rs)) + (not (howm-rangeset-belong-p 15 rs))) + t + (error "howm-rangeset-belong-p: wrong result"))) + +(defun howm-view-change-title (item) + (when (string-match howm-view-title-skip-regexp (howm-item-summary item)) + (let ((title-line (with-temp-buffer + (howm-page-insert (howm-item-page item)) + (howm-view-set-place (or (howm-item-place item) + (howm-view-get-place + (point-min)))) + (howm-view-get-title-line)))) + (howm-item-set-summary item title-line)))) + +(defun howm-view-get-title-line () + (while (and (looking-at howm-view-title-skip-regexp) + (= (forward-line 1) 0)) + ;; do nothine + ) + (buffer-substring-no-properties (line-beginning-position) + (line-end-position))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; search + +(defun howm-view-search (str file-list &optional + name summarizer fixed-p hilit-keywords) + "This function is not used in howm any more." + (howm-view-search-folder str (howm-make-folder:files file-list) + name summarizer fixed-p hilit-keywords)) + +(defun howm-view-search-items (str file-list &optional summarizer fixed-p) + (howm-view-search-folder-items str (howm-make-folder:files file-list) + summarizer fixed-p)) + +(defun howm-view-search-folder (&rest args) + (howm-view-search-folder-doit (apply #'howm-view-search-folder-internal + args))) + +(defun howm-view-search-folder-internal (str folder + &optional name summarizer + fixed-p hilit-keywords) + ;; clean me. str-orig can be string or list of strings. + (let* ((str-orig str) + (str-list (if (listp str-orig) str-orig (list str-orig))) + (str-principal (if (listp str-orig) (car str-orig) str-orig))) + ;; rename str + (setq str str-principal) + (setq name (or name str)) + (when howm-view-update-search-ring + (isearch-update-ring str (not fixed-p))) + (let* ((items (howm-view-search-folder-items str-orig + folder summarizer fixed-p)) + (kw (or hilit-keywords + (let ((r (if fixed-p + (regexp-opt str-list) + (mapconcat (lambda (x) (concat "\\(" x "\\)")) + str-list + "\\|")))) + `((,r . howm-view-hilit-face)))))) + (let* ((f (expand-file-name str))) + (when (file-exists-p f) + (let ((fi (howm-view-make-item f))) + (howm-view-item-set-privilege fi t) + (setq items (cons fi items))))) + (list kw name items)))) + +(defun howm-view-search-folder-doit (p) + (howm-view-summary (second p) (third p) (car p))) + +(defun howm-view-search-folder-items (str folder &optional summarizer fixed-p) + (let ((found (howm-folder-grep folder str fixed-p)) + (summarizer (or summarizer + (lambda (file place content) + (string-match "^ *\\(.*\\)" content) + (match-string-no-properties 1 content))))) + (mapc (lambda (i) + (let ((file (howm-page-name (howm-item-page i))) + (place (howm-item-place i)) + (content (howm-item-summary i))) + (howm-item-set-summary i (funcall summarizer + file place content)))) + found) + found)) + +;; sorry for confusing functions... + +(defun howm-view-search-folder-items-fi (regexp item-list &rest args) + (apply #'howm-view-search-folder-items + regexp (howm-make-folder-from-items item-list) args)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; sort + +(defun howm-view-sort () + (interactive) + (let* ((table howm-view-sort-methods) + (command (completing-read "sort by: " table nil t))) + (call-interactively (cdr (assoc command table))))) + +(defmacro howm-view-defun-sort-by (name) + "Define an interactive command howm-view-sort-by-NAME, +which simply calls howm-sort-items-by-NAME." + (let ((command (howm-get-symbol nil "howm-view-sort-by-" name)) + (internal (howm-get-symbol nil "howm-sort-items-by-" name))) + `(defun ,command (&optional reverse-p) + (interactive "P") + (howm-view-sort-doit #',internal reverse-p)))) +(howm-view-defun-sort-by "random") +(howm-view-defun-sort-by "name") +(howm-view-defun-sort-by "numerical-name") +(howm-view-defun-sort-by "date") +(howm-view-defun-sort-by "reverse-date") +(howm-view-defun-sort-by "summary") +(howm-view-defun-sort-by "reminder") +(howm-view-defun-sort-by "mtime") +(howm-view-defun-sort-by "reverse") + +(defalias 'howm-view-sort-reverse 'howm-view-sort-by-reverse) + +(defalias 'howm-view-sort-doit 'howm-view-sort/filter-doit) + +(defmacro howm-sort-items (evaluator comparer item-list + &optional reverse-p) + `(let* ((howm-view-s-i-comparer ,comparer) + (cmp (if reverse-p + (lambda (a b) (funcall howm-view-s-i-comparer b a)) + howm-view-s-i-comparer))) + (howm-sort ,evaluator cmp item-list))) + +;; ;; generate the below aliases for howm-test080714 +;; (let ((methods '("random" "name" "numerical-name" "date" "reverse-date" +;; "summary" "reminder" "mtime" "reverse"))) +;; (mapcar (lambda (m) +;; (let* ((command +;; (howm-get-symbol nil "howm-view-sort-by-" m)) +;; (internal +;; (howm-get-symbol nil "howm-sort-items-by-" m)) +;; (obsolete +;; (howm-get-symbol nil command "-internal"))) +;; `(defalias ',obsolete ',internal))) +;; methods)) + +;; for backward compatibility with howm-test080714 only +(defalias 'howm-view-sort-by-random-internal 'howm-sort-items-by-random) +(defalias 'howm-view-sort-by-name-internal 'howm-sort-items-by-name) +(defalias 'howm-view-sort-by-numerical-name-internal + 'howm-sort-items-by-numerical-name) +(defalias 'howm-view-sort-by-date-internal 'howm-sort-items-by-date) +(defalias 'howm-view-sort-by-reverse-date-internal + 'howm-sort-items-by-reverse-date) +(defalias 'howm-view-sort-by-summary-internal 'howm-sort-items-by-summary) +(defalias 'howm-view-sort-by-reminder-internal 'howm-sort-items-by-reminder) +(defalias 'howm-view-sort-by-mtime-internal 'howm-sort-items-by-mtime) +(defalias 'howm-view-sort-by-reverse-internal 'howm-sort-items-by-reverse) + +(defun howm-sort-items-by-random (item-list &optional reverse-p) + (howm-sort-items #'(lambda (dummy) (random)) #'< item-list reverse-p)) + +(defun howm-sort-items-by-name (item-list &optional reverse-p) + (howm-sort-items #'howm-view-item-basename #'string< reverse-p)) + +(defun howm-sort-items-by-numerical-name (item-list &optional reverse-p) + (howm-sort-items (lambda (i) + (let ((b (howm-view-item-basename i))) + (if (string-match "^[0-9]+$" b) + (string-to-number b) + howm-infinity))) + #'< reverse-p)) + +(defvar howm-view-sort-by-date-ignore-regexp "^[a-zA-Z]") +(defun howm-sort-items-by-date (item-list &optional reverse-p) + (let ((sorted (howm-sort-items #'howm-view-item-basename #'string< + item-list reverse-p))) + (cdr (howm-view-lift-internal #'howm-view-item-basename + sorted + howm-view-sort-by-date-ignore-regexp + t)))) + +(defun howm-sort-items-by-reverse-date (item-list &optional reverse-p) + (howm-sort-items-by-date item-list (not reverse-p))) + +(defun howm-sort-items-by-summary (item-list &optional reverse-p) + (howm-sort-items #'howm-view-item-summary #'string< + item-list reverse-p)) + +(defun howm-sort-items-by-reminder (item-list &optional reverse-p) + (let* ((howm-view-s-b-r-i-regexp (howm-reminder-regexp howm-reminder-types)) + (howm-view-s-b-r-i-max (format-time-string + howm-reminder-today-format + (encode-time 59 59 23 31 12 + howm-view-max-year))) + (evaluator (lambda (item) + (let ((s (howm-view-item-summary item))) + (if (string-match howm-view-s-b-r-i-regexp s) + (match-string-no-properties 0 s) + howm-view-s-b-r-i-max))))) + (howm-sort-items evaluator #'string< item-list reverse-p))) + +(defun howm-sort-items-by-mtime (item-list &optional reverse-p) + (howm-sort-items (lambda (item) + (howm-view-mtime (howm-view-item-filename item))) + #'howm-view-string> + item-list reverse-p)) + +(defun howm-sort-items-by-reverse (item-list &optional dummy) + (reverse item-list)) + +;;; lift (move matched items to the top) + +(defun howm-view-lift-by-name (&optional reverse-p regexp path-p) + (interactive "P") + (howm-view-lift-doit (if path-p + #'howm-view-lift-by-path-internal + #'howm-view-lift-by-name-internal) + reverse-p regexp)) + +(defun howm-view-lift-by-summary (&optional reverse-p regexp) + (interactive "P") + (howm-view-lift-doit #'howm-view-lift-by-summary-internal + reverse-p regexp)) + +(defun howm-view-lift-by-summary-substring (&optional reverse-p regexp + regexp-pos) + (interactive "P") + (howm-view-lift-doit #'howm-view-lift-by-summary-substring-internal + reverse-p regexp regexp-pos)) + +(defun howm-view-lift-doit (sorter &optional reverse-p regexp + regexp-pos) + (let* ((howm-view-s-b-m-d-regexp (or regexp + (read-from-minibuffer "Regexp: "))) + (howm-view-s-b-m-d-regexp-pos regexp-pos) + (howm-view-s-b-m-d-sorter sorter) + (howm-view-s-b-m-d-matched nil)) + (howm-view-sort-doit (lambda (item-list rvs-p) + (let ((p (apply howm-view-s-b-m-d-sorter + item-list + howm-view-s-b-m-d-regexp + rvs-p + howm-view-s-b-m-d-regexp-pos))) + (setq howm-view-s-b-m-d-matched (car p)) + (cdr p))) + reverse-p) + howm-view-s-b-m-d-matched)) + +(defun howm-view-lift-internal (picker item-list regexp + &optional reverse-p regexp-pos) + "Sort items and return (matched . sorted-list). +matched can be nil, single, or multi." + (let* ((howm-view-l-i-matched nil) + (evaluator (lambda (item) + (let ((str (funcall picker item))) + (if (string-match regexp str) + (progn + (setq howm-view-l-i-matched + (if howm-view-l-i-matched 'multi 'single)) + (if regexp-pos + (match-string-no-properties regexp-pos str) + 1)) + 0)))) + (comparer (if regexp-pos + (lambda (x y) + (cond ((eq x 0) nil) + ((eq y 0) t) + (t (string< x y)))) + #'>))) + (let ((sorted-list (howm-sort-items evaluator comparer item-list + reverse-p))) + (cons howm-view-l-i-matched sorted-list)))) + +(defun howm-view-lift-by-name-internal (item-list regexp &optional reverse-p) + (howm-view-lift-internal #'howm-view-item-basename + item-list regexp reverse-p)) + +(defun howm-view-lift-by-path-internal (item-list regexp &optional reverse-p) + (howm-view-lift-internal #'howm-item-name item-list regexp reverse-p)) + +(defun howm-view-lift-by-summary-internal (item-list regexp &optional reverse-p) + (howm-view-lift-internal #'howm-view-item-summary item-list regexp reverse-p)) + +(defun howm-view-lift-by-summary-substring-internal (item-list regexp + &optional + reverse-p + regexp-pos) + (howm-view-lift-internal #'howm-view-item-summary item-list regexp reverse-p + (or regexp-pos 0))) + +;; backward compatibility +(defalias 'howm-view-sort-by-name-match 'howm-view-lift-by-name) +(defalias 'howm-view-sort-by-summary-match 'howm-view-lift-by-summary) +(defalias 'howm-view-sort-by-summary-match-string + 'howm-view-lift-by-summary-substring) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Dired-X + +(defvar howm-view-dired-buffer-name "*howm-dired*") +(howm-defvar-risky howm-view-dired-ls-command "ls") +(howm-defvar-risky howm-view-dired-ls-options '("-l")) + +(defun dired-virtual (dir) + (howm-inhibit-warning-in-compilation)) + +(defun howm-view-dired () + (interactive) + (require (if (howm-xemacsp) 'dired-vir 'dired-x)) + (when (not (member major-mode + '(howm-view-summary-mode howm-view-contents-mode))) + (error "Invalid mode for this command.")) +;; ;; bug in emacs-21.3.50? +;; (when (not (fboundp 'dired-insert-headerline)) +;; (defun dired-insert-headerline (dir);; also used by dired-insert-subdir +;; ;; Insert DIR's headerline with no trailing slash, exactly like ls +;; ;; would, and put cursor where dired-build-subdir-alist puts subdir +;; ;; boundaries. +;; (save-excursion (insert " " (directory-file-name dir) ":\n")))) + (let* ((i2f (lambda (item) + (file-relative-name (howm-view-item-filename item)))) + (current-file (funcall i2f (riffle-summary-current-item))) + (files (howm-cl-remove-duplicates* (mapcar i2f (howm-view-item-list)) + :test #'equal)) +;; (pos (howm-cl-position f files :test #'string=)) + (args (append howm-view-dired-ls-options files)) + (a `((howm-view-summary-mode . ,howm-view-summary-persistent) + (howm-view-contents-mode . ,howm-view-contents-persistent))) + (p (howm-view-persistent-p (cdr (assoc major-mode a))))) + (if p + (howm-view-restore-window-configuration) + (howm-view-kill-buffer)) + (switch-to-buffer (get-buffer-create howm-view-dired-buffer-name)) + (setq buffer-read-only nil) + (erase-buffer) + (howm-call-process-here howm-view-dired-ls-command args) + (set-buffer-modified-p nil) + (dired-virtual default-directory) + (howm-view-dired-goto current-file))) + +(defun howm-view-dired-goto (rname) +"In dired buffer, search file name RNAME and move cursor to corresponding line. +RNAME must be relative name." + (goto-char (point-min)) + ;; Raw call of `dired-get-filename' and `dired-next-line' causes + ;; warnings in compilation. + (while (let ((c (howm-funcall-if-defined (dired-get-filename 'no-dir t)))) + (not (and c (equal (file-relative-name c) rname)))) + (howm-funcall-if-defined (dired-next-line 1)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; shell + +(howm-defvar-risky howm-view-summary-shell-hist '("ls -l FILE" "FILE")) +(howm-defvar-risky howm-view-summary-shell-last-file "FILE") +(defun howm-view-summary-shell-command () + (interactive) + (when (not (member major-mode + '(howm-view-summary-mode))) + (error "Invalid mode for this command.")) + (let* ((n (howm-view-line-number)) + (item (nth (1- n) (howm-view-item-list))) + (file (howm-page-abbreviate-name (howm-view-item-filename item))) + (last-reg (regexp-quote howm-view-summary-shell-last-file))) + (setq howm-view-summary-shell-hist + (mapcar (lambda (h) + (replace-regexp-in-string last-reg file h t)) + howm-view-summary-shell-hist)) + (setq howm-view-summary-shell-last-file file) + (let* ((default (car howm-view-summary-shell-hist)) + (c (read-string "command: " + (cons default 0) + '(howm-view-summary-shell-hist . 1)))) + (shell-command c)) + (let ((item-list (howm-cl-remove-if (lambda (item) + (not (file-exists-p + (howm-view-item-filename item)))) + (howm-view-item-list)))) + (setq *riffle-summary-check* nil) ;; dirty + (howm-view-summary (howm-view-name) item-list) + (howm-goto-line n) + (save-selected-window + (let ((b (get-buffer "*Shell Command Output*"))) + (cond ((not (howm-buffer-empty-p b)) + (switch-to-buffer-other-window b)) + ((eq item (riffle-summary-current-item)) + nil) + (t (progn + (setq *riffle-summary-check* t) ;; dirty + (howm-view-summary-check t)))))) + ))) + +;;; howm-view.el ends here diff --git a/site-lisp/howm/howm.el b/site-lisp/howm/howm.el new file mode 100644 index 0000000..b07052e --- /dev/null +++ b/site-lisp/howm/howm.el @@ -0,0 +1,84 @@ +;;; howm.el --- Wiki-like note-taking tool +;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: howm.el,v 1.22 2011-12-31 15:07:29 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;-------------------------------------------------------------------- + +;;; DESCRIPTION: +;;; +;;; See README. +;;; HOWM is acronym of "Hitori Otegaru Wiki Modoki". + +;; Files [0]-[3] have only hierarchical dependencies, +;; whereas files in [5] have circular dependencies. +;; Each file in [5] provides itself first, +;; and then requires [4] (this file). + +;;; [0] official + +(require 'easy-mmode) +(require 'font-lock) + +;;; [1] cl + +(require 'howm-cl) + +;;; [2] my tools + +;; This doesn't work in byte-compilation. I don't understand it. Sigh... +;; (mapcar #'require howm-required-features) + +(require 'cheat-font-lock) +(require 'illusion) +(require 'gfunc) +(require 'riffle) +(require 'action-lock) +(require 'honest-report) + +;;; [3] howm basic libraries + +(require 'howm-version) +(require 'howm-vars) +(require 'howm-common) + +;;; [4] howm main (this file) + +(provide 'howm) + +;;; [5] howm modules + +(require 'howm-backend) +(require 'howm-view) +(require 'howm-mode) +(require 'howm-misc) +(require 'howm-date) +(require 'howm-reminder) +(require 'howm-menu) + +;;; for howmz.el [2006-02-02] +;;; http://noir.s7.xrea.com/archives/000136.html +;;; http://noir.s7.xrea.com/pub/zaurus/howmz.el + +(howm-require-lang 'en) +(howm-require-lang 'ja) + +;;; security fix [2006-12-16] +(mapc (lambda (symbol) (put symbol 'risky-local-variable t)) + (howm-symbols)) + +;;; howm.el ends here diff --git a/site-lisp/howm/illusion.el b/site-lisp/howm/illusion.el new file mode 100644 index 0000000..cd767ef --- /dev/null +++ b/site-lisp/howm/illusion.el @@ -0,0 +1,133 @@ +;;; illusion.el --- load, edit, and submit something which is not pure file +;;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: illusion.el,v 1.14 2011-12-31 15:07:29 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;;-------------------------------------------------------------------- + +;;; Commentary: + +;; Not yet. See the example 'yalot13' at the bottom of this file. + +;;; Code: + +(require 'easy-mmode) + +(defvar illusion-lighter " _i_") +(defvar illusion-submit-key "\C-c\C-c") + +(defvar illusion-submit-func + (lambda () + (error "Submission function is not defined.")) + "Value of this variable is called when `illusion-submit' is executed. +It must return non-nil value for successful case.") +(make-variable-buffer-local 'illusion-submit-func) +(put 'illusion-submit-func 'risky-local-variable t) + +(defun illusion-submit () + (interactive) + (funcall illusion-submit-func) + (set-buffer-modified-p nil)) + +(defun illusion-generate (name loader submitter) + (switch-to-buffer (generate-new-buffer name)) + (text-mode) + (illusion-mode 1) + (setq illusion-submit-func submitter) + (funcall loader) + (goto-char (point-min)) + (set-buffer-modified-p nil)) + +(easy-mmode-define-minor-mode illusion-mode + "With no argument, this command toggles the mode. +Non-null prefix argument turns on the mode. +Null prefix argument turns off the mode. + +When the mode is enabled, \\[illusion-submit] submits the content +with a manner which is suitable to current buffer. + +key binding +--- ------- +\\[illusion-submit] Submit changes +" + nil ;; default = off + illusion-lighter ;; mode-line + `( + (,illusion-submit-key . illusion-submit) + ) +) + +;; emacs20's easy-mmode-define-minor-mode can't have body. sigh... +(add-hook 'illusion-mode-on-hook + (lambda () (use-local-map illusion-mode-map))) + +;;; Example + +;; M-x yarot13-find-file to open rot13ed file. +;; Edit it, and C-c C-c to save it. + +;; (personal note) ruby -pe '$_.tr! "a-zA-Z", "n-za-mN-ZA-M"' + +(defun yarot13-find-file (file) + (interactive "Frot13 file: ") + (illusion-generate (concat "rot13:" (file-name-nondirectory file)) + `(lambda () (yarot13-insert-file-contents ,file)) + `(lambda () (yarot13-save-buffer-to ,file)))) + +(defun yarot13-insert-file-contents (file) + (if (file-exists-p file) + (let ((s (with-temp-buffer + (howm-insert-file-contents file) + (yarot13-rotate-buffer) + (buffer-string)))) + (insert s)) + (message "(New file)"))) + +(defun yarot13-save-buffer-to (file) + (let ((s (buffer-string))) + (with-temp-buffer + (insert s) + (yarot13-rotate-buffer) + (set-visited-file-name file) + (basic-save-buffer)))) + +(defun yarot13-rotate-buffer () + (save-excursion + (goto-char (point-min)) + (while (not (eobp)) + (let ((c (char-after))) + (setq c (yarot13-rotate-char c ?a ?z)) + (setq c (yarot13-rotate-char c ?A ?Z)) + (delete-char 1) + (insert-char c 1))))) + +(defun yarot13-rotate-string (str) + (with-temp-buffer + (insert str) + (yarot13-rotate-buffer) + (buffer-string))) + +(defun yarot13-rotate-char (x beg end) + (let ((d (- x beg)) + (w (+ 1 (- end beg)))) + (if (and (<= beg x) (<= x end)) + (+ beg (mod (+ d (/ w 2)) w)) + x))) + +(provide 'illusion) + +;;; illusion.el ends here diff --git a/site-lisp/howm/install-sh b/site-lisp/howm/install-sh new file mode 100755 index 0000000..4fbbae7 --- /dev/null +++ b/site-lisp/howm/install-sh @@ -0,0 +1,507 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-10-14.15 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +posix_glob= +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chmodcmd=$chmodprog +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + shift + shift + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac +done + +if test $# -ne 0 && test -z "$dir_arg$dstarg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix=/ ;; + -*) prefix=./ ;; + *) prefix= ;; + esac + + case $posix_glob in + '') + if (set -f) 2>/dev/null; then + posix_glob=true + else + posix_glob=false + fi ;; + esac + + oIFS=$IFS + IFS=/ + $posix_glob && set -f + set fnord $dstdir + shift + $posix_glob && set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dst"; then + $doit $rmcmd -f "$dst" 2>/dev/null \ + || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ + && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ + || { + echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + } || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/site-lisp/howm/ja/0000-00-00-000000.txt b/site-lisp/howm/ja/0000-00-00-000000.txt new file mode 100644 index 0000000..79fa0d5 --- /dev/null +++ b/site-lisp/howm/ja/0000-00-00-000000.txt @@ -0,0 +1,157 @@ += <<< %menu% + %"e"[速記] %"c"[新規] %"D"[複製] 検索(%"s"[固定] %"g"[正規] %"m"[roma] %"o"[バ内]) %":"[昨日] %"."[今日] + %"a"[一覧] %"l"[最近] %"A"[前後] %"h"[履歴] %"y"[予定] %"t"[Todo] %"b"[全バ] %"x"[mark] %"w"[酔歩] [設定] + %"K"[題↑] [名↑] %"d"[日↓] %"T"[時↓] %"i"[鍵↓] %"r"[更新] %"R"[menu 更新] [menu 編集] [全消] +------------------------------------- +[予定・Todo] … 予定@, 〆切! を %sdays 日先まで表示. +〆切!, todo+, 覚書-, 保留~ を上位 %tnum 個まで表示. +%reminder +------------------------------------- +最近のメモ +%recent +------------------------------------- +ランダムセレクト (不要なら[menu 編集]で該当箇所を削除してください) +%random +------------------------------------- + +予定・todo の書式 (実際は半角で) +[2002-10-21]@1 予定 (予定表に表示。もし@3なら3日間の予定、つまり23日までの意味) +[2002-10-21]+7 todo 指定日になってから7日間かけて徐々に浮かび続ける +[2002-10-21]!7 〆切 指定日の7日前から徐々に浮かび、指定日以降浮きっぱなし +[2002-10-21]−1 覚書 指定日に浮かび上がり、以降1日かけて単位量だけ徐々に沈む +[2002-10-21]〜30 保留 指定日に浮かび上がり、以降30日周期で浮き沈みをくりかえす +[2002-10-21]. 済み 常に底 +(記号の後の数字はデフォルト値) + +覚え方 +・予定はその日に結び付けられてるから@(at) +・覚書は沈んでいくから- +・todoは浮かび上がってくるから+ +・〆切はその日に注意しなければならないから! +・保留は波打つから~ +・済みは終わりだから. + +------------------------------------- + +[○○]は何? >>> %ボタンの説明% +このメニュー自体を編集できます >>> %メニューの編集について% +メモが増えてきたら… >>> %高速化について% + + += <<< %ボタンの説明% + +◆ 作成 + +[新規] → 新規メモ作成 (現リージョンがタイトル) +[複製] → 現メモを複製 (住所録テンプレートなどの用途を想定) + +◆ 一覧 + +[一覧] → 全メモの一覧 +[最近] → 最近のメモの連結表示 +[前後] → 前後のメモ (見てたメモを中心に全メモの日付順一覧) +* 対象ファイルを(編集モードで)開いた状態からメニューを呼ぶこと +[履歴] → 検索履歴 +[予定] → 予定表 +[todo] → todo 一覧 + +◆ 検索 + +[正規] → 正規表現の検索 +* 基本的には大文字小文字の区別なし + * 「Wiki」のように明示的に大文字を指定したときは区別 +[固定] → キーワードを補完入力して固定文字列の検索 +[roma] → ローマ字検索 (migemo) +[今日] → 今日のメモ +[昨日] → 昨日のメモ + +◆ 編集: 対象ファイルを(編集モードで)開いた状態からメニューを呼ぶこと + +[更新] → 下線を引きなおす +[鍵↓] → キーワードを補完入力して貼りつけ +* Tips: M-v で候補一覧に移って migemo 検索すると楽 + +[日↓] → 今日の日付 [yyyy-mm-dd] を貼りつけ +[時↓] → 今日の日時 [yyyy-mm-dd HH:MM] を貼りつけ +[題↑] → 現メモのタイトルを kill ring へ (C-y で貼りつけ) +* タイトルがみつからなかったときはファイル名 +[名↑] → ファイル名を kill ring へ + +◆ 特別 + +[menu 更新] → メニューの予定表などを更新 +[menu 編集] → メニューを編集 +[全消] → howm-mode なバッファをすべて消す (未保存は除く) +[酔歩] → ランダムにリンクをたどって自動閲覧. C-g で停止. + += <<< %高速化について% + +メモが増えて検索が遅くなってきたら, 高速化のためのオプション設定を +検討してください. + +最も効果が大きいのは, 検索に grep コマンドを使うことです. +Unix 系の標準的な環境なら, たいてい問題なく使えるでしょう. +それ以外の環境では, 何らかの準備が必要になるかもしれません. + +各環境で具体的にどうすればよいかは…情報をお待ちしています. +・http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?Windows +・http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?LinuxZaurus + +grep の使用を設定するには, + M-x customize-variable howm-view-use-grep +と入力するか, 初期化ファイル(.emacs 等)に直接 + (setq howm-view-use-grep t) +と書くか, あるいは今この画面で「%"!」を押してください." %| %eval%(customize-variable 'howm-view-use-grep) %| + +その他のオプションについては, +[設定] から「Howm Efficiency」の項目を参照ください. + + += <<< %メニューの編集について% +[menu 編集] でこのメニューを編集 +[menu 更新] でこのメニューを更新 +-------------------------------------------------------- + +メニューの書き方 +([menu 編集] 上でリターンを叩き, 元ファイルを読んでください) + +◆ 基本 +見ればわかるでしょうが, +・[○○] と書いた所がボタン +・%reminder と(半角で)書いた所が予定表と todo list +・%recent と(半角で)書いた所が, 最近のメモ一覧 +・%random と(半角で)書いた所が, ランダムなメモ一覧 +になります. +どこに書いても機能しますから, 並べかえるなりなんなり, お好きにどうぞ. +よく使うファイルや goto link も書いておけば便利かも. +(例) file:///etc/services >>> wiki + +◆ ショートカット +%"hoge"[一覧] +↑こう書いておくと, 「hoge[一覧]」と表示され, キー h で一覧を起動 +(正確には, (1) 閉じ「"」へ移動 (2) 次の下線まで進む (3) action-lock 発動) +%"fuga%" ← こんなふうに最後に % をつけると, キー f でそこにカーソル移動 + +◆ lisper 向け + +・表示 +%here%howm-congrats-count ← 変数 howm-congrats-count の値を埋め込み +%here%(howm-menu-search "検索") +↑(…) の結果(「検索」の検索結果)を埋め込み +※ ただし, 使う関数は登録が必要 (おっかないから) +(setq howm-menu-allow (append '(foo bar) howm-menu-allow)) ;; foo と bar を許可 + +・動作 +S 式を eval: %eval%(message (buffer-name)) +関数を call-interactively: %call%find-file +※ いずれも, メニューを呼ぶ前のバッファで評価されます + +◆ 不可視 +「%|」と(半角で)書くと, 可視・不可視をトグル. +こんなふうに → 見える%|見えない%|可視%|不可視…行末まで +(行末が不可視だと, 改行も消えます) + +◆ 複数メニュー +「%○○%」へのリンクは, 「<<< %○○%」をメニューモードで開きます: >>> %menu% +新規メニューを追加したいときは [[%menu%]] の方が便利でしょう (自動生成するので) +指定ファイルをメニューモードで開く: %eval%(howm-menu-open "00000000-000000.txt") diff --git a/site-lisp/howm/ja/ChangeLog b/site-lisp/howm/ja/ChangeLog new file mode 100644 index 0000000..e8b616f --- /dev/null +++ b/site-lisp/howm/ja/ChangeLog @@ -0,0 +1,26 @@ +2011-01-01 HIRAOKA Kazuyuki + + * 0000-00-00-000000.txt: support new commands. + +2010-12-31 HIRAOKA Kazuyuki + + * 0000-00-00-000000.txt: use %reminder instead of %schedule and %todo. + +2005-12-09 HIRAOKA Kazuyuki + + * Makefile.am (EXTRA_DIST): no need to install 0000-00-00-000000.howm. + +2005-11-19 HIRAOKA Kazuyuki + + * 0000-00-00-000000.howm: add "about acceleration". + thx > window16 san + http://d.hatena.ne.jp/window16/20051118 + +2005-05-11 HIRAOKA Kazuyuki + + * 0000-00-00-000000.howm: added [Preference], %recent, %random + +2005-05-06 HIRAOKA Kazuyuki + + * 0000-00-00-000000.howm: bind R = [Update Menu] + thx > http://pc8.2ch.net/test/read.cgi/unix/1077881095/672-673n diff --git a/site-lisp/howm/ja/Makefile.am b/site-lisp/howm/ja/Makefile.am new file mode 100644 index 0000000..c37714d --- /dev/null +++ b/site-lisp/howm/ja/Makefile.am @@ -0,0 +1,6 @@ +EXTRA_DIST = 0000-00-00-000000.txt + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status diff --git a/site-lisp/howm/ja/Makefile.in b/site-lisp/howm/ja/Makefile.in new file mode 100644 index 0000000..49a36d6 --- /dev/null +++ b/site-lisp/howm/ja/Makefile.in @@ -0,0 +1,315 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ja +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CVS = @CVS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EMACS = @EMACS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +howmdir = @howmdir@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +lispdir = @lispdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +packagedir = @packagedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = 0000-00-00-000000.txt +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ja/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ja/Makefile +.PRECIOUS: Makefile + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/site-lisp/howm/missing b/site-lisp/howm/missing new file mode 100755 index 0000000..1c8ff70 --- /dev/null +++ b/site-lisp/howm/missing @@ -0,0 +1,367 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2006-05-10.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case $1 in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $1 in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/site-lisp/howm/mkinstalldirs b/site-lisp/howm/mkinstalldirs new file mode 100755 index 0000000..ef7e16f --- /dev/null +++ b/site-lisp/howm/mkinstalldirs @@ -0,0 +1,161 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy + +scriptversion=2006-05-11.19 + +# Original author: Noah Friedman +# Created: 1993-05-16 +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' +IFS=" "" $nl" +errstatus=0 +dirmode= + +usage="\ +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to ." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" + exit $? + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --version) + echo "$0 $scriptversion" + exit $? + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and +# mkdir -p a/c at the same time, both will detect that a is missing, +# one will create a, then the other will try to create a and die with +# a "File exists" error. This is a problem when calling mkinstalldirs +# from a parallel make. We use --version in the probe to restrict +# ourselves to GNU mkdir, which is thread-safe. +case $dirmode in + '') + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + test -d ./-p && rmdir ./-p + test -d ./--version && rmdir ./--version + fi + ;; + *) + if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && + test ! -d ./--version; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./--version "./$dirmode"; + do + test -d $d && rmdir $d + done + fi + ;; +esac + +for file +do + case $file in + /*) pathcomp=/ ;; + *) pathcomp= ;; + esac + oIFS=$IFS + IFS=/ + set fnord $file + shift + IFS=$oIFS + + for d + do + test "x$d" = x && continue + + pathcomp=$pathcomp$d + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr= + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp=$pathcomp/ + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/site-lisp/howm/riffle.el b/site-lisp/howm/riffle.el new file mode 100644 index 0000000..356351e --- /dev/null +++ b/site-lisp/howm/riffle.el @@ -0,0 +1,634 @@ +;;; riffle.el --- template of list browser with immediate preview +;;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +;;; HIRAOKA Kazuyuki +;;; $Id: riffle.el,v 1.42 2012-12-29 08:57:18 hira Exp $ +;;; +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 1, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; The GNU General Public License is available by anonymouse ftp from +;;; prep.ai.mit.edu in pub/gnu/COPYING. Alternately, you can write to +;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +;;; USA. +;;-------------------------------------------------------------------- + +;;; Commentary: + +;; Not yet. See sample at the bottom of this file. + +;;; Code: + +(require 'howm-cl) +(require 'gfunc) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; customize + +;; These howm-view-xxx will be renamed to riffle-xxx in future. + +(defcustom howm-view-summary-window-size nil + "Size of summary window, or nil for half size." + :type '(radio (const :tag "Half" nil) + integer) + :group 'howm-list-bufwin) +(defcustom howm-view-split-horizontally nil + "If non-nil, split window horizontally to show summary and contents." + :type 'boolean + :group 'howm-list-bufwin) +(defcustom howm-view-keep-one-window nil + "If nil, split windows automatically for summary and contents +even if you delete other windows explicitly." + :type 'boolean + :group 'howm-list-bufwin) +(defcustom howm-view-pop-up-windows t + "If non-nil, override `pop-up-windows'." + :type 'boolean + :group 'howm-list-bufwin) + +;; clean me: This value is copied to howm-view-open-recenter. +(defvar howm-view-search-recenter 5) + +;; experimental [2008-05-23] +(defvar riffle-keep-window nil) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; internal variables and accessors + +(defvar *riffle-summary-check* t) + +(defvar riffle-name nil) +(defvar riffle-item-list nil) +(defvar riffle-type nil) +(defvar riffle-summary-last-line nil) +(defvar riffle-contents-end nil) +(make-variable-buffer-local 'riffle-name) +(make-variable-buffer-local 'riffle-item-list) +(make-variable-buffer-local 'riffle-type) +; update contents when changed +(make-variable-buffer-local 'riffle-summary-last-line) +; end points of items +(make-variable-buffer-local 'riffle-contents-end) + +(defun riffle-name () riffle-name) +(defun riffle-item-list () riffle-item-list) +(defun riffle-set-item-list (item-list) (setq riffle-item-list item-list)) + +;; clean me +(defun riffle-p () riffle-type) +(defun riffle-contents-first-time-p () (null riffle-contents-end)) + +(defvar *riffle-preview-p* nil) +(defun riffle-preview-p () *riffle-preview-p*) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; macro + +;; In xemacs, define-derived-mode makes the mode call +;; derived-mode-merge-syntax-tables, which takes long time. +;; To avoid it, we need ":syntax-table nil". Sigh... + +(defmacro riffle-define-derived-mode (child parent name + &optional docstring + &rest body) + (declare (indent 3)) + `(define-derived-mode ,child ,parent ,name + ,docstring + :syntax-table nil + :abbrev-table nil + ,@body)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; generic function + +(defun riffle-type (&rest r) + riffle-type) +(defvar riffle-dispatchers (list #'riffle-type)) +(put 'riffle-dispatchers 'risky-local-variable t) + +(gfunc-with riffle-dispatchers + (gfunc-def riffle-home (item)) + (gfunc-def riffle-summary-item (item)) + (gfunc-def riffle-contents-item (item)) + (gfunc-def riffle-summary-set-mode ()) + (gfunc-def riffle-contents-set-mode ()) + (gfunc-def riffle-summary-name-format ()) + (gfunc-def riffle-contents-name-format ()) + (gfunc-def riffle-post-update (item))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; common + +(defcustom riffle-mode-hook nil + "Hook run at the end of function `riffle-mode'" + :type 'hook + :group 'howm-hook) + +(defvar riffle-mode-map nil) +(put 'riffle-mode-map 'risky-local-variable t) +(defvar riffle-mode-syntax-table (make-syntax-table)) +(defvar riffle-mode-abbrev-table nil) + +(defun riffle-mode () + "not yet" + (setq major-mode 'riffle-mode + mode-name "Riffle") + (use-local-map riffle-mode-map) + (set-syntax-table riffle-mode-syntax-table) + (define-abbrev-table 'riffle-mode-abbrev-table nil) + (run-hooks 'riffle-mode-hook)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; summary + +(defun riffle-summary (&optional name item-list type background) + "Create summary buffer for NAME, ITEM-LIST, and TYPE. +When NAME is nil, default values for them are selected. +Created buffer is shown immediately as far as BACKGROUND is nil. +This function returns effective value of ITEM-LIST." + (when (null name) + (setq name (riffle-name) + item-list (riffle-item-list) + type riffle-type)) + (if (null item-list) + nil + (let ((d default-directory)) + (riffle-setup-buffer #'riffle-summary-name-format name item-list type) + (setq default-directory d) + (when (not background) + (riffle-summary-subr name item-list)) + item-list))) + +(defun riffle-summary-subr (name item-list) + (riffle-summary-set-mode) + (riffle-summary-show item-list) + (unless riffle-keep-window + (riffle-summary-check t))) + +(defun riffle-summary-show (item-list) + (buffer-disable-undo) + (setq buffer-read-only nil) + (erase-buffer) + (mapc 'riffle-summary-show-item item-list) + (set-buffer-modified-p nil) + (setq buffer-read-only t + truncate-lines t) + (goto-char (point-min)) + (setq riffle-summary-last-line -777)) + +(defun riffle-summary-show-item (item) + (insert (riffle-summary-item item) "\n")) + +(riffle-define-derived-mode riffle-summary-mode riffle-mode "RiffleS" + "not yet" + ;; make-local-hook is obsolete for emacs >= 21.1. + (howm-funcall-if-defined (make-local-hook 'post-command-hook)) + (add-hook 'post-command-hook 'riffle-post-command t t) + ) + +(defun riffle-post-command () + (unless riffle-keep-window + (if *riffle-summary-check* + (riffle-summary-check) + (setq *riffle-summary-check* t)))) + +(defun riffle-summary-current-item () + (let ((n (riffle-line-number))) + (nth (1- n) (riffle-item-list)))) + +(defun riffle-summary-check (&optional force) + (let ((keep-one howm-view-keep-one-window)) + (when force + (riffle-refresh-window-configuration) + (setq keep-one nil)) + (let ((n (riffle-line-number)) + (howm-view-keep-one-window keep-one)) + (when (or (not (= n riffle-summary-last-line)) + force) + (setq riffle-summary-last-line n) + (let ((item (riffle-summary-current-item))) + (when (and item *riffle-summary-check*) + (riffle-summary-update item force))))))) + +(defun riffle-summary-update (item &optional new) + (unless (and howm-view-keep-one-window (one-window-p)) + (riffle-summary-update-subr item new))) +(defun riffle-summary-update-subr (item &optional new) + (let* ((*riffle-preview-p* t) ;; dirty + (vbuf (riffle-contents-buffer new)) + (cwin (selected-window)) + (pop-up-windows (or pop-up-windows howm-view-pop-up-windows)) +;; (section (riffle-controller 'section item)) + (name (riffle-name)) + (type riffle-type)) ;; be careful to buffer local var. + (riffle-pop-to-buffer vbuf howm-view-summary-window-size) + (riffle-contents name (list item) type default-directory) + (goto-char (point-min)) + (let ((home (riffle-home item))) +;; (let ((home (howm-view-item-home item))) + (when (numberp home) + (goto-char home) + (recenter howm-view-search-recenter)) + (select-window cwin) + (riffle-post-update item)))) +;; (message "View: %s" section) + +(defun riffle-pop-window () + (interactive) + (let ((r (one-window-p))) + (when r + (riffle-summary-check t)) + r)) + +(defun riffle-pop-or-scroll-other-window () + (interactive) + (or (riffle-pop-window) + (scroll-other-window))) + +(defun riffle-toggle-window () + (interactive) + (or (riffle-pop-window) + (delete-other-windows))) + +(defun riffle-summary-to-contents () + (interactive) + (let ((b (current-buffer))) + (unless riffle-keep-window + (delete-other-windows) + (set-buffer b)) + (let ((n (riffle-line-number))) + (riffle-contents (riffle-name) (riffle-item-list) riffle-type + default-directory) + (goto-char (riffle-contents-beginning (1- n)))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; contents + +;; (defvar riffle-contents-mode-variant nil) + +(defun riffle-contents (name item-list type default-dir) + (if (null item-list) + (message "Empty.") + (progn + (riffle-setup-buffer #'riffle-contents-name-format name item-list type) + (setq default-directory default-dir) + (when (riffle-contents-first-time-p) + (riffle-contents-set-mode)) +;; (let ((cm (riffle-controller 'contents-mode))) +;; (when (not (eq major-mode cm)) +;; (funcall cm))) + (riffle-contents-show item-list)))) + +(riffle-define-derived-mode riffle-contents-mode riffle-mode "RiffleC" + "not yet" + ) + +(defun riffle-contents-show (item-list) + (buffer-disable-undo) + (setq buffer-read-only nil) + (erase-buffer) + (setq riffle-contents-end + (mapcar (lambda (item) (riffle-contents-show-item item)) + item-list)) + (set-buffer-modified-p nil) + (setq buffer-read-only t) + (goto-char (point-min)) + ) + +(defun riffle-contents-show-item (item) + (insert (riffle-contents-item item)) + (point)) + +(defun riffle-contents-item-number (position) + (let ((rest riffle-contents-end) + (n 0)) + (while (and rest (<= (car rest) position)) + (setq rest (cdr rest) + n (+ n 1))) + (min n (1- (length riffle-contents-end))))) ;; for the last line + +(defun riffle-contents-current-item () + (nth (riffle-contents-item-number (point)) (riffle-item-list))) + +(defun riffle-contents-beginning (n) + (nth n (cons 1 riffle-contents-end))) + +(defun riffle-contents-to-summary () + (interactive) + (let ((n (riffle-contents-item-number (point)))) + (riffle-summary (riffle-name) (riffle-item-list) riffle-type) +; (howm-view-summary (riffle-name) (riffle-item-list)) + (howm-goto-line (1+ n)))) ;; top = 1 for goto-line + +(defun riffle-contents-goto-next-item (&optional n) + (interactive "p") + (let* ((c (point)) + ;; remember that riffle-contents-end has duplicats + (stops (howm-cl-remove-duplicates + (sort `(1 ,c ,@(copy-sequence riffle-contents-end)) + #'<))) + (pos (howm-cl-position c stops)) + (new (+ pos n))) + (cond ((< new 0) + (goto-char (point-min)) + (error "Beginning of buffer")) + ((>= new (length stops)) + (goto-char (point-max)) + (error "End of buffer")) + (t + (goto-char (nth new stops)))))) + +(defun riffle-contents-goto-previous-item (&optional n) + (interactive "p") + (riffle-contents-goto-next-item (- n))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; misc. + +(defun riffle-summary-buffer (&optional new) + (riffle-get-buffer (riffle-summary-name-format) nil new)) +(defun riffle-contents-buffer (&optional new) + (riffle-get-buffer (riffle-contents-name-format) nil new)) +;; (defun riffle-contents-buffer (&optional new) +;; (riffle-get-buffer howm-view-contents-name nil new)) +;; (defun riffle-summary-buffer (&optional new) +;; (riffle-get-buffer howm-view-summary-name nil new)) +(defun riffle-get-buffer (name-format &optional name new) + (let* ((bufname (format name-format (or name (riffle-name)))) + (buf (get-buffer bufname))) + (when (and new buf) + (kill-buffer buf)) + (get-buffer-create bufname))) + +(defun riffle-kill-buffer () + (interactive) + (when (riffle-p) + (let* ((s (riffle-summary-buffer)) + (c (riffle-contents-buffer)) + (sw (get-buffer-window s))) + (when sw + (select-window sw)) + (kill-buffer s) + (kill-buffer c) + (riffle-restore-window-configuration)))) + +(defun riffle-setup-buffer (name-format-func name item-list type) + (let ((name-format (let ((riffle-type type)) + (funcall name-format-func)))) + (switch-to-buffer (riffle-get-buffer name-format name)) + (setq riffle-type type) + (setq riffle-name name + riffle-item-list item-list))) + +(defun riffle-line-number (&optional pos) + (save-excursion + (save-restriction + (widen) + (when pos + (goto-char pos)) + (let ((raw (count-lines (point-min) (point)))) + (if (bolp) + (+ raw 1) + raw))))) + +(defun riffle-persistent-p (z) + "Return whether the buffer should be persistent or not. +Note that the value of Z is funcall-ed if it is a function; +consider to set `risky-local-variable' property. +(cf) +snap://Info-mode/elisp#File Local Variables +snap://Info-mode/emacs#File Variables +" + (riffle-get-value z)) + +(defun riffle-get-value (z) + (if (functionp z) + (funcall z) + z)) + +(defun riffle-restore-window-configuration () + (riffle-refresh-window-configuration)) + +(defun riffle-refresh-window-configuration () +;; (message "%s -- %s" (buffer-name) (if (riffle-p) t nil)) ;; debug + (if (riffle-p) + (riffle-setup-window-configuration) + (unless riffle-keep-window + (delete-other-windows)))) + +(defvar riffle-window-initializer 'delete-other-windows) +;; (setq riffle-window-initializer '(lambda () (pop-to-buffer nil))) +(put 'riffle-window-initializer 'risky-local-variable t) +(defun riffle-setup-window-configuration () + (let ((orig (current-buffer)) + (s (riffle-summary-buffer)) + (c (riffle-contents-buffer))) + (when (functionp riffle-window-initializer) + (funcall riffle-window-initializer)) + (switch-to-buffer c) + (riffle-pop-to-buffer c howm-view-summary-window-size) + (switch-to-buffer s) + (select-window (get-buffer-window orig)))) + +(defun riffle-scroll-up (count) + (interactive "p") + (scroll-up count)) +(defun riffle-scroll-down (count) + (interactive "p") + (scroll-down count)) +(defun riffle-scroll-other-window (count) + (interactive "p") + (scroll-other-window count)) +(defun riffle-scroll-other-window-down (count) + (interactive "p") + (scroll-other-window-down count)) + +(defvar even-window-heights nil) ;; xemacs doesn't have it. +(defun riffle-pop-to-buffer (buf &optional size) + (if riffle-keep-window + (switch-to-buffer buf) + (progn + (when (one-window-p) + (split-window nil size howm-view-split-horizontally)) + (let ((even-window-heights (if size + nil + even-window-heights)) + ;; Don't split windows further even when + ;; riffle-pop-to-buffer is called twice. + (pop-up-windows nil)) + (pop-to-buffer buf))))) + +;; 'Place' is line number at now +(defun riffle-set-place (place) + (howm-goto-line place)) +(defun riffle-get-place (&optional point) + (riffle-line-number point)) + +;; ;; needless? +;; (defun riffle-jump-to-summary () +;; (interactive) +;; (riffle-jump-to-buffer (riffle-summary-buffer))) +;; (defun riffle-jump-to-contents () +;; (interactive) +;; (riffle-jump-to-buffer (riffle-contents-buffer))) +;; (defun riffle-jump-to-buffer (buf) +;; (let ((w (get-buffer-window buf))) +;; (if w +;; (select-window w) +;; (switch-to-buffer buf)))) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;;; controller + +;; (defun riffle-make-controller (alist) +;; alist) +;; (defun riffle-send (object command &rest args) +;; (if (eq command 'self) +;; object +;; (let ((func (cdr (assoc command object)))) +;; (apply func args)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; keymap + +;;; riffle-mode + +(let ((m (make-sparse-keymap))) + (define-key m "n" 'next-line) + (define-key m "p" 'previous-line) + (define-key m "?" 'describe-mode) + (define-key m "q" 'riffle-kill-buffer) + (setq riffle-mode-map m)) + +;;; riffle-summary-mode + +(let ((m riffle-summary-mode-map)) + (define-key m " " 'riffle-pop-or-scroll-other-window) + (define-key m [backspace] 'scroll-other-window-down) + (define-key m "\C-h" 'scroll-other-window-down) + (define-key m "j" 'riffle-scroll-other-window) + (define-key m "k" 'riffle-scroll-other-window-down) + (define-key m "@" 'riffle-summary-to-contents) + (define-key m "0" 'riffle-summary-to-contents) + (define-key m "1" 'delete-other-windows) + (define-key m "2" 'riffle-pop-window) + (define-key m "v" 'riffle-toggle-window) +;; (define-key m "o" 'riffle-jump-to-contents) + ) + +;;; riffle-contents-mode + +(let ((m riffle-contents-mode-map)) + (define-key m " " 'scroll-up) + (define-key m [backspace] 'scroll-down) + (define-key m "\C-h" 'scroll-down) + (define-key m "j" 'riffle-scroll-up) + (define-key m "k" 'riffle-scroll-down) + (define-key m "@" 'riffle-contents-to-summary) + (define-key m "0" 'riffle-contents-to-summary) + (define-key m "\C-i" 'riffle-contents-goto-next-item) + (define-key m "\M-\C-i" 'riffle-contents-goto-previous-item) + (define-key m [tab] 'riffle-contents-goto-next-item) + (define-key m [(meta tab)] 'riffle-contents-goto-previous-item) +;; (define-key m "o" 'riffle-jump-to-summary) + ) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; sample + +;; Sample code +;; (For more realistic example, see "riffle" section in howm-view.el.) +;; snap:///~/elisp/howm/howm-view.el#136:;;; riffle + +;; Usage: +;; 1. M-x load-file +;; 2. M-x riffle-sample +;; 3. Move cursor. Type ? for help. + +(defvar riffle-sample-item-list + '( + ("foo1" "foo1 line1\nfoo1 line2\nfoo1 line3\nfoo1 line4\n") + ("foo2" "foo2 line1\nfoo2 line2\nfoo2 line3\nfoo2 line4\n") + ("bar1" "bar1 line1\nbar1 line2\nbar1 line3\nbar1 line4\n") + ("bar2" "bar2 line1\nbar2 line2\nbar2 line3\nbar2 line4\n") + )) + +(defvar riffle-sample-summary-name "sampleS:%s") +(defvar riffle-sample-contents-name "sampleC:%s") +(defvar riffle-sample-cursor-point 3) + +(defun riffle-home:sample (item) + riffle-sample-cursor-point) +(defun riffle-summary-item:sample (item) + (car item)) +(defun riffle-contents-item:sample (item) + (concat (format "<%s>\n" (car item)) (cadr item) "\n")) +(defun riffle-summary-set-mode:sample () + (riffle-sample-summary-mode)) +(defun riffle-contents-set-mode:sample () + (riffle-sample-contents-mode)) +(defun riffle-summary-name-format:sample () + riffle-sample-summary-name) +(defun riffle-contents-name-format:sample () + riffle-sample-contents-name) +(defun riffle-post-update:sample (item) + (message "%s" (car item))) + +(riffle-define-derived-mode riffle-sample-summary-mode riffle-summary-mode + "SampleS" + "Sample summary mode. +key binding +--- ------- +\\[next-line] Next item +\\[previous-line] Previous item +\\[riffle-pop-or-scroll-other-window] Pop and scroll contents +\\[scroll-other-window-down] Scroll contents +\\[riffle-scroll-other-window] Scroll contents one line +\\[riffle-scroll-other-window-down] Scroll contents one line +\\[riffle-summary-to-contents] Concatenate all contents + +\\[delete-other-windows] Delete contents window +\\[riffle-pop-window] Pop contents window +\\[riffle-toggle-window] Toggle contents window + +\\[describe-mode] This help +\\[riffle-kill-buffer] Quit +" + ) + +(riffle-define-derived-mode riffle-sample-contents-mode riffle-contents-mode + "SampleC" + "Sample contents mode. +key binding +--- ------- +\\[next-line] Next line +\\[previous-line] Previous line +\\[scroll-up] Scroll up +\\[scroll-down] Scroll down +\\[riffle-scroll-up] Scroll one line up +\\[riffle-scroll-down] Scroll one line down +\\[riffle-contents-to-summary] Summary +\\[riffle-contents-goto-next-item] Next item +\\[riffle-contents-goto-previous-item] Previous item + +\\[describe-mode] This help +\\[riffle-kill-buffer] Quit +" + ) + +(defun riffle-sample () + (interactive) + (riffle-summary "sample-list" riffle-sample-item-list ':sample)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; provide + +(provide 'riffle) + +;;; riffle.el ends here diff --git a/site-lisp/howm/sample/ChangeLog b/site-lisp/howm/sample/ChangeLog new file mode 100644 index 0000000..f1b010c --- /dev/null +++ b/site-lisp/howm/sample/ChangeLog @@ -0,0 +1,33 @@ +2008-05-14 HIRAOKA Kazuyuki + + * dot.emacs: set inhibit-startup-message + +2006-11-21 HIRAOKA Kazuyuki + + * dot.emacs: set howm-history-file + thx > http://pc8.2ch.net/test/read.cgi/unix/1141892764/193-194n + +2005-12-09 HIRAOKA Kazuyuki + + * dot.emacs: leave howm-menu-lang to auto-detection + + * Makefile.am (EXTRA_DIST): + 0000-00-00-000000.howm is not needed any longer. + +2005-05-24 HIRAOKA Kazuyuki + + * dot.emacs: howm-history-limit is set to be nil. + Otherwise, my private ~/.howm-history is shrunk. + +2005-05-11 HIRAOKA Kazuyuki + + * 0000-00-00-000000.howm: added [Preference], %recent, %random + +2005-05-06 HIRAOKA Kazuyuki + + * 0000-00-00-000000.howm: bind R = [Update Menu] + +2005-02-25 HIRAOKA Kazuyuki + + * bug-report.txt: slightly modified expressions + diff --git a/site-lisp/howm/sample/Makefile.am b/site-lisp/howm/sample/Makefile.am new file mode 100644 index 0000000..bb1cb25 --- /dev/null +++ b/site-lisp/howm/sample/Makefile.am @@ -0,0 +1,7 @@ +EXTRA_DIST = search.txt top.txt \ + dot.emacs bug-report.txt + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status diff --git a/site-lisp/howm/sample/Makefile.in b/site-lisp/howm/sample/Makefile.in new file mode 100644 index 0000000..5f40004 --- /dev/null +++ b/site-lisp/howm/sample/Makefile.in @@ -0,0 +1,317 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = sample +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CVS = @CVS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EMACS = @EMACS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +howmdir = @howmdir@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +lispdir = @lispdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +packagedir = @packagedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = search.txt top.txt \ + dot.emacs bug-report.txt + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sample/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu sample/Makefile +.PRECIOUS: Makefile + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/site-lisp/howm/sample/bug-report.txt b/site-lisp/howm/sample/bug-report.txt new file mode 100644 index 0000000..9d04319 --- /dev/null +++ b/site-lisp/howm/sample/bug-report.txt @@ -0,0 +1,29 @@ +※ make test や test.bat では, テスト用環境(ほぼ無設定の emacs)が起動します. + +バグの指摘をくださる方へ: +(1) このバッファを保存してください. +(2) 下のテストをしてください. +(3) emacs をふつうに起動し直し, 保存したファイルの → に結果を記入してください. + +--------------------------------------------------------- + +■ [症状] 何をしたら, どうなってほしいのに, どうなった? + +悪い例 「カタカナを検索すると…」 +良い例 「C-c , , g ゴマ RET と入力すると…」 (具体的な操作手順をお願いします) + +→ + +■ [テスト1] make test や test.bat からその操作をしても, 症状が出る? + +→ + +■ [テスト2] 出ないなら, sample/dot.emacs に何を追加したら発症する? + +「.emacs から関連しそうな所をコピー → 再度 make test や test.bat → 症状確認」 +により, 発症させる設定を探ってください + +→ + +■ バージョン + diff --git a/site-lisp/howm/sample/dot.emacs b/site-lisp/howm/sample/dot.emacs new file mode 100644 index 0000000..b5e9b46 --- /dev/null +++ b/site-lisp/howm/sample/dot.emacs @@ -0,0 +1,13 @@ +(setq load-path (cons default-directory load-path)) +(setq debug-on-error t) +(setq inhibit-startup-message t) + +(setq howm-sample-directory (expand-file-name "sample/")) +(setq howm-directory howm-sample-directory) +(setq howm-keyword-file (expand-file-name ".howm-keys" howm-sample-directory)) +(setq howm-history-file (expand-file-name ".howm-history" howm-sample-directory)) +;(setq howm-menu-lang 'ja) +(setq howm-history-limit nil) ;; Don't erase my ~/.howm-history. + +(require 'howm) +(howm-test) diff --git a/site-lisp/howm/sample/search.txt b/site-lisp/howm/sample/search.txt new file mode 100644 index 0000000..bf9f820 --- /dev/null +++ b/site-lisp/howm/sample/search.txt @@ -0,0 +1,13 @@ += search + +<<< 全文検索 + +一覧表示 or 連結表示 (ヒットしたファイルの中身を全部つないで) + +これのおかげで, 断片的なメモをばんばんとれる :-) + +※ grep -r ってけっこう速い. メモファイル 1300 個でも 1 秒かからん. + +→ top メモに戻る + + diff --git a/site-lisp/howm/sample/top.txt b/site-lisp/howm/sample/top.txt new file mode 100644 index 0000000..089f66b --- /dev/null +++ b/site-lisp/howm/sample/top.txt @@ -0,0 +1,90 @@ += top + +下線がリンク. カーソル置いて [return] で該当ファイルにジャンプ! + +・goto リンク(ファイル): >>> search.txt +・goto リンク(文字列検索): >>> 断片的なメモをばんばん +・come-from リンク: <<< top メモ + +goto / come-from リンクは, 実は全文検索のショートカット + +※全体の書式は自由. リンクの書式も変更可. べたテキストばんざい. + += title1 +[2006-11-10 13:19] +body1 + += +[2004-12-15 13:19] +body2 + += title3 +[2004-12-15 13:19] +body3 + += タイトル1 + +本文1 [2004-07-18] + +[2007-03-02]@ ほげ +[2007-03-03]@ ほげ +[2007-03-04]@ ほげ +[2008-03-05]@ ほげ +[2008-03-06]@ ほげ +[2008-03-07]@ ほげ +[2008-03-08]@ ほげ +[2008-03-09]@ ほげ +[2008-03-10]@ ほげ +[2008-03-11]@ ほげ +[2008-03-12]@ ほげ +[2008-03-13]@ ほげ +[2008-03-14]@ ほげ +[2008-03-15]@ ほげ +[2008-03-15 23:59]@ ほげ +[2008-03-16]@ ほげ +[2008-03-17]@ ほげ +[2008-03-18]@ ほげ +[2008-03-19]@ ほげ +[2008-03-20]@ ほげ +[2008-04-01]@ ほげ +[2008-04-02]@ ほげ +[2008-02-24]+ piyo +[2008-02-25]+ piyo +[2008-02-26]+ piyo +[2008-02-27]+ piyo +[2008-02-14]. [2008-02-28]:+ piyo +[2008-04-01]+ piyo +[2008-04-02]+ piyo +[2008-04-03]+ piyo +[2008-04-04]+ piyo +[2008-04-05]+ piyo +[2008-02-15]. [2008-04-06]:+ piyo +[2008-04-07]+ piyo +[2008-04-08]+ piyo +[2008-04-09]+ piyo +[2008-04-10]+ piyo +[2009-06-05]! bar +[2009-06-06]! bar +[2009-06-07]! bar +[2009-06-08]! bar +[2009-06-09]! bar +[2009-06-10]! bar +[2009-06-11]! bar +[2009-06-12]! bar + += タイトル2 + +本文2 [2004-07-17] + +FOO +Foo +foo +http://foo/bar/baz.html +>>> ../doc/s-screen-shot.png +hoge >>> foo >>> bar >>> baz > qux +>>> top.txt +>>> /tmp/ +[2005-01-16]&3 aaa +[2005-01-28]&7 bbb' +[2005-01-25]&7 bbb +[2005-01-08]&22 ccc diff --git a/site-lisp/howm/test.bat b/site-lisp/howm/test.bat new file mode 100644 index 0000000..2b7fce1 --- /dev/null +++ b/site-lisp/howm/test.bat @@ -0,0 +1,7 @@ +REM $Id: test.bat,v 1.2 2010-05-05 13:18:39 hira Exp $ + +REM --- Edit HOWM_EMACS to point your emacs/meadow. --- +set HOWM_EMACS=d:/mdw/bin/meadow + +set HOWM_TEST=bat +start "howm test" %HOWM_EMACS% -q --no-site-file -l sample/dot.emacs diff --git a/site-lisp/ht/CHANGELOG.md b/site-lisp/ht/CHANGELOG.md new file mode 100644 index 0000000..9bc742b --- /dev/null +++ b/site-lisp/ht/CHANGELOG.md @@ -0,0 +1,28 @@ +## v0.7 + +* Added ht-to-alist and ht-to-plist + +## v0.6 + +* Fixed a bug where ht-from-alist would overwrite the latest key-value + association with older ones + +## v0.5 + +* Added ht-from-plist + +## v0.4 + +* Added ht-from-alist + +## v0.3 + +* Added ht-copy + +## v0.2 + +* Changed functions from hm-* to ht-* (Emacs doesn't use the term hash table) + +## v0.1 + +* Initial release diff --git a/site-lisp/ht/README.md b/site-lisp/ht/README.md new file mode 100644 index 0000000..a12d347 --- /dev/null +++ b/site-lisp/ht/README.md @@ -0,0 +1,93 @@ +# ht.el + +The missing hash table utility library for Emacs. + +## Functions + +* `ht-create` `(test?)` +* `ht-get` `(table key default?)` +* `ht-set` `(table key value)` +* `ht-remove` `(table key)` +* `ht-clear` `(table)` +* `ht-keys` `(table)` +* `ht-values` `(table)` +* `ht-items` `(table)` +* `ht-copy` `(table)` +* `ht-from-alist` `(alist)` +* `ht-from-plist` `(plist)` +* `ht-to-alist` `(table)` +* `ht-to-plist` `(table)` + +## Why? + +Libraries like [s.el](https://github.com/magnars/s.el) (strings) and +[dash.el](https://github.com/magnars/dash.el) (lists) have shown how +much nicer Emacs lisp programming can be with good libraries. ht.el +aims to similarly simplify working with hash tables. + +Common operations with hash tables (e.g. enumerate the keys) are too +difficult in Emacs lisp. + +ht.el offers: + +* A consistent naming scheme (contrast `make-hash-table` with `puthash`) +* A more natural argument ordering +* Mutation functions always return `nil` +* A more comprehensive range of hash table operations + +### Similar libraries + +* [kv.el](https://github.com/nicferrier/emacs-kv) (focuses more on alists) + +## Examples + +Basic usage: + + (require 'ht) + + (defun say-hello (name) + (let ((greetings (ht-create))) + (ht-set greetings "Bob" "Hey Bob!") + (ht-set greetings "Chris" "Hi Chris!") + (ht-get greetings name "Hello stranger!"))) + +This could be alternatively written as: + + (require 'ht) + + (defun say-hello (name) + (let ((greetings + (ht-from-plist + '("Bob" "Hey Bob!" + "Chris" "Hi Chris!")))) + (ht-get greetings name "Hello stranger!"))) + +## Running tests + +`M-x ht-run-tests` + +## What's an alist/plist? + +An alist is an association list, which is a list of pairs. It looks like this: + + ((key1 . value1) + (key2 . value2) + (key3 . value3)) + +An alist can also look like this: + + ((key1 . value1) + (key2 . value2) + (key1 . oldvalue)) + +A plist is a property list, which is a flat list with an even number +of items. It looks like this: + + (key1 value1 + key2 value2 + key3 value3) + +Both of these are slow. ht.el provides `ht-from-alist` and +`ht-from-plist` to help you convert to hash tables. If you need to +work with an alist or plist, use the functions `ht-to-alist` and +`ht-to-plist` to convert an hash table to those formats. diff --git a/site-lisp/ht/ht-tests.el b/site-lisp/ht/ht-tests.el new file mode 100644 index 0000000..ea19962 --- /dev/null +++ b/site-lisp/ht/ht-tests.el @@ -0,0 +1,76 @@ +(require 'ert) +(require 'ht) + +(ert-deftest ht-test-create () + (should (hash-table-p (ht-create)))) + +(ert-deftest ht-test-set-then-get () + (let ((h (ht-create))) + (ht-set h "foo" "bar") + (should (equal (ht-get h "foo") "bar")))) + +(ert-deftest ht-test-get-default () + (let ((h (ht-create))) + (should (equal (ht-get h "foo" "default") "default")))) + +(ert-deftest ht-test-create-non-default-test () + (let ((h (ht-create 'eq))) + (should (equal (hash-table-test h) 'eq)))) + +(ert-deftest ht-test-remove () + (let ((h (ht-create))) + (ht-set h "foo" "bar") + (ht-remove h "foo") + (should (equal (ht-get h "foo") nil)))) + +(ert-deftest ht-test-clear () + (let ((h (ht-create))) + (ht-set h "foo" "bar") + (ht-set h "biz" "baz") + (ht-clear h) + (should (equal (ht-items h) nil)))) + +(ert-deftest ht-test-keys () + (let ((h (ht-create))) + (ht-set h "foo" "bar") + (should (equal (ht-keys h) (list "foo"))))) + +(ert-deftest ht-test-values () + (let ((h (ht-create))) + (ht-set h "foo" "bar") + (should (equal (ht-values h) (list "bar"))))) + +(ert-deftest ht-test-items () + (let ((h (ht-create))) + (ht-set h "key1" "value1") + (should (equal (ht-items h) '(("key1" "value1")))))) + +(ert-deftest ht-test-from-alist () + (let* ((alist '(("key1" . "value1"))) + (h (ht-from-alist alist))) + (should (equal (ht-items h) '(("key1" "value1")))))) + +(ert-deftest ht-test-from-alist-masked-values () + (let* ((alist '(("key1" . "value1") ("key1" . "value2"))) + (h (ht-from-alist alist))) + (should (equal (ht-items h) '(("key1" "value1")))))) + +(ert-deftest ht-test-from-plist () + (let* ((plist '("key1" "value1")) + (h (ht-from-plist plist))) + (should (equal (ht-items h) '(("key1" "value1")))))) + +(ert-deftest ht-test-to-alist () + (let* ((alist '(("key1" . "value1") ("key2" . "value2"))) + (h (ht-from-alist alist))) + (should (or (equal (ht-to-alist h) alist) + (equal (ht-to-alist h) (reverse alist)))))) + +(ert-deftest ht-test-to-plist () + (let* ((h (ht-create))) + (ht-set h "foo" "bar") + (should (equal (ht-to-plist h) '("foo" "bar"))))) + +(defun ht-run-tests () + (interactive) + (ert-run-tests-interactively "ht-test-")) diff --git a/site-lisp/ht/ht.el b/site-lisp/ht/ht.el new file mode 100644 index 0000000..115d99a --- /dev/null +++ b/site-lisp/ht/ht.el @@ -0,0 +1,149 @@ +;;; ht.el --- The missing hash table library for Emacs + +;; Copyright (C) 2013 Wilfred Hughes + +;; Author: Wilfred Hughes +;; Version: 0.7 +;; Keywords: hash table, hash map, hash + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; The missing hash table utility library for Emacs. +;; +;; See documentation on https://github.com/Wilfred/ht.el + +;;; Code: + +(defun ht-create (&optional test) + "Create an empty hash table. + +TEST indicates the function used to compare the hash +keys. Default is `equal'. It can be `eq', `eql', `equal' or a +user-supplied test created via `define-hash-table-test'." + (make-hash-table :test (or test 'equal))) + +(defun ht-from-alist (alist) + "Create a hash table with initial values according to ALIST." + (let ((h (ht-create))) + ;; the first key-value pair in an alist gets precedence, so we + ;; start from the end of the list: + (dolist (pair (reverse alist) h) + (let ((key (car pair)) + (value (cdr pair))) + (ht-set h key value))))) + +;; based on the excellent -partition from dash.el, but we aim to be self-contained +(defun ht/group-pairs (list) + "Returns a new list with the items in LIST grouped into pairs. +Errors if LIST doesn't contain an even number of elements." + (let ((result) + (sublist) + (len 0)) + + (while list + ;; take the head of LIST and push onto SUBLIST + (setq sublist (cons (car list) sublist)) + (setq list (cdr list)) + + (setq len (1+ len)) + + (when (= len 2) + ;; push this two-item list onto RESULT + (setq result (cons (nreverse sublist) result)) + (setq sublist nil) + (setq len 0))) + + (when sublist (error "Expected an even number of elements")) + (nreverse result))) + +(defun ht-from-plist (plist) + "Create a hash table with initial values according to PLIST." + (let ((h (ht-create))) + (dolist (pair (ht/group-pairs plist) h) + (let ((key (car pair)) + (value (cadr pair))) + (ht-set h key value))))) + +(defun ht-get (table key &optional default) + "Look up KEY in TABLE, and return the matching value. +If KEY isn't present, return DEFAULT (nil if not specified)." + (gethash key table default)) + +(defun ht-set (table key value) + "Associate KEY in TABLE with VALUE." + (puthash key value table) + nil) + +(defun ht-remove (table key) + "Remove KEY from TABLE." + (remhash key table)) + +(defun ht-clear (table) + "Remove all keys from TABLE." + (clrhash table) + nil) + +(defun ht-keys (table) + "Return a list of all the keys in TABLE." + (let ((keys)) + (maphash (lambda (key value) (setq keys (cons key keys))) table) + keys)) + +(defun ht-values (table) + "Return a list of all the values in TABLE." + (let ((values)) + (maphash (lambda (key value) (setq values (cons value values))) table) + values)) + +(defun ht-items (table) + "Return a list of two-element lists '(key value) from TABLE." + (let ((items)) + (maphash (lambda (key value) (setq items (cons (list key value) items))) table) + items)) + +(defun ht-to-plist (table) + "Return a flat list '(key1 value1 key2 value2...) from TABLE. + +Note that hash tables are unordered, so this cannot be an exact +inverse of `ht-from-plist'. The following is not guaranteed: + +\(let ((data '(a b c d))) + (equalp data + (ht-to-plist (ht-from-plist data))))" + (apply 'append (ht-items table))) + +(defun ht-copy (table) + "Return a shallow copy of TABLE (keys and values are shared)." + (copy-hash-table table)) + +(defun ht-to-alist (table) + "Return a list of two-element lists '(key . value) from TABLE. + +Note that hash tables are unordered, so this cannot be an exact +inverse of `ht-from-alist'. The following is not guaranteed: + +\(let ((data '((a . b) (c . d)))) + (equalp data + (ht-to-alist (ht-from-alist data))))" + (let ((alist '())) + (maphash (lambda (key value) + (setq alist (cons (cons key value) alist))) + table) + alist)) + + +(provide 'ht) +;;; ht.el ends here diff --git a/site-lisp/point-undo/point-undo.el b/site-lisp/point-undo/point-undo.el new file mode 100644 index 0000000..dfbcce1 --- /dev/null +++ b/site-lisp/point-undo/point-undo.el @@ -0,0 +1,154 @@ +;;; point-undo.el --- undo/redo position + +;; Copyright (C) 2006,2008 rubikitch +;; Version: $Id: point-undo.el,v 1.6 2009/10/16 20:37:37 rubikitch Exp rubikitch $ + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2 of the License, or +;; (at your option) any later version. +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; You should have received a copy of the GNU General Public License +;; along with this program; if not, write to the Free Software +;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +;;; Commentary: + +;; This package allows you to undo/redo point and window-start. +;; It is like w3m's UNDO/REDO commands. + +;;; Commands: +;; +;; Below are complete command list: +;; +;; `point-undo' +;; Undo position. +;; `point-redo' +;; Redo position. +;; +;;; Customizable Options: +;; +;; Below are customizable option list: +;; + +;;; Setup: + +;; (require 'point-undo) +;; (define-key global-map [f5] 'point-undo) +;; (define-key global-map [f6] 'point-redo) + +;;; Bug Report: +;; +;; If you have problem, send a bug report via M-x point-undo-send-bug-report. +;; The step is: +;; 0) Setup mail in Emacs, the easiest way is: +;; (setq user-mail-address "your@mail.address") +;; (setq user-full-name "Your Full Name") +;; (setq smtpmail-smtp-server "your.smtp.server.jp") +;; (setq mail-user-agent 'message-user-agent) +;; (setq message-send-mail-function 'message-smtpmail-send-it) +;; 1) Be sure to use the LATEST version of point-undo.el. +;; 2) Enable debugger. M-x toggle-debug-on-error or (setq debug-on-error t) +;; 3) Use Lisp version instead of compiled one: (load "point-undo.el") +;; 4) Do it! +;; 5) If you got an error, please do not close *Backtrace* buffer. +;; 6) M-x point-undo-send-bug-report and M-x insert-buffer *Backtrace* +;; 7) Describe the bug using a precise recipe. +;; 8) Type C-c C-c to send. +;; # If you are a Japanese, please write in Japanese:-) + +;;; History: +;; +;; $Log: point-undo.el,v $ +;; Revision 1.6 2009/10/16 20:37:37 rubikitch +;; point-undo-list records position info only when point is moved. +;; +;; Revision 1.5 2008/12/27 15:21:03 rubikitch +;; *** empty log message *** +;; +;; Revision 1.4 2008/12/27 15:20:26 rubikitch +;; *** empty log message *** +;; +;; Revision 1.3 2008/12/27 15:19:38 rubikitch +;; refactoring +;; +;; Revision 1.2 2008/12/27 14:53:54 rubikitch +;; undo/redo not only point but also window-start. +;; + +;; 2006/02/27: initial version + +;;; Code: +(eval-when-compile (require 'cl)) + +(defvar point-undo-list nil) +(make-variable-buffer-local 'point-undo-list) + +(defvar point-redo-list nil) +(make-variable-buffer-local 'point-redo-list) + +(defun point-undo-pre-command-hook () + "Save positions before command." + (unless (or (eq this-command 'point-undo) + (eq this-command 'point-redo)) + + (let ((cell (cons (point) (window-start)))) + (unless (equal cell (car point-undo-list)) + (setq point-undo-list (cons cell point-undo-list)))) + (setq point-redo-list nil))) +(add-hook 'pre-command-hook 'point-undo-pre-command-hook) + +(defun point-undo-doit (list1 list2) + ;; list1, list2 = {point-undo-list, point-redo-list} + (destructuring-bind (pt . wst) + (or (car (symbol-value list1)) '(nil)) ;nil-safe + (when pt + (set list1 (cdr (symbol-value list1))) + (set list2 (cons (cons (point) (window-start)) (symbol-value list2))) + (goto-char pt) + (set-window-start (selected-window) wst)))) + +(defun point-undo () + "Undo position." + (interactive) + (point-undo-doit 'point-undo-list 'point-redo-list)) + +(defun point-redo () + "Redo position." + (interactive) + (when (or (eq last-command 'point-undo) + (eq last-command 'point-redo)) + (point-undo-doit 'point-redo-list 'point-undo-list))) + +;;;; Bug report +(defvar point-undo-maintainer-mail-address + (concat "rubiki" "tch@ru" "by-lang.org")) +(defvar point-undo-bug-report-salutation + "Describe bug below, using a precise recipe. + +When I executed M-x ... + +How to send a bug report: + 1) Be sure to use the LATEST version of point-undo.el. + 2) Enable debugger. M-x toggle-debug-on-error or (setq debug-on-error t) + 3) Use Lisp version instead of compiled one: (load \"point-undo.el\") + 4) If you got an error, please paste *Backtrace* buffer. + 5) Type C-c C-c to send. +# If you are a Japanese, please write in Japanese:-)") +(defun point-undo-send-bug-report () + (interactive) + (reporter-submit-bug-report + point-undo-maintainer-mail-address + "point-undo.el" + (apropos-internal "^point-undo-" 'boundp) + nil nil + point-undo-bug-report-salutation)) + +(provide 'point-undo) + +;; How to save (DO NOT REMOVE!!) +;; (emacswiki-post "point-undo.el") +;;; point-undo.el ends here diff --git a/site-lisp/popwin-misc/popwin-browse-kill-ring.el b/site-lisp/popwin-misc/popwin-browse-kill-ring.el new file mode 100644 index 0000000..e7e5171 --- /dev/null +++ b/site-lisp/popwin-misc/popwin-browse-kill-ring.el @@ -0,0 +1,36 @@ +;;; popwin-browse-kill-ring.el --- Popwin Configuration for Browse Kill Ring + +;; Copyright (C) 2012 Tomohiro Matsuyama + +;; Author: Tomohiro Matsuyama +;; Keywords: + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(require 'popwin) + +(defun popwin-bkr:update-window-reference () + (popwin:update-window-reference 'browse-kill-ring-original-window :safe t)) + +(add-hook 'popwin:after-popup-hook 'popwin-bkr:update-window-reference) +(push "*Kill Ring*" popwin:special-display-config) + +(provide 'popwin-browse-kill-ring) +;;; popwin-browse-kill-ring.el ends here diff --git a/site-lisp/sequential-command/sequential-command-config.el b/site-lisp/sequential-command/sequential-command-config.el new file mode 100644 index 0000000..e16d89a --- /dev/null +++ b/site-lisp/sequential-command/sequential-command-config.el @@ -0,0 +1,97 @@ +;;; sequential-command-config.el --- Examples of sequential-command.el +;; $Id: sequential-command-config.el,v 1.3 2009/03/22 09:09:58 rubikitch Exp $ + +;; Copyright (C) 2009 rubikitch + +;; Author: rubikitch +;; Keywords: extensions, convenience +;; URL: http://www.emacswiki.org/cgi-bin/wiki/download/sequential-command-config.el + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; Examples of sequential-command.el . + +;;; Commands: +;; +;; Below are complete command list: +;; +;; `sequential-command-setup-keys' +;; Rebind C-a, C-e, M-u, M-c, and M-l to seq-* commands. +;; +;;; Customizable Options: +;; +;; Below are customizable option list: +;; + +;;; History: + +;; $Log: sequential-command-config.el,v $ +;; Revision 1.3 2009/03/22 09:09:58 rubikitch +;; New command: `sequential-command-setup-keys' +;; +;; Revision 1.2 2009/02/17 12:56:26 rubikitch +;; fixed typo +;; +;; Revision 1.1 2009/02/17 03:13:47 rubikitch +;; Initial revision +;; + +;;; Code: + +(defvar sequential-command-config-version "$Id: sequential-command-config.el,v 1.3 2009/03/22 09:09:58 rubikitch Exp $") +(require 'sequential-command) + +(define-sequential-command seq-home + beginning-of-line beginning-of-buffer seq-return) +(define-sequential-command seq-end + end-of-line end-of-buffer seq-return) + +(defun seq-upcase-backward-word () + (interactive) + (upcase-word (- (1+ (seq-count))))) +(defun seq-capitalize-backward-word () + (interactive) + (capitalize-word (- (1+ (seq-count))))) +(defun seq-downcase-backward-word () + (interactive) + (downcase-word (- (1+ (seq-count))))) + +(when (require 'org nil t) + (define-sequential-command org-seq-home + org-beginning-of-line beginning-of-buffer seq-return) + (define-sequential-command org-seq-end + org-end-of-line end-of-buffer seq-return)) + +(defun sequential-command-setup-keys () + "Rebind C-a, C-e, M-u, M-c, and M-l to seq-* commands. +If you use `org-mode', rebind C-a and C-e." + (interactive) + (global-set-key "\C-a" 'seq-home) + (global-set-key "\C-e" 'seq-end) + (global-set-key "\M-u" 'seq-upcase-backward-word) + (global-set-key "\M-c" 'seq-capitalize-backward-word) + (global-set-key "\M-l" 'seq-downcase-backward-word) + (when (require 'org nil t) + (define-key org-mode-map "\C-a" 'org-seq-home) + (define-key org-mode-map "\C-e" 'org-seq-end))) + +(provide 'sequential-command-config) + +;; How to save (DO NOT REMOVE!!) +;; (emacswiki-post "sequential-command-config.el") +;;; sequential-command-config.el ends here diff --git a/site-lisp/sequential-command/sequential-command.el b/site-lisp/sequential-command/sequential-command.el new file mode 100644 index 0000000..de6bc51 --- /dev/null +++ b/site-lisp/sequential-command/sequential-command.el @@ -0,0 +1,182 @@ +;;; sequential-command.el --- Many commands into one command +;; $Id: sequential-command.el,v 1.3 2010/05/04 08:55:35 rubikitch Exp $ + +;; Copyright (C) 2009 rubikitch + +;; Author: rubikitch +;; Keywords: convenience, lisp +;; URL: http://www.emacswiki.org/cgi-bin/wiki/download/sequential-command.el + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; Integrating multiple commands into one command is sometimes +;; useful. Pressing C-e at the end of line is useless and adding the +;; other behavior in this situation is safe. +;; +;; For example, defining `my-end': if point is at the end of line, go +;; to the end of buffer, otherwise go to the end of line. Just evaluate it! +;; +;; (define-sequential-command my-end end-of-line end-of-buffer) +;; (global-set-key "\C-e" 'my-end) +;; +;; Consequently, pressing C-e C-e is `end-of-buffer'! +;; +;; `define-sequential-command' is a macro that defines a command whose +;; behavior is changed by sequence of calls of the same command. +;; +;; `seq-return' is a command to return to the position when sequence +;; of calls of the same command was started. +;; +;; See sequential-command-config.el if you want examples. +;; +;; http://www.emacswiki.org/cgi-bin/wiki/download/sequential-command-config.el + +;;; Commands: +;; +;; Below are complete command list: +;; +;; `seq-return' +;; Return to the position when sequence of calls of the same command was started. +;; +;;; Customizable Options: +;; +;; Below are customizable option list: +;; + +;;; Demonstration: + +;; Execute M-x seq-demo. And press C-x C-z many times. + +;;; Bug Report: +;; +;; If you have problem, send a bug report via M-x seq-send-bug-report. +;; The step is: +;; 0) Setup mail in Emacs, the easiest way is: +;; (setq user-mail-address "your@mail.address") +;; (setq user-full-name "Your Full Name") +;; (setq smtpmail-smtp-server "your.smtp.server.jp") +;; (setq mail-user-agent 'message-user-agent) +;; (setq message-send-mail-function 'message-smtpmail-send-it) +;; 1) Be sure to use the LATEST version of sequential-command.el. +;; 2) Enable debugger. M-x toggle-debug-on-error or (setq debug-on-error t) +;; 3) Use Lisp version instead of compiled one: (load "sequential-command.el") +;; 4) Do it! +;; 5) If you got an error, please do not close *Backtrace* buffer. +;; 6) M-x seq-send-bug-report and M-x insert-buffer *Backtrace* +;; 7) Describe the bug using a precise recipe. +;; 8) Type C-c C-c to send. +;; # If you are a Japanese, please write in Japanese:-) + +;;; History: + +;; $Log: sequential-command.el,v $ +;; Revision 1.3 2010/05/04 08:55:35 rubikitch +;; Added bug report command +;; +;; Revision 1.2 2009/02/17 03:04:18 rubikitch +;; * Add demo. +;; * Rename file name. +;; * New macro: `define-sequential-command'. +;; * New command: `seq-return'. +;; +;; Revision 1.1 2009/02/17 01:24:04 rubikitch +;; Initial revision +;; + +;;; Code: + +(defvar sequential-command-version "$Id: sequential-command.el,v 1.3 2010/05/04 08:55:35 rubikitch Exp $") +(eval-when-compile (require 'cl)) + +(defvar seq-store-count 0) +(defvar seq-start-position nil + "Stores `point' and `window-start' when sequence of calls of the same + command was started. This variable is updated by `seq-count'") + +(defun seq-count () + "Returns number of times `this-command' was executed. +It also updates `seq-start-position'." + (if (eq last-command this-command) + (incf seq-store-count) + (setq seq-start-position (cons (point) (window-start)) + seq-store-count 0))) + +(defmacro define-sequential-command (name &rest commands) + "Define a command whose behavior is changed by sequence of calls of the same command." + (let ((cmdary (apply 'vector commands))) + `(defun ,name () + ,(concat "Sequential command of " + (mapconcat + (lambda (cmd) (format "`%s'" (symbol-name cmd))) + commands " and ") + ".") + (interactive) + (call-interactively + (aref ,cmdary (mod (seq-count) ,(length cmdary))))))) +;; (macroexpand '(define-sequential-command foo beginning-of-line beginning-of-buffer)) + +(defun seq-return () + "Return to the position when sequence of calls of the same command was started." + (interactive) + (goto-char (car seq-start-position)) + (set-window-start (selected-window) (cdr seq-start-position))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; demonstration ;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defun seq-demo () + (interactive) + (global-set-key "\C-x\C-z" 'seq-count-test) + (message "Press C-x C-z repeatedly")) + +(defun seq-count-test () + (interactive) + (message "seq-count: %d" (seq-count))) + +(define-sequential-command seq-home + beginning-of-line back-to-indentation beginning-of-buffer seq-return) + +;;;; Bug report +(defvar seq-maintainer-mail-address + (concat "rubiki" "tch@ru" "by-lang.org")) +(defvar seq-bug-report-salutation + "Describe bug below, using a precise recipe. + +When I executed M-x ... + +How to send a bug report: + 1) Be sure to use the LATEST version of sequential-command.el. + 2) Enable debugger. M-x toggle-debug-on-error or (setq debug-on-error t) + 3) Use Lisp version instead of compiled one: (load \"sequential-command.el\") + 4) If you got an error, please paste *Backtrace* buffer. + 5) Type C-c C-c to send. +# If you are a Japanese, please write in Japanese:-)") +(defun seq-send-bug-report () + (interactive) + (reporter-submit-bug-report + seq-maintainer-mail-address + "sequential-command.el" + (apropos-internal "^seq" 'boundp) + nil nil + seq-bug-report-salutation)) + +(provide 'sequential-command) + +;; How to save (DO NOT REMOVE!!) +;; (emacswiki-post "sequential-command.el") +;;; sequential-command.el ends here diff --git a/site-lisp/tabbar+/tabbar+.el b/site-lisp/tabbar+/tabbar+.el new file mode 100644 index 0000000..438d255 --- /dev/null +++ b/site-lisp/tabbar+/tabbar+.el @@ -0,0 +1,355 @@ +;;; tabbar+.el --- + +;; Copyright (C) + +;; Author: +;; Keywords: + +;; Version 0.2.2 + +;;; Commentary: + +;;; Code: + +(require 'tabbar) +(require 'dash) + +(defun resently-used-buffer () + (interactive) + (other-buffer (current-buffer) 1)) + +(defun tabbar+sort-tab () + "Sort current tab group in lexicographically order" + (interactive) + (let* ((ctabset (tabbar-current-tabset 't)) + (ctabs (tabbar-tabs ctabset))) + (if (and ctabset ctabs) + (progn + (set ctabset (sort ctabs (lambda (b1 b2) + (string-lessp (buffer-name (car b1)) + (buffer-name (car b2)))))) + (put ctabset 'template nil) + (tabbar-display-update))))) + +;; +;; http://d.hatena.ne.jp/tequilasunset/20110103/p1 +;; + +(defvar tabbar+displayed-buffers + '("*slime-repl clojure*" + "*Backtrace*" + "*Colors*" + "*Faces*" + "eshell" + "*grep*" + "*ielm*" + "*nrepl*") + "*Reagexps matches buffer names always included tabs.") + +(defun tabbar+buffer-list-function () + (let* ((hides (list ?\ ?\*)) + (re (regexp-opt tabbar+displayed-buffers)) + (cur-buf (current-buffer)) + (tabs (delq nil + (mapcar (lambda (buf) + (let ((name (buffer-name buf))) + (when (and (not (string-match "*howm:.**" name)) + (or (string-match re name) + (not (memq (aref name 0) hides)))) + buf))) + (buffer-list))))) + (if (memq cur-buf tabs) + tabs + (cons cur-buf tabs)))) + +(defun tabbar+buffer-help-on-tab (tab) + "Return the help string shown when mouse is onto TAB." + (if tabbar--buffer-show-groups + (let* ((tabset (tabbar-tab-tabset tab)) + (tab (tabbar-selected-tab tabset))) + (format "mouse-1: switch to buffer %S in group [%s]" + (buffer-name (tabbar-tab-value tab)) tabset)) + (format "\ +mouse-1: switch to buffer %S\n\ +mouse-2: kill this buffer\n\ +mouse-3: delete other windows" + (buffer-name (tabbar-tab-value tab))))) + +(defun tabbar+buffer-select-tab (event tab) + "On mouse EVENT, select TAB." + (let ((mouse-button (event-basic-type event)) + (buffer (tabbar-tab-value tab))) + (cond + ((eq mouse-button 'mouse-2) + (with-current-buffer buffer + (kill-buffer))) + ((eq mouse-button 'mouse-3) + (delete-other-windows)) + (t + (switch-to-buffer buffer))) + ;; Don't show groups. + (tabbar-buffer-show-groups nil))) + +(setq tabbar-help-on-tab-function 'tabbar+buffer-help-on-tab) +(setq tabbar-select-tab-function 'tabbar+buffer-select-tab) +(setq tabbar-buffer-list-function 'tabbar+buffer-list-function) + +;; +;; Tab Group +;; + +(defconst tabbar+default-group-name "Default") + +(defvar tabbar+group nil) +(make-variable-buffer-local 'tabbar+group) + +(defun tabbar+init-group () + "" + (--map (with-current-buffer it + (setq tabbar+group tabbar+default-group-name)) + (buffer-list))) + +(defun tabbar+get-group (buff) + "Return BUFF's tab group." + (with-current-buffer buff + (or tabbar+group (setq tabbar+group tabbar+default-group-name)))) + +(defun tabbar+get-all-group-name () + "Return tab group name list." + (->> (buffer-list) + (-map 'tabbar+get-group) + (-distinct) + (-remove 'nil-p))) + +;; +;; Tabbar grouping function +;; + +(defvar tabbar+const-group-list + (--map (cons it tabbar+default-group-name) + '("*scratch*" + "*Messages*" + "*Packages*" + "*howmM:%menu%*"))) + +(defun tabbar+buffer-groups-function () + "Return current buffer's group name." + (if (not tabbar+group) + (setq tabbar+group (or (assoc-default (buffer-name) tabbar+const-group-list) + (tabbar+get-group (resently-used-buffer))))) + (list tabbar+group)) + +;; +;; Group commands +;; + +(defun tabbar+change-group (name) + "Change current buffer's group to NAME." + (interactive + (list (completing-read "Tab group: " (tabbar+get-all-group-name)))) + (setq tabbar+group name) + (tabbar-display-update)) + +(defun tabbar+switch-group (name) + "Change current group to NAME." + (interactive + (list (completing-read "Tab group: " (tabbar+get-all-group-name)))) + (switch-to-buffer (--first (string= name (tabbar+get-group it)) (buffer-list)))) + +(defun tabbar+rename-group (new-name) + (interactive + (list (completing-read "Rename tab group: " (tabbar+get-all-group-name)))) + (let ((old-name tabbar+group)) + (->> (buffer-list) + (--filter (string= old-name (tabbar+get-group it))) + (--map (with-current-buffer it + (setq tabbar+group new-name)))))) + +(defun tabbar+group-buffers (group-name) + "Return list of buffers belonging to GROUP-NAME" + (->> (buffer-list) + (--filter (string= group-name (tabbar+get-group it))))) + +;; +;; Tab Position +;; + +(defun tabbar+get-current-buffer-index () + (let* ((ctabset (tabbar-current-tabset 't)) + (ctabs (tabbar-tabs ctabset)) + (ctab (tabbar-selected-tab ctabset))) + (length (--take-while (not (eq it ctab)) ctabs)))) + +(defun insert- (list-object index element) + (append (-take index list-object) (list element) (-drop index list-object))) + +(defun tabbar+move (direction) + "Move current tab to (+ index DIRECTION)" + (interactive) + (let* ((ctabset (tabbar-current-tabset 't)) + (ctabs (tabbar-tabs ctabset)) + (ctab (tabbar-selected-tab ctabset)) + (index (tabbar+get-current-buffer-index)) + (others (--remove (eq it ctab) ctabs)) + (ins (mod (+ index direction (+ 1 (length others))) (+ 1 (length others))))) + (set ctabset (insert- others ins ctab)) + (put ctabset 'template nil) + (tabbar-display-update))) + +(defun tabbar+move-right () + "Move current tab to right" + (interactive) + (tabbar+move +1)) + +(defun tabbar+move-left () + "Move current tab to left" + (interactive) + (tabbar+move -1)) + +;; +;; Kill Buffer or Group +;; + +(defun tabbar+remove-right () + "Remove right side buffers" + (interactive) + (let* ((ctabset (tabbar-current-tabset 't)) + (ctabs (tabbar-tabs ctabset)) + (ctab (tabbar-selected-tab ctabset))) + (--map (kill-buffer (car it)) (cdr (--drop-while (not (eq ctab it)) ctabs))))) + +(defun tabbar+remove-left () + "Remove left side buffers" + (interactive) + (let* ((ctabset (tabbar-current-tabset 't)) + (ctabs (tabbar-tabs ctabset)) + (ctab (tabbar-selected-tab ctabset))) + (--map (kill-buffer (car it)) (--take-while (not (eq ctab it)) ctabs)))) + +(defun tabbar+kill-group (group) + "Kill all buffers belonging to GROUP." + (interactive + (list (completing-read "Tab Group: " (tabbar+get-all-group-name)))) + (->> (buffer-list) + (--filter (string= group (tabbar+get-group it))) + (-map 'kill-buffer))) + +;; +;; +;; + +(defvar tabbar+group-mode nil) + +(defun tabbar+add-group-name-to-mode-line () + (add-to-list 'default-mode-line-format + '(:eval + (concat " [" (format "%s" (tabbar-current-tabset t)) "]")))) + +(defun tabbar+enable-tab-group () + "" + (interactive) + (unless tabbar+group-mode + (tabbar+init-group) + ;; (tabbar+add-group-name-to-mode-line) + (setq tabbar-buffer-groups-function 'tabbar+buffer-groups-function) + (setq tabbar+group-mode +1))) + +;; (defun tabbar+disable-tab-group () +;; "" +;; (interactive) +;; (tabbar+init-group) +;; (setq tabbar-buffer-groups-function '(lambda () (list tabbar+default-group-name))) +;; (setq tabbar+group-mode 0)) + +;; +;; Helm interface +;; + +;; key: "[GROUP] BUFFER" +;; value: # +(defvar tabbar+helm-candidates-hash (make-hash-table :test 'equal) + "Hold group name of each tabs") + +(defvar helm-c-source-tabbar+group) + +(defun tabbar+add-group-name-prefix (buff) + "" + (let ((cand (concat "[" (tabbar+get-group buff) "] " (buffer-name buff)))) + (puthash cand buff tabbar+helm-candidates-hash) + cand)) + +(defun tabbar+helm-buffer-catdidates () + "" + (->> (cdr (buffer-list)) ; first element is helm buffer + (--filter (not (string= " " (substring (buffer-name it) 0 1)))) + (-map 'tabbar+add-group-name-prefix))) + +(defun tabbar+helm-action (action command? selected) + "" + (let ((buff (gethash selected tabbar+helm-candidates-hash))) + (with-current-buffer buff + (if (and command? (commandp action)) + (command-execute action) + (funcall action buff))))) + +(defvar helm-c-source-tabbar+buffers-list + `((name . "Tabbar+Buffer") + (candidates . tabbar+helm-buffer-catdidates) + (action ("Switch to buffer" . ,(-partial 'tabbar+helm-action 'switch-to-buffer nil)) + ("Change group" . ,(-partial 'tabbar+helm-action 'tabbar+change-group t)) + ("Kill buffer" . ,(-partial 'tabbar+helm-action 'kill-buffer nil)) + ("Kill right side" . ,(-partial 'tabbar+helm-action 'tabbar+remove-right t)) + ("Kill left side" . ,(-partial 'tabbar+helm-action 'tabbar+remove-left t)) + ;;("Rename its group" . ,(-partial 'tabbar+helm-action 'tabbar+rename-group t))))) + ))) + +(defvar common-candidate-list '("*scratch*" "*Messages*" "*howmM:%menu%*")) + +(defun add-common-candidate (cand-list) + (let ((group (tabbar+get-group (car cand-list)))) + (->> common-candidate-list + (-map 'get-buffer) + (-filter 'identity) + (--filter (not (string= (tabbar+get-group it) + group))) + (append cand-list)))) + +(defun tabbar+helm-current-group-buffer-candidate () + (->> (resently-used-buffer) + (tabbar+get-group) + (tabbar+group-buffers) + (--filter (not (string= " " (substring (buffer-name it) 0 1)))) + (add-common-candidate) + (-map 'tabbar+add-group-name-prefix))) + +(defvar helm-c-source-tabbar+current-group-buffers-list + `((name . "Tabbar+ Current Group Buffer") + (candidates . tabbar+helm-current-group-buffer-candidate) + (volatile) + (action ("Switch to buffer" . ,(-partial 'tabbar+helm-action 'switch-to-buffer nil)) + ("Change group" . ,(-partial 'tabbar+helm-action 'tabbar+change-group t)) + ("Kill buffer" . ,(-partial 'tabbar+helm-action 'kill-buffer nil)) + ("Kill right side" . ,(-partial 'tabbar+helm-action 'tabbar+remove-right t)) + ("Kill left side" . ,(-partial 'tabbar+helm-action 'tabbar+remove-left t))))) + +(defun tabbar+helm-rename-group (selected) + (->> (buffer-list) + (--first (string= selected (tabbar+get-group it))) + ((lambda (buff) + (with-current-buffer buff + (command-execute 'tabbar+rename-group)))))) + +(defvar helm-c-source-tab-groups-list + `((name . "Tab Group") + (candidates . tabbar+get-all-group-name) + (volatile) + (action ("Switch group" . tabbar+switch-group) + ("Change group" . tabbar+change-group) + ("Kill group" . tabbar+kill-group) + ("Rename group" . tabbar+helm-rename-group)))) + +;; + +(provide 'tabbar+) + +;;; tabbar+.el ends here diff --git a/site-lisp/tabbar/tabbar.el b/site-lisp/tabbar/tabbar.el new file mode 100644 index 0000000..dccf9ce --- /dev/null +++ b/site-lisp/tabbar/tabbar.el @@ -0,0 +1,1937 @@ +;;; Tabbar.el --- Display a tab bar in the header line + +;; Copyright (C) 2003, 2004, 2005 David Ponce + +;; Author: David Ponce +;; Maintainer: David Ponce +;; Created: 25 February 2003 +;; Keywords: convenience +;; Revision: $Id: tabbar.el,v 1.7 2010/11/22 23:30 m00natic Exp $ + +(defconst tabbar-version "2.0") + +;; This file is not part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth +;; Floor, Boston, MA 02110-1301, USA. + +;;; Commentary: +;; +;; This library provides the Tabbar global minor mode to display a tab +;; bar in the header line of Emacs 21 and later versions. You can use +;; the mouse to click on a tab and select it. Also, three buttons are +;; displayed on the left side of the tab bar in this order: the +;; "home", "scroll left", and "scroll right" buttons. The "home" +;; button is a general purpose button used to change something on the +;; tab bar. The scroll left and scroll right buttons are used to +;; scroll tabs horizontally. Tabs can be divided up into groups to +;; maintain several sets of tabs at the same time (see also the +;; chapter "Core" below for more details on tab grouping). Only one +;; group is displayed on the tab bar, and the "home" button, for +;; example, can be used to navigate through the different groups, to +;; show different tab bars. +;; +;; In a graphic environment, using the mouse is probably the preferred +;; way to work with the tab bar. However, you can also use the tab +;; bar when Emacs is running on a terminal, so it is possible to use +;; commands to press special buttons, or to navigate cyclically +;; through tabs. +;; +;; These commands, and default keyboard shortcuts, are provided: +;; +;; `tabbar-mode' +;; Toggle the Tabbar global minor mode. When enabled a tab bar is +;; displayed in the header line. +;; +;; `tabbar-local-mode' (C-c ) +;; Toggle the Tabbar-Local minor mode. Provided the global minor +;; mode is turned on, the tab bar becomes local in the current +;; buffer when the local minor mode is enabled. This permits to +;; see the tab bar in a buffer where the header line is already +;; used by another mode (like `Info-mode' for example). +;; +;; `tabbar-mwheel-mode' +;; Toggle the Tabbar-Mwheel global minor mode. When enabled you +;; can use the mouse wheel to navigate through tabs of groups. +;; +;; `tabbar-press-home' (C-c ) +;; `tabbar-press-scroll-left' (C-c ) +;; `tabbar-press-scroll-right' (C-c ) +;; Simulate a mouse-1 click on respectively the "home", "scroll +;; left", and "scroll right" buttons. A numeric prefix argument +;; value of 2, or 3, respectively simulates a mouse-2, or mouse-3 +;; click. +;; +;; `tabbar-backward' (C-c ) +;; `tabbar-forward' (C-c ) +;; Are the basic commands to navigate cyclically through tabs or +;; groups of tabs. The cycle is controlled by the +;; `tabbar-cycle-scope' option. The default is to navigate +;; through all tabs across all existing groups of tabs. You can +;; change the default behavior to navigate only through the tabs +;; visible on the tab bar, or through groups of tabs only. Or use +;; the more specialized commands below. +;; +;; `tabbar-backward-tab' +;; `tabbar-forward-tab' +;; Navigate through the tabs visible on the tab bar. +;; +;; `tabbar-backward-group' (C-c ) +;; `tabbar-forward-group' (C-c ) +;; Navigate through existing groups of tabs. +;; +;; +;; Core +;; ---- +;; +;; The content of the tab bar is represented by an internal data +;; structure: a tab set. A tab set is a collection (group) of tabs, +;; identified by an unique name. In a tab set, at any time, one and +;; only one tab is designated as selected within the tab set. +;; +;; A tab is a simple data structure giving the value of the tab, and a +;; reference to its tab set container. A tab value can be any Lisp +;; object. Each tab object is guaranteed to be unique. +;; +;; A tab set is displayed on the tab bar through a "view" defined by +;; the index of the leftmost tab shown. Thus, it is possible to +;; scroll the tab bar horizontally by changing the start index of the +;; tab set view. +;; +;; The visual representation of a tab bar is a list of valid +;; `header-line-format' template elements, one for each special +;; button, and for each tab found into a tab set "view". When the +;; visual representation of a tab is required, the function specified +;; in the variable `tabbar-tab-label-function' is called to obtain it. +;; The visual representation of a special button is obtained by +;; calling the function specified in `tabbar-button-label-function', +;; which is passed a button name among `home', `scroll-left', or +;; `scroll-right'. There are also options and faces to customize the +;; appearance of buttons and tabs (see the code for more details). +;; +;; When the mouse is over a tab, the function specified in +;; `tabbar-help-on-tab-function' is called, which is passed the tab +;; and should return a help string to display. When a tab is +;; selected, the function specified in `tabbar-select-tab-function' is +;; called, which is passed the tab and the event received. +;; +;; Similarly, to control the behavior of the special buttons, the +;; following variables are available, for respectively the `home', +;; `scroll-left' and `scroll-right' value of `

#{file}