Procházet zdrojové kódy

Fix many small typos.

Bastien Guerry před 12 roky
rodič
revize
09743f48d6

+ 1 - 1
lisp/ob-calc.el

@@ -71,7 +71,7 @@
 		     (cond
 		     (cond
 		      ((numberp res) res)
 		      ((numberp res) res)
 		      ((math-read-number res) (math-read-number res))
 		      ((math-read-number res) (math-read-number res))
-		      ((listp res) (error "calc error \"%s\" on input \"%s\""
+		      ((listp res) (error "Calc error \"%s\" on input \"%s\""
 					  (cadr res) line))
 					  (cadr res) line))
 		      (t (replace-regexp-in-string
 		      (t (replace-regexp-in-string
 			  "'" ""
 			  "'" ""

+ 2 - 2
lisp/ob-comint.el

@@ -51,7 +51,7 @@ executed inside the protection of `save-excursion' and
   `(save-excursion
   `(save-excursion
      (save-match-data
      (save-match-data
        (unless (org-babel-comint-buffer-livep ,buffer)
        (unless (org-babel-comint-buffer-livep ,buffer)
-         (error "buffer %s doesn't exist or has no process" ,buffer))
+         (error "Buffer %s does not exist or has no process" ,buffer))
        (set-buffer ,buffer)
        (set-buffer ,buffer)
        ,@body)))
        ,@body)))
 (def-edebug-spec org-babel-comint-in-buffer (form body))
 (def-edebug-spec org-babel-comint-in-buffer (form body))
@@ -147,7 +147,7 @@ statement (not large blocks of code)."
 Don't return until FILE exists.  Code in STRING must ensure that
 Don't return until FILE exists.  Code in STRING must ensure that
 FILE exists at end of evaluation."
 FILE exists at end of evaluation."
   (unless (org-babel-comint-buffer-livep buffer)
   (unless (org-babel-comint-buffer-livep buffer)
-    (error "buffer %s doesn't exist or has no process" buffer))
+    (error "Buffer %s does not exist or has no process" buffer))
   (if (file-exists-p file) (delete-file file))
   (if (file-exists-p file) (delete-file file))
   (process-send-string
   (process-send-string
    (get-buffer-process buffer)
    (get-buffer-process buffer)

+ 3 - 3
lisp/ob-fortran.el

@@ -108,19 +108,19 @@ it's header arguments."
   "Wrap body in a \"program ... end program\" block if none exists."
   "Wrap body in a \"program ... end program\" block if none exists."
   (if (string-match "^[ \t]*program[ \t]*.*" (capitalize body))
   (if (string-match "^[ \t]*program[ \t]*.*" (capitalize body))
       (let ((vars (mapcar #'cdr (org-babel-get-header params :var))))
       (let ((vars (mapcar #'cdr (org-babel-get-header params :var))))
-	(if vars (error "cannot use :vars if 'program' statement is present"))
+	(if vars (error "Cannot use :vars if 'program' statement is present"))
 	body)
 	body)
     (format "program main\n%s\nend program main\n" body)))
     (format "program main\n%s\nend program main\n" body)))
 
 
 (defun org-babel-prep-session:fortran (session params)
 (defun org-babel-prep-session:fortran (session params)
   "This function does nothing as fortran is a compiled language with no
   "This function does nothing as fortran is a compiled language with no
 support for sessions"
 support for sessions"
-  (error "fortran is a compiled languages -- no support for sessions"))
+  (error "Fortran is a compiled languages -- no support for sessions"))
 
 
 (defun org-babel-load-session:fortran (session body params)
 (defun org-babel-load-session:fortran (session body params)
   "This function does nothing as fortran is a compiled language with no
   "This function does nothing as fortran is a compiled language with no
 support for sessions"
 support for sessions"
-  (error "fortran is a compiled languages -- no support for sessions"))
+  (error "Fortran is a compiled languages -- no support for sessions"))
 
 
 ;; helper functions
 ;; helper functions
 
 

+ 2 - 2
lisp/ob-js.el

@@ -152,9 +152,9 @@ then create.  Return the initialized session."
 	  (sit-for .5)
 	  (sit-for .5)
 	  (org-babel-js-initiate-session session))))
 	  (org-babel-js-initiate-session session))))
      ((string= "node" org-babel-js-cmd )
      ((string= "node" org-babel-js-cmd )
-      (error "session evaluation with node.js is not supported"))
+      (error "Session evaluation with node.js is not supported"))
      (t
      (t
-      (error "sessions are only supported with mozrepl add \":cmd mozrepl\"")))))
+      (error "Sessions are only supported with mozrepl add \":cmd mozrepl\"")))))
 
 
 (provide 'ob-js)
 (provide 'ob-js)
 
 

+ 1 - 1
lisp/ob-latex.el

@@ -132,7 +132,7 @@ This function is called by `org-babel-execute-src-block'."
 	      (when (file-exists-p transient-pdf-file)
 	      (when (file-exists-p transient-pdf-file)
 		(delete-file transient-pdf-file))))))
 		(delete-file transient-pdf-file))))))
          ((string-match "\\.\\([^\\.]+\\)$" out-file)
          ((string-match "\\.\\([^\\.]+\\)$" out-file)
-          (error "can not create %s files, please specify a .png or .pdf file or try the :imagemagick header argument"
+          (error "Can not create %s files, please specify a .png or .pdf file or try the :imagemagick header argument"
 		 (match-string 1 out-file))))
 		 (match-string 1 out-file))))
         nil) ;; signal that output has already been written to file
         nil) ;; signal that output has already been written to file
     body))
     body))

