* empty titles - backtrace
@ 2011-04-13 8:15 Richard Riley
2011-04-13 12:12 ` [PATCH] Fix agenda display when headlines are missing Bernt Hansen
0 siblings, 1 reply; 4+ messages in thread
From: Richard Riley @ 2011-04-13 8:15 UTC (permalink / raw
To: Emacs-orgmode mailing list
Is not too rare for me to accidentally wipe or neglect to add a subject
line to a new journal/or entry. Of course I should have one - bUt
regardless, generating the agenda shouldnt fail if it comes across an
entry with no title as it can be hard to find the offending org
item. e.g
,----
| Debugger entered--Lisp error: (wrong-type-argument stringp nil)
| string-match("^ +" nil)
| org-format-agenda-item(nil nil #("Journal" 0 7 (fontified t org-category "Journal" face org-meta-line font-lock-fontified t)) (#("journal" 0 7 (inherited t))) #("<2011-04-13 Mi 10:00>" 0 20 (org-category #("Journal" 0 7 ...) keymap (keymap ... ... ...) mouse-face highlight org-no-flyspell t face org-date fontified t) 20 21 (org-category #("Journal" 0 7 ...) rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text) keymap (keymap ... ... ...) mouse-face highlight org-no-flyspell t face org-date fontified t)) "<2011-04-13.*?>")
| byte-code("\306 \203\n.\307\310\311\"\210\312 \210\313\225\203$.\b\314\315\313!\b\311 $U\204$.\307\310\311\"\210\n\2037.\316\v\n{\317\f#\2047.\307\310\311\"\210e.\x0e)Z].{.*\v\203I.\317\202M.\r\320 {.+.f\321U.,\322.-.*\"..\322./.*\".0.1\205p.\322.2.*\".3.1\205\205.\322.4.*\"\206\205.\322\323.*\".5.%.6\235.7.0\204\254.\x0e.\204\254.\x0e3\204\254.\x0e5\204\254.\x0e7\203\261.\x0e8\203\261.\307\310\324\"\210\322\325.+\"\203\301.\x0e+\326\211\225O.+\327.!.9\330.!.:\212\331\332\311\324#\204\333.\x0e;.<\202.\x01\326\224b\210\327 .=\333 .>\334\335!\210\315\313!.?\336.,\205\370.\x0e@.?.:.>.+.A&.\x16<\337.<!.#\340.<.B\341.9\342.=&.\210\340.<\311\343.#\344.:\304\f\345.%\346\347&\f\210.<.CB.C).D\203A.\350 \210\202E.\x0eEb\210\311\207" [d1 show-all e3 b3 date b0 org-at-date-range-p throw :skip nil org-agenda-skip 1 org-time-string-to-absolute match-string org-diary-sexp-entry "" point-at-eol 91 string-match "]-+\\'" t ">" 0 org-agenda-new-marker org-get-category re-search-backward "^\\*+ " org-get-tags-at looking-at "\\*+[ ]+\\([^.\n]+\\)" org-format-agenda-item org-get-priority org-add-props org-marker org-hd-marker priority org-category todo-state type "timestamp" outline-next-heading org-ds-keyword-length tmp timestr inactivep org-deadline-regexp deadlinep org-scheduled-regexp scheduledp org-agenda-include-inactive-timestamps ...] 13)
| org-agenda-get-timestamps()
`----
Where the item in question was:
,----
| ****
| :PROPERTIES:
| :DateCreated: <2011-04-13 Mi 10:00>
| :END:
|
| [[gnus:nntp%2BGwene:gwene.org.emacsen.planet][gnus:nntp+Gwene:gwene.org.emacsen.planet]]
`----
a nilstring check in org-format-agenda-item isnt enough.
So, is there a way to enforce a default value "org wide" subject if the user
accidentally deletes or doesnt enter an org subject?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Fix agenda display when headlines are missing
2011-04-13 8:15 empty titles - backtrace Richard Riley
@ 2011-04-13 12:12 ` Bernt Hansen
2011-04-13 12:22 ` Bernt Hansen
2011-04-15 11:55 ` [Accepted] " Carsten Dominik
0 siblings, 2 replies; 4+ messages in thread
From: Bernt Hansen @ 2011-04-13 12:12 UTC (permalink / raw
To: emacs-orgmode; +Cc: Richard Riley, Bernt Hansen
* 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix agenda display when headlines are missing
2011-04-13 12:12 ` [PATCH] Fix agenda display when headlines are missing Bernt Hansen
@ 2011-04-13 12:22 ` Bernt Hansen
2011-04-15 11:55 ` [Accepted] " Carsten Dominik
1 sibling, 0 replies; 4+ messages in thread
From: Bernt Hansen @ 2011-04-13 12:22 UTC (permalink / raw
To: emacs-orgmode; +Cc: Richard Riley
Bernt Hansen <bernt@norang.ca> writes:
> Hi Richard,
>
> This should if your issue. Please test it and report back.
^^
fix
> This patch is available at git://git.norang.ca/org-mode.git fix-agenda-empty-headines
>
> Regards,
> Bernt
-Bernt
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Accepted] Fix agenda display when headlines are missing
2011-04-13 12:12 ` [PATCH] Fix agenda display when headlines are missing Bernt Hansen
2011-04-13 12:22 ` Bernt Hansen
@ 2011-04-15 11:55 ` Carsten Dominik
1 sibling, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2011-04-15 11:55 UTC (permalink / raw
To: emacs-orgmode
Patch 748 (http://patchwork.newartisans.com/patch/748/) is now "Accepted".
Maintainer comment: none
This relates to the following submission:
http://mid.gmane.org/%3C1302696730-14326-1-git-send-email-bernt%40norang.ca%3E
Here is the original message containing the patch:
> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Fix agenda display when headlines are missing
> Date: Wed, 13 Apr 2011 17:12:10 -0000
> From: Bernt Hansen <bernt@norang.ca>
> X-Patchwork-Id: 748
> Message-Id: <1302696730-14326-1-git-send-email-bernt@norang.ca>
> To: emacs-orgmode@gnu.org
> Cc: Richard Riley <rileyrg@googlemail.com>, Bernt Hansen <bernt@norang.ca>
>
> * 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-15 12:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-13 8:15 empty titles - backtrace Richard Riley
2011-04-13 12:12 ` [PATCH] Fix agenda display when headlines are missing Bernt Hansen
2011-04-13 12:22 ` Bernt Hansen
2011-04-15 11:55 ` [Accepted] " Carsten Dominik
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.