فهرست منبع

Agenda: Make block separator configurable.

The new option `org-agenda-block-separator' can be used for this.
Carsten Dominik 16 سال پیش
والد
کامیت
19421c2513
2فایلهای تغییر یافته به همراه20 افزوده شده و 1 حذف شده
  1. 6 0
      lisp/ChangeLog
  2. 14 1
      lisp/org-agenda.el

+ 6 - 0
lisp/ChangeLog

@@ -1,3 +1,9 @@
+2009-01-18  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-agenda.el (org-prepare-agenda): Use
+	`org-agenda-block-separator'.
+	(org-agenda-block-separator): New option.
+
 2009-01-17  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-export-latex.el (org-export-latex-tables): Call

+ 14 - 1
lisp/org-agenda.el

@@ -81,6 +81,15 @@ This is done by leaving out unnecessary lines."
   :group 'org-agenda
   :type 'boolean)
 
+(defcustom org-agenda-block-separator ?=
+  "The separator between blocks in the agenda.
+If this is a string, it will be used as the separator, with a newline added.
+If it is a character, it will be repeated to fill the window width."
+  :group 'org-agenda
+  :type '(choice
+	  (character)
+	  (string)))
+
 (defgroup org-agenda-export nil
  "Options concerning exporting agenda views in Org-mode."
  :tag "Org Agenda Export"
@@ -2041,7 +2050,11 @@ VALUE defaults to t."
 	(setq buffer-read-only nil)
 	(goto-char (point-max))
 	(unless (or (bobp) org-agenda-compact-blocks)
-	  (insert "\n" (make-string (window-width) ?=) "\n"))
+	  (insert "\n"
+		  (if (stringp org-agenda-block-separator)
+		      org-agenda-block-separator
+		    (make-string (window-width) org-agenda-block-separator))
+		  "\n"))
 	(narrow-to-region (point) (point-max)))
     (org-agenda-reset-markers)
     (setq org-agenda-contributing-files nil)