Re: [O] Is it possible to add a class to a paragraph in HTML export?

2014-04-17 Thread Bastien
Rick Frankel r...@rickster.com writes:

 A version of this patch using Nicolas' approach has been pushed to
 master.

Thanks!

-- 
 Bastien



Re: [O] Prepare release 8.2.6

2014-04-17 Thread Bastien
Hi Michael,

R. Michael Weylandt michael.weyla...@gmail.com writes:

 The attached should apply cleanly against master.

Applied, thanks,

-- 
 Bastien



Re: [O] [BUG] Cannot export a raw link

2014-04-17 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 I suggest the following for the 8.2.6 release:

   - revert the whole patches line

   - at the parser level

 - if scheme is not file or derived (e.g., file+sys or
   docview), assume PATH is a correct URI and do not change
   anything ;

 - otherwise, if PATH is absolute and do not start with two or more
   slashes, append // to it ;

   - at the back-ends level, simply add file: if PATH is absolute and
 use PATH otherwise.

 I think it is sufficient for 8.2.6.  We can still discuss if more
 parsing is needed for 8.3.

Indeed, please go ahead with this plan when you can.

Also, `org-open-at-point' needs to correctly deal with links
like mailto:j...@doe.com?subject=Test -- I think it used to
work but the subject is not parsed correctly here.

Thanks,

-- 
 Bastien



Re: [O] Export arrays for 'sh' code blocks when using bash

2014-04-17 Thread Bastien
Hi Eric,

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

 Also, if you can sign your patches (git format-patch -s) that'd
 be even better, but not mandatory.

 Should I start signing my patches as well?

Up to you, I don't want to enforce a policy here, I just think it's
good to have signed patch for people who don't contribute on behalf
of themselves but do so on behalf of a company they work for.

I'm myself only signing tags for new releases (have been since a
while at least.)

-- 
 Bastien



Re: [O] Fast Access to TODO States without C-t

2014-04-17 Thread Bastien
Oleh ohwoeo...@gmail.com writes:

 It's inspired by vi, so your task is handled by cwd (change word
 DONE).  Other stuff works as well, such as cw[tnc] for (change word
 [TODO NEXT CANCELLED]).

 Similarly:
 cp is change property,
 dp is delete property,
 p is move to property,
 ct is change tag,
 hjkl - navigate left/down/up/right
 d2j - delete two headings down
 d3k - delete three headings up
 yj - copy one heading down to kill ring
 3i - change view to summary level 3.
 wn - make jk move only by NEXT keywords.
 c - make hjkl behave like Meta+arrows
 cf - make hjkl behave like Shift+Meta+arrows
 cs - make hjkl behave line Shift+arrows
 q - return from the four modes above

Wow, this is kinda crazy, but good to know people are crazy about Org!

(Many vimers I know use neat tricks to display Org tables in vim
buffers...)

-- 
 Bastien



Re: [O] Limits on capture mode?

2014-04-17 Thread Bastien
Hi Mark,

Mark S. throa...@yahoo.com writes:

 The problem is that there seems to be some undocumented (?) upper
 limit to the number of characters that can be copied. It looks like it
 might be around a 1000. When I try to send more than that, the process
 doesn't seem to happen (there's no indication that anything is
 happening).

There is no limit on Org-mode side, so I guess it's a limit from the
browser protocol.  I'd search in this direction.

HTH,

-- 
 Bastien



Re: [O] org-todo-keywords-1 detection in asyn export

2014-04-17 Thread Bastien
zwz zhangwe...@gmail.com writes:

 How to locally set org-latex-pdf-process?

#+BIND: org-latex-pdf-process ...

should work.

-- 
 Bastien



Re: [O] Can ELPA package split contrib part?

2014-04-17 Thread Bastien
Hi Satoru,

Satoru KURASHIKI lur...@gmail.com writes:

 While I use org-plus-contrib package from orgmode ELPA,
 With other package which requires (updated) org, it isn't
 recognized as I expect.

You should really not have both installed, I'd recommend using
`org-plus-contrib' only.

If that's not feasible because of some compatibility constraint
you have, then use git or the .tar.gz/.zip archives, it's easy
enough.

HTH,

-- 
 Bastien



Re: [O] org-dblock-write:myownfunc does not split my window?

2014-04-17 Thread Bastien
Hi Martin,

Martin kleinerdra...@gmx.at writes:

 Using a minimal example:
 Creating an org file with somewhere:


 #+BEGIN: myownfunc
 #+END

 And using scratch (or this email) with

 (defun org-dblock-write:myownfunc (params)
   (interactive)
   (split-window nil -15)
   (insert window should be splitted))

 This just inserts the text window should be splitted but does not
 acutall split my window.

 What am I doing wrong?  And how can I make it right?

Fixed in maint, thanks,

-- 
 Bastien



Re: [O] Is the worg/code/org-info-js page broken?

2014-04-17 Thread Bastien
Hi Bill,

Bill Ashmanskas bill.ashmans...@gmail.com writes:

 It seems that the page

 http://orgmode.org/worg/code/org-info-js/

 doesn't display anything sensible.

Fixed, thanks,

-- 
 Bastien



Re: [O] (OT) How to follow a mailing list with very high activity (like this one here)?

2014-04-17 Thread Bastien
Hi Martin,

you can try Gnus, of course, but in case the beast cannot be tamed
easily, I suggest following the Org-mode list as a newsgroup.

Use any news reader out there, subscribe to gmane.emacs.orgmode
on gmane.org and let your client do the sorting/scoring for you.

2 cts of course,

-- 
 Bastien



Re: [O] noninteractive use of org-export

2014-04-17 Thread Bastien
Hi Julien,

Julien Cubizolles j.cubizol...@free.fr writes:

 How can I use org-beamer-export-to-pdf for example for an org file that
 the current buffer isn't visiting?

 My setup is the following : I have two org files cours-beamer.org and
 cours-notes.org each containing different +LATEX_CLASS and
 +LATEX_CLASS_OPTIONS choices and the same +#INCLUDE cours.org
 file. I'd like to be able to run the export to beamer-pdf for both
 cours-beamer.org and cours-notes.org from cours.org, or even from a bash
 script but the documentation for org-beamer-export-to-pdf doesn't show
 how.

You need to setup a publishing project to export several files at
once.

HTH,

-- 
 Bastien



Re: [O] Bug: C-C C-W (refile) makes copy when invoked in Agenda view

2014-04-17 Thread Bastien
Hi Subhasis,

Subhasis Ray ray.subha...@gmail.com writes:

 I encounter the issue as described here:
 http://lists.gnu.org/archive/html/emacs-orgmode/2013-09/msg01284.html

 More specifically, it copies the task in stead of moving it when I
 press C-c C-w while creating a task, but if I quit emacs and press
 C-c C-w on an existing entry in my agenda
 buffer, it moves, not copies.

I cannot reproduce this from the maint or the master branch.

Do you still have this problem?

If so, can you provide a minimal recipe so that we can reproduce it?

Looks pretty bad, let us know.

-- 
 Bastien



Re: [O] undocumented? struggled with category filter on daily/weekly agenda view custom command.

2014-04-17 Thread Bastien
Hi Brady,

Brady Trainor algeb...@uw.edu writes:

 Goal: To make an agenda view custom command that will filter a daily/weekly
 view by category.

Using

(org-agenda-category-filter-preset '(+mycategory))

within your custom agenda command should work.

There was a related bug, fixed now.  If you can test from
the maint branch, thanks in advance!

-- 
 Bastien



Re: [O] total time spent on a task

2014-04-17 Thread Bastien
Hi Christoph,

Christoph Groth christ...@grothesque.org writes:

 In fact, times were shown for the other headlines as well, but
 white-on-yellow!  I've modified the org-clock-overlay so the problem is
 now fixed for me.

 Is this a bug?  (It appears for me in bleeding edge orgmode.)  The
 original org-clock-overlay only specifies the background color as yellow.
 How to find out from which face the white foreground was inherited?  The
 command describe-face does not seem to help for this.

I can't reproduce the problem here, it probably depends on the Emacs
version you use.  Can you tell more about your setup?

-- 
 Bastien



[O] source block coloring inconsistency

2014-04-17 Thread Rustom Mody
Ive struggling with source code blocks for a few days.
After not managing inline source in some cases I tried to switch to
display blocks.  Here again after trying for a couple of days I
thought I was on an org bug.

Finally I find its not a bug. However the hinting given by the
coloring of code-blocks could perhaps be improved???

Heres the example file (heavily cut down)
---
#+TITLE: Unicode in Python
#+OPTIONS: toc:nil
* Introduction
Python has been making long strides in embracing unicode.
However it is arguably only half-way yet -- python programs can
/support/ unicode well however python program- /source/ is still
completely ASCII.

Well… Actually with python 3 (not 2) this is already possible
#+BEGIN_SRC python
 α, β, γ = 1,2,3
 (α, β, γ)
(1, 2, 3)
#+END_SRC
* Legend
** Math Space Advantage -- MSA

Below I will point such cases out with a 'MSA'. In some cases its
technically required to have spaces, in others its just more
aesthetic to have them.
#+BEGIN_SRC python
x in lst
#+END_SRC python
cannot be written as

#+BEGIN_SRC python
xinlst
#+END_SRC python
---

Some blocks export (to html) correct; some dont.
Finally traced it to the end line:
#+END_SRC python
which should be
#+END_SRC


However emacs shows the end line in red as though it recognized it.

Could the fontlock highlighter and the exporter be consistent with
respect to syntax?

IOW for a block ending as follows:
#+BEGIN_SRC python

If it is wrong it should not be colored as a block

If it is right then export should work on it as a block

Thanks
Rusi

org version: 8.2.5e
emacs version 24.3.1



Re: [O] Problem with org-clock-display

2014-04-17 Thread Bastien
Hi Noah,

Noah Slater nsla...@tumbolia.org writes:

 Note:

 - Times are indented like the nodes, meaning they don't line up. (I
 presume this is intentional, but I find it annoying. Is there a way
 to turn it off?)

Fixed.

 - Everything is highlighted with yellow. Is this intentional? Can I
 turn it off?

M-x customize-face RET org-clock-display RET

I changed from yellow to gray.

 - Why are some of the times blue and some white. Can I turn this off?

Because the face inherited from the headline face.
I changed it by specified a foreground.

 - Why are some of the ... bits visible (in blue) and invisible (in
 white for the subnodes) and can I turn these off, or hide them
 consistently?

 - Would there be any way to move the black ... bit meaning this
 node can be expanded to the very left, where it usually is, and then
 hide the rest?

