2008-06-17 Carsten Dominik <dominik@science.uva.nl>

* org-colview.el (org-columns-next-allowed-value): Bug fix.

	* org-colview-xemacs.el (org-columns-next-allowed-value): Bug fix.

	* org-agenda.el (org-agenda-get-closed): Get the end time into the
	agenda prefix as well.

	* org-publish.el (org-publish-org-index): Make a properly indented
	list.

	* org.el (org-calendar-agenda-action-key): New option.
	(org-get-cursor-date): New function.
	(org-mark-entry-for-agenda-action): New command.
	(org-overriding-default-time): New variable.
	(org-read-date): Respect `org-overriding-default-time'.

	* org-remember.el (org-remember-apply-template): Respect the
	ovverriding default time.

	* org-agenda.el (org-agenda-action-marker): New variable.
	(org-agenda-action): New command.
	(org-agenda-do-action): New function.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-schedule, org-deadline): Protect scheduled and
	deadline tasks against changes that accidently remove the
	repeater.  Also show a message with the new date when done.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-beginning-of-line): Cater for the case when there
	are tags but no headline text.
	(org-align-tags-here): Convert to tabs only when indent-tabs-mode
	it set.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-mhe.el (org-mhe-get-message-folder-from-index): Make sure
	the return value is nil instead of "nil" when there is no match.

	* org-exp.el (org-insert-centered): Use fill-column instead of
	80.
	(org-export-as-ascii): Use string-width to measure the width of
	the heading.

	* org.el (org-diary-to-ical-string): No longer kill buffer
	FROMBUF, this is now done by the caller.

	* org-exp.el (org-print-icalendar-entries): Move the call to
	`org-diary-to-ical-string' out of the loop, and kill the buffer
	afterwords.

	* org-remember.el (org-remember-visit-immediately): Position
	cursor after moving to the note.
	(org-remember-apply-template): Use a text property to record the
	cursor position.
	(org-remember-handler): Align tags after pasting the note.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-bbdb.el (org-bbdb-follow-anniversary-link): New function.

	* org-agenda.el (org-agenda-open-link): If there is an
	org-bbdb-name property in the current line, jump to that bbdb
	entry.

	* org-bbdb.el (org-bbdb-anniversaries): Add the bbdb-name as a
	text property, so that the agenda knows where this entry comes
	from.

	* org-agenda.el (org-agenda-clock-in): Fixed bug in the
	interaction between clocking-in from the agenda, and  automatic
	task state switching.

	* org-macs.el (org-with-point-at): Bug fix in macro defintion.

	* org.el (org-beginning-of-line, org-end-of-line): Make sure the
	zmacs-region stays after this command in XEmacs.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-scan-tags): Allow new values for ACTION parameter.

	* org-remember.el (org-remember-templates): Fix bug in
	customization type definition.

	* org.el (org-map-entries): New function.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-agenda.el (org-agenda-skip-comment-trees): New option.
	(org-agenda-skip): Respect `org-agenda-skip-comment-trees'.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-remember.el (org-jump-to-target-location): New variable.
	(org-remember-apply-template): Set
	`org-remember-apply-template' if requested by template.
	(org-remember-handler): Start an idle timer to jump to
	remember location.

	* org-exp.el (org-get-current-options): Add the FILETAGS setting.

	* org.el (org-set-regexps-and-options): Fix bug with parsing of
	file tags.
	(org-get-tags-at): Add the content of `org-file-tags'.

	* org-exp.el (org-export-handle-comments): Fix bug with several
	comment lines after each other.
	(org-number-to-roman, org-number-to-counter): New functions.
	(org-export-section-number-format): New option.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-exp.el (org-export-protect-examples): Catch the case of a
	missing end_example line.

	* org.el (org-set-regexps-and-options): Set `org-file-properties' and
	`org-file-tags' to nil.

	* org-colview.el (org-columns-next-allowed-value): Handle next
	argument NTH to directly select a value.

	* org-colview-xemacs.el (org-columns-next-allowed-value): Handle next
	argument NTH to directly select a value.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-agenda.el (org-agenda-scheduled-leaders): Fix docstring.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-columns-ellipses): New option.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-colview.el (org-columns-add-ellipses): New function.
	(org-columns-compact-links): New function.
	(org-columns-cleanup-item): Call `org-columns-compact-links'.
	(org-columns-display-here): Call `org-agenda-columns-cleanup-item'
	when in agenda.
	(org-columns-edit-value): Fixed bug with editing values from
	agenda column view.
	(org-columns-redo): Also redo the agenda itself.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-agenda.el (org-agenda-columns-remove-prefix-from-item): New
	option.

	* org-colview.el (org-agenda-columns-cleanup-item): New function.

	* org-exp.el (org-export-ascii-preprocess): Renamed from
	`org-export-ascii-clean-string'.
	(org-export-kill-licensed-text)
	(org-export-define-heading-targets)
	(org-export-handle-invisible-targets)
	(org-export-target-internal-links)
	(org-export-remove-or-extract-drawers)
	(org-export-remove-archived-trees)
	(org-export-protect-quoted-subtrees)
	(org-export-protect-verbatim, org-export-protect-examples)
	(org-export-select-backend-specific-text)
	(org-export-mark-blockquote-and-verse)
	(org-export-remove-comment-blocks-and-subtrees)
	(org-export-handle-comments, org-export-mark-radio-links)
	(org-export-remove-special-table-lines)
	(org-export-normalize-links)
	(org-export-concatenate-multiline-links)
	(org-export-concatenate-multiline-emphasis): New functions,
	obtained from spliiting the export preprocessor.

	* org-table.el (org-table-recalculate): Improve error message if
	the row number is invalid.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-archive.el (org-archive-save-context-info): Fix bugs in
	customization setup and docstring.

	* org-exp.el (org-export-html-style): Changed the size of in the
	<pre> element to 90%.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-find-src-example-start): Function removed.
	(org-edit-src-find-region-and-lang): New function.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-edit-src-exit): New function.
	(org-exit-edit-mode): New minor mode.

	* org-exp.el (org-export-preprocess-string): Fix bug with removing
	comment-like lines from protected examples.

	* org.el (org-edit-src-example, org-find-src-example-start)
	(org-protect-source-example, org-edit-special): New functions.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-publish.el (org-publish-project-alist): Fix typo in
	docstring.
	(org-publish-project-alist): Handle :index-title property.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-export-latex.el (org-export-as-latex): Make sure region
	bounds are correct.  Parse subtree properties relating to export.

	* org-exp.el (org-export-add-options-to-plist): New function.
	(org-infile-export-plist): Use `org-export-add-options-to-plist'.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-default-properties): Add EXPORT_FILE_NAME and
	EXPORT_TITLE.

	* org-exp.el (org-export-get-title-from-subtree)
	(org-export-as-ascii, org-export-as-html): Make sure the original
	region-beginning and region-end are used, even after moving
	point.
	(org-export-get-title-from-subtree): Also try the EXPORT_TITLE
	property.

	* org-remember.el (org-remember-last-stored-marker): New variable.
	(org-remember-goto-last-stored): Use `org-goto-marker-or-bmk'.
	(org-remember-handler): Also use marker to remember
	last-stored position.

	* org.el (org-goto-marker-or-bmk): New function.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-file-properties): Renamed from `org-local-properties'.
	(org-scan-tags): Take file tags into account.
	(org-tags-match-list-sublevels): Default changed to t.

	* org-exp.el (org-export-as-html): Close paragraph after a
	footnote.

	* org.el (org-update-parent-todo-statistics): New function.

	* org-exp.el (org-icalendar-store-UID): New option.
	(org-icalendar-force-UID): Option removed.
	(org-print-icalendar-entries): IMplement UIDs.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-mhe.el (org-mhe-follow-link): Fix bug in mhe searches.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-faces.el (org-column): Document how this face is being used
	and why sometimes the background faces shine through.

	* org-mhe.el (org-mhe-follow-link): Improve handling of searches.

	* org-publish.el (org-publish-attachment): Create publishing
	directory if it does not yet exist.

	* org-table.el (org-calc-default-modes): Change default number
	format to (float 8).

	* org.el (org-olpath-completing-read): New function.
	(org-time-clocksum-format): New option.
	(org-minutes-to-hh:mm-string): Use `org-time-clocksum-format'.

	* org-clock.el (org-clock-display, org-clock-out)
	(org-update-mode-line): Use `org-time-clocksum-format'.

	* org-colview-xemacs.el (org-columns-number-to-string): Use
	`org-time-clocksum-format'.

	* org-colview.el (org-columns-number-to-string): Use
	`org-time-clocksum-format'.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-id.el: New file, move from contrib to core.

	* org-exp.el (org-icalendar-force-UID): New option.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-exp.el (org-print-icalendar-entries): Make sure DTEND is
	shifted by one day if theere is a date range without an end
	time.

	* org.el (org-try-structure-completion): New function.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-set-font-lock-defaults): Improve fontification of
	description lists.
	(org-insert-item): Handle description lists.
	(org-adaptive-fill-function): Improve auto indentation in
	description lists.

	* org-exp.el (org-export-as-html, org-export-preprocess-string):
	Implement VERSE environment.
	(org-export-preprocess-string): Implement the COMMENT
	environment.

	* org-export-latex.el (org-export-latex-preprocess): Implement
	VERSE environment.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-jsinfo.el (org-infojs-opts-table): Add entry for FIXED_TOC
	option.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-table.el (orgtbl-to-tsv, orgtbl-to-csv): New functions.

	* org.el (org-quote-csv-field): New functions.

	* org-table.el (org-table-export-default-format): Remove :splice
	from default format, we get the same effect by not specifying
	:tstart and :tend.
	(org-table-export): Improve setup, distinguish better between
	interactive and non-interactive use, allow specifying the format
	on the fly, better protection against wrong file names.
	(orgtbl-to-generic): Fix documentation.  Do not require :tstart
	and :tend when :splice is omitted.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-clock.el (org-clock-select-task): Make sure the selection
	letters are 1-9 and A-Z, no special characters.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-exp.el (org-export-htmlize): New group.
	(org-export-htmlize-output-type)
	(org-export-htmlize-css-font-prefix): New options.
	(org-export-htmlize-region-for-paste): New function.
	(org-export-htmlize-generate-css): New command.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-set-visibility-according-to-property): New function.
	(org-ctrl-c-ctrl-c): Do not restart org-mode, just get the options
	and compute the regular expressions, and update font-lock.
	(org-property-re): Allow a dash in property names.

	* org-archive.el (org-extract-archive-file): Insert the file name
	without the path into the format, to allow the location format to
	contain a subdirectory.

	* org-agenda.el (org-agenda-post-command-hook): If point is at end
	of buffer, and the `org-agenda-type' property undefined, use the
	value from the character before.

	* org.el (org-add-planning-info): Don't let indentation for
	would-be timestamp become extra whitespace at the end of headline.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-remove-double-quotes, org-file-contents): New
	functions.

	* org-exp.el (org-infile-export-plist): Also parse the
	contents of #+SETUPFILE files, recursively.

	* org.el (org-set-regexps-and-options): Also parse the
	contents of #+SETUPFILE files, recursively.

	* org-exp.el (org-export-handle-include-files): New function.
	(org-export-preprocess-string): Call
	`org-export-handle-include-files'.

	* org.el (org-delete-property-globally)
	(org-delete-property, org-set-property): Ignore case during
	completion.
	(org-set-property): Use `org-completing-read' instead of
	`completing-read'.

	* org.el (org-complete-expand-structure-template): New,
	experimental function.
	(org-structure-template-alist): New, experimental option.
	(org-complete): Call `org-complete-expand-structure-template'.

2008-06-17 Bastien Guerry  <bzg@altern.org>

	* org-export-latex.el (org-export-latex-preprocess): Added
	support for blockquotes.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-read-date-analyze): Catch the case where only a
	weekday is given.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-set-font-lock-defaults): Make the description
	tag bold.

	* org-exp.el (org-export-as-html, org-close-li): Implement
	description lists.

