Re: [Orgmode] [misc-new-features 2/5] Bugfixes, documentation and custom options for org-checklist.
Hi James, I have applied this patch, with one modification: I added a 'no-erro argument to the (load a2ps-print) form, to make sure that people who have not installed a2ps-print.el can still use the other functionality in your package. Please let me know if this was not the right thing to do. - Carsten On Jul 13, 2009, at 10:27 AM, James TD Smith wrote: * contrib/lisp/org-checklist.el - Fix some problems with the print/export feature in org-checklist. - Add custom options for this module - Fix some interaction with a2ps - Only reset checkboxes if TODO state is done. * doc/org.texi - Add documentation for org-checklist * lisp/org.el - Add org-checklist to org-modules --- contrib/ChangeLog | 16 ++ contrib/lisp/org-checklist.el | 67 ++ +- lisp/org.el |1 + 3 files changed, 69 insertions(+), 15 deletions(-) diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 7e62df0..6a5c2a2 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,19 @@ +2009-07-12 James TD Smith ahktenz...@mohorovi.cc + + * lisp/org-checklist.el (org-checklist): Add a custom group for + org-checklist. The options are all for the unchecked items export + function. + (org-checklist-export-time-format): Allow customising the + timestamp appended to the saved unchecked items list + (org-checklist-export-function): Allow customising the output + format for the unchecked items list. + (org-checklist-export-params): Options for the exporter. + (org-checklist-a2ps-params): Printing options. + (org-make-checklist-export): Use values from custom vars. Printing + is now controlled by the PRINT_EXPORT property in the entry, and + the user is only asked if it is missing. Pass the switches to + a2ps-buffer properly. + 2009-06-20 Carsten Dominik carsten.domi...@gmail.com * README: List new file org-export-generic.el diff --git a/contrib/lisp/org-checklist.el b/contrib/lisp/org- checklist.el index 26d228f..4ebf91b 100644 --- a/contrib/lisp/org-checklist.el +++ b/contrib/lisp/org-checklist.el @@ -42,11 +42,37 @@ ;; ;;; Code: (require 'org) +(load a2ps-print) -(defvar export-time-format %Y%m%d%H%M - format of timestamp appended to export file) -(defvar export-function 'org-export-as-ascii - function used to prepare the export file for printing) +(defgroup org-checklist nil + Extended checklist handling for org + :tag Org-checklist + :group 'org) + +(defcustom org-checklist-export-time-format %Y%m%d%H%M + The format of timestamp appended to LIST_EXPORT_BASENAME to + make the name of the export file. + :link '(function-link format-time-string) + :group 'org-checklist + :type 'string) + +(defcustom org-checklist-export-function 'org-export-as-ascii + function used to prepare the export file for printing + :group 'org-checklist + :type '(radio (function-item :tag ascii text org-export-as-ascii) + (function-item :tag HTML org-export-as-html) + (function-item :tag LaTeX :value org-export-as-latex) + (function-item :tag XOXO :value org-export-as-xoxo))) + +(defcustom org-checklist-export-params nil + options for the export function file for printing + :group 'org-checklist + :type '(repeat string)) + +(defcustom org-checklist-a2ps-params nil + options for a2ps for printing + :group 'org-checklist + :type '(repeat string)) (defun org-reset-checkbox-state-maybe () Reset all checkboxes in an entry if the `RESET_CHECK_BOXES' property is set @@ -54,23 +80,30 @@ (if (org-entry-get (point) RESET_CHECK_BOXES) (org-reset-checkbox-state-subtree))) + (defun org-make-checklist-export () Produce a checklist containing all unchecked items from a list of checkbox items (interactive *) (if (org-entry-get (point) LIST_EXPORT_BASENAME) - (let* ((export-file (concat (org-entry-get (point) LIST_EXPORT_BASENAME) - - (format-time-string export-time-format) + (let* ((export-file (concat (org-entry-get (point) LIST_EXPORT_BASENAME nil) + - (format-time-string + org-checklist-export-time-format) .org)) +(print (case (org-entry-get (point) PRINT_EXPORT nil) + (( nil nil) nil) + (t t) + (nil (y-or-n-p Print list? exported-lines -title) +title Checklist export) (save-restriction (save-excursion (org-narrow-to-subtree) + (org-update-checkbox-count-maybe) (org-show-subtree) (goto-char (point-min)) - (if (looking-at org-complex-heading-regexp) - (setq title (match-string 4))) + (when (looking-at org-complex-heading-regexp) + (setq title
Re: [Orgmode] [misc-new-features 2/5] Bugfixes, documentation and custom options for org-checklist.
Hi Carsten, On 2009-08-03 16:47:55(+0200), Carsten Dominik wrote: I have applied this patch, with one modification: I added a 'no-erro argument to the (load a2ps-print) form, to make sure that people who have not installed a2ps-print.el can still use the other functionality in your package. Please let me know if this was not the right thing to do. Yes, that's fine. James -- |-James TD Smith-email/ahktenz...@mohorovi.cc-| ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [misc-new-features 2/5] Bugfixes, documentation and custom options for org-checklist.
I will apply this one tomorrow. Note that your changelog announces changes to org.texi that your patch don't contain. Thanks! James TD Smith ahktenz...@mohorovi.cc writes: * contrib/lisp/org-checklist.el - Fix some problems with the print/export feature in org-checklist. - Add custom options for this module - Fix some interaction with a2ps - Only reset checkboxes if TODO state is done. * doc/org.texi - Add documentation for org-checklist * lisp/org.el - Add org-checklist to org-modules --- contrib/ChangeLog | 16 ++ contrib/lisp/org-checklist.el | 67 +++- lisp/org.el |1 + 3 files changed, 69 insertions(+), 15 deletions(-) diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 7e62df0..6a5c2a2 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,19 @@ +2009-07-12 James TD Smith ahktenz...@mohorovi.cc + + * lisp/org-checklist.el (org-checklist): Add a custom group for + org-checklist. The options are all for the unchecked items export + function. + (org-checklist-export-time-format): Allow customising the + timestamp appended to the saved unchecked items list + (org-checklist-export-function): Allow customising the output + format for the unchecked items list. + (org-checklist-export-params): Options for the exporter. + (org-checklist-a2ps-params): Printing options. + (org-make-checklist-export): Use values from custom vars. Printing + is now controlled by the PRINT_EXPORT property in the entry, and + the user is only asked if it is missing. Pass the switches to + a2ps-buffer properly. + 2009-06-20 Carsten Dominik carsten.domi...@gmail.com * README: List new file org-export-generic.el diff --git a/contrib/lisp/org-checklist.el b/contrib/lisp/org-checklist.el index 26d228f..4ebf91b 100644 --- a/contrib/lisp/org-checklist.el +++ b/contrib/lisp/org-checklist.el @@ -42,11 +42,37 @@ ;; ;;; Code: (require 'org) +(load a2ps-print) -(defvar export-time-format %Y%m%d%H%M - format of timestamp appended to export file) -(defvar export-function 'org-export-as-ascii - function used to prepare the export file for printing) +(defgroup org-checklist nil + Extended checklist handling for org + :tag Org-checklist + :group 'org) + +(defcustom org-checklist-export-time-format %Y%m%d%H%M + The format of timestamp appended to LIST_EXPORT_BASENAME to + make the name of the export file. + :link '(function-link format-time-string) + :group 'org-checklist + :type 'string) + +(defcustom org-checklist-export-function 'org-export-as-ascii + function used to prepare the export file for printing + :group 'org-checklist + :type '(radio (function-item :tag ascii text org-export-as-ascii) + (function-item :tag HTML org-export-as-html) + (function-item :tag LaTeX :value org-export-as-latex) + (function-item :tag XOXO :value org-export-as-xoxo))) + +(defcustom org-checklist-export-params nil + options for the export function file for printing + :group 'org-checklist + :type '(repeat string)) + +(defcustom org-checklist-a2ps-params nil + options for a2ps for printing + :group 'org-checklist + :type '(repeat string)) (defun org-reset-checkbox-state-maybe () Reset all checkboxes in an entry if the `RESET_CHECK_BOXES' property is set @@ -54,23 +80,30 @@ (if (org-entry-get (point) RESET_CHECK_BOXES) (org-reset-checkbox-state-subtree))) + (defun org-make-checklist-export () Produce a checklist containing all unchecked items from a list of checkbox items (interactive *) (if (org-entry-get (point) LIST_EXPORT_BASENAME) - (let* ((export-file (concat (org-entry-get (point) LIST_EXPORT_BASENAME) - - (format-time-string export-time-format) + (let* ((export-file (concat (org-entry-get (point) LIST_EXPORT_BASENAME nil) + - (format-time-string +org-checklist-export-time-format) .org)) + (print (case (org-entry-get (point) PRINT_EXPORT nil) + (( nil nil) nil) + (t t) + (nil (y-or-n-p Print list? exported-lines - title) + title Checklist export) (save-restriction (save-excursion (org-narrow-to-subtree) + (org-update-checkbox-count-maybe) (org-show-subtree) (goto-char (point-min)) - (if (looking-at org-complex-heading-regexp) - (setq title (match-string 4))) + (when (looking-at org-complex-heading-regexp) + (setq title (match-string 4))) (goto-char (point-min)) (let ((end (point-max))) (while ( (point) end) @@
Re: [Orgmode] [misc-new-features 2/5] Bugfixes, documentation and custom options for org-checklist.
Hi Bastien, On 2009-07-14 14:09:12(+0200), Bastien wrote: I will apply this one tomorrow. Note that your changelog announces changes to org.texi that your patch don't contain. I started the patch before the documentation for modules in contrib was moved to Worg. I pushed the docs just now. The changelog is fixed in the version in my git repo. James -- |-James TD Smith-email/ahktenz...@mohorovi.cc-| ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [misc-new-features 2/5] Bugfixes, documentation and custom options for org-checklist.
* contrib/lisp/org-checklist.el - Fix some problems with the print/export feature in org-checklist. - Add custom options for this module - Fix some interaction with a2ps - Only reset checkboxes if TODO state is done. * doc/org.texi - Add documentation for org-checklist * lisp/org.el - Add org-checklist to org-modules --- contrib/ChangeLog | 16 ++ contrib/lisp/org-checklist.el | 67 +++- lisp/org.el |1 + 3 files changed, 69 insertions(+), 15 deletions(-) diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 7e62df0..6a5c2a2 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,19 @@ +2009-07-12 James TD Smith ahktenz...@mohorovi.cc + + * lisp/org-checklist.el (org-checklist): Add a custom group for + org-checklist. The options are all for the unchecked items export + function. + (org-checklist-export-time-format): Allow customising the + timestamp appended to the saved unchecked items list + (org-checklist-export-function): Allow customising the output + format for the unchecked items list. + (org-checklist-export-params): Options for the exporter. + (org-checklist-a2ps-params): Printing options. + (org-make-checklist-export): Use values from custom vars. Printing + is now controlled by the PRINT_EXPORT property in the entry, and + the user is only asked if it is missing. Pass the switches to + a2ps-buffer properly. + 2009-06-20 Carsten Dominik carsten.domi...@gmail.com * README: List new file org-export-generic.el diff --git a/contrib/lisp/org-checklist.el b/contrib/lisp/org-checklist.el index 26d228f..4ebf91b 100644 --- a/contrib/lisp/org-checklist.el +++ b/contrib/lisp/org-checklist.el @@ -42,11 +42,37 @@ ;; ;;; Code: (require 'org) +(load a2ps-print) -(defvar export-time-format %Y%m%d%H%M - format of timestamp appended to export file) -(defvar export-function 'org-export-as-ascii - function used to prepare the export file for printing) +(defgroup org-checklist nil + Extended checklist handling for org + :tag Org-checklist + :group 'org) + +(defcustom org-checklist-export-time-format %Y%m%d%H%M + The format of timestamp appended to LIST_EXPORT_BASENAME to + make the name of the export file. + :link '(function-link format-time-string) + :group 'org-checklist + :type 'string) + +(defcustom org-checklist-export-function 'org-export-as-ascii + function used to prepare the export file for printing + :group 'org-checklist + :type '(radio (function-item :tag ascii text org-export-as-ascii) + (function-item :tag HTML org-export-as-html) + (function-item :tag LaTeX :value org-export-as-latex) + (function-item :tag XOXO :value org-export-as-xoxo))) + +(defcustom org-checklist-export-params nil + options for the export function file for printing + :group 'org-checklist + :type '(repeat string)) + +(defcustom org-checklist-a2ps-params nil + options for a2ps for printing + :group 'org-checklist + :type '(repeat string)) (defun org-reset-checkbox-state-maybe () Reset all checkboxes in an entry if the `RESET_CHECK_BOXES' property is set @@ -54,23 +80,30 @@ (if (org-entry-get (point) RESET_CHECK_BOXES) (org-reset-checkbox-state-subtree))) + (defun org-make-checklist-export () Produce a checklist containing all unchecked items from a list of checkbox items (interactive *) (if (org-entry-get (point) LIST_EXPORT_BASENAME) - (let* ((export-file (concat (org-entry-get (point) LIST_EXPORT_BASENAME) - - (format-time-string export-time-format) + (let* ((export-file (concat (org-entry-get (point) LIST_EXPORT_BASENAME nil) + - (format-time-string + org-checklist-export-time-format) .org)) +(print (case (org-entry-get (point) PRINT_EXPORT nil) + (( nil nil) nil) + (t t) + (nil (y-or-n-p Print list? exported-lines -title) +title Checklist export) (save-restriction (save-excursion (org-narrow-to-subtree) + (org-update-checkbox-count-maybe) (org-show-subtree) (goto-char (point-min)) - (if (looking-at org-complex-heading-regexp) - (setq title (match-string 4))) + (when (looking-at org-complex-heading-regexp) + (setq title (match-string 4))) (goto-char (point-min)) (let ((end (point-max))) (while ( (point) end) @@ -85,14 +118,18 @@ of checkbox items (dolist (entry exported-lines) (insert entry)) (org-update-checkbox-count-maybe) (write-file export-file) - (if (y-or-n-p Print list? ) -