The ... folding indicator is always on the right, not sure what you
mean. 

 - Why can't I edit node names when this is active?

Because the display is temporary and uses overlays.

-- 
 Bastien



Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Hi Noah,

Noah Slater nsla...@tumbolia.org writes:

 Is there any way to sort a collection of siblings by the total
 clocked time?

Now there is in master: C-c ^ k on a headline.

Thanks for this idea,

-- 
 Bastien



Re: [O] Org clock cookies

2014-04-17 Thread Bastien
Hi Noah,

Noah Slater nsla...@tumbolia.org writes:

 Would it be possible to code a similar cookie ([:] to be expanded
 into 01:10 for example) that you could update with C-c C-c, or
 better yet, automatically!

Would this [01:10] cookie mean that you spent one minute on ten
minutes of efforts?

The question is more to give you a chance to convince me,
because while I find the idea quite appealing, I think we're
growing a bit too fat cookie-wise.

-- 
 Bastien



Re: [O] Possible to always show items in clocktable?

2014-04-17 Thread Bastien
Hi Noah,

Noah Slater nsla...@tumbolia.org writes:

 My intention here is to highlight notes that have received no
 attention. I want them to show up on my report so that I can see that
 I need to work on them.*

You can create a dynamic block that does this:

- call org-clock-sum to reset clock sums in the buffer
- scans for :org-clock-minutes in all headlines
- create a table from headlines that have no such property

This way you can even add more information in the table.

Happy hacking :)

-- 
 Bastien



[O] babel and long-running computations

2014-04-17 Thread Christoph Groth
Dear all,

I’m considering the use of org-babel for “reproducible science”.  Is
anyone successfully using org-babel for research that involves
calculations that typically take a few minutes up to several hours on a
single CPU (i.e. up to a few minutes on a cluster)?  It seems to me that
currently org-babel is not well suited for such an usage profile, but
I’d love to be taught otherwise.

Many thanks,
Christoph




Re: [O] total time spent on a task

2014-04-17 Thread Christoph Groth

Hi Bastien,

Thank you for looking into this.

Bastien b...@gnu.org writes:


In fact, times were shown for the other headlines as well, but
white-on-yellow!  I've modified the org-clock-overlay so the 
problem

is now fixed for me.

Is this a bug?  (It appears for me in bleeding edge orgmode.) 
The
original org-clock-overlay only specifies the background color 
as
yellow.  How to find out from which face the white foreground 
was
inherited?  The command describe-face does not seem to help for 
this.


I can't reproduce the problem here, it probably depends on the 
Emacs

version you use.  Can you tell more about your setup?


I'm running Emacs 24.3.1 and org-mode 8.2.4, both from Debian 
testing.
By bisecting my Emacs configuration I've found out that the 
culprit is


(setq org-startup-indented t)

When indented mode is disabled, the overlays appear with brown 
text on

yellow background.  Can you reproduce this?

Christoph




Re: [O] (OT) How to follow a mailing list with very high activity (like this one here)?

2014-04-17 Thread Esben Stien
M elwood...@web.de writes:

 The interesting stuff should also be stored to be available later for
 reference...
 How do you handle that?

I subscribe to 396 mailinglist and my Mail/ directory is in the brazillions.

 Are there tools which make such a process easier?

org-mode;)

With C-c C-l you can make a reference to a thread and store it in the
proper location. F.ex if you find something nifty about foo, you can
store a link in 

* emacs
** gnus
*** activity
 foo
[Some link to someone with something cool about foo]

With this reference, you can jump immediately into the gnus thread with C-x C-o

..and also copy the relevant part of the thread over here and structure
it.

 Up to now I just used my old mail client Microsoft Entourage 2004 on OS X
 for storing those mails.

gnus;), ..viewed threaded.

With u, you can mark a thread, but I find that if I don't organize
immediately when I find an interesting thread, I probably never return
to it. 

With 'k' you can kill the whole thread and jump onto the next one, but I
also find I don't use this much, either. 

What I do, is just use RET 111 on a group to get all the latest mails in
a threaded view and see if there's anything interesting. 

Using topics, you can organize your groups into emacs, multimedia,
vector, operating-system, voip, accounting, etc.

I lack notifications, though. Would be really nice if there was some way
for gnus to notify me of threads where I'm involved got a new follow
up. 

Many times when I reply to things, I have to always check the group for
follow ups, which is wasting time, really. 

Also, many times people reply directly to me, instead of using follow up
to the group. That means their replies end up in inbox and you have to
manually move it over to the group.

These mails lack the List-Id header, which gnus uses for sorting and I
haven't figured out if there's a way to use any other reference haaders
that could be used. 

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



[O] Counting number of children under heading

2014-04-17 Thread Marvin Doyley
Hi there,

I would like to automatically count the number of children under a given 
heading. For example, I would like to have

* Cars (2)
** BMW
** Escort

 Putting  [/] at the end of header (in this case Cars), then putting the TODO 
keyword before each sub-header give me a partial solution

* Cars [/]
** TODO BMW
** TODO Escort


Is there way to do this without using the TODO keyword ?

Thanks,
M


Re: [O] Counting number of children under heading

2014-04-17 Thread Bastien
Hi Marvin,

Marvin Doyley marvin...@gmail.com writes:

 I would like to automatically count the number of children under a
 given heading. For example, I would like to have

 * Cars (2)
 ** BMW
 ** Escort

There is no such feature in Org, but I seem to remember someone
hack something similar -- maybe someone else with a better memory
can tell.

-- 
 Bastien



Re: [O] noninteractive use of org-export

2014-04-17 Thread Julien Cubizolles
Bastien b...@gnu.org writes:

 Hi Julien,

 Julien Cubizolles j.cubizol...@free.fr writes:

 How can I use org-beamer-export-to-pdf for example for an org file that
 the current buffer isn't visiting?

 My setup is the following : I have two org files cours-beamer.org and
 cours-notes.org each containing different +LATEX_CLASS and
 +LATEX_CLASS_OPTIONS choices and the same +#INCLUDE cours.org
 file. I'd like to be able to run the export to beamer-pdf for both
 cours-beamer.org and cours-notes.org from cours.org, or even from a bash
 script but the documentation for org-beamer-export-to-pdf doesn't show
 how.

 You need to setup a publishing project to export several files at
 once.


Thanks that seems to be exactly what I need. However, I'm not sure I'm
doing everything right:

Here is what I've tried so far

