The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Install some packages

gerrit-package
Gergely Polonkai 6 years ago
parent 802b4584ed
commit 6fa0b51045
  1. 75
      elpa/hydra-20160913.216/hydra-autoloads.el
  2. 386
      elpa/hydra-20160913.216/hydra-examples.el
  3. 127
      elpa/hydra-20160913.216/hydra-ox.el
  4. 7
      elpa/hydra-20160913.216/hydra-pkg.el
  5. 1273
      elpa/hydra-20160913.216/hydra.el
  6. 117
      elpa/hydra-20160913.216/lv.el
  7. 27
      elpa/id-manager-20160425.216/id-manager-autoloads.el
  8. 1
      elpa/id-manager-20160425.216/id-manager-pkg.el
  9. 831
      elpa/id-manager-20160425.216/id-manager.el
  10. 381
      elpa/identica-mode-20130204.1453/bbdb-identica.el
  11. 19
      elpa/identica-mode-20130204.1453/dir
  12. 430
      elpa/identica-mode-20130204.1453/fdl.info
  13. 793
      elpa/identica-mode-20130204.1453/identica-friends.el
  14. 27
      elpa/identica-mode-20130204.1453/identica-mode-autoloads.el
  15. 5
      elpa/identica-mode-20130204.1453/identica-mode-pkg.el
  16. 2494
      elpa/identica-mode-20130204.1453/identica-mode.el
  17. 859
      elpa/identica-mode-20130204.1453/identica-mode.info
  18. 93
      elpa/ng2-mode-20160910.820/ng2-html.el
  19. 54
      elpa/ng2-mode-20160910.820/ng2-mode-autoloads.el
  20. 7
      elpa/ng2-mode-20160910.820/ng2-mode-pkg.el
  21. 80
      elpa/ng2-mode-20160910.820/ng2-mode.el
  22. 99
      elpa/ng2-mode-20160910.820/ng2-ts.el

