Re: [O] Is anyone spending money for Org-mode?

2014-03-14 Thread Joost Helberg
Carsten,

I was at the Emacs Conference in London back in 2013; it was a great
experience and there were people from all over the world (only <50%
org-moders).

The idea of an org-mode conference is cool. I'm happy to provide
facilities in Geldermalsen, the Netherlands at Snow, but Amsterdam,
London or Paris seem like a better fit for this.

We may consider piggybacking on the Emacs Conference though, I'm not
sure when it's coming back, but it's something worth trying; it saves a
lot of travelling.

Saving money for an org-mode conference certainly is in line with the
intention of the people behind the donations. In fact, I'll be happy to
donate money then.

regards,

Joost Helberg

> "Carsten" == Carsten Dominik  writes:
 > From: Carsten Dominik 
 > To: Eric Schulte 
 > Cc: org-mode list 
 > Subject: Re: [O] Is anyone spending money for Org-mode?
 > Date: 13-Mar-14 23:06

 > Hi all,

 > one question that was asked:  How much donations come in?  That varies.
 > Some month it is $10, occasionally it can be $100.

 > What Bastien and I have done in the past is use this money in a more or
 > less private way.  I think Bastien has at some point replaced his laptop in
 > this way, and all in all I have done the same, I think.  This felt OK
 > previously, but it is not longer the right thing as far as I am concerned.

 > I have seen a few good ideas here.

 > 1. Send it to the FSF.  That is a possibility, but lets first try to do
 > something more Org specific

 > 2. A Mug for every contributor.  Stretches the available budget, and is
 > work.
 > We could make a list of contributors and start from the most commits or
 > something.

 > 3. Help organise a conference.  That would be a very good goal.  Are there
 > any plans to organise a conference?

 > 4. Redistribute to the most active developers for lighting up their day.

 > I propose the following:  Starting March 1, I will report here the
 > donations I get once a month, and we will keep track of it and find a good
 > way to spend it.  So far this month: $66.  Lets revisit the discussion in 2
 > or three months. Maybe by then there will be plans for a conference, if
 > not, we see.

 > - Carsten


 > On Thu, Mar 13, 2014 at 8:55 PM, Eric Schulte wrote:

 >> Here's an impractical option.  I see roughly 280 different contributors
 >> to Org-mode.
 >> 
 >> git log|grep "^Author"|sed 's/^.*: //;s/<.*$//'|less|sort|uniq|less
 >> 
 >> Maybe buy every contributor an Org-mode mug?
 >> 
 >> --
 >> Eric Schulte
 >> https://cs.unm.edu/~eschulte
 >> PGP: 0x614CA05D
 >> 
 >> 

-- 
Snow B.V.




Re: [O] Babel should not work in the subtree marked as not exported

2014-03-14 Thread Sebastien Vauban
Andreas Leha wrote:
> Just to confirm.  This is what you suggest, correct?
>
> * test
>
> ** Not exported  
> :noexport:
>:PROPERTIES:
>:noeval: "yes"
>:export: "none"
>:END:

Maybe it's not a real problem, but quotes are for sure not necessarily:

--8<---cut here---start->8---
  ** Not exported  
:noexport:
 :PROPERTIES:
 :noeval: yes
 :export: none
 :END:
--8<---cut here---end--->8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Babel should not work in the subtree marked as not exported

2014-03-14 Thread Andreas Leha
Hi Eric,

Eric Schulte  writes:

> Andreas Leha  writes:
>
>> Hi Eric,
>>
>> Eric Schulte  writes:
>>
>>>
>>> So what is your suggestion for the OP to achieve what he is after?
>>> noexport and noeval at the same time.
>>>
>>>
>>> I'm jumping in half way through here,
>>
>> Thanks for jumping in.
>>
>>> but wouldn't setting the :noeval
>>> property to "yes" and :export property to "none" on the subtree work?
>>
>> Well, the property-setting works, but that is really cumbersome.  In a
>> typical org file, it takes 5 keystrokes to toggle the :noexport: tag
>> (C-c C-c n TAB RET).  But I do not want to count the keystrokes it take
>> to additionally set these properties.
>>
>
> Not that bad "C-c C-x p n RET yes", I get 8 to set noeval, if you've
> done it already in that Org file.  You could also easily wrap this
> behavior into a function and bind that to a key-chord.
>

Plus setting :noexport: or COMMENT ;-)

Well, the most serious downside is, that there is no visual
feedback here.  So, if I want both export and evaluation to be
disabled for a subtree, I first need to remember to also set the
property.  And coming back later to that file, I also need to
check the property of each subtree in question to see, whether
evaluation is disabled.  A TAG or the COMMENt are visible
immediately.

In my opinion, excluding a subtree from export *and* evaluation
is not an esoteric use case and deserves better support.


>>
>> Just to confirm.  This is what you suggest, correct?
>>
>> --8<---cut here---start->8---
>> * test
>>
>> ** Not exported 
>> :noexport:
>>:PROPERTIES:
>>:noeval: "yes"
>>:export: "none"
>>:END:
>>#+BEGIN_SRC ditaa :file test.png :cmdline -E
>>   ++---+---+---+---+---+---+---+  
>> +---+---+---+---+---+---+---+---+
>>   x   | 0 cRED | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  | 0 | 0 | 0 | 0 | 1 | 0 | 
>> 1 | 1 |
>>   ++---+---+---+---+---+---+---+  
>> +---+---+---+---+---+---+---+---+
>>#+END_SRC
>>
>> ** blah blah
>>blah blah blah
>> --8<---cut here---end--->8---
>>
>>
>>
>>>
>>> One may also want to COMMENT the subtree to inhibit it's export
>>> wholepiece (not just code blocks).
>>
>> This does not seem to work, as the test.png is also created here.
>>
>> Again, just to confirm.  This is your suggestion, correct?
>>
>> --8<---cut here---start->8---
>> * test
>>
>> ** COMMENT Not exported
>>#+BEGIN_SRC ditaa :file test.png :cmdline -E
>>   ++---+---+---+---+---+---+---+  
>> +---+---+---+---+---+---+---+---+
>>   x   | 0 cRED | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  | 0 | 0 | 0 | 0 | 1 | 0 | 
>> 1 | 1 |
>>   ++---+---+---+---+---+---+---+  
>> +---+---+---+---+---+---+---+---+
>>#+END_SRC
>>
>> ** blah blah
>>blah blah blah
>> --8<---cut here---end--->8---
>>
>
> Close, I meant the following alternative
>
> * test
>
> ** COMMENT Not exported
>:PROPERTIES:
>:noeval: "yes"
>:END:
>#+BEGIN_SRC ditaa :file test.png :cmdline -E
>   ++---+---+---+---+---+---+---+  
> +---+---+---+---+---+---+---+---+
>   x   | 0 cRED | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  | 0 | 0 | 0 | 0 | 1 | 0 | 1 
> | 1 |
>   ++---+---+---+---+---+---+---+  
> +---+---+---+---+---+---+---+---+
>#+END_SRC
>
> ** blah blah
>blah blah blah
>
>>
>>
>> So, my question to this thread is: What is the easiest way to disable a
>> subtree during export completely so that also none of the code blocks is
>> evaluated (regardless of its :session argument).
>>
>
> My example immediately above.
>
>>
>> Or even more precisely: Couldn't the COMMENT keyword do exactly that?  I
>> do not expect code from inside a COMMENT subtree to be considered during
>> export.
>>
>
> No.  This has been raised previously and there was a consensus that it
> is often desirable for code in a COMMENT section to be evaluated on
> export.  Personally I often stuff code blocks into COMMENT sections
> which I want run as part of my publishing process (e.g., to create
> resources used in the exported document).
>


Sorry for being unclear here.  I wanted to propose different
behaviour for TAGs (lets say :noexport:) and the COMMENT keyword.
I am perfectly fine with :noexport: only prohibiting export but
still allowing evaluation.

But I propose that COMMENT be more treated like a comment, so more
like a shorthand for commenting out that subtree using '# '.
That way, evaluation would be disabled.

I see two benefits:
1. It serves the use-case where one wants a subtree to be not
   exported and not evaluated.
2. It more resembles Orgs idea of comments.

And since the other use case (no export but still evaluation) is
still very well supported via :noexport: there would be not too
much loss.

(IIRC, the COMMENT keyword was clos

Re: [O] Babel should not work in the subtree marked as not exported

2014-03-14 Thread Sebastien Vauban
Samuel Wales wrote:
>> No.  This has been raised previously and there was a consensus that it
>> is often desirable for code in a COMMENT section to be evaluated on
>> export.  Personally I often stuff code blocks into COMMENT sections
>> which I want run as part of my publishing process (e.g., to create
>> resources used in the exported document).
>
> i won't go against consensus, but to me the expectation is that it
> acts just like commented lines.
>
> for your use case, could you use a section marked noexport or
> org-export-with-tasks?  i would use the latter.

I was thinking as well that this had been discussed previously, and that
the decision had been:

- COMMENT is equivalent to "noexport" and "noeval", i.e. no code blocks
  are run

- "noexport" just does that: no export, but code blocks can be run.

But I don't find any evidence of this.  I must have misunderstood.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Finer-grained control of published files

2014-03-14 Thread Bastien
Brett Viren  writes:

> Either way, this will really help publishing from my messy source
> directories

Thanks for testing.

If nobody feels strongly against this, I'll add the feature to the
master branch.

-- 
 Bastien



Re: [O] [Patch] don't add indent for empty line when exiting, a code edit

2014-03-14 Thread Bastien
Hi Florian,

Florian Beck  writes:

> On 13.03.2014 20:46, Bastien wrote:
>> Ok, let me take some fresh air and come back to this later on.
>
> How about this:
>
> (while (re-search-forward "\\(^\\).+" nil t)
>   (replace-match indent nil nil nil 1)))

Works fine here, I pushed this solution.  Thanks!

-- 
 Bastien



Re: [O] [RFC] Association list between major-mode-names and babel identifiers

2014-03-14 Thread Thorsten Jolitz
Nick Dokos  writes:

> Thorsten Jolitz  writes:
>
>> thank you, so I marked calc, latex, ocaml, and sh as cross-ckecked now,
>> and unmarked R. Unfortunately the table arrives almost unreadable here,
>> so I rather post the current state of the association list (; means
>> cross-ckecked):
>>
>
> It's fine with gnus: as a matter of idle curiosity, what mail reader are
> you using?

Funny enough - I wrote is and received it in gnus too...

-- 
cheers,
Thorsten




Re: [O] [RFC] Association list between major-mode-names and babel identifiers

2014-03-14 Thread Thorsten Jolitz
Eric Schulte  writes:

> Thorsten Jolitz  writes:
>
>> Hi List, 
>>
>> due to the relatively frequent mismatches between language names
>> extracted from major-mode names and language identifiers used by
>> Org-Babel I try to build the definite translation alist between both
>> names. 
>>
>
> The `org-src-lang-modes' variable should hold this list, elements not in
> the list simply append "-mode" to the end of the source name.

Oh, I see ... then I don't have to replicate this. 

But what about R vs ess? I started to deal with this because R-mode is
actually just a dialect of ess-mode and returns 'ess-mode' when doing
M-: major-mode. OTOH putting a buffer in ess-mode makes no sense either,
its kind of an abstract super-mode, one has to call R-mode to get
something functional.

And what about upper/lower case? Only "C" for c-mode, or "c" too? 

,-
| `org-src-lang-modes'
`-

,
| Original value was 
| (("ocaml" . tuareg)
|  ("elisp" . emacs-lisp)
|  ("ditaa" . artist)
|  ("asymptote" . asy)
|  ("dot" . fundamental)
|  ("sqlite" . sql)
|  ("calc" . fundamental)
|  ("C" . c)
|  ("cpp" . c++)
|  ("C++" . c++)
|  ("screen" . shell-script))
`

-- 
cheers,
Thorsten




Re: [O] Is anyone spending money for Org-mode?

2014-03-14 Thread Eric S Fraga
Eric Schulte  writes:

> Here's an impractical option.  I see roughly 280 different contributors
> to Org-mode.

and don't forget all those that have contributed to Worg!

I have no better suggestions for what to do with the monies that may
come in, especially as I don't have any idea of the scale.  However, the
suggestion of providing some support for org workshops or conferences
has a certain appeal.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.5h-660-gef207f



Re: [O] Post() evaluates but fails in export

2014-03-14 Thread Bastien
Hi Jarmo,

Jarmo Hurri  writes:

> Need to repost my own question (below), since there was no response to
> this.

I confirm this weird bug but could not find a fix yet.

This is on my watch-list,

-- 
 Bastien



Re: [O] Bad sexp at line when using org-contacts-anniversaries

2014-03-14 Thread Bastien
Hi Chaitanya,

I can't reproduce the problem with latest Org.

If you can please check the latest version of Org and tell
us if the problem is still there.

Thanks,

-- 
 Bastien



Re: [O] setq: Symbol's function definition is void: org-add-archive-files => SOLVED

