Subject: bug#32366: 27.0.50; Assorted todo-mode bugs

From: Stephen Berman <[email-masked]>
Date: Sat, 04 Aug 2018 17:44:42 +0200

I have fixes for the following todo-mode bugs, which I will install in
master; this report is for reference in the commit message.

- Changing the month of an item's date string to a previous month is
  broken: e.g. when the month is February, typing `-4edm' fails to
  change it (but `-2edm' does change it to December), when January
  `-2edm' fails, etc.
- When typing `b' in a category and all preceding categories in the todo
  file are archived and todo-skip-archived-categories is non-nil, then
  instead of going from category 1 to the highest numbered category,
  Emacs hangs.
- With the done items section visible, deleting all done items leaves
  the separator overlay visible, and `v' (todo-toggle-view-done-items)
  does not correct this (only changing the category does).
- When item highlighting is enabled and point in the category is not a
  point-min, then after switching to another buffer and invoking
  todo-jump-to-category to return to the category with highlighting, now
  point is on the first item, yet it is not highlighted but the item
  that point was on before switching buffers is still highlighted; as
  soon as point moves (e.g. C-f), the highlighting is corrected.
- On typing `s' to save a filtered items virtual category, the buffer
  becomes writable and the buffer name changes to basename of file name
  instead of keeping the more descriptive name it had before saving.
- Invoking todo-insert-item in todo-archive-mode raises a
  wrong-type-argument error. 
- After invoking todo-find-filtered-items-file, using M-n or M-p to
  scroll through the history raises a wrong-type-argument error; also,
  the history includes irrelevant entries.
- In todo-filtered-items-mode typing `g' (todo-go-to-source-item) with
  point not on an item (i.e. at point-max) raises a wrong-type-argument
  error.
- In todo-filtered-items-mode typing `d' (todo-item-done) on an item
  deletes it; this key binding should not exist in this mode.
- In todo-filtered-items-mode typing `f' (todo-forward-category) or `b'
  (todo-backward-category) raises an arith-error; these key bindings
  should not exist in this mode.

In GNU Emacs 27.0.50 (build 11, x86_64-pc-linux-gnu, GTK+ Version 3.22.28)
 of 2018-08-04 built on rosalinde
Repository revision: b9e2a91ec5b005c624eaca32064dc60b5f3131f9
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Linux From Scratch