emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: emacs-orgmode@gnu.org
Cc: Richard Riley <rileyrg@googlemail.com>, Bernt Hansen <bernt@norang.ca>
Subject: [PATCH] Fix agenda display when headlines are missing
Date: Wed, 13 Apr 2011 08:12:10 -0400	[thread overview]
Message-ID: <1302696730-14326-1-git-send-email-bernt@norang.ca> (raw)
In-Reply-To: <l5wriya7nw.fsf@news.eternal-september.org>

* lisp/org-agenda.el (org-agenda-get-timestamps): Fix agenda display when headlines are missing

The following entry breaks the agenda display.

,----
| ****
|         :PROPERTIES:
|         :DateCreated: <2011-04-13 Mi 10:00>
|         :END:
|
| [[gnus:nntp%2BGwene:gwene.org.emacsen.planet][gnus:nntp+Gwene:gwene.org.emacsen.planet]]
`----

Provide the empty string as the headline if the search for the
headline returns nil.  org-format-agenda-items requires a string for
the headline parameter.
---
Hi Richard,

This should if your issue.  Please test it and report back.
This patch is available at git://git.norang.ca/org-mode.git fix-agenda-empty-headines

Regards,
Bernt


 lisp/org-agenda.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 5571838..768c417 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4710,7 +4710,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
 	    (setq hdmarker (org-agenda-new-marker)
 		  tags (org-get-tags-at))
 	    (looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
-	    (setq head (match-string 1))
+	    (setq head (or (match-string 1) ""))
 	    (setq txt (org-format-agenda-item
 		       (if inactivep org-agenda-inactive-leader nil)
 		       head category tags timestr
-- 
1.7.5.rc0.100.gcb35c0

  reply	other threads:[~2011-04-13 12:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13  8:15 empty titles - backtrace Richard Riley
2011-04-13 12:12 ` Bernt Hansen [this message]
2011-04-13 12:22   ` [PATCH] Fix agenda display when headlines are missing Bernt Hansen
2011-04-15 11:55   ` [Accepted] " Carsten Dominik

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=1302696730-14326-1-git-send-email-bernt@norang.ca \
    --to=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=rileyrg@googlemail.com \
    /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).