+ 1 - 1
lisp/ob-plantuml.el

@@ -52,7 +52,7 @@
 This function is called by `org-babel-execute-src-block'."
 This function is called by `org-babel-execute-src-block'."
   (let* ((result-params (split-string (or (cdr (assoc :results params)) "")))
   (let* ((result-params (split-string (or (cdr (assoc :results params)) "")))
 	 (out-file (or (cdr (assoc :file params))
 	 (out-file (or (cdr (assoc :file params))
-		       (error "plantuml requires a \":file\" header argument")))
+		       (error "PlantUML requires a \":file\" header argument")))
 	 (cmdline (cdr (assoc :cmdline params)))
 	 (cmdline (cdr (assoc :cmdline params)))
 	 (in-file (org-babel-temp-file "plantuml-"))
 	 (in-file (org-babel-temp-file "plantuml-"))
 	 (java (or (cdr (assoc :java params)) ""))
 	 (java (or (cdr (assoc :java params)) ""))

+ 2 - 2
lisp/ob-ref.el

@@ -170,7 +170,7 @@ the variable."
 	    ;;       buffer (marker-buffer id-loc)
 	    ;;       buffer (marker-buffer id-loc)
 	    ;;       loc (marker-position id-loc))
 	    ;;       loc (marker-position id-loc))
 	    ;; (move-marker id-loc nil)
 	    ;; (move-marker id-loc nil)
-	    (error "reference '%s' not found in this buffer" ref))
+	    (error "Reference '%s' not found in this buffer" ref))
 	  (cond
 	  (cond
 	   (lob-info (setq type 'lob))
 	   (lob-info (setq type 'lob))
 	   (id (setq type 'id))
 	   (id (setq type 'id))
@@ -184,7 +184,7 @@ the variable."
 		(forward-line 1)
 		(forward-line 1)
 		(beginning-of-line)
 		(beginning-of-line)
 		(if (or (= (point) (point-min)) (= (point) (point-max)))
 		(if (or (= (point) (point-min)) (= (point) (point-max)))
-		    (error "reference not found")))))
+		    (error "Reference not found")))))
 	  (let ((params (append args '((:results . "silent")))))
 	  (let ((params (append args '((:results . "silent")))))
 	    (setq result
 	    (setq result
 		  (case type
 		  (case type

+ 2 - 2
lisp/ob-sql.el

@@ -93,7 +93,7 @@ This function is called by `org-babel-execute-src-block'."
 				  (org-babel-process-file-name in-file)
 				  (org-babel-process-file-name in-file)
 				  (org-babel-process-file-name out-file)
 				  (org-babel-process-file-name out-file)
 				  (or cmdline "")))
 				  (or cmdline "")))
-                    (t (error "no support for the %s sql engine" engine)))))
+                    (t (error "No support for the %s SQL engine" engine)))))
     (with-temp-file in-file
     (with-temp-file in-file
       (insert
       (insert
        (case (intern engine)
        (case (intern engine)
@@ -160,7 +160,7 @@ This function is called by `org-babel-execute-src-block'."
 
 
 (defun org-babel-prep-session:sql (session params)
 (defun org-babel-prep-session:sql (session params)
   "Raise an error because Sql sessions aren't implemented."
   "Raise an error because Sql sessions aren't implemented."
-  (error "sql sessions not yet implemented"))
+  (error "SQL sessions not yet implemented"))
 
 
 (provide 'ob-sql)
 (provide 'ob-sql)
 
 

+ 2 - 2
lisp/ob-sqlite.el

@@ -155,9 +155,9 @@ This function is called by `org-babel-execute-src-block'."
     table))
     table))
 
 
 (defun org-babel-prep-session:sqlite (session params)
 (defun org-babel-prep-session:sqlite (session params)
-  "Raise an error because support for sqlite sessions isn't implemented.
+  "Raise an error because support for SQLite sessions isn't implemented.
 Prepare SESSION according to the header arguments specified in PARAMS."
 Prepare SESSION according to the header arguments specified in PARAMS."
-  (error "sqlite sessions not yet implemented"))
+  (error "SQLite sessions not yet implemented"))
 
 
 (provide 'ob-sqlite)
 (provide 'ob-sqlite)
 
 

+ 4 - 4
lisp/ob-tangle.el

@@ -156,7 +156,7 @@ This function exports the source code using
 		 (> (funcall age file) (funcall age exported-file)))
 		 (> (funcall age file) (funcall age exported-file)))
       (org-babel-tangle-file file exported-file "emacs-lisp"))
       (org-babel-tangle-file file exported-file "emacs-lisp"))
     (load-file exported-file)
     (load-file exported-file)
-    (message "loaded %s" exported-file)))
+    (message "Loaded %s" exported-file)))
 
 
 ;;;###autoload
 ;;;###autoload
 (defun org-babel-tangle-file (file &optional target-file lang)
 (defun org-babel-tangle-file (file &optional target-file lang)
@@ -268,7 +268,7 @@ exported source code blocks by language."
 		      (add-to-list 'path-collector file-name)))))
 		      (add-to-list 'path-collector file-name)))))
 	      specs)))
 	      specs)))
 	 (org-babel-tangle-collect-blocks lang))
 	 (org-babel-tangle-collect-blocks lang))
-	(message "tangled %d code block%s from %s" block-counter
+	(message "Tangled %d code block%s from %s" block-counter
 		 (if (= block-counter 1) "" "s")
 		 (if (= block-counter 1) "" "s")
 		 (file-name-nondirectory
 		 (file-name-nondirectory
 		  (buffer-file-name (or (buffer-base-buffer) (current-buffer)))))
 		  (buffer-file-name (or (buffer-base-buffer) (current-buffer)))))
@@ -474,7 +474,7 @@ which enable the original code blocks to be found."
 	      (org-babel-update-block-body new-body)))
 	      (org-babel-update-block-body new-body)))
           (setq counter (+ 1 counter)))
           (setq counter (+ 1 counter)))
         (goto-char end))
         (goto-char end))
-      (prog1 counter (message "detangled %d code blocks" counter)))))
+      (prog1 counter (message "Detangled %d code blocks" counter)))))
 
 
 (defun org-babel-tangle-jump-to-org ()
 (defun org-babel-tangle-jump-to-org ()
   "Jump from a tangled code file to the related Org-mode file."
   "Jump from a tangled code file to the related Org-mode file."
@@ -497,7 +497,7 @@ which enable the original code blocks to be found."
 				       " ends here") nil t)
 				       " ends here") nil t)
 			      (setq end (point-at-bol))))))))
 			      (setq end (point-at-bol))))))))
 	(unless (and start (< start mid) (< mid end))
 	(unless (and start (< start mid) (< mid end))
-	  (error "not in tangled code"))
+	  (error "Not in tangled code"))
         (setq body (org-babel-trim (buffer-substring start end))))
         (setq body (org-babel-trim (buffer-substring start end))))
       (when (string-match "::" path)
       (when (string-match "::" path)
         (setq path (substring path 0 (match-beginning 0))))
         (setq path (substring path 0 (match-beginning 0))))

+ 6 - 5
lisp/ob.el

@@ -27,6 +27,7 @@
   (require 'cl))
   (require 'cl))
 (require 'ob-eval)
 (require 'ob-eval)
 (require 'org-macs)
 (require 'org-macs)
+(require 'org-compat)
 
 
 (defconst org-babel-exeext
 (defconst org-babel-exeext
   (if (memq system-type '(windows-nt cygwin))
   (if (memq system-type '(windows-nt cygwin))
@@ -666,7 +667,7 @@ arguments and pop open the results in a preview buffer."
 	(when (and (not (string= header name))
 	(when (and (not (string= header name))
 		   (<= (org-babel-edit-distance header name) too-close)
 		   (<= (org-babel-edit-distance header name) too-close)
 		   (not (member header names)))
 		   (not (member header names)))
-	  (error "supplied header \"%S\" is suspiciously close to \"%S\""
+	  (error "Supplied header \"%S\" is suspiciously close to \"%S\""
 		 header name))))
 		 header name))))
     (message "No suspicious header arguments found.")))
     (message "No suspicious header arguments found.")))
 
 
@@ -1514,7 +1515,7 @@ If the point is not on a source block then return nil."
   "Go to the beginning of the current code block."
   "Go to the beginning of the current code block."
   (interactive)
   (interactive)
   ((lambda (head)
   ((lambda (head)
-     (if head (goto-char head) (error "not currently in a code block")))
+     (if head (goto-char head) (error "Not currently in a code block")))
    (org-babel-where-is-src-block-head)))
    (org-babel-where-is-src-block-head)))
 
 
 ;;;###autoload
 ;;;###autoload
@@ -2092,7 +2093,7 @@ file's directory then expand relative links."
 (defun org-babel-update-block-body (new-body)
 (defun org-babel-update-block-body (new-body)
   "Update the body of the current code block to NEW-BODY."
   "Update the body of the current code block to NEW-BODY."
   (if (not (org-babel-where-is-src-block-head))
   (if (not (org-babel-where-is-src-block-head))
-      (error "not in source block")
+      (error "Not in a source block")
     (save-match-data
     (save-match-data
       (replace-match (concat (org-babel-trim new-body) "\n") nil t nil 5))
       (replace-match (concat (org-babel-trim new-body) "\n") nil t nil 5))
     (indent-rigidly (match-beginning 5) (match-end 5) 2)))
     (indent-rigidly (match-beginning 5) (match-end 5) 2)))
@@ -2160,7 +2161,7 @@ parameters when merging lists."
 					   (car (nth variable-index vars)))
 					   (car (nth variable-index vars)))
 					  "=" (cdr pair)))
 					  "=" (cdr pair)))
 		       (incf variable-index))
 		       (incf variable-index))
-		   (error "variable \"%s\" must be assigned a default value"
+		   (error "Variable \"%s\" must be assigned a default value"
 			  (cdr pair))))))
 			  (cdr pair))))))
 	    (:results
 	    (:results
 	     (setq results (funcall e-merge results-exclusive-groups
 	     (setq results (funcall e-merge results-exclusive-groups
@@ -2463,7 +2464,7 @@ If the table is trivial, then return it as a scalar."
 	      (setq result (mapcar (lambda (row)
 	      (setq result (mapcar (lambda (row)
 				     (mapcar #'org-babel-string-read row))
 				     (mapcar #'org-babel-string-read row))
 				   (org-table-to-lisp))))
 				   (org-table-to-lisp))))
-	  (error (message "error reading results: %s" err) nil)))
+	  (error (message "Error reading results: %s" err) nil)))
       (if (null (cdr result)) ;; if result is trivial vector, then scalarize it
       (if (null (cdr result)) ;; if result is trivial vector, then scalarize it
 	  (if (consp (car result))
 	  (if (consp (car result))
 	      (if (null (cdr (car result)))
 	      (if (null (cdr (car result)))

+ 6 - 5
lisp/org-bibtex.el

@@ -111,6 +111,7 @@
 (require 'bibtex)
 (require 'bibtex)
 (eval-when-compile
 (eval-when-compile
   (require 'cl))
   (require 'cl))
+(require 'org-compat)
 
 
 (defvar org-bibtex-description nil) ; dynamically scoped from org.el
 (defvar org-bibtex-description nil) ; dynamically scoped from org.el
 (defvar org-id-locations)
 (defvar org-id-locations)
@@ -277,7 +278,7 @@ not be exported."
 
 
 (defcustom org-bibtex-no-export-tags nil
 (defcustom org-bibtex-no-export-tags nil
   "List of tag(s) that should not be converted to keywords.
   "List of tag(s) that should not be converted to keywords.
-This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t."
+This variable is relevant only if `org-bibtex-export-tags-as-keywords' is t."
   :group 'org-bibtex
   :group 'org-bibtex
   :version "24.1"
   :version "24.1"
   :type '(repeat :tag "Tag" (string)))
   :type '(repeat :tag "Tag" (string)))
@@ -373,7 +374,7 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t."
 
 
 (defun org-bibtex-ask (field)
 (defun org-bibtex-ask (field)
   (unless (assoc field org-bibtex-fields)
   (unless (assoc field org-bibtex-fields)
-    (error "field:%s is not known" field))
+    (error "Field:%s is not known" field))
   (save-window-excursion
   (save-window-excursion
     (let* ((name (substring (symbol-name field) 1))
     (let* ((name (substring (symbol-name field) 1))
 	   (buf-name (format "*Bibtex Help %s*" name)))
 	   (buf-name (format "*Bibtex Help %s*" name)))
@@ -548,7 +549,7 @@ Headlines are exported using `org-bibtex-export-headline'."
 					    (error (throw 'bib (point)))))))))
 					    (error (throw 'bib (point)))))))))
        (with-temp-file filename
        (with-temp-file filename
 	 (insert (mapconcat #'identity bibtex-entries "\n")))
 	 (insert (mapconcat #'identity bibtex-entries "\n")))
-       (message "Successfully exported %d bibtex entries to %s"
+       (message "Successfully exported %d BibTeX entries to %s"
 		(length bibtex-entries) filename) nil))))
 		(length bibtex-entries) filename) nil))))
 
 
 (defun org-bibtex-check (&optional optional)
 (defun org-bibtex-check (&optional optional)
@@ -580,7 +581,7 @@ If nonew is t, add data to the headline of the entry at point."
 	 (type (if (keywordp type) type (intern (concat ":" type))))
 	 (type (if (keywordp type) type (intern (concat ":" type))))
 	 (org-bibtex-treat-headline-as-title (if nonew nil t)))
 	 (org-bibtex-treat-headline-as-title (if nonew nil t)))
     (unless (assoc type org-bibtex-types)
     (unless (assoc type org-bibtex-types)
-      (error "type:%s is not known" type))
+      (error "Type:%s is not known" type))
     (if nonew
     (if nonew
 	(org-back-to-heading)
 	(org-back-to-heading)
       (org-insert-heading)
       (org-insert-heading)
@@ -661,7 +662,7 @@ This uses `bibtex-parse-entry'."
     (with-temp-buffer (yank 1) (setf entry (org-bibtex-read)))
     (with-temp-buffer (yank 1) (setf entry (org-bibtex-read)))
     (if entry
     (if entry
 	(org-bibtex-write)
 	(org-bibtex-write)
-      (error "yanked text does not appear to contain a bibtex entry"))))
+      (error "Yanked text does not appear to contain a BibTeX entry"))))
 
 
 (defun org-bibtex-export-to-kill-ring ()
 (defun org-bibtex-export-to-kill-ring ()
   "Export current headline to kill ring as bibtex entry."
   "Export current headline to kill ring as bibtex entry."

+ 1 - 1
lisp/org-clock.el

@@ -2455,7 +2455,7 @@ from the dynamic block definition."
 	 ((stringp formula)
 	 ((stringp formula)
 	  (insert "\n#+TBLFM: " formula)
 	  (insert "\n#+TBLFM: " formula)
 	  (setq recalc t))
 	  (setq recalc t))
-	 (t (error "invalid formula in clocktable")))
+	 (t (error "Invalid formula in clocktable")))
       ;; Should we rescue an old formula?
       ;; Should we rescue an old formula?
       (when (stringp (setq content (plist-get params :content)))
       (when (stringp (setq content (plist-get params :content)))
 	(when (string-match "^\\([ \t]*#\\+tblfm:.*\\)" content)
 	(when (string-match "^\\([ \t]*#\\+tblfm:.*\\)" content)

+ 1 - 1
lisp/org-exp-blocks.el

@@ -199,7 +199,7 @@ which defaults to the value of `org-export-blocks-witheld'."
 		  (decf balanced)
 		  (decf balanced)
 		(incf balanced)))
 		(incf balanced)))
 	    (when (not (zerop balanced))
 	    (when (not (zerop balanced))
-	      (error "unbalanced begin/end_%s blocks with %S"
+	      (error "Unbalanced begin/end_%s blocks with %S"
 		     type (buffer-substring match-start (point))))
 		     type (buffer-substring match-start (point))))
 	    (setq match-end (copy-marker (match-end 0)))
 	    (setq match-end (copy-marker (match-end 0)))
 	    (unless preserve-indent
 	    (unless preserve-indent

+ 1 - 1
lisp/org-irc.el

@@ -84,7 +84,7 @@
      ((eq org-irc-client 'erc)
      ((eq org-irc-client 'erc)
       (org-irc-visit-erc link))
       (org-irc-visit-erc link))
      (t
      (t
-      (error "erc only known client")))))
+      (error "ERC only known client")))))
 
 
 (defun org-irc-parse-link (link)
 (defun org-irc-parse-link (link)
   "Parse an IRC LINK and return the attributes found.
   "Parse an IRC LINK and return the attributes found.

+ 1 - 1
lisp/org-mobile.el

@@ -406,7 +406,7 @@ agenda view showing the flagged items."
       (error "Cannot write to encryption tempfile %s"
       (error "Cannot write to encryption tempfile %s"
 	     org-mobile-encryption-tempfile))
 	     org-mobile-encryption-tempfile))
     (unless (executable-find "openssl")
     (unless (executable-find "openssl")
-      (error "openssl is needed to encrypt files"))))
+      (error "OpenSSL is needed to encrypt files"))))
 
 
 (defun org-mobile-create-index-file ()
 (defun org-mobile-create-index-file ()
   "Write the index file in the WebDAV directory."
   "Write the index file in the WebDAV directory."