Merge branch 'master' of git://repo.or.cz/org-mode
This commit is contained in:
commit
36351d26a9
|
@ -122,7 +122,8 @@ called by `org-babel-execute-src-block'."
|
||||||
(progn
|
(progn
|
||||||
(with-current-buffer error-buf
|
(with-current-buffer error-buf
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
(insert (concat "\n\n--body--\n" full-body)))
|
(insert (concat "\n\n--body--\n" full-body))
|
||||||
|
(goto-char (point-min)))
|
||||||
(display-buffer error-buf) nil))))
|
(display-buffer error-buf) nil))))
|
||||||
|
|
||||||
(defun org-babel-C-ensure-main-wrap (body)
|
(defun org-babel-C-ensure-main-wrap (body)
|
||||||
|
@ -144,15 +145,25 @@ called by `org-babel-execute-src-block'."
|
||||||
(defun org-babel-C-var-to-C (pair)
|
(defun org-babel-C-var-to-C (pair)
|
||||||
"Convert an elisp val into a string of C code specifying a var
|
"Convert an elisp val into a string of C code specifying a var
|
||||||
of the same value. TODO list support."
|
of the same value. TODO list support."
|
||||||
(let* ((var (car pair))
|
(let ((var (car pair))
|
||||||
(val (cdr pair))
|
(val (cdr pair)))
|
||||||
(type (cond
|
(when (symbolp val)
|
||||||
((integerp val) "int")
|
(setq val (symbol-name val))
|
||||||
((floatp val) "double")
|
(when (= (length val) 1)
|
||||||
((characterp val) "char")
|
(setq val (string-to-char val))))
|
||||||
((stringp val) (format "char[%d]" (length val)))
|
(cond
|
||||||
(t "u32"))))
|
((integerp val)
|
||||||
(format "%s %S = %S;" type var val)))
|
(format "int %S = %S;" var val))
|
||||||
|
((floatp val)
|
||||||
|
(format "double %S = %S;" var val))
|
||||||
|
((or (characterp val))
|
||||||
|
(format "char %S = '%S';" var val))
|
||||||
|
((stringp val)
|
||||||
|
(format "char %S[%d] = \"%s\";"
|
||||||
|
var (+ 1 (length val)) val))
|
||||||
|
(t
|
||||||
|
(format "u32 %S = %S;" var val)))))
|
||||||
|
|
||||||
|
|
||||||
(provide 'org-babel-C)
|
(provide 'org-babel-C)
|
||||||
;;; org-babel-C.el ends here
|
;;; org-babel-C.el ends here
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2010-03-27 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org.texi (Column width and alignment): Document that <N> now
|
||||||
|
means a fixed width, not a maximum width.
|
||||||
|
|
||||||
2010-03-26 Carsten Dominik <carsten.dominik@gmail.com>
|
2010-03-26 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
* org.texi (Publishing options): Document the :email option.
|
* org.texi (Publishing options): Document the :email option.
|
||||||
|
|
14
doc/org.texi
14
doc/org.texi
|
@ -1825,13 +1825,13 @@ The width of columns is automatically determined by the table editor. And
|
||||||
also the alignment of a column is determined automatically from the fraction
|
also the alignment of a column is determined automatically from the fraction
|
||||||
of number-like versus non-number fields in the column.
|
of number-like versus non-number fields in the column.
|
||||||
|
|
||||||
Sometimes a single field or a few fields need to carry more text,
|
Sometimes a single field or a few fields need to carry more text, leading to
|
||||||
leading to inconveniently wide columns. To limit@footnote{This feature
|
inconveniently wide columns. Or maybe you want to make a table with several
|
||||||
does not work on XEmacs.} the width of a column, one field anywhere in
|
columns having a fixed width, regardless of content. To set@footnote{This
|
||||||
the column may contain just the string @samp{<N>} where @samp{N} is an
|
feature does not work on XEmacs.} the width of a column, one field anywhere
|
||||||
integer specifying the width of the column in characters. The next
|
in the column may contain just the string @samp{<N>} where @samp{N} is an
|
||||||
re-align will then set the width of this column to no more than this
|
integer specifying the width of the column in characters. The next re-align
|
||||||
value.
|
will then set the width of this column to this value.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@group
|
@group
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
|
2010-03-27 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org-table.el (org-table-align): Interpret <N> at fixed width,
|
||||||
|
not as maximum width.
|
||||||
|
|
||||||
2010-03-26 Carsten Dominik <carsten.dominik@gmail.com>
|
2010-03-26 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org-exp.el (org-export-author-info, org-export-email-info): Fix
|
||||||
|
docstrings.
|
||||||
|
|
||||||
* org-beamer.el (org-beamer-select-environment): Renamed from
|
* org-beamer.el (org-beamer-select-environment): Renamed from
|
||||||
`org-beamer-set-environment-tag'. Improve docstring.
|
`org-beamer-set-environment-tag'. Improve docstring.
|
||||||
|
|
||||||
|
|
|
@ -312,7 +312,7 @@ headline Only export the headline, but skip the tree below it."
|
||||||
"Non-nil means insert author name and email into the exported file.
|
"Non-nil means insert author name and email into the exported file.
|
||||||
|
|
||||||
This option can also be set with the +OPTIONS line,
|
This option can also be set with the +OPTIONS line,
|
||||||
e.g. \"author-info:nil\"."
|
e.g. \"author:nil\"."
|
||||||
:group 'org-export-general
|
:group 'org-export-general
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
|
@ -320,7 +320,7 @@ e.g. \"author-info:nil\"."
|
||||||
"Non-nil means insert author name and email into the exported file.
|
"Non-nil means insert author name and email into the exported file.
|
||||||
|
|
||||||
This option can also be set with the +OPTIONS line,
|
This option can also be set with the +OPTIONS line,
|
||||||
e.g. \"email-info:t\"."
|
e.g. \"email:t\"."
|
||||||
:group 'org-export-general
|
:group 'org-export-general
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
|
|
|
@ -662,6 +662,7 @@ When nil, simply write \"#ERROR\" in corrupted fields.")
|
||||||
(while (< (setq i (1+ i)) maxfields) ;; Loop over all columns
|
(while (< (setq i (1+ i)) maxfields) ;; Loop over all columns
|
||||||
(setq column (mapcar (lambda (x) (or (nth i x) "")) fields))
|
(setq column (mapcar (lambda (x) (or (nth i x) "")) fields))
|
||||||
;; Check if there is an explicit width specified
|
;; Check if there is an explicit width specified
|
||||||
|
(setq fmax nil)
|
||||||
(when (or narrow falign)
|
(when (or narrow falign)
|
||||||
(setq c column fmax nil falign1 nil)
|
(setq c column fmax nil falign1 nil)
|
||||||
(while c
|
(while c
|
||||||
|
@ -687,7 +688,8 @@ When nil, simply write \"#ERROR\" in corrupted fields.")
|
||||||
(list 'display org-narrow-column-arrow)
|
(list 'display org-narrow-column-arrow)
|
||||||
xx)))))
|
xx)))))
|
||||||
;; Get the maximum width for each column
|
;; Get the maximum width for each column
|
||||||
(push (apply 'max 1 (mapcar 'org-string-width column)) lengths)
|
(push (apply 'max (or fmax 1) 1 (mapcar 'org-string-width column))
|
||||||
|
lengths)
|
||||||
;; Get the fraction of numbers, to decide about alignment of the column
|
;; Get the fraction of numbers, to decide about alignment of the column
|
||||||
(if falign1
|
(if falign1
|
||||||
(push (equal (downcase falign1) "r") typenums)
|
(push (equal (downcase falign1) "r") typenums)
|
||||||
|
|
Loading…
Reference in New Issue