Browse Source

Don't throw error when `org-store-link' called on WL folder group.

David Maus 11 years ago
parent
commit
032b53ed13
2 changed files with 10 additions and 6 deletions
  1. 5 0
      lisp/ChangeLog
  2. 5 6
      lisp/org-wl.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2010-05-12  David Maus  <dmaus@ictsoc.de>
+
+	* org-wl.el (org-wl-store-link-folder): Don't throw error when
+	called on WL folder group.
+
 2010-05-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.el (org-replace-escapes): Make sure the cdr is not nil.

+ 5 - 6
lisp/org-wl.el

@@ -151,12 +151,11 @@ ENTITY is a message entity."
 	 (link (org-make-link "wl:" folder)))
     (save-excursion
       (beginning-of-line)
-      (if (and (wl-folder-buffer-group-p)
-	       (looking-at wl-folder-group-regexp))
-	  (error "Cannot store link to folder group: %s" folder))
-      (org-store-link-props :type "wl" :description petname
-			    :link link)
-      link)))
+      (unless (and (wl-folder-buffer-group-p)
+		   (looking-at wl-folder-group-regexp))
+	(org-store-link-props :type "wl" :description petname
+			      :link link)
+	link))))
 
 (defun org-wl-store-link-message ()
   "Store a link to a WL message."