Entry
[planner-el.git] / planner-w3m.el
blob649d31f2fcd4e8ec36487fa0f1ee93cd97656e5d
1 ;;; planner-w3m.el --- W3M integration for the Emacs Planner
3 ;; Copyright (C) 2001, 2008 Free Software Foundation, Inc.
5 ;; Author: John Wiegley <johnw@gnu.org>
6 ;; Keywords: planner, w3m
7 ;; URL: http://www.wjsullivan.net/PlannerMode.html
9 ;; This file is part of Planner. It is not part of GNU Emacs.
11 ;; Planner is free software; you can redistribute it and/or modify it
12 ;; under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 3, or (at your option)
14 ;; any later version.
16 ;; Planner is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ;; General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with Planner; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 ;; Boston, MA 02110-1301, USA.
26 ;;; Commentary:
28 ;; This module allows you to create tasks from a w3m buffer.
30 ;;; Contributors:
32 ;; John Sullivan provided a patch to check w3m-buffer-title.
34 ;;; Code:
36 (require 'w3m)
37 (require 'planner)
39 ;;;###autoload
40 (defun planner-w3m-annotation-from-w3m ()
41 "If called from a w3m page, return an annotation.
42 Suitable for use in `planner-annotation-functions'."
43 (when (eq major-mode 'w3m-mode)
44 (planner-make-link
45 w3m-current-url (or w3m-current-title
46 (w3m-buffer-title (current-buffer))) t)))
48 (add-hook 'planner-annotation-functions 'planner-w3m-annotation-from-w3m)
49 (custom-add-option 'planner-annotation-functions
50 'planner-w3m-annotation-from-w3m)
52 (provide 'planner-w3m)
54 ;;; planner-w3m.el ends here