Update ChangeLog.
[remember-el.git] / remember-bibl.el
blobd132d77612cedca360f29ebb655daa234092c785
1 ;;; remember-bibl --- Bibl support for remember.el
3 ;; Copyright (C) 1999, 2000, 2001 John Wiegley
5 ;; Author: John Wiegley <johnw@gnu.org>
6 ;; Maintainer: Sacha Chua <sacha@free.net.ph>
7 ;; Created: 29 Mar 1999
8 ;; Version: $Version$
9 ;; Keywords: data memory todo pim bibliography
10 ;; URL: http://sacha.free.net.ph/notebook/emacs/emacs-wiki/remember-bibl.el
12 ;; This file is not part of GNU Emacs.
14 ;; This is free software; you can redistribute it and/or modify it under
15 ;; the terms of the GNU General Public License as published by the Free
16 ;; Software Foundation; either version 2, or (at your option) any later
17 ;; version.
19 ;; This is distributed in the hope that it will be useful, but WITHOUT
20 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 ;; for more details.
24 ;; You should have received a copy of the GNU General Public License
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
26 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
27 ;; MA 02111-1307, USA.
29 ;;; Commentary:
31 ;; You can get bibl-mode from
32 ;; http://ftp.azc.uam.mx/mirrors/gnu/emacs-lisp/bosullivan-packages/bibl-mode/
34 ;;; Code:
36 (require 'url)
37 (require 'bibl-mode)
38 (require 'bookmark)
40 ;;;###autoload
41 (defun remember-url ()
42 "Remember a URL in `bibl-mode' that is being visited with w3."
43 (interactive)
44 (require 'bibl-mode)
45 (save-excursion
46 (let ((url (url-view-url t))
47 (name (buffer-name))
48 (keywords (read-string "Keywords: "))
49 (desc (read-string "Description: ")))
50 (bibl-visit-create)
51 (insert name)
52 (forward-line 1) (end-of-line)
53 (insert keywords)
54 (forward-line 1) (end-of-line)
55 (insert desc)
56 (forward-line 1) (end-of-line)
57 (insert url)
58 (bibl-tidy-record)
59 (save-buffer)
60 (bury-buffer))))
62 ;;;###autoload
63 (defun remember-location ()
64 "Remember a bookmark location in `bibl-mode'."
65 (interactive)
66 (require 'bookmark)
67 (require 'bibl-mode)
68 (save-excursion
69 (let ((name (read-string "Title: "))
70 (keywords (read-string "Keywords: "))
71 (desc (read-string "Description: ")))
72 (bookmark-set name)
73 (bookmark-set-annotation name desc)
74 (bibl-visit-create)
75 (insert name)
76 (forward-line 1) (end-of-line)
77 (insert keywords)
78 (forward-line 1) (end-of-line)
79 (insert desc)
80 (forward-line 1) (end-of-line)
81 (insert (bookmark-get-filename name))
82 (bibl-tidy-record)
83 (bookmark-delete name)
84 (when remember-save-after-remembering (save-buffer))
85 (bury-buffer))))
89 (provide 'remember-bibl)
91 ;;; remember-bibl.el ends here