@ -0,0 +1,75 @@
;;; hydra-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
;;;### (autoloads nil "hydra" "hydra.el" (22501 5659 447421 78000))
;;; Generated autoloads from hydra.el
(autoload 'defhydra "hydra" "\
Create a Hydra - a family of functions with prefix NAME.
NAME should be a symbol, it will be the prefix of all functions
defined here.
BODY has the format:
(BODY-MAP BODY-KEY &rest BODY-PLIST)
DOCSTRING will be displayed in the echo area to identify the
Hydra. When DOCSTRING starts with a newline, special Ruby-style
substitution will be performed by `hydra--format'.
Functions are created on basis of HEADS, each of which has the
format:
(KEY CMD &optional HINT &rest PLIST)
BODY-MAP is a keymap; `global-map' is used quite often. Each
function generated from HEADS will be bound in BODY-MAP to
BODY-KEY + KEY (both are strings passed to `kbd'), and will set
the transient map so that all following heads can be called
though KEY only. BODY-KEY can be an empty string.
CMD is a callable expression: either an interactive function
name, or an interactive lambda, or a single sexp (it will be
wrapped in an interactive lambda).
HINT is a short string that identifies its head. It will be
printed beside KEY in the echo erea if `hydra-is-helpful' is not
nil. If you don't even want the KEY to be printed, set HINT
explicitly to nil.
The heads inherit their PLIST from BODY-PLIST and are allowed to
override some keys. The keys recognized are :exit and :bind.
:exit can be:
- nil (default): this head will continue the Hydra state.
- t: this head will stop the Hydra state.
:bind can be:
- nil: this head will not be bound in BODY-MAP.
- a lambda taking KEY and CMD used to bind a head.
It is possible to omit both BODY-MAP and BODY-KEY if you don't
want to bind anything. In that case, typically you will bind the
generated NAME/body command. This command is also the return
result of `defhydra'.
\(fn NAME BODY &optional DOCSTRING &rest HEADS)" nil t)
(put 'defhydra 'lisp-indent-function 'defun)
;;;***
;;;### (autoloads nil nil ("hydra-examples.el" "hydra-ox.el" "hydra-pkg.el"
;;;;;; "lv.el") (22501 5659 473131 612000))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; End:
;;; hydra-autoloads.el ends here

@ -0,0 +1,386 @@
;;; hydra-examples.el --- Some applications for Hydra
;; Copyright (C) 2015 Free Software Foundation, Inc.
;; Author: Oleh Krehel
;; This file is part of GNU Emacs.
;; GNU Emacs 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.
;; GNU Emacs 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. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; These are the sample Hydras.
;;
;; If you want to use them plainly, set `hydra-examples-verbatim' to t
;; before requiring this file. But it's probably better to only look
;; at them and use them as templates for building your own.
;;; Code:
(require 'hydra)
;;* Examples
;;** Example 1: text scale
(when (bound-and-true-p hydra-examples-verbatim)
(defhydra hydra-zoom (global-map "<f2>")
"zoom"
("g" text-scale-increase "in")
("l" text-scale-decrease "out")))
;; This example generates three commands:
;;
;; `hydra-zoom/text-scale-increase'
;; `hydra-zoom/text-scale-decrease'
;; `hydra-zoom/body'
;;
;; In addition, two of them are bound like this:
;;
;; (global-set-key (kbd "<f2> g") 'hydra-zoom/text-scale-increase)
;; (global-set-key (kbd "<f2> l") 'hydra-zoom/text-scale-decrease)
;;
;; Note that you can substitute `global-map' with e.g. `emacs-lisp-mode-map' if you need.
;; The functions generated will be the same, except the binding code will change to:
;;
;; (define-key emacs-lisp-mode-map [f2 103]
;; (function hydra-zoom/text-scale-increase))
;; (define-key emacs-lisp-mode-map [f2 108]
;; (function hydra-zoom/text-scale-decrease))
;;** Example 2: move window splitter
(when (bound-and-true-p hydra-examples-verbatim)
(defhydra hydra-splitter (global-map "C-M-s")
"splitter"
("h" hydra-move-splitter-left)
("j" hydra-move-splitter-down)
("k" hydra-move-splitter-up)
("l" hydra-move-splitter-right)))
;;** Example 3: jump to error
(when (bound-and-true-p hydra-examples-verbatim)
(defhydra hydra-error (global-map "M-g")
"goto-error"
("h" first-error "first")
("j" next-error "next")
("k" previous-error "prev")
("v" recenter-top-bottom "recenter")
("q" nil "quit")))
;; This example introduces only one new thing: since the command
;; passed to the "q" head is nil, it will quit the Hydra without doing
;; anything. Heads that quit the Hydra instead of continuing are
;; referred to as having blue :color. All the other heads have red
;; :color, unless other is specified.
;;** Example 4: toggle rarely used modes
(when (bound-and-true-p hydra-examples-verbatim)
(defvar whitespace-mode nil)
(global-set-key
(kbd "C-c C-v")
(defhydra hydra-toggle-simple (:color blue)
"toggle"
("a" abbrev-mode "abbrev")
("d" toggle-debug-on-error "debug")
("f" auto-fill-mode "fill")
("t" toggle-truncate-lines "truncate")
("w" whitespace-mode "whitespace")
("q" nil "cancel"))))
;; Note that in this case, `defhydra' returns the `hydra-toggle-simple/body'
;; symbol, which is then passed to `global-set-key'.
;;
;; Another new thing is that both the keymap and the body prefix are
;; skipped. This means that `defhydra' will bind nothing - that's why
;; `global-set-key' is necessary.
;;
;; One more new thing is that you can assign a :color to the body. All
;; heads will inherit this color. The code above is very much equivalent to:
;;
;; (global-set-key (kbd "C-c C-v a") 'abbrev-mode)
;; (global-set-key (kbd "C-c C-v d") 'toggle-debug-on-error)
;;
;; The differences are:
;;
;; * You get a hint immediately after "C-c C-v"
;; * You can cancel and call a command immediately, e.g. "C-c C-v C-n"
;; is equivalent to "C-n" with Hydra approach, while it will error
;; that "C-c C-v C-n" isn't bound with the usual approach.
;;** Example 5: mini-vi
(defun hydra-vi/pre ()
(set-cursor-color "#e52b50"))
(defun hydra-vi/post ()
(set-cursor-color "#ffffff"))
(when (bound-and-true-p hydra-examples-verbatim)
(global-set-key
(kbd "C-z")
(defhydra hydra-vi (:pre hydra-vi/pre :post hydra-vi/post :color amaranth)
"vi"
("l" forward-char)
("h" backward-char)
("j" next-line)
("k" previous-line)
("m" set-mark-command "mark")
("a" move-beginning-of-line "beg")
("e" move-end-of-line "end")
("d" delete-region "del" :color blue)
("y" kill-ring-save "yank" :color blue)
("q" nil "quit")))
(hydra-set-property 'hydra-vi :verbosity 1))
;; This example introduces :color amaranth. It's similar to red,
;; except while you can quit red with any binding which isn't a Hydra
;; head, you can quit amaranth only with a blue head. So you can quit
;; this mode only with "d", "y", "q" or "C-g".
;;
;; Another novelty are the :pre and :post handlers. :pre will be
;; called before each command, while :post will be called when the
;; Hydra quits. In this case, they're used to override the cursor
;; color while Hydra is active.
;;** Example 6: selective global bind
(when (bound-and-true-p hydra-examples-verbatim)
(defhydra hydra-next-error (global-map "C-x")
"next-error"
("`" next-error "next")
("j" next-error "next" :bind nil)
("k" previous-error "previous" :bind nil)))
;; This example will bind "C-x `" in `global-map', but it will not
;; bind "C-x j" and "C-x k".
;; You can still "C-x `jjk" though.
;;** Example 7: toggle with Ruby-style docstring
(defvar whitespace-mode nil)
(defhydra hydra-toggle (:color pink)
"
_a_ abbrev-mode: %`abbrev-mode
_d_ debug-on-error: %`debug-on-error
_f_ auto-fill-mode: %`auto-fill-function
_t_ truncate-lines: %`truncate-lines
_w_ whitespace-mode: %`whitespace-mode
"
("a" abbrev-mode nil)
("d" toggle-debug-on-error nil)
("f" auto-fill-mode nil)
("t" toggle-truncate-lines nil)
("w" whitespace-mode nil)
("q" nil "quit"))
;; Recommended binding:
;; (global-set-key (kbd "C-c C-v") 'hydra-toggle/body)
;; Here, using e.g. "_a_" translates to "a" with proper face.
;; More interestingly:
;;
;; "foobar %`abbrev-mode" means roughly (format "foobar %S" abbrev-mode)
;;
;; This means that you actually see the state of the mode that you're changing.
;;** Example 8: the whole menu for `Buffer-menu-mode'
(defhydra hydra-buffer-menu (:color pink
:hint nil)
"
^Mark^ ^Unmark^ ^Actions^ ^Search
^^^^^^^^----------------------------------------------------------------- (__)
_m_: mark _u_: unmark _x_: execute _R_: re-isearch (oo)
_s_: save _U_: unmark up _b_: bury _I_: isearch /------\\/
_d_: delete ^ ^ _g_: refresh _O_: multi-occur / | ||
_D_: delete up ^ ^ _T_: files only: % -28`Buffer-menu-files-only^^ * /\\---/\\
_~_: modified ^ ^ ^ ^ ^^ ~~ ~~
"
("m" Buffer-menu-mark)
("u" Buffer-menu-unmark)
("U" Buffer-menu-backup-unmark)
("d" Buffer-menu-delete)
("D" Buffer-menu-delete-backwards)
("s" Buffer-menu-save)
("~" Buffer-menu-not-modified)
("x" Buffer-menu-execute)
("b" Buffer-menu-bury)
("g" revert-buffer)
("T" Buffer-menu-toggle-files-only)
("O" Buffer-menu-multi-occur :color blue)
("I" Buffer-menu-isearch-buffers :color blue)
("R" Buffer-menu-isearch-buffers-regexp :color blue)
("c" nil "cancel")
("v" Buffer-menu-select "select" :color blue)
("o" Buffer-menu-other-window "other-window" :color blue)
("q" quit-window "quit" :color blue))
;; Recommended binding:
;; (define-key Buffer-menu-mode-map "." 'hydra-buffer-menu/body)
;;** Example 9: s-expressions in the docstring
;; You can inline s-expresssions into the docstring like this:
(defvar dired-mode-map)
(declare-function dired-mark "dired")
(when (bound-and-true-p hydra-examples-verbatim)
(require 'dired)
(defhydra hydra-marked-items (dired-mode-map "")
"
Number of marked items: %(length (dired-get-marked-files))
"
("m" dired-mark "mark")))
;; This results in the following dynamic docstring:
;;
;; (format "Number of marked items: %S\n"
;; (length (dired-get-marked-files)))
;;
;; You can use `format'-style width specs, e.g. % 10(length nil).
;;** Example 10: apropos family
(defhydra hydra-apropos (:color blue
:hint nil)
"
_a_propos _c_ommand
_d_ocumentation _l_ibrary
_v_ariable _u_ser-option
^ ^ valu_e_"
("a" apropos)
("d" apropos-documentation)
("v" apropos-variable)
("c" apropos-command)
("l" apropos-library)
("u" apropos-user-option)
("e" apropos-value))
;; Recommended binding:
;; (global-set-key (kbd "C-c h") 'hydra-apropos/body)
;;** Example 11: rectangle-mark-mode
(require 'rect)
(defhydra hydra-rectangle (:body-pre (rectangle-mark-mode 1)
:color pink
:post (deactivate-mark))
"
^_k_^ _d_elete _s_tring
_h_ _l_ _o_k _y_ank
^_j_^ _n_ew-copy _r_eset
^^^^ _e_xchange _u_ndo
^^^^ ^ ^ _p_aste
"
("h" rectangle-backward-char nil)
("l" rectangle-forward-char nil)
("k" rectangle-previous-line nil)
("j" rectangle-next-line nil)
("e" hydra-ex-point-mark nil)
("n" copy-rectangle-as-kill nil)
("d" delete-rectangle nil)
("r" (if (region-active-p)
(deactivate-mark)
(rectangle-mark-mode 1)) nil)
("y" yank-rectangle nil)
("u" undo nil)
("s" string-rectangle nil)
("p" kill-rectangle nil)
("o" nil nil))
;; Recommended binding:
;; (global-set-key (kbd "C-x SPC") 'hydra-rectangle/body)
;;** Example 12: org-agenda-view
(defun org-agenda-cts ()
(and (eq major-mode 'org-agenda-mode)
(let ((args (get-text-property
(min (1- (point-max)) (point))
'org-last-args)))
(nth 2 args))))
(defhydra hydra-org-agenda-view (:hint none)
"
_d_: ?d? day _g_: time grid=?g? _a_: arch-trees
_w_: ?w? week _[_: inactive _A_: arch-files
_t_: ?t? fortnight _f_: follow=?f? _r_: clock report=?r?
_m_: ?m? month _e_: entry text=?e? _D_: include diary=?D?
_y_: ?y? year _q_: quit _L__l__c_: log = ?l?"
("SPC" org-agenda-reset-view)
("d" org-agenda-day-view (if (eq 'day (org-agenda-cts)) "[x]" "[ ]"))
("w" org-agenda-week-view (if (eq 'week (org-agenda-cts)) "[x]" "[ ]"))
("t" org-agenda-fortnight-view (if (eq 'fortnight (org-agenda-cts)) "[x]" "[ ]"))
("m" org-agenda-month-view (if (eq 'month (org-agenda-cts)) "[x]" "[ ]"))
("y" org-agenda-year-view (if (eq 'year (org-agenda-cts)) "[x]" "[ ]"))
("l" org-agenda-log-mode (format "% -3S" org-agenda-show-log))
("L" (org-agenda-log-mode '(4)))
("c" (org-agenda-log-mode 'clockcheck))
("f" org-agenda-follow-mode (format "% -3S" org-agenda-follow-mode))
("a" org-agenda-archives-mode)
("A" (org-agenda-archives-mode 'files))
("r" org-agenda-clockreport-mode (format "% -3S" org-agenda-clockreport-mode))
("e" org-agenda-entry-text-mode (format "% -3S" org-agenda-entry-text-mode))
("g" org-agenda-toggle-time-grid (format "% -3S" org-agenda-use-time-grid))
("D" org-agenda-toggle-diary (format "% -3S" org-agenda-include-diary))
("!" org-agenda-toggle-deadlines)
("[" (let ((org-agenda-include-inactive-timestamps t))
(org-agenda-check-type t 'timeline 'agenda)
(org-agenda-redo)
(message "Display now includes inactive timestamps as well")))
("q" (message "Abort") :exit t)
("v" nil))
;; Recommended binding:
;; (define-key org-agenda-mode-map "v" 'hydra-org-agenda-view/body)
;;* Helpers
(require 'windmove)
(defun hydra-move-splitter-left (arg)
"Move window splitter left."
(interactive "p")
(if (let ((windmove-wrap-around))
(windmove-find-other-window 'right))
(shrink-window-horizontally arg)
(enlarge-window-horizontally arg)))
(defun hydra-move-splitter-right (arg)
"Move window splitter right."
(interactive "p")
(if (let ((windmove-wrap-around))
(windmove-find-other-window 'right))
(enlarge-window-horizontally arg)
(shrink-window-horizontally arg)))
(defun hydra-move-splitter-up (arg)
"Move window splitter up."
(interactive "p")
(if (let ((windmove-wrap-around))
(windmove-find-other-window 'up))
(enlarge-window arg)
(shrink-window arg)))
(defun hydra-move-splitter-down (arg)
"Move window splitter down."
(interactive "p")
(if (let ((windmove-wrap-around))
(windmove-find-other-window 'up))
(shrink-window arg)
(enlarge-window arg)))
(defvar rectangle-mark-mode)
(defun hydra-ex-point-mark ()
"Exchange point and mark."
(interactive)
(if rectangle-mark-mode
(rectangle-exchange-point-and-mark)
(let ((mk (mark)))
(rectangle-mark-mode 1)
(goto-char mk))))
(provide 'hydra-examples)
;; Local Variables:
;; no-byte-compile: t
;; End:
;;; hydra-examples.el ends here

@ -0,0 +1,127 @@
;;; hydra-ox.el --- Org mode export widget implemented in Hydra
;; Copyright (C) 2015 Free Software Foundation, Inc.
;; Author: Oleh Krehel
;; This file is part of GNU Emacs.
;; GNU Emacs 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.
;; GNU Emacs 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. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; This shows how a complex dispatch menu can be built with Hydra.
;;; Code:
(require 'hydra)
(require 'org)
(declare-function org-html-export-as-html 'ox-html)
(declare-function org-html-export-to-html 'ox-html)
(declare-function org-latex-export-as-latex 'ox-latex)
(declare-function org-latex-export-to-latex 'ox-latex)
(declare-function org-latex-export-to-pdf 'ox-latex)
(declare-function org-ascii-export-as-ascii 'ox-ascii)
(declare-function org-ascii-export-to-ascii 'ox-ascii)
(defhydradio hydra-ox ()
(body-only "Export only the body.")
(export-scope "Export scope." [buffer subtree])
(async-export "When non-nil, export async.")
(visible-only "When non-nil, export visible only")
(force-publishing "Toggle force publishing"))
(defhydra hydra-ox-html (:color blue)
"ox-html"
("H" (org-html-export-as-html
hydra-ox/async-export
(eq hydra-ox/export-scope 'subtree)
hydra-ox/visible-only
hydra-ox/body-only)
"As HTML buffer")
("h" (org-html-export-to-html
hydra-ox/async-export
(eq hydra-ox/export-scope 'subtree)
hydra-ox/visible-only
hydra-ox/body-only) "As HTML file")
("o" (org-open-file
(org-html-export-to-html
hydra-ox/async-export
(eq hydra-ox/export-scope 'subtree)
hydra-ox/visible-only
hydra-ox/body-only)) "As HTML file and open")
("b" hydra-ox/body "back")
("q" nil "quit"))
(defhydra hydra-ox-latex (:color blue)
"ox-latex"
("L" org-latex-export-as-latex "As LaTeX buffer")
("l" org-latex-export-to-latex "As LaTeX file")
("p" org-latex-export-to-pdf "As PDF file")
("o" (org-open-file (org-latex-export-to-pdf)) "As PDF file and open")
("b" hydra-ox/body "back")
("q" nil "quit"))
(defhydra hydra-ox-text (:color blue)
"ox-text"
("A" (org-ascii-export-as-ascii
nil nil nil nil
'(:ascii-charset ascii))
"As ASCII buffer")
("a" (org-ascii-export-to-ascii
nil nil nil nil
'(:ascii-charset ascii))
"As ASCII file")
("L" (org-ascii-export-as-ascii
nil nil nil nil
'(:ascii-charset latin1))
"As Latin1 buffer")
("l" (org-ascii-export-to-ascii
nil nil nil nil
'(:ascii-charset latin1))
"As Latin1 file")
("U" (org-ascii-export-as-ascii
nil nil nil nil
'(:ascii-charset utf-8))
"As UTF-8 buffer")
("u" (org-ascii-export-to-ascii
nil nil nil nil
'(:ascii-charset utf-8))
"As UTF-8 file")
("b" hydra-ox/body "back")
("q" nil "quit"))
(defhydra hydra-ox ()
"
_C-b_ Body only: % -15`hydra-ox/body-only^^^ _C-v_ Visible only: %`hydra-ox/visible-only
_C-s_ Export scope: % -15`hydra-ox/export-scope _C-f_ Force publishing: %`hydra-ox/force-publishing
_C-a_ Async export: %`hydra-ox/async-export
"
("C-b" (hydra-ox/body-only) nil)
("C-v" (hydra-ox/visible-only) nil)
("C-s" (hydra-ox/export-scope) nil)
("C-f" (hydra-ox/force-publishing) nil)
("C-a" (hydra-ox/async-export) nil)
("h" hydra-ox-html/body "Export to HTML" :exit t)
("l" hydra-ox-latex/body "Export to LaTeX" :exit t)
("t" hydra-ox-text/body "Export to Plain Text" :exit t)
("q" nil "quit"))
(define-key org-mode-map (kbd "C-c C-,") 'hydra-ox/body)
(provide 'hydra-ox)
;;; hydra-ox.el ends here

@ -0,0 +1,7 @@
(define-package "hydra" "20160913.216" "Make bindings that stick around."
'((cl-lib "0.5"))
:url "https://github.com/abo-abo/hydra" :keywords
'("bindings"))
;; Local Variables:
;; no-byte-compile: t
;; End:

File diff suppressed because it is too large Load Diff

@ -0,0 +1,117 @@
;;; lv.el --- Other echo area
;; Copyright (C) 2015 Free Software Foundation, Inc.
;; Author: Oleh Krehel
;; This file is part of GNU Emacs.
;; GNU Emacs 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.
;; GNU Emacs 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. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; This package provides `lv-message' intended to be used in place of
;; `message' when semi-permanent hints are needed, in order to not
;; interfere with Echo Area.
;;
;; "Я тихо-тихо пiдглядаю,
;; І тiшуся собi, як бачу то,
;; Шо страшить i не пiдпускає,
;; А iншi п’ють тебе, як воду пiсок."
;; -- Андрій Кузьменко, L.V.
;;; Code:
(defgroup lv nil
"The other echo area."
:group 'minibuffer
:group 'hydra)
(defcustom lv-use-separator nil
"Whether to draw a line between the LV window and the Echo Area."
:group 'lv
:type 'boolean)
(defface lv-separator
'((((class color) (background light)) :background "grey80")
(((class color) (background dark)) :background "grey30"))
"Face used to draw line between the lv window and the echo area.
This is only used if option `lv-use-separator' is non-nil.
Only the background color is significant."
:group 'lv)
(defvar lv-wnd nil
"Holds the current LV window.")
(defun lv-window ()
"Ensure that LV window is live and return it."
(if (window-live-p lv-wnd)
lv-wnd
(let ((ori (selected-window))
buf)
(prog1 (setq lv-wnd
(select-window
(let ((ignore-window-parameters t))
(split-window
(frame-root-window) -1 'below))))
(if (setq buf (get-buffer " *LV*"))
(switch-to-buffer buf)
(switch-to-buffer " *LV*")
(set-window-hscroll lv-wnd 0)
(setq window-size-fixed t)
(setq mode-line-format nil)
(setq cursor-type nil)
(set-window-dedicated-p lv-wnd t)
(set-window-parameter lv-wnd 'no-other-window t))
(select-window ori)))))
(defvar golden-ratio-mode)
(defvar lv-force-update nil
"When non-nil, `lv-message' will refresh even for the same string.")
(defun lv-message (format-string &rest args)
"Set LV window contents to (`format' FORMAT-STRING ARGS)."
(let* ((str (apply #'format format-string args))
(n-lines (cl-count ?\n str))
deactivate-mark
golden-ratio-mode)
(with-selected-window (lv-window)
(unless (and (string= (buffer-string) str)
(null lv-force-update))
(delete-region (point-min) (point-max))
(insert str)
(when (and (window-system) lv-use-separator)
(unless (looking-back "\n" nil)
(insert "\n"))
(insert
(propertize "__" 'face 'lv-separator 'display '(space :height (1)))
(propertize "\n" 'face 'lv-separator 'line-height t)))
(set (make-local-variable 'window-min-height) n-lines)
(setq truncate-lines (> n-lines 1))
(let ((window-resize-pixelwise t)
(window-size-fixed nil))
(fit-window-to-buffer nil nil 1)))
(goto-char (point-min)))))
(defun lv-delete-window ()
"Delete LV window and kill its buffer."
(when (window-live-p lv-wnd)
(let ((buf (window-buffer lv-wnd)))
(delete-window lv-wnd)
(kill-buffer buf))))
(provide 'lv)
;;; lv.el ends here

@ -0,0 +1,27 @@
;;; id-manager-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
;;;### (autoloads nil "id-manager" "id-manager.el" (22501 4892 376900
;;;;;; 628000))
;;; Generated autoloads from id-manager.el
(autoload 'idm-open-list-command "id-manager" "\
Load the id-password DB and open a list buffer.
\(fn &optional DB)" t nil)
(autoload 'idm-helm-command "id-manager" "\
Helm interface for id-manager.
\(fn)" t nil)
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; End:
;;; id-manager-autoloads.el ends here

@ -0,0 +1 @@
(define-package "id-manager" "20160425.216" "id-password management" 'nil :keywords '("password" "convenience"))

@ -0,0 +1,831 @@
;;; id-manager.el --- id-password management
;; Copyright (C) 2009, 2010, 2011, 2013 SAKURAI Masashi
;; Time-stamp: <2015-06-06 12:38:31 sakurai>
;; Author: SAKURAI Masashi <m.sakurai atmark kiwanami.net>
;; Keywords: password, convenience
;; Package-Version: 20160425.216
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; ID-password management utility.
;; This utility manages ID-password list and generates passwords.
;; The ID-password DB is saved in the tab-separated file. The default
;; file name of the DB `idm-database-file' is "~/.idm-db.gpg".
;; The file format is following:
;; (name)^t(ID)^t(password)^t(Update date "YYYY/MM/DD")[^t(memo)]
;; . One can prepare an initial data or modify the data by hand or
;; the Excel.
;;
;; Implicitly, this elisp program expects that the DB file is
;; encrypted by the some GPG encryption elisp, such as EasyPG or
;; alpaca.
;;
;; Excuting the command `idm-open-list-command', you can open the
;; ID-password list buffer. Check the function `describe-bindings'.
;;; Installation:
;; To use this program, locate this file to load-path directory,
;; and add the following code to your .emacs.
;; ------------------------------
;; (require 'id-manager)
;; ------------------------------
;; If you have helm.el, bind `id-manager' to key,
;; like (global-set-key (kbd "M-7") 'id-manager).
;;; Setting example:
;; For EasyPG users:
;;
;; (autoload 'id-manager "id-manager" nil t)
;; (global-set-key (kbd "M-7") 'id-manager) ; helm UI
;; (setq epa-file-cache-passphrase-for-symmetric-encryption t) ; saving password
;; (setenv "GPG_AGENT_INFO" nil) ; non-GUI password dialog.
;; For alpaca users:
;;
;; (autoload 'id-manager "id-manager" nil t)
;; (global-set-key (kbd "M-7") 'id-manager) ; helm UI
;; (setq idm-db-buffer-save-function ; adjustment for alpaca.el
;; (lambda (file)
;; (set-visited-file-name file)
;; (alpaca-save-buffer))
;; idm-db-buffer-password-var ; if you are using `alpaca-cache-passphrase'.
;; 'alpaca-passphrase)
;;; Current implementation:
;; This program generates passwords by using external command:
;; `idm-gen-password-cmd'. If you have some better idea, please let me
;; know.
;;
;; I think that this program makes lazy password management more
;; securely. But I'm not sure that this program is secure enough.
;; I'd like many people to check and advice me.
;;; Code:
(eval-when-compile (require 'cl))
(require 'widget)
(eval-when-compile (require 'wid-edit))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Setting
(defvar idm-database-file "~/.idm-db.gpg"
"Encripted id-password database file. The file name may
end with '.gpg' for encryption by the GnuPG.")
(defvar idm-gen-password-cmd
"head -c 10 < /dev/random | uuencode -m - | tail -n 2 |head -n 1 | head -c10"
"[String] Password generation command. If a function symbol or
lambda whose receive no parameter is set to this variable,
id-manager calls the function to generate the password.")
;; "openssl rand 32 | uuencode -m - | tail -n 2 |head -n 1 | head -c10"
;; ...any other password generation ?
(defvar idm-copy-action
(lambda (text) (x-select-text text))
"Action for copying a password text into clipboard.")
(defvar idm-db-buffer-load-function
'find-file-noselect
"File loading function. This function has one argument FILENAME and returns a buffer,
like `find-file-noselect'. Some decryption should work at this
function.")
(defvar idm-db-buffer-save-function
'write-file
"File saving function. This function has one arguments FILENAME,
like `write-file'. Some encryption should work at this
function.")
(defvar idm-db-buffer-password-var nil
"Password variable. See the text of settings for alpaca.el. ")
(defvar idm-clipboard-expire-time-sec 5
"Expire time for the clipboard content.")
(defvar idm-clipboard-expire-timer nil
"The timer object that will expire the clipboard content.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Macros
(defmacro idm--aif (test-form then-form &rest else-forms)
`(let ((it ,test-form))
(if it ,then-form ,@else-forms)))
(put 'idm--aif 'lisp-indent-function 2)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Management API
(defun idm-gen-password ()
"Generate a password."
(cond
((functionp idm-gen-password-cmd)
(funcall idm-gen-password-cmd))
((stringp idm-gen-password-cmd)
(let ((buf (get-buffer-create " *idm-work*")) ret)
(call-process-shell-command
idm-gen-password-cmd
nil buf nil)
(with-current-buffer buf
(setq ret (buffer-string)))
(kill-buffer buf)
ret))
(t (error "idm-gen-password-cmd is set to wrong value. [%S]"
idm-gen-password-cmd))))
;; record struct
(defstruct (idm-record
(:constructor make-idm-record-bylist
(name account-id password update-time
&optional memo)))
name account-id password update-time memo)
(defun idm-load-db ()
"Load the DB file `idm-database-file' and make a DB object."
(let* ((coding-system-for-read 'utf-8)
(tmpbuf
(funcall idm-db-buffer-load-function
(expand-file-name idm-database-file)))
db-object)
(unwind-protect
(let ((db (idm--make-db tmpbuf)))
(when idm-db-buffer-password-var
(with-current-buffer tmpbuf
(funcall db 'file-password
(symbol-value idm-db-buffer-password-var))))
db)
(kill-buffer tmpbuf))))
(defun idm--save-db (records file-vars &optional password)
"Save RECORDS into the DB file `idm-database-file'. This
function is called by a DB object."
(let ((coding-system-for-write 'utf-8)
(tmpbuf (get-buffer-create " *idm-tmp*")))
(with-current-buffer tmpbuf
(erase-buffer)
(goto-char (point-min))
(loop for (sym . v) in file-vars do
(set (make-local-variable sym) v))
(insert (format
";; -*- %s -*-"
(loop for (n . v) in file-vars concat
(format "%s: %S; " n v))) "\n")
(dolist (i records)
(insert (concat (idm-record-name i) "\t"
(idm-record-account-id i) "\t"
(idm-record-password i) "\t"
(idm-record-update-time i)
(idm--aif (idm-record-memo i)
(concat "\t" it))
"\n")))
(when password
(set idm-db-buffer-password-var password))
(funcall idm-db-buffer-save-function idm-database-file)
(kill-buffer tmpbuf))))
(defun idm--make-db (tmpbuf)
"Build a database management object from the given buffer text.
The object is a dispatch function. One can access the methods
`funcall' with the method name symbol and some method arguments."
(lexical-let (records
(db-modified nil)
file-vars ; file variables
file-password) ; password for alpaca
(setq file-vars (buffer-local-value 'file-local-variables-alist tmpbuf))
(idm--each-line
tmpbuf
(lambda (line)
(cond
((string-match "^;; " line) ; file variables
) ; ignore
(t ; entry lines
(let ((cols (split-string line "\t")))
(if (or (= 4 (length cols))
(= 5 (length cols)))
(push (apply 'make-idm-record-bylist cols)
records)))))))
(lambda (method &rest args)
(cond
((eq method 'get) ; get record object by name
(lexical-let ((name (car args)) ret)
(mapc (lambda (i)
(if (equal name (idm-record-name i))
(setq ret i)))
records)
ret))
((eq method 'get-all-records) records) ; get-all-records
((eq method 'add-record) ; add-record
(progn
(lexical-let* ((record (car args))
(name (idm-record-name record)))
(setf records (loop for i in records
unless (equal (idm-record-name i) name)
collect i))
(push record records)
(setq db-modified t))))
((eq method 'delete-record-by-name) ; delete-record-by-name
(lexical-let ((name (car args)))
(setf records (loop for i in records
unless (equal (idm-record-name i) name)
collect i))
(setq db-modified t)))
((eq method 'set-modified) ; set-modified
(setq db-modified t))
((eq method 'save) ; save
(when db-modified
(idm--save-db records file-vars file-password)
(setq db-modified nil)))
((eq method 'file-password) ; file-password
(setq file-password (car args)) nil)
(t (error "Unknown method [%s]" method))))))
(defun idm--each-line (buf task)
"Execute the function TASK with each lines in the buffer
`buf'. This function is called by `idm--make-db'."
(with-current-buffer buf
(goto-char (point-min))
(unless (eobp)
(while
(let ((line
(buffer-substring-no-properties
(line-beginning-position)
(line-end-position))))
(funcall task line)
(forward-line 1)
(not (eobp)))))))
(defun idm--strtime (time)
"Translate emacs time to formatted string."
(format-time-string "%Y/%m/%d" time))
(defun idm--parsetime (str)
"Translate formatted string to emacs time."
(when (string-match "\\([0-9]+\\)\\/\\([0-9]+\\)\\/\\([0-9]+\\)" str)
(apply 'encode-time
(let (ret)
(dotimes (i 6)
(push (string-to-number (match-string (+ i 1) str)) ret))
ret))))
(defun idm--message (&rest args)
"Show private text in the echo area without message buffer
recording."
(let (message-log-max)
(apply 'message args)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; GUI
(defvar idm-show-password nil
"Display passwords switch. If this variable is non-nil, some
functions show the password as plain text.")
(defun idm-toggle-show-password ()
"Toggle the switch for display passwords. This function does not update views."
(interactive)
(setq idm-show-password (not idm-show-password)))
(defun idm-add-record-dialog (db on-ok-func)
"Make an account record interactively and register it with DB."
(lexical-let ((db db) (on-ok-func on-ok-func))
(idm-edit-record-dialog
(make-idm-record)
(lambda (r)
(cond
((funcall db 'get (idm-record-name r))
(idm-edit-record-dialog r on-ok-func nil "Record [%s] exists!"))
(t (funcall on-ok-func r)))))))
(defun idm-edit-record-dialog (record on-ok-func &optional password-show error-msg)
"Pop up the edit buffer for the given record.
If the user pushes the `ok' button, the function
`idm-edit-record-dialog-commit' is called."
(let ((before-win-num (length (window-list)))
(main-buf (current-buffer))
(edit-buf (idm--edit-record-dialog-buffer record on-ok-func password-show error-msg)))
(with-current-buffer edit-buf
(set (make-local-variable 'idm-before-win-num) before-win-num)
(set (make-local-variable 'idm-main-buf) main-buf))
(pop-to-buffer edit-buf)))
(defun idm--edit-record-dialog-buffer (record on-ok-func &optional password-show error-msg)
"Return the editing buffer for the given record."
(let ((buf (get-buffer-create "*idm-record-dialog*")))
(with-current-buffer buf
(let ((inhibit-read-only t)) (erase-buffer))
(kill-all-local-variables)
(remove-overlays)
(widget-insert
(format "Record: %s\n\n"
(idm--aif (idm-record-name record) it "(new record)")))
(when error-msg
(widget-insert
(let ((text (substring-no-properties error-msg)))
(put-text-property 0 (length text) 'face 'font-lock-warning-face text)
text))
(widget-insert "\n\n"))
(lexical-let
((record record) (on-ok-func on-ok-func) (error-msg error-msg)
fname fid fpassword fmemo cbshow bgenerate fields)
;; create dialog fields
(setq fname (widget-create
'editable-field
:size 20 :format " Account Name: %v \n"
:value (or (idm-record-name record) ""))
fid (widget-create
'editable-field
:size 20 :format " Account ID : %v \n"
:value (or (idm-record-account-id record) ""))
fpassword (widget-create
'editable-field
:size 20 :format " Password: %v \n"
:secret (and (not password-show) ?*)
:value (or (idm-record-password record) "")))
(widget-insert " (show password ")
(setq cbshow
(widget-create 'checkbox :value password-show))
(widget-insert " ) ")
(setq bgenerate
(widget-create 'push-button "Generate"))
(widget-insert "\n")
(setq fmemo (widget-create
'editable-field
:size 20
:format " Memo : %v \n"
:value (or (idm-record-memo record) "")))
(setq fields
(list 'name fname 'id fid 'password fpassword 'memo fmemo 'password-show cbshow))
;; OK / Cancel
(widget-insert "\n")
(widget-create
'push-button
:notify (lambda (&rest ignore)
(idm-edit-record-dialog-commit record fields on-ok-func))
"Ok")
(widget-insert " ")
(widget-create
'push-button
:notify (lambda (&rest ignore)
(idm-edit-record-kill-buffer))
"Cancel")
(widget-insert "\n")
;; add event actions
(widget-put cbshow
:notify
(lambda (&rest ignore)
(let ((current-record
(make-idm-record
:name (widget-value fname)
:account-id (widget-value fid)
:password (widget-value fpassword)
:memo (widget-value fmemo)))
(password-show (widget-value cbshow)))
(message "CLICK : %s" password-show)
(idm-edit-record-kill-buffer)
(idm-edit-record-dialog
current-record on-ok-func password-show error-msg)
(widget-forward 3))))
(widget-put bgenerate
:notify
(lambda (&rest ignore)
(widget-value-set fpassword (idm-gen-password))
(widget-setup)))
;; setup widgets
(use-local-map widget-keymap)
(widget-setup)
(goto-char (point-min))
(widget-forward 1)))
buf))
(defun idm-edit-record-dialog-commit (record fields on-ok-func)
"edit-record-dialog-commit"
(let ((name-value (widget-value (plist-get fields 'name))))
(cond
((or (null name-value)
(string-equal "" name-value))
(idm-edit-record-kill-buffer)
(idm-edit-record-dialog
record on-ok-func
(widget-value (plist-get fields 'password-show))
"Should not be empty!"))
(t
(setf (idm-record-name record) name-value
(idm-record-account-id record)
(widget-value (plist-get fields 'id))
(idm-record-password record)
(widget-value (plist-get fields 'password))
(idm-record-memo record)
(widget-value (plist-get fields 'memo))
(idm-record-update-time record) (idm--strtime (current-time)))
(idm-edit-record-kill-buffer)
(funcall on-ok-func record)))))
(defun idm-edit-record-kill-buffer ()
"edit-record-kill-buffer"
(interactive)
(let ((cbuf (current-buffer))
(win-num (length (window-list)))
(next-win (get-buffer-window idm-main-buf)))
(when (and (not (one-window-p))
(> win-num idm-before-win-num))
(delete-window))
(kill-buffer cbuf)
(when next-win (select-window next-win))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; id-password list buffer
(defun idm-open-list (db)
"Open id-password list buffer."
(lexical-let ((buf (get-buffer-create "ID-Password List"))
(db db))
(with-current-buffer buf
(idm--layout-list db)
(idm--set-list-mode db)
)
(set-buffer buf)))
(defun idm--put-text-property (text attr val)
"Put a text property on the whole text."
(put-text-property 0 (length text) attr val text) text)
(defun idm--put-record-id (text id)
"Put the record id with the text property `idm-record-id'."
(idm--put-text-property text 'idm-record-id id))
(defun idm--get-record-id ()
"Get the record id on the current point."
(get-text-property (point) 'idm-record-id))
(defun idm--layout-list (db &optional order)
"Erase the content in the current buffer and insert record
lines. ORDER is sort key, which can be `time', `name' and `id'."
(unless order
(setq order 'name))
(let* ((name-max (length "Account Name"))
(id-max (length "ID"))
(pw-max (length "Password"))
(pw-mask "********")
(pw-getter (lambda (record)
(if idm-show-password
(idm-record-password record)
pw-mask)))
(cut (lambda (str) (substring str 0 (min (length str) 20))))
numcolm (count 1)
(line-format "%%-%ds|%%-10s | %%-%ds | %%-%ds : %%-%ds : %%s\n")
(records (funcall db 'get-all-records)))
(when records
(setq numcolm (fceiling (log10 (length records))))
(dolist (i records)
(setq name-max (min 20 (max name-max (length (idm-record-name i))))
id-max (min 20 (max id-max (length (idm-record-account-id i))))
pw-max (max pw-max (length (funcall pw-getter i)))))
(setq line-format (format line-format numcolm name-max id-max pw-max))
(let ((buffer-read-only nil) (prev-line (line-number-at-pos)))
(erase-buffer)
(goto-char (point-min))
(insert (format line-format
" " "Time" "Name" "ID" "Password" "Memo"))
(insert (make-string (- (window-width) 1) ?-) "\n")
(dolist (i (idm--sort-records records order))
(insert
(idm--put-record-id
(format line-format
count
(idm-record-update-time i)
(funcall cut (idm-record-name i))
(funcall cut (idm-record-account-id i))
(funcall pw-getter i)
(idm-record-memo i))
(idm-record-name i)))
(incf count))
(goto-char (point-min))
(when (< 1 prev-line)
(ignore-errors
(forward-line (1- prev-line))))))))
(defun idm--sort-records (records order)
"Sort records by the key ORDER, which can be `time', `name',
`memo' and `id'."
(let*
((comparator
(lambda (ref)
(lexical-let ((ref ref))
(lambda (i j)
(let ((ii (funcall ref i))
(jj (funcall ref j)))
(cond
((string= ii jj) 0)
((string< ii jj) -1)
(t 1)))))))
(to-bool
(lambda (f)
(lexical-let ((f f))
(lambda (i j)
(< (funcall f i j) 0)))))
(cmp-id (funcall comparator 'idm-record-account-id))
(cmp-name (funcall comparator 'idm-record-name))
(cmp-time (funcall comparator 'idm-record-update-time))
(cmp-memo (funcall comparator 'idm-record-memo))
(chain
(lambda (a b)
(lexical-let ((a a) (b b))
(lambda (i j)
(let ((v (funcall a i j)))
(if (= 0 v)
(funcall b i j)
v)))))))
(sort
(loop for i in records collect i) ; copy-list
(cond
((eq order 'id) ; id -> id, name
(funcall to-bool (funcall chain cmp-id cmp-name)))
((eq order 'name) ; name -> name
(funcall to-bool cmp-name))
((eq order 'time) ; time -> time, name
(funcall to-bool (funcall chain cmp-time cmp-name)))
((eq order 'memo) ; memo -> time, name
(funcall to-bool (funcall chain cmp-memo cmp-name)))
(t ; default
(funcall to-bool cmp-name))))))
(defvar idm-list-mode-map nil
"Keymap for `idm-list-mode'.")
(setq idm-list-mode-map nil) ; for debug
(unless idm-list-mode-map
(setq idm-list-mode-map (make-sparse-keymap))
(mapc (lambda (i)
(define-key idm-list-mode-map (car i) (cdr i)))
`(("q" . idm-list-mode-quit)
("Q" . idm-list-mode-quit-without-save)
("n" . next-line)
("p" . previous-line)
("j" . next-line)
("k" . previous-line)
("d" . idm-list-mode-delete)
("-" . idm-list-mode-delete)
("e" . idm-list-mode-edit-dialog)
("m" . idm-list-mode-edit-dialog)
("a" . idm-list-mode-add)
("+" . idm-list-mode-add)
("u" . idm-list-mode-reload)
("r" . idm-list-mode-reload)
("T" . idm-list-mode-sortby-time)
("N" . idm-list-mode-sortby-name)
("I" . idm-list-mode-sortby-id)
("M" . idm-list-mode-sortby-memo)
("S" . idm-list-mode-toggle-show-password)
("s" . idm-list-mode-show-password)
([return] . idm-list-mode-copy)
)))
(defun idm-list-mode-copy ()
(interactive)
(idm--aif (idm--get-record-id)
(let ((record (funcall idm-db 'get it)))
(when record
(idm--copy-password-action record)))))
(defun idm--copy-password-action (record)
(interactive)
(message (concat "Copied the password for the account ID: "
(idm-record-account-id record)))
(funcall idm-copy-action (idm-record-password record))
(idm-set-clipboard-expiry))
(defun idm--copy-id-action (record)
(interactive)
(message (concat "Copied account ID: "
(idm-record-account-id record)))
(funcall idm-copy-action (idm-record-account-id record))
(idm-set-clipboard-expiry))
(defun idm-set-clipboard-expiry ()
(when idm-clipboard-expire-timer
(cancel-timer idm-clipboard-expire-timer))
(when idm-clipboard-expire-time-sec
(setq idm-clipboard-expire-timer
(run-at-time idm-clipboard-expire-time-sec nil 'idm-expire-clipboard))))
(defun idm-expire-clipboard ()
"Clear clipboard"
(funcall idm-copy-action "")
(idm--message "ID Manager: expired."))
(defun idm-list-mode-sortby-id ()
(interactive)
(idm--layout-list idm-db 'id))
(defun idm-list-mode-sortby-name ()
(interactive)
(idm--layout-list idm-db 'name))
(defun idm-list-mode-sortby-time ()
(interactive)
(idm--layout-list idm-db 'time))
(defun idm-list-mode-sortby-memo ()
(interactive)
(idm--layout-list idm-db 'memo))
(defun idm-list-mode-reload ()
"Reload the id-password database file."
(interactive)
(setq idm-db (idm-load-db))