Browse Source

Fix commenting lines beginning with a link

* lisp/org.el (org-comment-or-uncomment-region): Fix commenting lines
  beginning with a link.
Nicolas Goaziou 12 years ago
parent
commit
fffc2b980c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lisp/org.el

+ 4 - 1
lisp/org.el

@@ -22071,7 +22071,10 @@ contains commented lines.  Otherwise, comment them."
 	    (goto-char (point-min))
 	    (while (not (eobp))
 	      (unless (and (not comment-empty-lines) (looking-at "[ \t]*$"))
-		(org-move-to-column min-indent t)
+		;; Don't get fooled by invisible text (e.g. link path)
+		;; when moving to column MIN-INDENT.
+		(let ((buffer-invisibility-spec nil))
+		  (org-move-to-column min-indent t))
 		(insert comment-start))
 	      (forward-line))))))))