浏览代码

Release 5.03

Carsten Dominik 17 年之前
父节点
当前提交
0e220abb95
共有 7 个文件被更改,包括 350 次插入275 次删除
  1. 2 1
      Makefile
  2. 205 204
      org
  3. 129 56
      org.el
  4. 二进制
      org.pdf
  5. 13 13
      org.texi
  6. 二进制
      orgcard.pdf
  7. 1 1
      orgcard.tex

+ 2 - 1
Makefile

@@ -27,7 +27,8 @@ infodir = $(prefix)/info
 ##----------------------------------------------------------------------
 
 # Using emacs in batch mode.
-BATCH=$(EMACS) -batch -q
+# BATCH=$(EMACS) -batch -q
+BATCH=$(EMACS) -batch -q -eval "(add-to-list (quote load-path) \"$(lispdir)\")"
 
 # Specify the byte-compiler for compiling org-mode files
 ELC= $(BATCH) -f batch-byte-compile

+ 205 - 204
org

@@ -5,7 +5,7 @@ START-INFO-DIR-ENTRY
 * Org Mode: (org).      Outline-based notes management and organizer
 END-INFO-DIR-ENTRY
 
-   This manual is for Org-mode (version 5.02).
+   This manual is for Org-mode (version 5.03).
 
    Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation
 
@@ -27,7 +27,7 @@ File: org,  Node: Top,  Next: Introduction,  Prev: (dir),  Up: (dir)
 Org Mode Manual
 ***************
 
-This manual is for Org-mode (version 5.02).
+This manual is for Org-mode (version 5.03).
 
    Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation
 
@@ -570,8 +570,8 @@ variable `org-cycle-separator-lines' for modifying this behavior.
 
    ---------- Footnotes ----------
 
-   (1) See the variable `org-special-ctrl-a' to configure special
-behavior of `C-a' in headlines.
+   (1) See the variable `org-special-ctrl-a/e' to configure special
+behavior of `C-a' and `C-e' in headlines.
 
 
 File: org,  Node: Visibility cycling,  Next: Motion,  Prev: Headlines,  Up: Document structure
