emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] Leveraging the invisible attribute to hide complete


From: Eric Johnson
Subject: [emacs-wiki-discuss] Leveraging the invisible attribute to hide completed tasks
Date: Tue, 28 Jun 2005 00:20:26 -0400

Hi -

Whenever I mark a task as complete, it gets marked up with the
completion date with some simple elisp like this.

(defadvice planner-task-done (after eej activate)
  (planner-copy-or-move-task (planner-get-current-date-filename) t))

Now I'm trying to customize planner a little bit more by then marking
the completed tasks as invisible if they are more than X days old. 
That way my display is only cluttered by all the amazing work I've
completed over the past week and not for all time.

I've been trying to find the right primitive to mark the text
invisible, but I've been foiled by something deep and mysterious about
planner mode that I'm not understanding.

The primitive I've been toying with has been

  (put-text-property beg end 'invisible t)

This works fine in most regular modes, but not planner mode.  My
attempt at doing the same with overlays has been equally challenged. 
My brute force attempt made no visible dent on the situation.

  (mapcar (lambda (x) (overlay-put x 'invisible t)) (overlays-in beg end))

Can anyone shed light on the correct way to make characters invisible
in planner mode?

-Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]