Procházet zdrojové kódy

Starting to reverse changes on M-RET.

Carsten Dominik před 17 roky
rodič
revize
acd926f6c2
3 změnil soubory, kde provedl 36 přidání a 10 odebrání
  1. 12 0
      ORGWEBPAGE/Changes.org
  2. 13 2
      org.el
  3. 11 8
      org.texi

+ 12 - 0
ORGWEBPAGE/Changes.org

@@ -5,6 +5,18 @@
 #+EMAIL:  carsten at orgmode dot org
 #+OPTIONS: H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:{} *:t TeX:t LaTeX:nil
 
+* Version 5.23
+
+** Incompatible changes
+
+** Details
+
+   - M-RET can again be used to split a line, but it will keep
+     any tags in the current line.  A lot of people complained
+     about the M-RET in 5.22, so the splitting is back.  I hope
+     everyone can agree that is go to keep tags in place anyway.
+
+
 * Version 5.22
 
 ** Incompatible changes

+ 13 - 2
org.el

@@ -6213,8 +6213,19 @@ but create the new hedline after the current line."
 	 (t
 	  ;; in the middle of the line
 	  (org-show-entry)
-	  (end-of-line 1)
-	  (newline (if blank 2 1))))
+	  (if (and (org-on-heading-p)
+		   (looking-at ".*?\\([ \t]+\\(:[[:alnum:]_@:]+:\\)\\)[ \r\n]"))
+	      ;; protect the tags
+	      (let ((tags (match-string 2)) pos)
+		(delete-region (match-beginning 1) (match-end 1))
+		(setq pos (point-at-bol))
+		(newline (if blank 2 1))
+		(save-excursion
+		  (goto-char pos)
+		  (end-of-line 1)
+		  (insert " " tags)
+		  (org-set-tags nil 'align)))
+	  (newline (if blank 2 1)))))
 	(insert head) (just-one-space)
 	(setq pos (point))
 	(end-of-line 1)

+ 11 - 8
org.texi

@@ -2987,13 +2987,13 @@ DONE@footnote{It is possible that Org-mode will record two time stamps
 when you are using both @code{org-log-done} and state change logging.
 However, it will never prompt for two notes - if you have configured
 both, the state change recording note will take precedence and cancel
-the @samp{Closing Note}.}, and that a special note is recorded when
-switching to WAIT or CANCELED.  The setting for WAIT is even more
-special: The @samp{!} after the slash means that in addition to the note
-taken when entering the state, a time stamp should be recorded when
-@i{leaving} the WAIT state.  This allows you to get a record when
-switching from WAIT back to TODO, without getting one when first turning
-an entry into a TODO.
+the @samp{Closing Note}.}, and that a note is recorded when switching to
+WAIT or CANCELED.  The setting for WAIT is even more special: The
+@samp{!} after the slash means that in addition to the note taken when
+entering the state, a time stamp should be recorded when @i{leaving} the
+WAIT state.  This allows you to get a record when switching from WAIT
+back to TODO, without getting one when first turning an entry into a
+TODO.
 
 You can use the exact same syntax for setting logging preferences local
 to a buffer:
@@ -3117,7 +3117,7 @@ Here is an example of a checkbox list.
 
 Checkboxes work hierarchically, so if a checkbox item has children that
 are checkboxes, toggling one of the children checkboxes will make the
-parent checkbox reflect if none, some, or all o the children are
+parent checkbox reflect if none, some, or all of the children are
 checked.
 
 @cindex statistics, for checkboxes
@@ -3649,6 +3649,9 @@ applies to the entire subtree.
 @item ARCHIVE
 For archiving, the @code{:ARCHIVE:} property may define the archive
 location for the entire subtree (@pxref{Moving subtrees}).
+@item LOGGING
+The LOGGING property may define logging settings for an entry or a
+subtree (@pxref{Tracking TODO state changes}).
 @end table
 
 @node Column view, Property API, Property inheritance, Properties and columns