Re: [O] Bug: code and footnotes (was Bug: dates in heading break beamer export)

2013-10-01 Thread Daniele Pizzolli

On 09/30/2013 07:05 PM, Marcin Borkowski wrote:

[]

- =string=[footnote]


Just curious: what's the problem with =string=[footnote]?


Hello Marcin,

This line do no really cause errors on latex but do no export the code
and/or the footnote and leaves the equals in the output.  Here are
some cases:

#+OPTIONS: H:3
* title
** section
*** subsection
test[fn:1] good: text, footnote, no equals

=test=[fn:2] bad: no code(bad), footnote, equals(bad)

=test[fn:3]= bad: code, no footnote(bad), equals(bad)

=test=\[fn:4] bad: code, footnote, no equals, slash(bad?)

=test=​​[fn:5] bad: no code(bad), footnote, equals (bad) (please note
that there is a zero with whitespace before “[”)


[fn:1] t1


[fn:2] t2


[fn:3] t3


[fn:4] t4


[fn:5] t5


* title 2


Best,
Daniele



Re: [O] Bug: dates in heading break beamer export

2013-10-01 Thread Daniele Pizzolli

On 09/30/2013 06:02 PM, Daniele Pizzolli wrote:


But org-mode allow this!

I think that if something is allowed in org-mode syntax but not by the
underlining tools used for export, the exporter should take care to find
a suitable workaround.


Hello all,

I see all your interesting points on the discussion... I just want to
explain that my statement is my naïve interpretation of:

You can use intuitive markup then have it converted to HTML, LATEX,
ODT – and much more[fn:1].

I can understand that the markup can end in very complex cases, but I
hope that you agree with me that with this advertised feature an extra
care should be put in ensuring that every markup can be exported
without crashing some tool in the chain.

The latex and html exporters (the one I use most) do already a
wonderful job, but some important case are missing.

Since I found a healthy and friendly community I was thinking that was
worth reporting them.

In fact I use org-mode primarily to stay away from *tex
nuisances... and I think that I am not the only one.  I know enough
latex to find a workaround myself (not enough to offer a general
reliable solution) but I do not think that this will be a pleasant
experience for a newcomer or to somebody that choose org-mode for the
latex export capability.

Regards,
Daniele


[fn:1] http://orgmode.org/features.html#sec-7




Re: [O] Needing help on org-gnus + LaTeX export -

2013-10-01 Thread Suvayu Ali
On Wed, Oct 02, 2013 at 05:56:32AM +0200, Joseph Vidal-Rosset wrote:
> 
> (unless (boundp 'org-export-latex-classes)
>   (setq org-export-latex-classes nil))
> (add-to-list 'org-export-latex-classes
>  '("beamer"

These variables are from the old exporter.  See:

  
  
  

or the manual.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Needing help on org-gnus + LaTeX export -

2013-10-01 Thread Joseph Vidal-Rosset
Hi again,

I succeed in exporting to .tex files with article.cls   and book.cls  but I
do not succeed to export other classes. I do not even suceed in exporting
in beamer class. I have in my emacs:

(unless (boundp 'org-export-latex-classes)
  (setq org-export-latex-classes nil))
(add-to-list 'org-export-latex-classes
 '("beamer"

 
"\\documentclass[11pt]{beamer}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{hyperref}\n\\usepackage{verbatim}\n"
   ("\\section{%s}" . "\\section*{%s}")
   ("\\begin{frame}\\frametitle{%s}" "\\end{frame}"
"\\begin{frame}\\frametitle{%s}" "\\end{frame}")))


But it does not work  : user-error: Unknown LaTeX class `beamer'

I need again some help...

Thanks in advance,

Jo.


2013/10/1 Joseph Vidal-Rosset 

>
> 2013/10/1 Eric S Fraga 
>
>> Now you are starting to blur the lines between email and document
>> management?  If emails get this complicated, my gut feeling is that you
>> are better off working on a real document (in org, of course ;-) and
>> generating a PDF to attach to an email.
>>
>
> You are certainly right Eric. Now I understand that I have to learn how
> writing every latex document in org-mode. I do not doubt that it is
> possible.
>
> Again, many thanks !
>
> Jo.
>


Re: [O] Org Tutorials need more structure

2013-10-01 Thread M
Hi Carsten & all, 

thanks for this good idea and the resulting discussion here!

my 2 cents about the tutorials page:
yes, I agree, that especially for absolute beginners (new to Emacs and new
to org-mode) it would be helpful to have a very basic step by step tutorial.
The list of "General introductions" is very long and quite confusing.

How I came to using org-mode?

I am a newby (at least I still feel like one, although I'm working with
Emacs org-mode now for more than 1.5 years), so maybe my experience might
help here.

I was a GTD user at first using other "GUI oriented" GTD software like
Thinking Rock, iGTD. iGTD had some problems and was not updated any more, so
I started searching for a new tool  and found Charles Cave's GTD tutorials
[1] (nearly 3 years ago, it seems!) and then started using org-mode since
Jan 2012. 
I then found Bernt Hansen's excellent site and used his setup [2] for my
first steps with org-mode, but it was very hard to adapt the agendas and
settings to my needs (and I'm still struggling).
Furthermore, Sacha Chua's blog is very interesting and I'm often looking at
the worg tutorials page.

So my first interest was todo/task/project management, but I quickly became
interested in note-taking, exporting, attachments, dired, bookmarks,
linking, ...

My problems were (and still are):
a) I am one of those users, which have never been really working with Emacs
before, so at the beginning, it's very hard to understand the concept and
basic commands.
Many tutorials take for granted a lot of knowledge.

b) I'm using two different OS's (Windows 7 at work and OS X 10.6 at home),
each one has its own problems when setting up advanced features.
It is especially difficult, to set up an efficient workflow to integrate MS
Outlook (Mails/Calendar) and Emacs org-mode...

c) I'm only an engineer, not a professional programmer. My knowledge about
programming in general and elisp and Emacs configuration is still very
limited, unfortunately. see a)

[1] http://members.optusnet.com.au/~charles57/GTD/gtd_workflow.html
[2] http://doc.norang.ca/org-mode.html

Nevertheless thank you for this great tool and all the work you all put in
maintaining, extending, documenting and helping!
Org-mode changed my way of working and I never was so close to having a good
and efficient system as I am now with org-mode. (as soon as long as I don't
have to search for the solution of a problem :( )

Kind regards

Martin 


Carsten Dominik  gmail.com> writes:

> and came away with the feeling that that this page has become
> somewhat useless for people who are really new to Org.
> 
> Can we have a discussion here on how this path should look like?
> When you came to Org-mode as a newby, what were the three resources
> that really made an impression on by being accessible and
> providing feel and promise for digging deeper?






Re: [O] Restore raw output in LaTeX export from in-line code block

2013-10-01 Thread Liam Healy
On Sun, Sep 29, 2013 at 3:46 PM, Eric Schulte  wrote:
> Liam Healy  writes:
>
>> I noticed that raw results from in-line code blocks were disappearing in
>> the new LaTeX exporter, and bisected the repo to the change 7117ad4f92. I
>> have created the attached patch to fix the problem and restore the previous
>> behavior.
>>
>> example file
>>   * Test
>> 1. Inline common lisp raw: src_lisp[:results raw]{(+ 2 2)}, should
>> say 4.
>>
>>
>> Desired output, restored by patch
>>   \item Inline common lisp raw: 4, should say 4.
>> Output without patch
>>\item Inline common lisp raw: , should say 4.
>>
>> If this looks right, please apply.
>>
>> Liam
>>
>
> Hi Liam,
>
> You're actually noticing a symptom of an error in the way lisp code
> blocks were handling results (conflating the output/results and the
> scalar/vector distinction).  I've just pushed up a fix, please let me
> know if you continue to see these types of errors.
>
> Best,
>
> --
> Eric Schulte
> https://cs.unm.edu/~eschulte
> PGP: 0x614CA05D

Thanks Eric. Indeed, your patches work to produce the correct output
for that case. Now I have another problem. I'm really not interested
in producing "4" of course, what I do is use lisp to produce LaTeX.
For example,

+ Inline common lisp raw: $src_lisp[:results raw]{(format nil
"\\sqrt{2~c" (code-char 125))}$, should say "$\sqrt{2}$".

Which used to produce (Org-mode version 7.9.4) the right thing,
\item Inline common lisp raw: $\sqrt{2}$, should say ``$\sqrt{2}$".
and now (Org-mode version 8.2.1) doesn't evaluate the lisp,
\item Inline common lisp raw: $src_lisp[:results raw]{(format nil
"\\sqrt{2~c" (code-char 125))}$, should say "$\sqrt{2}$".

Is this a bug? How do I restore the evaluation of the src_lisp in this context?

Thanks.
Liam



Re: [O] [Babel] :colnames "no" no longer default for Emacs Lisp [Was] Lisp error: (wrong-type-argument listp hline)

2013-10-01 Thread Thomas S. Dye
Hi Eric,

I think this breaks Marc-Oliver Ihm's lob-table-operations.org.

I use these a lot with #+call: lines.

Any tips on how to get the old behavior back? I tried :colnames no with
one of Marc-Oliver's code blocks, (and kept :colnames yes with my
#+call: line) but this didn't seem to change anything. Instead of the
column names from the original tables, which I used to get, I now get
names like "t1c2".

All the best,
Tom

Eric Schulte  writes:

>>
>> I always wondered why emacs-lisp is the _only_ language with ":colnames no" 
>> as
>> its default. Is there a reason therefore?  If no really good reason, could we
>> suppress that?
>>
>
> This seemed to make sense early on because Emacs Lisp could easily
> process hlines itself, but at this point it adds more confusion than it
> is worth.  I've reverted this default for elisp, hopefully it doesn't
> break too many peoples existing Org-mode files.
>
> Best,

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Summary Blocks Time

2013-10-01 Thread Gustav Wikström
> Esben Stien  writes:
>
> > Any pointers as to how I can do this?
>
> Got it;)
>
> (setq org-time-clocksum-format '(:hours "%d" :require-hours t
>  :minutes ":%02d" :require-minutes t))

Good find Esben!

Actually, this recent change to how clocksum is formated also brings
another problem. And that is when doing calculations with time. We have the
flags "t" and "T" to be able to do calculations in tables on times, but
with the new format presenting days calculations are no longer returning
the correct values.

Best regards
Gustav


Re: [O] multiple indirect buffers, and limiting to a drawer

2013-10-01 Thread Myles English

Hi Matt,

mopto...@gmail.com writes:

> I am returning to my long-languishing idea of an "org writer's room"
> (https://github.com/titaniumbones/org-writers-room , see also gmail
> archives for a brief discussion about a year ago).  Coming to terms
> with some of my own coding limitations(!), I want to keep this
> relatively simple -- just a 3-paneled interface that shows
>
> (1) in a narrow window on the left, an outline of the whole org-file,
> which I take to represent a major writing project
>
> (2) in the main window, a heading element in an indirect buffer
>
>
> (3) in the right-hand panel, I'd like  to just show the properties
> drawer of the currently active heading.
>
>
> Can someone suggest the best way to create that third buffer (or more
> precisely, that second indirect buffer)?

I can't, but your description of a windowed layout sounds like
workgroups ( https://github.com/tlh/workgroups.el ), may be you can
reuse some code?

Myles





Re: [O] Org Tutorials need more structure

2013-10-01 Thread Marcin Borkowski
Dnia 2013-10-01, o godz. 13:34:17
David Rogers  napisał(a):

> Suvayu Ali  writes:
> 
> > Hi Joseph,
> >
> > On Sat, Sep 28, 2013 at 09:22:02AM +0200, Joseph Vidal-Rosset wrote:
> >> 
> >> Example: I am presently mainly interested to see if it is possible
> >> to use gnus to write a scientific letter with all conveniences of
> >> texlive. Of course I can open a tex file with letter class and
> >> send to my colleague a pdf file. But it would be more convenient
> >> to write an email and using conversions to html and png images to
> >> send to him directly this email. I guess it is possilbe to do it
> >> with gnus. But the documentation is esoteric: I hear about links,
> >> but how it works concretly with example understanble by a
> >> newby ...  mystery. It is therefore frustrating and quickly
> >> discouraging.
> >
> > Your example is not beginner's tutorial at all!  Nor is it something
> > that the manual can cover.  For esoteric/specific needs like this
> > "advanced tutorials" are more appropriate.
> 
> Part of this situation, part of what can be improved about the
> tutorials, is that a beginner cannot know whether his request belongs
> in a beginner's tutorial or not. Beginners cannot know ahead of time
> what's hard and what's easy, and beginners often wonder "Can it do
> that amazing thing I've been wishing I could do?" when they see a
> piece of software that's new to them.

Well, in case of Org-mode, surprisingly often the answer is "Yes, it
can." ;)

> Face it - Org-mode is ALREADY esoteric in itself, so it's quite
> reasonable that beginners will continue to expect it to be able to do
> esoteric things that don't happen to be the ones that are already
> easy - unless there's a convenient way for them to find out.

I woudn't call Org-mode "esoteric".  For Emacs users, it is quite a
natural thing.  For non-Emacs-users, maybe, but still, its simplicity
and newbie-friendliness is amazing (deceptively, I'd call it;)).

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] Needing help on org-gnus + LaTeX export -

2013-10-01 Thread Joseph Vidal-Rosset
2013/10/1 Eric S Fraga 

> Now you are starting to blur the lines between email and document
> management?  If emails get this complicated, my gut feeling is that you
> are better off working on a real document (in org, of course ;-) and
> generating a PDF to attach to an email.
>

You are certainly right Eric. Now I understand that I have to learn how
writing every latex document in org-mode. I do not doubt that it is
possible.

Again, many thanks !

Jo.


Re: [O] AUCTeX key bindings within Org documents

2013-10-01 Thread Marcin Borkowski
Dnia 2013-10-01, o godz. 17:08:49
Suvayu Ali  napisał(a):

> Hi Fabrice,
> 
> On Sun, Sep 29, 2013 at 08:47:09PM +0200, Fabrice Niessen wrote:
> >
> > | C-c C-c | org-export-dispatch|
> 
> You might want to avoid this.  By default, Org uses it to do "smart
> stuff": update local setup, enumerated lists, statistics cookies,
> complete capture, evaluate current source block, ... basically it is a
> context aware all purpose keybinding.  I don't think it is wise to
> lose all that for a command like export that should work from
> anywhere in the buffer.
> 
> FWIW, achieving one-to-one mapping may not be possible.  After all
> both AUCTeX and Org are rather complicated packages that do a lot of
> "smart" things.

C-c C-c was my idea - but now I've read this, I agree, this might be
not a brilliant one.  OTOH, C-c C-e got rebound to
org-auckeys-environment...  Dunno.

> Cheers,

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] Org Tutorials need more structure

2013-10-01 Thread David Rogers
Suvayu Ali  writes:

> Hi Joseph,
>
> On Sat, Sep 28, 2013 at 09:22:02AM +0200, Joseph Vidal-Rosset wrote:
>> 
>> Example: I am presently mainly interested to see if it is possible to use
>> gnus to write a scientific letter with all conveniences of texlive. Of
>> course I can open a tex file with letter class and send to my colleague a
>> pdf file. But it would be more convenient to write an email and using
>> conversions to html and png images to send to him directly this email. I
>> guess it is possilbe to do it with gnus. But the documentation is esoteric:
>> I hear about links, but how it works concretly with example understanble by
>> a newby ...  mystery. It is therefore frustrating and quickly discouraging.
>
> Your example is not beginner's tutorial at all!  Nor is it something
> that the manual can cover.  For esoteric/specific needs like this
> "advanced tutorials" are more appropriate.

Part of this situation, part of what can be improved about the
tutorials, is that a beginner cannot know whether his request belongs in
a beginner's tutorial or not. Beginners cannot know ahead of time what's
hard and what's easy, and beginners often wonder "Can it do that amazing
thing I've been wishing I could do?" when they see a piece of software
that's new to them.

Face it - Org-mode is ALREADY esoteric in itself, so it's quite
reasonable that beginners will continue to expect it to be able to do
esoteric things that don't happen to be the ones that are already easy -
unless there's a convenient way for them to find out.

-- 
David R



Re: [O] AUCTeX key bindings within Org documents

2013-10-01 Thread AW
Am Freitag, 27. September 2013, 13:21:40 schrieb Fabrice Fabrice Niessen:
> Hello,
> 
> Due to a friend's request, I've tried to offer AUCTeX key bindings within
> Org documents via a minor mode, called "org-auctex-keys".
> 
> If you're interested, check it out at
> https://github.com/fniessen/org-auctex-key-bindings.
> 
> Note that I'm willing to add extra AUCTeX keys -- but I don't use AUCTeX
> enough to know what's important to transfer to Org.
> 
> Best regards,
> Fabrice

Wonderfull idea, thank you very much.

How can I get it switched on in every org-buffer automagically?

Regards,

Alexander



Re: [O] proposed patch for org-export-latex-hyperref-options-format

2013-10-01 Thread Andrea Rossetti

  Thanks Nicolas for your last directions,
I will apply them.

  The accidental coexistence of two Org versions
on my Emacs installation (built-in versus ELPA)
confused me a bit, apologies for the noise.

  Kindest regards,

  Andrea

Nicolas Goaziou  writes:
>
> You can disable the hypersetup with `org-latex-with-hyperref' (or
> locally with #+options: texht:nil) and install you own
> with #+latex_header, or in your class.
>
> I don't think we need yet another way to provide a customized hypersetup
> string. Do we?
>
>
> Regards,



Re: [O] org-table-duplicate-column

2013-10-01 Thread Karl Voit
Hi!

* Michael Brand  wrote:
>
> On Tue, Oct 1, 2013 at 5:50 PM, Karl Voit  wrote:
>> I assume, there is a misunderstanding.
>
> Yes there was. With your clean example I understand now.

Sorry that I was not able to describe the issue in the first place.

>> [your example]
>>
>> Does this make any sense for you?
>
> Yes, it absolutely does. Only that someone would have to implement the
> missing function org-table-duplicate-column... If you don't already
> know it you can use the table formula editor "C-c '" for this in the
> meantime to at least copy/paste the formulas for the new column.

Thanks. This is how I do it for now.

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] input data for babel blocks

2013-10-01 Thread Thomas S. Dye
Hi Chuck,

Neat. Thanks for sharing.

All the best,
Tom

Charles Berry  writes:

> Alan Schmitt  polytechnique.org> writes:
>
>> 
>> Hi Charles,
>> 
>> ccberry  ucsd.edu writes:
>> 
>> > Lacking that, another alternative to the approach you have crafted is to
>> > use elisp src blocks to set up the commands needed to create the 
>> > objects,
>> > and then place the results of executing the elisp src block in the src
>> > block of your favored language using noweb, for example
>> >
>> > #+BEGIN_SRC mylang :noweb yes
>> >   <>
>> > #+END_SRC
>> >  
>> > might convert 'arg2' to an object of the desired type named 'arg1' in a 
>> > 'mylang' src block.
>> 
>> This looks like a very powerful approach, but it's a bit beyond my
>> understanding of babel (which is limited) and noweb (whose existence I
>> just discovered after reading http://orgmode.org/manual/noweb.html).
>> 
>
> Sorry if it was a bit obtuse. The examples given by others seem to have 
> helped. And I will give one more.
>
> [deleted]
>
>> If you have an example that uses different languages, I'd love to look
>> at it. I'll then try to write an example for ocaml.
>> 
>
>
> Here is what I use for LaTeX thru elisp to R:
>
>
>
> * Quote Blocks 
>
> quote-blks takes two args:
>
> - blk :: a string of comma separated src block names
> - sep :: an optional separator for use when there is more than one
>  block
>
> I usually save it in a file and load it in with  
> (org-babel-lob-ingest file). But you can copy and paste and the example 
> below will still work.
>
> #+name: quote-blks
> #+BEGIN_SRC emacs-lisp :var blk="abc" :var sep="\"\n\""
> (save-excursion
>   (replace-regexp-in-string "\"\"" ""
>(mapconcat
> (lambda (x) 
>   (org-babel-goto-named-src-block x)
>   (format "%S" (cadr  (org-babel-get-src-block-info  t
> (split-string blk "," t)
> sep)
>t t))
>   
> #+END_SRC
>
>
> * example of use
>
>
> The LaTeX here can be editted via C-c ' 
> (i.e. org-edit-special --> org-edit-src-code).
>
> #+name: lstuff
> #+BEGIN_SRC latex :eval never :exports none
> Here is a \backslash. And an unmatched quote: '.
> #+END_SRC
>
>
> Here is an example using it on the above block.
>
> The cat statement prints a formatted version.  The str statement shows
> what R sees (but the outer quotes are not part of the string).
>
> #+BEGIN_SRC R :noweb yes :results output
> some.latex <- 
> <>
> cat(some.latex,"\n")
> str(some.latex)
> #+END_SRC
>
> #+RESULTS:
> : Here is a \backslash. And an unmatched quote: '. 
> :  chr "Here is a \\backslash. And an unmatched quote: '."
>
> HTH,
>
> Chuck
>
>
>

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] [BUG] hline references on left side of table formula

2013-10-01 Thread lompik
Hi,

I was interested to use hline references on the left side. However I found out 
that it
is not completely unsupported.
When the left side consist of:
* single cells references, it does not work
* ranged cells, it works for me (org 8.0.3)

The patch below tranforms the single cell references to ranged cells .

However it still does not work for references like @+ or @- I$1.. , which can 
be solve 
using references like @I+1#1.

Thanks,


*** a/org-table.el Sat Jun 29 16:20:30 2013
--- b/org-table.el Tue Oct 1 00:23:35 2013
***
*** 3227,3232 
--- 3227,3236 
(put-text-property 0 (length (caar res))
:orig-eqn e (caar res
(t
+ ;; if contains hline-reference and refers to fixed cell..make it range
+ (if (string-match "^@[+-]?I*[^.]*$" lhs )
+ (setq lhs (format "%s..%s" lhs lhs )))
+ 
(setq range (org-table-get-range lhs org-table-current-begin-pos
1 nil 'corners))
(setq r1 (nth 0 range) c1 (nth 1 range)


However, fields like @-I or @+II 

> 
> Hi Rick,
> 
> hline-relative references on the left side of a table are currently not 
> supported. The fact that this is expanded is a bug. A patch catching this 
> case would be very welcome.
> 
> Regards
> 
> - Carsten
> 
> On May 1, 2013, at 7:27 PM, Rick Frankel  wrote:
> 
> > Hi-
> > 
> > I don't know if this is a bug or feature :), but if an hline reference
> > (@I, etc) is used on the left side of a calculation, it applies to ALL
> > columns in the row even if the column is specfied.
> > 
> > Here are some examples to show the results. I would expect all three
> > versions to generate the same results as the first example.
> > 
> > #+BEGIN_ORG
> > * Absolute reference (expected results)
> > | a | b |
> > |---+---|
> > | x | 1 |
> > | y | 2 |
> > |---+---|
> > | | 3 |
> > #+TBLFM: @4$2=vsum(@address@hidden)
> > 
> > * hline reference
> > | a | b |
> > |---+---|
> > | x | 1 |
> > | y | 2 |
> > |---+---|
> > | x + y | 3 |
> > #+TBLFM: @II$2=vsum(@address@hidden)
> > 
> > * hline reference with full cell specification in sum
> > | a | b |
> > |---+---|
> > | x | 1 |
> > | y | 2 |
> > |---+---|
> > | 3 | 3 |
> > #+TBLFM: @II$2=vsum(@address@hidden)
> > #+END_ORG
> > 
> > FWIW, I believe the problem is that `org-table-recalculate' is
> > matching lhs cell references explicitly against pure numeric
> > references ("@[0-9]+$[0-9]+") and therefore expands the lhs via
> > `org-expand-lhs-ranges' instead of expanding it with
> > `org-table-get-descriptor-line'
> > 
> > rick
> > 
> > 
___
Qu'y a-t-il ce soir à la télé ? D'un coup d'œil, visualisez le programme sur 
Voila.fr http://tv.voila.fr/programmes/chaines-tnt/ce-soir.html



[O] Org-Capture template overwriting headlines!?

2013-10-01 Thread Juan Alberto Sanchez
Hello everyone,

I recently wrote a few org-capture template for myself and I just notice a
strange issue with the captures. when I record a capturer if there was
already something of the same level where the file+headline is inserting it
overwrites the previews entry of the same level. For example, I take a
capture by hitting C-c r t that captures is inserted as a ** TODO under a *
Tasks if I take another capture the next ** TODO will overwrite already
existing **TODO with the text on the new capturer   rather then inserting
it below the exiting ** TODO headline. any idea what is going on? Below is
a pestbin of my org config

http://pastebin.com/vufwmU2m

Thank you for the help before hand

-- 
**


Re: [O] [BUG] in org-property-drawer-re?

2013-10-01 Thread Carsten Dominik

On 1.10.2013, at 20:36, Thorsten Jolitz  wrote:

> Carsten Dominik  writes:
> 
>> On 1.10.2013, at 19:50, Thorsten Jolitz  wrote:
>> 
>>> 
>>> Hi List,
>>> 
>>> for the navi-mode keyword-search for complete property drawers I copied
>>> 
>>> ,---
>>> | org-property-drawer-re
>>> `---
>>> 
>>> from org.el:
>>> 
>>> #+begin_src emacs-lisp
>>> (concat "\\(" org-property-start-re "\\)[^\000]*\\("
>>>   org-property-end-re "\\)\n?")
>>> #+end_src
>>> 
>>> #+results:
>>> : \(^[  ]*:PROPERTIES:[ ]*$\)[^\\000]*\(^[  ]*:END:[
>>> ]*$\)
>>> : ?
>>> 
>>> A bit unreadable, but you get the message ... here is my hopefully 
>>> equivalent
>>> version:
>>> 
>>> ,--
>>> | (:propertydrawer
>>> |   . (concat "\\(^[\\s\\t]*:PROPERTIES:[\\s\\t]*$\\)[^\\000]*"
>>> | "\\(^[\\s\\t]*:END:[\\s\\t]*$\\)\\n?"))
>>> `--
>>> 
>>> But this did not match correctly in Bernt Hansens tutorial:
>> 
>> Indeed, this is a bad regular expression, it is too greedy and will
>> match all the way to the last :END: line it can find.  also, \\s is
>> wrong, it should be just a space, so "[ \t]". Luckily
>> this regular expression does not seem to be used in Org as far
>> as I can see
> 
> 
> But, if this is equivalent to the #+results: block above, it is defined
> in org.el without that one ? indicated that makes the difference:
> 
> ,---
> | (:propertydrawer
> |   . (concat "\\(^[ \\t]*:PROPERTIES:[ \\t]*$\\)[^\\000]*?" <=
> | "\\(^[ \\t]*:END:[ \\t]*$\\)\\n?"))
> `---

Yes.  this is a bug, fortunately inconsequential since org does
its property matching in a different way.

Anyway, this bug is fixed in master.

- Carsten

> 
>> Yes, you need the star to make it non-greedy.
> 
> the '?' I guess ...
> 
>> However, you can leave the \n after you have corrected the
>> character class to "[ \t]" - it just means that
>> the \n will be part of the match, but still allow
>> for the possibility that the last line hits the end
>> of the buffer.
> 
> ok, I see
> 
>> A, regular expressions.  I think in my entire history
>> as a programmer, learning about regular expressions was
>> the biggest braintrip I ever had - still love them.
> 
> thanks god for M-x regexp-builder ;)
> 
>>> PS
>>> Can anybody explain this marvelous construct in the regexp:
>>> 
>>> ,-
>>> | [^\\000]
>>> `-
>> 
>> This is just a cheep way to match any character at all, because \000 should
>> not be part of any string (in C it indicates the end of a string).
>> In principle you could put any character you are sure will not turn up,
>> but \000 seems to be the safest choice.  It is
>> faster (I think) than "\\(.\\|\n\\)*" because the first will
>> just run fast and streight with a table lookup while the
>> latter need to always alternate between two alternatives.
>> I have not timed it, though.
> 
> This is a very nice trick, and the alternative looks easy too - I have
> to remember this.
> 
>>> I often pondered about how to achieve its effect with other means, since
>>> I did not find it in the Emacs Lisp manual.
>> 
>> There you go - sometimes a brain is better than the Emacs manual :)
> 
> Thanks a lot
> 
> --
> cheers,
> Thorsten
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [BUG] in org-property-drawer-re?

2013-10-01 Thread Thorsten Jolitz
Carsten Dominik  writes:

> On 1.10.2013, at 19:50, Thorsten Jolitz  wrote:
>
>>
>> Hi List,
>>
>> for the navi-mode keyword-search for complete property drawers I copied
>>
>> ,---
>> | org-property-drawer-re
>> `---
>>
>> from org.el:
>>
>> #+begin_src emacs-lisp
>>  (concat "\\(" org-property-start-re "\\)[^\000]*\\("
>>org-property-end-re "\\)\n?")
>> #+end_src
>>
>> #+results:
>> : \(^[   ]*:PROPERTIES:[ ]*$\)[^\\000]*\(^[  ]*:END:[
>> ]*$\)
>> : ?
>>
>> A bit unreadable, but you get the message ... here is my hopefully equivalent
>> version:
>>
>> ,--
>> | (:propertydrawer
>> |   . (concat "\\(^[\\s\\t]*:PROPERTIES:[\\s\\t]*$\\)[^\\000]*"
>> | "\\(^[\\s\\t]*:END:[\\s\\t]*$\\)\\n?"))
>> `--
>>
>> But this did not match correctly in Bernt Hansens tutorial:
>
> Indeed, this is a bad regular expression, it is too greedy and will
> match all the way to the last :END: line it can find.  also, \\s is
> wrong, it should be just a space, so "[ \t]". Luckily
> this regular expression does not seem to be used in Org as far
> as I can see


But, if this is equivalent to the #+results: block above, it is defined
in org.el without that one ? indicated that makes the difference:

,---
| (:propertydrawer
|   . (concat "\\(^[ \\t]*:PROPERTIES:[ \\t]*$\\)[^\\000]*?" <=
| "\\(^[ \\t]*:END:[ \\t]*$\\)\\n?"))
`---

> Yes, you need the star to make it non-greedy.

the '?' I guess ...

> However, you can leave the \n after you have corrected the
> character class to "[ \t]" - it just means that
> the \n will be part of the match, but still allow
> for the possibility that the last line hits the end
> of the buffer.

ok, I see

> A, regular expressions.  I think in my entire history
> as a programmer, learning about regular expressions was
> the biggest braintrip I ever had - still love them.

thanks god for M-x regexp-builder ;)

>> PS
>> Can anybody explain this marvelous construct in the regexp:
>>
>> ,-
>> | [^\\000]
>> `-
>
> This is just a cheep way to match any character at all, because \000 should
> not be part of any string (in C it indicates the end of a string).
> In principle you could put any character you are sure will not turn up,
> but \000 seems to be the safest choice.  It is
> faster (I think) than "\\(.\\|\n\\)*" because the first will
> just run fast and streight with a table lookup while the
> latter need to always alternate between two alternatives.
> I have not timed it, though.

This is a very nice trick, and the alternative looks easy too - I have
to remember this.

>> I often pondered about how to achieve its effect with other means, since
>> I did not find it in the Emacs Lisp manual.
>
> There you go - sometimes a brain is better than the Emacs manual :)

Thanks a lot

--
cheers,
Thorsten




Re: [O] [BUG] in org-property-drawer-re?

2013-10-01 Thread Carsten Dominik

On 1.10.2013, at 19:50, Thorsten Jolitz  wrote:

> 
> Hi List, 
> 
> for the navi-mode keyword-search for complete property drawers I copied
> 
> ,---
> | org-property-drawer-re
> `---
> 
> from org.el:
> 
> #+begin_src emacs-lisp
>  (concat "\\(" org-property-start-re "\\)[^\000]*\\("
> org-property-end-re "\\)\n?")
> #+end_src
> 
> #+results:
> : \(^[]*:PROPERTIES:[ ]*$\)[^\\000]*\(^[  ]*:END:[
> ]*$\)
> : ?
> 
> A bit unreadable, but you get the message ... here is my hopefully equivalent
> version: 
> 
> ,--
> | (:propertydrawer
> |   . (concat "\\(^[\\s\\t]*:PROPERTIES:[\\s\\t]*$\\)[^\\000]*"
> | "\\(^[\\s\\t]*:END:[\\s\\t]*$\\)\\n?"))
> `--
> 
> But this did not match correctly in Bernt Hansens tutorial:

Indeed, this is a bad regular expression, it is too greedy and will
match all the way to the last :END: line it can find.  also, \\s is
wrong, it should be just a space, so "[ \t]". Luckily
this regular expression does not seem to be used in Org as far
as I can see

> 
>,--
>|  43::PROPERTIES:
>|::CUSTOM_ID: Setup
>|::END:
>| 131::PROPERTIES:
>|::CUSTOM_ID: OrgFiles
>|::END:
>| 185::PROPERTIES:
>|::CUSTOM_ID: AgendaSetup
>|::END:
>|:
>|:Here is my current =org-agenda-files= setup.
>|:#+begin_src emacs-lisp :tangle no
>|:  (setq org-agenda-files (quote ("~/git/org"
>|: "~/git/org/client1"
>|: "~/git/org/bzflag"
>|: "~/git/client2")))
>|:#+end_src
>|:
>|:#+begin_src emacs-lisp :tangle yes :exports none
>|:  ;; The following setting is different from the document so that you
>|:  ;; can override the document org-agenda-files by setting your
>|:  ;; org-agenda-files in the variable org-user-agenda-files
>|:  ;;
>|:  (if (boundp 'org-user-agenda-files)
>|:  (setq org-agenda-files org-user-agenda-files)
>|:(setq org-agenda-files (quote ("~/git/org"
>|: "~/git/org/client1"
>|: "~/git/org/bzflag"
>|: "~/git/client2"
>|:  
>|:#+end_src
>`--
> 
> I had to add two ?

You only need the first - the second is OK.

> after the * and delete the final \n 
> 
> ,-
> | (:propertydrawer
> | . (concat "\\(^[\\s\\t]*:PROPERTIES:[\\s\\t]*$\\)[^\\000]*?"
> |   "\\(^[\\s\\t]*:END:[\\s\\t]*?$\\)"))
> `-

Yes, you need the star to make it non-greedy.
However, you can leave the \n after you have corrected the
character class to "[ \t]" - it just means that
the \n will be part of the match, but still allow
for the possibility that the last line hits the end
of the buffer.

A, regular expressions.  I think in my entire history
as a programmer, learning about regular expressions was
the biggest braintrip I ever had - still love them.

> 
> to get the desired results:
> 
>,-
>|  43::PROPERTIES:
>|::CUSTOM_ID: Setup
>|::END:
>| 131::PROPERTIES:
>|::CUSTOM_ID: OrgFiles
>|::END:
>| 185::PROPERTIES:
>|::CUSTOM_ID: AgendaSetup
>|::END:
>| 234::PROPERTIES:
>|::CUSTOM_ID: OrgFileStructure
>|::END:
>`-
> 
> A bug in the regexp?
> 
> PS 
> Can anybody explain this marvelous construct in the regexp:
> 
> ,-
> | [^\\000]
> `-

This is just a cheep way to match any character at all, because \000 should
not be part of any string (in C it indicates the end of a string).
In principle you could put any character you are sure will not turn up,
but \000 seems to be the safest choice.  It is
faster (I think) than "\\(.\\|\n\\)*" because the first will
just run fast and streight with a table lookup while the
latter need to always alternate between two alternatives.
I have not timed it, though.

> 
> I often pondered about how to achieve its effect with other means, since
> I did not find it in the Emacs Lisp manual.

There you go - sometimes a brain is better than the Emacs manual :)

Regards

- Carsten

> 
> -- 
> cheers,
> Thorsten
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


[O] [BUG] in org-property-drawer-re?

2013-10-01 Thread Thorsten Jolitz

Hi List, 

for the navi-mode keyword-search for complete property drawers I copied

,---
| org-property-drawer-re
`---

from org.el:

#+begin_src emacs-lisp
  (concat "\\(" org-property-start-re "\\)[^\000]*\\("
  org-property-end-re "\\)\n?")
#+end_src

#+results:
: \(^[  ]*:PROPERTIES:[ ]*$\)[^\\000]*\(^[  ]*:END:[]*$\)
: ?

A bit unreadable, but you get the message ... here is my hopefully equivalent
version: 

,--
| (:propertydrawer
|   . (concat "\\(^[\\s\\t]*:PROPERTIES:[\\s\\t]*$\\)[^\\000]*"
| "\\(^[\\s\\t]*:END:[\\s\\t]*$\\)\\n?"))
`--

But this did not match correctly in Bernt Hansens tutorial:

,--
|  43::PROPERTIES:
|::CUSTOM_ID: Setup
|::END:
| 131::PROPERTIES:
|::CUSTOM_ID: OrgFiles
|::END:
| 185::PROPERTIES:
|::CUSTOM_ID: AgendaSetup
|::END:
|:
|:Here is my current =org-agenda-files= setup.
|:#+begin_src emacs-lisp :tangle no
|:  (setq org-agenda-files (quote ("~/git/org"
|: "~/git/org/client1"
|: "~/git/org/bzflag"
|: "~/git/client2")))
|:#+end_src
|:
|:#+begin_src emacs-lisp :tangle yes :exports none
|:  ;; The following setting is different from the document so that you
|:  ;; can override the document org-agenda-files by setting your
|:  ;; org-agenda-files in the variable org-user-agenda-files
|:  ;;
|:  (if (boundp 'org-user-agenda-files)
|:  (setq org-agenda-files org-user-agenda-files)
|:(setq org-agenda-files (quote ("~/git/org"
|: "~/git/org/client1"
|: "~/git/org/bzflag"
|: "~/git/client2"
|:  
|:#+end_src
`--

I had to add two ? after the * and delete the final \n 

,-
| (:propertydrawer
| . (concat "\\(^[\\s\\t]*:PROPERTIES:[\\s\\t]*$\\)[^\\000]*?"
|   "\\(^[\\s\\t]*:END:[\\s\\t]*?$\\)"))
`-

to get the desired results:

,-
|  43::PROPERTIES:
|::CUSTOM_ID: Setup
|::END:
| 131::PROPERTIES:
|::CUSTOM_ID: OrgFiles
|::END:
| 185::PROPERTIES:
|::CUSTOM_ID: AgendaSetup
|::END:
| 234::PROPERTIES:
|::CUSTOM_ID: OrgFileStructure
|::END:
`-

A bug in the regexp?

PS 
Can anybody explain this marvelous construct in the regexp:

,-
| [^\\000]
`-

I often pondered about how to achieve its effect with other means, since
I did not find it in the Emacs Lisp manual.

-- 
cheers,
Thorsten




Re: [O] Needing help on org-gnus + LaTeX export -

2013-10-01 Thread Eric S Fraga
Joseph Vidal-Rosset  writes:

> Dear Eric, Seb, Achim, many thanks, it works now !

Excellent.  Glad we could help.

[...]

> Now, the next ideal step would be to be able to use any latex package to
> get png images via gnus, for example fitch or bussproofs or qtree...

Now you are starting to blur the lines between email and document
management?  If emails get this complicated, my gut feeling is that you
are better off working on a real document (in org, of course ;-) and
generating a PDF to attach to an email.  

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5




Re: [O] Summary Blocks Time

2013-10-01 Thread Esben Stien
Esben Stien  writes:

> Any pointers as to how I can do this?

Got it;)

(setq org-time-clocksum-format '(:hours "%d" :require-hours t
 :minutes ":%02d" :require-minutes t))

-- 
Esben Stien is b0ef@e s  a 
 http://www. s tn m
  irc://irc.  b  -  i  .   e/%23contact
   sip:b0ef@   e e 
   jid:b0ef@n n



Re: [O] multiple indirect buffers, and limiting to a drawer

2013-10-01 Thread Thorsten Jolitz
Matt Price  writes:

Hi,

> (1) in a narrow window on the left, an outline of the whole org-file,
> which I take to represent a major writing project
>
> (2) in the main window, a heading element in an indirect buffer
>
>
> (3) in the right-hand panel, I'd like  to just show the properties
> drawer of the currently active heading.
>
>
> Can someone suggest the best way to create that third buffer (or more
> precisely, that second indirect buffer)?  I guess I don't know the
> best way to limit to a drawer, nor do I really understand how to make
> multiple indirect buffers ( from what I can see,
> org-tree-to-indirect-buffer will only permit one indirect buffer at a
> time to be crate, which is fine, but which takes away the only tool I
> sort of understand).
>
>
> Another question: does emacs allow indirect buffers to have different
> modes than their parents If so, I would like to write some trivial
> minor modes that remap keybindings in each of the three windows, and
> .e.g I would like to prohibit full unfolding of the outline in the
> left-hand window if that's possible.

Much of this is possible with
[[https://github.com/tj64/navi][navi-mode.el]] (see screencast on
[[http://www.youtube.com/watch?v%3DII-xYw5VGFM:][youtube]]), although
you won't have 3 buffers, just 2: the Org file and the associated
*Navi-buffer*, but the latter is very flexibel: with one key commands
you can switch rapidly between multiple views of your Org file, change
the visibility of the Org buffer, and more 'remote-control' like stuff.

Just to give you an example using Bernt Hansen org-mode.org tutorial:

1. M-s n  -> fire up navi buffer showing level 1 headlines:

,
| 19 matches for "^\* " in buffer: org-mode.org
|  39:* Getting Started
| 411:* Tasks and States
| 566:* Adding New Tasks Quickly with Org Capture
| 712:* Refiling Tasks ...
`

2. move up and down with n an p, narrow and widen subtrees with r and w,
   change visibility of headline at point (whole buffer) with TAB (BACKTAB).
   use d to see the element at point in the Org-buffer, o (or s) to switch to
   it. use M-s M-s to switch back from Org-buffer to the navi-buffer.

3. type 2 or 3 to see headlines up to level 2 (3)

,--
| 122 matches for "^\*\*? " in buffer: org-mode.org
|  39:* Getting Started
|  42:** Org-Mode Setup
| 130:** Organizing Your Life Into Org Files
| 184:** Agenda Setup
| 233:** Org File Structure
| 291:** Key bindings
| 411:* Tasks and States
| 425:** TODO keywords
| 510:** Fast Todo Selection
| 533:** TODO state triggers
`--

4. type h to see all (currently) possible keyword-searches (and q to quit the
   help page)

,
| [KEY] : [SEARCH]
| 
| b : srcblock
| x : time
| I : inline-srcblock
| W : srcname-w-name
| M : multilineheader
| Y : priority
| T : target
| R : radiotarget
| D : drawer
| S : timestamp
| N : srcname
| U : result
| Z : result-w-name
| O : options
| P : propertydrawer
| A : deadline
| H : scheduled-time-hour
`

5. play around with the keyword searches, e.g. type b

,-
|  51:#+begin_src emacs-lisp :tangle no
|  65:#+begin_src emacs-lisp :tangle yes :exports none
|  86:#+begin_src emacs-lisp :tangle yes
| 103:#+begin_src emacs-lisp :tangle yes
| 190:#+begin_src emacs-lisp :tangle no
`-

  type S

   ,
   | 2130:  , SCHEDULED: <2009-05-18 Mon ++1w> 
   | 3771:  ,   DEADLINE: <2009-07-01 Wed +1m -0d> 
   | 3843:  ,  SCHEDULED: <2009-06-16 Tue +1w>
   | 4081:  ,  DEADLINE: <2009-07-01 Wed +1m -0d>   
   | 4265:  ,   SCHEDULED: <2009-11-21 Sat .+7d/30d>
   `

  and - for your use case - type P:

,
|  43::PROPERTIES:
|::CUSTOM_ID: Setup
|::END:
| 131::PROPERTIES:
|::CUSTOM_ID: OrgFiles
|::END:
| 185::PROPERTIES:
|::CUSTOM_ID: AgendaSetup
|::END:
`

6. finally, combine headline and keyword searches:

  type C-1 S

   ,
   | 2100:* GTD stuff
   | 2130:  , SCHEDULED: <2009-05-18 Mon ++1

Re: [O] input data for babel blocks

2013-10-01 Thread Alan Schmitt
ccbe...@ucsd.edu writes:

> Here is what I use for LaTeX thru elisp to R:

Thanks, this is quite enlightening.

Alan



[O] Summary Blocks Time

2013-10-01 Thread Esben Stien

After updating org-mode, the summary blocks has started giving time as
days + hours

Looking in the manual, I can't see how I can have it just give me hours.

Any pointers as to how I can do this?

-- 
Esben Stien is b0ef@e s  a 
 http://www. s tn m
  irc://irc.  b  -  i  .   e/%23contact
   sip:b0ef@   e e 
   jid:b0ef@n n



Re: [O] [PATCH] Display a count of items next to each list (or block)

2013-10-01 Thread Bernt Hansen


Bernt Hansen  writes:

> "Sebastien Vauban" 
> writes:
>
>> In order to make Org much nicer to use, I felt we missed a count of items 
>> next
>> to the lists (or blocks, for multi-block agenda views). Here is a patch to 
>> add
>> this, depending on the new variable `org-agenda-display-count-of-items'
>> (enabled by default).
>>
>> The count of items must be updated when you apply tag filtering on lists. The
>> patch does it as well.
>
> This patch doesn't report correct counts when a compact agenda is used
> and you filter by some task that doesn't match any entries in your
> block.

This patch also breaks the default N and P key bindings which skips over
uninteresting lines in the agenda.

Regards,
Bernt




Re: [O] Bug: dates in heading break beamer export

2013-10-01 Thread Marcin Borkowski
Dnia 2013-10-01, o godz. 18:01:51
Nicolas Goaziou  napisał(a):

> > Sounds good for me.  (NB: there's a similar problems with tags,
> > AFAIR. And (AFAIR!) it's even worse, since the exporter uses a
> > low-level TeX command \hfill.)
> 
> Well, there is `org-latex-active-timestamp-format',
> `org-latex-inactive-timestamp-format' and even filters can do it.

Maybe, I was talking about the default.  (And I even don't know now how
to correct it, since LaTeX does not have a notion of a "section tag" -
so there's no obvious way to represent such an entity in it!)

> It is also technically possible to write in ox-latex a section-local
> specific export back-end that would translate differently some objects
> in a \section{...} command. But that would make the export a bit more
> unpredictable.

Sorry, I did not get that idea.  We are not talking about
converting /different/ objects into /sections/, are we?

> Of course, in a few cases, `latex' back-end does its best to
> circumvent possible problems (i.e. nested footnotes), but this is
> nowhere near a general rule. It's usually a lot of work for a tiny
> corner case.

Agreed.

> >> > In general, putting formatting commands in \section title etc.,
> >> > even if not erroneous, is considered a bad practice.
> >> 
> >> But org-mode allow this!
> >> 
> >> I think that if something is allowed in org-mode syntax but not by
> >> the underlining tools used for export, the exporter should take
> >> care to find a suitable workaround.
> >
> > Definitely agreed.  The point is, what is a "suitable workaround"?
> 
> I disagree. This is just unrealistic. There are many packages
> involving many quirks. We cannot afford to provide a workaround to
> all (or even most) of them, assuming one exists.

Well, in this particular case I can definitely live with what Org
gives.  (The fact that I don't use the exporter too often helps;).)
In other words: the status quo *is* (more or less) a "suitable
workaround", at least for me.

> Also, the OP is making a false assumption. The underlining tool allows
> \texit in the section \command, i.e., you can type it in a "tex" file.
> You will get a compilation error, exactly as if you do the same
> mistake in Org. Why Org should be smarter in this case?

Hm, I did not understand this point:(.

My opinion (as a LaTeX user and hacker, if I may say so) is that LaTeX
exporter may be not optimal, but it is decent enough.  I agree that
it is a lot of work to make it better, and even then it's not enough,
since there is no "canonical" way to transform some Org-specific things
(like tags) to LaTeX syntax - so someone will be unhappy anyway...

What is important here (as I hinted previously) is the point of having
a LaTeX exporter: do we aim at pdf, not caring about the readability
and elegance of the (then intermediate) LaTeX file, or do we aim at a
good quality LaTeX file to do further (manual!) work on it, including
(but not limited to) "visual tuning".  I'm sure there are some people in
both camps, and satisfying all of them may be tricky.

Now that I think of it, writing a completely new LaTeX exporter might
actually be a lot of fun - I'm afraid, though, that I don't have enough
time for it now...

> Regards,

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] org-table-duplicate-column

2013-10-01 Thread Michael Brand
Hi Karl

On Tue, Oct 1, 2013 at 5:50 PM, Karl Voit  wrote:
> I assume, there is a misunderstanding.

Yes there was. With your clean example I understand now.

> [your example]
>
> Does this make any sense for you?

Yes, it absolutely does. Only that someone would have to implement the
missing function org-table-duplicate-column... If you don't already
know it you can use the table formula editor "C-c '" for this in the
meantime to at least copy/paste the formulas for the new column.

Michael



Re: [O] Bug: dates in heading break beamer export

2013-10-01 Thread Nicolas Goaziou
Hello,

Marcin Borkowski  writes:

> Daniele Pizzolli  napisał(a):
>> Or why not drop \textit?
>
> Sounds good for me.  (NB: there's a similar problems with tags, AFAIR.
> And (AFAIR!) it's even worse, since the exporter uses a low-level TeX
> command \hfill.)

Well, there is `org-latex-active-timestamp-format',
`org-latex-inactive-timestamp-format' and even filters can do it.

It is also technically possible to write in ox-latex a section-local
specific export back-end that would translate differently some objects
in a \section{...} command. But that would make the export a bit more
unpredictable.

Of course, in a few cases, `latex' back-end does its best to circumvent
possible problems (i.e. nested footnotes), but this is nowhere near
a general rule. It's usually a lot of work for a tiny corner case.

>> > In general, putting formatting commands in \section title etc.,
>> > even if not erroneous, is considered a bad practice.
>> 
>> But org-mode allow this!
>> 
>> I think that if something is allowed in org-mode syntax but not by the
>> underlining tools used for export, the exporter should take care to
>> find a suitable workaround.
>
> Definitely agreed.  The point is, what is a "suitable workaround"?

I disagree. This is just unrealistic. There are many packages involving
many quirks. We cannot afford to provide a workaround to all (or even
most) of them, assuming one exists.

Also, the OP is making a false assumption. The underlining tool allows
\texit in the section \command, i.e., you can type it in a "tex" file.
You will get a compilation error, exactly as if you do the same mistake
in Org. Why Org should be smarter in this case?


Regards,

-- 
Nicolas Goaziou



Re: [O] Suggestion: Weektree

2013-10-01 Thread John Hendy
On Tue, Oct 1, 2013 at 5:11 AM, Anders Johansson  wrote:
> Greetings,
> It's very nice to keep a journal in a datetree (using the capture mechanism)
> but for my uses it would actually be even more useful to keep it in a
> /weektree/. Something like this:
>
> * 2013
> ** W39 (September 23 - September 29)
> *** 2013-09-23 Monday
>  note 1
>  note 2
> *** 2013-09-24 Tuesday
> *** 2013-09-25 Wednesday
> ** W52 (December 23 - December 29)
> *** 2013-09-25 Wednesday
>  Christmas, no work done.
> * 2014
> ** W1 (December 30 - January 5)
> *** 2013-09-31 Tuesday
>  New year's eve party!
>
> (with names of months and days localised as usual)
>

[snip]

Not quite what you want, but I was looking for how to customize the
datetree using a capture template a bit back and made some decent
progress. You might want to check out those threads. All you should
need to do is figure out how to convert a date range (wherever you are
in the current week) to a week number and then supply the
supplementary start/stop days for the week in parentheses.

I think I did have issues capturing to a non-existing top level tree;
as in I think I had to pre-populate my year-month headline, and *then*
I could capture my individual days to it. Anyway, give these a
reading:
- http://osdir.com/ml/emacs-orgmode-gnu/2012-08/msg00396.html
- http://lists.gnu.org/archive/html/emacs-orgmode/2012-08/msg01174.html


Best regards,
John



Re: [O] org-table-duplicate-column

2013-10-01 Thread Karl Voit
Hi Michael!

* Michael Brand  wrote:
>
> On Mon, Sep 30, 2013 at 1:43 PM, Karl Voit  wrote:
>> What about alternating data (no summary value at bottom row) and
>> evaluation columns?
>>
>> | Data 1 | Eval 1 | Data 2 | Eval 2 |
>>
>> What about moving columns:
>>
>> Switching two columns from:
>> | Eval 1 | Eval 2 | foo | bar |
>> to:
>> | Eval 1 | foo | Eval 2 | bar |
>
> Alternation and moving can be handled with conditional formulas
>
> #+TBLFM: @>$<..@>$> = if(subvec("@1", 2, 6) == "Eval", 42, $0)
>
> in Calc or even simpler (regex) with Lisp. Don't worry, For this I had
> to cheat and look in testing/lisp/test-org-table.el with the ERTs that
> should also be an advanced documentation. In this case
> test-org-table/compare for the comparison and
> test-org-table/copy-field for the substring.

:-)

I could not follow this example without looking into a manual
either.

>> I still tend to think that org-table-duplicate-column
>> would be handy in many cases.
>
> I can not understand how with a variable if you mean that
> literally. Also with macros for TBLFM as I imagine, that could be
> difficult because already now there are conflicts and traps with the
> TBLFM syntax.

I assume, there is a misunderstanding.

What I mean: I have got the following table with two columns
containing two different data columns and one result column
which contains two formulas:

| data1 | data2 | results1 |
|---+---+--|
| 1 |   643 |2 |
| 4 |22 |8 |
| 6 |91 |   12 |
|---+---+--|
|   |   |   22 |
#+TBLFM: $3=$1*2::@5$3=vsum(@I$3..@II$3)

While being in the outer right column and doing "M-x
org-table-duplicate-column", Org-mode simply duplicates the column
and its related TBLFM entries accordingly:

| data1 | data2 | results1 | results1 |
|---+---+--+--|
| 1 |   643 |2 |2 |
| 4 |22 |8 |8 |
| 6 |91 |   12 |   12 |
|---+---+--+--|
|   |   |   22 |   22 |
#+TBLFM: $3=$1*2::@5$3=vsum(@I$3..@II$3) :: $4=$1*2::@5$4=vsum(@I$4..@II$4)

This should be a pretty simple operation in cases where there are no
complicated references.

Then I adopt the resulting TBLFM with only minor effort (*instead of
writing everything from scratch*) and get my similar but not same
forth column:

| data1 | data2 | results1 | results2 |
|---+---+--+--|
| 1 |   643 |2 |   321.50 |
| 4 |22 |8 |11.00 |
| 6 |91 |   12 |45.50 |
|---+---+--+--|
|   |   |   22 |   378.00 |
#+TBLFM: $3=$1*2::@5$3=vsum(@I$3..@II$3) :: 
$4=$2/2;%.2f::@5$4=vsum(@I$4..@II$4);%.2f

Probably I have a different approach because I am clearly no calc
pro user (I need only basics) and I want to keep formulas (and
references) easy to read (maintainability).

Does this make any sense for you?

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] proposed patch for org-export-latex-hyperref-options-format

2013-10-01 Thread Nicolas Goaziou
Hello,

Andrea Rossetti  writes:

>   I'd like to suggest a customizable hypersetup string
> as a future, non-urgent enhancement of ox-latex.el; the
> defcustom at line 324 of this old file:
>
> http://repo.or.cz/w/emacs.git/blob/HEAD:/lisp/org/org-latex.el
>
> could fit reasonably well for variable name, default value,
> type and docstring.

You can disable the hypersetup with `org-latex-with-hyperref' (or
locally with #+options: texht:nil) and install you own
with #+latex_header, or in your class.

I don't think we need yet another way to provide a customized hypersetup
string. Do we?


Regards,

-- 
Nicolas Goaziou



Re: [O] input data for babel blocks

2013-10-01 Thread Charles Berry
Alan Schmitt  polytechnique.org> writes:

> 
> Hi Charles,
> 
> ccberry  ucsd.edu writes:
> 
> > Lacking that, another alternative to the approach you have crafted is to
> > use elisp src blocks to set up the commands needed to create the 
> > objects,
> > and then place the results of executing the elisp src block in the src
> > block of your favored language using noweb, for example
> >
> > #+BEGIN_SRC mylang :noweb yes
> >   <>
> > #+END_SRC
> >  
> > might convert 'arg2' to an object of the desired type named 'arg1' in a 
> > 'mylang' src block.
> 
> This looks like a very powerful approach, but it's a bit beyond my
> understanding of babel (which is limited) and noweb (whose existence I
> just discovered after reading http://orgmode.org/manual/noweb.html).
> 

Sorry if it was a bit obtuse. The examples given by others seem to have 
helped. And I will give one more.

[deleted]

> If you have an example that uses different languages, I'd love to look
> at it. I'll then try to write an example for ocaml.
> 


Here is what I use for LaTeX thru elisp to R:



* Quote Blocks 

quote-blks takes two args:

- blk :: a string of comma separated src block names
- sep :: an optional separator for use when there is more than one
 block

I usually save it in a file and load it in with  
(org-babel-lob-ingest file). But you can copy and paste and the example 
below will still work.

#+name: quote-blks
#+BEGIN_SRC emacs-lisp :var blk="abc" :var sep="\"\n\""
(save-excursion
  (replace-regexp-in-string "\"\"" ""
   (mapconcat
(lambda (x) 
  (org-babel-goto-named-src-block x)
  (format "%S" (cadr  (org-babel-get-src-block-info  t
(split-string blk "," t)
sep)
   t t))
  
#+END_SRC


* example of use


The LaTeX here can be editted via C-c ' 
(i.e. org-edit-special --> org-edit-src-code).

#+name: lstuff
#+BEGIN_SRC latex :eval never :exports none
Here is a \backslash. And an unmatched quote: '.
#+END_SRC


Here is an example using it on the above block.

The cat statement prints a formatted version.  The str statement shows
what R sees (but the outer quotes are not part of the string).

#+BEGIN_SRC R :noweb yes :results output
some.latex <- 
<>
cat(some.latex,"\n")
str(some.latex)
#+END_SRC

#+RESULTS:
: Here is a \backslash. And an unmatched quote: '. 
:  chr "Here is a \\backslash. And an unmatched quote: '."

HTH,

Chuck




Re: [O] input data for babel blocks

2013-10-01 Thread Alan Schmitt
r...@rickster.com writes:

> You're close. The noweb ref should be a named src block which is
> executed, not expanded, so, (note the named shell source block and the
> parens in the noweb reference):
>
> #+name: testing
> #+BEGIN_SRC sh :results raw
> echo "["
> ls *.org | sed 's/$/;/'
> echo "]"
> #+END_SRC
>
> #+BEGIN_SRC ocaml :noweb yes
> let x =
> <>
> in x
> #+END_SRC

Thanks a lot, that was the missing piece!

So, for the record, here is a way to convert a table as a list of tuples
for use in ocaml. Thanks again to everyone for the help in getting
there.

--8<---cut here---start->8---
#+name: mydata
| x | 1 | 1.4 |
| y | 2 | 4.5 |
| z | 3 | 7.0 |

#+name: table_to_tuple
#+BEGIN_SRC emacs-lisp :results raw :var v='()
  (message 
   (concat "["
   (mapconcat
(lambda (vlist) 
  (concat "("
  (mapconcat 
   (lambda (val) (format "%S" val))
   vlist
   ", ")
  ")"))
v
"; ")
   "]"))
#+END_SRC

#+BEGIN_SRC ocaml :noweb yes
let x =
<>
in x
#+END_SRC

#+RESULTS:
: - : (string * int * float) list =
: [("x", 1, 1.4); ("y", 2, 4.5); ("z", 3, 7.)]
--8<---cut here---end--->8---



Re: [O] AUCTeX key bindings within Org documents

2013-10-01 Thread Suvayu Ali
Hi Fabrice,

On Sun, Sep 29, 2013 at 08:47:09PM +0200, Fabrice Niessen wrote:
>
> | C-c C-c | org-export-dispatch|

You might want to avoid this.  By default, Org uses it to do "smart
stuff": update local setup, enumerated lists, statistics cookies,
complete capture, evaluate current source block, ... basically it is a
context aware all purpose keybinding.  I don't think it is wise to lose
all that for a command like export that should work from anywhere in the
buffer.

FWIW, achieving one-to-one mapping may not be possible.  After all both
AUCTeX and Org are rather complicated packages that do a lot of "smart"
things.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] input data for babel blocks

2013-10-01 Thread Rick Frankel

On 2013-10-01 09:01, Alan Schmitt wrote:

I'm sorry, I don't see the answer to this above. The only example I
could find in the manual is this one
http://orgmode.org/manual/noweb_002dref.html#noweb_002dref which does
not address using noweb with different languages.

I did some experiments and I'm even more confused. Here is a test where
I want to feed the results of "ls" in a shell block as an ocaml
list. This is what I tried:

#+BEGIN_SRC sh :noweb-ref testing
echo "["
for i in `ls`; do
echo \"$i;\"
done
echo "]"
#+END_SRC

#+BEGIN_SRC ocaml :noweb yes
let x =
<>
in x
#+END_SRC

This is clearly wrong because this is what ends up in the toplevel:

let x =
echo "["
for i in `ls`; do
echo \"$i;\"
done
echo "]"
in x;;



You're close. The noweb ref should be a named src block which is
executed, not expanded, so, (note the named shell source block and the
parens in the noweb reference):

#+name: testing
#+BEGIN_SRC sh :results raw
echo "["
ls *.org | sed 's/$/;/'
echo "]"
#+END_SRC

#+BEGIN_SRC ocaml :noweb yes
let x =
<>
in x
#+END_SRC

rick




Re: [O] Org Tutorials need more structure

2013-10-01 Thread William Denton

On 28 September 2013, Carsten Dominik wrote:


Can we have a discussion here on how this path should look like?
When you came to Org-mode as a newby, what were the three resources
that really made an impression on by being accessible and
providing feel and promise for digging deeper?


I'm fairly new to Org; I started just when it moved to version 8.  I'd 
been using outline mode or Markdown for notes and that was good enough for 
the way I managed my tasks, but what drew me over was:


- the compact guide and Organize Your Life in Plain Text, which showed how 
much more Org does than to-do lists
- seeing how I could embed code in a document with Babel, and view images 
inside Emacs
- seeing how I could export to Latex but still make everything look the 
way I like by including my usual header commands


The more I began to use Org for my own notes and research, and saw how 
other people managed their work in it, the more I saw in Org and the more 
I'd try.  (Talks like John Kitchin's sealed the deal.)


I'm grateful to everyone that's helped with the documentation or posted 
snippets on blogs or Stack Overflow ... there are lots of times when I'm 
not sure how to get something working but find a perfect example 
somewhere.


Bill
--
William Denton
Toronto, Canada
http://www.miskatonic.org/




Re: [O] input data for babel blocks

2013-10-01 Thread Alan Schmitt
Hi Eric,

schulte.e...@gmail.com writes:

>> What I don't understand is:
>> - how to define this function;
>
> It is not a function name, it is a code block name.  See the noweb
> section of the Org-mode manual for more information.

OK.

>> - will it be evaluated as a "mylang" function or as a function in the
>> language it is defined?
>>
>> In other words, do we have "evaluate elisp-conversion-to-mylang in its
>> language then substitute the results in the noweb block" or "substitute
>> the function in the noweb block then evaluate it"?
>>
>
> see above

I'm sorry, I don't see the answer to this above. The only example I
could find in the manual is this one
http://orgmode.org/manual/noweb_002dref.html#noweb_002dref which does
not address using noweb with different languages.

I did some experiments and I'm even more confused. Here is a test where
I want to feed the results of "ls" in a shell block as an ocaml
list. This is what I tried:

--8<---cut here---start->8---
#+BEGIN_SRC sh :noweb-ref testing
echo "["
for i in `ls`; do
  echo \"$i;\"
done
echo "]"
#+END_SRC

#+BEGIN_SRC ocaml :noweb yes
let x =
<>
in x
#+END_SRC
--8<---cut here---end--->8---

This is clearly wrong because this is what ends up in the toplevel:

--8<---cut here---start->8---
let x =
echo "["
for i in `ls`; do
  echo \"$i;\"
done
echo "]"
in x;;
--8<---cut here---end--->8---

(I would have like the code to be executed, and the raw results to
replace the <> ref.)

So I'll rephrase my question: how can I use noweb with different
languages?

Thanks,

Alan



Re: [O] ``make test'' failures

2013-10-01 Thread Skip Collins
On Tue, Oct 1, 2013 at 8:27 AM, Eric Schulte  wrote:
> I just pushed up a fix, thanks for reporting.

I confirm that this fixes the problem. Thanks!



Re: [O] [Babel] Padlines

2013-10-01 Thread Rainer M Krug
Eric Schulte  writes:

> Rainer M Krug  writes:
>
>> Hi
>>
>> I assume this is related to this discussion and the patches: after
>> updating this morning, get an error message after tangling:
>> variable padline void. This goes away after reverting to 8.2 2 release.
>>
>> Default settings for padline  used.
>>
>> Cheers,
>>
>> Rainer
>>
>
> Vladimir's patch in this thread fixes this issue and has been applied.

Thanks - will try it out then

Rainer

>
>>
>>
>> "Sebastien Vauban" 
>> writes:
>>
>>> Hi Eric,
>>>
>>> Eric Schulte wrote:
> The blank line which was inserted between blocks isn't anymore for me.
>
> [...] results in:
>
> --8<---cut here---start->8---
>   "data"
>   "datb"
> --8<---cut here---end--->8---
>
> Note that I tried adding ":padline" to yes, but I normally should not, as 
> it
> is the default.

 Thanks for this bug report, there was a problem in my previous patch in
 this thread.  I've just pushed up a fix which should solve this problem.
>>>
>>> Confirmed!
>>>
>>> Thanks a lot.
>>>
>>> Best regards,
>>>   Seb
>> <#secure method=pgpmime mode=sign>
>>
>
<#secure method=pgpmime mode=sign>

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug



Re: [O] Org Tutorials need more structure

2013-10-01 Thread Joseph Vidal-Rosset
Hi,

A suggestion : it would be maybe useful , if it is not already done, to
transfer this activity of the list on a forum when one could put "closed"
on a topic, when a solution is done for a beginner like me.

for example, sometime I find very useful help on LaTeX here:

http://www.developpez.net/forums/f149/autres-langages/autres-langages/latex/


I just have the experience that a lot of experts on this list are very kind
and helpful, and the number of closed topic would maybe show more obviously
this fact.


It is just a suggestion, and maybe not a so good idea, I do not know.

All the best

Jo.


2013/10/1 Marcin Borkowski 

> Dnia 2013-10-01, o godz. 07:34:14
> Suvayu Ali  napisał(a):
>
> > Hence: Org is a programmable and dynamic note taking platform.
> > [...]
> > Hence my following sentence: All its features are essentially built on
> > this ability: planning & task management, authoring or publishing,
> > literate programming, and what not.
>
> Why not put this description on orgmode.org?
>
> Best,
>
> --
> Marcin Borkowski
> http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
> Adam Mickiewicz University
>
>


Re: [O] ``make test'' failures

2013-10-01 Thread Eric Schulte
Nick Dokos  writes:

> Just a heads-up: with Org-mode version 8.2.1 (release_8.2.1-60-g31d1f2)
> when I do ``make test'', I get:
>
> ,
> | ...
> | Ran 467 tests, 459 results as expected, 8 unexpected (2013-09-30 
> 10:11:32-0400)
> | 4 expected failures
> | 
> | 8 unexpected results:
> |FAILED  test-ob/org-babel-remove-result--results-code
> |FAILED  test-ob/org-babel-remove-result--results-default
> |FAILED  test-ob/org-babel-remove-result--results-html
> |FAILED  test-ob/org-babel-remove-result--results-latex
> |FAILED  test-ob/org-babel-remove-result--results-list
> |FAILED  test-ob/org-babel-remove-result--results-org
> |FAILED  test-ob/org-babel-remove-result--results-pp
> |FAILED  test-ob/org-babel-remove-result--results-wrap
> `
>

I just pushed up a fix, thanks for reporting.

>
> --
> Nick
>
>

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] [Babel] Padlines

2013-10-01 Thread Eric Schulte
Vladimir Lomov  writes:

> Hello,
> ** Eric Schulte [2013-09-28 06:17:51 -0600]:
>
>
>>> The blank line which was inserted between blocks isn't anymore for me.
>
>>> ECM:
>
>>> --8<---cut here---start->8---
>>> * Tangle these blocks
>>>   :PROPERTIES:
>>>   :tangle:   yes
>>>   :padline:  yes
>>>   :END:
>
>>> #+begin_src emacs-lisp :file test.csv
>>>   "data"
>>> #+end_src
>
>>> #+begin_src emacs-lisp :file test.csv
>>>   "datb"
>>> #+end_src
>>> --8<---cut here---end--->8---
>
>>> results in:
>
>>> --8<---cut here---start->8---
>>>   "data"
>>>   "datb"
>>> --8<---cut here---end--->8---
>
>>> Note that I tried adding ":padline" to yes, but I normally should not, as 
>>> it is
>>> the default.
>
>>> Best regards,
>>>   Seb
>
>> Hi Seb,
>
>> Thanks for this bug report, there was a problem in my previous patch in
>> this thread.  I've just pushed up a fix which should solve this problem.
>
> And seems that you miss another 'padline' in function
> 'org-babel-spec-to-string', line 323. I attached small patch which
> removes that line so I can tangle Org document with shell scripts.
>

Applied, Thanks for catching this and for posting the patch.

p.s. Please format future patches with "git format-patch".

>
> ---
> WBR, Vladimir Lomov

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] [Babel] Padlines

2013-10-01 Thread Eric Schulte
Rainer M Krug  writes:

> Hi
>
> I assume this is related to this discussion and the patches: after
> updating this morning, get an error message after tangling:
> variable padline void. This goes away after reverting to 8.2 2 release.
>
> Default settings for padline  used.
>
> Cheers,
>
> Rainer
>

Vladimir's patch in this thread fixes this issue and has been applied.

>
>
> "Sebastien Vauban" 
> writes:
>
>> Hi Eric,
>>
>> Eric Schulte wrote:
 The blank line which was inserted between blocks isn't anymore for me.

 [...] results in:

 --8<---cut here---start->8---
   "data"
   "datb"
 --8<---cut here---end--->8---

 Note that I tried adding ":padline" to yes, but I normally should not, as 
 it
 is the default.
>>>
>>> Thanks for this bug report, there was a problem in my previous patch in
>>> this thread.  I've just pushed up a fix which should solve this problem.
>>
>> Confirmed!
>>
>> Thanks a lot.
>>
>> Best regards,
>>   Seb
> <#secure method=pgpmime mode=sign>
>

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] input data for babel blocks

2013-10-01 Thread Eric Schulte
Alan Schmitt  writes:

> Hi Charles,
>
> ccbe...@ucsd.edu writes:
>
>> Lacking that, another alternative to the approach you have crafted is to
>> use elisp src blocks to set up the commands needed to create the objects,
>> and then place the results of executing the elisp src block in the src
>> block of your favored language using noweb, for example
>>
>> #+BEGIN_SRC mylang :noweb yes
>>   <>
>> #+END_SRC
>>  
>> might convert 'arg2' to an object of the desired type named 'arg1' in a 
>> 'mylang' src block.
>
> This looks like a very powerful approach, but it's a bit beyond my
> understanding of babel (which is limited) and noweb (whose existence I
> just discovered after reading http://orgmode.org/manual/noweb.html).
>
> The way I understand it is:
> - there is somewhere in the file a "elisp-conversion-to-mylang"
> function;
> - upon export or evaluation or tangling, it will be expanded in the body
> of the source block;
> - it will then be evaluated in the source block.
>
> What I don't understand is:
> - how to define this function;

It is not a function name, it is a code block name.  See the noweb
section of the Org-mode manual for more information.

> 
> - will it be evaluated as a "mylang" function or as a function in the
> language it is defined?
>
> In other words, do we have "evaluate elisp-conversion-to-mylang in its
> language then substitute the results in the noweb block" or "substitute
> the function in the noweb block then evaluate it"?
>

see above

>
> If you have an example that uses different languages, I'd love to look
> at it. I'll then try to write an example for ocaml.
>

#+name: data
| x | 2 |
| y | 4 |

#+name: table-as-array
#+begin_src sh :var data=data :results verbatim
  echo "$data"|sed 's/\s/ /;s/^/  [/;s/$/]/;1 s/^\s\+/(setf it [/; $ s/$/])/'
#+end_src

#+RESULTS: table-as-array
: (setf it [[x 2]
:   [y 4]])

#+begin_src emacs-lisp :noweb yes
  <>
  (aref (aref it 1) 1)
#+end_src

#+RESULTS:
: 4


Hope this Helps,

>
> Thanks,
>
> Alan
>

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D


Re: [O] Needing help on org-gnus + LaTeX export -

2013-10-01 Thread Joseph Vidal-Rosset
Dear Eric, Seb, Achim, many thanks, it works now !

Here is my configuration, at the very beginning of my init.el  file :


(message "* --[ Loading my Emacs init file ]--")
(add-to-list 'load-path "~/.emacs.d/org-8.2/lisp")
(add-to-list 'load-path "~/.emacs.d/org-8.2/contrib/lisp" t)
(require 'org-loaddefs)
;(package-initialize)
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(require 'ox-latex)
(require 'org-mime)
(setq org-mime-library 'mml)

I have succeeded to get an email wih png images which correctly appear in
Thunderbird and a link on png images in gnus . Wonderful !!!

Now, the next ideal step would be to be able to use any latex package to
get png images via gnus, for example fitch or bussproofs or qtree...

it is not an hurry, I will follow your advice.

Hope that my email will help other beginners.

Many many thanks to all of you !

Jo.


2013/10/1 Eric S Fraga 

> Joseph Vidal-Rosset  writes:
>
> [...]
>
> > I have certainly a problem of installation, because of my test of
> > conversion with org-mode fail.
> >
> > With gnus, here is the message error :
> >
> > org-mime-htmlize: Cannot open load file: aucun fichier ou dossier de ce
> > type, ox-org
>
> A backtrace might help.  Do
>
>   M-x toggle-debug-on-error RET
>
> and then try again.
>
> In any case, I have the following in my initialisation files:
>
> (require 'ox-latex)
> (require 'org-mime)
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5
>
>
>


Re: [O] [Babel] Padlines

2013-10-01 Thread Rainer M Krug
Hi

I assume this is related to this discussion and the patches: after
updating this morning, get an error message after tangling:
variable padline void. This goes away after reverting to 8.2 2 release.

Default settings for padline  used.

Cheers,

Rainer


"Sebastien Vauban" 
writes:

> Hi Eric,
>
> Eric Schulte wrote:
>>> The blank line which was inserted between blocks isn't anymore for me.
>>>
>>> [...] results in:
>>>
>>> --8<---cut here---start->8---
>>>   "data"
>>>   "datb"
>>> --8<---cut here---end--->8---
>>>
>>> Note that I tried adding ":padline" to yes, but I normally should not, as it
>>> is the default.
>>
>> Thanks for this bug report, there was a problem in my previous patch in
>> this thread.  I've just pushed up a fix which should solve this problem.
>
> Confirmed!
>
> Thanks a lot.
>
> Best regards,
>   Seb
<#secure method=pgpmime mode=sign>

-- 
Rainer M. Krug

email: RMKruggmailcom




[O] Suggestion: Weektree

2013-10-01 Thread Anders Johansson

Greetings,
It's very nice to keep a journal in a datetree (using the capture 
mechanism) but for my uses it would actually be even more useful to keep 
it in a /weektree/. Something like this:


* 2013
** W39 (September 23 - September 29)
*** 2013-09-23 Monday
 note 1
 note 2
*** 2013-09-24 Tuesday
*** 2013-09-25 Wednesday
** W52 (December 23 - December 29)
*** 2013-09-25 Wednesday
 Christmas, no work done.
* 2014
** W1 (December 30 - January 5)
*** 2013-09-31 Tuesday
 New year's eve party!

(with names of months and days localised as usual)

Motivations:
This would keep working weeks together (not broken over month boundaries).
At least here in Sweden it's pretty common to refer to weeks by number 
so this would perhaps be useful for that reason.


Problems:
My suggestion above uses ISO-weeks 
(http://en.wikipedia.org/wiki/ISO_week_date), maybe other conventions 
should also be an option 
(http://en.wikipedia.org/wiki/Seven-day_week#Week_numbering).


Implementation:
I tried to see if this could be implemented on top of the datetree code, 
but as far as I could tell, to much of that mechanism was hardcoded into 
months etc. The task seemed to difficult for me.


If someone else thinks this is a good idea I think there are more people 
than me that would find it quite useful though.


Greetings from Sweden,
Anders Johansson



Re: [O] Adding time intervals [OT?]

2013-10-01 Thread Marcin Borkowski
Dnia 2013-10-01, o godz. 11:39:31
"Sebastien Vauban"  napisał(a):

> Hi Marcin,
> 
> Marcin Borkowski wrote:
> > I am pretty sure that I've read about functions for summing time
> > intervals so that as a result, we don't get the "largest possible"
> > interval (like in [1,2] + [3,4] = [4,6]), but something more along
> > the lines of "time estimate" (where assuming that everything will
> > happen at the fastest or slowest possible pace is unrealistic,
> > since the estimates are uncorrelated).  Unfortunately, I can't
> > remember where I read that.  I did a quick grep on Calc and Org
> > manuals and didn't find it - but maybe I'm missing something?  Or
> > maybe I was just dreaming and Emacs does not have anything like
> > that?
> 
> See "Estimate ranges in column view" on
> http://www.mail-archive.com/emacs-orgmode@gnu.org/msg26175.html.

Thanks, that's it!  (I would never try to look for it /there/...  The
only way to discover this is to read the /whole/ of the Org manual -
which I did, some time ago...)

> Best regards,
>   Seb

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] Adding time intervals [OT?]

2013-10-01 Thread Sebastien Vauban
Hi Marcin,

Marcin Borkowski wrote:
> I am pretty sure that I've read about functions for summing time
> intervals so that as a result, we don't get the "largest possible"
> interval (like in [1,2] + [3,4] = [4,6]), but something more along the
> lines of "time estimate" (where assuming that everything will happen at
> the fastest or slowest possible pace is unrealistic, since the
> estimates are uncorrelated).  Unfortunately, I can't remember where I
> read that.  I did a quick grep on Calc and Org manuals and didn't find
> it - but maybe I'm missing something?  Or maybe I was just dreaming and
> Emacs does not have anything like that?

See "Estimate ranges in column view" on
http://www.mail-archive.com/emacs-orgmode@gnu.org/msg26175.html.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Adding time intervals [OT?]

2013-10-01 Thread Marcin Borkowski
Hi all,

I am pretty sure that I've read about functions for summing time
intervals so that as a result, we don't get the "largest possible"
interval (like in [1,2] + [3,4] = [4,6]), but something more along the
lines of "time estimate" (where assuming that everything will happen at
the fastest or slowest possible pace is unrealistic, since the
estimates are uncorrelated).  Unfortunately, I can't remember where I
read that.  I did a quick grep on Calc and Org manuals and didn't find
it - but maybe I'm missing something?  Or maybe I was just dreaming and
Emacs does not have anything like that?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] Bug: dates in heading break beamer export

2013-10-01 Thread Eric S Fraga
Daniele Pizzolli  writes:

[...]

> I think that if something is allowed in org-mode syntax but not by the
> underlining tools used for export, the exporter should take care to find
> a suitable workaround.

I think this is rather ambitious and would make life very difficult for
exporter maintainers.  LaTeX, for instance, is a very complex system.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5




Re: [O] Org Tutorials need more structure

2013-10-01 Thread Marcin Borkowski
Dnia 2013-10-01, o godz. 07:34:14
Suvayu Ali  napisał(a):

> Hence: Org is a programmable and dynamic note taking platform.
> [...]
> Hence my following sentence: All its features are essentially built on
> this ability: planning & task management, authoring or publishing,
> literate programming, and what not.

Why not put this description on orgmode.org?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] Org Tutorials need more structure

2013-10-01 Thread Michael Brand
Hi Eduardo

On Mon, Sep 30, 2013 at 11:07 PM, Eduardo Ochs  wrote:
> and integrating into Org the feature described there - namely: with a
> certain minor mode activated `M-p' opens the current default video at
> the first time offset of the current line - should be little more than
> a 10-line hack...
>
> Btw, that would make indices of time offsets in videos like the one in
>
> http://orgmode.org/worg/org-tutorials/org-screencasts/org-mode-google-tech-talk.html
> http://orgmode.org/worg/org-tutorials/org-screencasts/org-mode-google-tech-talk.org.html
>
> trivial to execute. I don't have (yet) the skills to make things like
> =1:23= become active links that do that in Org, though.

See "Audio/video file playback within org mode" on
http://orgmode.org/worg/org-hacks.html

(currently http://orgmode.org/worg/org-hacks.html#sec-3-12)

Michael



Re: [O] Table of Contents Title header

2013-10-01 Thread Eric S Fraga
Ciaran Mulloy  writes:

> Hi,
> I am using Org-mode for writing product manuals and documentation and
> exporting to PDF using the Latex Export. (I'm still using Org-Mode 7.8 as
> I've been a little apprehensive about upgrading to the new Latex Export
> version). 

I understand your hesitation.  However, the move is actually not as
painful as you might think!

> I am using the fancy header package: 
> #+LATEX_HEADER: \usepackage{fancyhdr}
> #+LATEX_HEADER: \pagestyle{fancy}
> #+LATEX_HEADER:
> \fancyhead[RO,RE]{\includegraphics[width=1.5cm]{company_logo.pdf}} 
>
> It outputs a nice section header together with the company logo nicely
> positioned at the top of the page.
>
> My only problem is that I want to include a table of contents which I do as
> follows in the title header:
>
> #+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
>
>
> However the Table of Contents section title 'Contents' overwrites the
> section header 'contents' at the top of the page. Is there a way of being
> able to suppress the Table of Contents title 'Contents'.

I do not understand this.  Can you maybe post a minimal example that
illustrates this?  What LaTeX class are you using?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5




Re: [O] Org Tutorials need more structure

2013-10-01 Thread Eric S Fraga
Joseph Vidal-Rosset  writes:
> Hi,
>
> 2013/9/28 Suvayu Ali 
>
>> Your example is not beginner's tutorial at all!  Nor is it something
>> that the manual can cover.
>>
>
> I do not understand why. Every beginner intested in org-mode is interested
> for such or such application, and that's a strange reply to make to a

I think it's partly because many people shudder when they think about
using gnus for the first time.  This is historical.  Gnus is now
relatively easy to set up and use but, in the dim and ancient past, it
was more of a challenge and not something for newbies...  Further, gnus
is still somewhat challenging when it comes to some types of
customisation.  Whether any gnus aspects should be in a beginner's
tutorial is doubtful as it would potentially overwhelm the tutorial!

Of course, many of us on the list are happy to try to help with gnus and
org issues.  

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5




Re: [O] Needing help on org-gnus + LaTeX export -

2013-10-01 Thread Eric S Fraga
Joseph Vidal-Rosset  writes:

[...]

> I have certainly a problem of installation, because of my test of
> conversion with org-mode fail.
>
> With gnus, here is the message error :
>
> org-mime-htmlize: Cannot open load file: aucun fichier ou dossier de ce
> type, ox-org

A backtrace might help.  Do 

  M-x toggle-debug-on-error RET

and then try again.

In any case, I have the following in my initialisation files:

(require 'ox-latex)
(require 'org-mime)
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5




Re: [O] input data for babel blocks

2013-10-01 Thread Alan Schmitt
Hi Eric,

schulte.e...@gmail.com writes:

>> - would the patch above be a useful way to deal with this?
>
> My problem with the patch above is that it makes OCaml different from
> every other language (especially ob-haskell which has similar type
> restraints), and that it doesn't work for tables with different
> alignment, e.g.,
>
> | x | y |
> | 0 | 1 |
>
> I guess one possible "correct" solution would be to use a variant type
> with something like the following.
>
> type orgCell =
>   | Int of int
>   | Float of float
>   | String of string

Yes, this would be more flexible. However, this type definition must
occur only once (when the session is launched). Looking at the code, I'm
not sure how to ensure that.

>> - is there a way to specify the :var parsing in a code block or in the
>> table?
>>
>
> Currently there is not.  Perhaps there is an elegant solution using a
> new header argument to control how values are represented in literal
> source code.
>
> This is an interesting question.  I'm not sure what is best here, but
> ideally any solution will generalize to other strongly typed languages,
> will support all possible tables, and will work simply for simple tables
> allowing users to use tables without having to jump through typed hoops.

I'll try to apply Charles's suggestion, once I'm able to fully
understand it, and I'll report it here.

Alan



Re: [O] input data for babel blocks

2013-10-01 Thread Alan Schmitt
Hi Charles,

ccbe...@ucsd.edu writes:

> Lacking that, another alternative to the approach you have crafted is to
> use elisp src blocks to set up the commands needed to create the objects,
> and then place the results of executing the elisp src block in the src
> block of your favored language using noweb, for example
>
> #+BEGIN_SRC mylang :noweb yes
>   <>
> #+END_SRC
>  
> might convert 'arg2' to an object of the desired type named 'arg1' in a 
> 'mylang' src block.

This looks like a very powerful approach, but it's a bit beyond my
understanding of babel (which is limited) and noweb (whose existence I
just discovered after reading http://orgmode.org/manual/noweb.html).

The way I understand it is:
- there is somewhere in the file a "elisp-conversion-to-mylang"
function;
- upon export or evaluation or tangling, it will be expanded in the body
of the source block;
- it will then be evaluated in the source block.

What I don't understand is:
- how to define this function;
- will it be evaluated as a "mylang" function or as a function in the
language it is defined?

In other words, do we have "evaluate elisp-conversion-to-mylang in its
language then substitute the results in the noweb block" or "substitute
the function in the noweb block then evaluate it"?

If you have an example that uses different languages, I'd love to look
at it. I'll then try to write an example for ocaml.

Thanks,

Alan



Re: [O] Needing help on org-gnus + LaTeX export -

2013-10-01 Thread Sebastien Vauban
Achim Gratz wrote:
> Am 30.09.2013 21:05, schrieb Joseph Vidal-Rosset:
>>
>> Here is the beginning of my init.el in my .emacs.d/ :
>>
>> (message "* --[ Loading my Emacs init file ]--")
>> (add-to-list 'load-path "~/.emacs.d/org-8.2/lisp")
>> (add-to-list 'load-path "/.emacs.d/org-8.2/contrib/lisp" t)
   ^ ~
Missing tilde...

>> (package-initialize)
>
> Try this perhaps:
>
> (message "* --[ Loading my Emacs init file ]--")
> (add-to-list 'load-path "/.emacs.d/org-8.2/contrib/lisp" t)
> (add-to-list 'load-path "~/.emacs.d/org-8.2/lisp")
> (require 'org-loaddefs)
> (package-initialize)

This is correct only if `org' is not installed via ELPA, right?  Otherwise,
~/.emacs.d/elpa/org- would be added to the load-path and could be a cause
of mixed code usage?

Best regards,
  Seb

-- 
Sebastien Vauban