2008-06-17 Jason Riedy  <jason@acm.org>

	* org-table.el (*orgtbl-default-fmt*): New variable.
	(orgtbl-format-line): Use the value of *orgtbl-default-fmt*
	when there is no other fmt available.

	(orgtbl-to-generic): Allow an explicitly nil :tstart or
	:tend to suppress the appropriate string.

	(orgtbl-to-orgtbl): New function for translating to another orgtbl
	table.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.el (org-read-date-analyze): "." as an alias for "+0" in
	read date.

	* org-clock.el (org-clock-save-markers-for-cut-and-paste):
	New function.

	* org-agenda.el (org-agenda-save-markers-for-cut-and-paste):
	New function.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-clock.el (org-clock-find-position): Don't include notes
	into clock drawer.

	* org-archive.el (org-archive-subtree): No longer remove an
	extra line after cutting the subtree.  `org-cut-subtree' already
	takes care of this.

	* org-remember.el (org-remember-handler): Only kill the target
	buffer if it does not contain the running clock.

	* org.el (org-markers-to-move): New variable.
	(org-save-markers-in-region, org-check-and-save-marker)
	(org-reinstall-markers-in-region): New function.
	(org-move-subtree-down, org-copy-subtree): Remember relative
	marker positions before cutting.
	(org-move-subtree-down, org-paste-subtree): Restore relative
	marker positions after pasting.

	* org-remember.el (org-remember-clock-out-on-exit): New option.
	(org-remember-finalize): Clock out only if the setting in
	`org-remember-clock-out-on-exit' requires it.
	(org-remember-handler): Do the cleanup in the buffer, to make sure
	that the clock marker remains in tact.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-clock.el (org-clock-goto): Widen buffer if necessary.
	(org-clock-in): Make sure that also tasks outside the narrowed
	region will be clocked in correctly.
	(org-clock-insert-selection-line): Widen the buffer so that we can
	find the correct task heading.

	* org.el (org-base-buffer): New function.

	* org-exp.el (org-icalendar-cleanup-string): Make sure ',"
	and ";" are escaped.
	(org-print-icalendar-entries): Also apply
	`org-icalendar-cleanup-string' to the headline, not only to the
	summary property.

2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org-exp.el (org-export-preprocess-hook): New hook.
	(org-export-preprocess-string): Call
	`org-export-preprocess-hook'.

	* org.el (org-font-lock-hook): New variable.
	(org-font-lock-hook): New function.
	(org-set-font-lock-defaults): Call `org-font-lock-hook'.



2008-06-17  Carsten Dominik  <dominik@science.uva.nl>

	* org.texi: Modify license to no longer include back- and front
	cover matters.
	(Using the mapping API): New section.
	(Agenda column view): New section.
	(Moving subtrees): Document archiving to the archive
	sibling.
	(Agenda commands): Document columns view in the agenda.
	(Using the property API): Document the API for
	multi-valued properties.
This commit is contained in:
Carsten Dominik 2008-06-17 15:22:00 +00:00
parent 4271b4248d
commit b349f79f74
30 changed files with 4246 additions and 1421 deletions

View file

@ -1,3 +1,21 @@
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.texi: Modify license to no longer include back- and front
cover matters.
(Using the mapping API): New section.
(Agenda column view): New section.
(Moving subtrees): Document archiving to the archive
sibling.
(Agenda commands): Document columns view in the agenda.
(Using the property API): Document the API for
multi-valued properties.
2008-06-17 Jason Riedy <jason@acm.org>
* org.texi (A LaTeX example): Note that fmt may be a one-argument
function, and efmt may be a two-argument function.
(Radio tables): Document multiple destinations.
2008-06-16 Glenn Morris <rgm@gnu.org>
* epa.texi, erc.texi, pgg.texi, remember.texi, sasl.texi, url.texi:

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
% Reference Card for Org Mode
\def\orgversionnumber{6.02b}
\def\orgversionnumber{6.05a}
\def\versionyear{2008} % latest update
\def\year{2008} % latest copyright year
@ -309,10 +309,8 @@ \section{Structure Editing}
\key{insert new heading after subtree}{C-RET}
\key{insert new TODO entry/checkbox item}{M-S-RET}
\key{promote current heading up one level}{M-LEFT}
\key{demote current heading down one level}{M-RIGHT}
\key{promote current subtree up one level}{M-S-LEFT}
\key{demote current subtree down one level}{M-S-RIGHT}
\key{promote/demote heading}{M-LEFT/RIGHT}
\metax{promote/demote current subtree}{M-S-LEFT/RIGHT}
\key{move subtree/list item up/down}{M-S-UP/DOWN}
\key{refile subtree}{C-c C-w}
@ -320,6 +318,7 @@ \section{Structure Editing}
\key{copy subtree}{C-c C-x M-w}
\key{yank subtree}{C-c C-x C-y}
\key{narrow buffer to current subtree}{C-x n s}
\key{widen restriction to full buffer}{C-x n w}
\section{Archiving}
@ -452,7 +451,7 @@ \section{Links}
\key{jump back to last followed link(s)}{C-c \&}
\key{Find next link}{C-c C-x C-n}
\key{Find previous link}{C-c C-x C-p}
\key{Edit code snippet of file at point}{C-c '}
{\bf Internal Links}
\key{\kbd{<<My Target>>}}{\rm target}

480
lisp/org/ChangeLog Normal file
View file

@ -0,0 +1,480 @@
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-colview.el (org-columns-next-allowed-value): Bug fix.
* org-colview-xemacs.el (org-columns-next-allowed-value): Bug fix.
* org-agenda.el (org-agenda-get-closed): Get the end time into the
agenda prefix as well.
* org-publish.el (org-publish-org-index): Make a properly indented
list.
* org.el (org-calendar-agenda-action-key): New option.
(org-get-cursor-date): New function.
(org-mark-entry-for-agenda-action): New command.
(org-overriding-default-time): New variable.
(org-read-date): Respect `org-overriding-default-time'.
* org-remember.el (org-remember-apply-template): Respect the
ovverriding default time.
* org-agenda.el (org-agenda-action-marker): New variable.
(org-agenda-action): New command.
(org-agenda-do-action): New function.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-schedule, org-deadline): Protect scheduled and
deadline tasks against changes that accidently remove the
repeater. Also show a message with the new date when done.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-beginning-of-line): Cater for the case when there
are tags but no headline text.
(org-align-tags-here): Convert to tabs only when indent-tabs-mode
it set.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-mhe.el (org-mhe-get-message-folder-from-index): Make sure
the return value is nil instead of "nil" when there is no match.
* org-exp.el (org-insert-centered): Use fill-column instead of
80.
(org-export-as-ascii): Use string-width to measure the width of
the heading.
* org.el (org-diary-to-ical-string): No longer kill buffer
FROMBUF, this is now done by the caller.
* org-exp.el (org-print-icalendar-entries): Move the call to
`org-diary-to-ical-string' out of the loop, and kill the buffer
afterwords.
* org-remember.el (org-remember-visit-immediately): Position
cursor after moving to the note.
(org-remember-apply-template): Use a text property to record the
cursor position.
(org-remember-handler): Align tags after pasting the note.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-bbdb.el (org-bbdb-follow-anniversary-link): New function.
* org-agenda.el (org-agenda-open-link): If there is an
org-bbdb-name property in the current line, jump to that bbdb
entry.
* org-bbdb.el (org-bbdb-anniversaries): Add the bbdb-name as a
text property, so that the agenda knows where this entry comes
from.
* org-agenda.el (org-agenda-clock-in): Fixed bug in the
interaction between clocking-in from the agenda, and automatic
task state switching.
* org-macs.el (org-with-point-at): Bug fix in macro defintion.
* org.el (org-beginning-of-line, org-end-of-line): Make sure the
zmacs-region stays after this command in XEmacs.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-scan-tags): Allow new values for ACTION parameter.
* org-remember.el (org-remember-templates): Fix bug in
customization type definition.
* org.el (org-map-entries): New function.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-agenda.el (org-agenda-skip-comment-trees): New option.
(org-agenda-skip): Respect `org-agenda-skip-comment-trees'.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-remember.el (org-jump-to-target-location): New variable.
(org-remember-apply-template): Set
`org-remember-apply-template' if requested by template.
(org-remember-handler): Start an idle timer to jump to
remember location.
* org-exp.el (org-get-current-options): Add the FILETAGS setting.
* org.el (org-set-regexps-and-options): Fix bug with parsing of
file tags.
(org-get-tags-at): Add the content of `org-file-tags'.
* org-exp.el (org-export-handle-comments): Fix bug with several
comment lines after each other.
(org-number-to-roman, org-number-to-counter): New functions.
(org-export-section-number-format): New option.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-exp.el (org-export-protect-examples): Catch the case of a
missing end_example line.
* org.el (org-set-regexps-and-options): Set `org-file-properties' and
`org-file-tags' to nil.
* org-colview.el (org-columns-next-allowed-value): Handle next
argument NTH to directly select a value.
* org-colview-xemacs.el (org-columns-next-allowed-value): Handle next
argument NTH to directly select a value.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-agenda.el (org-agenda-scheduled-leaders): Fix docstring.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-columns-ellipses): New option.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-colview.el (org-columns-add-ellipses): New function.
(org-columns-compact-links): New function.
(org-columns-cleanup-item): Call `org-columns-compact-links'.
(org-columns-display-here): Call `org-agenda-columns-cleanup-item'
when in agenda.
(org-columns-edit-value): Fixed bug with editing values from
agenda column view.
(org-columns-redo): Also redo the agenda itself.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-agenda.el (org-agenda-columns-remove-prefix-from-item): New
option.
* org-colview.el (org-agenda-columns-cleanup-item): New function.
* org-exp.el (org-export-ascii-preprocess): Renamed from
`org-export-ascii-clean-string'.
(org-export-kill-licensed-text)
(org-export-define-heading-targets)
(org-export-handle-invisible-targets)
(org-export-target-internal-links)
(org-export-remove-or-extract-drawers)
(org-export-remove-archived-trees)
(org-export-protect-quoted-subtrees)
(org-export-protect-verbatim, org-export-protect-examples)
(org-export-select-backend-specific-text)
(org-export-mark-blockquote-and-verse)
(org-export-remove-comment-blocks-and-subtrees)
(org-export-handle-comments, org-export-mark-radio-links)
(org-export-remove-special-table-lines)
(org-export-normalize-links)
(org-export-concatenate-multiline-links)
(org-export-concatenate-multiline-emphasis): New functions,
obtained from spliiting the export preprocessor.
* org-table.el (org-table-recalculate): Improve error message if
the row number is invalid.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-archive.el (org-archive-save-context-info): Fix bugs in
customization setup and docstring.
* org-exp.el (org-export-html-style): Changed the size of in the
<pre> element to 90%.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-find-src-example-start): Function removed.
(org-edit-src-find-region-and-lang): New function.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-edit-src-exit): New function.
(org-exit-edit-mode): New minor mode.
* org-exp.el (org-export-preprocess-string): Fix bug with removing
comment-like lines from protected examples.
* org.el (org-edit-src-example, org-find-src-example-start)
(org-protect-source-example, org-edit-special): New functions.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-publish.el (org-publish-project-alist): Fix typo in
docstring.
(org-publish-project-alist): Handle :index-title property.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-export-latex.el (org-export-as-latex): Make sure region
bounds are correct. Parse subtree properties relating to export.
* org-exp.el (org-export-add-options-to-plist): New function.
(org-infile-export-plist): Use `org-export-add-options-to-plist'.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-default-properties): Add EXPORT_FILE_NAME and
EXPORT_TITLE.
* org-exp.el (org-export-get-title-from-subtree)
(org-export-as-ascii, org-export-as-html): Make sure the original
region-beginning and region-end are used, even after moving
point.
(org-export-get-title-from-subtree): Also try the EXPORT_TITLE
property.
* org-remember.el (org-remember-last-stored-marker): New variable.
(org-remember-goto-last-stored): Use `org-goto-marker-or-bmk'.
(org-remember-handler): Also use marker to remember
last-stored position.
* org.el (org-goto-marker-or-bmk): New function.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-file-properties): Renamed from `org-local-properties'.
(org-scan-tags): Take file tags into account.
(org-tags-match-list-sublevels): Default changed to t.
* org-exp.el (org-export-as-html): Close paragraph after a
footnote.
* org.el (org-update-parent-todo-statistics): New function.
* org-exp.el (org-icalendar-store-UID): New option.
(org-icalendar-force-UID): Option removed.
(org-print-icalendar-entries): IMplement UIDs.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-mhe.el (org-mhe-follow-link): Fix bug in mhe searches.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-faces.el (org-column): Document how this face is being used
and why sometimes the background faces shine through.
* org-mhe.el (org-mhe-follow-link): Improve handling of searches.
* org-publish.el (org-publish-attachment): Create publishing
directory if it does not yet exist.
* org-table.el (org-calc-default-modes): Change default number
format to (float 8).
* org.el (org-olpath-completing-read): New function.
(org-time-clocksum-format): New option.
(org-minutes-to-hh:mm-string): Use `org-time-clocksum-format'.
* org-clock.el (org-clock-display, org-clock-out)
(org-update-mode-line): Use `org-time-clocksum-format'.
* org-colview-xemacs.el (org-columns-number-to-string): Use
`org-time-clocksum-format'.
* org-colview.el (org-columns-number-to-string): Use
`org-time-clocksum-format'.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-id.el: New file, move from contrib to core.
* org-exp.el (org-icalendar-force-UID): New option.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-exp.el (org-print-icalendar-entries): Make sure DTEND is
shifted by one day if theere is a date range without an end
time.
* org.el (org-try-structure-completion): New function.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-set-font-lock-defaults): Improve fontification of
description lists.
(org-insert-item): Handle description lists.
(org-adaptive-fill-function): Improve auto indentation in
description lists.
* org-exp.el (org-export-as-html, org-export-preprocess-string):
Implement VERSE environment.
(org-export-preprocess-string): Implement the COMMENT
environment.
* org-export-latex.el (org-export-latex-preprocess): Implement
VERSE environment.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-jsinfo.el (org-infojs-opts-table): Add entry for FIXED_TOC
option.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-table.el (orgtbl-to-tsv, orgtbl-to-csv): New functions.
* org.el (org-quote-csv-field): New functions.
* org-table.el (org-table-export-default-format): Remove :splice
from default format, we get the same effect by not specifying
:tstart and :tend.
(org-table-export): Improve setup, distinguish better between
interactive and non-interactive use, allow specifying the format
on the fly, better protection against wrong file names.
(orgtbl-to-generic): Fix documentation. Do not require :tstart
and :tend when :splice is omitted.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-clock.el (org-clock-select-task): Make sure the selection
letters are 1-9 and A-Z, no special characters.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-exp.el (org-export-htmlize): New group.
(org-export-htmlize-output-type)
(org-export-htmlize-css-font-prefix): New options.
(org-export-htmlize-region-for-paste): New function.
(org-export-htmlize-generate-css): New command.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-set-visibility-according-to-property): New function.
(org-ctrl-c-ctrl-c): Do not restart org-mode, just get the options
and compute the regular expressions, and update font-lock.
(org-property-re): Allow a dash in property names.
* org-archive.el (org-extract-archive-file): Insert the file name
without the path into the format, to allow the location format to
contain a subdirectory.
* org-agenda.el (org-agenda-post-command-hook): If point is at end
of buffer, and the `org-agenda-type' property undefined, use the
value from the character before.
* org.el (org-add-planning-info): Don't let indentation for
would-be timestamp become extra whitespace at the end of headline.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-remove-double-quotes, org-file-contents): New
functions.
* org-exp.el (org-infile-export-plist): Also parse the
contents of #+SETUPFILE files, recursively.
* org.el (org-set-regexps-and-options): Also parse the
contents of #+SETUPFILE files, recursively.
* org-exp.el (org-export-handle-include-files): New function.
(org-export-preprocess-string): Call
`org-export-handle-include-files'.
* org.el (org-delete-property-globally)
(org-delete-property, org-set-property): Ignore case during
completion.
(org-set-property): Use `org-completing-read' instead of
`completing-read'.
* org.el (org-complete-expand-structure-template): New,
experimental function.
(org-structure-template-alist): New, experimental option.
(org-complete): Call `org-complete-expand-structure-template'.
2008-06-17 Bastien Guerry <bzg@altern.org>
* org-export-latex.el (org-export-latex-preprocess): Added
support for blockquotes.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-read-date-analyze): Catch the case where only a
weekday is given.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-set-font-lock-defaults): Make the description
tag bold.
* org-exp.el (org-export-as-html, org-close-li): Implement
description lists.
2008-06-17 Jason Riedy <jason@acm.org>
* org-table.el (*orgtbl-default-fmt*): New variable.
(orgtbl-format-line): Use the value of *orgtbl-default-fmt*
when there is no other fmt available.
(orgtbl-to-generic): Allow an explicitly nil :tstart or
:tend to suppress the appropriate string.
(orgtbl-to-orgtbl): New function for translating to another orgtbl
table.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-read-date-analyze): "." as an alias for "+0" in
read date.
* org-clock.el (org-clock-save-markers-for-cut-and-paste):
New function.
* org-agenda.el (org-agenda-save-markers-for-cut-and-paste):
New function.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-clock.el (org-clock-find-position): Don't include notes
into clock drawer.
* org-archive.el (org-archive-subtree): No longer remove an
extra line after cutting the subtree. `org-cut-subtree' already
takes care of this.
* org-remember.el (org-remember-handler): Only kill the target
buffer if it does not contain the running clock.
* org.el (org-markers-to-move): New variable.
(org-save-markers-in-region, org-check-and-save-marker)
(org-reinstall-markers-in-region): New function.
(org-move-subtree-down, org-copy-subtree): Remember relative
marker positions before cutting.
(org-move-subtree-down, org-paste-subtree): Restore relative
marker positions after pasting.
* org-remember.el (org-remember-clock-out-on-exit): New option.
(org-remember-finalize): Clock out only if the setting in
`org-remember-clock-out-on-exit' requires it.
(org-remember-handler): Do the cleanup in the buffer, to make sure
that the clock marker remains in tact.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-clock.el (org-clock-goto): Widen buffer if necessary.
(org-clock-in): Make sure that also tasks outside the narrowed
region will be clocked in correctly.
(org-clock-insert-selection-line): Widen the buffer so that we can
find the correct task heading.
* org.el (org-base-buffer): New function.
* org-exp.el (org-icalendar-cleanup-string): Make sure ',"
and ";" are escaped.
(org-print-icalendar-entries): Also apply
`org-icalendar-cleanup-string' to the headline, not only to the
summary property.
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-exp.el (org-export-preprocess-hook): New hook.
(org-export-preprocess-string): Call
`org-export-preprocess-hook'.
* org.el (org-font-lock-hook): New variable.
(org-font-lock-hook): New function.
(org-set-font-lock-defaults): Call `org-font-lock-hook'.

