소스 검색

org-clean-before-export matches non-special columns spuriously

* org-table.el (org-table-clean-before-export): The regexes match
  spaces in addition to the special characters that might be used in
  the first column as special marking characters.  Remove the space
  from the character class.

  In addition, the `special' variable included a backslash which
  afaict does nothing: delete it.

  The function itself takes an optional parameter which is not used by
  any of the callers: get rid of it.  Getting rid of it allows a small
  simplification of the code.

The bug was found by Thorsten Grothe:

    http://thread.gmane.org/gmane.emacs.orgmode/88634
Nick Dokos 10 년 전
부모
커밋
79873390ed
1개의 변경된 파일3개의 추가작업 그리고 7개의 파일을 삭제
  1. 3 7
      lisp/org-table.el

+ 3 - 7
lisp/org-table.el

@@ -436,15 +436,11 @@ available parameters."
 					   "[ \t]*|[ \t]*")))))))
 
 (defvar org-table-clean-did-remove-column nil) ; dynamically scoped
-(defun org-table-clean-before-export (lines &optional maybe-quoted)
+(defun org-table-clean-before-export (lines)
   "Check if the table has a marking column.
 If yes remove the column and the special lines."
-  (let ((special (if maybe-quoted
-		     "^[ \t]*| *\\\\?[\#!$*_^/ ] *|"
-		   "^[ \t]*| *[\#!$*_^/ ] *|"))
-	(ignore  (if maybe-quoted
-		     "^[ \t]*| *\\\\?[!$_^/] *|"
-		   "^[ \t]*| *[!$_^/] *|")))
+  (let ((special "^[ \t]*| *[#!$*_^/] *|")
+	(ignore "^[ \t]*| *[!$_^/] *|"))
     (setq org-table-clean-did-remove-column
 	  (not (memq nil
 		     (mapcar