worg.el 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. ;;; worg.el --- this is code for Worg
  2. ;;
  3. ;; Copyright 2008 Bastien Guerry
  4. ;;
  5. ;; Emacs Lisp Archive Entry
  6. ;; Filename: worg.el
  7. ;; Version: 0.1
  8. ;; Author: Bastien Guerry <bzg AT altern DOT org>
  9. ;; Maintainer: Bastien Guerry <bzg AT altern DOT org>
  10. ;; Keywords: org, wp, toc
  11. ;; Description: Shows a browsable table of contents for Org buffer
  12. ;; URL: http://www.cognition.ens.fr/~guerry/u/org-toc.el
  13. ;;
  14. ;; This program is free software; you can redistribute it and/or modify
  15. ;; it under the terms of the GNU General Public License as published by
  16. ;; the Free Software Foundation; either version 3, or (at your option)
  17. ;; any later version.
  18. ;;
  19. ;; This program is distributed in the hope that it will be useful,
  20. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. ;; GNU General Public License for more details.
  23. ;;
  24. ;; You should have received a copy of the GNU General Public License
  25. ;; along with this program; if not, write to the Free Software
  26. ;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  27. ;;
  28. ;;; Commentary:
  29. ;;
  30. ;; This file provides dynamic blocks for editing Worg pages.
  31. ;; See the Worg project here: http://repo.or.cz/w/Worg.git
  32. ;;
  33. ;; Put this file into your load-path and the following into your ~/.emacs:
  34. ;; (require 'worg)
  35. ;;
  36. ;;; Code:
  37. (eval-when-compile
  38. (require 'cl))
  39. (defun org-dblock-write:timestamp (params)
  40. "Insert a simple timestamp.
  41. Params are: string (like \"Updated: \"
  42. format (the formatting string)"
  43. (let ((string (or (plist-get params :string) "Updated: "))
  44. (time-format (or (plist-get params :format)
  45. (car org-time-stamp-formats))))
  46. (insert string (format-time-string time-format))))
  47. (provide 'worg)
  48. ;;; User Options, Variables
  49. ;;; worg.el ends here