2014-03-14 Thread Rainer Stengele
Am 12.03.2014 16:17, schrieb Bastien:
> Rainer Stengele  writes:
> 
>> Org-mode version N/A-fixup (N/A-fixup !!check installation!! @ mixed
> ^^
> Did you run ~$ make or ~$ make autoloads?
> 
I only did a make autoloads.
After a make it works.
Thank you, I updated my update script ..

Rainer





Re: [O] [ANN] ox-opml.el -- Export Org files to OPML

2014-03-14 Thread Bastien
Hi Eric,

thanks for ox-opml.el!  Looks definitely interesting.

If you want, we can move it to contrib/ right now.

Note that there is a discussion about the status of the contrib/
directory -- my own take is that it would be better to remove the
contrib/ directory from Org's git repository and have them in a
dedicated Org Elisp Packages Archive.  This way we still continue
to promote those contributed packages but we clearly separate the
development of Org's core from the (more distributed) development
of Org contributions.

See the thread here:
http://thread.gmane.org/gmane.emacs.orgmode/81103

All the best,

-- 
 Bastien



Re: [O] Bug: org-element-parse-buffer doesn't work in 8.2.5h [8.2.5h (8.2.5h-30-gdd810b-elpa @ /home/sindikat/.emacs.d/elpa/org-20140303/)]

2014-03-14 Thread Nicolas Richard
sindi...@mail36.net (sindi...@mail36.net) writes:
> It was reproduced on clean Emacs by running `emacs -Q' and issuing:
>
> (let ((package-load-list '((org t
>   (package-initialize))

Could you show us the output of M-x org-version in that "emacs -Q"
session ? Could you also try M-x org-reload after you ran the above
lisp ? What is the output of (locate-library "org-compat") ? What's the
output of M-:
(delq nil
  (mapcar
   (lambda (elt)
 (when
 (and (stringp (car elt))
  (string-match "org-compat" (car elt)))
   (car elt)))
   load-history)) ?

FWIW I couldn't repro either with the following recipe:
$ REPO=gnu emacs -f package-refresh-contents --eval '(package-install (cadr 
(assoc (quote org) package-archive-contents)))'

with an empty ~/.emacs

-- 
Nico.



[O] usage of org-mouse?

2014-03-14 Thread Rainer M Krug
Hi

is there a worg page about the usage of org-mouse, and what it should be
doing? 

I read on this list that after (require 'org-mouse) (which I did
successfully) clicking left-mouse-buttom should fold, but it does not
happen.

Do I have to configure something in addition? Is there an example
configuration?

Thanks,

Rainer


-- 
Rainer M. Krug

email: RMKruggmailcom


pgpTyl_8PWjzW.pgp
Description: PGP signature


Re: [O] [bug] Fontification of bold and italics

2014-03-14 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
> Sebastien Vauban writes:
>
>> With recent Org, sentences such as [1]:
>>
>> Explanation *answers the question "why?"*: show *why* the facts make sense.
>>
>> Explanation *makes people /care/*, so they are more motivated about learning
>> more. "Why would I want to do /that/?"
>>
>> are badly fontified. Tested with a minimal Emacs file.
>
> I vaguely remember this is a side-effect of another choice we made on
> purpose, but if you can bisect and find the commit, I'd be interested.

--8<---cut here---start->8---
f21150f1853180f63741083e427ef4e6bec1ea52 is the first bad commit
commit f21150f1853180f63741083e427ef4e6bec1ea52
Author: Bastien Guerry 
Date:   Fri Jan 3 11:16:14 2014 +0100

org.el (org-do-emphasis-faces): Fix false positives handling

* org.el (org-do-emphasis-faces): Handle false positives by
restarting the re-search one char after the beginning of the
match, not one char before its ending.

Before this fix, consider this buffer

** Headline
  - *Bold* non-bold
  - *Bold* non-bold

The first false positive is "** Headline\n  - *Bold*"

Starting the search again from the last "*" will skip
the "*Bold*" string.  Starting again at "* Headline" will
find it.
--8<---cut here---end--->8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Screencast of lispy.el with org-mode code base

2014-03-14 Thread Bastien
Hi Oleh,

Oleh  writes:

> The package provides a key binding method that can work effectively
> only for a Lisp-like language: Elisp, Scheme, Common Lisp and Clojure
> all fit here.

I better understand the name then.

Looks like quite a big project already.

Each time I tried paredit, I could not stand it for more than
a few minutes, I've not been patient so far, especially since
`electric-pair-mode' is now on by default and does 90% of what
I need.

But I may look at other solutions than paredit (being conscious
your librarie goes far beyond that.)

-- 
 Bastien



Re: [O] [PATCH] Fix: `org-agenda-skip-scheduled-if-deadline-is-shown': show TODOs without deadline

2014-03-14 Thread Bastien
Hi Markus,

applied, thanks a lot for the very well-formatted patch
and the detailed explanations.

Best,

-- 
 Bastien



Re: [O] [PATCH] Fixed bug in org-entry-get-with-inheritance

2014-03-14 Thread Bastien
Applied, thanks!

-- 
 Bastien



Re: [O] Remove redundant tags of headlines

2014-03-14 Thread Sebastien Vauban
Bastien wrote:
>> I tried Edebugging it, but Edebug does not jump into the execution of
>> the anonymous function...
>
> Just give a name to the anonymous function... and you're back on
> edebugging.  :)

OK, of course!  Thanks for the tip.

Back to the problem... The root cause is that, with the following
example:

--8<---cut here---start->8---
#+TITLE: ECM Inherited tags
#+FILETAGS: :org:

* Test

** TODO Vérifier pourquoi les tags redondants ne sont plus effacés:FLAGGED:

Lorsqu'ils correspondent à un tag hérité.

*** TODO Test :FLAGGED:
--8<---cut here---end--->8---

when point is somewhere on the outline-3 heading "TODO Test", the
following expression:

  (org-entry-get (point) "ALLTAGS")

returns

  #(":org:FLAGGED:" 1 4 (inherited t))

IOW, "FLAGGED" is not shown as inherited!  Hence, all the mechanics
which follows never removes it!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [RFC] Association list between major-mode-names and babel identifiers

2014-03-14 Thread Nick Dokos
Thorsten Jolitz  writes:

> Nick Dokos  writes:
>
>> Thorsten Jolitz  writes:
>>
>>> thank you, so I marked calc, latex, ocaml, and sh as cross-ckecked now,
>>> and unmarked R. Unfortunately the table arrives almost unreadable here,
>>> so I rather post the current state of the association list (; means
>>> cross-ckecked):
>>>
>>
>> It's fine with gnus: as a matter of idle curiosity, what mail reader are
>> you using?
>
> Funny enough - I wrote is and received it in gnus too...

The only thing that I can think of that would mess it up would be a
non-monospaced font then.

-- 
Nick




Re: [O] Remove redundant tags of headlines

2014-03-14 Thread Nicolas Richard


Sebastien Vauban 
> I tried Edebugging it, but Edebug does not jump into the execution of
> the anonymous function...

edebug can only jump to the anonymous function if it knows that it is a
function, which means : don't quote the lambda (or quote using #'). I
fixed it on worg.

(btw, I noticed that worg says
remote: No such file: 
"/home/emacs/git/worg/org-tutorials/"../code/awk/ical2org.awk" src awk"
when I push to it. I *guess* it comes from
org-tutorials/org-google-sync.org which tries to #+INCLUDE the above,
but I'm unsure how to fix it. I didn't touch that file.)

-- 
Nico.




Re: [O] usage of org-mouse?

2014-03-14 Thread Nick Dokos
Rainer M Krug  writes:

> Hi
>
> is there a worg page about the usage of org-mouse, and what it should be
> doing? 
>
> I read on this list that after (require 'org-mouse) (which I did
> successfully) clicking left-mouse-buttom should fold, but it does not
> happen.
>
> Do I have to configure something in addition? Is there an example
> configuration?
>

No, but you have to click on the asterisks, not on the rest of the
headline. If you do ``C-h c'' and then click carefully, you will see
that clicking on the asterisks is bound to org-open-at-mouse,
whereas clicking on the rest of the headline is bound org-mouse-down-mouse.

-- 
Nick




Re: [O] fontification of blocks inside blocks

2014-03-14 Thread Alan Schmitt
Bastien  writes:

> Hi Alan,
>
> Alan Schmitt  writes:
>
>> I've just had to write an org block inside another org block, which
>> looks like this:
>>
>> #+attr_latex: :options {0.5\textwidth}
>> #+begin_column
>> #+begin_src ocaml
>> let o1 = object
>>  method m = 0
>>  method p = "foo"
>> end;;
>> #+end_src
>> #+end_column
>>
>> Unfortunately when I do so I lose the nice fontification of the ocaml
>> code inside the inner block. Is there a way to get it back?
>
> Well, that's a long awaited ... "no".
>
> I guess it would somehow make sense, but the fontification engine is
> complex enough not to try to implement such nested fontification.
> But maybe some Emacs angel can pass by and implement this. 

I can definitely live with this ;-) Thanks for the answer.

Alan



Re: [O] usage of org-mouse?

2014-03-14 Thread Rainer M Krug
Nick Dokos  writes:

> Rainer M Krug  writes:
>
>> Hi
>>
>> is there a worg page about the usage of org-mouse, and what it should be
>> doing? 
>>
>> I read on this list that after (require 'org-mouse) (which I did
>> successfully) clicking left-mouse-buttom should fold, but it does not
>> happen.
>>
>> Do I have to configure something in addition? Is there an example
>> configuration?
>>
>
> No, but you have to click on the asterisks, not on the rest of the
> headline. If you do ``C-h c'' and then click carefully, you will see
> that clicking on the asterisks is bound to org-open-at-mouse,
> whereas clicking on the rest of the headline is bound org-mouse-down-mouse.


Hm - it tells me 

,
|  at that spot runs the command mouse-drag-region
`

I assume that the fact that I evaluated 

,
| (require 'org-mouse)
`

in the scratch buffer does not make a difference.


-- 
Rainer M. Krug

email: RMKruggmailcom


pgp3_3yA8jfRr.pgp
Description: PGP signature


Re: [O] verbatim/code text and line breaks with auto fill mode

2014-03-14 Thread Alan Schmitt
I'm resending this to the list (somehow it was addressed to gmane
instead of the list.)

Alan Schmitt  writes:

> Nicolas Goaziou  writes:
>
>> Does Org allow newline characters in verbatim objects?
>
> If I understand org-emphasis-regexp-components correctly, it explicitly
> allows newlines (the default seems to be 1):
>
> "newline  The maximum number of newlines allowed in an emphasis exp."
>
> Moreover, my understanding of verbatim objects is an emphasis object
> that starts with '=' or '~' (if I read the code for `org-set-emph-re'
> correctly).
>
>> If it does, what backends do not support it?
>
> I only know of LaTeX.
>
>
> Alan



Re: [O] [RFC] Association list between major-mode-names and babel identifiers

2014-03-14 Thread Thorsten Jolitz
Nick Dokos  writes:

> Thorsten Jolitz  writes:
>
>> Nick Dokos  writes:
>>
>>> Thorsten Jolitz  writes:
>>>
 thank you, so I marked calc, latex, ocaml, and sh as cross-ckecked now,
 and unmarked R. Unfortunately the table arrives almost unreadable here,
 so I rather post the current state of the association list (; means
 cross-ckecked):

>>>
>>> It's fine with gnus: as a matter of idle curiosity, what mail reader are
>>> you using?
>>
>> Funny enough - I wrote is and received it in gnus too...
>
> The only thing that I can think of that would mess it up would be a
> non-monospaced font then.

I'm on the console with sun12x22 font ...

-- 
cheers,
Thorsten




Re: [O] usage of org-mouse?

2014-03-14 Thread Nick Dokos
Rainer M Krug  writes:

> Nick Dokos  writes:
>
>> Rainer M Krug  writes:
>>
>>> Hi
>>>
>>> is there a worg page about the usage of org-mouse, and what it should be
>>> doing? 
>>>
>>> I read on this list that after (require 'org-mouse) (which I did
>>> successfully) clicking left-mouse-buttom should fold, but it does not
>>> happen.
>>>
>>> Do I have to configure something in addition? Is there an example
>>> configuration?
>>>
>>
>> No, but you have to click on the asterisks, not on the rest of the
>> headline. If you do ``C-h c'' and then click carefully, you will see
>> that clicking on the asterisks is bound to org-open-at-mouse,
>> whereas clicking on the rest of the headline is bound org-mouse-down-mouse.
>
>
> Hm - it tells me 
>
> ,
> |  at that spot runs the command mouse-drag-region
> `
>
> I assume that the fact that I evaluated 
>
> ,
> | (require 'org-mouse)
> `
>
> in the scratch buffer does not make a difference.

There is indeed something fishy going on: I've got two emacsen, one of
which behaves as it "should", the other behaving as you describe.
The second one was an emacs -q -l minimal.emacs invocation: I can't seem
to turn on org-mouse in that.

-- 
Nick




Re: [O] M-: (org-display-outline-path) doesn't work correctly

2014-03-14 Thread Thorsten Jolitz
Nicolas Richard  writes:

> Thorsten Jolitz  writes:
>> only that promptly another message is shown (I can't use sit-for in
>> the program):
>
> sit-for was just to demonstrate the problem introduced solely by M-:.
> That problem is not present when using interactive commands (i.e. those
> a user can actually use), and no sit-for should be necessary in all
> pratical situations.
>
>> ,-
>> | Wrote /home/my/tmpdir/myfile
>> `-
>
> Obviously you should find out what's writing to that file after your
> (message ...) statement. I'm not an outshine/outorg user, I have no idea
> what does it.

found it:

,-
| Command: write-region start end filename &optional append visit
| 
| This function writes the region (of the current buffer) delimited by
| start and end into the file specified by filename.
| 
| [...]
| 
| Normally, write-region displays a message `Wrote file filename' in
| the echo area. If visit is neither t nor nil nor a string, then this
| message is inhibited. This feature is useful for programs that use
| files for internal purposes, files which the user does not need to
| know about.
`-

so 

,---
| (write-region nil nil filename nil 'VISIT)
`---

gets rid of the message.

-- 
cheers,
Thorsten




Re: [O] usage of org-mouse?

2014-03-14 Thread Nick Dokos
Nick Dokos  writes:

> Rainer M Krug  writes:
>
>> Nick Dokos  writes:
>>
>>> Rainer M Krug  writes:
>>>
 Hi

 is there a worg page about the usage of org-mouse, and what it should be
 doing? 

 I read on this list that after (require 'org-mouse) (which I did
 successfully) clicking left-mouse-buttom should fold, but it does not
 happen.

 Do I have to configure something in addition? Is there an example
 configuration?

>>>
>>> No, but you have to click on the asterisks, not on the rest of the
>>> headline. If you do ``C-h c'' and then click carefully, you will see
>>> that clicking on the asterisks is bound to org-open-at-mouse,
>>> whereas clicking on the rest of the headline is bound org-mouse-down-mouse.
>>
>>
>> Hm - it tells me 
>>
>> ,
>> |  at that spot runs the command mouse-drag-region
>> `
>>
>> I assume that the fact that I evaluated 
>>
>> ,
>> | (require 'org-mouse)
>> `
>>
>> in the scratch buffer does not make a difference.
>
> There is indeed something fishy going on: I've got two emacsen, one of
> which behaves as it "should", the other behaving as you describe.
> The second one was an emacs -q -l minimal.emacs invocation: I can't seem
> to turn on org-mouse in that.

OK - if I do

   emacs -q -l /path/to/minimal/.emacs foo.org

and then do (require 'org-mouse), the mouse actions are
not active in the already opened foo.org: I have to revert-buffer
or kill it and revisit the file before the mouse bindings are active.

Of course, that difficulty does not arise if I do (require 'org-mouse)
in the initialization file to begin with.

-- 
Nick




Re: [O] usage of org-mouse?

2014-03-14 Thread Rainer M Krug
Nick Dokos  writes:

> Rainer M Krug  writes:
>
>> Nick Dokos  writes:
>>
>>> Rainer M Krug  writes:
>>>
 Hi

 is there a worg page about the usage of org-mouse, and what it should be
 doing? 

 I read on this list that after (require 'org-mouse) (which I did
 successfully) clicking left-mouse-buttom should fold, but it does not
 happen.

 Do I have to configure something in addition? Is there an example
 configuration?

>>>
>>> No, but you have to click on the asterisks, not on the rest of the
>>> headline. If you do ``C-h c'' and then click carefully, you will see
>>> that clicking on the asterisks is bound to org-open-at-mouse,
>>> whereas clicking on the rest of the headline is bound org-mouse-down-mouse.
>>
>>
>> Hm - it tells me 
>>
>> ,
>> |  at that spot runs the command mouse-drag-region
>> `
>>
>> I assume that the fact that I evaluated 
>>
>> ,
>> | (require 'org-mouse)
>> `
>>
>> in the scratch buffer does not make a difference.
>
> There is indeed something fishy going on: I've got two emacsen, one of
> which behaves as it "should", the other behaving as you describe.
> The second one was an emacs -q -l minimal.emacs invocation: I can't seem
> to turn on org-mouse in that.

Let me know what I should look for in my config - mine is the normal
full config I usually use. And when I start with 

,
| emacs -Q
`

and then activate org-mouse, it works.

It works with emacs -Q:
Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @ 
/usr/local/Cellar/emacs-mac/emacs-24.3-mac-4.7/share/emacs/24.3/lisp/org/)
GNU Emacs 24.3.1 (x86_64-apple-darwin13.1.0, Carbon Version 1.6.0 AppKit 
1265.19) of 2014-03-07 on Rainers-MacBook-Pro-2.local [2 times]

It doesn't work with normal emacs.org:
Org-mode version 8.2.5h (release_8.2.5h-686-g28ddf0 @ 
/Users/rainerkrug/.emacs.d/org-mode/lisp/)
GNU Emacs 24.3.1 (x86_64-apple-darwin13.0.0, Carbon Version 1.6.0 AppKit 1265) 
of 2014-02-13 on Rainers-MacBook-Pro-2.local

Rainer


-- 
Rainer M. Krug

email: RMKruggmailcom


pgpiOXXnhWrmK.pgp
Description: PGP signature


Re: [O] usage of org-mouse?

2014-03-14 Thread Rainer M Krug
Rainer M Krug  writes:

> Nick Dokos  writes:
>
>> Rainer M Krug  writes:
>>
>>> Nick Dokos  writes:
>>>
 Rainer M Krug  writes:

> Hi
>
> is there a worg page about the usage of org-mouse, and what it should be
> doing? 
>
> I read on this list that after (require 'org-mouse) (which I did
> successfully) clicking left-mouse-buttom should fold, but it does not
> happen.
>
> Do I have to configure something in addition? Is there an example
> configuration?
>

 No, but you have to click on the asterisks, not on the rest of the
 headline. If you do ``C-h c'' and then click carefully, you will see
 that clicking on the asterisks is bound to org-open-at-mouse,
 whereas clicking on the rest of the headline is bound org-mouse-down-mouse.
>>>
>>>
>>> Hm - it tells me 
>>>
>>> ,
>>> |  at that spot runs the command mouse-drag-region
>>> `
>>>
>>> I assume that the fact that I evaluated 
>>>
>>> ,
>>> | (require 'org-mouse)
>>> `
>>>
>>> in the scratch buffer does not make a difference.
>>
>> There is indeed something fishy going on: I've got two emacsen, one of
>> which behaves as it "should", the other behaving as you describe.
>> The second one was an emacs -q -l minimal.emacs invocation: I can't seem
>> to turn on org-mouse in that.
>
> Let me know what I should look for in my config - mine is the normal
> full config I usually use. And when I start with 
>
> ,
> | emacs -Q
> `
>
> and then activate org-mouse, it works.
>
> It works with emacs -Q:
> Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @
> /usr/local/Cellar/emacs-mac/emacs-24.3-mac-4.7/share/emacs/24.3/lisp/org/)
> GNU Emacs 24.3.1 (x86_64-apple-darwin13.1.0, Carbon Version 1.6.0
> AppKit 1265.19) of 2014-03-07 on Rainers-MacBook-Pro-2.local [2 times]
>
> It doesn't work with normal emacs.org:
> Org-mode version 8.2.5h (release_8.2.5h-686-g28ddf0 @ 
> /Users/rainerkrug/.emacs.d/org-mode/lisp/)
> GNU Emacs 24.3.1 (x86_64-apple-darwin13.0.0, Carbon Version 1.6.0
> AppKit 1265) of 2014-02-13 on Rainers-MacBook-Pro-2.local

To add to this:

using the  init.el below which does not load any further init, it
doesn't work either

Org-mode version 8.2.5h (release_8.2.5h-732-g073470 @ 
/Users/rainerkrug/.emacs.d/org-mode/lisp/)
GNU Emacs 24.3.1 (x86_64-apple-darwin13.0.0, Carbon Version 1.6.0 AppKit 1265) 
of 2014-02-13 on Rainers-MacBook-Pro-2.local


--8<---cut here---start->8---
;;; init.el --- Where all the magic begins
;;
;; This file loads both
;; - Org-mode : http://orgmode.org/ and
;; - Org-babel: 
http://orgmode.org/worg/org-contrib/babel/org-babel.php#library-of-babel
;;
;; It then loads the rest of our Emacs initialization from Emacs lisp
;; embedded in literate Org-mode files.


;; avoid freezing of noninteractively started emacs daemon when there are 
autosaved files
;; see 
[[http://stackoverflow.com/questions/4933134/emacs-daemon-startup-freezes-if-file-has-auto-save-data]]
 for details
(defadvice desktop-restore-file-buffer
  (around my-desktop-restore-file-buffer-advice)
  "Be non-interactive while starting a daemon."
  (if (and (daemonp)
   (not server-process))
  (let ((noninteractive t))
ad-do-it)
ad-do-it))
(ad-activate 'desktop-restore-file-buffer)

;; Load up Org Mode and Org Babel for elisp embedded in Org Mode files
(add-to-list 'load-path "~/.emacs.d/org-mode/lisp")
(add-to-list 'load-path "~/.emacs.d/org-mode/contrib/lisp")

;; load up Org-mode and Org-babel
(require 'org)

;; load up the main file
;; (org-babel-load-file "~/.emacs.d/emacs.org")

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(Linum-format "%7i ")
 '(ansi-color-names-vector ["#242424" "#E5786D" "#95E454" "#CAE682" "#8AC6F2" 
"#66" "#CCAA8F" "#F6F3E8"])
 '(ansi-term-color-vector [unspecified "#14191f" "#d15120" "#81af34" "#deae3e" 
"#7e9fc9" "#a878b5" "#7e9fc9" "#dc"])
 '(background-color "#fcf4dc")
 '(background-mode light)
 '(browse-url-browser-function (quote browse-url-default-macosx-browser))
 '(canlock-password "da2a78a044d240d5111068dc8e1c3a9f8d311614")
 '(cursor-color "#52676f")
 '(custom-safe-themes (quote 
("ed81411169b1b3e3d4cfc39b09d68ea13e0ff7708dc5b9d0bedb319e071968ad" 
"a37600b047da389eccc4a17b5f165d512fb1d32f18d93cffb28154b5f4eb4437" 
"7a9f392481b6e2fb027ab9d8053ab36c0f23bf5cc1271206982339370d894c74" 
"57072d797dc09fcf563051a85a29d6a51d6f2b1a602e029c35b05c30df319b2a" 
"a3d519ee30c0aa4b45a277ae41c4fa1ae80e52f04098a2654979b1ab859ab0bf" 
"f32dd8e7b3a508874eded03d5be43d2bdfffe81c199eea72de06ce3e653db720" 
"cf3ee051794b9bde203a4e1bb8e005367cc121aaffc0abd94893db8fde8dcc5c" 
"aa74186764f2d91356b4a98aa56cb931cbd7f6e82e25a84ce212b254e4415cb5" 
"3b2acc09fedfafb58e09c130f2ff107c5f56232cef7b3114d1

Re: [O] usage of org-mouse?

2014-03-14 Thread Rainer M Krug
Nick Dokos  writes:

> Nick Dokos  writes:
>
>> Rainer M Krug  writes:
>>
>>> Nick Dokos  writes:
>>>
 Rainer M Krug  writes:

> Hi
>
> is there a worg page about the usage of org-mouse, and what it should be
> doing? 
>
> I read on this list that after (require 'org-mouse) (which I did
> successfully) clicking left-mouse-buttom should fold, but it does not
> happen.
>
> Do I have to configure something in addition? Is there an example
> configuration?
>

 No, but you have to click on the asterisks, not on the rest of the
 headline. If you do ``C-h c'' and then click carefully, you will see
 that clicking on the asterisks is bound to org-open-at-mouse,
 whereas clicking on the rest of the headline is bound org-mouse-down-mouse.
>>>
>>>
>>> Hm - it tells me 
>>>
>>> ,
>>> |  at that spot runs the command mouse-drag-region
>>> `
>>>
>>> I assume that the fact that I evaluated 
>>>
>>> ,
>>> | (require 'org-mouse)
>>> `
>>>
>>> in the scratch buffer does not make a difference.
>>
>> There is indeed something fishy going on: I've got two emacsen, one of
>> which behaves as it "should", the other behaving as you describe.
>> The second one was an emacs -q -l minimal.emacs invocation: I can't seem
>> to turn on org-mouse in that.
>
> OK - if I do
>
>emacs -q -l /path/to/minimal/.emacs foo.org
>
> and then do (require 'org-mouse), the mouse actions are
> not active in the already opened foo.org: I have to revert-buffer
> or kill it and revisit the file before the mouse bindings are active.
>
> Of course, that difficulty does not arise if I do (require 'org-mouse)
> in the initialization file to begin with.

OK - confirmed. But this was not the case in the older version of org.
Kind of a regression.

By the way: C-c in a line where #+ is also activates org-mouse.

Thanks,

Rainer

-- 
Rainer M. Krug

email: RMKruggmailcom


pgpC7Y0X3OkAS.pgp
Description: PGP signature


Re: [O] Babel should not work in the subtree marked as not exported

2014-03-14 Thread zwz
Samuel Wales  writes:

> how about call lines?
>
> to me, they should not run if they are not supposed to be exported.
>
> is this a bug?
>
> * babel should not export a call line via todo kw
> *** NEXT to reproduce
> set org-export-with-tasks to nil
> *** NEXT this should not run
> #+call: hi(a=2)
> *** hi
> #+name: hi
> #+begin_src sh :var a=1
>   echo hi $a
> #+end_src

Maybe this is a simple and clear way:
noexport means no export and no code running, either.
While if you want to get the code run, just call it somewhere
explicitly.
What do you think?




Re: [O] Context of interaction vs. literal syntactic interpretation

2014-03-14 Thread Sebastien Vauban
Matt Lundin wrote:
> Nicolas is doing amazing work at making org file parsing more
> systematic, precise, and predictable. (Thank you!) And I agree with him
> that a function named org-open-link-at-point should, for the sake of
> precision and consistency, only open a link at the point.
>
> I also agree that such a function should do nothing in the context of a
> comment, which should simply be a string. FWIW, it seems to me that
> there are still several places in the source code that could be cleaned
> up in this way. For instance, org-mode code examples designated for
> export have unwanted effects in the agenda. Try putting this in an
> agenda file...
>
> * An example
> : * Watch me
> :  <2014-03-03 Mon 9:00>

FYI, I do have similar "problems" in a file (which is also part of
org-agenda-files) where I have this (to explain how to use Org
timestamps):

--8<---cut here---start->8---
For example, a weekly report that must be filed during the following work week
could be described with

#+begin_src org
,SCHEDULED: <2014-03-20 Thu +1w/12d>
#+end_src

For ranges, you can try:

#+begin_src org
,<2014-03-19 Wed 15:00-17:00 +1w>.
#+end_src
--8<---cut here---end--->8---

Both timestamps appear in my Org agenda when at the given date.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Screencast of lispy.el with org-mode code base

2014-03-14 Thread Oleh
>> The package provides a key binding method that can work effectively
>> only for a Lisp-like language: Elisp, Scheme, Common Lisp and Clojure
>> all fit here.
>
> I better understand the name then.
>
> Looks like quite a big project already.

Yes, it's my biggest yet.

> Each time I tried paredit, I could not stand it for more than
> a few minutes, I've not been patient so far, especially since
> `electric-pair-mode' is now on by default and does 90% of what
> I need.

That's how I've started to write lispy: with 3 functions for inserting
pairs and a re-bind of `forward-list`/`backward-list` to "]"/"[".

> But I may look at other solutions than paredit (being conscious
> your librarie goes far beyond that.)

Sure. Not everyone likes paredit (at first:). That's why each locally
bound function in lispy is constructed from a regular interactive
function: so you can use them without turning on the minor mode.

But somehow paredit together with other powerful tools becomes more
than the sum of its parts: paredit + multiple-cursors allows easy
refactors of repeated information, lispy store region + ediff makes
for easier and faster diffs, and lispy narrowing + ace-jump-mode
symbol selection + iedit allows to rename variables faster.

And of course it's nice to keep some specialty tools handy:
`lispy-multiline` ("M") may not seem like much, but it's great after a
`macroexpand-all`.

And look at `lispy-flatten` ("xf"):

|(org-defkey org-mode-map [(meta up)]'org-metaup)

->

|(define-key org-mode-map (org-key [(meta up)]) 'org-metaup)

Nifty, right?

regards,
Oleh



Re: [O] [bug] Fontification of bold and italics

2014-03-14 Thread Bastien
Hi Sébastien,

can you test this patch against maint for a while and
report problems?

Thanks!

diff --git a/lisp/org.el b/lisp/org.el
index 0186674..c4c3199 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4099,7 +4099,12 @@ After a match, the match groups contain these elements:
 ;; set this option proved cumbersome.  See this message/thread:
 ;; http://article.gmane.org/gmane.emacs.orgmode/68681
 (defvar org-emphasis-regexp-components
-  '(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 1)
+  '(" \t('\"{"   ; allowed as pre-match
+"- \t.,:!?;'\")}\\"  ; allowed as post-match
+" \t\r\n,\"" ; forbidden border
+"."  ; allowed content
+1; max number of newlines
+)
   "Components used to build the regular expression for emphasis.
 This is a list with five entries.  Terminology:  In an emphasis string
 like \" *strong word* \", we call the initial space PREMATCH, the final
@@ -5668,24 +5673,30 @@ The time stamps may be either active or inactive.")
   "Run through the buffer and add overlays to emphasized strings."
   (let (rtn a)
 (while (and (not rtn) (re-search-forward org-emph-re limit t))
-  (if (not (= (char-after (match-beginning 3))
-		  (char-after (match-beginning 4
-	  (progn
-	(setq rtn t)
-	(setq a (assoc (match-string 3) org-emphasis-alist))
-	(font-lock-prepend-text-property (match-beginning 2) (match-end 2)
-	 'face
-	 (nth 1 a))
-	(and (nth 2 a)
-		 (org-remove-flyspell-overlays-in
-		  (match-beginning 0) (match-end 0)))
-	(add-text-properties (match-beginning 2) (match-end 2)
- '(font-lock-multiline t org-emphasis t))
-	(when org-hide-emphasis-markers
-	  (add-text-properties (match-end 4) (match-beginning 5)
-   '(invisible org-link))
-	  (add-text-properties (match-beginning 3) (match-end 3)
-   '(invisible org-link)
+  (let* ((border (char-after (match-beginning 3)))
+	 (bre (regexp-quote (char-to-string border
+	(if (and (not (= border (char-after (match-beginning 4
+		 (not (save-match-data
+			(string-match (concat bre ".*" bre)
+  (replace-regexp-in-string
+   "\n" " "
+   (substring (match-string 2) 1 -1))
+	(progn
+	  (setq rtn t)
+	  (setq a (assoc (match-string 3) org-emphasis-alist))
+	  (font-lock-prepend-text-property (match-beginning 2) (match-end 2)
+	   'face
+	   (nth 1 a))
+	  (and (nth 2 a)
+		   (org-remove-flyspell-overlays-in
+		(match-beginning 0) (match-end 0)))
+	  (add-text-properties (match-beginning 2) (match-end 2)
+   '(font-lock-multiline t org-emphasis t))
+	  (when org-hide-emphasis-markers
+		(add-text-properties (match-end 4) (match-beginning 5)
+ '(invisible org-link))
+		(add-text-properties (match-beginning 3) (match-end 3)
+ '(invisible org-link))
   (goto-char (1+ (match-beginning 0
 rtn))
 

-- 
 Bastien


Re: [O] Remove redundant tags of headlines

2014-03-14 Thread Bastien


Hi Sébastien,

Sebastien Vauban 
writes:

>   #(":org:FLAGGED:" 1 4 (inherited t))
>
> IOW, "FLAGGED" is not shown as inherited!

Because it is not inherited, it is present in the headline.

Am I missing something?

> Hence, all the mechanics which follows never removes it!

You mean the mechanics of the function on Worg?

Or is there any real Org bug hidden somewhere here?

-- 
 Bastien




Re: [O] Remove redundant tags of headlines

2014-03-14 Thread Bastien


Hi Nicolas,

Nicolas Richard  writes:

> (btw, I noticed that worg says
> remote: No such file: 
> "/home/emacs/git/worg/org-tutorials/"../code/awk/ical2org.awk" src awk"
> when I push to it. I *guess* it comes from
> org-tutorials/org-google-sync.org which tries to #+INCLUDE the above,
> but I'm unsure how to fix it. I didn't touch that file.)

I've created a link to ical2org.awk, including such a big file
looks wrong.  This does not fix the problem, it only circumvent
it.

-- 
 Bastien




Re: [O] Post() evaluates but fails in export

2014-03-14 Thread Nicolas Goaziou
Hello,

Jarmo Hurri  writes:

> The following code evaluates just fine with C-c C-c, but fails during
> export. This is with the newest org-mode just pulled and built. How do I
> fix the issue?
>
> # ---
> Here is a function I want to define (use below), but which I do not
> want to export (neither code nor results).
> #+name: foo
> #+begin_src emacs-lisp :exports none :var bar="baz"
>   (concat "bar" bar)
> #+end_src
>
> #+RESULTS: foo
> : barbaz
>
> Here is a function that uses foo() defined above. This evaluates just
> fine with C-c C-c, but fails in export. It fails both in ASCII export
> (C-c C-e t a) and LaTeX export (C-c C-e l p). The error is
>
> org-babel-ref-resolve: Reference 'foo' not found in this buffer
>
> #+name: nofun
> #+BEGIN_SRC emacs-lisp :exports results :post foo("nofun")
> #+END_SRC
>
> #+RESULTS: nofun
> : barnofun
> # ---

The attached patch should fix the issue. Could you confirm it?


Regards,

-- 
Nicolas Goaziou
>From 081bbb80b58d5e22c300ec22159570898ac5c0d3 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Fri, 14 Mar 2014 15:27:32 +0100
Subject: [PATCH] ob-ref: Properly resolve references in ":post" arguments

* lisp/ob-core.el (org-babel-exp-reference-buffer): New variable, as
  a replacement for `org-current-export-file'.
(org-babel-check-confirm-evaluate): Use new variable.
* lisp/ob-exp.el (org-babel-exp-in-export-file): Use new variable.
(org-babel-exp-get-export-buffer): Remove function.
(org-babel-exp-process-buffer): Change signature.
* lisp/ob-ref.el (org-babel-ref-resolve): Use new variable during
  export in order to properly resolve references.
* lisp/ox.el (org-export-execute-babel-code): Use new variable.

* contrib/lisp/org-wikinodes.el (org-wikinodes-process-links-for-export):
  Remove a cond branch as it is always
  false (`org-current-export-file' couldn't be a string).

* testing/lisp/test-ob-lob.el (test-ob-lob/export-lob-lines): Update
  test.
* testing/lisp/test-ob.el (test-ob/eval-header-argument): Update test.
* testing/lisp/test-ob-exp.el (ob-export/reference-in-post-header):
  New test.

During export, Babel executes sequentially all blocks in the buffer
being exported.  This can lead to modifications preventing some
references from being resolved.  As a workaround, Babel stores
a pristine copy of the buffer in a variable so it can always find
needed references.

Before this patch, the variable storing this copy was
`org-current-export-file' and was dynamically bound in "ox.el".  It
was used to resolve noweb references (`org-babel-expand-noweb-references')
but not regular references (`org-babel-ref-resolve').

Now, the variable is `org-babel-exp-reference-buffer' and it is bound
from `org-babel-exp-process-buffer'.  It is used to resolve all
references.  In particular, this allows to use references in :post
header.

Thanks to Jarmo Hurri for reporting it.
---
 contrib/lisp/org-wikinodes.el |   7 --
 lisp/ob-core.el   |   8 +-
 lisp/ob-exp.el|  37 -
 lisp/ob-ref.el| 185 +-
 lisp/ox.el|   4 +-
 testing/lisp/test-ob-exp.el   |  17 +++-
 testing/lisp/test-ob-lob.el   |   3 +-
 testing/lisp/test-ob.el   |   2 +-
 8 files changed, 134 insertions(+), 129 deletions(-)

diff --git a/contrib/lisp/org-wikinodes.el b/contrib/lisp/org-wikinodes.el
index 7d136c2..7f3e2e3 100644
--- a/contrib/lisp/org-wikinodes.el
+++ b/contrib/lisp/org-wikinodes.el
@@ -268,7 +268,6 @@ If there is no such wiki target, return nil."
 		(car org-export-target-aliases
   (push (caar target-alist) (cdr a)
 
-(defvar org-current-export-file)
 (defun org-wikinodes-process-links-for-export ()
   "Process Wiki links in the export preprocess buffer.
 
@@ -294,12 +293,6 @@ with working links."
 	   ((eq org-wikinodes-scope 'file)
 	;; No match in file, and other files are not allowed
 	(insert (format "%s" link)))
-	   ((setq file
-		  (and (org-string-nw-p org-current-export-file)
-		   (org-wikinodes-which-file
-			link (file-name-directory org-current-export-file
-	;; Match in another file in the current directory
-	(insert (format "[[file:%s::%s][%s]]" file link link)))
 	   (t ;; No match for this link
 	(insert (format "%s" link)
 
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 8c55a18..0adfc33 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -285,7 +285,11 @@ Returns a list
   (setf (nth 2 info) (org-babel-process-params (nth 2 info
 (when info (append info (list name indent head)
 
-(defvar org-current-export-file) ; dynamically bound
+(defvar org-babel-exp-reference-buffer nil
+  "Buffer containing original contents of the exported buffer.
+This is used by Babel to resolve references in source blocks.
+Its value is dynamically bound during export.")
+
 (

Re: [O] Screencast of lispy.el with org-mode code base

2014-03-14 Thread Bastien
Oleh  writes:

> And look at `lispy-flatten` ("xf"):
>
> |(org-defkey org-mode-map [(meta up)]'org-metaup)
>
> ->
>
> |(define-key org-mode-map (org-key [(meta up)]) 'org-metaup)
>
> Nifty, right?

Indeed -- great, now I feel like I'm just a caveman, used
to simply insert character after character the old school
way... :)

-- 
 Bastien



Re: [O] Remove redundant tags of headlines

2014-03-14 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
> Sebastien Vauban writes:
>
>>   #(":org:FLAGGED:" 1 4 (inherited t))
>>
>> IOW, "FLAGGED" is not shown as inherited!
>
> Because it is not inherited, it is present in the headline.
>
> Am I missing something?

>From my point of view and the point of that function (IIUC), yes.

Look again:

--8<---cut here---start->8---
#+FILETAGS: :org:

* List of projects
** TODO Project A   :FLAGGED:
*** TODO Task 1 :FLAGGED:
--8<---cut here---end--->8---

Of course, "FLAGGED" is present in the headline but, at the same time,
it is inherited.

IIUC, the goal of the function written by David was to remove redundant
tags. In the above case, "FLAGGED" should be removed from "Task 1"
because it is superfluous (redundant with its parent entry).

>> Hence, all the mechanics which follows never removes it!
>
> You mean the mechanics of the function on Worg?

Yes, as explicited above.

> Or is there any real Org bug hidden somewhere here?

I'd think that asking for all tags of "Task 1" should output both
a local "FLAGGED" tag and an inherited "FLAGGED" one.

Am I wrong?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [bug] Fontification of bold and italics

2014-03-14 Thread Sebastien Vauban
Bastien wrote:
> can you test this patch against maint for a while and
> report problems?

A little problem (while it's already better than what's currently in
master):

http://screencast.com/t/55xJRY10UN5

The word "show", in sandwich between 2 expressions in bold, is displayed
in bold, while it shouldn't.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [bug] Fontification of bold and italics

2014-03-14 Thread Sebastien Vauban
Bastien wrote:
> can you test this patch against maint for a while and
> report problems?

I'll do. Thanks!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [bug] Fontification of bold and italics

2014-03-14 Thread Bastien


Sebastien Vauban 
writes:

> A little problem (while it's already better than what's currently in
> master):
>
> http://screencast.com/t/55xJRY10UN5
>
> The word "show", in sandwich between 2 expressions in bold, is displayed
> in bold, while it shouldn't.

For that you need to remove the " character from characters that are
forbidden as border chars (check `org-emphasis-regexp-components'
docstring.)

HTH,

-- 
 Bastien




[O] Named latex blocks for inline execution?

2014-03-14 Thread Phil Regier
Hi, all; sorry to pester again, but I haven't been able to find a way to do 
something I would have thought would be relatively simple.

What I want to do is declare a named latex block in Org which I can use to 
reproduce markup patterns which I reuse very frequently; the usual reasons 
include readability, brevity, and maintainability.

The reasons I don't want to use Latex macros for this include:
1.  Inflexibility of macro names in Latex (no digits or special characters 
allowed)
2.  Unavailability of short macro names (most of the good ones are taken, so my 
schemes end up inconsistent or self-defeatingly long or I get subtle mysterious 
errors from overriding short macro names)
3.  By mixing Org calls with Latex macros I can debug problems at multiple 
levels (by examining my Org source and generated Latex source separately, which 
is messier with Latex macros alone)
4.  I can shield my advisor from my worst coding habits if he wants to read my 
Latex source
5.  I can pass parameters/variables between Org blocks, performing computations 
on them when needed, more readily than Latex macros (and I would dearly love to 
follow real examples of numerical algorithm execution inline with the 
discussion of said algorithms), perhaps even marking Octave results up as Latex 
invisibly if I'm lucky.

So I thought I would begin with a simple block to create a small inline 
bracketed matrix:

#+name: Smx
#+begin_src latex :var Contents="pi"
\(
  \left[
\begin{smallmatrix}
  Contents
\end{smallmatrix}
  \right]
\)
#+end_src

What I get in a Latex export buffer from "call_Smx()" invariably is some 
variant of the following:

=$\backslash$(
\left[
\begin{smallmatrix}
  \Pi
\end{smallmatrix}
  \right]
$\backslash$)=

There are several particularly stubborn issues here:

1.  The surrounding '=' symbols have been impossible to eliminate.  I assume 
they are part of an attempt to add code markdown, but Latex does not interpret 
them as such; they just get passed through.
2.  The \( and \) directives get literalized no matter what I try.  Wrapping 
the call in math mode delimiters hasn't been terribly fruitful either, as this 
seems to confuse the export (either inline math mode never gets entered, or the 
call_Smx() becomes literal text within math mode).
3.  For some reason, my "\pi" gets capitalized in the Latex output.

I'm not sure exactly what I expect from any particular syntax, but what I want 
is just an interpretable stamp of the Latex code inside the original block with 
variables substituted exactly.  I've tried extra backslashes in the code, tried 
a variety of [:results ...] and [:exports ...] before and after the call (as 
well as prologues and epilogues), exporting to raw and latex and org, and even 
declaring the block as org instead of latex.  Is there a correct way to achieve 
this, or am I trying to make Org do something it is not meant to do?

Thanks for any ideas...

Phil



Re: [O] Remove redundant tags of headlines

2014-03-14 Thread Bastien


Hi Sébastien,

Sebastien Vauban 
writes:

> ** TODO Project A   :FLAGGED:
> *** TODO Task 1 :FLAGGED:
>
> Of course, "FLAGGED" is present in the headline but, at the same time,
> it is inherited.

It means Org favors explicit tags over inherited ones when presenting
them through `org-entry-get'.

> IIUC, the goal of the function written by David was to remove redundant
> tags. In the above case, "FLAGGED" should be removed from "Task 1"
> because it is superfluous (redundant with its parent entry).

Can you find when David's function was still functional for you?

> I'd think that asking for all tags of "Task 1" should output both
> a local "FLAGGED" tag and an inherited "FLAGGED" one.

Well, ALLTAGS means all distinct tags for me, and I don't see how
outputting all duplicate tags would be useful.  You'll have to find
another use-case than just David's function to convince me :)

-- 
 Bastien




[O] Error exporting to HTML: Args out of range

2014-03-14 Thread Elasady, Summer
Hello-

I have been successfully updating and exporting a project to HTML using 
emacs/OrgMode for a few months now. I did not change anything in my header or 
in my configuration file, I ran through all the code and it executes without 
issue, yet as of yesterday I receive the following error when trying to export 
to HTML:

org-html-table-cell: Args out of range: [left left], 2

Everything does export properly to LaTeX, so it appears to be an issue with 
HMTL export.

Does anyone know what might be causing this issue and how I can fix it?

Thank so much!

Summer


Re: [O] Error exporting to HTML: Args out of range

2014-03-14 Thread Bastien
Hi Summer,

can you tell us what's your version of Org-mode and Emacs?

M-x org-version RET
M-x emacs-version RET

Also, if you can provide a minimal .org file that we can use
to reproduce the problem with emacs -q, that would help.

Thanks,

-- 
 Bastien



Re: [O] [PATCH] Update documentation for :exports (applicable to blocks only, not inline)

2014-03-14 Thread John Hendy
On Thu, Mar 13, 2014 at 3:17 AM, Bastien  wrote:
> Hi John,
>
> John Hendy  writes:
>
>> The trailing whitespace is the result of my texi ignorance. In a
>> previous patch, Nicolas clarified that sentences needed to end in two
>> spaces, and I add them at the end of my last sentence thinking they
>> might be required to identify a new next bit. Understanding now that
>> an endline/carriage return is sufficient and the spaces are not
>> needed.
>
> Yes, two spaces are only needed to separate sentences on the same
> line.
>
> Thanks in advance for rewriting the patch, I know it can be tiresome.

No problem. Is the attached satisfactory? I worked along with the
ChangeLog documentation, but will start a new thread as I don't think
it's *that* clear :)

Thanks,
John

> --
>  Bastien
Header arguments: clarify that `:exports' is only applicable to blocks, not inline code

* doc/org.texi (Exporting code blocks): add clarification; relevant for blocks ony.

* doc/org.texi (exports): add clarification; relevant for blocks only.

The documentation change resulted from the expectation that `:exports' could be used with inline code blocks, which is not the case. Clarification was added to avoid future confusion on this Babel block specific header argument.

TINYCHANGE

From d92c30116602a97f2b11684cf5c66de3972d147b Mon Sep 17 00:00:00 2001
From: John Henderson 
Date: Fri, 14 Mar 2014 10:29:33 -0500
Subject: [PATCH] clarified documentation for :exports; only applicable to
 blocks, not inline code

---
 doc/org.texi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 93d5fd2..04be009 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -13828,7 +13828,8 @@ results of code block evaluation.  For information on exporting code block
 bodies, see @ref{Literal examples}.
 
 The @code{:exports} header argument can be used to specify export
-behavior:
+behavior (note that these arguments are only relevant for code blocks, not
+inline code):
 
 @subsubheading Header arguments:
 
@@ -14831,7 +14832,8 @@ which the link does not point.
 @cindex @code{:exports}, src header argument
 
 The @code{:exports} header argument specifies what should be included in HTML
-or @LaTeX{} exports of the Org mode file.
+or @LaTeX{} exports of the Org mode file. Note that the @code{:exports}
+option is only relevant for code blocks, not inline code.
 
 @itemize @bullet
 @item @code{code}
-- 
1.9.0



[O] mark parent element?

2014-03-14 Thread Matt Price
Hi,

I'm trying to write a function that will mark the parent of the
current element.  I think I understand how to do it but for some
reason I can get the mark to persist after the funciton is called.  I
think it's really an elisp problem, not an org problem, but am hoping
someone can ehelp me.  Here's what I have:

(defun er/mark-org-parent-element ()
  "Marks an org parent element"
  (interactive)
  (let ((parent (plist-get (car (cdr (org-element-at-point))) :parent)))
(let ((parent-props (car (cdr parent
  ;; (print parent-props)
  ;; (print (plist-get parent-props :begin))
  ;; (print (plist-get parent-props :end))
  (if (plist-get parent-props :begin)
  (progn
(goto-char (plist-get parent-props :begin))
(set-mark (point))
(goto-char (plist-get parent-props :end))
(exchange-point-and-mark)
)))
)
)



Re: [O] [PATCH] Update documentation for :exports (applicable to blocks only, not inline)

2014-03-14 Thread Bastien
Hi John,

thanks for the patch -- some comments below.

John Hendy  writes:

> Header arguments: clarify that `:exports' is only applicable to
> blocks, not inline code

This first line should include "org.texi:" to tell that the change
happens in org.texi.  See other commits for examples.

> * doc/org.texi (Exporting code blocks): add clarification; relevant for 
> blocks ony.

Start with a capitalized letter: "Add clarification."
Don't use semi-column.  "Clarify" is enough IMO.

> * doc/org.texi (exports): add clarification; relevant for blocks only.

When two changes get the same description use this:

* doc/org.texi (Exporting code blocks, exports): Clarify.

In general, you can make it easier for you by reviewing the patch (hit
`C-x v =' in the modified org.texi buffer), and then hit `C-x 4 a' on
each change to create a Changelog buffer that you can safely edit.

> The documentation change resulted from the expectation that
> `:exports' could be used with inline code blocks, which is not the
> case. Clarification was added to avoid future confusion on this
> Babel block specific header argument.

Please use auto-fill and fill-column to something between 72 and 80.

> TINYCHANGE

Thanks again for the patch, HTH,

-- 
 Bastien



Re: [O] bug#16832: Emacs goes crazy when deleting lines

2014-03-14 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> From: "Fabrice Niessen" 
>> Cc: 16...@debbugs.gnu.org
>> Date: Wed, 26 Feb 2014 20:42:20 +0100
>> 
>> Eli Zaretskii wrote:
>> >> From: "Fabrice Niessen" 
>> >> Cc: 16...@debbugs.gnu.org
>> >> Date: Wed, 26 Feb 2014 12:06:24 +0100
>> >> 
>> >> > Then try F12 (if you are on XP), or try attaching a debugger and
>> >> > getting a C and Lisp backtrace.
>> >> 
>> >> Hope this helps:
>> >
>> > Thanks.  Without a Lisp-level backtrace, there's not enough useful
>> > info here.
>> 
>> Is there something I can do to get it in such a debugger session?
>
> Probably, but I don't know what to suggest.  I don't understand the
> error messages that you get from GDB, this usually happens when one
> tries to attach a debugger to a program that is already being
> debugged, which seems to be not the case here.  Weird.
>
>> > Perhaps finding the minimal set of customizations that reproduces the
>> > issue would lead faster to the solution.
>> 
>> So you mean that the backtrace, with saveplace calls, does not lead to
>> him as the culprit?
>
> These are not saveplace calls, this is Emacs searching for a string
> that includes "saveplace.elc" and "save-place-alist" as substrings.

I made a big progress on this one.

I realized that Emacs did not into an infloop, but simply gave me back
control after a very long time (more than 2 mins). Good news #1.

I thought at using the profiler of Emacs 24, and it gives meaningful
results. Good news #2.

Here they are:

--8<---cut here---start->8---
- flyspell-post-command-hook 3271  98%
 - apply 3271  98%
  - ad-Advice-flyspell-post-command-hook 3271  98%
   - #3271  98%
- byte-code  3271  98%
 - flyspell-word 3271  98%
  - org-mode-flyspell-verify 3246  97%
   - if  3246  97%
- let*   3246  97%
 - prog1 3053  91%
  - catch3053  91%
   - while   3053  91%
- if 3053  91%
 - progn 3053  91%
  - setq 3053  91%
   - org-element--get-next-object-candidates 3053  91%
- delq   3053  91%
 - if3053  91%
  - mapcar   3053  91%
   - #3053  91%
- funcall3053  91%
 - org-element-inline-babel-call-successor   2873  86%
  - save-excursion   2873  86%
 if  2873  86%
 + org-element-latex-or-entity-successor   81   2%
 + org-element-link-successor  35   1%
 + org-element-line-break-successor19   0%
 + org-element-inline-src-block-successor   9   0%
 + org-element-footnote-reference-successor 5   0%
 + org-element-macro-successor  5   0%
 + org-element-statistics-cookie-successor  5   0%
 + org-element-timestamp-successor  5   0%
 + org-element-export-snippet-successor 4   0%
 + org-element-radio-target-successor   4   0%
 + org-element-target-successor 4   0%
 + org-element-sub/superscript-successor3   0%
 + org-element-text-markup-successor1   0%
 + org-element-at-point   193   5%
  + flyspell-word-search-forward   15   0%
+ redisplay_internal (C function)  28   0%
+ ...  27   0%
--8<---cut here---end--->8---

Though, I don't understand yet why Flyspell seems to be a problem in Org
mode buffers, and not in Text mode buffers: as you can see in the video
on http://screencast.com/t/UiihFfPk,

1. Text mode + all my config (enabling Flyspell by default) is OK,

   (from 0:07 to 0:14, then undoing the changes)

2. Org mode  + all my config (enabling Flyspel

Re: [O] [PATCH] Update documentation for :exports (applicable to blocks only, not inline)

2014-03-14 Thread John Hendy
On Fri, Mar 14, 2014 at 10:51 AM, Bastien  wrote:
> Hi John,
>
> thanks for the patch -- some comments below.
>
> John Hendy  writes:
>
>> Header arguments: clarify that `:exports' is only applicable to
>> blocks, not inline code
>
> This first line should include "org.texi:" to tell that the change
> happens in org.texi.  See other commits for examples.
>

Gotcha. That wasn't in the manual example for the first line. I've
added it to my re-attempt attached.

>> * doc/org.texi (Exporting code blocks): add clarification; relevant for 
>> blocks ony.
>
> Start with a capitalized letter: "Add clarification."
> Don't use semi-column.  "Clarify" is enough IMO.
>

Even after reading the instructions, I *still* missed the capitalization bit...

>> * doc/org.texi (exports): add clarification; relevant for blocks only.
>
> When two changes get the same description use this:
>
> * doc/org.texi (Exporting code blocks, exports): Clarify.
>

Awesome. I wondered about that as well.

> In general, you can make it easier for you by reviewing the patch (hit
> `C-x v =' in the modified org.texi buffer), and then hit `C-x 4 a' on
> each change to create a Changelog buffer that you can safely edit.
>

Thanks for the tips.

>> The documentation change resulted from the expectation that
>> `:exports' could be used with inline code blocks, which is not the
>> case. Clarification was added to avoid future confusion on this
>> Babel block specific header argument.
>
> Please use auto-fill and fill-column to something between 72 and 80.
>

Done.

>> TINYCHANGE
>
> Thanks again for the patch, HTH,
>

No problem.


John

> --
>  Bastien
Header arguments: clarify in doc/org.texi that `:exports' is only applicable to
blocks, not inline code

* doc/org.texi (Exporting code blocks, exports): Clarify.

The documentation change resulted from the expectation that `:exports'
could be used with inline code blocks, which is not the case.
Clarification was added to avoid future confusion on this header
argument, which is applicable only to blocks.

TINYCHANGE

From d92c30116602a97f2b11684cf5c66de3972d147b Mon Sep 17 00:00:00 2001
From: John Henderson 
Date: Fri, 14 Mar 2014 10:29:33 -0500
Subject: [PATCH] clarified documentation for :exports; only applicable to
 blocks, not inline code

---
 doc/org.texi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 93d5fd2..04be009 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -13828,7 +13828,8 @@ results of code block evaluation.  For information on exporting code block
 bodies, see @ref{Literal examples}.
 
 The @code{:exports} header argument can be used to specify export
-behavior:
+behavior (note that these arguments are only relevant for code blocks, not
+inline code):
 
 @subsubheading Header arguments:
 
@@ -14831,7 +14832,8 @@ which the link does not point.
 @cindex @code{:exports}, src header argument
 
 The @code{:exports} header argument specifies what should be included in HTML
-or @LaTeX{} exports of the Org mode file.
+or @LaTeX{} exports of the Org mode file. Note that the @code{:exports}
+option is only relevant for code blocks, not inline code.
 
 @itemize @bullet
 @item @code{code}
-- 
1.9.0



[O] Clarification on ChangeLog documentation

2014-03-14 Thread John Hendy
Greetings,


I've been getting my feet wet on documentation patches (well, on two
of them) recently and didn't think the documentation was *that* clear,
in my opinion. If someone can help clarify, I'm happy to patch the
documentation on patching :) For reference:
- http://orgmode.org/worg/org-contribute.html#sec-5

The specification is clear enough for lines 1 and 2.

#+begin_quote
In line 3, the ChangeLog entry should start, in a similar format as in
the old ChangeLog files, but without the author information (which is
part of the commit anyway).
#+end_quote

The ChangeLog instructions refer back to the "old ChangeLog" files
,but if you've never submitted a patch, that's not very helpful and
there's no link to read about the "old" format. I referred to the
example for this, but more on that below.

#+begin_quote
Variables and functions names are quoted like =`this'= (backquote and
single quote).
#+end_quote

Does the Org verbatim markup help explain this any better than just
using, `this'? It's not fontified, so to an Org-novice, it might not
be clear why == surround the word.

And, walking through the example line by line:

#+begin_quote
Capture: Fix the case of using a template file
#+end_quote

What determines what should come before the colon? Obviously the
example was to capture functionality and the corresponding
documentation, but is there a set list of words that should be used? A
recent patch, for example, clarified that the :exports header argument
only applied to code blocks, not inline code. I used:

Header arguments: blah blah blah

Should that have been a manual section title, something specifically
about exporting, code blocks, babel... other?

I understand the first line should contain the file name. Is this
correct, as it's not in the manual example. And should it be file.ext,
or dir/file.ext for the first line summary?

#+begin_quote:
* lisp/org-capture.el (org-capture-set-plist): Make sure txt is a
string before calling `string-match'.
(org-capture-templates): Fix customization type.

* doc/org.texi (Capture): Document using a file for a template.
#+end_quote

My change modified only org.texi, but in two places. Do I need a
"header" per change, or just a header per file? Nevermind; Bastien
responded to my submission so I now know the answer is one header,
with two content bits. Also, from his response, I gather that the bit
in between parentheses should be the @node name of the section being
changed, correct?

#+begin_quote:
The problem here was that a wrong keyword was given in the
customization type.  This let to a string-match against a list value.
#+end_quote

I couldn't tell if this paragraph was supposed to be a continuation of
the second "header" above, or if it was it's own standalone summary of
the gist of both changes.

#+begin_quote
Modified from a patch proposal by Johan Friis.
#+end_quote

Can I reference mailing list threads, or is this not advised? Or
should I be mentioning the person who responded on the mailing list
for the clarification which led to the documentation modification?

#+begin_quote
TINYCHANGE
#+end_quote

Is the FSF requirement necessary only if one commit > x lines, or is
it cumulative?

I can take a shot at clarifying this in the manual example based on
responses to the above, if desired. I'm just getting up to speed, so
perhaps it's just me that's ignorant on the process :)


Best regards,
John


>



Re: [O] [PATCH] Update documentation for :exports (applicable to blocks only, not inline)

2014-03-14 Thread Bastien
John Hendy  writes:

> No problem.

I installed the patch in master, thanks.

Last nitpick: I added a space in the change, as sentences in the
manual should end with two spaces... sorry to repeat this :)

-- 
 Bastien



Re: [O] Remove redundant tags of headlines

2014-03-14 Thread Sebastien Vauban


Hi Bastien,

>> ** TODO Project A   :FLAGGED:
>> *** TODO Task 1 :FLAGGED:
>>
>> Of course, "FLAGGED" is present in the headline but, at the same time,
>> it is inherited.
>
> It means Org favors explicit tags over inherited ones when presenting
> them through `org-entry-get'.

Yes, that's what I thought. That makes sense.

>> IIUC, the goal of the function written by David was to remove redundant
>> tags. In the above case, "FLAGGED" should be removed from "Task 1"
>> because it is superfluous (redundant with its parent entry).
>
> Can you find when David's function was still functional for you?

No, and, honestly, I won't try, because I remember seeing that not
functioning for a very long time, certainly well above 1 year. And so
many things changed in my config (Emacs, Org mode) and in Org mode, that
I'm not sure at all to come back to a previously working state -- if it
did [1].

>> I'd think that asking for all tags of "Task 1" should output both
>> a local "FLAGGED" tag and an inherited "FLAGGED" one.
>
> Well, ALLTAGS means all distinct tags for me, and I don't see how
> outputting all duplicate tags would be useful.

Well, here, it would be useful that ALLTAGS would really report ALL
TAGS... (even if it wasn't its default behavior)

> You'll have to find another use-case than just David's function to
> convince me :)

Then, I won't.  But such a cleaning (in `before-save-hook') is not
possible, then?

Best regards,
  Seb

[1] I can't exclude that my mind would play me tricks.

-- 
Sebastien Vauban




Re: [O] Using sideways table with :placement in Org 8.0?

2014-03-14 Thread John Hendy
On Mon, Mar 10, 2014 at 7:57 AM, John Hendy  wrote:
>
> On Mar 10, 2014 12:22 AM, "Nick Dokos"  wrote:
>>
>> John Hendy  writes:
>>
>> > I was just playing around with the new syntax for accessing
>> > sidewaystable in Org 8.0, but it doesn't seem to be working. The
>> > manual /seems/ pretty straightforward:
>> > - http://orgmode.org/manual/LaTeX-specific-attributes.html
>> >
>> > ":placement
>> > Float environment for the table. Possible values are sidewaystable,
>> > multicolumn, t and nil. When unspecified, a table with a caption will
>> > have atable environment. Moreover, :placement attribute can specify
>> > the positioning of the float. "
>> >
>>
>> Actually it says:
>>
>> ,
>> | `:float'
>> | `:placement'
>> |  Float environment for the table.  Possible values are
>> |  `sidewaystable', `multicolumn', `t' and `nil'.  When unspecified,
>> |  a table with a caption will have a `table' environment.  Moreover,
>> |  `:placement' attribute can specify the positioning of the float.
>> `
>>
>> Try
>>
>> #+attr_latex: :float sidewaystable
>>
>> instead. The doc does need clarification.
>>
>
> Blast. I was close! I thought :float was standalone so I tried this combo
> last night as well.
>
> :float :placement sidewaystsble
>
> Now it makes sense I think. Is placement just for things like [htb], then?
> If so, perhaps those should be split into separate line items.
>

Hi Nick (or others),


Just following up on this so that the manual can be changed. Just to
re-ask, I'm wondering if :float and :placement are independent (no
overlap). If so, I'd suggest something more like this:

#+begin_example

:float
Environment for the table... possible values are: sidewaystable,
multicolumn, t and nil

:placement
Positioning arguments for the float... possible values are: [value list]
#+end_example

Is that possible, or do these arguments take any overlapping values.
In looking for float placement options, I'm finding:
- http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Figures

Thus, I'm guessing :placement takes h, t, b, p, !, and H (though it
should be noted that sidewaystable requires the rotfloat package to
use H).

For what it's worth, while I was perusing this page for this email, I
find it a bit confusing. The tables section says nothing about what
the :float values do, yet images and code sections walk through each
of them with a nice summary.

There's also a link to [Images and tables], which seems pretty
table-dominant in terms of the actual content. The title of that page
would imply to me that it's an overview of tables and figures, however
it's really only about captions and names. I wonder about adding links
to the various #+attr_backend manual pages that exist for
images/tables, as it seems like one would naturally be interested in
how to export their images/tables properly from Org, and that page
doesn't help with that at all.

Thanks for any feedback. Happy to help make any desired changes.


Best regards,
John

> Thanks!
> John
>

[snip]



Re: [O] Using sideways table with :placement in Org 8.0?

2014-03-14 Thread John Hendy
On Mon, Mar 10, 2014 at 7:57 AM, John Hendy  wrote:
>
> On Mar 10, 2014 12:22 AM, "Nick Dokos"  wrote:
>>
>> John Hendy  writes:
>>
>> > I was just playing around with the new syntax for accessing
>> > sidewaystable in Org 8.0, but it doesn't seem to be working. The
>> > manual /seems/ pretty straightforward:
>> > - http://orgmode.org/manual/LaTeX-specific-attributes.html
>> >
>> > ":placement
>> > Float environment for the table. Possible values are sidewaystable,
>> > multicolumn, t and nil. When unspecified, a table with a caption will
>> > have atable environment. Moreover, :placement attribute can specify
>> > the positioning of the float. "
>> >
>>
>> Actually it says:
>>
>> ,
>> | `:float'
>> | `:placement'
>> |  Float environment for the table.  Possible values are
>> |  `sidewaystable', `multicolumn', `t' and `nil'.  When unspecified,
>> |  a table with a caption will have a `table' environment.  Moreover,
>> |  `:placement' attribute can specify the positioning of the float.
>> `
>>
>> Try
>>
>> #+attr_latex: :float sidewaystable
>>
>> instead. The doc does need clarification.
>>
>
> Blast. I was close! I thought :float was standalone so I tried this combo
> last night as well.
>
> :float :placement sidewaystsble
>
> Now it makes sense I think. Is placement just for things like [htb], then?
> If so, perhaps those should be split into separate line items.
>

Hi Nick (or others),


Just following up on this so that the manual can be changed. Just to
re-ask, I'm wondering if :float and :placement are independent (no
overlap). If so, I'd suggest something more like this:

#+begin_example

:float
Environment for the table... possible values are: sidewaystable,
multicolumn, t and nil

:placement
Positioning arguments for the float... possible values are: [value list]
#+end_example

Is that possible, or do these arguments take any overlapping values.
In looking for float placement options, I'm finding:
- http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Figures

Thus, I'm guessing :placement takes h, t, b, p, !, and H (though it
should be noted that sidewaystable requires the rotfloat package to
use H).

For what it's worth, while I was perusing this page for this email, I
find it a bit confusing. The tables section says nothing about what
the :float values do, yet images and code sections walk through each
of them with a nice summary.

There's also a link to [Images and tables], which seems pretty
table-dominant in terms of the actual content. The title of that page
would imply to me that it's an overview of tables and figures, however
it's really only about captions and names. I wonder about adding links
to the various #+attr_backend manual pages that exist for
images/tables, as it seems like one would naturally be interested in
how to export their images/tables properly from Org, and that page
doesn't help with that at all.

Thanks for any feedback. Happy to help make any desired changes.


Best regards,
John

> Thanks!
> John
>

[snip]



Re: [O] [PATCH] Update documentation for :exports (applicable to blocks only, not inline)

2014-03-14 Thread John Hendy
On Fri, Mar 14, 2014 at 11:17 AM, Bastien  wrote:
> John Hendy  writes:
>
>> No problem.
>
> I installed the patch in master, thanks.
>
> Last nitpick: I added a space in the change, as sentences in the
> manual should end with two spaces... sorry to repeat this :)

I caught it too, after I submitted (the first one; hopefully the last
one had them!). Lots of things to keep track of at once, but I'll get
there.

Thanks for the patience!
John

>
> --
>  Bastien



Re: [O] Named latex blocks for inline execution?

2014-03-14 Thread Thomas S. Dye
Aloha Phil,

Org mode has its own macros, which might work in this instance.

The variable org-babel-inline-result-wrap is set to "=%s=" by
default. Setting it as follows will get rid of the surrounding =
symbols:

#+begin_src emacs-lisp
  (setq org-babel-inline-result-wrap "%s")
#+end_src

Alternatively, on my setup at least, call_Smx()[:results raw] will also
get rid of the surrounding = symbols.

The capitalization of "pi" seems to be related to capitalization of the
variable name "Contents".  This is new to me and I don't recall reading
about it in the documentation, but I haven't looked lately. At any rate,
if I name the variable "contents" then I get a lowercase "pi" in the
output.

My guess about the "backslash" part is that Org mode is expecting an
inline LaTeX math snippet to be on one line.  At any rate, this seems to
work for me:

#+name: Smx
#+begin_src latex :var contents="pi"
\begin{equation}
  \left[
\begin{smallmatrix}
  contents
\end{smallmatrix}
  \right]
\end{equation}
#+end_src

hth,
Tom

Phil Regier  writes:

> Hi, all; sorry to pester again, but I haven't been able to find a way
> to do something I would have thought would be relatively simple.
>
> What I want to do is declare a named latex block in Org which I can
> use to reproduce markup patterns which I reuse very frequently; the
> usual reasons include readability, brevity, and maintainability.
>
> The reasons I don't want to use Latex macros for this include:
> 1.  Inflexibility of macro names in Latex (no digits or special characters 
> allowed)
> 2.  Unavailability of short macro names (most of the good ones are
> taken, so my schemes end up inconsistent or self-defeatingly long or I
> get subtle mysterious errors from overriding short macro names)
> 3.  By mixing Org calls with Latex macros I can debug problems at
> multiple levels (by examining my Org source and generated Latex source
> separately, which is messier with Latex macros alone)
> 4.  I can shield my advisor from my worst coding habits if he wants to
> read my Latex source
> 5.  I can pass parameters/variables between Org blocks, performing
> computations on them when needed, more readily than Latex macros (and
> I would dearly love to follow real examples of numerical algorithm
> execution inline with the discussion of said algorithms), perhaps even
> marking Octave results up as Latex invisibly if I'm lucky.
>
> So I thought I would begin with a simple block to create a small
> inline bracketed matrix:
>
> #+name: Smx
> #+begin_src latex :var Contents="pi"
> \(
>   \left[
> \begin{smallmatrix}
>   Contents
> \end{smallmatrix}
>   \right]
> \)
> #+end_src
>
> What I get in a Latex export buffer from "call_Smx()" invariably is some 
> variant of the following:
>
> =$\backslash$(
> \left[
> \begin{smallmatrix}
>   \Pi
> \end{smallmatrix}
>   \right]
> $\backslash$)=
>
> There are several particularly stubborn issues here:
>
> 1.  The surrounding '=' symbols have been impossible to eliminate.  I assume 
> they are part of an attempt to add code markdown, but Latex does not 
> interpret them as such; they just get passed through.
> 2.  The \( and \) directives get literalized no matter what I try.  Wrapping 
> the call in math mode delimiters hasn't been terribly fruitful either, as 
> this seems to confuse the export (either inline math mode never gets entered, 
> or the call_Smx() becomes literal text within math mode).
> 3.  For some reason, my "\pi" gets capitalized in the Latex output.
>
> I'm not sure exactly what I expect from any particular syntax, but what I 
> want is just an interpretable stamp of the Latex code inside the original 
> block with variables substituted exactly.  I've tried extra backslashes in 
> the code, tried a variety of [:results ...] and [:exports ...] before and 
> after the call (as well as prologues and epilogues), exporting to raw and 
> latex and org, and even declaring the block as org instead of latex.  Is 
> there a correct way to achieve this, or am I trying to make Org do something 
> it is not meant to do?
>
> Thanks for any ideas...
>
> Phil
>
>

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



Re: [O] mark parent element?

2014-03-14 Thread Thorsten Jolitz
Matt Price  writes:

> Hi,
>
> I'm trying to write a function that will mark the parent of the
> current element.  I think I understand how to do it but for some
> reason I can get the mark to persist after the funciton is called.  I
> think it's really an elisp problem, not an org problem, but am hoping
> someone can ehelp me.  Here's what I have:
>
> (defun er/mark-org-parent-element ()
>   "Marks an org parent element"
>   (interactive)
>   (let ((parent (plist-get (car (cdr (org-element-at-point))) :parent)))
> (let ((parent-props (car (cdr parent
>   ;; (print parent-props)
>   ;; (print (plist-get parent-props :begin))
>   ;; (print (plist-get parent-props :end))
>   (if (plist-get parent-props :begin)
>   (progn
> (goto-char (plist-get parent-props :begin))
> (set-mark (point))
> (goto-char (plist-get parent-props :end))
> (exchange-point-and-mark)
> )))
> )
> )

the set-mark doc give two hints in my eyes:

,---
| set-mark is a compiled Lisp function in `simple.el'.
| 
| (set-mark POS)
| 
| Set this buffer's mark to POS.  Don't use this function!
| That is to say, don't use this function unless you want
| the user to see that the mark has moved, and you want the previous
| mark position to be lost.
| 
| Normally, when a new mark is set, the old one should go on the stack.
| This is why most applications should use `push-mark', not `set-mark'.
| 
| Novice Emacs Lisp programmers often try to use the mark for the wrong
| purposes.  The mark saves a location for the user's convenience.
| Most editing commands should not alter the mark.
| To remember a location for internal use in the Lisp program,
| store it in a Lisp variable.  Example:
| 
|(let ((beg (point))) (forward-line 1) (delete-region beg (point))).
`---

 1. maybe try push-mark instead of set-mark?  
 
 2. maybe avoid marks completely if you just want make your program act
 on a region


-- 
cheers,
Thorsten




Re: [O] Named latex blocks for inline execution?

2014-03-14 Thread Eric S Fraga
Hello,

The following works for me with your example:

#+call: Smx[:exports results](Contents="Interesting") :results drawer latex

I am not sure why because I don't really understand the semantics of
"drawer" for results and didn't see anything in the docmentation about
this option (but also didn't look that hard for it).

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.5h-660-gef207f



Re: [O] mark parent element?

2014-03-14 Thread Oleh
Hi Matt,

> I'm trying to write a function that will mark the parent of the
> current element.  I think I understand how to do it but for some
> reason I can get the mark to persist after the funciton is called.  I
> think it's really an elisp problem, not an org problem, but am hoping
> someone can ehelp me.  Here's what I have:
>
> (defun er/mark-org-parent-element ()
>   "Marks an org parent element"
>   (interactive)
>   (let ((parent (plist-get (car (cdr (org-element-at-point))) :parent)))
> (let ((parent-props (car (cdr parent
>   ;; (print parent-props)
>   ;; (print (plist-get parent-props :begin))
>   ;; (print (plist-get parent-props :end))
>   (if (plist-get parent-props :begin)
>   (progn
> (goto-char (plist-get parent-props :begin))
> (set-mark (point))
> (goto-char (plist-get parent-props :end))
> (exchange-point-and-mark)
> )))
> )
> )

The probelm here is that `(org-element-at-point)` doesn't always have
a parent. I'm using plain outline functions for this purpose.
See `worf-mark-left' at https://github.com/abo-abo/worf/blob/master/worf.el.

regards,
Oleh



Re: [O] Named latex blocks for inline execution?

2014-03-14 Thread Phil Regier
Many thanks, Tom; these are all variations I had not thought to try.  I will 
try them out and see what combination works best for me.

Phil

- Original Message -
From: "Thomas S. Dye" 
To: "Phil Regier" 
Cc: "org mode" 
Sent: Friday, March 14, 2014 11:54:04 AM
Subject: Re: Named latex blocks for inline execution?

Aloha Phil,

Org mode has its own macros, which might work in this instance.

The variable org-babel-inline-result-wrap is set to "=%s=" by
default. Setting it as follows will get rid of the surrounding =
symbols:

#+begin_src emacs-lisp
  (setq org-babel-inline-result-wrap "%s")
#+end_src

Alternatively, on my setup at least, call_Smx()[:results raw] will also
get rid of the surrounding = symbols.

The capitalization of "pi" seems to be related to capitalization of the
variable name "Contents".  This is new to me and I don't recall reading
about it in the documentation, but I haven't looked lately. At any rate,
if I name the variable "contents" then I get a lowercase "pi" in the
output.

My guess about the "backslash" part is that Org mode is expecting an
inline LaTeX math snippet to be on one line.  At any rate, this seems to
work for me:

#+name: Smx
#+begin_src latex :var contents="pi"
\begin{equation}
  \left[
\begin{smallmatrix}
  contents
\end{smallmatrix}
  \right]
\end{equation}
#+end_src

hth,
Tom



Re: [O] mark parent element?

2014-03-14 Thread Nicolas Goaziou
Hello,

Matt Price  writes:

> I'm trying to write a function that will mark the parent of the
> current element.  I think I understand how to do it but for some
> reason I can get the mark to persist after the funciton is called.  I
> think it's really an elisp problem, not an org problem, but am hoping
> someone can ehelp me.  Here's what I have:
>
> (defun er/mark-org-parent-element ()
>   "Marks an org parent element"
>   (interactive)
>   (let ((parent (plist-get (car (cdr (org-element-at-point))) :parent)))

It is better to use (org-element-property :parent (org-element-at-point))

> (let ((parent-props (car (cdr parent

You shouldn't extract properties this way. See below.

>   ;; (print parent-props)
>   ;; (print (plist-get parent-props :begin))
>   ;; (print (plist-get parent-props :end))
>   (if (plist-get parent-props :begin)
>   (progn
> (goto-char (plist-get parent-props :begin))

It is better to use (org-element-property :begin parent)

> (set-mark (point))
> (goto-char (plist-get parent-props :end))

It is better to use (org-element-property :end parent)

Anyway, I suggest to use `org-up-element' and `org-mark-element'
instead.


Regards,

-- 
Nicolas Goaziou



Re: [O] Named latex blocks for inline execution?

2014-03-14 Thread Phil Regier
Thanks so much, Eric; during my recent updates/testing I had wiped my drawer 
export settings and had not attempted to use drawer output.  I will be sure to 
try it out.  I'm not sure whether the positive results will carry over to the 
inline call_Smx() syntax, but this will be enlightening even if they do not.

Phil

- Original Message -
From: "Eric S Fraga" 
To: "Phil Regier" 
Cc: "org mode" 
Sent: Friday, March 14, 2014 12:09:15 PM
Subject: Re: [O] Named latex blocks for inline execution?

Hello,

The following works for me with your example:

#+call: Smx[:exports results](Contents="Interesting") :results drawer latex

I am not sure why because I don't really understand the semantics of
"drawer" for results and didn't see anything in the docmentation about
this option (but also didn't look that hard for it).

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.5h-660-gef207f



Re: [O] [Patch] don't add indent for empty line when exiting, a code edit

2014-03-14 Thread Arun Persaud
On 03/14/2014 02:00 AM, Bastien wrote:
> Hi Florian,
> 
> Florian Beck  writes:
> 
>> On 13.03.2014 20:46, Bastien wrote:
>>> Ok, let me take some fresh air and come back to this later on.
>>
>> How about this:
>>
>> (while (re-search-forward "\\(^\\).+" nil t)
>>   (replace-match indent nil nil nil 1)))
> 
> Works fine here, I pushed this solution.  Thanks!

Thanks everyone for fixing this!

Arun



Re: [O] Babel should not work in the subtree marked as not exported

2014-03-14 Thread Samuel Wales
please consider this a bug report.

On 3/13/14, Samuel Wales  wrote:
> how about call lines?
>
> to me, they should not run if they are not supposed to be exported.
>
> is this a bug?
>
> * babel should not export a call line via todo kw
> *** NEXT to reproduce
> set org-export-with-tasks to nil
> *** NEXT this should not run
> #+call: hi(a=2)
> *** hi
> #+name: hi
> #+begin_src sh :var a=1
>   echo hi $a
> #+end_src
>
> --
> The Kafka Pandemic: http://thekafkapandemic.blogspot.com
>
> The disease DOES progress.  MANY people have died from it.  And
> ANYBODY can get it.
>
> Denmark: free Karina Hansen NOW.
>


-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] [OT] document scanner with ADF

2014-03-14 Thread Karl Voit
* Samuel Wales  wrote:
> We had a great discussion about scanners and ADFs here a while back.
> The Fujitsu ScanSnap 1500 seemed to be a favorite.  We also talked
> about what resolutions to scan at.

I own a ScanSnap 1500S and I scanned about 40.000 pages on OS X to
get my papers into PDFs (with OCR).

> What's the current status of document scanners for Linux?  How good
> are the ADFs physically?

I know somebody (Andreas) who is using those things with Linux.
AFAIR are there some drawbacks but no show-stoppers. Probably I can
get him to jump into this thread.

To me, the good scanner software (OS X or Windows) is an important
reason not to do scanning with my main system which is running
Debian.

-- 
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] Babel should not work in the subtree marked as not exported

2014-03-14 Thread Eric Schulte
> Sorry for being unclear here.  I wanted to propose different
> behaviour for TAGs (lets say :noexport:) and the COMMENT keyword.
> I am perfectly fine with :noexport: only prohibiting export but
> still allowing evaluation.
>
> But I propose that COMMENT be more treated like a comment, so more
> like a shorthand for commenting out that subtree using '# '.
> That way, evaluation would be disabled.
>
> I see two benefits:
> 1. It serves the use-case where one wants a subtree to be not
>exported and not evaluated.
> 2. It more resembles Orgs idea of comments.
>
> And since the other use case (no export but still evaluation) is
> still very well supported via :noexport: there would be not too
> much loss.
>
> (IIRC, the COMMENT keyword was close to removal from Orgs syntax
> recently.  So, why not add some real additional functionality to
> it?)
>
> WDYT?
>

This sounds like a good compromise to me.  As you say, this should
easily and visually support both use cases and is intuitive.  I've not
touched the export machinery myself, so I'll leave the implementation to
Nicolas but I definitely support this approach.

Best,

>
> Regards,
> Andreas
>
> PS:  IIUC, Samuel proposed the same thing:
> http://permalink.gmane.org/gmane.emacs.orgmode/83459
>
>

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



[O] Is there an environment for Org syntax?

2014-03-14 Thread Fletcher Charest
Dear all,

I am currently writing a practical tutorial about Org for absolute
beginners. In the end, I would like to export it in multiple formats, HTML
for sure, but maybe LaTeX too (I am, of course, writing it with org-mode).
I am not aware of a functionality, or hack, which would allow me to include
Org syntax in the document, without it being taken into account by Org
itself and the exporter as being part of the document structure. Instead,
I'd like it to be exported as it appears in my Emacs Org file, including
colors, etc. I hope I am explaining this clearly.

Is it possible?

Thank you very much for you help,

FC


Re: [O] Is there an environment for Org syntax?

2014-03-14 Thread Phil Regier
I had thought that '#+begin_src org :exports code' would do just this, though I 
believe you have to then begin each line with a comma inside the block.  

For me, the following:

#+begin_src org :exports code
,#+begin_src org :exports code
,#+end_src
#+end_src

produces Org code via the HTML and Latex export backends.  I think there are 
syntax highlighting export extensions in the wild (just search the web for 
something like 'org export syntax highlighting' to see a diverse collection of 
proposed solutions; Pygments appears to be a common theme, though I know 
nothing about it), but AFAIK they are not distributed with Org at this time. 

Does that at least address the first part of your inquiry?  Sorry I couldn't 
offer anything actionable for the second; maybe someone else can pick up where 
I left off.

Phil

- Original Message -
From: "Fletcher Charest" 
To: emacs-orgmode@gnu.org
Sent: Friday, March 14, 2014 4:41:12 PM
Subject: [O] Is there an environment for Org syntax?

Dear all,

I am currently writing a practical tutorial about Org for absolute
beginners. In the end, I would like to export it in multiple formats, HTML
for sure, but maybe LaTeX too (I am, of course, writing it with org-mode).
I am not aware of a functionality, or hack, which would allow me to include
Org syntax in the document, without it being taken into account by Org
itself and the exporter as being part of the document structure. Instead,
I'd like it to be exported as it appears in my Emacs Org file, including
colors, etc. I hope I am explaining this clearly.

Is it possible?

Thank you very much for you help,

FC



Re: [O] Is there an environment for Org syntax?

2014-03-14 Thread Fletcher Charest
Yes, thank you very much, that was it. I was thinking about doing this, but
I didn't know how to "escape" the syntax. This is quite embarrassing since
I just noticed that it is explained in the manual, and even more, since the
comma is added automatically when you edit the org code by hitting C-c '
anyway...

Thanks again!

Best regards,

FC


On Fri, Mar 14, 2014 at 11:13 PM, Phil Regier  wrote:

> I had thought that '#+begin_src org :exports code' would do just this,
> though I believe you have to then begin each line with a comma inside the
> block.
>
> For me, the following:
>
> #+begin_src org :exports code
> ,#+begin_src org :exports code
> ,#+end_src
> #+end_src
>
> produces Org code via the HTML and Latex export backends.  I think there
> are syntax highlighting export extensions in the wild (just search the web
> for something like 'org export syntax highlighting' to see a diverse
> collection of proposed solutions; Pygments appears to be a common theme,
> though I know nothing about it), but AFAIK they are not distributed with
> Org at this time.
>
> Does that at least address the first part of your inquiry?  Sorry I
> couldn't offer anything actionable for the second; maybe someone else can
> pick up where I left off.
>
> Phil
>
> - Original Message -
> From: "Fletcher Charest" 
> To: emacs-orgmode@gnu.org
> Sent: Friday, March 14, 2014 4:41:12 PM
> Subject: [O] Is there an environment for Org syntax?
>
> Dear all,
>
> I am currently writing a practical tutorial about Org for absolute
> beginners. In the end, I would like to export it in multiple formats, HTML
> for sure, but maybe LaTeX too (I am, of course, writing it with org-mode).
> I am not aware of a functionality, or hack, which would allow me to include
> Org syntax in the document, without it being taken into account by Org
> itself and the exporter as being part of the document structure. Instead,
> I'd like it to be exported as it appears in my Emacs Org file, including
> colors, etc. I hope I am explaining this clearly.
>
> Is it possible?
>
> Thank you very much for you help,
>
> FC
>
>


Re: [O] Is there an environment for Org syntax?

2014-03-14 Thread Phil Regier
I spent hours trying to figure out recursive org syntax, and only got it 
working with the help of the list.  :)

I realized after my last message that Worg uses some limited syntax 
highlighting on some of the newer pages; I'm not very good with javascript and 
css, but you might be able to borrow some code for highlighting by inspecting 
the org and html source...

Phil

- Original Message -
From: "Fletcher Charest" 
To: "Phil Regier" 
Cc: emacs-orgmode@gnu.org
Sent: Friday, March 14, 2014 5:59:03 PM
Subject: Re: [O] Is there an environment for Org syntax?

Yes, thank you very much, that was it. I was thinking about doing this, but
I didn't know how to "escape" the syntax. This is quite embarrassing since
I just noticed that it is explained in the manual, and even more, since the
comma is added automatically when you edit the org code by hitting C-c '
anyway...

Thanks again!

Best regards,

FC



Re: [O] Is there an environment for Org syntax?

2014-03-14 Thread Fletcher Charest
Thank you, this sounds interesting; I'm not very good either, but I will
have a look at this. And I actually have a related question (I hope it's
not in the manual this time): is it possible to indent the Org syntax in
the HTML export as it is indented in an Emacs buffer when
org-indent-modeis activated? The indentation in the HTML file looks
like the one you get
in Org by default, even if my org-indent-mode variable is set to t in my
Org buffer.

Thank you,

FC


On Sat, Mar 15, 2014 at 12:04 AM, Phil Regier  wrote:

> I spent hours trying to figure out recursive org syntax, and only got it
> working with the help of the list.  :)
>
> I realized after my last message that Worg uses some limited syntax
> highlighting on some of the newer pages; I'm not very good with javascript
> and css, but you might be able to borrow some code for highlighting by
> inspecting the org and html source...
>
> Phil
>
> - Original Message -
> From: "Fletcher Charest" 
> To: "Phil Regier" 
> Cc: emacs-orgmode@gnu.org
> Sent: Friday, March 14, 2014 5:59:03 PM
> Subject: Re: [O] Is there an environment for Org syntax?
>
> Yes, thank you very much, that was it. I was thinking about doing this, but
> I didn't know how to "escape" the syntax. This is quite embarrassing since
> I just noticed that it is explained in the manual, and even more, since the
> comma is added automatically when you edit the org code by hitting C-c '
> anyway...
>
> Thanks again!
>
> Best regards,
>
> FC
>


Re: [O] Is there an environment for Org syntax?

2014-03-14 Thread Phil Regier
I'm not sure whether I follow you here, because I'm accustomed to seeing 
indents passed through.  If I export the following:

#+begin_src org :exports code   
  
  ,#+begin_src org :exports code
  
  indented text 
  
  ,#+end_src
  
#+end_src   
  

...then my HTML export adds as many spaces as there are in the block edit 
buffer.  Is that not what you see, or are you looking for something more 
sophisticated?

Phil

- Original Message -
From: "Fletcher Charest" 
To: emacs-orgmode@gnu.org
Sent: Friday, March 14, 2014 6:21:35 PM
Subject: Re: [O] Is there an environment for Org syntax?

Thank you, this sounds interesting; I'm not very good either, but I will
have a look at this. And I actually have a related question (I hope it's
not in the manual this time): is it possible to indent the Org syntax in
the HTML export as it is indented in an Emacs buffer when
org-indent-modeis activated? The indentation in the HTML file looks
like the one you get
in Org by default, even if my org-indent-mode variable is set to t in my
Org buffer.

Thank you,

FC



Re: [O] MobileOrg

2014-03-14 Thread Aric Gregson
Hello,

I was wondering if it is possible to export only some of the org files
for mobileorg? Like have a list of included or excluded files?

Thanks, Aric

-- 
~O
/\_,
###-\  |_
(*) / (*)



Re: [O] MobileOrg

2014-03-14 Thread Sean Escriva
Aric Gregson  writes:

> Hello,
>
> I was wondering if it is possible to export only some of the org files
> for mobileorg? Like have a list of included or excluded files?
>

This definitely could be possible, bu default just the value for
org-agenda-files is used.

org-mobile.el which is responsible for the sync has a custom var defined
called 'org-mobile-files-exclude-regexp' which should exlude files that
match.

I haven't used it myself though.

-- 
-sean



Re: [O] MobileOrg

2014-03-14 Thread Aric Gregson
Sean Escriva  writes:

> org-mobile.el which is responsible for the sync has a custom var defined
> called 'org-mobile-files-exclude-regexp' which should exlude files that
> match.

Thanks very much. I'll give this a try again. Would be nice to have on
the phone once and a while. For computer syncing I find github to work
very well. 

Thanks, Aric



Re: [O] mark parent element?

2014-03-14 Thread Matt Price
On Fri, Mar 14, 2014 at 2:11 PM, Nicolas Goaziou  wrote:
> Hello,
>
> Matt Price  writes:
>
>> I'm trying to write a function that will mark the parent of the
>> current element.  I think I understand how to do it but for some
>> reason I can get the mark to persist after the funciton is called.  I
>> think it's really an elisp problem, not an org problem, but am hoping
>> someone can ehelp me.  Here's what I have:
>>
>> (defun er/mark-org-parent-element ()
>>   "Marks an org parent element"
>>   (interactive)
>>   (let ((parent (plist-get (car (cdr (org-element-at-point))) :parent)))
>
> It is better to use (org-element-property :parent (org-element-at-point))
>
>> (let ((parent-props (car (cdr parent
>
> You shouldn't extract properties this way. See below.
>
>>   ;; (print parent-props)
>>   ;; (print (plist-get parent-props :begin))
>>   ;; (print (plist-get parent-props :end))
>>   (if (plist-get parent-props :begin)
>>   (progn
>> (goto-char (plist-get parent-props :begin))
>
> It is better to use (org-element-property :begin parent)
>
>> (set-mark (point))
>> (goto-char (plist-get parent-props :end))
>
> It is better to use (org-element-property :end parent)
>
> Anyway, I suggest to use `org-up-element' and `org-mark-element'

I am a little stunned by how awesome this is. it was worth not
noticing org-up-element in the docs to learn the proper way to address
org-element properties.  Thank you Nicolas!  And everyone else too of
course.

Matt



> instead.
>
>
> Regards,
>
> --
> Nicolas Goaziou



Re: [O] Is there an environment for Org syntax?

2014-03-14 Thread Kyle Meyer
On 03/14/14 18:13, Phil Regier wrote:
[...]
> I think there are syntax highlighting export extensions in the wild
> (just search the web for something like 'org export syntax
> highlighting' to see a diverse collection of proposed solutions;
> Pygments appears to be a common theme, though I know nothing about
> it), but AFAIK they are not distributed with Org at this time.

Another option for syntax highlighting in HTML is htmlize. After
installing htmlize, =(require 'htmlize)= should be all that's needed.

--
Kyle Meyer



Re: [O] Clarification on ChangeLog documentation

2014-03-14 Thread Bastien
Hi John,

I tried to clarify the org-contribute.org again.

Let me know if this addresses the issues you were
reporting.

Thanks,

-- 
 Bastien



Re: [O] Bug: Problems with sub/super-script when using: org-cdlatex + org-pretty-entities + org-catch-invisible-edits

2014-03-14 Thread Bastien
Hi,

you want to set

(setq org-pretty-entities-include-sub-superscripts nil)

before using `org-cdlatex-mode'.

HTH,

-- 
 Bastien



Re: [O] Org not preserving Python indent levels on LaTex export due to tabs

2014-03-14 Thread Bastien
Hi,

Nicolas Goaziou  writes:

> Indeed. It doesn't appear in the manual.
>
> I don't use it. Maybe Someone using it can provide a patch for it.

I added one sentence about -i in the manual.

Thanks,

-- 
 Bastien