View file

@ -1,4 +1,4 @@
;;; org-agenda.el --- The table editor for Org-mode
;;; org-agenda.el --- Dynamic task and appointment lists for Org
;; Copyright (C) 2004, 2005, 2006, 2007, 2008
;; Free Software Foundation, Inc.
@ -6,7 +6,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -34,7 +34,7 @@
(eval-when-compile
(require 'calendar))
(declare-function add-to-diary-list "diary-lib"
(declare-function diary-add-to-list "diary-lib"
(date string specifier &optional marker globcolor literal))
(declare-function calendar-absolute-from-iso "cal-iso" (date))
(declare-function calendar-astro-date-string "cal-julian" (&optional date))
@ -392,6 +392,12 @@ or `C-c a #' to produce the list."
:tag "Org Agenda Skip"
:group 'org-agenda)
(defcustom org-agenda-skip-comment-trees t
"Non-nil means, skip trees that start with teh COMMENT keyword.
When nil, these trees are also scand by agenda commands."
:group 'org-agenda-skip
:type 'boolean)
(defcustom org-agenda-todo-list-sublevels t
"Non-nil means, check also the sublevels of a TODO entry for TODO entries.
When nil, the sublevels of a TODO entry are not checked, resulting in
@ -464,7 +470,6 @@ N days, just insert a special line indicating the size of the gap."
(const :tag "All" t)
(number :tag "at most")))
(defgroup org-agenda-startup nil
"Options concerning initial settings in the Agenda in Org Mode."
:tag "Org Agenda Startup"
@ -676,7 +681,7 @@ symbols specifying conditions when the grid should be displayed:
today show grid on current date, independent of daily/weekly display
require-timed show grid only if at least one item has a time specification
The second item is a string which will be places behing the grid time.
The second item is a string which will be placed behind the grid time.
The third item is a list of integers, indicating the times that should have
a grid line."
@ -849,8 +854,10 @@ to occupy a fixed space in the agenda display."
"Text preceeding scheduled items in the agenda view.
This is a list with two strings. The first applies when the item is
scheduled on the current day. The second applies when it has been scheduled
previously, it may contain a %d to capture how many days ago the item was
scheduled."
previously, it may contain a %d indicating that this is the nth time that
this item is scheduled, due to automatic rescheduling of unfinished items
for the following day. So this number is one larger than the number of days
that passed since this item was scheduled first."
:group 'org-agenda-line-format
:type '(list
(string :tag "Scheduled today ")
@ -946,6 +953,16 @@ a names face, or a list like `(:background \"Red\")'."
:group 'org-agenda-column-view
:type 'boolean)
(defcustom org-agenda-columns-remove-prefix-from-item t
"Non-nil means, remove the prefix from a headline for agenda column view.
The special ITEM field in the columns format contains the current line, with
all information shown in other columns (like the TODO state or a tag).
When this variable is non-nil, also the agenda prefix will be removed from
the content of the ITEM field, to make sure as much as possible of the
headline can be shown in the limited width of the field."
:group 'org-agenda
:type 'boolean)
(defcustom org-agenda-columns-compute-summary-properties t
"Non-nil means, recompute all summary properties before column view.
When column view in the agenda is listing properties that have a summary
@ -1071,6 +1088,8 @@ The following commands are available:
(org-defkey org-agenda-mode-map "y" 'org-agenda-year-view)
(org-defkey org-agenda-mode-map "\C-c\C-z" 'org-agenda-add-note)
(org-defkey org-agenda-mode-map "z" 'org-agenda-add-note)
(org-defkey org-agenda-mode-map "k" 'org-agenda-action)
(org-defkey org-agenda-mode-map "\C-c\C-x\C-k" 'org-agenda-action)
(org-defkey org-agenda-mode-map [(shift right)] 'org-agenda-date-later)
(org-defkey org-agenda-mode-map [(shift left)] 'org-agenda-date-earlier)
(org-defkey org-agenda-mode-map [?\C-c ?\C-x (right)] 'org-agenda-date-later)
@ -1177,6 +1196,11 @@ The following commands are available:
["Schedule" org-agenda-schedule t]
["Set Deadline" org-agenda-deadline t]
"--"
["Mark item" org-agenda-action :active t :keys "k m"]
["Show mark item" org-agenda-action :active t :keys "k v"]
["Schedule marked item" org-agenda-action :active t :keys "k s"]
["Set Deadline for marked item" org-agenda-action :active t :keys "k d"]
"--"
["Change Date +1 day" org-agenda-date-later (org-agenda-check-type nil 'agenda 'timeline)]
["Change Date -1 day" org-agenda-date-earlier (org-agenda-check-type nil 'agenda 'timeline)]
["Change Date to ..." org-agenda-date-prompt (org-agenda-check-type nil 'agenda 'timeline)])
@ -2012,7 +2036,8 @@ continue from there."
(get-text-property p :org-archived)
(org-end-of-subtree t)
(throw :skip t))
(and (get-text-property p :org-comment)
(and org-agenda-skip-comment-trees
(get-text-property p :org-comment)
(org-end-of-subtree t)
(throw :skip t))
(if (equal (char-after p) ?#) (throw :skip t))
@ -2045,6 +2070,11 @@ no longer in use."
(while org-agenda-markers
(move-marker (pop org-agenda-markers) nil)))
(defun org-agenda-save-markers-for-cut-and-paste (beg end)
"Save relative positions of markers in region."
(mapc (lambda (m) (org-check-and-save-marker m beg end))
org-agenda-markers))
;;; Agenda timeline
(defvar org-agenda-only-exact-dates nil) ; dynamically scoped
@ -2425,6 +2455,7 @@ in `org-agenda-text-search-extra-files'."
'done-face 'org-done
'org-not-done-regexp org-not-done-regexp
'org-todo-regexp org-todo-regexp
'org-complex-heading-regexp org-complex-heading-regexp
'mouse-face 'highlight
'keymap org-agenda-keymap
'help-echo (format "mouse-2 or RET jump to location")))
@ -2539,6 +2570,7 @@ in `org-agenda-text-search-extra-files'."
(org-add-props txt props
'org-marker marker 'org-hd-marker marker
'org-todo-regexp org-todo-regexp
'org-complex-heading-regexp org-complex-heading-regexp
'priority 1000 'org-category category
'type "search")
(push txt ee)
@ -3065,6 +3097,7 @@ the documentation of `org-diary'."
'done-face 'org-done
'org-not-done-regexp org-not-done-regexp
'org-todo-regexp org-todo-regexp
'org-complex-heading-regexp org-complex-heading-regexp
'mouse-face 'highlight
'keymap org-agenda-keymap
'help-echo
@ -3123,6 +3156,7 @@ the documentation of `org-diary'."
(let* ((props (list 'face nil
'org-not-done-regexp org-not-done-regexp
'org-todo-regexp org-todo-regexp
'org-complex-heading-regexp org-complex-heading-regexp
'mouse-face 'highlight
'keymap org-agenda-keymap
'help-echo
@ -3255,6 +3289,7 @@ the documentation of `org-diary'."
(let* ((props (list 'mouse-face 'highlight
'org-not-done-regexp org-not-done-regexp
'org-todo-regexp org-todo-regexp
'org-complex-heading-regexp org-complex-heading-regexp
'keymap org-agenda-keymap
'help-echo
(format "mouse-2 or RET jump to org file %s"
@ -3269,7 +3304,7 @@ the documentation of `org-diary'."
(list 0 0 0 (nth 1 date) (car date) (nth 2 date))))
1 11))))
marker hdmarker priority category tags closedp
ee txt timestr)
ee txt timestr rest)
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(catch :skip
@ -3280,9 +3315,15 @@ the documentation of `org-diary'."
timestr (buffer-substring (match-beginning 0) (point-at-eol))
;; donep (org-entry-is-done-p)
)
(if (string-match "\\]" timestr)
;; substring should only run to end of time stamp
(setq timestr (substring timestr 0 (match-end 0))))
(when (string-match "\\]" timestr)
;; substring should only run to end of time stamp
(setq rest (substring timestr (match-end 0))
timestr (substring timestr 0 (match-end 0)))
(if (and (not closedp)
(string-match "\\([0-9]\\{1,2\\}:[0-9]\\{2\\}\\)\\]" rest))
(setq timestr (concat (substring timestr 0 -1)
"-" (match-string 1 rest) "]"))))
(save-excursion
(if (re-search-backward "^\\*+ " nil t)
(progn
@ -3309,6 +3350,7 @@ the documentation of `org-diary'."
(let* ((props (list 'mouse-face 'highlight
'org-not-done-regexp org-not-done-regexp
'org-todo-regexp org-todo-regexp
'org-complex-heading-regexp org-complex-heading-regexp
'keymap org-agenda-keymap
'help-echo
(format "mouse-2 or RET jump to org file %s"
@ -3394,6 +3436,7 @@ FRACTION is what fraction of the head-warning time has passed."
"Return the scheduled information for agenda display."
(let* ((props (list 'org-not-done-regexp org-not-done-regexp
'org-todo-regexp org-todo-regexp
'org-complex-heading-regexp org-complex-heading-regexp
'done-face 'org-done
'mouse-face 'highlight
'keymap org-agenda-keymap
@ -3469,6 +3512,7 @@ FRACTION is what fraction of the head-warning time has passed."
(let* ((props (list 'face nil
'org-not-done-regexp org-not-done-regexp
'org-todo-regexp org-todo-regexp
'org-complex-heading-regexp org-complex-heading-regexp
'mouse-face 'highlight
'keymap org-agenda-keymap
'help-echo
@ -4137,12 +4181,12 @@ written as 2-digit years."
(setq org-agenda-ndays 7)
(org-agenda-change-time-span 'week iso-week))
(defun org-agenda-month-view (&optional month)
"Switch to daily view for agenda.
"Switch to monthly view for agenda.
With argument MONTH, switch to that month."
(interactive "P")
(org-agenda-change-time-span 'month month))
(defun org-agenda-year-view (&optional year)
"Switch to daily view for agenda.
"Switch to yearly view for agenda.
With argument YEAR, switch to that year.
If MONTH has more then 2 digits, only the last two encode the
month. Any digits before this encode a year. So 200712 means
@ -4331,7 +4375,10 @@ so that the date SD will be in that range."
(defun org-agenda-post-command-hook ()
(and (eolp) (not (bolp)) (backward-char 1))
(setq org-agenda-type (get-text-property (point) 'org-agenda-type))
(setq org-agenda-type
(or (get-text-property (point) 'org-agenda-type)
(get-text-property (max (point-min) (1- (point)))
'org-agenda-type)))
(if (and org-agenda-follow-mode
(get-text-property (point) 'org-marker))
(org-agenda-show)))
@ -4890,6 +4937,69 @@ be used to request time specification in the time stamp."
(org-agenda-show-new-time marker ts "S"))
(message "Deadline for this item set to %s" ts)))
(defun org-agenda-action ()
"Select entry for agenda action, or execute an agenda action.
This command prompts for another letter. Valid inputs are:
m Mark the entry at point for an agenda action
s Schedule the marked entry to the date at the cursor
d Set the deadline of the marked entry to the date at the cursor
r Call `org-remember' with cursor date as the default date
SPC Show marked entry in other window
TAB Visit marked entry in other window
The cursor may be at a date in the calendar, or in the Org agenda."
(interactive)
(let (pos ans)
(message "Select action: [m]ark | [s]chedule [d]eadline [r]emember [ ]show")
(setq ans (read-char-exclusive))
(cond
((equal ans ?m)
;; Mark this entry
(if (eq major-mode 'org-agenda-mode)
(let ((m (or (get-text-property (point) 'org-hd-marker)
(get-text-property (point) 'org-marker))))
(if m
(progn
(move-marker org-agenda-action-marker
(marker-position m) (marker-buffer m))
(message "Entry marked for action; press `k' at desired date in agenda or calendar"))
(error "Don't know which entry to mark")))
(error "This command works only in the agenda")))
((equal ans ?s)
(org-agenda-do-action '(org-schedule nil org-overriding-default-time)))
((equal ans ?d)
(org-agenda-do-action '(org-deadline nil org-overriding-default-time)))
((equal ans ?r)
(org-agenda-do-action '(org-remember) t))
((equal ans ?\ )
(let ((cw (selected-window)))
(org-switch-to-buffer-other-window
(marker-buffer org-agenda-action-marker))
(goto-char org-agenda-action-marker)
(org-show-context 'agenda)
(select-window cw)))
((equal ans ?\C-i)
(org-switch-to-buffer-other-window
(marker-buffer org-agenda-action-marker))
(goto-char org-agenda-action-marker)
(org-show-context 'agenda))
(t (error "Invalid agenda action %c" ans)))))
(defun org-agenda-do-action (form &optional current-buffer)
"Evaluate FORM at the entry pointed to by `org-agenda-action-marker'."
(let ((org-overriding-default-time (org-get-cursor-date)))
(if current-buffer
(eval form)
(if (not (marker-buffer org-agenda-action-marker))
(error "No entry has bee selected for agenda action")
(with-current-buffer (marker-buffer org-agenda-action-marker)
(save-excursion
(save-restriction
(widen)
(goto-char org-agenda-action-marker)
(eval form))))))))
(defun org-agenda-clock-in (&optional arg)
"Start the clock on the currently selected item."
(interactive "P")
@ -4898,12 +5008,20 @@ be used to request time specification in the time stamp."
(org-clock-in arg)
(let* ((marker (or (get-text-property (point) 'org-marker)
(org-agenda-error)))
(pos (marker-position marker)))
(hdmarker (or (get-text-property (point) 'org-hd-marker)
marker))
(pos (marker-position marker))
newhead)
(org-with-remote-undo (marker-buffer marker)
(with-current-buffer (marker-buffer marker)
(widen)
(goto-char pos)
(org-clock-in arg))))))
(org-show-context 'agenda)
(org-show-entry)
(org-cycle-hide-drawers 'children)
(org-clock-in arg)
(setq newhead (org-get-heading)))
(org-agenda-change-all-lines newhead hdmarker t)))))
(defun org-agenda-clock-out (&optional arg)
"Stop the currently running clock."
@ -5141,6 +5259,8 @@ belonging to the \"Work\" category."
(provide 'org-agenda)
;; arch-tag: 77f7565d-7c4b-44af-a2df-9f6f7070cff1
;;; org-agenda.el ends here
;; arch-tag: 77f7565d-7c4b-44af-a2df-9f6f7070cff1

View file

@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -64,8 +64,8 @@ This variable can be a list of any of the following symbols:
time The time of archiving.
file The file where the entry originates.
itags The local tags, in the headline of the subtree.
ltags The tags the subtree inherits from further up the hierarchy.
ltags The local tags, in the headline of the subtree.
itags The tags the subtree inherits from further up the hierarchy.
todo The pre-archive TODO state.
category The category, taken from file name or #+CATEGORY lines.
olpath The outline path to the item. These are all headlines above
@ -80,7 +80,7 @@ information."
(const :tag "File" file)
(const :tag "Category" category)
(const :tag "TODO state" todo)
(const :tag "TODO state" priority)
(const :tag "Priority" priority)
(const :tag "Inherited tags" itags)
(const :tag "Outline path" olpath)
(const :tag "Local tags" ltags)))
@ -135,14 +135,19 @@ archive file is."
files))
(defun org-extract-archive-file (&optional location)
"Extract and expand the file name from archive LOCATION.
if LOCATION is not given, the value of `org-archive-location' is used."
(setq location (or location org-archive-location))
(if (string-match "\\(.*\\)::\\(.*\\)" location)
(if (= (match-beginning 1) (match-end 1))
(buffer-file-name)
(expand-file-name
(format (match-string 1 location) buffer-file-name)))))
(format (match-string 1 location)
(file-name-nondirectory buffer-file-name))))))
(defun org-extract-archive-heading (&optional location)
"Extract the heading from archive LOCATION.
if LOCATION is not given, the value of `org-archive-location' is used."
(setq location (or location org-archive-location))
(if (string-match "\\(.*\\)::\\(.*\\)" location)
(match-string 2 location)))
@ -180,7 +185,7 @@ this heading."
(current-time)))
category todo priority ltags itags
;; end of variables that will be used for saving context
location afile heading buffer level newfile-p)
location afile heading buffer level newfile-p visiting)
;; Find the local archive location
(setq location (org-get-local-archive-location)
@ -191,7 +196,8 @@ this heading."
(if (> (length afile) 0)
(setq newfile-p (not (file-exists-p afile))
buffer (find-file-noselect afile))
visiting (find-buffer-visiting afile)
buffer (or visiting (find-file-noselect afile)))
(setq buffer (current-buffer)))
(unless buffer
(error "Cannot access file \"%s\"" afile))
@ -213,9 +219,9 @@ this heading."
(setq ltags (mapconcat 'identity ltags " ")
itags (mapconcat 'identity itags " "))
;; We first only copy, in case something goes wrong
;; we need to protect this-command, to avoid kill-region sets it,
;; we need to protect `this-command', to avoid kill-region sets it,
;; which would lead to duplication of subtrees
(let (this-command) (org-copy-subtree))
(let (this-command) (org-copy-subtree 1 nil t))
(set-buffer buffer)
;; Enforce org-mode for the archive buffer
(if (not (org-mode-p))
@ -283,12 +289,18 @@ this heading."
(org-entry-put (point) n v)))))
;; Save and kill the buffer, if it is not the same buffer.
(if (not (eq this-buffer buffer))
(progn (save-buffer) (kill-buffer buffer)))))
(when (not (eq this-buffer buffer))
(save-buffer)
;; Check if it is OK to kill the buffer
(unless
(or visiting
(equal (marker-buffer org-clock-marker) (current-buffer)))
(kill-buffer buffer)))
))
;; Here we are back in the original buffer. Everything seems to have
;; worked. So now cut the tree and finish up.
(let (this-command) (org-cut-subtree))
(if (and (not (eobp)) (looking-at "[ \t]*$")) (kill-line))
(setq org-markers-to-move nil)
(message "Subtree archived %s"
(if (eq this-buffer buffer)
(concat "under heading: " heading)
@ -404,4 +416,5 @@ the children that do not contain any open TODO items."
(provide 'org-archive)
;; arch-tag: 0837f601-9699-43c3-8b90-631572ae6c85
;;; org-archive.el ends here

View file

@ -6,7 +6,7 @@
;; Thomas Baumann <thomas dot baumann at ch dot tum dot de>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -30,7 +30,6 @@
;; Org-mode loads this module by default - if this is not what you want,
;; configure the variable `org-modules'.
;; It also implements an interface (based on Ivar Rummelhoff's
;; bbdb-anniv.el) for those org-mode users, who do not use the diary
;; but who do want to include the anniversaries stored in the BBDB
@ -77,7 +76,10 @@
;; 1973-06-22
;; 20??-??-?? wedding
;; 1998-03-12 %s created bbdb-anniv.el %d years ago
;;
;; From Org's agenda, you can use `C-c C-o' to jump to the BBDB
;; link from which the entry at point originates.
;;
;;; Code:
(require 'org)
@ -100,7 +102,7 @@
(declare-function calendar-leap-year-p "calendar" (year))
(declare-function diary-ordinal-suffix "diary-lib" (n))
(defvar date)
(defvar date) ;; dynamically scoped from Org
;; Customization
@ -115,8 +117,16 @@
:require 'bbdb)
(defcustom org-bbdb-anniversary-format-alist
'( ("birthday" . "Birthday: %s (%d%s)")
("wedding" . "%s's %d%s wedding anniversary") )
'(("birthday" lambda
(name years suffix)
(concat "Birthday: [[bbdb:" name "][" name " ("
(number-to-string years)
suffix ")]]"))
("wedding" lambda
(name years suffix)
(concat "[[bbdb:" name "][" name "'s "
(number-to-string years)
suffix " wedding anniversary]]")))
"How different types of anniversaries should be formatted.
An alist of elements (STRING . FORMAT) where STRING is the name of an
anniversary class and format is either:
@ -227,17 +237,19 @@ Argument STR is the anniversary field in BBDB."
(bbdb-string-trim (substring str pos)))
(list str nil))))
(defvar org-bbdb-anniv-hash nil
"A hash holding anniversaries extracted from BBDB.
The hash table is created on first use.")
;;;###autoload
(defun org-bbdb-anniversaries ()
"Extract anniversaries from BBDB for display in the agenda."
(require 'diary-lib)
(let ((dates (list (cons (cons (car date) ; month
(nth 1 date)) ; day
(nth 2 date)))) ; year
(text ())
annivs date years
split class form)
(defvar org-bbdb-updated-p t
"This is non-nil if BBDB has been updated since we last built the hash.")
(defun org-bbdb-make-anniv-hash ()
"Create a hash with anniversaries extracted from BBDB, for fast access.
The anniversaries are assumed to be stored `org-bbdb-anniversary-field'."
(let (split tmp annivs)
(clrhash org-bbdb-anniv-hash)
(dolist (rec (bbdb-records))
(when (setq annivs (bbdb-record-getprop
rec org-bbdb-anniversary-field))
@ -246,33 +258,70 @@ Argument STR is the anniversary field in BBDB."
(setq split (org-bbdb-anniv-split (pop annivs)))
(multiple-value-bind (m d y)
(funcall org-bbdb-extract-date-fun (car split))
(setq tmp (gethash (list m d) org-bbdb-anniv-hash))
(puthash (list m d) (cons (list y
(bbdb-record-name rec)
(cadr split))
tmp)
org-bbdb-anniv-hash))))))
(setq org-bbdb-updated-p nil))
(when (and (or (setq date (assoc (cons m d) dates))
(and (= d 29)
(= m 2)
(setq date (assoc '(3 . 1) dates))
(not (calendar-leap-year-p (cdr date)))))
(< 0 (setq years (- (cdr date) y))))
(let* ((class (or (cadr split)
org-bbdb-default-anniversary-format))
(form (or (cdr (assoc class
org-bbdb-anniversary-format-alist))
class)) ; (as format string)
(name (bbdb-record-name rec))
(suffix (diary-ordinal-suffix years))
(tmp (cond
((functionp form)
(funcall form name years suffix))
((listp form) (eval form))
(t (format form name years suffix)))))
(if text
(setq text (append text (list tmp)))
(setq text (list tmp))))
)))))
(defun org-bbdb-updated (rec)
"Record the fact that BBDB has been updated.
This is used by Org to re-create the anniversary hash table."
(setq org-bbdb-updated-p t))
(add-hook 'bbdb-after-change-hook 'org-bbdb-updated)
;;;###autoload
(defun org-bbdb-anniversaries()
"Extract anniversaries from BBDB for display in the agenda."
(require 'diary-lib)
(unless (hash-table-p org-bbdb-anniv-hash)
(setq org-bbdb-anniv-hash
(make-hash-table :test 'equal :size 366)))
(when (or org-bbdb-updated-p
(= 0 (hash-table-count org-bbdb-anniv-hash)))
(org-bbdb-make-anniv-hash))
(let* ((m (car date)) ; month
(d (nth 1 date)) ; day
(y (nth 2 date)) ; year
(annivs (gethash (list m d) org-bbdb-anniv-hash))
(text ())
split class form rec)
;; we don't want to miss people born on Feb. 29th
(when (and (= m 3) (= d 1) (not (calendar-leap-year-p y)))
(setq annivs (cons annivs (gethash (list 2 29) org-bbdb-anniv-hash))))
(when annivs
(while (setq rec (pop annivs))
(when rec
(let* ((class (or (nth 2 rec)
org-bbdb-default-anniversary-format))
(form (or (cdr (assoc class
org-bbdb-anniversary-format-alist))
class)) ; (as format string)
(name (nth 1 rec))
(years (- y (car rec)))
(suffix (diary-ordinal-suffix years))
(tmp (cond
((functionp form)
(funcall form name years suffix))
((listp form) (eval form))
(t (format form name years suffix)))))
(org-add-props tmp nil 'org-bbdb-name name)
(if text
(setq text (append text (list tmp)))
(setq text (list tmp)))))
))
(when text
(mapconcat 'identity text "; "))))
(provide 'org-bbdb)
;; arch-tag: 9e4f275d-d080-48c1-b040-62247f66b5c2
;;; org-bbdb.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Bastien Guerry <bzg at altern dot org>
;; Carsten Dominik <carsten dot dominik at gmail dot com>
;; Keywords: org, wp, remember
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -200,4 +200,5 @@
(provide 'org-bibtex)
;; arch-tag: 83987d5a-01b8-41c7-85bc-77700f1285f5
;;; org-bibtex.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -97,11 +97,7 @@ The function is called with point at the beginning of the headline."
(defvar org-clock-start-time "")
(defvar org-clock-history nil
"Marker pointing to the previous task teking clock time.
This is used to find back to the previous task after interrupting work.
When clocking into a task and the clock is currently running, this marker
is moved to the position of the currently running task and continues
to point there even after the task is clocked out.")
"List of marker pointing to recent clocked tasks.")
(defvar org-clock-default-task (make-marker)
"Marker pointing to the default task that should clock time.
@ -109,12 +105,11 @@ The clock can be made to switch to this task after clocking out
of a different task.")
(defvar org-clock-interrupted-task (make-marker)
"Marker pointing to the default task that should clock time.
The clock can be made to switch to this task after clocking out
of a different task.")
"Marker pointing to the task that has been interrupted by the current clock.")
(defun org-clock-history-push (&optional pos buffer)
"Push a marker to the clock history."
(setq org-clock-history-length (max 1 (min 35 org-clock-history-length)))
(let ((m (move-marker (make-marker) (or pos (point)) buffer)) n l)
(while (setq n (member m org-clock-history))
(move-marker (car n) nil))
@ -129,6 +124,14 @@ of a different task.")
(nreverse org-clock-history)))))
(push m org-clock-history)))
(defun org-clock-save-markers-for-cut-and-paste (beg end)
"Save relative positions of markers in region."
(org-check-and-save-marker org-clock-marker beg end)
(org-check-and-save-marker org-clock-default-task beg end)
(org-check-and-save-marker org-clock-interrupted-task beg end)
(mapc (lambda (m) (org-check-and-save-marker m beg end))
org-clock-history))
(defun org-clock-select-task (&optional prompt)
"Select a task that recently was associated with clocking."
(interactive)
@ -155,10 +158,14 @@ of a different task.")
(when (marker-buffer m)
(setq i (1+ i)
s (org-clock-insert-selection-line
(string-to-char (number-to-string i)) m))
(if (< i 10)
(+ i ?0)
(+ i (- ?A 10))) m))
(push s sel-list)))
org-clock-history)
(shrink-window-if-larger-than-buffer)
(if (fboundp 'fit-window-to-buffer)
(fit-window-to-buffer)
(shrink-window-if-larger-than-buffer))
(message (or prompt "Select task for clocking:"))
(setq rpl (read-char-exclusive))
(cond
@ -170,14 +177,16 @@ of a different task.")
(defun org-clock-insert-selection-line (i marker)
(when (marker-buffer marker)
(let (file cat task)
(with-current-buffer (marker-buffer marker)
(with-current-buffer (org-base-buffer (marker-buffer marker))
(save-excursion
(goto-char marker)
(setq file (buffer-file-name (marker-buffer marker))
cat (or (org-get-category)
(progn (org-refresh-category-properties)
(org-get-category)))
task (org-get-heading 'notags))))
(save-restriction
(widen)
(goto-char marker)
(setq file (buffer-file-name (marker-buffer marker))
cat (or (org-get-category)
(progn (org-refresh-category-properties)
(org-get-category)))
task (org-get-heading 'notags)))))
(when (and cat task)
(insert (format "[%c] %-15s %s\n" i cat task))
(cons i marker)))))
@ -188,7 +197,7 @@ of a different task.")
(h (floor delta 3600))
(m (floor (- delta (* 3600 h)) 60)))
(setq org-mode-line-string
(propertize (format "-[%d:%02d (%s)]" h m org-clock-heading)
(propertize (format (concat "-[" org-time-clocksum-format " (%s)]") h m org-clock-heading)
'help-echo "Org-mode clock is running"))
(force-mode-line-update)))
@ -204,60 +213,69 @@ is as the default task, a special task that will always be offered in
the clocking selection, associated with the letter `d'."
(interactive "P")
(let ((interrupting (marker-buffer org-clock-marker))
ts selected-task)
ts selected-task target-pos)
(when (equal select '(4))
(setq selected-task (org-clock-select-task "Clock-in on task: "))
(if selected-task
(setq selected-task (copy-marker selected-task))
(error "Abort")))
;; Are we interrupting the clocking of a differnt task?
(if interrupting
(progn
(move-marker org-clock-interrupted-task
(marker-position org-clock-marker)
(marker-buffer org-clock-marker))
(org-clock-out t)))
(when interrupting
;; We are interrupting the clocking of a differnt task.
;; Save a marker to this task, so that we can go back.
(move-marker org-clock-interrupted-task
(marker-position org-clock-marker)
(marker-buffer org-clock-marker))
(org-clock-out t))
(when (equal select '(16))
;; Mark as default clocking task
(save-excursion
(org-back-to-heading t)
(move-marker org-clock-default-task (point))))
(setq target-pos (point)) ;; we want to clock in at this location
(save-excursion
(org-back-to-heading t)
(when (and selected-task (marker-buffer selected-task))
(set-buffer (marker-buffer selected-task))
(goto-char selected-task)
;; There is a selected task, move to the correct buffer
;; and set the new target position.
(set-buffer (org-base-buffer (marker-buffer selected-task)))
(setq target-pos (marker-position selected-task))
(move-marker selected-task nil))
(or interrupting (move-marker org-clock-interrupted-task nil))
(org-clock-history-push)
(when (and org-clock-in-switch-to-state
(not (looking-at (concat outline-regexp "[ \t]*"
org-clock-in-switch-to-state
"\\>"))))
(org-todo org-clock-in-switch-to-state))
(if (and org-clock-heading-function
(functionp org-clock-heading-function))
(setq org-clock-heading (funcall org-clock-heading-function))
(if (looking-at org-complex-heading-regexp)
(setq org-clock-heading (match-string 4))
(setq org-clock-heading "???")))
(setq org-clock-heading (propertize org-clock-heading 'face nil))
(org-clock-find-position)
(insert "\n") (backward-char 1)
(indent-relative)
(insert org-clock-string " ")
(setq org-clock-start-time (current-time))
(setq ts (org-insert-time-stamp (current-time) 'with-hm 'inactive))
(move-marker org-clock-marker (point) (buffer-base-buffer))
(or global-mode-string (setq global-mode-string '("")))
(or (memq 'org-mode-line-string global-mode-string)
(setq global-mode-string
(append global-mode-string '(org-mode-line-string))))
(org-update-mode-line)
(setq org-mode-line-timer (run-with-timer 60 60 'org-update-mode-line))
(message "Clock started at %s" ts))))
(save-excursion
(save-restriction
(widen)
(goto-char target-pos)
(org-back-to-heading t)
(or interrupting (move-marker org-clock-interrupted-task nil))
(org-clock-history-push)
(when (and org-clock-in-switch-to-state
(not (looking-at (concat outline-regexp "[ \t]*"
org-clock-in-switch-to-state
"\\>"))))
(org-todo org-clock-in-switch-to-state))
(if (and org-clock-heading-function
(functionp org-clock-heading-function))
(setq org-clock-heading (funcall org-clock-heading-function))
(if (looking-at org-complex-heading-regexp)
(setq org-clock-heading (match-string 4))
(setq org-clock-heading "???")))
(setq org-clock-heading (propertize org-clock-heading 'face nil))
(org-clock-find-position)
(insert "\n") (backward-char 1)
(indent-relative)
(insert org-clock-string " ")
(setq org-clock-start-time (current-time))
(setq ts (org-insert-time-stamp (current-time) 'with-hm 'inactive))
(move-marker org-clock-marker (point) (buffer-base-buffer))
(or global-mode-string (setq global-mode-string '("")))
(or (memq 'org-mode-line-string global-mode-string)
(setq global-mode-string
(append global-mode-string '(org-mode-line-string))))
(org-update-mode-line)
(setq org-mode-line-timer
(run-with-timer 60 60 'org-update-mode-line))
(message "Clock started at %s" ts))))))
(defun org-clock-find-position ()
"Find the location where the next clock line should be inserted."
@ -288,7 +306,6 @@ the clocking selection, associated with the letter `d'."
;; Wrap current entries into a new drawer
(goto-char last)
(beginning-of-line 2)
(if (org-at-item-p) (org-end-of-item))
(insert ":END:\n")
(beginning-of-line 0)
(org-indent-line-function)
@ -358,7 +375,7 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
(setq global-mode-string
(delq 'org-mode-line-string global-mode-string))
(force-mode-line-update)
(message "Clock stopped at %s after HH:MM = %d:%02d%s" te h m
(message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m
(if remove " => LINE REMOVED" "")))))))
(defun org-clock-cancel ()
@ -387,6 +404,7 @@ With prefix arg SELECT, offer recently clocked tasks."
(error "No task selected")
(error "No active clock")))
(switch-to-buffer (marker-buffer m))
(if (or (< m (point-min)) (> m (point-max))) (widen))
(goto-char m)
(org-show-entry)
(org-back-to-heading)
@ -469,7 +487,7 @@ in the echo area."
(when org-remove-highlights-with-change
(org-add-hook 'before-change-functions 'org-remove-clock-overlays
nil 'local))))
(message "Total file time: %d:%02d (%d hours and %d minutes)" h m h m)))
(message (concat "Total file time: " org-time-clocksum-format " (%d hours and %d minutes)") h m h m)))
(defvar org-clock-overlays nil)
(make-variable-buffer-local 'org-clock-overlays)
@ -481,6 +499,7 @@ This creates a new overlay and stores it in `org-clock-overlays', so that it
will be easy to remove."
(let* ((c 60) (h (floor (/ time 60))) (m (- time (* 60 h)))
(l (if level (org-get-valid-level level 0) 0))
(fmt (concat "%s " org-time-clocksum-format "%s"))
(off 0)
ov tx)
(org-move-to-column c)
@ -489,7 +508,7 @@ will be easy to remove."
(setq ov (org-make-overlay (1- (point)) (point-at-eol))
tx (concat (buffer-substring (1- (point)) (point))
(make-string (+ off (max 0 (- c (current-column)))) ?.)
(org-add-props (format "%s %2d:%02d%s"
(org-add-props (format fmt
(make-string l ?*) h m
(make-string (- 16 l) ?\ ))
'(face secondary-selection))
@ -920,7 +939,6 @@ the currently selected interval size."
(provide 'org-clock)
;;; org-clock.el ends here
;; arch-tag: 7b42c5d4-9b36-48be-97c0-66a869daed4c
;;; org-clock.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -32,6 +32,8 @@
(eval-when-compile (require 'cl))
(require 'org)
(declare-function org-agenda-redo "org-agenda" ())
;;; Column View
(defvar org-columns-overlays nil
@ -90,6 +92,10 @@ This is the compiled version of the format.")
(org-defkey org-columns-map [(meta left)] 'org-columns-move-left)
(org-defkey org-columns-map [(shift meta right)] 'org-columns-new)
(org-defkey org-columns-map [(shift meta left)] 'org-columns-delete)
(dotimes (i 10)
(org-defkey org-columns-map (number-to-string i)
`(lambda () (interactive)
(org-columns-next-allowed-value nil ,i))))
(easy-menu-define org-columns-menu org-columns-map "Org Column Menu"
'("Column"
@ -137,12 +143,11 @@ This is the compiled version of the format.")
(and (eq major-mode 'org-agenda-mode)
(get-text-property (point-at-bol) 'face))
'default))
(color (list :foreground
(face-attribute ref-face :foreground)
:weight 'normal :strike-through nil
:underline nil))
(face (list color 'org-column level-face))
pom property ass width f string ov column val modval)
(color (list :foreground (face-attribute ref-face :foreground)))
(face (list color 'org-column ref-face))
(pl (or (get-text-property (point-at-bol) 'prefix-length) 0))
(cphr (get-text-property (point-at-bol) 'org-complex-heading-regexp))
pom property ass width f string ov column val modval s1 s2)
;; Check if the entry is in another buffer.
(unless props
(if (eq major-mode 'org-agenda-mode)
@ -167,8 +172,13 @@ This is the compiled version of the format.")
f (format "%%-%d.%ds | " width width)
val (or (cdr ass) "")
modval (if (equal property "ITEM")
(org-columns-cleanup-item val org-columns-current-fmt-compiled))
string (format f (or modval val)))
(if (org-mode-p)
(org-columns-cleanup-item
val org-columns-current-fmt-compiled)
(org-agenda-columns-cleanup-item
val pl cphr org-columns-current-fmt-compiled))))
(setq s2 (org-columns-add-ellipses (or modval val) width))
(setq string (format f s2))
;; Create the overlay
(org-unmodified
(setq ov (org-columns-new-overlay
@ -200,6 +210,15 @@ This is the compiled version of the format.")
(min (point-max) (1+ (point-at-eol)))
'read-only "Type `e' to edit property")))))
(defun org-columns-add-ellipses (string width)
"Truncate STRING with WIDTH characters, with ellipses."
(cond
((<= (length string) width) string)
((<= width (length org-columns-ellipses))
(substring org-columns-ellipses 0 width))
(t (concat (substring string 0 (- width (length org-columns-ellipses)))
org-columns-ellipses))))
(defvar org-columns-full-header-line-format nil
"Fthe full header line format, will be shifted by horizontal scrolling." )
(defvar org-previous-header-line-format nil
@ -275,13 +294,40 @@ for the duration of the command.")
(if (not org-complex-heading-regexp)
item
(when (string-match org-complex-heading-regexp item)
(concat
(org-add-props (concat (match-string 1 item) " ") nil
'org-whitespace (* 2 (1- (org-reduced-level (- (match-end 1) (match-beginning 1))))))
(and (match-end 2) (not (assoc "TODO" fmt)) (concat " " (match-string 2 item)))
(and (match-end 3) (not (assoc "PRIORITY" fmt)) (concat " " (match-string 3 item)))
" " (match-string 4 item)
(and (match-end 5) (not (assoc "TAGS" fmt)) (concat " " (match-string 5 item)))))))
(setq item
(concat
(org-add-props (match-string 1 item) nil
'org-whitespace (* 2 (1- (org-reduced-level (- (match-end 1) (match-beginning 1))))))
(and (match-end 2) (not (assoc "TODO" fmt)) (concat " " (match-string 2 item)))
(and (match-end 3) (not (assoc "PRIORITY" fmt)) (concat " " (match-string 3 item)))
" " (save-match-data (org-columns-compact-links (match-string 4 item)))
(and (match-end 5) (not (assoc "TAGS" fmt)) (concat " " (match-string 5 item)))))
(add-text-properties
0 (1+ (match-end 1))
(list 'org-whitespace (* 2 (1- (org-reduced-level (- (match-end 1) (match-beginning 1))))))
item)
item)))
(defun org-columns-compact-links (s)
"Replace [[link][desc]] with [desc] or [link]."
(while (string-match org-bracket-link-regexp s)
(setq s (replace-match
(concat "[" (match-string (if (match-end 3) 3 1) s) "]")
t t s)))
s)
(defvar org-agenda-columns-remove-prefix-from-item)
(defun org-agenda-columns-cleanup-item (item pl cphr fmt)
"Cleanup the tiem property for agenda column view.
See also the variable `org-agenda-columns-remove-prefix-from-item'."
(let* ((org-complex-heading-regexp cphr)
(prefix (substring item 0 pl))
(rest (substring item pl))
(fake (concat "* " rest))
(cleaned (org-trim (substring (org-columns-cleanup-item fake fmt) 1))))
(if org-agenda-columns-remove-prefix-from-item
cleaned
(concat prefix cleaned))))
(defun org-columns-show-value ()
"Show the full value of the property."
@ -381,7 +427,7 @@ Where possible, use the standard interface for changing this line."
(cond
((equal major-mode 'org-agenda-mode)
(org-columns-eval '(org-entry-put pom key nval))
(org-columns-eval eval)
;; The following let preserves the current format, and makes sure
;; that in only a single file things need to be upated.
(let* ((org-agenda-overriding-columns-format org-columns-current-fmt)
@ -411,7 +457,8 @@ Where possible, use the standard interface for changing this line."
"Edit the current headline, the part without TODO keyword, TAGS."
(org-back-to-heading)
(when (looking-at org-todo-line-regexp)
(let ((pre (buffer-substring (match-beginning 0) (match-beginning 3)))
(let ((pos (point))
(pre (buffer-substring (match-beginning 0) (match-beginning 3)))
(txt (match-string 3))
(post "")
txt2)
@ -420,7 +467,7 @@ Where possible, use the standard interface for changing this line."
txt (substring txt 0 (match-beginning 0))))
(setq txt2 (read-string "Edit: " txt))
(when (not (equal txt txt2))
(beginning-of-line 1)
(goto-char pos)
(insert pre txt2 post)
(delete-region (point) (point-at-eol))
(org-set-tags nil t)))))
@ -461,8 +508,10 @@ Where possible, use the standard interface for changing this line."
(interactive)
(org-columns-next-allowed-value t))
(defun org-columns-next-allowed-value (&optional previous)
"Switch to the next allowed value for this column."
(defun org-columns-next-allowed-value (&optional previous nth)
"Switch to the next allowed value for this column.
When PREVIOUS is set, go to the previous value. When NTH is
an integer, select that value."
(interactive)
(org-columns-check-computed)
(let* ((col (current-column))
@ -484,6 +533,9 @@ Where possible, use the standard interface for changing this line."
'(checkbox checkbox-n-of-m checkbox-percent))
'("[ ]" "[X]"))))
nval)
(when (integerp nth)
(setq nth (1- nth))
(if (= nth -1) (setq nth 9)))
(when (equal key "ITEM")
(error "Cannot edit item headline from here"))
(unless (or allowed (member key '("SCHEDULED" "DEADLINE")))
@ -491,11 +543,18 @@ Where possible, use the standard interface for changing this line."
(if (member key '("SCHEDULED" "DEADLINE"))
(setq nval (if previous 'earlier 'later))
(if previous (setq allowed (reverse allowed)))
(if (member value allowed)
(setq nval (car (cdr (member value allowed)))))
(setq nval (or nval (car allowed)))
(if (equal nval value)
(error "Only one allowed value for this property")))
(cond
(nth
(setq nval (nth nth allowed))
(if (not nval)
(error "There are only %d allowed values for property `%s'"
(length allowed) key)))
((member value allowed)
(setq nval (or (car (cdr (member value allowed)))
(car allowed)))
(if (equal nval value)
(error "Only one allowed value for this property")))
(t (setq nval (car allowed)))))
(cond
((equal major-mode 'org-agenda-mode)
(org-columns-eval '(org-entry-put pom key nval))
@ -812,13 +871,18 @@ Don't set this, this is meant for dynamic scoping.")
"Construct the column display again."
(interactive)
(message "Recomputing columns...")
(save-excursion
(if (marker-position org-columns-begin-marker)
(goto-char org-columns-begin-marker))
(org-columns-remove-overlays)
(if (org-mode-p)
(call-interactively 'org-columns)
(call-interactively 'org-agenda-columns)))
(let ((line (org-current-line))
(col (current-column)))
(save-excursion
(if (marker-position org-columns-begin-marker)
(goto-char org-columns-begin-marker))
(org-columns-remove-overlays)
(if (org-mode-p)
(call-interactively 'org-columns)
(org-agenda-redo)
(call-interactively 'org-agenda-columns)))
(goto-line line)
(move-to-column col))
(message "Recomputing columns...done"))
(defun org-columns-not-in-agenda ()
@ -840,7 +904,7 @@ Don't set this, this is meant for dynamic scoping.")
(cond
((eq fmt 'add_times)
(let* ((h (floor n)) (m (floor (+ 0.5 (* 60 (- n h))))))
(format "%d:%02d" h m)))
(format org-time-clocksum-format h m)))
((eq fmt 'checkbox)
(cond ((= n (floor n)) "[X]")
((> n 1.) "[-]")
@ -1212,6 +1276,6 @@ This will add overlays to the date lines, to show the summary for each day."
(provide 'org-colview)
;;; org-colview.el ends here
;; arch-tag: 61f5128d-747c-4983-9479-e3871fa3d73c
;;; org-colview.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -246,8 +246,8 @@ that can be added."
(cadr ext-inv-spec))))
(move-to-column column force)))
(provide 'org-compat)
;; arch-tag: a0a0579f-e68c-4bdf-9e55-93768b846bbe
;;; org-compat.el ends here

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,7 @@
;;
;; Emacs Lisp Archive Entry
;; Filename: org-export-latex.el
;; Version: 6.02b
;; Version: 6.05a
;; Author: Bastien Guerry <bzg AT altern DOT org>
;; Maintainer: Bastien Guerry <bzg AT altern DOT org>
;; Keywords: org, wp, tex
@ -361,12 +361,19 @@ when PUB-DIR is set, use this as the publishing directory."
(let* ((wcf (current-window-configuration))
(opt-plist org-export-latex-options-plist)
(region-p (org-region-active-p))
(rbeg (and region-p (region-beginning)))
(rend (and region-p (region-end)))
(subtree-p
(when region-p
(save-excursion
(goto-char (region-beginning))
(goto-char rbeg)
(and (org-at-heading-p)
(>= (org-end-of-subtree t t) (region-end))))))
(>= (org-end-of-subtree t t) rend)))))
(opt-plist (if subtree-p
(org-export-add-subtree-options opt-plist rbeg)
opt-plist))
;; Make sure the variable contains the updated values.
(org-export-latex-options-plist opt-plist)
(title (or (and subtree-p (org-export-get-title-from-subtree))
(plist-get opt-plist :title)
(and (not
@ -378,8 +385,11 @@ when PUB-DIR is set, use this as the publishing directory."
(or pub-dir
(org-export-directory :LaTeX ext-plist)))
(file-name-sans-extension
(file-name-nondirectory ;sans-extension
buffer-file-name)) ".tex"))
(or (and subtree-p
(org-entry-get rbeg "EXPORT_FILE_NAME" t))
(file-name-nondirectory ;sans-extension
buffer-file-name)))
".tex"))
(filename (if (equal (file-truename filename)
(file-truename buffer-file-name))
(concat filename ".tex")
@ -1094,6 +1104,22 @@ Regexps are those from `org-export-latex-special-string-regexps'."
(replace-match (org-export-latex-protect-string
(concat (match-string 1) "\\LaTeX{}")) t t)))
;; Convert blockquotes
(goto-char (point-min))
(while (re-search-forward "^#\\+BEGIN_QUOTE" nil t)
(replace-match "\\begin{quote}" t t))
(goto-char (point-min))
(while (re-search-forward "^#\\+END_QUOTE" nil t)
(replace-match "\\end{quote}" t t))
;; Convert verse
(goto-char (point-min))
(while (re-search-forward "^#\\+BEGIN_VERSE" nil t)
(replace-match "\\begin{verse}" t t))
(goto-char (point-min))
(while (re-search-forward "^#\\+END_VERSE" nil t)
(replace-match "\\end{verse}" t t))
;; Convert horizontal rules
(goto-char (point-min))
(while (re-search-forward "^----+.$" nil t)
@ -1538,4 +1564,5 @@ Valid parameters are
(provide 'org-export-latex)
;; arch-tag: 23c2b87d-da04-4c2d-ad2d-1eb6487bc3ad
;;; org-export-latex.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -148,13 +148,41 @@ color of the frame."
(defface org-column
(org-compatible-face nil
'((((class color) (min-colors 16) (background light))
(:background "grey90"))
(:background "grey90" :weight normal :slant normal :strike-through nil
:underline nil))
(((class color) (min-colors 16) (background dark))
(:background "grey30"))
(:background "grey30" :weight normal :slant normal :strike-through nil
:underline nil))
(((class color) (min-colors 8))
(:background "cyan" :foreground "black"))
(:background "cyan" :foreground "black"
:weight normal :slant normal :strike-through nil
:underline nil))
(t (:inverse-video t))))
"Face for column display of entry properties."
"Face for column display of entry properties.
This is actually only part of the face definition for the text in column view.
The following faces apply, with this priority.
1. The color of the reference face. This is normally the level fact that
is used in the outline. In agenda-mode, it will be the face of the
first character in the line. The color is explicitly retained to
make sure that the column line still looks a bit like the structure
line it is masking.
2. The `org-column' face.
3. The remaining properties of the reference face.
Since column view works by putting overlays with a display property
over individual characters in the buffer, the face of the underlining
character (this might for example be the a TODO keyword) might still
shine through in some properties. So when your column view looks
funny, with \"random\" colors, weight, strike-through, try to explicitly
set the properties in the `org-column' face. For example, set
:underline to nil, or the :slant to `normal'.
Under XEmacs, the rules are simpler, because the XEmacs version of
column view defines special faces for each outline level. See the file
`org-colview-xemacs.el' for details."
:group 'org-faces)
(defface org-column-title
@ -457,4 +485,5 @@ If it is less than 8, the level-1 face gets re-used for level N+1 etc."
(provide 'org-faces)
;; arch-tag: 9dab5f91-c4b9-4d6f-bac3-1f6211ad0a04
;;; org-faces.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -125,4 +125,5 @@ negates this setting for the duration of the command."
(provide 'org-gnus)
;; arch-tag: 512e0840-58fa-45b3-b456-71e10fa2376d
;;; org-gnus.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -78,4 +78,5 @@
(provide 'org-info)
;; arch-tag: 1e289f54-7176-487f-b575-dd4854bab15e
;;; org-info.el ends here

View file

@ -4,7 +4,7 @@
;;
;; Author: Philip Jackson <emacs@shellarchive.co.uk>
;; Keywords: erc, irc, link, org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -252,4 +252,5 @@ default."
(provide 'org-irc)
;; arch-tag: 018d7dda-53b8-4a35-ba92-6670939e525a
;;; org-irc.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -66,6 +66,7 @@ line in the buffer. See also the variable `org-infojs-options'."
'((path PATH "http://orgmode.org/org-info.js")
(view VIEW "info")
(toc TOC :table-of-contents)
(ftoc FIXED_TOC "0")
(tdepth TOC_DEPTH "max")
(sdepth SECTION_DEPTH "max")
(mouse MOUSE_HINT "underline")
@ -200,6 +201,8 @@ Option settings will replace the %MANAGER-OPTIONS cookie."
(cdr (assoc 'path org-infojs-options))))
(provide 'org-infojs)
(provide 'org-jsinfo)
;; arch-tag: c71d1d85-3337-4817-a066-725e74ac9eac
;;; org-jsinfo.el ends here

View file

@ -3,7 +3,7 @@
;; Copyright (C) 2008 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Version: 6.02b
;; Version: 6.05a
;; Keywords: outlines, hypermedia, calendar, wp
;; This file is part of GNU Emacs.
@ -79,4 +79,5 @@ end tell")))
(provide 'org-mac-message)
;; arch-tag: 3806d0c1-abe1-4db6-9c31-f3ed7d4a9b32
;;; org-mac-message.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -89,9 +89,9 @@ We use a macro so that the test can happen at compilation time."
(defmacro org-with-point-at (pom &rest body)
"Move to buffer and point of point-or-marker POM for the duration of BODY."
`(save-excursion
(if (markerp pom) (set-buffer (marker-buffer pom)))
(if (markerp ,pom) (set-buffer (marker-buffer ,pom)))
(save-excursion
(goto-char (or pom (point)))
(goto-char (or ,pom (point)))
,@body)))
(defmacro org-no-warnings (&rest body)
@ -220,4 +220,5 @@ This is in contrast to merely setting it to 0."
(provide 'org-macs)
;; arch-tag: 7e6a73ce-aac9-4fc0-9b30-ce6f89dc6668
;;; org-macs.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;; This file is part of GNU Emacs.
@ -123,4 +123,5 @@
(provide 'org-mew)
;; arch-tag: 07ccdca7-6020-4941-a593-588a1e51b870
;;; org-mew.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Thomas Baumann <thomas dot baumann at ch dot tum dot de>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -71,6 +71,7 @@ supported by MH-E."
(defvar mh-show-folder-buffer)
(defvar mh-index-folder)
(defvar mh-searcher)
(defvar mh-search-regexp-builder)
;; Install the link type
(org-add-link-type "mhe" 'org-mhe-open)
@ -137,11 +138,11 @@ So if you use sequences, it will now work."
)))
(defun org-mhe-get-message-folder-from-index ()
"Return the name of the message folder in a index folder buffer."
"Return the name of the message folder in an index folder buffer."
(save-excursion
(mh-index-previous-folder)
(re-search-forward "^\\(+.*\\)$" nil t)
(message "%s" (match-string 1))))
(if (re-search-forward "^\\(+.*\\)$" nil t)
(message "%s" (match-string 1)))))
(defun org-mhe-get-message-folder ()
"Return the name of the current message folder.
@ -194,16 +195,19 @@ folders."
(mh-find-path)
(if (not article)
(mh-visit-folder (mh-normalize-folder-name folder))
(setq article (org-add-angle-brackets article))
(mh-search-choose)
(if (equal mh-searcher 'pick)
(progn
(setq article (org-add-angle-brackets article))
(mh-search folder (list "--message-id" article))
(when (and org-mhe-search-all-folders
(not (org-mhe-get-message-real-folder)))
(kill-this-buffer)
(mh-search "+" (list "--message-id" article))))
(mh-search "+" article))
(if mh-search-regexp-builder
(mh-search "+" (funcall mh-search-regexp-builder
(list (cons 'message-id article))))
(mh-search "+" article)))
(if (org-mhe-get-message-real-folder)
(mh-show-msg 1)
(kill-this-buffer)
@ -212,4 +216,5 @@ folders."
(provide 'org-mhe)
;; arch-tag: dcb05484-8627-491d-a8c1-01dbd2bde4ae
;;; org-mhe.el ends here

View file

@ -4,7 +4,7 @@
;;
;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com>
;; Maintainer: Carsten Dominik <carsten at orgmode dot org>
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -1113,3 +1113,5 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:"
(provide 'org-mouse)
;; arch-tag: ff1ae557-3529-41a3-95c6-baaebdcc280f
;;; org-mouse.el ends-here

View file

@ -4,7 +4,7 @@
;; Author: David O'Toole <dto@gnu.org>
;; Maintainer: Bastien Guerry <bzg AT altern DOT org>
;; Keywords: hypermedia, outlines, wp
;; Version: 6.02b
;; Version: 6.05a
;; This file is part of GNU Emacs.
;;
@ -149,15 +149,17 @@
(eval-when-compile
(require 'cl))
(require 'org)
(require 'org-exp)
(eval-and-compile
(unless (fboundp 'declare-function)
(defmacro declare-function (fn file &optional arglist fileonly))))
(defgroup org-publish nil
"Options for publishing a set of Org-mode and related files."
:tag "Org Publishing"
:group 'org)
"Options for publishing a set of Org-mode and related files."
:tag "Org Publishing"
:group 'org)
(defcustom org-publish-project-alist nil
"Association list to control publishing behavior.
@ -195,8 +197,8 @@ being published. Its value may be a string or regexp matching
file names you don't want to be published.
The :include property may be used to include extra files. Its
value may be a list of filenames to include. The filenames are
considered relative to the publishing directory.
value may be a list of filenames to include. The filenames are
considered relative to the base directory.
When both :include and :exclude properties are given values, the
exclusion step happens first.
@ -219,6 +221,8 @@ certain makefile, to ensure published files are built up to date.
:preparation-function Function to be called before publishing
this project.
:completion-function Function to be called after publishing
this project.
Some properties control details of the Org publishing process,
and are equivalent to the corresponding user variables listed in
@ -449,6 +453,11 @@ matching filenames."
;; FIXME distinguish exclude regexp
;; for skip-file and skip-dir?
exclude-regexp exclude-regexp)
(mapc (lambda (f)
(pushnew
(expand-file-name (concat base-dir f))
org-publish-temp-files))
include-list)
org-publish-temp-files))
(defun org-publish-get-project-from-filename (filename)
@ -512,6 +521,8 @@ See `org-publish-org-to' to the list of arguments."
(require 'eshell)
(require 'esh-maint)
(require 'em-unix))
(unless (file-directory-p pub-dir)
(make-directory pub-dir t))
(eshell/cp filename pub-dir))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -559,19 +570,22 @@ See `org-publish-org-to' to the list of arguments."
If :auto-index is set, publish the index too."
(mapc
(lambda (project)
(let* ((project-plist (cdr project))
(exclude-regexp (plist-get project-plist :exclude))
(index-p (plist-get project-plist :auto-index))
(index-filename (or (plist-get project-plist :index-filename)
"index.org"))
(index-function (or (plist-get project-plist :index-function)
'org-publish-org-index))
(preparation-function (plist-get project-plist :preparation-function))
(files (org-publish-get-base-files project exclude-regexp)) file)
(let*
((project-plist (cdr project))
(exclude-regexp (plist-get project-plist :exclude))
(index-p (plist-get project-plist :auto-index))
(index-filename (or (plist-get project-plist :index-filename)
"index.org"))
(index-function (or (plist-get project-plist :index-function)
'org-publish-org-index))
(preparation-function (plist-get project-plist :preparation-function))
(completion-function (plist-get project-plist :completion-function))
(files (org-publish-get-base-files project exclude-regexp)) file)
(when preparation-function (funcall preparation-function))
(if index-p (funcall index-function project index-filename))
(while (setq file (pop files))
(org-publish-file file project))))
(org-publish-file file project))
(when completion-function (funcall completion-function))))
(org-publish-expand-projects projects)))
(defun org-publish-org-index (project &optional index-filename)
@ -581,9 +595,13 @@ Default for INDEX-FILENAME is 'index.org'."
(let* ((project-plist (cdr project))
(dir (file-name-as-directory
(plist-get project-plist :base-directory)))
(localdir (file-name-directory dir))
(indent-str (make-string 2 ?\ ))
(exclude-regexp (plist-get project-plist :exclude))
(files (org-publish-get-base-files project exclude-regexp))
(files (nreverse (org-publish-get-base-files project exclude-regexp)))
(index-filename (concat dir (or index-filename "index.org")))
(index-title (or (plist-get project-plist :index-title)
(concat "Index for project " (car project))))
(index-buffer (find-buffer-visiting index-filename))
(ifn (file-name-nondirectory index-filename))
file)
@ -591,16 +609,47 @@ Default for INDEX-FILENAME is 'index.org'."
(if index-buffer
(kill-buffer index-buffer))
(with-temp-buffer
(insert (concat index-title "\n\n"))
(while (setq file (pop files))
(let ((fn (file-name-nondirectory file)))
(let ((fn (file-name-nondirectory file))
(link (file-relative-name file dir))
(oldlocal localdir))
;; index shouldn't index itself
(unless (string= fn ifn)
(insert (concat " + [[file:" fn "]["
(setq localdir (concat (file-name-as-directory dir)
(file-name-directory link)))
(unless (string= localdir oldlocal)
(if (string= localdir dir)
(setq indent-str (make-string 2 ?\ ))
(let ((subdirs
(split-string
(directory-file-name
(file-name-directory
(file-relative-name localdir dir))) "/"))
(subdir ""))
(setq indent-str (make-string 2 ?\ ))
(dolist (d subdirs)
(setq subdir (concat subdir d "/"))
(insert (concat indent-str " + [[file:" subdir "][" d "/]]\n"))
(setq indent-str (make-string (+ (length indent-str) 2) ?\ ))))))
(insert (concat indent-str " + [[file:" link "]["
(file-name-sans-extension fn)
"]]\n")))))
(write-file index-filename)
(kill-buffer (current-buffer)))))
(defun org-publish-find-title (file)
"Find the title of file in project."
(save-excursion
(set-buffer (find-file-noselect file))
(let* ((opt-plist (org-combine-plists (org-default-export-plist)
(org-infile-export-plist))))
(or (plist-get opt-plist :title)
(and (not
(plist-get opt-plist :skip-before-1st-heading))
(org-export-grab-title-from-buffer))
(file-name-sans-extension file)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Interactive publishing functions
@ -663,4 +712,5 @@ the project."
;; arch-tag: 72807f3c-8af0-4a6b-8dca-c3376eb25adb
;;; org-publish.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -50,9 +50,12 @@
:group 'org)
(defcustom org-remember-store-without-prompt t
"Non-nil means, `C-c C-c' stores remember note without further promts.
In this case, you need `C-u C-c C-c' to get the prompts for
note file and headline.
"Non-nil means, `C-c C-c' stores remember note without further prompts.
It then uses the file and headline specified by the template or (if the
themplate does not specify them) by the variables `org-default-notes-file'
and `org-remember-default-headline'. To force prompting anyway, use
`C-u C-c C-c' to file the note.
When this variable is nil, `C-c C-c' gives you the prompts, and
`C-u C-c C-c' triggers the fasttrack."
:group 'org-remember
@ -99,13 +102,16 @@ it will be interpreted relative to `org-directory'.
An optional fifth element can specify the headline in that file that should
be offered first when the user is asked to file the entry. The default
headline is given in the variable `org-remember-default-headline'.
headline is given in the variable `org-remember-default-headline'. When
this element is `top' or `bottom', the note will be placed as a level-1
entry at the beginning or end of the file, respectively.
An optional sixth element specifies the contexts in which the user can
select the template. This element can be either a list of major modes
or a function. `org-remember' will first check whether the function
returns `t' or if we are in any of the listed major modes, and select
the template accordingly.
An optional sixth element specifies the contexts in which the template
will be offered to the user. This element can be a list of major modes
or a function, and the template will only be offered if `org-remember'
is called from a mode in the list, or if the function returns t.
Templates that specify t or nil for the context will be always be added
to the list of selectable templates.
The template specifies the structure of the remember buffer. It should have
a first line starting with a star, to act as the org-mode headline.
@ -117,19 +123,23 @@ Furthermore, the following %-escapes will be replaced with content:
%t time stamp, date only
%T time stamp with date and time
%u, %U like the above, but inactive time stamps
%^t like %t, but prompt for date. Similarly %^T, %^u, %^U
You may define a prompt like %^{Please specify birthday}t
%^t like %t, but prompt for date. Similarly %^T, %^u, %^U.
You may define a prompt like %^{Please specify birthday
%n user name (taken from `user-full-name')
%a annotation, normally the link created with org-store-link
%i initial content, the region active. If %i is indented,
the entire inserted text will be indented as well.
%c content of the clipboard, or current kill ring head
%c current kill ring head
%x content of the X clipboard
%^C Interactive selection of which kill or clip to use
%^L Like %^C, but insert as link
%^g prompt for tags, with completion on tags in target file
%^G prompt for tags, with completion all tags in all agenda files
%:keyword specific information for certain link types, see below
%[pathname] insert the contents of the file given by `pathname'
%(sexp) evaluate elisp `(sexp)' and replace with the result
%! Store this note immediately after filling the template
%& Visit note immediately after storing it
%? After completing the template, position cursor here.
@ -164,19 +174,34 @@ calendar | %:type %:date"
(string :tag "Name")
(character :tag "Selection Key")
(string :tag "Template")
(choice
(file :tag "Destination file")
(const :tag "Prompt for file" nil))
(choice
(string :tag "Destination headline")
(const :tag "Selection interface for heading"))
(choice
(const :tag "Use by default" nil)
(choice :tag "Destination file"
(file :tag "Specify")
(const :tag "Use `org-default-notes-file'" nil))
(choice :tag "Destin. headline"
(string :tag "Specify")
(const :tag "Use `org-remember-default-headline'" nil)
(const :tag "Level 1 at beginning of file" top)
(const :tag "Level 1 at end of file" bottom))
(choice :tag "Context"
(const :tag "Use in all contexts" nil)
(const :tag "Use in all contexts" t)
(repeat :tag "Use only if in major mode"
(symbol :tag "Major mode"))
(function :tag "Perform a check against function")))))
(defcustom org-remember-clock-out-on-exit 'query
"Non-nil means, stop the clock when exiting a clocking remember buffer.
This only applies if the clock is running in the remember buffer. If the
clock is not stopped, it continues to run in the storage location.
Instead of nil or t, this may also be the symbol `query' to prompt the
user each time a remember buffer with a running clock is filed away. "
:group 'org-remember
:type '(choice
(const :tag "Never" nil)
(const :tag "Always" t)
(const :tag "Query user" query)))
(defvar annotation) ; from remember.el, dynamically scoped in `remember-mode'
(defvar initial) ; from remember.el, dynamically scoped in `remember-mode'
@ -203,6 +228,7 @@ RET on headline -> Store as sublevel entry to current headline
RET at beg-of-buf -> Append to file as level 2 headline
<left>/<right> -> before/after current headline, same headings level")
(defvar org-jump-to-target-location nil)
(defvar org-remember-previous-location nil)
(defvar org-force-remember-template-char) ;; dynamically scoped
@ -289,6 +315,7 @@ This function should be placed into `remember-mode-hook' and in fact requires
to be run from that hook to function properly."
(if org-remember-templates
(let* ((entry (org-select-remember-template use-char))
(ct (or org-overriding-default-time (org-current-time)))
(tpl (car entry))
(plist-p (if org-store-link-plist t nil))
(file (if (and (nth 1 entry) (stringp (nth 1 entry))
@ -300,8 +327,8 @@ to be run from that hook to function properly."
(v-x (or (org-get-x-clipboard 'PRIMARY)
(org-get-x-clipboard 'CLIPBOARD)
(org-get-x-clipboard 'SECONDARY)))
(v-t (format-time-string (car org-time-stamp-formats) (org-current-time)))
(v-T (format-time-string (cdr org-time-stamp-formats) (org-current-time)))
(v-t (format-time-string (car org-time-stamp-formats) ct))
(v-T (format-time-string (cdr org-time-stamp-formats) ct))
(v-u (concat "[" (substring v-t 1 -1) "]"))
(v-U (concat "[" (substring v-T 1 -1) "]"))
;; `initial' and `annotation' are bound in `remember'
@ -394,11 +421,11 @@ to be run from that hook to function properly."
(org-set-local 'org-finish-function 'org-remember-finalize)
(if (and file (string-match "\\S-" file) (not (file-directory-p file)))
(org-set-local 'org-default-notes-file file))
(if (and headline (stringp headline) (string-match "\\S-" headline))
(if headline
(org-set-local 'org-remember-default-headline headline))
;; Interactive template entries
(goto-char (point-min))
(while (re-search-forward "%^\\({\\([^}]*\\)}\\)?\\([gGuUtTCL]\\)?" nil t)
(while (re-search-forward "%^\\({\\([^}]*\\)}\\)?\\([gGtTuUCL]\\)?" nil t)
(setq char (if (match-end 3) (match-string 3))
prompt (if (match-end 2) (match-string 2)))
(goto-char (match-beginning 0))
@ -444,6 +471,7 @@ to be run from that hook to function properly."
'(clipboards . 1)
(car clipboards))))))
(char
;; These are the date/time related ones
(setq org-time-was-given (equal (upcase char) char))
(setq time (org-read-date (equal (upcase char) "U") t nil
prompt))
@ -462,6 +490,11 @@ to be run from that hook to function properly."
(and (re-search-forward "^[^#\n]" nil t) (backward-char 1))))
(org-mode)
(org-set-local 'org-finish-function 'org-remember-finalize))
(when (save-excursion
(goto-char (point-min))
(re-search-forward "%&" nil t))
(replace-match "")
(org-set-local 'org-jump-to-target-location t))
(when (save-excursion
(goto-char (point-min))
(re-search-forward "%!" nil t))
@ -476,15 +509,34 @@ from that hook."
(when org-finish-function
(funcall org-finish-function)))
(defvar org-clock-marker) ; Defined below
(defun org-remember-visit-immediately ()
"File remember note immediately.
This should be run in `post-command-hook' and will remove itself
from that hook."
(org-remember '(16))
(goto-char (or (text-property-any
(point) (save-excursion (org-end-of-subtree t t))
'org-position-cursor t)
(point)))
(message "%s"
(format
(substitute-command-keys
"Restore window configuration with \\[jump-to-register] %c")
remember-register)))
(defvar org-clock-marker) ; Defined in org.el
(defun org-remember-finalize ()
"Finalize the remember process."
(unless (fboundp 'remember-finalize)
(defalias 'remember-finalize 'remember-buffer))
(when (and org-clock-marker
(equal (marker-buffer org-clock-marker) (current-buffer)))
;; FIXME: test this, this is w/o notetaking!
(let (org-log-note-clock-out) (org-clock-out)))
;; the clock is running in this buffer.
(when (and (equal (marker-buffer org-clock-marker) (current-buffer))
(or (eq org-remember-clock-out-on-exit t)
(and org-remember-clock-out-on-exit
(y-or-n-p "The clock is running in this buffer. Clock out now? "))))
(let (org-log-note-clock-out) (org-clock-out))))
(when buffer-file-name
(save-buffer)
(setq buffer-file-name nil))
@ -525,10 +577,14 @@ associated with a template in `org-remember-templates'."
(org-do-remember (buffer-substring (point) (mark)))
(org-do-remember))))))
(defvar org-remember-last-stored-marker (make-marker)
"Marker pointing to the entry most recently stored with `org-remember'.")
(defun org-remember-goto-last-stored ()
"Go to the location where the last remember note was stored."
(interactive)
(bookmark-jump "org-remember-last-stored")
(org-goto-marker-or-bmk org-remember-last-stored-marker
"org-remember-last-stored")
(message "This is the last note stored by remember"))
(defun org-go-to-remember-target (&optional template-key)
@ -594,6 +650,11 @@ also indented so that it starts in the same column as the headline
\(i.e. after the stars).
See also the variable `org-reverse-note-order'."
(when (org-bound-and-true-p org-jump-to-target-location)
(let* ((end (min (point-max) (1+ (point))))
(beg (point)))
(if (= end beg) (setq beg (1- beg)))
(put-text-property beg end 'org-position-cursor t)))
(goto-char (point-min))
(while (looking-at "^[ \t]*\n\\|^##.*\n")
(replace-match ""))
@ -604,7 +665,7 @@ See also the variable `org-reverse-note-order'."
(beginning-of-line 1))
(catch 'quit
(if org-note-abort (throw 'quit nil))
(let* ((txt (buffer-substring (point-min) (point-max)))
(let* ((visitp (org-bound-and-true-p org-jump-to-target-location))
(fastp (org-xor (equal current-prefix-arg '(4))
org-remember-store-without-prompt))
(file (cond
@ -620,46 +681,39 @@ See also the variable `org-reverse-note-order'."
(org-startup-folded nil)
(org-startup-align-all-tables nil)
(org-goto-start-pos 1)
spos exitcmd level indent reversed)
spos exitcmd level reversed txt)
(if (and (equal current-prefix-arg '(16)) org-remember-previous-location)
(setq file (car org-remember-previous-location)
heading (cdr org-remember-previous-location)
fastp t))
(setq current-prefix-arg nil)
(if (string-match "[ \t\n]+\\'" txt)
(setq txt (replace-match "" t t txt)))
;; Modify text so that it becomes a nice subtree which can be inserted
;; into an org tree.
(let* ((lines (split-string txt "\n"))
first)
(setq first (car lines) lines (cdr lines))
(if (string-match "^\\*+ " first)
;; Is already a headline
(setq indent nil)
;; We need to add a headline: Use time and first buffer line
(setq lines (cons first lines)
first (concat "* " (current-time-string)
" (" (remember-buffer-desc) ")")
indent " "))
(if (and org-adapt-indentation indent)
(setq lines (mapcar
(lambda (x)
(if (string-match "\\S-" x)
(concat indent x) x))
lines)))
(setq txt (concat first "\n"
(mapconcat 'identity lines "\n"))))
(if (string-match "\n[ \t]*\n[ \t\n]*\\'" txt)
(setq txt (replace-match "\n\n" t t txt))
(if (string-match "[ \t\n]*\\'" txt)
(setq txt (replace-match "\n" t t txt))))
;; Put the modified text back into the remember buffer, for refile.
(erase-buffer)
(insert txt)
(goto-char (point-min))
(if (re-search-forward "[ \t\n]+\\'" nil t)
;; remove empty lines at end
(replace-match ""))
(goto-char (point-min))
(unless (looking-at org-outline-regexp)
;; add a headline
(insert (concat "* " (current-time-string)
" (" (remember-buffer-desc) ")\n"))
(backward-char 1)
(when org-adapt-indentation
(while (re-search-forward "^" nil t)
(insert " "))))
(goto-char (point-min))
(if (re-search-forward "\n[ \t]*\n[ \t\n]*\\'" nil t)
(replace-match "\n\n")
(if (re-search-forward "[ \t\n]*\\'")
(replace-match "\n")))
(goto-char (point-min))
(setq txt (buffer-string))
(org-save-markers-in-region (point-min) (point-max))
(when (and (eq org-remember-interactive-interface 'refile)
(not fastp))
(org-refile nil (or visiting (find-file-noselect file)))
(and visitp (run-with-idle-timer 0.01 nil 'org-remember-visit-immediately))
(throw 'quit t))
;; Find the file
(if (not visiting) (find-file-noselect file))
@ -671,25 +725,43 @@ See also the variable `org-reverse-note-order'."
(widen)
(and (goto-char (point-min))
(not (re-search-forward "^\\* " nil t))
(insert "\n* " (or heading "Notes") "\n"))
(insert "\n* " (or (and (stringp heading) heading)
"Notes") "\n"))
(setq reversed (org-notes-order-reversed-p))
;; Find the default location
(when (and heading (stringp heading) (string-match "\\S-" heading))
(goto-char (point-min))
(if (re-search-forward
(concat "^\\*+[ \t]+" (regexp-quote heading)
(org-re "\\([ \t]+:[[:alnum:]@_:]*\\)?[ \t]*$"))
nil t)
(setq org-goto-start-pos (match-beginning 0))
(when fastp
(goto-char (point-max))
(unless (bolp) (newline))
(insert "* " heading "\n")
(setq org-goto-start-pos (point-at-bol 0)))))
(when heading
(cond
((eq heading 'top)
(goto-char (point-min))
(or (looking-at org-outline-regexp)
(re-search-forward org-outline-regexp nil t))
(setq org-goto-start-pos (or (match-beginning 0) (point-min))))
((eq heading 'bottom)
(goto-char (point-max))
(re-search-backward "^\\* " nil t)
(or (bolp) (newline))
(setq org-goto-start-pos (point)))
((and (stringp heading) (string-match "\\S-" heading))
(goto-char (point-min))
(if (re-search-forward
(concat "^\\*+[ \t]+" (regexp-quote heading)
(org-re "\\([ \t]+:[[:alnum:]@_:]*\\)?[ \t]*$"))
nil t)
(setq org-goto-start-pos (match-beginning 0))
(when fastp
(goto-char (point-max))
(unless (bolp) (newline))
(insert "* " heading "\n")
(setq org-goto-start-pos (point-at-bol 0)))))
(t (goto-char (point-min)) (setq org-goto-start-pos (point)
heading 'top))))
;; Ask the User for a location, using the appropriate interface
(cond
((and fastp (memq heading '(top bottom)))
(setq spos org-goto-start-pos
exitcmd (if (eq heading 'top) 'left 'right)))
(fastp (setq spos org-goto-start-pos
exitcmd 'return))
((eq org-remember-interactive-interface 'outline)
@ -706,6 +778,7 @@ See also the variable `org-reverse-note-order'."
(t (error "This should not happen")))
(if (not spos) (throw 'quit nil)) ; return nil to show we did
; not handle this note
(and visitp (run-with-idle-timer 0.01 nil 'org-remember-visit-immediately))
(goto-char spos)
(cond ((org-on-heading-p t)
(org-back-to-heading t)
@ -724,17 +797,23 @@ See also the variable `org-reverse-note-order'."
(beginning-of-line 2)
(end-of-line 1)
(insert "\n"))))
(org-paste-subtree (org-get-valid-level level 1) txt)
(and org-auto-align-tags (org-set-tags nil t))
(bookmark-set "org-remember-last-stored")
(org-paste-subtree (org-get-valid-level level 1) txt))
(move-marker org-remember-last-stored-marker (point)))
((eq exitcmd 'left)
;; before current
(org-paste-subtree level txt)
(and org-auto-align-tags (org-set-tags nil t))
(bookmark-set "org-remember-last-stored")
(org-paste-subtree level txt))
(move-marker org-remember-last-stored-marker (point)))
((eq exitcmd 'right)
;; after current
(org-end-of-subtree t)
(org-paste-subtree level txt)
(and org-auto-align-tags (org-set-tags nil t))
(bookmark-set "org-remember-last-stored")
(org-paste-subtree level txt))
(move-marker org-remember-last-stored-marker (point)))
(t (error "This should not happen"))))
((and (bobp) (not reversed))
@ -743,8 +822,10 @@ See also the variable `org-reverse-note-order'."
(widen)
(goto-char (point-max))
(if (not (bolp)) (newline))
(org-paste-subtree (org-get-valid-level 1 1) txt)
(and org-auto-align-tags (org-set-tags nil t))
(bookmark-set "org-remember-last-stored")
(org-paste-subtree (org-get-valid-level 1 1) txt)))
(move-marker org-remember-last-stored-marker (point))))
((and (bobp) reversed)
;; Put it at the start, as level 1
@ -753,18 +834,26 @@ See also the variable `org-reverse-note-order'."
(goto-char (point-min))
(re-search-forward "^\\*+ " nil t)
(beginning-of-line 1)
(org-paste-subtree 1 txt)
(and org-auto-align-tags (org-set-tags nil t))
(bookmark-set "org-remember-last-stored")
(org-paste-subtree 1 txt)))
(move-marker org-remember-last-stored-marker (point))))
(t
;; Put it right there, with automatic level determined by
;; org-paste-subtree or from prefix arg
(bookmark-set "org-remember-last-stored")
(org-paste-subtree
(if (numberp current-prefix-arg) current-prefix-arg)
txt)))
txt)
(and org-auto-align-tags (org-set-tags nil t))
(bookmark-set "org-remember-last-stored")
(move-marker org-remember-last-stored-marker (point))))
(when remember-save-after-remembering
(save-buffer)
(if (not visiting) (kill-buffer (current-buffer)))))))))
(if (and (not visiting)
(not (equal (marker-buffer org-clock-marker)
(current-buffer))))
(kill-buffer (current-buffer)))))))))
t) ;; return t to indicate that we took care of this note.
@ -775,6 +864,6 @@ See also the variable `org-reverse-note-order'."
(provide 'org-remember)
;;; org-remember.el ends here
;; arch-tag: 497f30d0-4bc3-4097-8622-2d27ac5f2698
;;; org-remember.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -105,4 +105,5 @@
(provide 'org-rmail)
;; arch-tag: c6cf4a8b-6639-4b7f-821f-bdf10746b173
;;; org-rmail.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -187,7 +187,7 @@ t: accept as input and present for editing"
(defcustom org-calc-default-modes
'(calc-internal-prec 12
calc-float-format (float 5)
calc-float-format (float 8)
calc-angle-mode deg
calc-prefer-frac nil
calc-symbolic-mode nil
@ -249,12 +249,11 @@ Automatically means, when TAB or RET or C-c C-c are pressed in the line."
:tag "Org Table Import Export"
:group 'org-table)
(defcustom org-table-export-default-format
"orgtbl-to-generic :splice t :sep \"\t\""
(defcustom org-table-export-default-format "orgtbl-to-tsv"
"Default export parameters for org-table-export. These can be
overridden on for a specific table by setting the
TABLE_EXPORT_FORMAT parameter. See orgtbl-export for the
different export transforms and available parameters."
overridden on for a specific table by setting the TABLE_EXPORT_FORMAT
property. See the manual section on orgtbl radio tables for the different
export transformations and available parameters."
:group 'org-table-import-export
:type 'string)
@ -428,7 +427,7 @@ are found, lines will be split on whitespace into fields."
(defvar org-table-last-alignment)
(defvar org-table-last-column-widths)
(defun org-table-export (&optional file format)
"Export table as a tab-separated file.
"Export table to a file, with configurable format.
Such a file can be imported into a spreadsheet program like Excel.
FILE can be the output file name. If not given, it will be taken from
a TABLE_EXPORT_FILE property in the current entry or higher up in the
@ -439,19 +438,33 @@ be found in the variable `org-table-export-default-format', but the function
first checks if there is an export format specified in a TABLE_EXPORT_FORMAT
property, locally or anywhere up in the hierarchy."
(interactive)
(unless (org-at-table-p)
(error "No table at point"))
(require 'org-exp)
(org-table-align) ;; make sure we have everything we need
(let* ((beg (org-table-begin))
(end (org-table-end))
(txt (buffer-substring-no-properties beg end))
(file (or file (org-entry-get beg "TABLE_EXPORT_FILE" t)
(read-file-name "Export table to: ")))
(format (or (org-entry-get beg "TABLE_EXPORT_FORMAT" t)
org-table-export-default-format))
buf)
(unless (or (not (file-exists-p file))
(y-or-n-p (format "Overwrite file %s? " file)))
(error "Abort"))
(message format)
(file (or file (org-entry-get beg "TABLE_EXPORT_FILE" t)))
(format (or format (org-entry-get beg "TABLE_EXPORT_FORMAT" t)))
buf deffmt-readable)
(unless file
(setq file (read-file-name "Export table to: "))
(unless (or (not (file-exists-p file))
(y-or-n-p (format "Overwrite file %s? " file)))
(error "Abort")))
(if (file-directory-p file)
(error "This is a directory path, not a file"))
(if (equal (file-truename file)
(file-truename (buffer-file-name)))
(error "Please specify a file name that is different from current"))
(unless format
(setq deffmt-readable org-table-export-default-format)
(while (string-match "\t" deffmt-readable)
(setq deffmt-readable (replace-match "\\t" t t deffmt-readable)))
(while (string-match "\n" deffmt-readable)
(setq deffmt-readable (replace-match "\\n" t t deffmt-readable)))
(setq format (read-string "Format: " deffmt-readable)))
(if (string-match "\\([^ \t\r\n]+\\)\\( +.*\\)?" format)
(let* ((transform (intern (match-string 1 format)))
@ -2363,7 +2376,7 @@ With prefix arg ALL, do this for all lines in the table."
(goto-char beg)
(and all (message "Re-applying formulas to full table..."))
;; First find the named fields, and mark them untouchanble
;; First find the named fields, and mark them untouchable
(remove-text-properties beg end '(org-untouchable t))
(while (setq eq (pop eqlname))
(setq name (car eq)
@ -2371,8 +2384,11 @@ With prefix arg ALL, do this for all lines in the table."
(and (not a)
(string-match "@\\([0-9]+\\)\\$\\([0-9]+\\)" name)
(setq a (list name
(aref org-table-dlines
(string-to-number (match-string 1 name)))
(condition-case nil
(aref org-table-dlines
(string-to-number (match-string 1 name)))
(error (error "Invalid row number in %s"
name)))
(string-to-number (match-string 2 name)))))
(when (and a (or all (equal (nth 1 a) thisline)))
(message "Re-applying formula to field: %s" name)
@ -3497,7 +3513,7 @@ a radio table."
(goto-char (org-table-begin))
(let (rtn)
(beginning-of-line 0)
(while (looking-at "#\\+ORGTBL: *SEND +\\([a-zA-Z0-9_]+\\) +\\([^ \t\r\n]+\\)\\( +.*\\)?")
(while (looking-at "#\\+ORGTBL[: \t][ \t]*SEND +\\([a-zA-Z0-9_]+\\) +\\([^ \t\r\n]+\\)\\( +.*\\)?")
(let ((name (org-no-properties (match-string 1)))
(transform (intern (match-string 2)))
(params (if (match-end 3)
@ -3629,6 +3645,7 @@ First element has index 0, or I0 if given."
;; Formatting parameters for the current table section.
(defvar *orgtbl-hline* nil "Text used for horizontal lines")
(defvar *orgtbl-sep* nil "Text used as a column separator")
(defvar *orgtbl-default-fmt* nil "Default format for each entry")
(defvar *orgtbl-fmt* nil "Format for each entry")
(defvar *orgtbl-efmt* nil "Format for numbers")
(defvar *orgtbl-lfmt* nil "Format for an entire line, overrides fmt")
@ -3670,7 +3687,9 @@ First element has index 0, or I0 if given."
(orgtbl-apply-fmt efmt (match-string 1 f)
(match-string 2 f))
f)))
(orgtbl-apply-fmt (orgtbl-get-fmt *orgtbl-fmt* i) f)))
(orgtbl-apply-fmt (or (orgtbl-get-fmt *orgtbl-fmt* i)
*orgtbl-default-fmt*)
f)))
line)))
(push (if *orgtbl-lfmt*
(orgtbl-apply-fmt *orgtbl-lfmt* line)
@ -3698,13 +3717,14 @@ TABLE is a list, each entry either the symbol `hline' for a horizontal
separator line, or a list of fields for that line.
PARAMS is a property list of parameters that can influence the conversion.
For the generic converter, some parameters are obligatory: You need to
specify either :lfmt, or all of (:lstart :lend :sep). If you do not use
:splice, you must have :tstart and :tend.
specify either :lfmt, or all of (:lstart :lend :sep).
Valid parameters are
:splice When set to t, return only table body lines, don't wrap
them into :tstart and :tend. Default is nil.
them into :tstart and :tend. Default is nil. When :splice
is non-nil, this also means that the exporter should not look
for and interpret header and footer sections.
:hline String to be inserted on horizontal separation lines.
May be nil to ignore hlines.
@ -3713,8 +3733,8 @@ Valid parameters are
:remove-nil-lines Do not include lines that evaluate to nil.
Each in the following group may be either a string or a function
of no arguments returning a string:
Each in the following group may be either a string or a function
of no arguments returning a string:
:tstart String to start the table. Ignored when :splice is t.
:tend String to end the table. Ignored when :splice is t.
:lstart String to start a new table line.
@ -3722,9 +3742,9 @@ Valid parameters are
:lend String to end a table line
:llend String to end the last table line, defaults to :lend.
Each in the following group may be a string, a function of one
argument (the field or line) returning a string, or a plist
mapping columns to either of the above:
Each in the following group may be a string, a function of one
argument (the field or line) returning a string, or a plist
mapping columns to either of the above:
:lfmt Format for entire line, with enough %s to capture all fields.
If this is present, :lstart, :lend, and :sep are ignored.
:llfmt Format for the entire last line, defaults to :lfmt.
@ -3739,7 +3759,7 @@ Valid parameters are
All lines before the first hline are treated as header.
If any of these is not present, the data line value is used.
This may be either a string or a function of two arguments:
This may be either a string or a function of two arguments:
:efmt Use this format to print numbers with exponentials.
The format should have %s twice for inserting mantissa
and exponent, for example \"%s\\\\times10^{%s}\". This
@ -3768,8 +3788,9 @@ directly by `orgtbl-send-table'. See manual."
;; Put header
(unless splicep
(push (or (orgtbl-eval-str (plist-get params :tstart))
"ERROR: no :tstart") *orgtbl-rtn*))
(when (plist-member params :tstart)
(let ((tstart (orgtbl-eval-str (plist-get params :tstart))))
(if tstart (push tstart *orgtbl-rtn*)))))
;; Do we have a heading section? If so, format it and handle the
;; trailing hline.
@ -3796,13 +3817,24 @@ directly by `orgtbl-send-table'. See manual."
(orgtbl-format-section nil)
(unless splicep
(push (or (orgtbl-eval-str (plist-get params :tend))
"ERROR: no :tend") *orgtbl-rtn*))
(when (plist-member params :tend)
(let ((tend (orgtbl-eval-str (plist-get params :tend))))
(if tend (push tend *orgtbl-rtn*)))))
(mapconcat 'identity (nreverse (if remove-nil-linesp
(remq nil *orgtbl-rtn*)
*orgtbl-rtn*)) "\n")))
(defun orgtbl-to-tsv (table params)
"Convert the orgtbl-mode table to TAB separated material."
(orgtbl-to-generic table (org-combine-plists '(:sep "\t") params)))
(defun orgtbl-to-csv (table params)
"Convert the orgtbl-mode table to CSV material.
This does take care of the proper quoting of fields with comma or quotes."
(orgtbl-to-generic table (org-combine-plists
'(:sep "," :fmt org-quote-csv-field)
params)))
(defun orgtbl-to-latex (table params)
"Convert the orgtbl-mode TABLE to LaTeX.
TABLE is a list, each entry either the symbol `hline' for a horizontal
@ -3908,7 +3940,24 @@ this function is called."
:hlstart "@headitem ")))
(orgtbl-to-generic table (org-combine-plists params2 params))))
(defun orgtbl-to-orgtbl (table params)
"Convert the orgtbl-mode TABLE into another orgtbl-mode table.
Useful when slicing one table into many. The :hline, :sep,
:lstart, and :lend provide orgtbl framing. The default nil :tstart
and :tend suppress strings without splicing; they can be set to
provide ORGTBL directives for the generated table."
(let* ((params2
(list
:tstart nil :tend nil
:hline "|---"
:sep " | "
:lstart "| "
:lend " |"))
(params (org-combine-plists params2 params)))
(orgtbl-to-generic table params)))
(provide 'org-table)
;; arch-tag: 4d21cfdd-0268-440a-84b0-09237a0fe0ef
;;; org-table.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -126,4 +126,5 @@
(provide 'org-vm)
;; arch-tag: cbc3047b-935e-4d2a-96e7-c5b0117aaa6d
;;; org-vm.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.02b
;; Version: 6.05a
;;
;; This file is part of GNU Emacs.
;;
@ -142,4 +142,5 @@
(provide 'org-wl)
;; arch-tag: 29b75a0f-ef2e-430b-8abc-acff75bde54a
;;; org-wl.el ends here

File diff suppressed because it is too large Load diff