comparison lisp/org/org-agenda.el @ 100448:cea079b68b76

2008-12-16 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-refile): Avoid refiling to within the region to be refiled. * org-export-latex.el (org-export-latex-special-chars): Replace special characters also in tables. * org-agenda.el (org-agenda-change-all-lines): New argument FORCE-TAGS. (org-agenda-set-tags): Cet the new tags and pas them to `org-format-agenda-item'. 2008-12-16 Carsten Dominik <carsten.dominik@gmail.com> * org-export-latex.el (org-export-latex-classes): Add longable as a default package to all classes. (org-export-latex-tables): Handle the longtable attribute and the align attribute. * org-table.el (orgtbl-to-generic): Handle tables that start with a hline. * org-export-latex.el (org-export-latex-emphasis-alist): Switch to \verb for colde-like snippets. (org-export-as-latex): Fix issues with region export. * org.el (org-up-heading-safe): Speed up function by using a direct regexp search. (org-olpa): New variable. (org-get-outline-path): Speed-up path constructions in cases where this is possible because the entire hierarchy is scanned anyway. (org-refile-get-location): Don't compare the truenames of files, this is too slow. (org-goto-max-level): New option. (org-goto): Use `org-goto-max-level'. 2008-12-16 Tassilo Horn <tassilo@member.fsf.org> * org-gnus.el (org-gnus-article-link, org-gnus-article-link): Strip angle brackets from message-ids in the former and don't do it in the latter. (org-gnus-follow-link): Open summary reliable, even if the last messages were deleted, and handle empty groups, too. 2008-12-16 Carsten Dominik <carsten.dominik@gmail.com> * org-export-latex.el (org-export-latex-emphasis-alist): Use \verb instead of \texttt for the =...= and ~===~ emphasis environments. (org-export-as-latex): Remove any old :org-license-to-kill text properties. (org-export-as-latex): Pass RBEG to `org-export-latex-first-lines'. (org-export-latex-make-header): Add some hard space after the table of contents. (org-export-latex-first-lines): Accept RBEG argument. Mark exported text so that it will be excuded in further steps. * org-table.el (org-table-get-specials): Make @0 reference the last line in a table. (org-table-recalculate): Improve docstring. 2008-12-16 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-log-done): Fix docstring. 2008-12-16 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-html-format-image): Fix bugs. * org-export-latex.el (org-export-latex-tables) (org-export-latex-links): Implement attribute, label, and caption handling. * org-exp.el (org-export-html-style-default): Add style definitions for the figure div. (org-export-preprocess-string, org-export-as-html): Implement attribute, label, and caption handling. (org-export-attach-captions-and-attributes): New function. (org-export-html-format-image): New function. (org-format-org-table-html): Implement attribute, label, and caption handling. * org.el (org-find-text-property-in-string): New function. (org-extract-attributes): Use the property org-attr instead of org-attrobutes, because this property is now set with the #+ATTR lines. 2008-12-16 Carsten Dominik <carsten.dominik@gmail.com> * org-compat.el (org-substring-no-properties): Fix for XEmacs, for the case that FROM is nil. * org.el (org-before-first-heading-p): New function. 2008-12-16 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-as-html): Do not add a space before enforces line breaks. (org-export-as-html): Close paragraph before blockquote and verse tags. 2008-12-16 Carsten Dominik <carsten.dominik@gmail.com> * org-id.el (org-id-locations-file): Wrap file name with `convert-standard-filename'. (org-id-files): New variable. (org-id-use-hash): New option. (org-id-update-id-locations): Also search in all files current listed in `org-id-files'. Convert the resulting alist to a hash if the user customation says so. (org-id-locations-save): Handle he case if `org-id-locations' is a hash. (org-id-locations-load): Convert the alist to a hash. (org-id-add-location): Handle the hast case. (kill-emacs-hook): Make sure id locations are saved when Emacs is exited. (org-id-hash-to-alist, org-id-alist-to-hash) (org-id-paste-tracker): New functions.
author Carsten Dominik <dominik@science.uva.nl>
date Tue, 16 Dec 2008 13:28:37 +0000
parents c851df8e004e
children ba23e35d3eaf
comparison
equal deleted inserted replaced
100447:f84c0729a0e9 100448:cea079b68b76
4 ;; Free Software Foundation, Inc. 4 ;; Free Software Foundation, Inc.
5 5
6 ;; Author: Carsten Dominik <carsten at orgmode dot org> 6 ;; Author: Carsten Dominik <carsten at orgmode dot org>
7 ;; Keywords: outlines, hypermedia, calendar, wp 7 ;; Keywords: outlines, hypermedia, calendar, wp
8 ;; Homepage: http://orgmode.org 8 ;; Homepage: http://orgmode.org
9 ;; Version: 6.14 9 ;; Version: 6.15a
10 ;; 10 ;;
11 ;; This file is part of GNU Emacs. 11 ;; This file is part of GNU Emacs.
12 ;; 12 ;;
13 ;; GNU Emacs is free software: you can redistribute it and/or modify 13 ;; GNU Emacs is free software: you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by 14 ;; it under the terms of the GNU General Public License as published by
5065 (save-excursion 5065 (save-excursion
5066 (and (outline-next-heading) 5066 (and (outline-next-heading)
5067 (org-flag-heading nil))) ; show the next heading 5067 (org-flag-heading nil))) ; show the next heading
5068 (org-add-note)))) 5068 (org-add-note))))
5069 5069
5070 (defun org-agenda-change-all-lines (newhead hdmarker &optional fixface just-this) 5070 (defun org-agenda-change-all-lines (newhead hdmarker
5071 &optional fixface just-this
5072 force-tags)
5071 "Change all lines in the agenda buffer which match HDMARKER. 5073 "Change all lines in the agenda buffer which match HDMARKER.
5072 The new content of the line will be NEWHEAD (as modified by 5074 The new content of the line will be NEWHEAD (as modified by
5073 `org-format-agenda-item'). HDMARKER is checked with 5075 `org-format-agenda-item'). HDMARKER is checked with
5074 `equal' against all `org-hd-marker' text properties in the file. 5076 `equal' against all `org-hd-marker' text properties in the file.
5075 If FIXFACE is non-nil, the face of each item is modified acording to 5077 If FIXFACE is non-nil, the face of each item is modified acording to
5076 the new TODO state." 5078 the new TODO state.
5079 If JUST-THIS is non-nil, change just the current line, not all.
5080 If FORCE-TAGS is non nil, the car of it ar the new tags."
5077 (let* ((inhibit-read-only t) 5081 (let* ((inhibit-read-only t)
5078 (line (org-current-line)) 5082 (line (org-current-line))
5079 props m pl undone-face done-face finish new dotime cat tags) 5083 props m pl undone-face done-face finish new dotime cat tags)
5080 (save-excursion 5084 (save-excursion
5081 (goto-char (point-max)) 5085 (goto-char (point-max))
5086 (or (not just-this) (= (org-current-line) line)) 5090 (or (not just-this) (= (org-current-line) line))
5087 (equal m hdmarker)) 5091 (equal m hdmarker))
5088 (setq props (text-properties-at (point)) 5092 (setq props (text-properties-at (point))
5089 dotime (get-text-property (point) 'dotime) 5093 dotime (get-text-property (point) 'dotime)
5090 cat (get-text-property (point) 'org-category) 5094 cat (get-text-property (point) 'org-category)
5091 tags (get-text-property (point) 'tags) 5095 tags (if force-tags
5096 (car force-tags)
5097 (get-text-property (point) 'tags))
5092 new (org-format-agenda-item "x" newhead cat tags dotime 'noprefix) 5098 new (org-format-agenda-item "x" newhead cat tags dotime 'noprefix)
5093 pl (get-text-property (point) 'prefix-length) 5099 pl (get-text-property (point) 'prefix-length)
5094 undone-face (get-text-property (point) 'undone-face) 5100 undone-face (get-text-property (point) 'undone-face)
5095 done-face (get-text-property (point) 'done-face)) 5101 done-face (get-text-property (point) 'done-face))
5096 (org-move-to-column pl) 5102 (org-move-to-column pl)
5189 (let* ((hdmarker (or (get-text-property (point) 'org-hd-marker) 5195 (let* ((hdmarker (or (get-text-property (point) 'org-hd-marker)
5190 (org-agenda-error))) 5196 (org-agenda-error)))
5191 (buffer (marker-buffer hdmarker)) 5197 (buffer (marker-buffer hdmarker))
5192 (pos (marker-position hdmarker)) 5198 (pos (marker-position hdmarker))
5193 (inhibit-read-only t) 5199 (inhibit-read-only t)
5194 newhead) 5200 newhead tags)
5195 (org-with-remote-undo buffer 5201 (org-with-remote-undo buffer
5196 (with-current-buffer buffer 5202 (with-current-buffer buffer
5197 (widen) 5203 (widen)
5198 (goto-char pos) 5204 (goto-char pos)
5199 (save-excursion 5205 (save-excursion
5201 (save-excursion 5207 (save-excursion
5202 (and (outline-next-heading) 5208 (and (outline-next-heading)
5203 (org-flag-heading nil))) ; show the next heading 5209 (org-flag-heading nil))) ; show the next heading
5204 (goto-char pos) 5210 (goto-char pos)
5205 (call-interactively 'org-set-tags) 5211 (call-interactively 'org-set-tags)
5212 (setq tags (org-get-tags-at))
5206 (end-of-line 1) 5213 (end-of-line 1)
5207 (setq newhead (org-get-heading))) 5214 (setq newhead (org-get-heading)))
5208 (org-agenda-change-all-lines newhead hdmarker) 5215 (org-agenda-change-all-lines newhead hdmarker nil nil (list tags))
5209 (beginning-of-line 1))))) 5216 (beginning-of-line 1)))))
5210 5217
5211 (defun org-agenda-toggle-archive-tag () 5218 (defun org-agenda-toggle-archive-tag ()
5212 "Toggle the archive tag for the current entry." 5219 "Toggle the archive tag for the current entry."
5213 (interactive) 5220 (interactive)
5625 (org-deadline-warning-days 0) 5632 (org-deadline-warning-days 0)
5626 (today (org-date-to-gregorian 5633 (today (org-date-to-gregorian
5627 (time-to-days (current-time)))) 5634 (time-to-days (current-time))))
5628 (files (org-agenda-files 'unrestricted)) entries file) 5635 (files (org-agenda-files 'unrestricted)) entries file)
5629 ;; Get all entries which may contain an appt 5636 ;; Get all entries which may contain an appt
5637 (org-prepare-agenda-buffers files)
5630 (while (setq file (pop files)) 5638 (while (setq file (pop files))
5631 (setq entries 5639 (setq entries
5632 (append entries 5640 (append entries
5633 (org-agenda-get-day-entries 5641 (org-agenda-get-day-entries
5634 file today :timestamp :scheduled :deadline)))) 5642 file today :timestamp :scheduled :deadline))))