[O] [PATCH] ox-html.el: DONE is monospace for consistency

2015-01-08 Thread Zane D. Purvis
* lisp/ox-html.el (org-html-style-default): `.done' gets `font-family:
monospace;'

Other items on the headline that aren't the text itself are monospaced,
including non-DONE todo's.

TINYCHANGE
---
 lisp/ox-html.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 3c3b444..e2d1921 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -275,7 +275,7 @@ for the JavaScript code in this tag.
  

[O] [PATCH] ox-html.el: add exporting of priority

2015-01-08 Thread Zane D. Purvis
* list/ox-html.el (org-html--priority): new function
(org-html-format-headline-default-function): call `org-html--priority'
(org-html-style-default): add `.priority'

HTML export previously did not support exporting of priority simply by setting
`org-export-with-priority' to `t'.

TINYCHANGE
---
 lisp/ox-html.el | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 3c3b444..1d1aa57 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -278,6 +278,7 @@ for the JavaScript code in this tag.
   .done   { color: green; }
   .tag{ background-color: #eee; font-family: monospace;
 padding: 2px; font-size: 80%; font-weight: normal; }
+  .priority { font-family: monospace; color: orange; }
   .timestamp { color: #bebebe; }
   .timestamp-kwd { color: #5f9ea0; }
   .right  { margin-left: auto; margin-right: 0px;  text-align: right; }
@@ -1885,6 +1886,16 @@ INFO is a plist used as a communication channel."
 (org-html-fix-class-name todo)
 todo)))

