Bläddra i källkod

Merge branch 'maint'

Bastien Guerry 11 år sedan
förälder
incheckning
11f7fe8408
2 ändrade filer med 13 tillägg och 14 borttagningar
  1. 10 12
      lisp/org-agenda.el
  2. 3 2
      lisp/org.el

+ 10 - 12
lisp/org-agenda.el

@@ -7664,8 +7664,8 @@ When NO-OPERATOR is non-nil, do not add the + operator to returned tags."
 (defun org-agenda-filter-hide-line (type)
   "Hide lines with TYPE in the agenda buffer."
   (let (ov)
-    (setq ov (make-overlay (max (point-min) (point-at-bol))
-			   (1+ (point-at-eol))))
+    (setq ov (make-overlay (max (point-min) (1- (point-at-bol)))
+			   (point-at-eol)))
     (overlay-put ov 'invisible t)
     (overlay-put ov 'type type)
     (cond ((eq type 'tag) (push ov org-agenda-tag-filter-overlays))
@@ -9955,25 +9955,23 @@ current HH:MM time."
   "Drag an agenda line forward by ARG lines.
 When the optional argument `backward' is non-nil, move backward."
   (interactive "p")
-  (let ((inhibit-read-only t) lst)
+  (let ((inhibit-read-only t) lst line)
     (if (or (not (get-text-property (point) 'txt))
 	    (save-excursion
 	      (dotimes (n arg)
 		(move-beginning-of-line (if backward 0 2))
-		(forward-char 1)
 		(push (not (get-text-property (point) 'txt)) lst))
 	      (delq nil lst)))
-	(message "Cannot move line %s" (if backward "backward" "forward"))
-      (let ((end (save-excursion (move-end-of-line 1) (point)))
-	    (col (current-column)) line)
+	(message "Cannot move line forward")
+      (let ((end (save-excursion (move-beginning-of-line 2) (point))))
 	(move-beginning-of-line 1)
 	(setq line (buffer-substring (point) end))
-	(delete-region (point) (1+ end))
-	(move-end-of-line (funcall (if backward '1- '1+) (1- arg)))
-	(insert "\n" line)
-	(org-move-to-column col)
+	(delete-region (point) end)
+	(move-beginning-of-line (funcall (if backward '1- '1+) arg))
+	(insert line)
 	(org-agenda-reapply-filters)
-	(org-agenda-mark-clocking-task)))))
+	(org-agenda-mark-clocking-task)
+	(move-beginning-of-line 0)))))
 
 (defun org-agenda-drag-line-backward (arg)
   "Drag an agenda line backward by ARG lines."

+ 3 - 2
lisp/org.el

@@ -6681,6 +6681,9 @@ in special contexts.
 	(show-all)
 	(org-unlogged-message "Entire buffer visible, including drawers"))
 
+       ;; Try cdlatex TAB completion
+       ((org-try-cdlatex-tab))
+
        ;; Table: enter it or move to the next field.
        ((org-at-table-p 'any)
 	(if (org-at-table.el-p)
@@ -6716,8 +6719,6 @@ in special contexts.
 	     (or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol))))
 	(org-inlinetask-toggle-visibility))
 
-       ((org-try-cdlatex-tab))
-
        ;; At an item/headline: delegate to `org-cycle-internal-local'.
        ((and (or (and org-cycle-include-plain-lists (org-at-item-p))
 		 (save-excursion (beginning-of-line 1)