(setq org-publish-project-alist
  '((cours
 :base-directory ~/tmp/test_org
 :publishing-directory ~/tmp/test_org
 :publishing-function org-beamer-publish-to-pdf
 :include (1er-principe-beamer.org 1er-principe-notes.org

Something must be wrong with the :include syntax since every org file in
the base-directory is exported when I run C-c C-e P x.

Also, is it possible to specify export options like LATEX_CLASS_OPTIONS
from org-publish-project-alist ?

Julien.



Re: [O] total time spent on a task

2014-04-17 Thread Bastien
Hi Christoph,

Christoph Groth christ...@grothesque.org writes:

 (setq org-startup-indented t)

Good hint, this is now fixed, thanks!

-- 
 Bastien



Re: [O] Counting number of children under heading

2014-04-17 Thread Thorsten Jolitz
Bastien b...@gnu.org writes:

 Hi Marvin,

 Marvin Doyley marvin...@gmail.com writes:

 I would like to automatically count the number of children under a
 given heading. For example, I would like to have

 * Cars (2)
 ** BMW
 ** Escort

 There is no such feature in Org, but I seem to remember someone
 hack something similar -- maybe someone else with a better memory
 can tell.

Not the same thing (because its about weight (= number of hidden
lines) when folded, but somehow related:

Org Weights (by Francois Pinard):

,--
| https://github.com/pinard/org-weights
`--

Org Hidden Line Cookies (by me):

,
| https://github.com/tj64/org-hlc
`

-- 
cheers,
Thorsten




Re: [O] if we operate on a subtree, perhaps we could adjust levels

2014-04-17 Thread Samuel Wales
On 4/11/14, Bastien b...@gnu.org wrote:
 That's expected.  Users don't think Org is clever enough to
 decrypt-demote-subtrees-then-re-encrypt on the fly.

i was not suggesting this.



Re: [O] Export Org checkboxes in ox-html using UTF-8 symbols

2014-04-17 Thread Nicolas Goaziou
Hello,

Rick Frankel r...@rickster.com writes:

 The =li= elements for checklists now have the class `on', `off' or
 `trans' depending on the state of the checkbox.

It seems that this patch broke the test suite. Would you mind looking
into it?


Regards,

-- 
Nicolas Goaziou



Re: [O] noninteractive use of org-export

2014-04-17 Thread Bastien
Hi Julien,

Julien Cubizolles j.cubizol...@free.fr writes:

 Something must be wrong with the :include syntax since every org file in
 the base-directory is exported when I run C-c C-e P x.

Add :exclude .* on top of your include.

 Also, is it possible to specify export options like LATEX_CLASS_OPTIONS
 from org-publish-project-alist ?

Yes, use :latex-class-options in the publishing project.

-- 
 Bastien



Re: [O] babel and long-running computations

2014-04-17 Thread Julian Gehring
Hi Christoph,

Generally, org-babel is suited for long running computations.  Its
caching can help you avoid rerunning code chunks.  And long runtime does
not conflict with the idea of reproducible research, it just may be not
very comfortable for the user.

In my experience, one can avoid your problems best by structuring your
code and analysis in small, logical steps and save intermediate results,
such that you can restart in the middle of your analysis.  Otherwise,
all other frameworks for reproducible research I know have the same
limitations.

Best wishes
Julian


On 17/04/14 10:45, Christoph Groth wrote:
 Dear all,
 
 I’m considering the use of org-babel for “reproducible science”.  Is
 anyone successfully using org-babel for research that involves
 calculations that typically take a few minutes up to several hours on a
 single CPU (i.e. up to a few minutes on a cluster)?  It seems to me that
 currently org-babel is not well suited for such an usage profile, but
 I’d love to be taught otherwise.
 
 Many thanks,
 Christoph
 
 
 





Re: [O] How do I chain babel blocks with arguments?

2014-04-17 Thread Alan Schmitt
Hello Charles,

On 2014-04-16 22:49, Charles Berry ccbe...@ucsd.edu writes:

 I have several babel blocks that each work well, but I'm now trying to
 chain them to build some bigger functionality out of them. I'm having
 trouble finding out how to pass arguments between blocks. Here is
 a small example:
 
 --8---cut here---start-8---
 #+name: test1
 #+begin_src emacs-lisp :var x=foo
 x
 #+end_src
 
 #+name:test2
 #+begin_src emacs-lisp :var z=bar :var y=test1(x=z)
 y
 #+end_src
 
 #+call: test2(z=baz)
 --8---cut here---end---8---
 
 Unfortunately this does not work: the evaluation of block `test2' fails
 by telling me `z' does not exist.
 
 How can I execute block `test1' from block `test2' by passing an
 argument that is one from test2?

 This is not pretty, but it works:

 #+name:test2 
 #+begin_src emacs-lisp :var z=bar
   (let ((y (org-sbe test1 (x (intern z)
 y)
 #+end_src

Thank you for the suggestion, but it returns a symbol and not the
string. In the more complex setting I'm playing with I need a string
there.

By the way, this is something that I really don't understand about sbe:
what is allowed as functions inside it? If I do the simple

--8---cut here---start-8---
#+name:test2 
#+begin_src emacs-lisp :var z=bar
  (let ((y (org-sbe test1 (x z
y)
#+end_src
--8---cut here---end---8---

then it fails, telling me 'z' does not exist. But for some reason,
adding intern lets 'z' get the bar value and be converted to the bar
symbol.

Is there documentation about what is allowed in sbe? (I had another
similar problem recently, see
http://thread.gmane.org/gmane.emacs.orgmode/84522).

Thanks,

Alan



Re: [O] org beamer newb TOC problem

2014-04-17 Thread Bastien
Hi Neal,

Neal Becker ndbeck...@gmail.com writes:

 I'm just learning about org mode, although I've used both emacs and beamer 
 for 
 many years.

 In my first attempt, I get a frame 'Contents', which is blank.  I tried 
 various 
 options, but never get anything but a blank 'Contents'.

You need to tweak the #+OPTION line to include numerical headlines and
specify the correct H: parameter.

#+OPTIONS: h:2 toc:t num:t

would do.

See the attached example.



beamer_toc.org
Description: Lotus Organizer

-- 
 Bastien


Re: [O] if we operate on a subtree, perhaps we could adjust levels

2014-04-17 Thread Bastien
Samuel Wales samolog...@gmail.com writes:

 On 4/11/14, Bastien b...@gnu.org wrote:
 That's expected.  Users don't think Org is clever enough to
 decrypt-demote-subtrees-then-re-encrypt on the fly.

 i was not suggesting this.

Then I didn't understand what you suggested.  Can you restate
it again?  Thanks,

-- 
 Bastien



Re: [O] Org clock cookies

2014-04-17 Thread Noah Slater
I don't use estimates, so I hadn't thought about that.

[01:10] would mean I had spent 1hr 10m on this node, and all subnodes.
Similarly, [2d 01:10] would mean I had spent 2d, 1hr, and 10m on this
node, and all subnodes.

I've already started hacking on this, and can share the patch if it's
something you're interested in reviewing/integrating.


On 17 April 2014 10:35, Bastien b...@gnu.org wrote:

 Hi Noah,

 Noah Slater nsla...@tumbolia.org writes:

  Would it be possible to code a similar cookie ([:] to be expanded
  into 01:10 for example) that you could update with C-c C-c, or
  better yet, automatically!

 Would this [01:10] cookie mean that you spent one minute on ten
 minutes of efforts?

 The question is more to give you a chance to convince me,
 because while I find the idea quite appealing, I think we're
 growing a bit too fat cookie-wise.

 --
  Bastien



Re: [O] noninteractive use of org-export

2014-04-17 Thread Julien Cubizolles
Bastien b...@gnu.org writes:

 Hi Julien,

 Julien Cubizolles j.cubizol...@free.fr writes:

 Something must be wrong with the :include syntax since every org file in
 the base-directory is exported when I run C-c C-e P x.

 Add :exclude .* on top of your include.

 Also, is it possible to specify export options like LATEX_CLASS_OPTIONS
 from org-publish-project-alist ?

 Yes, use :latex-class-options in the publishing project.

Everything is working fine, thanks a lot. And it gave me another idea:
I'm actually exporting the same org file to pdf with different class
options (basically beamer and [handouts]beamer). It seems I could use
the :components property to export twice with different
:latex-class-options properties but I need to change name of the pdf
file produced so that cours.org produces cours-beamer.pdf and
cours-notes.pdf. Can this be achieved, maybe with :completion-function?

Julien.



Re: [O] How do I chain babel blocks with arguments?

2014-04-17 Thread Thorsten Jolitz
Alan Schmitt alan.schm...@polytechnique.org writes:

 #+name:test2 
 #+begin_src emacs-lisp :var z=bar
   (let ((y (org-sbe test1 (x (intern z)
 y)
 #+end_src

 Thank you for the suggestion, but it returns a symbol and not the
 string. In the more complex setting I'm playing with I need a string
 there.

w/o knowing what this thread is about (since I did not follow it) I
would say that all you need is

,
| (symbol-name y)
`

as last expression.

-- 
cheers,
Thorsten




Re: [O] Org clock cookies

2014-04-17 Thread Noah Slater
I should add: I'm doing this because I don't like the org-clock-display.

I have detailed this in another post, but in summary:

- It doesn't work very well with indent turned on (I have a sort of patch
for this)
- Alignment of the the numbers seems wrong
- It messes up the ... when you fold a node
- Headlines are not editable

(I customised the font face after sending my previous email on this topic.)

Even if we manage to fix org-clock-display (and I am willing to help) I
think cookies feel very natural here also.

Not sure what to do about estimates.


On 17 April 2014 12:17, Noah Slater nsla...@tumbolia.org wrote:

 I don't use estimates, so I hadn't thought about that.

 [01:10] would mean I had spent 1hr 10m on this node, and all subnodes.
 Similarly, [2d 01:10] would mean I had spent 2d, 1hr, and 10m on this
 node, and all subnodes.

 I've already started hacking on this, and can share the patch if it's
 something you're interested in reviewing/integrating.


 On 17 April 2014 10:35, Bastien b...@gnu.org wrote:

 Hi Noah,

 Noah Slater nsla...@tumbolia.org writes:

  Would it be possible to code a similar cookie ([:] to be expanded
  into 01:10 for example) that you could update with C-c C-c, or
  better yet, automatically!

 Would this [01:10] cookie mean that you spent one minute on ten
 minutes of efforts?

 The question is more to give you a chance to convince me,
 because while I find the idea quite appealing, I think we're
 growing a bit too fat cookie-wise.

 --
  Bastien





Re: [O] bash alias and history in code block (again)

2014-04-17 Thread Bastien
OSiUX xu...@osiux.com.ar writes:

 #+BEGIN_SRC sh :cmdline -i :session :results output

From a quick look, this should rather be:

#+BEGIN_SRC sh :cmdline -i :session session_name :results output

Can you test this?

-- 
 Bastien



Re: [O] Org clock cookies

2014-04-17 Thread Bastien
Hi Noah,

Noah Slater nsla...@tumbolia.org writes:

 I have detailed this in another post, but in summary:

 - It doesn't work very well with indent turned on (I have a sort of
 patch for this)

This has been fixed.

 - Alignment of the the numbers seems wrong

Fixed too.

 - It messes up the ... when you fold a node

Not sure what it means.

 - Headlines are not editable

On purpose.

 Even if we manage to fix org-clock-display (and I am willing to help)
 I think cookies feel very natural here also.

See my other answer for this.

-- 
 Bastien



Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
I guess not. How does one do that?


On 17 April 2014 12:55, Bastien b...@gnu.org wrote:

 Noah Slater nsla...@tumbolia.org writes:

  Oh, funny. I had already patched this locally. I picked e for tim
  [e].
 
  Using your version, I get an error:
 
  sort: Wrong type argument: number-or-marker-p, (10426 . 10437)

 I don't have this error.  Did you reload Org correctly?

 --
  Bastien



Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Also, something I was hoping to look at was that when I sort, it expand all
the nodes, including all of the :LOGBOOK: draws.

I find this very inconvenient, and probably will not use this feature
unless I can get it sorted.

It appears that the code is expanding the nodes and the draws to read the
clock times. But I'm wondering if this is possible without expanding
everything, or if it is possible to restore the state after the
calculations are done.

Is this an easy change? Would you be interested in a patch?


On 17 April 2014 12:39, Noah Slater nsla...@tumbolia.org wrote:

 Oh, funny. I had already patched this locally. I picked e for tim[e].

 Using your version, I get an error:

 sort: Wrong type argument: number-or-marker-p, (10426 . 10437)

 Any clue?

 I tried to recompile everything under my .emacs.d (including org-mode),
 but I still get the error.


 On 17 April 2014 10:33, Bastien b...@gnu.org wrote:

 Hi Noah,

 Noah Slater nsla...@tumbolia.org writes:

  Is there any way to sort a collection of siblings by the total
  clocked time?

 Now there is in master: C-c ^ k on a headline.

 Thanks for this idea,

 --
  Bastien





Re: [O] noninteractive use of org-export

2014-04-17 Thread Bastien
Julien Cubizolles j.cubizol...@free.fr writes:

 Can this be achieved, maybe with :completion-function?

Maybe, but I never tried.  Let us know if you can get it work!

-- 
 Bastien



Re: [O] Spacing after sorting a heading

2014-04-17 Thread Bastien
Hi Kyle,

Kyle Meyer k...@kyleam.com writes:

 Does anyone have suggestions for maintaining a space before headings
 after sorting?

I fixed this in maint, let me know if this works for you.

Thanks,

-- 
 Bastien



Re: [O] How to make sparse tree sparser and/or reveal less context?

2014-04-17 Thread Bastien
Hi Mark,

Mark S. throa...@yahoo.com writes:

 After you have a sparse tree, is there a way to hide away headlines
 and entries that you don't actually want to be part of your final
 export?

I'd start trying (setq org-show-hierarchy-above nil)

 There's a command to reveal context ... but is there a command that
 will help you hide away context?

If you end up with hiding too much, I'd recommend using an agenda view
instead of a sparse tree, then writing this agenda view to an .org
file (C-c C-w myorgfile.org RET from the agenda), then exporting this
newly created Org file.

-- 
 Bastien



Re: [O] Counting number of children under heading

2014-04-17 Thread Eric Abrahamsen
Marvin Doyley marvin...@gmail.com writes:

 Hi there,

 I would like to automatically count the number of children under a given 
 heading. For example, I would like to have

 * Cars (2)
 ** BMW
 ** Escort

  Putting  [/] at the end of header (in this case Cars), then putting the TODO 
 keyword before each sub-header give me a partial solution

 * Cars [/]
 ** TODO BMW
 ** TODO Escort


 Is there way to do this without using the TODO keyword ?

 Thanks,
 M

I could have sworn someone posted a thing for this just a week or two
ago, using `org-map-entries' and the identity function, and counting the
results. Anyway look at the docstring for `org-map-entries', it takes a
SCOPE argument you can set to 'tree to just map the headings under the
current one. A stupid example might look like:

(apply '+ (org-map-entries (lambda () 1) t 'tree))

Though that will count the top-level heading, as well.

E




Re: [O] babel and long-running computations

2014-04-17 Thread Christoph Groth
Hi Julian,

 Generally, org-babel is suited for long running computations.  Its
 caching can help you avoid rerunning code chunks.  And long runtime does
 not conflict with the idea of reproducible research, it just may be not
 very comfortable for the user.

I agree of course that it’s generally a good idea to structure the
analysis in small logical steps and to save intermediate results.  Let
me narrow down my question then: does org-babel support working with
tasks that take several minutes to execute?  By this I mean (most
important first):

- Not freezing the editor during the execution of a task
- Being able to execute multiple independent tasks in parallel
- Being able to interrupt a running task
- Being able to inspect the incomplete output of a running task

I’d love to hear about any frameworks or workflows that fulfill these
requirements.

Cheers

Christoph


PS.

I’m using ipython notebooks but I’m not happy with them because of the
freezing problem and the complete lack of isolation of tasks within a
single notebook (they live in a common mutable namespace).  I think a
useful framework must be “functional” at the highest level for caching
and dependencies to be useful.




Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes:

 Oh, funny. I had already patched this locally. I picked e for tim
 [e].

 Using your version, I get an error:

 sort: Wrong type argument: number-or-marker-p, (10426 . 10437)

I don't have this error.  Did you reload Org correctly?

-- 
 Bastien



Re: [O] Problem with org-clock-display

2014-04-17 Thread Noah Slater
Thanks for this!

I've seen your comments on the time cookie thread. But I will pull the
org-clock-display comments here.

So, I have your changes locally, and I have a few comments.

A folded node looks like this:

* Node 02:10 ...

I was wondering if the  bit can
be hidden. Is there a font face to customise for this? I find it
distracting, especially with a big list of folded nodes.

The only problem then is: how do I match the times up with the nodes. I
guess this is the problem I was trying to solve with the clock cookies.

One option would be to highlight the time with a new face when the point is
on a node. Not sure about this though.

If the above is possible, then would it be possible to move that ...
(after the clock total) to the left-hand side, so that it looks like this:

* Node...  02:10

i.e. What it normally looks like. Only with a 02:10 on the right hand
side.

The only other thing I'd want to change is the alignment of the times.

So right now, we have:

2d 18:10
7:30
11:32

(For instance.)

It would be great if these could be aligned so that:

- The : ran down the middle (single column)
- The hours were zero padded, so it was 07 and not 7
- There was some padding for days

i.e. If there are no days, you add the space necessary so that the clock
time aligns with other nodes that have days.

Not sure how to calculate this. Perhaps it's possible to calculate the max
clock value before display, and pad everything to the width of that.

One radical alternative to all of the above:

Remove the ... stuff. Don't align the times. Just stick
them right after the node text, like a cookie.

As I say: I am more than happy to actually work on the patches necessary to
make these changes


On 17 April 2014 10:22, Bastien b...@gnu.org wrote:

 Hi Noah,

 Noah Slater nsla...@tumbolia.org writes:

  Note:
 
  - Times are indented like the nodes, meaning they don't line up. (I
  presume this is intentional, but I find it annoying. Is there a way
  to turn it off?)

 Fixed.

  - Everything is highlighted with yellow. Is this intentional? Can I
  turn it off?

 M-x customize-face RET org-clock-display RET

 I changed from yellow to gray.

  - Why are some of the times blue and some white. Can I turn this off?

 Because the face inherited from the headline face.
 I changed it by specified a foreground.

  - Why are some of the ... bits visible (in blue) and invisible (in
  white for the subnodes) and can I turn these off, or hide them
  consistently?
 
  - Would there be any way to move the black ... bit meaning this
  node can be expanded to the very left, where it usually is, and then
  hide the rest?

 The ... folding indicator is always on the right, not sure what you
 mean.

  - Why can't I edit node names when this is active?

 Because the display is temporary and uses overlays.

 --
  Bastien



Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes:

 I guess not. How does one do that?

M-x org-reload RET

-- 
 Bastien



Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes:

 Also, something I was hoping to look at was that when I sort, it
 expand all the nodes, including all of the :LOGBOOK: draws.

(add-hook 'org-after-sorting-entries-or-items-hook
  (lambda() (org-cycle-hide-drawers 'children)))

should od.

-- 
 Bastien



Re: [O] [BUG] Cannot export a raw link

2014-04-17 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 Indeed, please go ahead with this plan when you can.

Done.

 Also, `org-open-at-point' needs to correctly deal with links
 like mailto:j...@doe.com?subject=Test -- I think it used to
 work but the subject is not parsed correctly here.

I don't think it ever worked. According to `org-link-mailto-program',
Org provides its own syntax, which is

  mailto:j...@doe.com::Test

Unfortunately, this is also buggy at the moment. But, before fixing it,
I think we should decide which syntax we are going to support
(supporting both is sub-optimal, IMO).

FWIW, I vote for regular URI mailto:j...@doe.com?subject=Test. That
implies to get rid of `org-link-mailto-program' and delegate the parsing
job to `browse-url', which can be configured, in this case, through
`browse-url-mailto-function'.


Regards,

-- 
Nicolas Goaziou



Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
I'm still getting this error! :/

Happy to provide any sort of debug/version/setup info you need.

I'm on IRC as nslater in #org-mode, if that is more convenient for you.

Thank you so much for the help!


On 17 April 2014 13:00, Bastien b...@gnu.org wrote:

 Noah Slater nsla...@tumbolia.org writes:

  I guess not. How does one do that?

 M-x org-reload RET

 --
  Bastien



Re: [O] Problem with org-clock-display

2014-04-17 Thread Bastien
Hi,

Noah Slater nsla...@tumbolia.org writes:

 I was wondering if the  bit
 can be hidden. Is there a font face to customise for this? I find it
 distracting, especially with a big list of folded nodes.

Check latest master: I removed the dots.

 The only problem then is: how do I match the times up with the nodes.
 I guess this is the problem I was trying to solve with the clock
 cookies.

 One option would be to highlight the time with a new face when the
 point is on a node. Not sure about this though.

 If the above is possible, then would it be possible to move that
 ... (after the clock total) to the left-hand side, so that it looks
 like this:

 * Node...                                      02:10

This cannot be easily achieved, if at all. 

 The only other thing I'd want to change is the alignment of the
 times.

 So right now, we have:

 2d 18:10
 7:30
 11:32

From master, this should be aligned correctly now.

 (For instance.)

 It would be great if these could be aligned so that:

 - The : ran down the middle (single column)
 - The hours were zero padded, so it was 07 and not 7

Well, not possible.

 - There was some padding for days

 i.e. If there are no days, you add the space necessary so that the
 clock time aligns with other nodes that have days.

Done.

 As I say: I am more than happy to actually work on the patches
 necessary to make these changes

Yep -- please submit a patch for other changes you would like to
make.  Read http://orgmode.org/worg/org-contribute.html twice to
format the patches correctly :)

-- 
 Bastien



Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes:

 I'm still getting this error! :/

Should be fixed in master.

Otherwise use (setq debug-on-error t) and send the backtrace.
Better to debug from an uncompiled version if that's possible.

 Happy to provide any sort of debug/version/setup info you need.

 I'm on IRC as nslater in #org-mode, if that is more convenient for
 you.

I'm never on IRC :)

 Thank you so much for the help!

You're welcome,

-- 
 Bastien



Re: [O] org-todo-keywords-1 detection in asyn export

2014-04-17 Thread zwz
Bastien b...@gnu.org writes:

 zwz zhangwe...@gmail.com writes:

 How to locally set org-latex-pdf-process?

 #+BIND: org-latex-pdf-process ...

 should work.

Thank you, Bastien.

Sometimes my org-latex-pdf-process is quite complicated, as I will
set or add-to-list some extra process, for example: 

if XeTeX is a member of org-todo-keywords-1, I would set the local
org-latex-pdf-process to use xelatex instead of pdflatex;

if handout is a member of org-todo-keywords-1, I would add-to-list
some preprocessing steps and even pdfnup into org-latex-pdf-process to
generate a ready-for-print version at the same time;

...

So here what I mean by locally is to adjust the org-latex-pdf-process
by some keywords, instead of binding it with some specific code/value
(which is difficult for modification)

However I found it does not work in asyn export.




Re: [O] [BUG] Cannot export a raw link

2014-04-17 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 Indeed, please go ahead with this plan when you can.

 Done.

Thanks,

 FWIW, I vote for regular URI mailto:j...@doe.com?subject=Test.

Yep, 100% agreed.

-- 
 Bastien



Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Okay, that seem to work.

But I'm not able to get this work:

(add-hook 'org-after-sorting-entries-or-items-hook
  (lambda() (org-cycle-hide-drawers 'children)))

After running the sort, all the LOGBOOK draws are still open.

I'm also thinking: even if this closes the logbook draws, all the nodes
will be unfolded. But my node tree is quite large. Is it be possible to
refold all the nodes after n-levels?

So let's say I have:

* Level 1
** Level 2
*** Level 3

If I move the point to Level 1 and sort, I'd like it fold all Level 2
items, but leave Level 1 unfolded.


On 17 April 2014 13:20, Bastien b...@altern.org wrote:

 Noah Slater nsla...@tumbolia.org writes:

  I'm still getting this error! :/

 Should be fixed in master.

 Otherwise use (setq debug-on-error t) and send the backtrace.
 Better to debug from an uncompiled version if that's possible.

  Happy to provide any sort of debug/version/setup info you need.
 
  I'm on IRC as nslater in #org-mode, if that is more convenient for
  you.

 I'm never on IRC :)

  Thank you so much for the help!

 You're welcome,

 --
  Bastien



Re: [O] Problem with org-clock-display

2014-04-17 Thread Noah Slater
Huh, this is *very* cool. Thank you.

Now I need to solve the problem of being able to tie the node to the
clock-display. (If there's a big list, then it's hard to visually match
them.)

I think I recall a minor mode that highlighted the current line your point
is on. That would fix it. But then, it would be nice if that worked with my
mouse too.

Any ideas?

I think unless there's an obvious way to solve this, that it might actually
make sense to have the ... bit visible by default, and provide an
option to turn it off for people who don't mind the way it looks.

Thoughts?


On 17 April 2014 13:12, Bastien b...@gnu.org wrote:

 Hi,

 Noah Slater nsla...@tumbolia.org writes:

  I was wondering if the  bit
  can be hidden. Is there a font face to customise for this? I find it
  distracting, especially with a big list of folded nodes.

 Check latest master: I removed the dots.

  The only problem then is: how do I match the times up with the nodes.
  I guess this is the problem I was trying to solve with the clock
  cookies.
 
  One option would be to highlight the time with a new face when the
  point is on a node. Not sure about this though.
 
  If the above is possible, then would it be possible to move that
  ... (after the clock total) to the left-hand side, so that it looks
  like this:
 
  * Node...  02:10

 This cannot be easily achieved, if at all.

  The only other thing I'd want to change is the alignment of the
  times.
 
  So right now, we have:
 
  2d 18:10
  7:30
  11:32

 From master, this should be aligned correctly now.

  (For instance.)
 
  It would be great if these could be aligned so that:
 
  - The : ran down the middle (single column)
  - The hours were zero padded, so it was 07 and not 7

 Well, not possible.

  - There was some padding for days
 
  i.e. If there are no days, you add the space necessary so that the
  clock time aligns with other nodes that have days.

 Done.

  As I say: I am more than happy to actually work on the patches
  necessary to make these changes

 Yep -- please submit a patch for other changes you would like to
 make.  Read http://orgmode.org/worg/org-contribute.html twice to
 format the patches correctly :)

 --
  Bastien



Re: [O] How do I chain babel blocks with arguments?

2014-04-17 Thread Alan Schmitt
On 2014-04-17 12:24, Thorsten Jolitz tjol...@gmail.com writes:

 Alan Schmitt alan.schm...@polytechnique.org writes:

 #+name:test2 
 #+begin_src emacs-lisp :var z=bar
   (let ((y (org-sbe test1 (x (intern z)
 y)
 #+end_src

 Thank you for the suggestion, but it returns a symbol and not the
 string. In the more complex setting I'm playing with I need a string
 there.

 w/o knowing what this thread is about (since I did not follow it) I
 would say that all you need is

 ,
 | (symbol-name y)
 `

 as last expression.

Thanks, this helped me much!

So the solution is to use eval, which seems to be interpreted by
org-sbe:

--8---cut here---start-8---
#+name: test1
#+begin_src emacs-lisp :var x=foo
x
#+end_src

#+name: test2
#+begin_src emacs-lisp :var z=bar
  (let ((y (org-sbe test1 (x (eval z)
y)
#+end_src

#+results: test2
: bar

#+call: test2(z=baz)

#+results:
: baz
--8---cut here---end---8---

I still would really like what can (and cannot) be done with sbe, but
this should be enough to let me make progress.

Thanks again,

Alan



Re: [O] The Org Package

2014-04-17 Thread Bastien
Hi all,

Achim Gratz strom...@nexgo.de writes:

 David Masterson writes:
 What does this mean?

 What I said: don't load any part of Org until you have installed the
 ELPA package.  This usually means not to run any startup scripts.

I've know made this clearer in the manual.

Nicolas Richard theonewiththeevill...@yahoo.fr writes:

 The pitfall here is that you _must_ do the first install of the Org
 package from an Emacs that didn't load any part of the built-in Org.

 That's an interesting piece of information. I can't find it in (info
 (org) Installation).

Now it is!

Thanks,

-- 
 Bastien



Re: [O] Org clock cookies

2014-04-17 Thread Bastien
Hi Noah,

Noah Slater nsla...@tumbolia.org writes:

 [01:10] would mean I had spent 1hr 10m on this node, and all
 subnodes. Similarly, [2d 01:10] would mean I had spent 2d, 1hr, and
 10m on this node, and all subnodes.

We can make `org-clock-display' display effort too.

Since `org-clock-display' has been fixed, can you first check
if the current behavior better fits your needs?

 I've already started hacking on this, and can share the patch if it's
 something you're interested in reviewing/integrating.

I'm reluctant adding more cookies because they add temporary
content to the headline.

-- 
 Bastien



Re: [O] Problem with org-clock-display

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes:

 Now I need to solve the problem of being able to tie the node to the
 clock-display. (If there's a big list, then it's hard to visually
 match them.)

I'm not really sure what you mean by tie the node to the clock-display.

 I think I recall a minor mode that highlighted the current line your
 point is on.

M-x hl-line-mode RET

 That would fix it. But then, it would be nice if that
 worked with my mouse too.

 Any ideas?

 I think unless there's an obvious way to solve this, that it might
 actually make sense to have the ... bit visible by default, and
 provide an option to turn it off for people who don't mind the way it
 looks.

 Thoughts?

The dots have been removed, so really not sure what we are talking
about :)  But if you want to make the folding three dots ... be
displayed differently, that's hard -- and I don't think it's worth
the time.

-- 
 Bastien



Re: [O] Problem with org-clock-display

2014-04-17 Thread Noah Slater
Ah, sorry.

So what I mean is, if you have a long list of lines like this:

* A5:10 ...
* B8:40 ...
* C2:50 ...

Then it is a bit tricky to see what time is clocked for, say, B.

It is easy above because there are only three nodes. But if you have 20
nodes, it gets tricky.

So my thinking was that previously the  bits helped
to guide your eye across. But I am not so sure, you know. Because if you
have 20 of those in a row, it's not really helping much.

* A ... 5:10 ...
* B ... 8:40 ...
* C ... 2:50 ...

Again, this is easy when you just have three. But you have 20 in a row,
it's hard to follow.

So my idea was to use something like ln-line (thanks!) to show you where
you are. Then I can just navigate around the nodes, and it is obvious what
time matches up to what node.

Bit I'm wondering if you have any better ideas.

Or, given the readability problems, it makes sense to display the
... bits by default. (Though I am not sure that they are
actually much more readable.)

This is one of the reasons I suggested an alternative approach: do not
align the times to the right at all, just stick them right next to the node
titles, like so:

* Apple 5:10 ...
* Bananas 8:40 ...
* Carrots 2:50 ...

As you can see, the times wont line up then, but matching them to the node
titles is easy.


On 17 April 2014 13:43, Bastien b...@gnu.org wrote:

 Noah Slater nsla...@tumbolia.org writes:

  Now I need to solve the problem of being able to tie the node to the
  clock-display. (If there's a big list, then it's hard to visually
  match them.)

 I'm not really sure what you mean by tie the node to the clock-display.

  I think I recall a minor mode that highlighted the current line your
  point is on.

 M-x hl-line-mode RET

  That would fix it. But then, it would be nice if that
  worked with my mouse too.
 
  Any ideas?
 
  I think unless there's an obvious way to solve this, that it might
  actually make sense to have the ... bit visible by default, and
  provide an option to turn it off for people who don't mind the way it
  looks.
 
  Thoughts?

 The dots have been removed, so really not sure what we are talking
 about :)  But if you want to make the folding three dots ... be
 displayed differently, that's hard -- and I don't think it's worth
 the time.

 --
  Bastien



Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes:

 Okay, that seem to work.

 But I'm not able to get this work:

 (add-hook 'org-after-sorting-entries-or-items-hook
   (lambda() (org-cycle-hide-drawers 'children)))

 After running the sort, all the LOGBOOK draws are still open.

Try this:

(defun my-hide-all-drawers-in-current-subtree ()
  Hide all drawers in the current subtree.
  (save-restriction
(org-narrow-to-subtree)
(org-cycle-hide-drawers 'all)
(org-cycle-internal-local)))

(add-hook 'org-after-sorting-entries-or-items-hook
  'my-hide-all-drawers-in-current-subtree)

 I'm also thinking: even if this closes the logbook draws, all the
 nodes will be unfolded. But my node tree is quite large. Is it be
 possible to refold all the nodes after n-levels?

 So let's say I have:

 * Level 1
 ** Level 2
 *** Level 3

 If I move the point to Level 1 and sort, I'd like it fold all Level 2
 items, but leave Level 1 unfolded.

You can fix the cycling through the hook above.

HTH,

-- 
 Bastien



Re: [O] Counting number of children under heading

2014-04-17 Thread Thorsten Jolitz
Eric Abrahamsen e...@ericabrahamsen.net writes:

 I could have sworn someone posted a thing for this just a week or two
 ago, using `org-map-entries' and the identity function, and counting the
 results. 

Ups, that was me  ... forgot about it ;)

#+begin_quote
From: Martin Gross m-gr...@gmx.net
Subject: Re: Get counting of items
Newsgroups: gmane.emacs.orgmode
To: emacs-orgmode@gnu.org emacs-orgmode@gnu.org
Date: Thu, 3 Apr 2014 10:39:18 +0200 (2 weeks, 3 hours, 19 minutes ago)

Dear Thorsten

 Here is a generalised form:

 #+begin_src emacs-lisp
   (defun count-org-items (optional level operator match scope skip)
 Print a counting of outline items.
 (interactive)
 (let ((headline-level (or level 1)) ; 1-8
   (op (or operator '=))) ; '= '= ' '
 (save-excursion
   (message Counting of level%s%d outline items (match=%s, scope=%s, 
 skip=%s): %d
op headline-level match scope skip
(eval (append (list '+)
  (org-map-entries
   `(lambda () (if (,op (org-outline-level) 
 ,headline-level) 1 0))
   match scope skip)))
 #+end_src

 usage:

 ,
 | (count-org-items 2 '= WAITING 'file)
 `

 result:

 ,--
 | Counting of level=2 outline items (match=WAITING, scope=file,
 | skip=nil): 3
 `--

 see C-h f org-map-entries for more info, its very powerfull. Use it
 with M-: (count-org-items ...) or write a more sophisticated
 (interactive) spec.
#+end_quote

-- 
cheers,
Thorsten




Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Okay, wow. Thanks for writing that. Do you have a Gittip or something? I
would love to support your OSS work in some way or otherwise show my
gratitude beyond words in an email!

Anyway. I tried your function and it works. But afterwards, the node is
completely folded. So I added (org-cycle) to the sequence of functions
inside save-restriction. That seems to work, but I'm no elisp/Org pro. Is
this how you would have done it?


On 17 April 2014 13:55, Bastien b...@gnu.org wrote:

 Noah Slater nsla...@tumbolia.org writes:

  Okay, that seem to work.
 
  But I'm not able to get this work:
 
  (add-hook 'org-after-sorting-entries-or-items-hook
(lambda() (org-cycle-hide-drawers 'children)))
 
  After running the sort, all the LOGBOOK draws are still open.

 Try this:

 (defun my-hide-all-drawers-in-current-subtree ()
   Hide all drawers in the current subtree.
   (save-restriction
 (org-narrow-to-subtree)
 (org-cycle-hide-drawers 'all)
 (org-cycle-internal-local)))

 (add-hook 'org-after-sorting-entries-or-items-hook
   'my-hide-all-drawers-in-current-subtree)

  I'm also thinking: even if this closes the logbook draws, all the
  nodes will be unfolded. But my node tree is quite large. Is it be
  possible to refold all the nodes after n-levels?
 
  So let's say I have:
 
  * Level 1
  ** Level 2
  *** Level 3
 
  If I move the point to Level 1 and sort, I'd like it fold all Level 2
  items, but leave Level 1 unfolded.

 You can fix the cycling through the hook above.

 HTH,

 --
  Bastien



Re: [O] babel and long-running computations

2014-04-17 Thread Thorsten Jolitz
Christoph Groth christ...@grothesque.org writes:

 I’d love to hear about any frameworks or workflows that fulfill these
 requirements.

here is a link about that topic:

,---
| http://draketo.de/english/emacs/parallel-babel
`---

-- 
cheers,
Thorsten




Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Oh, funny. I had already patched this locally. I picked e for tim[e].

Using your version, I get an error:

sort: Wrong type argument: number-or-marker-p, (10426 . 10437)

Any clue?

I tried to recompile everything under my .emacs.d (including org-mode), but
I still get the error.


On 17 April 2014 10:33, Bastien b...@gnu.org wrote:

 Hi Noah,

 Noah Slater nsla...@tumbolia.org writes:

  Is there any way to sort a collection of siblings by the total
  clocked time?

 Now there is in master: C-c ^ k on a headline.

 Thanks for this idea,

 --
  Bastien



Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Actually. What I want, I think, is a function that sorts the whole buffer
and then collapses all nodes.

I think your my-hide-all-drawers-in-current-subtree thing will take care of
collapsing all nodes. But I'm now on StackOverflow trying to work out how
to sort the whole buffer.


On 17 April 2014 14:02, Noah Slater nsla...@tumbolia.org wrote:

 Okay, wow. Thanks for writing that. Do you have a Gittip or something? I
 would love to support your OSS work in some way or otherwise show my
 gratitude beyond words in an email!

 Anyway. I tried your function and it works. But afterwards, the node is
 completely folded. So I added (org-cycle) to the sequence of functions
 inside save-restriction. That seems to work, but I'm no elisp/Org pro. Is
 this how you would have done it?


 On 17 April 2014 13:55, Bastien b...@gnu.org wrote:

 Noah Slater nsla...@tumbolia.org writes:

  Okay, that seem to work.
 
  But I'm not able to get this work:
 
  (add-hook 'org-after-sorting-entries-or-items-hook
(lambda() (org-cycle-hide-drawers 'children)))
 
  After running the sort, all the LOGBOOK draws are still open.

 Try this:

 (defun my-hide-all-drawers-in-current-subtree ()
   Hide all drawers in the current subtree.
   (save-restriction
 (org-narrow-to-subtree)
 (org-cycle-hide-drawers 'all)
 (org-cycle-internal-local)))

 (add-hook 'org-after-sorting-entries-or-items-hook
   'my-hide-all-drawers-in-current-subtree)

  I'm also thinking: even if this closes the logbook draws, all the
  nodes will be unfolded. But my node tree is quite large. Is it be
  possible to refold all the nodes after n-levels?
 
  So let's say I have:
 
  * Level 1
  ** Level 2
  *** Level 3
 
  If I move the point to Level 1 and sort, I'd like it fold all Level 2
  items, but leave Level 1 unfolded.

 You can fix the cycling through the hook above.

 HTH,

 --
  Bastien





Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes:

 I think your my-hide-all-drawers-in-current-subtree thing will take
 care of collapsing all nodes. But I'm now on StackOverflow trying to
 work out how to sort the whole buffer.

C-x h C-c ^ should do.

-- 
 Bastien



Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes:

 Okay, wow. Thanks for writing that. Do you have a Gittip or
 something? I would love to support your OSS work in some way or
 otherwise show my gratitude beyond words in an email!

You can use my paypal account: bastien.gue...@free.fr

Thanks!

 Anyway. I tried your function and it works. But afterwards, the node
 is completely folded. So I added (org-cycle) to the sequence of
 functions inside save-restriction. That seems to work, but I'm no
 elisp/Org pro. Is this how you would have done it?

Well, quite long explanations would follow... I'll let you discover by
reading the code and by trial-and-error for now, need to run!

-- 
 Bastien



Re: [O] Problem with org-clock-display

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes:

 As you can see, the times wont line up then, but matching them to the
 node titles is easy.

Mhhh... I see.

Maybe we can use the background color for the whole headline?

But for now I'd like to let the dust settle on the current
implementation so that others can chime in if they have the same
problem.

-- 
 Bastien



Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
I came up with this:

(defun my-sort-buffer ()
  (interactive)
  (mark-whole-buffer)
  (org-sort-entries t ?K)
  (org-overview))

Seems to do what I want. This is most excellent. Making some great progress
here. Thanks. And I will send you a token of my gratitude at the end of the
month, when I have funds available.




On 17 April 2014 14:26, Bastien b...@gnu.org wrote:

 Noah Slater nsla...@tumbolia.org writes:

  Okay, wow. Thanks for writing that. Do you have a Gittip or
  something? I would love to support your OSS work in some way or
  otherwise show my gratitude beyond words in an email!

 You can use my paypal account: bastien.gue...@free.fr

 Thanks!

  Anyway. I tried your function and it works. But afterwards, the node
  is completely folded. So I added (org-cycle) to the sequence of
  functions inside save-restriction. That seems to work, but I'm no
  elisp/Org pro. Is this how you would have done it?

 Well, quite long explanations would follow... I'll let you discover by
 reading the code and by trial-and-error for now, need to run!

 --
  Bastien



Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Actually, I renamed this my-overview, added (org-clock-display), and bound
it to C-c o. Very swish.


On 17 April 2014 14:34, Noah Slater nsla...@tumbolia.org wrote:

 I came up with this:

 (defun my-sort-buffer ()
   (interactive)
   (mark-whole-buffer)
   (org-sort-entries t ?K)
   (org-overview))

 Seems to do what I want. This is most excellent. Making some great
 progress here. Thanks. And I will send you a token of my gratitude at the
 end of the month, when I have funds available.




 On 17 April 2014 14:26, Bastien b...@gnu.org wrote:

 Noah Slater nsla...@tumbolia.org writes:

  Okay, wow. Thanks for writing that. Do you have a Gittip or
  something? I would love to support your OSS work in some way or
  otherwise show my gratitude beyond words in an email!

 You can use my paypal account: bastien.gue...@free.fr

 Thanks!

  Anyway. I tried your function and it works. But afterwards, the node
  is completely folded. So I added (org-cycle) to the sequence of
  functions inside save-restriction. That seems to work, but I'm no
  elisp/Org pro. Is this how you would have done it?

 Well, quite long explanations would follow... I'll let you discover by
 reading the code and by trial-and-error for now, need to run!

 --
  Bastien





Re: [O] babel and long-running computations

2014-04-17 Thread Christoph Groth
Thorsten Jolitz tjol...@gmail.com writes:

 I’d love to hear about any frameworks or workflows that fulfill these
 requirements.

 here is a link about that topic:

 ,---
 | http://draketo.de/english/emacs/parallel-babel
 `---

Thanks.  I had found this one myself - this way of working does not seem
to allow to capture the results of the calculation in orgmode.

So probably a better way is to have some caching machinery in the
background.  I see that babel has built-in caching but there seems to be
no way to support dependencies.

Christoph




Re: [O] (OT) How to follow a mailing list with very high activity (like this one here)?

2014-04-17 Thread John Hendy
On Apr 16, 2014 2:29 PM, M elwood...@web.de wrote:

 This is off-topic, but I hope that someone can give me some good advice:

 During the last years, I'be become a real org-mode fan and I want to stay
 current and be active in the great org-mode community.
 I've subscribed to the orgmode mailinglist about 1,5 years ago and so I
have
 17.500 mails in my inbox.

 You really have to be organized very well to deal with so much
information!
 Is there a tutorial somewhere for good approaches, how to participate


[snip]

I must be way simplistic on thus one. I just use gmail.

- if something sounds relevant or I possibly know anything about how to
help, I open the email. If I was wing about that judgement, I delete it.

- either way, from then on replies to that thread show up as flagged
important in gmail. For accidental openings, I generally remember the
ballpark title and delete follow ups. For relevant notes, I keep them in my
inbox until I can chime in to help or try the solution/trick myself. Then I
delete.

- if I missed something relevant and run into an issue, I Google the
problem and generally find the thread again.

- if I don't, the ML points in the right direction when I inquire, often
due to not knowing the syntax to Google my problem :)

For a very small set of things I want around for easy reference, I stick
then in an org label in gmail.

This replicates well between phone and browser, and my first step most
mornings is swiping away most emails from the list that came in overnight.

John

 Kind regards

 Martin





[O] copying a folded task expands when pasting

2014-04-17 Thread J. David Boyd

Is there anyway to turn this off.

I keep my tasks folded, mostly, except for the current one I am working on.

Prior to archiving, when I've marked them DONE, I move them to the bottom of
the file they are in.

So, I C-w on a folded DONE task, move to the bottom of the file, and S-Ins to
place it there.  But every time it unfolds it, leaving the point at the bottom
of the entry.   Then I need to move back up and refold it.

Minor point yes, but it's the way I like to work.

So, I haven't found any setting that relates to folding/unfolding on cut and
paste.

Am I missing something, or is that just the way it works?

Thanks,

Dave in New Port Richey, FL




Re: [O] noninteractive use of org-export

2014-04-17 Thread Julien Cubizolles
Bastien b...@gnu.org writes:

 Julien Cubizolles j.cubizol...@free.fr writes:

 Can this be achieved, maybe with :completion-function?

 Maybe, but I never tried.  Let us know if you can get it work!

It works! I'm the first surprised here. I defined the following
functions to manipulate the filenames. I suspect my code is clumsy and
error prone but it works in the cases tested so far.

--8---cut here---start-8---
(defun remove-org-suffix (name)
  Remove the .org from a file name
  (if (string-match \\(.*\\)\\.org name)
  (substring name (match-beginning 1) (match-end 1))
name))

(defun jc-org-publish-rename-pdf (suffix)
Rename file.pdf to file-beamer.pdf when buffer is visiting file.org
  (let*   ((file-base-name (remove-org-suffix (buffer-file-name)))
  (file-pdf-name (concat file-base-name .pdf))
  (file-beamer-pdf-name (concat file-base-name - suffix  .pdf)))
  (if (file-exists-p file-pdf-name)
  (rename-file file-pdf-name file-beamer-pdf-name 1))
)
  )

(defun jc-org-publish-rename-notes-pdf ()
  Rename file.pdf to file-notes.pdf when buffer is visiting file.org
  (jc-org-publish-rename-pdf 'notes))

(defun jc-org-publish-rename-beamer-pdf ()
  Rename file.pdf to file-beamer.pdf when buffer is visiting file.org
  (jc-org-publish-rename-pdf 'beamer))
--8---cut here---end---8---


Then this block in the beginning of a master .org file takes care of :
* calling the beamer export with different class/ class options
  according to the project (beamer/notes) chosen
* renaming the pdf file according to the project (-beamer.pdf or
-notes.pdf)
* you can also use the cours project which publish both subprojects

--8---cut here---start-8---
#+begin_src emacs-lisp :tangle yes :exports none
(setq org-publish-project-alist
  '((beamer
 :base-directory ./
 :publishing-directory ./
 :publishing-function org-beamer-publish-to-pdf
 :exclude .*
 :latex-class mpsi_beamer
 :include (1er-principe.org)
 :completion-function jc-org-publish-rename-beamer-pdf
 )
 (notes
  :base-directory ./
  :publishing-directory ./
  :publishing-function org-beamer-publish-to-pdf
  :exclude .*
  :latex-class mpsi_beamer
  :include (1er-principe.org)
  :latex-class-options [NotesCours]
  :completion-function jc-org-publish-rename-notes-pdf
  )
 (cours :components (beamer notes
#+end_src
--8---cut here---end---8---

Thanks for guiding me.

Julien.



Re: [O] Counting number of children under heading

2014-04-17 Thread Eric Abrahamsen
Thorsten Jolitz tjol...@gmail.com writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 I could have sworn someone posted a thing for this just a week or two
 ago, using `org-map-entries' and the identity function, and counting the
 results. 

 Ups, that was me  ... forgot about it ;)

I thought so!




Re: [O] (OT) How to follow a mailing list with very high activity (like this one here)?

2014-04-17 Thread J. David Boyd
John Hendy jw.he...@gmail.com writes:

 On Apr 16, 2014 2:29 PM, M elwood...@web.de wrote:

 This is off-topic, but I hope that someone can give me some good advice:

 During the last years, I'be become a real org-mode fan and I want to stay
 current and be active in the great org-mode community.
 I've subscribed to the orgmode mailinglist about 1,5 years ago and so I have
 17.500 mails in my inbox.

 You really have to be organized very well to deal with so much information!
 Is there a tutorial somewhere for good approaches, how to participate


 [snip]

 I must be way simplistic on thus one. I just use gmail.

 ..

 John

 Kind regards

 Martin





How do you use Gmail to follow a newsgroup?

Dave




Re: [O] (OT) How to follow a mailing list with very high activity (like this one here)?

2014-04-17 Thread Bastien
jdavidb...@adboyd.com (J. David Boyd) writes:

 How do you use Gmail to follow a newsgroup?

I think John is using the mailing list:
https://lists.gnu.org/mailman/listinfo/emacs-orgmode

not the gmane.org newsgroup.

-- 
 Bastien



Re: [O] noninteractive use of org-export

2014-04-17 Thread Bastien
Julien Cubizolles j.cubizol...@free.fr writes:

 Thanks for guiding me.

No problem, glad it worked and thanks for the sharing the solution!

-- 
 Bastien



Re: [O] Counting number of children under heading

2014-04-17 Thread Marvin Doyley

Hi Thorsten,

Your hidden line cookie is what I am looking for. If I understand it I should 
do the following

* Fruits [# ]
** Apples
** Pears

M-x org-hlc-toggle-hidden-lines-cookies ?

When ever I do this I get the following error

Symbol’s function definition is void: outline-body visible-p, 

The backtrace is included below.

Thanks
M

Debugger entered--Lisp error: (void-function outline-body-visible-p)
  (outline-body-visible-p)
  (not (outline-body-visible-p))
  (or (not (outline-body-visible-p)) (re-search-forward 
org-hlc-hidden-lines-cookie-format-regexp (line-end-position) (quote NO-ERROR)))
  (progn (or (not (outline-body-visible-p)) (re-search-forward 
org-hlc-hidden-lines-cookie-format-regexp (line-end-position) (quote 
NO-ERROR
  (unwind-protect (progn (or (not (outline-body-visible-p)) (re-search-forward 
org-hlc-hidden-lines-cookie-format-regexp (line-end-position) (quote 
NO-ERROR (set-match-data save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal (match-data))) (unwind-protect (progn (or 
(not (outline-body-visible-p)) (re-search-forward 
org-hlc-hidden-lines-cookie-format-regexp (line-end-position) (quote 
NO-ERROR (set-match-data save-match-data-internal (quote evaporate
  (save-excursion (let ((save-match-data-internal (match-data))) 
(unwind-protect (progn (or (not (outline-body-visible-p)) (re-search-forward 
org-hlc-hidden-lines-cookie-format-regexp (line-end-position) (quote 
NO-ERROR (set-match-data save-match-data-internal (quote evaporate)
  org-hlc-hidden-lines-cookie-status-changed-p()
  (and (outline-on-heading-p) (org-hlc-hidden-lines-cookie-status-changed-p) 
(org-hlc-set-hidden-lines-cookie))
  (save-excursion (goto-char (point-min)) (and (outline-on-heading-p) 
(org-hlc-hidden-lines-cookie-status-changed-p) 
(org-hlc-set-hidden-lines-cookie)) (while (not (eobp)) 
(outline-next-visible-heading 1) (and (outline-on-heading-p) 
(org-hlc-hidden-lines-cookie-status-changed-p) 
(org-hlc-set-hidden-lines-cookie
  org-hlc-write-hidden-lines-cookies()
  org-hlc-show-hidden-lines-cookies()
  (if org-hlc-hidden-lines-cookies-on-p (org-hlc-hide-hidden-lines-cookies) 
(org-hlc-show-hidden-lines-cookies))
  org-hlc-toggle-hidden-lines-cookies()
  call-interactively(org-hlc-toggle-hidden-lines-cookies record nil)
  command-execute(org-hlc-toggle-hidden-lines-cookies record)
  (progn (setq prefix-arg current-prefix-arg) (setq this-command chosen-item) 
(command-execute chosen-item (quote record)))
  (unwind-protect (progn (setq prefix-arg current-prefix-arg) (setq 
this-command chosen-item) (command-execute chosen-item (quote record))) 
(smex-rank chosen-item) (smex-show-key-advice chosen-item) (run-at-time 0.01 
nil (function (lambda (cmd) (setq last-repeatable-command cmd))) chosen-item))
  (if smex-custom-action (let ((action smex-custom-action)) (setq 
smex-custom-action nil) (funcall action chosen-item)) (unwind-protect (progn 
(setq prefix-arg current-prefix-arg) (setq this-command chosen-item) 
(command-execute chosen-item (quote record))) (smex-rank chosen-item) 
(smex-show-key-advice chosen-item) (run-at-time 0.01 nil (function (lambda 
(cmd) (setq last-repeatable-command cmd))) chosen-item)))
  (let ((chosen-item (intern (smex-completing-read commands initial-input 
(if smex-custom-action (let ((action smex-custom-action)) (setq 
smex-custom-action nil) (funcall action chosen-item)) (unwind-protect (progn 
(setq prefix-arg current-prefix-arg) (setq this-command chosen-item) 
(command-execute chosen-item (quote record))) (smex-rank chosen-item) 
(smex-show-key-advice chosen-item) (run-at-time 0.01 nil (function (lambda 
(cmd) (setq last-repeatable-command cmd))) chosen-item
  smex-read-and-run((toggle-debug-on-error org-mode text-mode 
artist-mode color-theme-snow eshell load-file notes org-bibtex-yank 
tea-time brain insert-date org-bibtex-read 
org-hlc-toggle-hidden-lines-cookies el-get-install org-bibtex-search 
skimCopy word-count desktop-read word-count-mode 
marv:create-scratch-buffer matlab-shell el-get-list-packages wl dired 
org-insert-drawer text-scale-increase org-hlc-hide-hidden-lines-cookies 
org-export-insert-default-template python-mode desktop-save 
writegood-mode artbollocks-mode el-get-self-update marv:org-entry-wpm 
org-bibtex insert-time org-capture move-border-up org-mobile-pull 
org-bibtex-write org-bibtex-read-file org-habit-toggle-habits 
marv:toggle-line-spacing comment-or-uncomment-region version mail-mode 
reftex-toc bibtex-mode matlab-mode ...))
  (if (smex-already-running) (smex-update-and-rerun) (and smex-auto-update 
(smex-detect-new-commands) (smex-update)) (smex-read-and-run smex-ido-cache))
  smex()
  call-interactively(smex nil nil)






Re: [O] problem with call lines with post block that are not exported (elpa org)

2014-04-17 Thread Bastien
Hi Alan,

Alan Schmitt alan.schm...@polytechnique.org writes:

 My questions are:
 - is there a bug in the ELPA version of org mode?

most probably.

 - is there a workaround? We tried :exports results instead of
 :exports none but the blocks are not exported in that case.

I simply suggest to encourage your colleague to use a more recent
version.

Sorry to state the obvious here :)

-- 
 Bastien



Re: [O] copying a folded task expands when pasting

2014-04-17 Thread Thorsten Jolitz
jdavidb...@adboyd.com (J. David Boyd) writes:

 Is there anyway to turn this off.

 I keep my tasks folded, mostly, except for the current one I am working on.

 Prior to archiving, when I've marked them DONE, I move them to the
 bottom of
 the file they are in.

 So, I C-w on a folded DONE task, move to the bottom of the file, and
 S-Ins to
 place it there.  But every time it unfolds it, leaving the point at
 the bottom
 of the entry.   Then I need to move back up and refold it.

 Minor point yes, but it's the way I like to work.

 So, I haven't found any setting that relates to folding/unfolding on
 cut and
 paste.

 Am I missing something, or is that just the way it works?

As always, it might already exist in Org-mode/Emacs, but its easy to
implement anyway:

#+begin_src emacs-lisp
  (defun tj/yank-folded-subtree ()
(interactive)
(save-excursion
  (yank '(4))
  (hide-subtree)))
#+end_src

#+results:
: tj/yank-folded-subtree

or a bit more convenient:

#+begin_src emacs-lisp
(defun tj/kill-and-append-folded-subtree ()
  Kill subtree at point and yank it folded at EOB.
  (interactive)
  (save-excursion
(org-mark-subtree)
(when (use-region-p)
  (kill-region (region-beginning) (region-end)))
(goto-char (point-max))
(unless (looking-at ^$) (newline))  
(yank '(4))
(hide-subtree)))
#+end_src

#+results:
: tj/kill-and-append-folded-subtree

---
cheers,
Thorsten




Re: [O] (org-insert-headline '(4)) should insert new headline before point

2014-04-17 Thread Bastien
Hi York,

York Zhao gtdplatf...@gmail.com writes:

 (org-insert-headline '(4)) used to insert new heading before point. But this 
 had
 broken recently. According to the docstring, this command inserts new
 heading at the end of the parent subtree  ONLY if two universal prefix
 arguments is given, not one. Here's the reproducer:

Not sure what precise error you're reporting here, but I fixed the
docstring in the master branch -- please have a look and report if
the behavior differs from what the docstring says.

Thanks,

-- 
 Bastien



Re: [O] Feature Request. org-bibtex-tags-are-keywords inherit tags

2014-04-17 Thread Bastien
Hi Leonard,

Leonard Randall leonard.a.rand...@gmail.com writes:

 Unfortunately, my knowledge of lisp is particularly rudimentary so I
 can't offer to do it myself.

I think you certainly underestimate yourself and can start hacking :)

1. install Git on your machine
2. ~$ git clone git://orgmode.org/org-mode.git
3. ~$ cd org-mode/
4. Edit lisp/org-bibtex.el
5. Use C-x C-e at the end of the edited functions and check it works

When you're done, simple C-x v = in the edited buffer, C-x o to go to
that buffer, then save it and send it to us.

Otherwise let's wait someone with a better understanding than mine
can hack it together.  But I'm sure you can give us something that
will be useful enough.

Best,

-- 
 Bastien



Re: [O] (OT) How to follow a mailing list with very high activity (like this one here)?

2014-04-17 Thread John Hendy
On Thu, Apr 17, 2014 at 7:59 AM, J. David Boyd jdavidb...@adboyd.com wrote:
 John Hendy jw.he...@gmail.com writes:

 On Apr 16, 2014 2:29 PM, M elwood...@web.de wrote:

 This is off-topic, but I hope that someone can give me some good advice:

 During the last years, I'be become a real org-mode fan and I want to stay
 current and be active in the great org-mode community.
 I've subscribed to the orgmode mailinglist about 1,5 years ago and so I have
 17.500 mails in my inbox.

 You really have to be organized very well to deal with so much information!
 Is there a tutorial somewhere for good approaches, how to participate


 [snip]

 I must be way simplistic on thus one. I just use gmail.

 ..

 John

 Kind regards

 Martin





 How do you use Gmail to follow a newsgroup?

Like I said, I'm simple -- I didn't even catch the difference between
mailing list/newsgroup! I only read/reply from gmail, and assumed that
subscribing to the mailing list was sending me all activity from the
newsgroup (though didn't really know there was a difference -- is
there?).

Then again, the OP discusses 17.5k emails in his /inbox/, so he must
be doing the same? Or did he mean POP/IMAP subscription to the group
or RSS into an email program?


John


 Dave





Re: [O] Clocktable for this week starting at Sunday

2014-04-17 Thread Bastien
Hi Torben,

Torben Hoffmann torben.leh...@gmail.com writes:

 #+BEGIN: clocktable :maxlevel 2 :scope agenda-with-archives
  :weekstart 7 :block thisweek :step day :fileskip0 :narrow 20!
   ^^

should be :wstart -- let us know if it works!

-- 
 Bastien



Re: [O] [babell] How to report generated files and generation time from org-babel-tangle?

2014-04-17 Thread Bastien
Hi Grant,

Grant Rettke g...@wisdomandwonder.com writes:

 My goal is to report what files were generated (tangled) and how long
 it take for each of them
 when calling org-babel-tangle.

You can start with `elp-instrument-function' and then M-x elp-results RET

There is also M-x profiler-start which you may want to try.

HTH,

-- 
 Bastien



Re: [O] Kill ring contains non-killed output after an export

2014-04-17 Thread Bastien
Hi Konstantin and Richard,

Richard Lawrence richard.lawre...@berkeley.edu writes:

 The behavior you are seeing is as expected, though I agree that this
 behavior is usually not all that useful.  See the variable
 org-export-copy-to-kill-ring if you want to turn it off.

 Changing the default value of this variable was recently discussed on
 this list:

 http://thread.gmane.org/gmane.emacs.orgmode/84048/focus=84055

 Looks like there haven't been any strong objections to changing it,

Indeed.  The default in now `nil'.

-- 
 Bastien



Re: [O] Kill ring contains non-killed output after an export

2014-04-17 Thread Bastien
Hi Konstantin,

Konstantin Kliakhandler ko...@slumpy.org writes:

 Thanks! Now the export is much more usable for me. Out of curiousity,
 what is the use case of the default behavior?

I think this comes from the time where only the HTML existed, and
where it was only a hack to export small snippets -- in which case
it makes sense to have the copied buffer in the kill-ring, because
you mainly export for the purpose of copying some HTML elsewhere.

Not sure though.

-- 
 Bastien



Re: [O] Spacing after sorting a heading

2014-04-17 Thread Kyle Meyer
On 04/17/14 06:52, Bastien wrote:
 I fixed this in maint, let me know if this works for you.

Works great. Thanks!

-- 
Kyle



Re: [O] org babel question: reference tables in remote file

2014-04-17 Thread Bastien
Hi Arun,

Arun Persaud apers...@lbl.gov writes:

 Is there a reason not to allow link-syntax like
 remote(file:path::tablename, cellref)?

Well, probably histerical raisins, as Stefan would say...

But the concept of a link is really twofold: it's a reference,
and an object you can interactively act uppon by following it.

Using the link syntax for something is used solely as a ref
would be confusing IMHO.

-- 
 Bastien



Re: [O] (OT) How to follow a mailing list with very high activity (like this one here)?

2014-04-17 Thread Bastien
John Hendy jw.he...@gmail.com writes:

 Like I said, I'm simple -- I didn't even catch the difference between
 mailing list/newsgroup! I only read/reply from gmail, and assumed that
 subscribing to the mailing list was sending me all activity from the
 newsgroup (though didn't really know there was a difference -- is
 there?).

There is none, the gmane.org newsgroup is just a gateway for the
mailing list.

-- 
 Bastien



Re: [O] problem with call lines with post block that are not exported (elpa org)

2014-04-17 Thread Alan Schmitt
On 2014-04-17 15:51, Bastien b...@gnu.org writes:

 Hi Alan,

 Alan Schmitt alan.schm...@polytechnique.org writes:

 My questions are:
 - is there a bug in the ELPA version of org mode?

 most probably.

 - is there a workaround? We tried :exports results instead of
 :exports none but the blocks are not exported in that case.

 I simply suggest to encourage your colleague to use a more recent
 version.

 Sorry to state the obvious here :)

Since maint has/had the same problem, I would need to ask them to switch
to the master branch of the git repo, which might be a little too
bleeding edge ;-)

For this paper, we switched to not evaluating this code blocks upon
export, but to do so manually. It's working well.

Thanks,

Alan



Re: [O] Counting number of children under heading

2014-04-17 Thread Thorsten Jolitz
Marvin Doyley marvin...@gmail.com writes:

Hi Thorsten,

 Your hidden line cookie is what I am looking for. If I understand it I
 should do the following

 * Fruits [# ]
 ** Apples
 ** Pears

 M-x org-hlc-toggle-hidden-lines-cookies ?

 When ever I do this I get the following error

 Symbol’s function definition is void: outline-body visible-p, 

 The backtrace is included below.

Just tested `org-hlc-toggle-hidden-lines-cookies' with an org file:

,
| 3 matches for ^\*  in buffer: org-outside-org.org
|  15:* Introduction [#30]
|  46:* Org-mode everywhere [#876]
| 923:* Screencasts  [#20]
`

and

,---
| 12 matches for ^\*\*?\*?  in buffer: org-outside-org.org
|  15:* Introduction [#30]
|  46:* Org-mode everywhere
|  50:** File Structuring
|  54:*** orgstruct  [#39]
|  94:*** Outline with Outshine  [#186]
| 281:** Subtree and Comment Editing
| 285:*** Introduction [#18]
| 304:*** Outorg [#112]
| 417:*** Poporg [#291]
| 709:** Remote Buffer Control [#213]
| 923:* Screencasts  [#20]
`---

and it seems to work here ... but thats because I always load
outshine.el and therefore took this function for granted:

,
| outline-body-visible-p is a Lisp function in `outshine.el'.
| 
| (outline-body-visible-p)
`

I fixed this in master right now, so if you pull the newest version it
should work. 

Note that org-hlc.el is 'wrong' in some ways:
- it only acts when called, not via a hook or so
- it actually modifies the buffer to insert and delete the cookies

but it works more or less, even for massive files.

I tried the right way (visibility change hook and overlays) and noticed
that my user experience went downhill pretty fast in big files - seems
that Emacs display engine is overwhelmed at some point. 

PS 
Why is flyspell-mode turned on automatically in the magit commit-msg
buffer now? I did not do anything about it and don't want it anyway ...

-- 
cheers,
Thorsten




Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Using this a bit, it doesn't quite do what I want it to do.

Is there any way to sort recursively?

At the moment, calling org-sort-entries on the whole buffer only sorts the
top level nodes.


On 17 April 2014 14:45, Noah Slater nsla...@tumbolia.org wrote:

 Actually, I renamed this my-overview, added (org-clock-display), and bound
 it to C-c o. Very swish.


 On 17 April 2014 14:34, Noah Slater nsla...@tumbolia.org wrote:

 I came up with this:

 (defun my-sort-buffer ()
   (interactive)
   (mark-whole-buffer)
   (org-sort-entries t ?K)
   (org-overview))

 Seems to do what I want. This is most excellent. Making some great
 progress here. Thanks. And I will send you a token of my gratitude at the
 end of the month, when I have funds available.




 On 17 April 2014 14:26, Bastien b...@gnu.org wrote:

 Noah Slater nsla...@tumbolia.org writes:

  Okay, wow. Thanks for writing that. Do you have a Gittip or
  something? I would love to support your OSS work in some way or
  otherwise show my gratitude beyond words in an email!

 You can use my paypal account: bastien.gue...@free.fr

 Thanks!

  Anyway. I tried your function and it works. But afterwards, the node
  is completely folded. So I added (org-cycle) to the sequence of
  functions inside save-restriction. That seems to work, but I'm no
  elisp/Org pro. Is this how you would have done it?

 Well, quite long explanations would follow... I'll let you discover by
 reading the code and by trial-and-error for now, need to run!

 --
  Bastien






  1   2   >