+ Priority
+
+(defun org-html--priority (priority info)
+  "Format a priority into HTML.
+PRIORITY is the character code of the priority or nil.
+INFO is a plist containing export options."
+  (when priority
+(format "[%s]"
+(byte-to-string priority
+
  Tags

 (defun org-html--tags (tags info)
@@ -2396,8 +2407,9 @@ holding contextual information."
   "Default format function for a headline.
 See `org-html-format-headline-function' for details."
   (let ((todo (org-html--todo todo info))
+(priority (org-html--priority priority info))
 (tags (org-html--tags tags info)))
-(concat todo (and todo " ") text (and tags "   ") tags)))
+(concat todo (and todo " ") priority (and priority " ") text (and
tags "   ") tags)))

 (defun org-html--container (headline info)
   (or (org-element-property :HTML_CONTAINER headline)
-- 
1.9.1



Re: [O] [bug?] Different whitespace behavior between capture, and capture w. refile

2015-01-08 Thread Yuri Niyazov
Could someone please chime in on this?

On Sunday, January 4, 2015, Yuri Niyazov  wrote:

> Let's say I start with a .notes file that looks like this:
>
> #+BEGIN_EXAMPLE
> * Tasks
> * Refile Here
> * Other Stuff
> #+END_EXAMPLE
>
> with all the default capture templates.
>
> The only org-mode configuration I have is
>
> (org-blank-before-new-entry (quote ((heading) (plain-list-item
>
> as well as C-c c for capture. Everything else is default. This is on
> Emacs 24.4, and org-mode 8.2.10
>
> Let's say I have another file called ~/Spike.org open, and I am
> capturing from it. This is not relevant to the example, but makes it
> clearer where the links are coming from.
>
> Then, I capture two items:
>
> C-c c t "Capture Item 1" C-c C-c and C-c c t "Capture Item 2" C-c C-c.
>
> Now, my .notes file looks like this:
>
> #+BEGIN_EXAMPLE
> * Tasks
> ** TODO Capture Item 1
>   [2015-01-04 Sun]
>   [[file:~/Spike.org]]
> ** TODO Capture Item 2
>   [2015-01-04 Sun]
>   [[file:~/Spike.org]]
> * Refile Here
> * Other Stuff
> #+END_EXAMPLE
>
> Note how there are no blank lines between the different capture items.
>
> Now, I capture two items, but instead of finishing the capture with
> C-c C-c, I refile right from the Capture window:
>
> C-c c t "Refile Item 1" C-c C-w "Refile here" and C-c c t "Refile Item
> 2" C-c C-w "Refile here".
>
> Now, my .notes file looks like this:
>
> #+BEGIN_EXAMPLE
> * Tasks
> ** TODO Capture Item 1
>   [2015-01-04 Sun]
>   [[file:~/Spike.org]]
> ** TODO Capture Item 2
>   [2015-01-04 Sun]
>   [[file:~/Spike.org]]
> * Refile Here
> ** TODO Refile Item 1
>   [2015-01-04 Sun]
>   [[file:~/Spike.org]]
>
> ** TODO Refile Item 2
>   [2015-01-04 Sun]
>   [[file:~/Spike.org]]
>
> * Other Stuff
> #+END_EXAMPLE
>
> Note how refiling from the capture window introduced whitespace
> between items under "Refile here", but finishing the capture doesn't.
> Needless to say, this inconsistency drives me mildly up the wall. I am
> currently looking into writing some sort of hook for
> org-after-refile-insert-hook, but exactly what to do there is unclear.
> Is there some configuration option I am missing?
>
> Thanks!
>


Re: [O] Lentic.0.6 and org mode

2015-01-08 Thread Thierry Banel
Nice!

I spent some time figuring out how to use it.

This is what I did eventually:
  M-xlentic-mode
  M-xlentic-mode   ;; twice
  M-x lentic-mode-split-window-below
Then change the new buffer to the desired mode (Java mode, C++ mode,
whatever).
(I was created in fundamental mode).

Is this the standard way to use it?

Thierry


Le 08/01/2015 14:55, Phillip Lord a écrit :
> I thought some of you might be interested in the new release of my
> package, lentic. One of the things that it now does is allow
> multi-modal of editing of Emacs source, using org mode for the
> documentation. I realise that it's already possible to use ELPA
> org-babel to write literate el files, or to use outorg.el, but lentic
> provides a different form of interaction. You can edit the org form or
> the emacs-lisp form as you choose. The source code of lentic is, itself,
> written in this way. There is a screen cast linked below which shows
> what the interaction looks like.
>
> Available on MELPA-stable, MELPA and Marmalade
> https://github.com/phillord/lentic
> http://www.russet.org.uk/blog/3035
> https://vimeo.com/116078853
>
>




[O] Lentic.0.6 and org mode

2015-01-08 Thread Phillip Lord


I thought some of you might be interested in the new release of my
package, lentic. One of the things that it now does is allow
multi-modal of editing of Emacs source, using org mode for the
documentation. I realise that it's already possible to use ELPA
org-babel to write literate el files, or to use outorg.el, but lentic
provides a different form of interaction. You can edit the org form or
the emacs-lisp form as you choose. The source code of lentic is, itself,
written in this way. There is a screen cast linked below which shows
what the interaction looks like.

Available on MELPA-stable, MELPA and Marmalade
https://github.com/phillord/lentic
http://www.russet.org.uk/blog/3035
https://vimeo.com/116078853



Re: [O] Need help debugging org-capture-template failure invoked by keyboard macro

2015-01-08 Thread Felix Fernandes

I'm no lisp expert, but I have attempted to indent the backtrace below for
easier reading.

Debugger entered--Lisp error: 
(error "Capture abort: (wrong-type-argument stringp
(file:~/org/todo.org::*Tasks Tasks))")

signal(error ("Capture abort: (wrong-type-argument stringp
(file:~/org/todo.org::*Tasks Tasks))"))

error("Capture abort: %s" (wrong-type-argument stringp
("file:~/org/todo.org::*Tasks" "Tasks")))

(condition-case error (org-capture-put :template
(org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*")
(kill-buffer "*Capture*")) (error "Capture abort: %s" error)))

(cond ((equal entry "C") (customize-variable (quote org-capture-templates))) 
  ((equal entry "q") (error "Abort")) 
  (t (org-capture-set-plist entry) (org-capture-get-template) 
 (org-capture-put :original-buffer orig-buf 
  :original-file (or (buffer-file-name orig-buf) 
 (and (featurep (quote dired)) 
  (car (rassq orig-buf
dired-buffers
  :original-file-nondirectory (and (buffer-file-name
orig-buf) (file-name-nondirectory
   
(buffer-file-name orig-buf)))
  :annotation annotation :initial initial
:return-to-wconf (current-window-configuration)
  :default-time (or org-overriding-default-time
(org-current-time))$) 
 (org-capture-set-target-location) 
 (condition-case error
 (org-capture-put :template (org-capture-fill-template))
   ((error quit) 
(if (get-buffer "*Capture*") (kill-buffer "*Capture*")) 
(error "Capture abort: %s" error))) 
 (setq org-capture-clock-keep (org-capture-get :clock-keep)) 
 (if (equal goto 0) 
 (org-capture-insert-template-here) 
   (condition-case error 
   (org-capture-place-template 
(equal (car (org-capture-get :target)) (quote function))) 
 ((error quit) (if (and (buffer-base-buffer ...) 
(string-match "\\`CAPTURE-" ...)) 
   (kill-buffer (current-buffer))) 
  (set-window-configuration (org-capture-get :return-to-wconf)) 
  (error "Capture template `%s': %s" (org-capture-get :key) (nth
1 error 
   (if (and (derived-mode-p (quote org-mode))
(org-capture-get :clock-in)) 
   (condition-case nil (progn (if (org-clock-is-active) 
  (org-capture-put 
   :interrupted-clock...)) 
  (org-clock-in) (org-set-local
(quote org-capture-clock-was-started) t)) 
 (error "Could not start the clock in this capture buffer"))) 
   (if (org-capture-get :immediate-finish) (org-capture-finalize)
  
(let* ((orig-buf (current-buffer)) 
   (annotation 
(if (and (boundp (quote org-capture-link-is-already-stored))
 org-capture-link-is-already-stored) 
(plist-get org-store-link-plist :annotation) 
  (condition-case nil (progn (org-store-link nil)) 
(error nil 
   (entry (or org-capture-entry (org-capture-select-template keys)))
initial) 
  (setq initial (or org-capture-initial (and (org-region-active-p)
(buffer-substring (point) (mark) 
  (if (stringp initial) (progn (remove-text-properties 0 (length initial)
(quote (read-only t)) initial))) 
  (if (stringp annotation) (progn (remove-text-properties 0 (length
annotation) (quote (read-only t)) annotation))) 
  (cond ((equal entry "C")
 (customize-variable (quote org-capture-templates))) 
((equal entry "q") 
 (error "Abort")) (t (org-capture-set-plist entry)
 (org-capture-get-template) 
 (org-capture-put 
  :original-buffer orig-buf
  :original-file (or (buffer-file-name orig-buf)
 (and (featurep (quote dired)) 
  (car (rassq orig-buf
dired-buffers 
  :original-file-nondirectory (and
(buffer-file-name orig-buf)
  
(file-name-nondirectory
   
(buffer-file-name orig-buf))) 
  :annotation annotation :initial initial
:return-to-wconf
  (current-window-configuration) 
  :default-time (or org-overriding-default-time
(org-current-time)))
 (org-capture-set-target-location) 
 

Re: [O] [bug] viewing properties in column view

2015-01-08 Thread Eric S Fraga
On Thursday,  8 Jan 2015 at 21:04, Sebastien Vauban wrote:
> You're right; it isn't.

And reading the page again, it is entitled "Typesetting conventions used
in this manual" so it's more about writing a manual than about what org
supports!
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org 
release_8.3beta-703-gef523b.dirty



Re: [O] [bug] viewing properties in column view

2015-01-08 Thread Sebastien Vauban
Eric S Fraga wrote:
> On Wednesday,  7 Jan 2015 at 22:24, Sebastien Vauban wrote:
>
> [...]
>
>> "User-defined properties are capitalized", see
>> http://orgmode.org/manual/Conventions.html.
>
> A convention is not a requirement, is it?  I hate typing upper case
> letters...

You're right; it isn't.

So, either the feature should be disregarded, or become official;
I agree.

Best regards,
  Seb

-- 
Sebastien Vauban



Re: [O] [bug] viewing properties in column view

2015-01-08 Thread Eric S Fraga
On Wednesday,  7 Jan 2015 at 22:24, Sebastien Vauban wrote:

[...]

> "User-defined properties are capitalized", see
> http://orgmode.org/manual/Conventions.html.

A convention is not a requirement, is it?  I hate typing upper case
letters...
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org 
release_8.3beta-703-gef523b.dirty



[O] Need help debugging org-capture-template failure invoked by keyboard macro

2015-01-08 Thread Felix Fernandes
I am trying to use the following keyboard test macro

   (fset 'jj   [?\C-c ?c ?t ?j ?j  return ?\C-c ?\C-c]) 

to invoke this capture template definition 

  (setq org-capture-templates '(("t" "Todo" entry (file "~/org/j.org"

Note that C-c c invokes M-x org-capture.

Unfortunately, it produces the following error message: After 0 kbd macro
iterations: byte-code: Capture abort: (wrong-type-argument stringp
(file:~/org/todo.org::*Tasks Tasks))

I have produced the backtrace show below. The org-mode configuration is
appended after the backtrace. 

Please help me debug and fix this problem. Thanks.

Sincerely,
Felix

Debugger entered--Lisp error: (error "Capture abort: (wrong-type-argument
stringp (file:~/org/todo.org::*Tasks Tasks))")
  signal(error ("Capture abort: (wrong-type-argument stringp
(file:~/org/todo.org::*Tasks Tasks))"))
  error("Capture abort: %s" (wrong-type-argument stringp
("file:~/org/todo.org::*Tasks" "Tasks")))
  (condition-case error (org-capture-put :template
(org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*")
(kill-buffer "*Capture*")) (error "Capture abort: %s" error)))
  (cond ((equal entry "C") (customize-variable (quote
org-capture-templates))) ((equal entry "q") (error "Abort")) (t
(org-capture-set-plist entry) (org-capture-get-template) (org-capture-put
:original-buffer orig-buf :original-file (or (buffer-file-name orig-buf)
(and (featurep (quote dired)) (car (rassq orig-buf dired-buffers
:original-file-nondirectory (and (buffer-file-name orig-buf)
(file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation
:initial initial :return-to-wconf (current-window-configuration)
:default-time (or org-overriding-default-time (org-current-time)))
(org-capture-set-target-location) (condition-case error (org-capture-put
:template (org-capture-fill-template)) ((error quit) (if (get-buffer
"*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" error)))
(setq org-capture-clock-keep (org-capture-get :clock-keep)) (if (equal goto
0) (org-capture-insert-template-here) (condition-case error
(org-capture-place-template (equal (car (org-capture-get :target)) (quote
function))) ((error quit) (if (and (buffer-base-buffer ...) (string-match
"\\`CAPTURE-" ...)) (kill-buffer (current-buffer)))
(set-window-configuration (org-capture-get :return-to-wconf)) (error
"Capture template `%s': %s" (org-capture-get :key) (nth 1 error (if (and
(derived-mode-p (quote org-mode)) (org-capture-get :clock-in))
(condition-case nil (progn (if (org-clock-is-active) (org-capture-put
:interrupted-clock ...)) (org-clock-in) (org-set-local (quote
org-capture-clock-was-started) t)) (error "Could not start the clock in this
capture buffer"))) (if (org-capture-get :immediate-finish)
(org-capture-finalize)
  (let* ((orig-buf (current-buffer)) (annotation (if (and (boundp (quote
org-capture-link-is-already-stored)) org-capture-link-is-already-stored)
(plist-get org-store-link-plist :annotation) (condition-case nil (progn
(org-store-link nil)) (error nil (entry (or org-capture-entry
(org-capture-select-template keys))) initial) (setq initial (or
org-capture-initial (and (org-region-active-p) (buffer-substring (point)
(mark) (if (stringp initial) (progn (remove-text-properties 0 (length
initial) (quote (read-only t)) initial))) (if (stringp annotation) (progn
(remove-text-properties 0 (length annotation) (quote (read-only t))
annotation))) (cond ((equal entry "C") (customize-variable (quote
org-capture-templates))) ((equal entry "q") (error "Abort")) (t
(org-capture-set-plist entry) (org-capture-get-template) (org-capture-put
:original-buffer orig-buf :original-file (or (buffer-file-name orig-buf)
(and (featurep (quote dired)) (car (rassq orig-buf dired-buffers
:original-file-nondirectory (and (buffer-file-name orig-buf)
(file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation
:initial initial :return-to-wconf (current-window-configuration)
:default-time (or org-overriding-default-time (org-current-time)))
(org-capture-set-target-location) (condition-case error (org-capture-put
:template (org-capture-fill-template)) ((error quit) (if (get-buffer
"*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" error)))
(setq org-capture-clock-keep (org-capture-get :clock-keep)) (if (equal goto
0) (org-capture-insert-template-here) (condition-case error
(org-capture-place-template (equal (car ...) (quote function))) ((error
quit) (if (and ... ...) (kill-buffer ...)) (set-window-configuration
(org-capture-get :return-to-wconf)) (error "Capture template `%s': %s"
(org-capture-get :key) (nth 1 error (if (and (derived-mode-p (quote
org-mode)) (org-capture-get :clock-in)) (condition-case nil (progn (if ...
...) (org-clock-in) (org-set-local ... t)) (error "Could not start the clock
in this capture buffer"))) (if (org-capture-get :immediate-finish)
(org-capture-finalize))
  (cond ((equal goto (quote (4))) (org-capture-goto-target)) ((eq

Re: [O] Org mode installation problems

2015-01-08 Thread Felix Fernandes
> > The backtrace is not very useful as is because of the byte code. You
> > might try to reproduce with uncompiled code and see if it is any
> > clearer.
> 
> How to do that? I had used  
>   C-u M-x org-reload RET
> before, as described in the org-mode documentation to get a backtrace from
> uncompiled code. Apparently, that didn't work. Could it be part of the
problem?
> 
> 

I did an org re-install from a tarball (instead of elpa). All problems
persist. However by issuing a sudo make clean before the reload, I managed
to get a backtrace without uncompiled code. I will create a new post with
that backtrace seeking help to debug the problem.





Re: [O] Table formula and text properties

2015-01-08 Thread Willem Rein Oudshoorn
Michael Brand  writes:

> Hi Wim
>
> On Wed, Jan 7, 2015 at 6:11 PM, Willem Rein Oudshoorn
>  wrote:

>> ...
>> However org mode table formula code seems to strip the display property
>> from the string returned by the formula.  So this trick will not work.
>
> I think this is by design. If someone wants to change current behavior
> then there are other issues to be considered: An 80 by 8 pixel image
> that is inserted with
>
> (insert-image
>  (sparkline-make-sparkline 80 8 '(1 20 12 13 141 13 24 90))
>  "SPARKLINE")
>
> with point in a table is first visible as an image but will change to
> the text "SPARKLINE" after e. g. table realignment. And determining
> column width around an image for table realignment would not be
> trivial.

Thank you for your thoughtful answer.

You mention two issues here

1.  After realignment the image will be replaced by text
2.  The difficulty of determining the width of an image

The first item should in theory not be a problem, text properties come
witht the string, so as long as org mode does not remove the text
properties the image should stay with the string, even after realigment.
(However this is spoken as someone with no experience with the org code,
so take this with some bucket loads of salt.)

The second problem is indeed much harder.  One way I can see this
working is if org mode would use the 'space :align-to specification to
align the table, and trust the underlying string to ensure enough space
is reserved for the image.  This would indeed be tricky.
Another potential hack is by querying the font width and use that in the
calculation of the width for the image when generating.

However, it seems not be possible at the moment, and I do not know how
much work changing org-mode is to deal with text properties.

If it is not too hard, it might be worth it anyway, formulas could attach
a face to the result and this might be useful.

> It would be nice if in your package someone could support one of
>
> (sparkline-make-sparkline nil nil
>   '(1 20 12 13 141 13 24 90)) => "█▁▂▅"
> (sparkline-make-unicode 1 20 12 13 141 13 24 90) => "█▁▂▅"
>

That would not be too hard.  But I am not sure I am too interested.
At the moment I have a CSV mode that uses sparkline to generate graphs of
series with 100's of data points and I fear that the ASCII art version
will not give nearly the same information as the graphical version.

Unfortunately I do not have much time now, so looking into
this might not happen :-(.

> For completeness I would like to mention Thierry Banel's
> orgtbl-ascii-plot which has been added to Org core meanwhile:
> http://orgmode.org/worg/org-contrib/orgtbl-ascii-plot.html

A that looks nice too, thank you for mentioning this.

Kind regards,
Wim Oudshoorn.





Re: [O] Table formula and text properties

2015-01-08 Thread Michael Brand
Hi Wim

On Wed, Jan 7, 2015 at 6:11 PM, Willem Rein Oudshoorn
 wrote:
> I am trying to insert an image into a table by using a table formula.
> My basic approach is by using a string with a display property like:
>
>
>   (propertize "TEXT" 'display (list image))
>
>
> Or to be more precise
>
>(propertize "SPARKLINE" 'display
>(list (sparkline-make-sparkline
> 100 10
>'(1 20 12 13 141 13 24 90
>
> In which the `sparkline-make-sparkline' function returns an image.

Very interesting. Your package to insert a sparkline image
http://en.wikipedia.org/wiki/Sparkline
into an Emacs buffer is nice:
https://github.com/woudshoo/sparkline

> Inserting the resulting string with `insert' into a buffer will ensure
> the image is displayed.
>
> However org mode table formula code seems to strip the display property
> from the string returned by the formula.  So this trick will not work.

I think this is by design. If someone wants to change current behavior
then there are other issues to be considered: An 80 by 8 pixel image
that is inserted with

(insert-image
 (sparkline-make-sparkline 80 8 '(1 20 12 13 141 13 24 90))
 "SPARKLINE")

with point in a table is first visible as an image but will change to
the text "SPARKLINE" after e. g. table realignment. And determining
column width around an image for table realignment would not be
trivial.

> Is there a way to insert a calculated image into an org table?

Below is a unicode ASCII art solution with Zach Holman's shell script
package Spark:
https://github.com/holman/spark

| Measurement | t0 | t1 | t2 | t3 |  t4 | t5 | t6 | t7 | Sparkline |
|-+++++-++++---|
|   1 |  1 | 20 | 12 | 13 | 141 | 13 | 24 | 90 | █▁▂▅  |
|   2 |  0 |  1 |  2 |  3 |   4 |  5 |  6 |  7 | ▁▂▃▄▅▆▇█  |
|   3 |  0 |  2 |  4 |  6 |   8 | 10 | 12 | 14 | ▁▂▃▄▅▆▇█  |
|   4 | -7 | -6 | -5 | -4 |  -3 | -2 | -1 |  0 | ▁▂▃▄▅▆▇█  |
|   5 |  0 |  0 |  0 |  0 |   0 |  0 |  0 |  0 |   |
#+TBLFM: $10 = '(org-trim (shell-command-to-string "spark $2..$9")); L

It would be nice if in your package someone could support one of

(sparkline-make-sparkline nil nil
  '(1 20 12 13 141 13 24 90)) => "█▁▂▅"
(sparkline-make-unicode 1 20 12 13 141 13 24 90) => "█▁▂▅"

to work like Zach Holman's Spark to replace the above TBLFM with one
of

#+TBLFM: $10 = '(sparkline-make-sparkline nil nil '($2..$9)); L
#+TBLFM: $10 = '(sparkline-make-unicode $2..$9); L

For completeness I would like to mention Thierry Banel's
orgtbl-ascii-plot which has been added to Org core meanwhile:
http://orgmode.org/worg/org-contrib/orgtbl-ascii-plot.html

Michael



Re: [O] Possible bug in export of table in latex

2015-01-08 Thread Andreas Leha
Nicolas Goaziou  writes:
> Hello,
>
> Giuseppe Lipari  writes:
>
>> As a matter of fact, I think the :width option for latex tables should be
>> disabled, because it is not so simple to implement.
>
> As long as it doesn't generate invalid LaTeX code (like in your bug
> report), I think the current :width option can be kept. You don't need
> to use it if you don't like it.
>

I agree, because I successfully use it (specifying the alignment as
well).

Best,
Andreas




Re: [O] Possible bug in export of table in latex

2015-01-08 Thread Nicolas Goaziou
Hello,

Giuseppe Lipari  writes:

> As a matter of fact, I think the :width option for latex tables should be
> disabled, because it is not so simple to implement.

As long as it doesn't generate invalid LaTeX code (like in your bug
report), I think the current :width option can be kept. You don't need
to use it if you don't like it.


Regards,

-- 
Nicolas Goaziou



Re: [O] Redacting text in HTML export

2015-01-08 Thread Peter Davis
On Thu, Jan 08, 2015 at 10:34:44AM +0100, Rasmus wrote:
> Peter Davis  writes:
> 
> > Is there any way to completely redact text in HTML export, so it just
> > looks like black boxes?
> 
> I'm not sure I fully understand, but it this what you are looking for?
> 
> #+MACRO: redact @@html:$1@@
> to {{{redact(redact)}}} or not to {{{redact(redact)}}} that is the question.

Oh! That would have done it! I wound up editing the  and  tags 
into the html by hand. This was for a blog post
, so I didn't 
have a lot of control over style sheets, fonts, etc.

Thank you!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] eval header arguments for ledger :cmdline?

2015-01-08 Thread Alan Schmitt
On 2015-01-08 10:17, Myles English  writes:

> Hello,
>
> Can anybody tell me how this could be achieved, please?
>
> I would like to use parameters for ledger[1] source code blocks, and
> understand that the :cmdline header argument means "pass this straight
> through to the command line", but effectively what I would like to do is
> this:
>
> #+PROPERTY: header-args :var ACC_PERIOD="-b 2013-04-06 -e 2014-04-06" 
> BAT_FILE="myledger.bat"
>
> #+begin_src ledger :cmdline bal ACC_PERIOD -f BAT_FILE
>
> #+end_src
>
> Is something like this currently possible or does it need further
> development of ob-ledger.el?  Any volunteers||collaborators?

I did not know about ob-ledger … What I do is use
`shell-command-to-string' as shown here
http://alan.petitepomme.net/tips/ledger_and_org.html

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


[O] eval header arguments for ledger :cmdline?

2015-01-08 Thread Myles English
Hello,

Can anybody tell me how this could be achieved, please?

I would like to use parameters for ledger[1] source code blocks, and
understand that the :cmdline header argument means "pass this straight
through to the command line", but effectively what I would like to do is
this:

#+PROPERTY: header-args :var ACC_PERIOD="-b 2013-04-06 -e 2014-04-06" 
BAT_FILE="myledger.bat"

#+begin_src ledger :cmdline bal ACC_PERIOD -f BAT_FILE

#+end_src

Is something like this currently possible or does it need further
development of ob-ledger.el?  Any volunteers||collaborators?

Myles



[1] http://www.ledger-cli.org/



Re: [O] Redacting text in HTML export

2015-01-08 Thread Rasmus
Peter Davis  writes:

> Is there any way to completely redact text in HTML export, so it just
> looks like black boxes?

I'm not sure I fully understand, but it this what you are looking for?

#+MACRO: redact @@html:$1@@
to {{{redact(redact)}}} or not to {{{redact(redact)}}} that is the question.

-- 
Not everything that goes around comes back around, you know




Re: [O] Possible bug in export of table in latex

2015-01-08 Thread Giuseppe Lipari
Hi,

thanks for responding.
As a matter of fact, I think the :width option for latex tables should be
disabled, because it is not so simple to implement.
While it is possible to reduce the width with Eric's trick, it is not so
easy to enlarge the width without using the :align option and appropriate
latex code, so the simplest approach would be to either give an error upon
exportin, or to ignore the width option altogether.

On the other hand, I guess :width makes sense for other exporters, like
e.g. html or ODT, so it should stay.

Just my two cents.

Giuseppe Lipari




2015-01-06 23:32 GMT+01:00 Nicolas Goaziou :

> Hello,
>
> Giuseppe Lipari  writes:
>
> > I am preparing some slides using org-beamer mode. Here is the snippet of
> a
> > table I have in my file:
> >
> >
> >#+ATTR_LATEX: :float t :width 4cm
> >| /Single node app/ | /Distributed app/   |
> >|---+-|
> >| Operating System  | Distributed OS  |
> >| Network   | Network programming libs|
> >| Progr. language   | Distributed Progr. language |
> >|---+-|
> >
> > If I understand well from the documentation, the "width" option should
> set
> > the width of the table. However, the exporter produces the following
> latex
> > snippet:
> >
> >
> > \begin{table}[htb]
> > \centering
> > \begin{tabular}{4cm}{ll}
> > \emph{Single node app} & \emph{Distributed app}\\
> > \hline
> > Operating System & Distributed OS\\
> > Network & Network programming libs\\
> > Progr. language & Distributed Progr. language\\
> > \hline
> > \end{tabular}
> > \end{table}
> > \end{frame}
> >
> >
> > Clearly, the lenght specification went in the wrong place, as the first
> > parameter of tabular should not be the width of the table, but the column
> > alignment.
>
> This should be fixed. Thank you for reporting it.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>



-- 
Giuseppe Lipari
LIFL
Université de Lille 1
blogs: http://scacciamennule.blogspot.com  (Italian)

  http://okpanico,wordpress.com  (Italian)
  http://algoland.wordpress.com   (English)