[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-wiki-discuss] Re: Some comments after using planner.el for a
From: |
Gary V. Vaughan |
Subject: |
Re: [emacs-wiki-discuss] Re: Some comments after using planner.el for a while |
Date: |
Wed, 26 May 2004 17:43:20 +0100 |
User-agent: |
Mozilla Thunderbird 0.6 (X11/20040502) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sacha Chua wrote:
| Niklas Morberg <address@hidden> writes:
| >
| >3 When publishing the wiki, it would be nice to have a
| > "today.html" file. That way I could use that as a start
| > page in my browser, and it would always have the current
| > day.
|
| I do that dynamically, but maybe something like that is part of
| planner-calendar...
(defsubst planner-calendar-today (&optional max-days)
~ "Return today or the first day before today with a day page."
~ (planner-calendar-prev-date
~ (planner-calendar-tomorrow (calendar-current-date))))
(defun planner-calendar-create-today-link (&optional name)
~ "Create a link to the newest published day page."
~ (let ((target-file (emacs-wiki-published-file (or name "today")))
~ (source-file (emacs-wiki-published-file
~ (planner-calendar-date-to-filename
~ (planner-calendar-today)))))
~ (when (file-exists-p target-file)
~ (funcall planner-delete-file-function target-file))
~ (shell-command
~ (format "ln -s %s %s" source-file target-file))))
(add-hook 'emacs-wiki-after-file-publish-hook
~ 'planner-create-today-link nil t)
Let me know if it works and I'll commit it.
| >4 The "day" pages clutter my Plans directory quite a bit.
| > Being able to hide them in a subdirectory would be nice.
|
| Hmm. Not quite sure how to go about doing this yet.
I'll eventually get round to patching planner to use my heirarchical
pages patch to store day pages as 2004/05/2004.05.26, so there'll be
just one directory per year cluttering the Plans directory.
But first I want to add code that requires unique names across all pages
in a wiki project.
Cheers,
Gary.
- --
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAtMkoFRMICSmD1gYRAj6DAJ9yW8WGk/Bs7j7gSmSIoJ441/gHLQCfb6yu
43L8feV3lcXTs+HQ5AQm2kM=
=pCSx
-----END PGP SIGNATURE-----