@@ -2746,7 +2746,8 @@ respectively').
 The following commands work with checkboxes:
 
 `C-c C-c'
-     Toggle checkbox at point.  
+     Toggle checkbox at point.  With prefix argument, set it to `[-]',
+     which is considered to be an intermediate state.  
 
 `C-c C-x C-b'
      Toggle checkbox at point.
@@ -3147,14 +3148,14 @@ File: org,  Node: Column view,  Next: Property API,  Prev: Property searches,  U
 7.4 Column View
 ===============
 
-A great way to view and edit properties in aan outline tree is _column
+A great way to view and edit properties in an outline tree is _column
 view_.  In column view, each outline item is turned into a table row.
 Columns in this table provide access to properties of the entries.
 Org-mode implements columns by overlaying a tabular structure over the
 headline of each item.  While the headlines have been turned into a
 table row, you can still change the visibility of the outline tree.
 For example, you get a compact table by switching to CONTENTS view
-(`S-<TAB> S-<TAB>', or simple `c' while column view is active), but you
+(`S-<TAB> S-<TAB>', or simply `c' while column view is active), but you
 can still open, read, and edit the entry below each headline.  Or, you
 can switch to column view after executing a sparse tree command and in
 this way get a table only for the selected items.  Column view also
@@ -7535,10 +7536,9 @@ Key Index
 * C-':                                   Agenda files.        (line  18)
 * C-,:                                   Agenda files.        (line  18)
 * C-_:                                   Agenda commands.     (line 107)
-* C-a a L:                               Timeline.            (line  10)
 * C-c ! <1>:                             Footnotes.           (line  14)
 * C-c !:                                 Creating timestamps. (line  19)
-* C-c #:                                 Checkboxes.          (line  56)
+* C-c #:                                 Checkboxes.          (line  57)
 * C-c %:                                 Handling links.      (line  81)
 * C-c &:                                 Handling links.      (line  85)
 * C-c ':                                 Editing and debugging formulas.
@@ -7577,6 +7577,7 @@ Key Index
 * C-c a C:                               Storing searches.    (line   9)
 * C-c a e:                               Exporting Agenda Views.
                                                               (line  57)
+* C-c a L:                               Timeline.            (line  10)
 * C-c a M:                               Matching tags and properties.
                                                               (line  15)
 * C-c a m:                               Matching tags and properties.
@@ -7647,7 +7648,7 @@ Key Index
                                                               (line  11)
 * C-c C-x b:                             Visibility cycling.  (line  41)
 * C-c C-x C-a:                           ARCHIVE tag.         (line  28)
-* C-c C-x C-b:                           Checkboxes.          (line  38)
+* C-c C-x C-b:                           Checkboxes.          (line  39)
 * C-c C-x C-c <1>:                       Agenda commands.     (line 218)
 * C-c C-x C-c:                           Using column view.   (line   9)
 * C-c C-x C-d:                           Clocking work time.  (line  35)
@@ -7754,7 +7755,7 @@ Key Index
                                                               (line  74)
 * M-S-<left> <3>:                        Plain lists.         (line  72)
 * M-S-<left>:                            Structure editing.   (line  27)
-* M-S-<RET> <1>:                         Checkboxes.          (line  53)
+* M-S-<RET> <1>:                         Checkboxes.          (line  54)
 * M-S-<RET> <2>:                         Plain lists.         (line  59)
 * M-S-<RET>:                             Structure editing.   (line  18)
 * M-S-<right> <1>:                       The date/time prompt.
@@ -7857,198 +7858,198 @@ Node: Document structure20783
 Node: Outlines21675
 Node: Headlines22335
 Ref: Headlines-Footnote-123343
-Node: Visibility cycling23442
-Ref: Visibility cycling-Footnote-125652
-Ref: Visibility cycling-Footnote-225710
-Ref: Visibility cycling-Footnote-325760
-Node: Motion26030
-Node: Structure editing26984
-Node: Archiving29810
-Node: ARCHIVE tag30368
-Node: Moving subtrees32161
-Node: Sparse trees33472
-Ref: Sparse trees-Footnote-135604
-Ref: Sparse trees-Footnote-235786
-Node: Plain lists35901
-Ref: Plain lists-Footnote-140098
-Ref: Plain lists-Footnote-240456
-Node: Drawers40637
-Node: orgstruct-mode41475
-Node: Tables42375
-Node: Built-in table editor42956
-Node: Narrow columns50195
-Ref: Narrow columns-Footnote-152130
-Node: Column groups52176
-Node: orgtbl-mode53709
-Node: The spreadsheet54512
-Node: References55599
-Ref: References-Footnote-160063
-Node: Formula syntax for Calc60352
-Node: Formula syntax for Lisp62809
-Node: Field formulas64527
-Node: Column formulas65835
-Node: Editing and debugging formulas67434
-Node: Updating the table71587
-Node: Advanced features72622
-Node: Hyperlinks77147
-Node: Link format77920
-Node: Internal links79213
-Ref: Internal links-Footnote-181138
-Node: Radio targets81273
-Node: External links81964
-Node: Handling links84368
-Ref: Handling links-Footnote-189655
-Ref: Handling links-Footnote-289892
-Node: Link abbreviations89966
-Node: Search options91645
-Ref: Search options-Footnote-193425
-Node: Custom searches93506
-Node: Remember94554
-Node: Setting up remember95541
-Node: Remember templates96123
-Ref: Remember templates-Footnote-199569
-Node: Storing notes99667
-Node: TODO items101554
-Node: TODO basics102531
-Node: TODO extensions104295
-Node: Workflow states105114
-Ref: Workflow states-Footnote-1106289
-Node: TODO types106382
-Ref: TODO types-Footnote-1107965
-Node: Multiple sets in one file108047
-Node: Per file keywords109658
-Ref: Per file keywords-Footnote-1110947
-Node: Priorities111148
-Node: Breaking down tasks112758
-Ref: Breaking down tasks-Footnote-1113278
-Node: Checkboxes113374
-Node: Tags116129
-Node: Tag inheritance116901
-Node: Setting tags117838
-Ref: Setting tags-Footnote-1122361
-Ref: Setting tags-Footnote-2122473
-Node: Tag searches122556
-Node: Properties and columns125273
-Node: Property syntax126378
-Node: Special properties128538
-Node: Property searches129454
-Node: Column view130109
-Node: Defining columns131277
-Node: Scope of column definitions131675
-Node: Column attributes132597
-Node: Using column view134845
-Node: Property API136832
-Node: Timestamps137186
-Node: Time stamps137647
-Ref: Time stamps-Footnote-1140075
-Node: Creating timestamps140191
-Node: The date/time prompt142265
-Ref: The date/time prompt-Footnote-1144253
-Node: Custom time format144359
-Node: Deadlines and scheduling146051
-Ref: Deadlines and scheduling-Footnote-1147401
-Node: Inserting deadline/schedule147556
-Node: Repeated tasks148494
-Node: Progress logging150133
-Node: Closing items150788
-Ref: Closing items-Footnote-1151722
-Ref: Closing items-Footnote-2151791
-Node: Tracking TODO state changes151864
-Node: Clocking work time152720
-Ref: Clocking work time-Footnote-1156366
-Ref: Clocking work time-Footnote-2156444
-Node: Agenda views156570
-Node: Agenda files158521
-Ref: Agenda files-Footnote-1159487
-Ref: Agenda files-Footnote-2159636
-Node: Agenda dispatcher159829
-Node: Built-in agenda views161526
-Node: Weekly/Daily agenda162106
-Node: Global TODO list165048
-Node: Matching tags and properties167326
-Node: Timeline168415
-Node: Stuck projects169087
-Node: Presentation and sorting170938
-Node: Categories171729
-Node: Time-of-day specifications172393
-Node: Sorting of agenda items174364
-Node: Agenda commands175646
-Node: Custom agenda views182927
-Node: Storing searches183646
-Node: Block agenda185558
-Node: Setting Options186788
-Node: Exporting Agenda Views189527
-Ref: Exporting Agenda Views-Footnote-1193811
-Ref: Exporting Agenda Views-Footnote-2193868
-Node: Extracting Agenda Information for other programs194054
-Node: Embedded LaTeX198180
-Ref: Embedded LaTeX-Footnote-1199274
-Node: Math symbols199464
-Node: Subscripts and Superscripts200231
-Node: LaTeX fragments201077
-Ref: LaTeX fragments-Footnote-1203313
-Node: Processing LaTeX fragments203575
-Node: CDLaTeX mode204523
-Ref: CDLaTeX mode-Footnote-1207009
-Node: Exporting207157
-Node: ASCII export208471
-Node: HTML export209761
-Node: Export commands210380
-Node: Quoting HTML tags211624
-Node: Links212254
-Node: Images212951
-Ref: Images-Footnote-1213822
-Node: CSS support213883
-Ref: CSS support-Footnote-1215202
-Node: XOXO export215315
-Node: iCalendar export215754
-Node: Text interpretation216973
-Node: Comment lines217564
-Node: Initial text217959
-Node: Footnotes219628
-Node: Enhancing text220443
-Ref: Enhancing text-Footnote-1222302
-Node: Export options222392
-Node: Publishing224337
-Ref: Publishing-Footnote-1225133
-Node: Configuration225277
-Node: Project alist225995
-Node: Sources and destinations227061
-Node: Selecting files227791
-Node: Publishing action228539
-Node: Publishing options229772
-Node: Publishing links231924
-Node: Project page index233437
-Node: Sample configuration234215
-Node: Simple example234707
-Node: Complex example235380
-Node: Triggering publication237456
-Node: Miscellaneous238141
-Node: Completion238775
-Node: Customization240445
-Node: In-buffer settings241028
-Node: The very busy C-c C-c key246367
-Node: Clean view248128
-Node: TTY keys250705
-Node: Interaction252315
-Node: Cooperation252712
-Node: Conflicts255588
-Node: Bugs257591
-Node: Extensions and Hacking259087
-Node: Extensions259758
-Node: Tables in arbitrary syntax261705
-Node: Radio tables262782
-Node: A LaTeX example265285
-Ref: A LaTeX example-Footnote-1268931
-Ref: A LaTeX example-Footnote-2269079
-Node: Translator functions269514
-Ref: Translator functions-Footnote-1272623
-Node: Dynamic blocks272711
-Node: Special agenda views274683
-Ref: Special agenda views-Footnote-1276993
-Node: Using the property API277253
-Node: History and Acknowledgments278734
-Node: Index285118
-Node: Key Index318864
+Node: Visibility cycling23454
+Ref: Visibility cycling-Footnote-125664
+Ref: Visibility cycling-Footnote-225722
+Ref: Visibility cycling-Footnote-325772
+Node: Motion26042
+Node: Structure editing26996
+Node: Archiving29822
+Node: ARCHIVE tag30380
+Node: Moving subtrees32173
+Node: Sparse trees33484
+Ref: Sparse trees-Footnote-135616
+Ref: Sparse trees-Footnote-235798
+Node: Plain lists35913
+Ref: Plain lists-Footnote-140110
+Ref: Plain lists-Footnote-240468
+Node: Drawers40649
+Node: orgstruct-mode41487
+Node: Tables42387
+Node: Built-in table editor42968
+Node: Narrow columns50207
+Ref: Narrow columns-Footnote-152142
+Node: Column groups52188
+Node: orgtbl-mode53721
+Node: The spreadsheet54524
+Node: References55611
+Ref: References-Footnote-160075
+Node: Formula syntax for Calc60364
+Node: Formula syntax for Lisp62821
+Node: Field formulas64539
+Node: Column formulas65847
+Node: Editing and debugging formulas67446
+Node: Updating the table71599
+Node: Advanced features72634
+Node: Hyperlinks77159
+Node: Link format77932
+Node: Internal links79225
+Ref: Internal links-Footnote-181150
+Node: Radio targets81285
+Node: External links81976
+Node: Handling links84380
+Ref: Handling links-Footnote-189667
+Ref: Handling links-Footnote-289904
+Node: Link abbreviations89978
+Node: Search options91657
+Ref: Search options-Footnote-193437
+Node: Custom searches93518
+Node: Remember94566
+Node: Setting up remember95553
+Node: Remember templates96135
+Ref: Remember templates-Footnote-199581
+Node: Storing notes99679
+Node: TODO items101566
+Node: TODO basics102543
+Node: TODO extensions104307
+Node: Workflow states105126
+Ref: Workflow states-Footnote-1106301
+Node: TODO types106394
+Ref: TODO types-Footnote-1107977
+Node: Multiple sets in one file108059
+Node: Per file keywords109670
+Ref: Per file keywords-Footnote-1110959
+Node: Priorities111160
+Node: Breaking down tasks112770
+Ref: Breaking down tasks-Footnote-1113290
+Node: Checkboxes113386
+Node: Tags116235
+Node: Tag inheritance117007
+Node: Setting tags117944
+Ref: Setting tags-Footnote-1122467
+Ref: Setting tags-Footnote-2122579
+Node: Tag searches122662
+Node: Properties and columns125379
+Node: Property syntax126484
+Node: Special properties128644
+Node: Property searches129560
+Node: Column view130215
+Node: Defining columns131382
+Node: Scope of column definitions131780
+Node: Column attributes132702
+Node: Using column view134950
+Node: Property API136937
+Node: Timestamps137291
+Node: Time stamps137752
+Ref: Time stamps-Footnote-1140180
+Node: Creating timestamps140296
+Node: The date/time prompt142370
+Ref: The date/time prompt-Footnote-1144358
+Node: Custom time format144464
+Node: Deadlines and scheduling146156
+Ref: Deadlines and scheduling-Footnote-1147506
+Node: Inserting deadline/schedule147661
+Node: Repeated tasks148599
+Node: Progress logging150238
+Node: Closing items150893
+Ref: Closing items-Footnote-1151827
+Ref: Closing items-Footnote-2151896
+Node: Tracking TODO state changes151969
+Node: Clocking work time152825
+Ref: Clocking work time-Footnote-1156471
+Ref: Clocking work time-Footnote-2156549
+Node: Agenda views156675
+Node: Agenda files158626
+Ref: Agenda files-Footnote-1159592
+Ref: Agenda files-Footnote-2159741
+Node: Agenda dispatcher159934
+Node: Built-in agenda views161631
+Node: Weekly/Daily agenda162211
+Node: Global TODO list165153
+Node: Matching tags and properties167431
+Node: Timeline168520
+Node: Stuck projects169192
+Node: Presentation and sorting171043
+Node: Categories171834
+Node: Time-of-day specifications172498
+Node: Sorting of agenda items174469
+Node: Agenda commands175751
+Node: Custom agenda views183032
+Node: Storing searches183751
+Node: Block agenda185663
+Node: Setting Options186893
+Node: Exporting Agenda Views189632
+Ref: Exporting Agenda Views-Footnote-1193916
+Ref: Exporting Agenda Views-Footnote-2193973
+Node: Extracting Agenda Information for other programs194159
+Node: Embedded LaTeX198285
+Ref: Embedded LaTeX-Footnote-1199379
+Node: Math symbols199569
+Node: Subscripts and Superscripts200336
+Node: LaTeX fragments201182
+Ref: LaTeX fragments-Footnote-1203418
+Node: Processing LaTeX fragments203680
+Node: CDLaTeX mode204628
+Ref: CDLaTeX mode-Footnote-1207114
+Node: Exporting207262
+Node: ASCII export208576
+Node: HTML export209866
+Node: Export commands210485
+Node: Quoting HTML tags211729
+Node: Links212359
+Node: Images213056
+Ref: Images-Footnote-1213927
+Node: CSS support213988
+Ref: CSS support-Footnote-1215307
+Node: XOXO export215420
+Node: iCalendar export215859
+Node: Text interpretation217078
+Node: Comment lines217669
+Node: Initial text218064
+Node: Footnotes219733
+Node: Enhancing text220548
+Ref: Enhancing text-Footnote-1222407
+Node: Export options222497
+Node: Publishing224442
+Ref: Publishing-Footnote-1225238
+Node: Configuration225382
+Node: Project alist226100
+Node: Sources and destinations227166
+Node: Selecting files227896
+Node: Publishing action228644
+Node: Publishing options229877
+Node: Publishing links232029
+Node: Project page index233542
+Node: Sample configuration234320
+Node: Simple example234812
+Node: Complex example235485
+Node: Triggering publication237561
+Node: Miscellaneous238246
+Node: Completion238880
+Node: Customization240550
+Node: In-buffer settings241133
+Node: The very busy C-c C-c key246472
+Node: Clean view248233
+Node: TTY keys250810
+Node: Interaction252420
+Node: Cooperation252817
+Node: Conflicts255693
+Node: Bugs257696
+Node: Extensions and Hacking259192
+Node: Extensions259863
+Node: Tables in arbitrary syntax261810
+Node: Radio tables262887
+Node: A LaTeX example265390
+Ref: A LaTeX example-Footnote-1269036
+Ref: A LaTeX example-Footnote-2269184
+Node: Translator functions269619
+Ref: Translator functions-Footnote-1272728
+Node: Dynamic blocks272816
+Node: Special agenda views274788
+Ref: Special agenda views-Footnote-1277098
+Node: Using the property API277358
+Node: History and Acknowledgments278839
+Node: Index285223
+Node: Key Index318969
 
 End Tag Table

+ 129 - 56
org.el

@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <dominik at science dot uva dot nl>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
-;; Version: 5.02
+;; Version: 5.03
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -83,7 +83,7 @@
 
 ;;; Version
 
-(defconst org-version "5.02"
+(defconst org-version "5.03"
   "The version number of the file org.el.")
 (defun org-version ()
   (interactive)
@@ -489,15 +489,22 @@ the values `folded', `children', or `subtree'."
   :tag "Org Edit Structure"
   :group 'org-structure)
 
-(defcustom org-special-ctrl-a nil
-  "Non-nil means `C-a' behaves specially in headlines.
+
+(defcustom org-special-ctrl-a/e nil
+  "Non-nil means `C-a' and `C-e' behave specially in headlines.
 When set, `C-a' will bring back the cursor to the beginning of the
 headline text, i.e. after the stars and after a possible TODO keyword.
 When the cursor is already at that position, another `C-a' will bring
-it to the beginning of the line."
+it to the beginning of the line.
+`C-e' will jump to the end of the headline, ignoring the presence of tags
+in the headline.  A second `C-e' will then jump to the true end of the
+line, after any tags."
   :group 'org-edit-structure
   :type 'boolean)
 
+(if (fboundp 'defvaralias)
+    (defvaralias 'org-special-ctrl-a 'org-special-ctrl-a/e))
+
 (defcustom org-odd-levels-only nil
   "Non-nil means, skip even levels and only use odd levels for the outline.
 This has the effect that two stars are being added/taken away in
@@ -3408,8 +3415,13 @@ to the part of the headline after the DONE keyword."
   '(org-level-1 org-level-2 org-level-3 org-level-4
     org-level-5 org-level-6 org-level-7 org-level-8
     ))
-(defconst org-n-levels (length org-level-faces))
 
+(defcustom org-n-level-faces (length org-level-faces)
+  "The number different faces to be used for headlines.
+Org-mode defines 8 different headline faces, so this can be at most 8.
+If it is less than 8, the level-1 face gets re-used for level N+1 etc."
+  :type 'number
+  :group 'org-faces)
 
 ;;; Variables for pre-computed regular expressions, all buffer local
 
@@ -3686,7 +3698,7 @@ means to push this value onto the list in the variable.")
 	  org-todo-line-regexp
 	  (concat "^\\(\\*+\\)[ \t]+\\(?:\\("
 		  (mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
-		  "\\)\\>\\)? *\\(.*\\)")
+		  "\\)\\>\\)?[ \t]*\\(.*\\)")
 	  org-nl-done-regexp
 	  (concat "\n\\*+[ \t]+"
 		  "\\(?:" (mapconcat 'regexp-quote org-done-keywords "\\|")
@@ -4461,7 +4473,7 @@ between words."
                    '(org-do-emphasis-faces (0 nil append))
                  '(org-do-emphasis-faces)))
 	   ;; Checkboxes, similar to Frank Ruell's org-checklet.el
-	   '("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]\\)"
+	   '("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[- X]\\]\\)"
 	     2 'bold prepend)
 	   (if org-provide-checkbox-statistics
 	       '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]"
@@ -4514,7 +4526,7 @@ between words."
   "Get the right face for match N in font-lock matching of healdines."
   (setq org-l (- (match-end 2) (match-beginning 1) 1))
   (if org-odd-levels-only (setq org-l (1+ (/ org-l 2))))
-  (setq org-f (nth (% (1- org-l) org-n-levels) org-level-faces))
+  (setq org-f (nth (% (1- org-l) org-n-level-faces) org-level-faces))
   (cond
    ((eq n 1) (if org-hide-leading-stars 'org-hide org-f))
    ((eq n 2) org-f)
@@ -5412,7 +5424,7 @@ If optional TREE is given, use this text instead of the kill ring."
 	 (^re_ (concat "\\(" outline-regexp "\\)[  \t]*"))
 
 	 (old-level (if (string-match ^re txt)
-			(- (match-end 0) (match-beginning 0))
+			(- (match-end 0) (match-beginning 0) 1)
 		      -1))
 	 (force-level (cond (level (prefix-numeric-value level))
 			    ((string-match
@@ -5706,7 +5718,7 @@ Return t when things worked, nil when we are not in an item."
        (save-excursion
 	 (goto-char (match-end 0))
 	 (skip-chars-forward " \t")
-	 (looking-at "\\[[ X]\\]"))))
+	 (looking-at "\\[[- X]\\]"))))
 
 (defun org-toggle-checkbox (&optional arg)
   "Toggle the checkbox in the current line."
@@ -5720,7 +5732,11 @@ Return t when things worked, nil when we are not in an item."
 	(setq beg (point) end (save-excursion (outline-next-heading) (point))))
        ((org-at-item-checkbox-p)
 	(save-excursion
-	  (replace-match (if (equal (match-string 0) "[ ]") "[X]" "[ ]") t t))
+	  (replace-match
+	   (cond (arg "[-]")
+		 ((member (match-string 0) '("[ ]" "[-]")) "[X]")
+		 (t "[ ]"))
+	   t t))
 	(throw 'exit t))
        (t (error "Not at a checkbox or heading, and no active region")))
       (save-excursion
@@ -5754,7 +5770,7 @@ the whole buffer."
 	   (end (move-marker (make-marker)
 			     (progn (outline-next-heading) (point))))
 	   (re "\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)")
-	   (re-box "^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]\\)")
+	   (re-box "^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[- X]\\]\\)")
 	   b1 e1 f1 c-on c-off lim (cstat 0))
       (when all
 	(goto-char (point-min))
@@ -5774,7 +5790,7 @@ the whole buffer."
 	(goto-char e1)
 	(when lim
 	  (while (re-search-forward re-box lim t)
-	    (if (equal (match-string 2) "[ ]")
+	    (if (member (match-string 2) '("[ ]" "[-]"))
 		(setq c-off (1+ c-off))
 	      (setq c-on (1+ c-on))))
 	  (delete-region b1 e1)
@@ -7145,7 +7161,7 @@ Optional argument NEW may specify text to replace the current field content."
 		    (setq n (concat new "|") org-table-may-need-update t)))
 	      (or (equal n o)
 		  (let (org-table-may-need-update)
-		    (replace-match n))))
+		    (replace-match n t t))))
 	  (setq org-table-may-need-update t))
 	(goto-char pos))))))
 
@@ -7316,7 +7332,6 @@ is always the old value."
 	val)
     (forward-char 1) ""))
 
-
 (defun org-table-field-info (arg)
   "Show info about the current field, and highlight any reference at point."
   (interactive "P")
@@ -8723,7 +8738,7 @@ HIGHLIGHT means, just highlight the range."
 	    (goto-line r1)
 	    (while (not (looking-at org-table-dataline-regexp))
 	      (beginning-of-line 2))
-	    (prog1 (org-table-get-field c1)
+	    (prog1 (org-trim (org-table-get-field c1))
 	      (if highlight (org-table-highlight-rectangle (point) (point)))))
 	;; A range, return a vector
 	;; First sort the numbers to get a regular ractangle
@@ -8743,7 +8758,8 @@ HIGHLIGHT means, just highlight the range."
 	    (org-table-highlight-rectangle
 	     beg (progn (skip-chars-forward "^|\n") (point))))
 	;; return string representation of calc vector
-	(apply 'append (org-table-copy-region beg end))))))
+	(mapcar 'org-trim
+		(apply 'append (org-table-copy-region beg end)))))))
 
 (defun org-table-get-descriptor-line (desc &optional cline bline table)
   "Analyze descriptor DESC and retrieve the corresponding line number.
@@ -9327,10 +9343,10 @@ With prefix ARG, apply the new formulas to the table."
      ((looking-at "[ \t]")
       (goto-char pos)
       (call-interactively 'lisp-indent-line))
-     ((looking-at "[$@0-9a-zA-Z]+ *= *[^ \t\n']") (goto-char pos))
+     ((looking-at "[$&@0-9a-zA-Z]+ *= *[^ \t\n']") (goto-char pos))
      ((not (fboundp 'pp-buffer))
       (error "Cannot pretty-print.  Command `pp-buffer' is not available."))
-     ((looking-at "[$@0-9a-zA-Z]+ *= *'(")
+     ((looking-at "[$&@0-9a-zA-Z]+ *= *'(")
       (goto-char (- (match-end 0) 2))
       (setq beg (point))
       (setq ind (make-string (current-column) ?\ ))
@@ -10814,9 +10830,10 @@ With three \\[universal-argument] prefixes, negate the meaning of
 	  (setq link (org-completing-read
 		      "Link: "
 		      (append
-		       (mapcar (lambda (x) (concat (car x) ":"))
+		       (mapcar (lambda (x) (list (concat (car x) ":")))
 			       (append org-link-abbrev-alist-local org-link-abbrev-alist))
-		       (mapcar (lambda (x) (concat x ":")) org-link-types))
+		       (mapcar (lambda (x) (list (concat x ":")))
+			       org-link-types))
 		      nil nil nil
 		      'tmphist
 		      (or (car (car org-stored-links)))))
@@ -11810,7 +11827,8 @@ to be run from that hook to fucntion properly."
 	     (org-startup-folded nil)
 	     org-time-was-given org-end-time-was-given x prompt char time)
 	(setq org-store-link-plist
-	      (append (list :annotation v-a :initial v-i)))
+	      (append (list :annotation v-a :initial v-i)
+		      org-store-link-plist))
 	(unless tpl (setq tpl "")	(message "No template") (ding))
 	(erase-buffer)
 	(insert (substitute-command-keys
@@ -13085,6 +13103,29 @@ also TODO lines."
 (defvar org-tags-overlay (org-make-overlay 1 1))
 (org-detach-overlay org-tags-overlay)
 
+(defun org-align-tags-here (to-col)
+  ;; Assumes that this is a headline
+  (let ((pos (point)) (col (current-column)) tags)
+    (beginning-of-line 1)
+    (if	(and (looking-at (org-re ".*?\\([ \t]+\\)\\(:[[:alnum:]_@:]+:\\)[ \t]*$"))
+	     (< pos (match-beginning 2)))
+	(progn
+	  (setq tags (match-string 2))
+	  (goto-char (match-beginning 1))
+	  (insert " ")
+	  (delete-region (point) (1+ (match-end 0)))
+	  (backward-char 1)
+	  (move-to-column
+	   (max (1+ (current-column))
+		(1+ col)
+		(if (> to-col 0)
+		    to-col
+		  (- (abs to-col) (length tags))))
+	   t)
+	  (insert tags)
+	  (move-to-column (min (current-column) col) t))
+      (goto-char pos))))
+
 (defun org-set-tags (&optional arg just-align)
   "Set the tags for the current headline.
 With prefix ARG, realign all tags in headings in the current buffer."
@@ -13123,30 +13164,31 @@ With prefix ARG, realign all tags in headings in the current buffer."
 	(while (string-match "[-+&]+" tags)
 	  ;; No boolean logic, just a list
 	  (setq tags (replace-match ":" t t tags))))
-
+      
       (if (string-match "\\`[\t ]*\\'" tags)
           (setq tags "")
 	(unless (string-match ":$" tags) (setq tags (concat tags ":")))
 	(unless (string-match "^:" tags) (setq tags (concat ":" tags))))
-
+      
       ;; Insert new tags at the correct column
       (beginning-of-line 1)
-      (if (re-search-forward
-	   (concat "\\([ \t]*" (regexp-quote current) "\\)[ \t]*$")
-	   (point-at-eol) t)
-	  (progn
-	    (if (equal tags "")
-		(setq rpl "")
-	      (goto-char (match-beginning 0))
-	      (setq c0 (current-column) p0 (point)
-		    c1 (max (1+ c0) (if (> org-tags-column 0)
-					org-tags-column
-				      (- (- org-tags-column) (length tags))))
-		    rpl (concat (make-string (max 0 (- c1 c0)) ?\ ) tags)))
-	    (replace-match rpl t t)
-	    (and (not (featurep 'xemacs)) c0 (tabify p0 (point)))
-	    tags)
-	(error "Tags alignment failed")))))
+      (cond
+       ((and (equal current "") (equal tags "")))
+       ((re-search-forward
+	 (concat "\\([ \t]*" (regexp-quote current) "\\)[ \t]*$")
+	 (point-at-eol) t)
+	(if (equal tags "")
+	    (setq rpl "")
+	  (goto-char (match-beginning 0))
+	  (setq c0 (current-column) p0 (point)
+		c1 (max (1+ c0) (if (> org-tags-column 0)
+				    org-tags-column
+				  (- (- org-tags-column) (length tags))))
+		rpl (concat (make-string (max 0 (- c1 c0)) ?\ ) tags)))
+	(replace-match rpl t t)
+	(and (not (featurep 'xemacs)) c0 (tabify p0 (point)))
+	tags)
+       (t (error "Tags alignment failed"))))))
 
 (defun org-tags-completion-function (string predicate &optional flag)
   (let (s1 s2 rtn (ctable org-last-tags-completion-table)
@@ -13831,10 +13873,12 @@ This is the compiled version of the format.")
   (interactive)
   (let* ((fmt org-columns-current-fmt-compiled)
 	 (beg (point-at-bol))
+	 (level-face (save-excursion
+		       (beginning-of-line 1)
+		       (looking-at "\\(\\**\\)\\(\\* \\)")
+		       (org-get-level-face 2)))
 	 (color (list :foreground 
-		      (face-attribute
-		       (or (get-text-property beg 'face) 'default)
-		       :foreground)))
+		      (face-attribute (or level-face 'default) :foreground)))
 	 props pom property ass width f string ov column)
     ;; Check if the entry is in another buffer.
     (unless props
@@ -18224,8 +18268,8 @@ HH:MM."
 
 (defsubst org-cmp-category (a b)
   "Compare the string values of categories of strings A and B."
-  (let ((ca (or (get-text-property 1 'category a) ""))
-	(cb (or (get-text-property 1 'category b) "")))
+  (let ((ca (or (get-text-property 1 'org-category a) ""))
+	(cb (or (get-text-property 1 'org-category b) "")))
     (cond ((string-lessp ca cb) -1)
 	  ((string-lessp cb ca) +1)
 	  (t nil))))
@@ -22400,7 +22444,13 @@ overwritten, and the table is not marked as requiring realignment."
 	(goto-char (match-beginning 0))
 	(self-insert-command N))
     (setq org-table-may-need-update t)
-    (self-insert-command N)))
+    (self-insert-command N)
+    (org-fix-tags-on-the-fly)))
+
+(defun org-fix-tags-on-the-fly ()
+  (when (and (equal (char-after (point-at-bol)) ?*)
+	     (org-on-heading-p))
+    (org-align-tags-here org-tags-column)))
 
 (defun org-delete-backward-char (N)
   "Like `delete-backward-char', insert whitespace at field end in tables.
@@ -22423,7 +22473,8 @@ because, in this case the deletion might narrow the column."
 	;; noalign: if there were two spaces at the end, this field
 	;; does not determine the width of the column.
 	(if noalign (setq org-table-may-need-update c)))
-    (backward-delete-char N)))
+    (backward-delete-char N)
+    (org-fix-tags-on-the-fly)))
 
 (defun org-delete-char (N)
   "Like `delete-char', but insert whitespace at field end in tables.
@@ -22448,7 +22499,8 @@ because, in this case the deletion might narrow the column."
 	    ;; does not determine the width of the column.
 	    (if noalign (setq org-table-may-need-update c)))
 	(delete-char N))
-    (delete-char N)))
+    (delete-char N)
+    (org-fix-tags-on-the-fly)))
 
 ;; Make `delete-selection-mode' work with org-mode and orgtbl-mode
 (put 'org-self-insert-command 'delete-selection t)
@@ -22884,9 +22936,9 @@ See the individual commands for more information."
      "--"
      ["Jump" org-goto t]
      "--"
-     ["C-a finds headline start"
-      (setq org-special-ctrl-a (not org-special-ctrl-a))
-      :style toggle :selected org-special-ctrl-a])
+     ["C-a/e find headline start/end"
+      (setq org-special-ctrl-a/e (not org-special-ctrl-a/e))
+      :style toggle :selected org-special-ctrl-a/e])
     ("Edit Structure"
      ["Move Subtree Up" org-shiftmetaup (not (org-at-table-p))]
      ["Move Subtree Down" org-shiftmetadown (not (org-at-table-p))]
@@ -23434,10 +23486,13 @@ work correctly."
 
 ;; C-a should go to the beginning of a *visible* line, also in the
 ;; new outline.el.  I guess this should be patched into Emacs?
-(defun org-beginning-of-line ()
+(defun org-beginning-of-line (&optional arg)
   "Go to the beginning of the current line.  If that is invisible, continue
-to a visible line beginning.  This makes the function of C-a more intuitive."
-  (interactive)
+to a visible line beginning.  This makes the function of C-a more intuitive.
+If this is a headline, and `org-special-ctrl-a/e' is set, ignore tags on the
+first attempt, and only move to after the tags when the cursor is already
+beyond the end of the headline."
+  (interactive "P")
   (let ((pos (point)))
     (beginning-of-line 1)
     (if (bobp)
@@ -23448,14 +23503,32 @@ to a visible line beginning.  This makes the function of C-a more intuitive."
 	    (backward-char 1)
 	    (beginning-of-line 1))
 	(forward-char 1)))
-    (when (and org-special-ctrl-a (looking-at org-todo-line-regexp)
+    (when (and org-special-ctrl-a/e (looking-at org-todo-line-regexp)
 	       (= (char-after (match-end 1)) ?\ ))
       (goto-char
        (cond ((> pos (match-beginning 3)) (match-beginning 3))
 	     ((= pos (point)) (match-beginning 3))
 	     (t (point)))))))
 
+(defun org-end-of-line (&optional arg)
+  "Go to the end of the line.
+If this is a headline, and `org-special-ctrl-a/e' is set, ignore tags on the
+first attempt, and only move to after the tags when the cursor is already
+beyond the end of the headline."
+  (interactive "P")
+  (if (or (not org-special-ctrl-a/e)
+	  (not (org-on-heading-p)))
+      (end-of-line arg)
+    (let ((pos (point)))
+      (beginning-of-line 1)
+      (if (looking-at (org-re ".*?\\([ \t]*\\)\\(:[[:alnum:]_@:]+:\\)[ \t]*$"))
+	  (if (or (< pos (match-beginning 1))
+		  (= pos (match-end 0)))
+	      (goto-char (match-beginning 1))
+	    (goto-char (match-end 0)))))))
+
 (define-key org-mode-map "\C-a" 'org-beginning-of-line)
+(define-key org-mode-map "\C-e" 'org-end-of-line)
 
 (defun org-invisible-p ()
   "Check if point is at a character currently not visible."

二进制
org.pdf


+ 13 - 13
org.texi

@@ -3,7 +3,7 @@
 @setfilename ../info/org
 @settitle Org Mode Manual
 
-@set VERSION 5.02
+@set VERSION 5.03
 @set DATE July 2007
 
 @dircategory Emacs
@@ -616,8 +616,8 @@ key.
 
 Headlines define the structure of an outline tree.  The headlines in
 Org-mode start with one or more stars, on the left margin@footnote{See
-the variable @code{org-special-ctrl-a} to configure special behavior of
-@kbd{C-a} in headlines.}.  For example:
+the variable @code{org-special-ctrl-a/e} to configure special behavior
+of @kbd{C-a} and @kbd{C-e} in headlines.}.  For example:
 
 @example
 * Top level headline
@@ -3033,7 +3033,8 @@ percentage of checkboxes checked (in the above example, this would be
 @table @kbd
 @kindex C-c C-c
 @item C-c C-c
-Toggle checkbox at point.
+Toggle checkbox at point.  With prefix argument, set it to @samp{[-]},
+which is considered to be an intermediate state.
 @kindex C-c C-x C-b
 @item C-c C-x C-b
 Toggle checkbox at point.
@@ -3452,20 +3453,19 @@ the regular expression @samp{Sarah\|Denny}.
 @node Column view, Property API, Property searches, Properties and columns
 @section Column View
 
-A great way to view and edit properties in aan outline tree is
+A great way to view and edit properties in an outline tree is
 @emph{column view}.  In column view, each outline item is turned into a
 table row.  Columns in this table provide access to properties of the
 entries.  Org-mode implements columns by overlaying a tabular structure
 over the headline of each item.  While the headlines have been turned
 into a table row, you can still change the visibility of the outline
 tree.  For example, you get a compact table by switching to CONTENTS
-view (@kbd{S-@key{TAB} S-@key{TAB}}, or simple @kbd{c} while column view
-is active), but you can still open, read, and
-edit the entry below each headline.  Or, you can switch to column view
-after executing a sparse tree command and in this way get a table only
-for the selected items.  Column view also works in agenda buffers
-(@pxref{Agenda views}) where queries have collected selected items,
-possibly from a number of files.
+view (@kbd{S-@key{TAB} S-@key{TAB}}, or simply @kbd{c} while column view
+is active), but you can still open, read, and edit the entry below each
+headline.  Or, you can switch to column view after executing a sparse
+tree command and in this way get a table only for the selected items.
+Column view also works in agenda buffers (@pxref{Agenda views}) where
+queries have collected selected items, possibly from a number of files.
 
 @menu
 * Defining columns::            The COLUMNS format property
@@ -4490,7 +4490,7 @@ file in a @emph{time-sorted view}.  The main purpose of this command is
 to give an overview over events in a project.
 
 @table @kbd
-@kindex C-a a L
+@kindex C-c a L
 @item C-c a L
 Show a time-sorted view of the org file, with all time-stamped items.
 When called with a @kbd{C-u} prefix, all unfinished TODO entries

二进制
orgcard.pdf


+ 1 - 1
orgcard.tex

@@ -1,5 +1,5 @@
 % Reference Card for Org Mode
-\def\orgversionnumber{5.02}
+\def\orgversionnumber{5.03}
 \def\versionyear{2007}          % latest update
 \def\year{2007}                 % latest copyright year