emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] [patch] planner-bookmark.el: add bookmark name as d


From: Dryice Liu
Subject: [emacs-wiki-discuss] [patch] planner-bookmark.el: add bookmark name as default note title
Date: Thu, 06 Jan 2005 12:52:39 +0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (berkeley-unix)

I found most of the time I make a note with planner-bookmark.el, the
note title is the same as the bookmark name. This patch will do that
automatically for me. Even if the title doesn't fit, deleting one line
is much easier :)

And you can set planner-bookmark-add-note-title-flag to nil to keep
the original behavior.

======================================================================
--- planner-bookmark.el.orig    Thu Dec 30 19:45:57 2004
+++ planner-bookmark.el Thu Jan  6 12:24:23 2005
@@ -51,7 +51,7 @@
 
 (defgroup planner-bookmark nil
   "Bookmark URL support for planner.el."
-  :prefix "planner-timeclock-summary"
+  :prefix "planner-bookmark"
   :group 'planner)
 
 (defcustom planner-bookmark-take-note-after-set-bookmark-flag
@@ -60,6 +60,12 @@
   :type 'boolean
   :group 'planner-bookmark)
 
+(defcustom planner-bookmark-add-note-title-flag
+  t
+  "Non-nil means add the bookmark name as the default note title"
+  :type 'boolean
+  :group 'planner-bookmark)
+
 ;;;; User variables stop here
 
 (defadvice bookmark-set (after planner-bookmark activate)
@@ -69,8 +75,11 @@
   (if planner-bookmark-take-note-after-set-bookmark-flag
       ;; bookmark can take us where we want. we don't need two URLs
       (let ((remember-annotation-functions nil))
-        (remember (concat "\n\n" (planner-bookmark-make-url
-                                  bookmark-current-bookmark))))))
+        (remember (concat 
+                  (if planner-bookmark-add-note-title-flag
+                      bookmark-current-bookmark)
+                  "\n\n" (planner-bookmark-make-url
+                          bookmark-current-bookmark))))))
 
 ;;;###autoload
 (defun planner-bookmark-annotation-from-bookmark ()
======================================================================

-- 
Cheers,
Dryice

http://dryice.3322.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]