[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-wiki-discuss] splitting tasks
From: |
Jim Ottaway |
Subject: |
Re: [emacs-wiki-discuss] splitting tasks |
Date: |
Wed, 22 Mar 2006 16:30:13 +0000 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
thomas knoll <address@hidden> writes: > I had trouble
with tasks splitting and inserting in the middle of > other
tasks. But I haven't found a way to intentionally recreate the >
problem. The only two things I can think of that might have
something > to do with it are: > - I use long-lines-mode a lot
That looks like a likely candidate if tasks are long enough to be
wrapped: forward-line, which is used in quite a few planner
functions, will end up in the middle of a task. If this turns
out to be the cause, you could disable wrapping just for task
lines. There is a variable called `fill-nobreak-predicate' that
you can use to do that. In Emacs 22 it is a list so you could
have: (add-to-list
'fill-nobreak-predicate
#'(lambda ()
(and (eq major-mode 'planner-mode)
(save-excursion
(goto-char (planner-line-beginning-position))
(looking-at planner-task-regexp)))))
In Emacs < 22, I think it is not a list, and you would have to do
something like: (add-hook
'planner-mode-hook
#'(lambda ()
(set (make-local-variable 'fill-nobreak-predicate)
#'(lambda ()
(save-excursion
(goto-char (planner-line-beginning-position))
(looking-at planner-task-regexp))))))
[not tested!]
- My tasks are numbering themselves, but I don't have that turned on
in my .emacs (is it default now?)
It shouldn't be: planner-use-task-numbers defaults to nil.
--
Jim Ottaway