remember.texi: Update copyright notice and version.
[remember-el.git] / remember-bibl.el
blobe9b3326760a269f33ef04232f5633c9e603ea73c
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 ;; Keywords: data memory todo pim bibliography
9 ;; URL: http://gna.org/projects/remember-el/
11 ;; This file is not part of GNU Emacs.
13 ;; This is free software; you can redistribute it and/or modify it under
14 ;; the terms of the GNU General Public License as published by the Free
15 ;; Software Foundation; either version 2, or (at your option) any later
16 ;; version.
18 ;; This is distributed in the hope that it will be useful, but WITHOUT
19 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 ;; for more details.
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the
25 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
26 ;; MA 02111-1307, USA.
28 ;;; Commentary:
30 ;; You can get bibl-mode from
31 ;; http://ftp.azc.uam.mx/mirrors/gnu/emacs-lisp/bosullivan-packages/bibl-mode/
33 ;;; Code:
35 (require 'url)
36 (require 'bibl-mode)
37 (require 'bookmark)
39 ;;;###autoload
40 (defun remember-url ()
41 "Remember a URL in `bibl-mode' that is being visited with w3."
42 (interactive)
43 (require 'bibl-mode)
44 (save-excursion
45 (let ((url (url-view-url t))
46 (name (buffer-name))
47 (keywords (read-string "Keywords: "))
48 (desc (read-string "Description: ")))
49 (bibl-visit-create)
50 (insert name)
51 (forward-line 1) (end-of-line)
52 (insert keywords)
53 (forward-line 1) (end-of-line)
54 (insert desc)
55 (forward-line 1) (end-of-line)
56 (insert url)
57 (bibl-tidy-record)
58 (save-buffer)
59 (bury-buffer))))
61 ;;;###autoload
62 (defun remember-location ()
63 "Remember a bookmark location in `bibl-mode'."
64 (interactive)
65 (require 'bookmark)
66 (require 'bibl-mode)
67 (save-excursion
68 (let ((name (read-string "Title: "))
69 (keywords (read-string "Keywords: "))
70 (desc (read-string "Description: ")))
71 (bookmark-set name)
72 (bookmark-set-annotation name desc)
73 (bibl-visit-create)
74 (insert name)
75 (forward-line 1) (end-of-line)
76 (insert keywords)
77 (forward-line 1) (end-of-line)
78 (insert desc)
79 (forward-line 1) (end-of-line)
80 (insert (bookmark-get-filename name))
81 (bibl-tidy-record)
82 (bookmark-delete name)
83 (when remember-save-after-remembering (save-buffer))
84 (bury-buffer))))
88 (provide 'remember-bibl)
90 ;;; remember-bibl.el ends here