emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.ch.brand@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [PATCH] Allow to disable the agenda block separator per block
Date: Fri, 3 Jun 2011 21:13:20 +0200	[thread overview]
Message-ID: <BANLkTim+hf5BXk+NxFpm=nEU-7sR9mBY=w@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 607 bytes --]

* org-agenda.el (org-agenda-compact-blocks): Improve docstring.
(org-agenda-block-separator): Add nil to docstring and customization.
(org-prepare-agenda): Skip agenda block separator additionally if
org-agenda-block-separator is nil.
(org-agenda-overriding-header): Improve docstring.

This change allows to disable the agenda block separator only and also
per block only.  (The variable org-agenda-compact-blocks non-nil
disables agenda block separators together with the line containing the
agenda span name and week number and does this globally for all blocks
and all custom agenda commands.)

Michael

[-- Attachment #2: 0001-Allow-to-disable-the-agenda-block-separator-per-bloc.patch --]
[-- Type: application/octet-stream, Size: 2878 bytes --]

From 8b9a2b5ec2cd579b5b5a4d7e8fa451fc72a3d579 Mon Sep 17 00:00:00 2001
From: Michael Brand <michael.ch.brand@gmail.com>
Date: Fri, 3 Jun 2011 21:09:46 +0200
Subject: [PATCH] Allow to disable the agenda block separator per block

* org-agenda.el (org-agenda-compact-blocks): Improve docstring.
(org-agenda-block-separator): Add nil to docstring and customization.
(org-prepare-agenda): Skip agenda block separator additionally if
org-agenda-block-separator is nil.
(org-agenda-overriding-header): Improve docstring.

This change allows to disable the agenda block separator only and also
per block only.  (The variable org-agenda-compact-blocks non-nil
disables agenda block separators together with the line containing the
agenda span name and week number and does this globally for all blocks
and all custom agenda commands.)
---
 lisp/org-agenda.el |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 65f37d4..13f39d7 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -89,16 +89,20 @@ only needed when the text to be killed contains more than N non-white lines."
 
 (defcustom org-agenda-compact-blocks nil
   "Non-nil means make the block agenda more compact.
-This is done by leaving out unnecessary lines."
+This is done globally by leaving out lines like the agenda span
+name and week number or the separator 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."
+If it is a character, it will be repeated to fill the window width.
+If nil the separator is disabled.  In `org-agenda-custom-commands' this
+addresses the separator between the current and the previous block."
   :group 'org-agenda
   :type '(choice
+	  (const :tag "Disabled" nil)
 	  (character)
 	  (string)))
 
@@ -3030,7 +3034,8 @@ the global options and expect it to be applied to the entire view.")
       (progn
 	(setq buffer-read-only nil)
 	(goto-char (point-max))
-	(unless (or (bobp) org-agenda-compact-blocks)
+	(unless (or (bobp) org-agenda-compact-blocks
+		    (not org-agenda-block-separator))
 	  (insert "\n"
 		  (if (stringp org-agenda-block-separator)
 		      org-agenda-block-separator
@@ -4111,7 +4116,7 @@ This is basically a temporary global variable that can be set and then
 used by user-defined selections using `org-agenda-skip-function'.")
 
 (defvar org-agenda-overriding-header nil
-  "When this is set during todo and tags searches, will replace header.
+  "When set during agenda, todo and tags searches it replaces the header.
 This variable should not be set directly, but custom commands can bind it
 in the options section.")
 
-- 
1.7.4.2


             reply	other threads:[~2011-06-03 19:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 19:13 Michael Brand [this message]
2011-07-01  8:14 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTim+hf5BXk+NxFpm=nEU-7sR9mBY=w@mail.gmail.com' \
    --to=michael.ch.brand@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).