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

2014-04-17 Thread Igor Sosa Mayor
Sacha Chua  writes:

> There's not much more to my Gnus config aside from the snippet I
> included earlier. Maybe a score file with this in it?
> (("Body" ("sacha" 10 nil s)))
> which theoretically adds a score based on that keyword, but I haven't
> tested it and it slows loading groups down a bit.

thanks a lot for your answer!

(and thanks a lot for your blog, interviews, etc!)




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

2014-04-17 Thread Brady Trainor

On 04/16/2014 12:28 PM, M wrote:

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


TLDR version:  I've decided to go with newsgroup rather than subscribe, 
and Thunderbird rather than GNUS.


have we established the following ?
3 routes:
 - subscribe to mailing list with your email address
 - simply view the newsgroup
 - RSS
Some apps:
 - Gmane website
 - MS Entourage
 - Emacs GNUS
 - Wanderlust
 - Thunderbird

It was right on topic for me, I was thinking about writing a similar 
question for the last week or so.


However, I don't think I'll make it all the way to mailing list sorcerer 
in one fell swoop.


I did finally get Emacs GNUS working yesterday (ugh, in January I 
decided it wasn't possible with my account), but I couldn't get 
comfortable in it fast enough. I'm tentative about subscribing, so I 
tried to learn how to be a GNUS _newsgroup_ sorcerer. But before I made 
much progress, I found mention that Thunderbird could operate as a 
newsreader, so I'm now using that, and it's nice enough for me, for now.


I would like to learn to better use GNUS at some point.


Brady

The extended version:

I was using almost exclusively the Gmane website, which was fine as it 
was easy to encounter during google searches, but it was not great for 
emailing the list. For one, it seemed to be double spacing my carefully 
crafted messages.


I do like the easy fashion in which I can star messages in Thunderbird, 
and I can take a gradual approach to the learning curve as far as 
controlling which messages I can see or exist, while using the 
beginner-friendly CUA style.


But now that I've achieved a vast improvement over using just the Gmane 
website, I will be reading carefully for set ups that work even better.









Re: [O] Request for worg page -- escaping questions

2014-04-17 Thread Rustom Mody
On Thu, Apr 17, 2014 at 9:42 PM, Bastien  wrote:

> Hi Rustom,
>
> Rustom Mody  writes:>
> > Just expressing a similar need of org-moders!
>
> Hopefully you get enough to start a tutorial on Worg :)
>
>
Heh!
Ok thats the least I can do.
Trouble is you guys are the hares that make us (me at least) into tortoises
--
you add significant functionality faster than I can keep with the 'what'
(leave aside how and details).

Still I'll try my hand.
What I would like is a graphic -- an automata-diagram made perhaps by dot.
Can that easily/conveniently go up onto worg?

-- 
http://www.the-magus.in
http://blog.languager.org


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

2014-04-17 Thread Esben Stien
Eric Abrahamsen  writes:

> org-use-fast-todo-selection set to t

Hehe, got it, finally. That was the missing ingredient. 

Really great, now I'm speedy gonzales on the TODOs'; thanks;)

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



Re: [O] Bug? (was Request for worg page -- escaping questions)

2014-04-17 Thread Rustom Mody
On Fri, Apr 18, 2014 at 1:09 AM, Nicolas Goaziou wrote:

> Hello,
>
> Rustom Mody  writes:
>
> > Trying to dig a bit into this -- some table issues -- I seem to have
> > stumbled onto a bigger issue: org seems to be crashing emacs.
> >
> > Ive checked it about 4 times.
> > I cant exactly give the exact offending file because once it goes into
> 100%
> > cpu mode theres nothing I can do but to kill emacs from a shell.
> >
> > 1 Started org with: make vanilla in org directory
> > 2 version is 8.2.5e
> > 3. Now I edit something.org (to get into org mode):
> > 4 Now type as follows
> > * Intro
> > |a|b|c^
> > 5. (point is at ^)Hit C-c C-c
> > emacs hangs (ie gets unresponsive, cpu 100% needs to be killed from
> > outside)
>
> It was an infloop in `org-element-context', which should be fixed. Thank
> you for reporting this.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>

Thanks Nicolas --  works now!
I came upon this trying to poke into another issue:  Table containing code
containing a '|'

It was earlier giving some elisp errors -- dont remember on export or on
C-c C-c.
Now that is not happening which is good!

However there is still a minor issue: font-locking shows something like ~x
| y~
inside a table as code but the other table commands like C-c C-c and export
to html treats the '|' as a table marker.

I of course checked Bastien's pointer to the FAQ for '|' inside table.
As of now neither vert nor \vert{} work.


Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Sacha Chua
Noah Slater  writes:

Hello, Noah, all!

> 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.

Here's a rather inefficient hack (but hey, it seems to work =) ):

(defun sacha/org-sort-recursively (type)
(org-map-entries
 (lambda ()
 (condition-case nil
 (org-sort-entries nil type)
 (error nil)

Call with M-: (sacha/org-sort-recursively ?K) or merge the code into
your own.

Sacha




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

2014-04-17 Thread Sacha Chua
Igor Sosa Mayor  writes:

>> I also have some more rules that score things up if they mention my name
>> or other things I'm interested in. =)
>> Hope that helps!
> yes, it helps a lot. At least me... 
> But I'm still unsure how to use it exactly... Is your config visible
> anywhere? 

There's not much more to my Gnus config aside from the snippet I
included earlier. Maybe a score file with this in it?
(("Body" ("sacha" 10 nil s)))
which theoretically adds a score based on that keyword, but I haven't
tested it and it slows loading groups down a bit.

Maybe you can check out the adaptive scoring section in the Gnus manual
and go from there? I'm dusting off my Gnus config too, since it's been
years since I last relied on it.

Sacha




[O] sharing my firsts, org babel tangle and "init" .org file

2014-04-17 Thread Brady Trainor


Have you migrated your init files into .org file(s)? What's your setup?

Below is my first setup for fellow newbs, or for the interested 
developer. And please let me know if I'm missing some logic or 
conventions/practices.


In the short history of my Emacs init file evolution (~ oct '13), I had 
considered packages like dot-emacs.org, but for some reason had not 
succeeded (I thought it had demanded Emacs 24.3.50+, but I don't see 
that in the description now).


So when I recently felt motivated to try such a .org Literation of my 
init files (my project of making agenda custom commands and capture 
templates was starting to topple), I tried let's say a more basic approach.


I worked mostly from the tutorial in
Babel: Introduction / Emacs Initialization with Babel

http://orgmode.org/worg/org-contrib/babel/intro.html#emacs-initialization

It took just a little wrestling with a clean tty2 Emacs, but here is my 
interpretation of a "minimal" setup for initializing via org babel 
tangling:


 
/

 make sure org has been installed in an "emacs -q"

(require 'package)
(package-initialize)
(require 'org)

;; declare org indentation before we might manually open org to tangle
(setq org-startup-indented t)
(setq org-hide-block-startup t)
;; declare source indentation before we might manually open org to tangle
(setq org-src-fontify-natively t)
(setq org-edit-src-content-indentation 0)

;; default I/O in windows is undecided-dos/unix for de/encoding respectively
(prefer-coding-system 'utf-8-unix)

;; load org initialization files
(require 'ob-tangle)
(org-babel-load-file "/e/emacs-config/dot-emacs-test.org")

\


Some of those aren't necessary but for aesthetics before manually 
stepping through lines for testing the initialization (starting emacs -q 
tangling and/or executing one-by-one).


The character encoding is there as I have some utf-8 Fahrenheit symbols 
in my (.org) init file.


Initially (while troubleshooting) I had some dired customizations 
(vertical omit, horizontal hide), font family and color-theming in this 
code block, as I have a hard time looking at plain Emacs for too long.


You may also want to toggle some tangles in your (first ever) init file, 
this can be done per file, subtree or source block, via


#+PROPERTY: header-args :tangle yes
 or
:PROPERTIES:
:header-args: :tangle no
:END:
 or
#+BEGIN_SRC emacs-lisp :tangle no

And the latter take precendence.


TWIMC, HTH

Brady




Re: [O] emacs regex work done within literate org-mode?

2014-04-17 Thread Thorsten Jolitz
Lawrence Bottorff  writes:

> A while back I declared war against what I call "tunneling" i.e., the
> typical programmer practice of just working along on something without
> making any sort of notes or comments . . . 

When learning about [[http://software-lab.de/doc/ref.html][PicoLisp]] I
noticed that some of the very best programmers actually prefer just
reading code with minimal distraction by comments, so 'tunneling' is
probably not bad per se but rather a question of taste.

> Basically, I'm looking for something better than the typical Emacs
> REPL session where you have the option of simply saving the entire
> session's REPL buffer. But I don't want it to be so cumbersome that I'm
> writing a tutorial, either -- even though that's what I'm sort of
> doing. The dream would be that a whole day's work could be contained
> in org-mode files -- both the code and the description of what's going
> on and how things came (in)to be(ing).

When its about programming work with just one language, you might try
outshine.el with outorg.el, if you work with several languages or its
more about publishing then actual programming, Org (Babel) should be
perfectly capable to do what you want. 

-- 
cheers,
Thorsten




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

2014-04-17 Thread Nicolas Goaziou
Hello,

zwz  writes:

> 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)

`org-latex-pdf-process' can be a function. You could send it a message
telling it what functions to use. For example, a hook could find out
what LaTeX class you're using and send the appropriate message to the
function.

> However I found it does not work in asyn export.

Is is not related to async export.

A few variables live outside the scope of BIND keywords.
`org-latex-pdf-process' is one of them. Though, you can always define it
as a file local variable.


Regards,

-- 
Nicolas Goaziou



Re: [O] Prepare release 8.2.6

2014-04-17 Thread Bastien
Hi Michael and Nicolas,

Nicolas Goaziou  writes:

> It needs to be discussed, but I tend to think that it would be better to
> allow newlines characters in macros and inline babel calls, even if it
> means replacing them with a space when needed.

I've given this another thought and I agree here.
Prevent line breaks here would look weird, and adding
the space when needed looks easy enough (at least,
it's easy enough to suppose it is easy... not sure
about the details.)

-- 
 Bastien



Re: [O] How to properly convert duration to time?

2014-04-17 Thread Bastien
Hi Marcin,

Marcin Antczak  writes:

> I would like to export CLOCK with  html5 tag.
>
> I can output :duration as for example: 1:23 (1 hour 23
> minutes)
>
> This format is not valid according to w3org specification.
> http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#valid-duration-string
>
> How to convert duration to valid time string?

Can you be more specific on what you are trying to achieve?
For example, can you give an input .org file and the desired
HTML output?

Thanks,

-- 
 Bastien



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

2014-04-17 Thread Bastien
Nicolas Goaziou  writes:

> Bastien  writes:
>
>> Nicolas Goaziou  writes:
>>
>>> FWIW, I vote for regular URI mailto:j...@doe.com?subject=Test.
>>
>> Yep, 100% agreed.
>
> Done in b9f2e17f07faf01109fc6f7f1eb5a34e0f97eafb.

Works fine, thanks!

-- 
 Bastien



Re: [O] Bug? (was Request for worg page -- escaping questions)

2014-04-17 Thread Nicolas Goaziou
Hello,

Rustom Mody  writes:

> Trying to dig a bit into this -- some table issues -- I seem to have
> stumbled onto a bigger issue: org seems to be crashing emacs.
>
> Ive checked it about 4 times.
> I cant exactly give the exact offending file because once it goes into 100%
> cpu mode theres nothing I can do but to kill emacs from a shell.
>
> 1 Started org with: make vanilla in org directory
> 2 version is 8.2.5e
> 3. Now I edit something.org (to get into org mode):
> 4 Now type as follows
> * Intro
> |a|b|c^
> 5. (point is at ^)Hit C-c C-c
> emacs hangs (ie gets unresponsive, cpu 100% needs to be killed from
> outside)

It was an infloop in `org-element-context', which should be fixed. Thank
you for reporting this.


Regards,

-- 
Nicolas Goaziou



[O] emacs regex work done within literate org-mode?

2014-04-17 Thread Lawrence Bottorff
A while back I declared war against what I call "tunneling" i.e., the
typical programmer practice of just working along on something without
making any sort of notes or comments . . . and that day's "Werdegang" as
they say in German (steps, procedure, process?) being only as good as your
memory of it. I see org mode as capable of is beating tunneling by actually
writing a story of your day's work inside an org-mode file.

For example, I'm working on a database project where I'd like to do lots of
emacs regex to get a file of comma delimited lines turned into sql
INSERT-ready statements. Here's what the VALUES of my INSERT look like:

(UPPER (SUBSTRING(MD5(RAND()) FROM 1 FOR 6)), ,'P',1)

the first part up until ...FOR 6)) is just a six-place hex id generator
(mysql syntax) for the record, then comes an empty field, then 'P' etc. So
I'm looking to shove a chunk of text from my comma delimited file into the
empty field. e.g.,

(...FROM 1 FOR 6)),'new thing 1','P',1)

where 'new thing 1' came from a line in the comma delim file. Right, so I
can do this with Emacs' regex in a one-off tunneling sort of way, but how
could I do this inside an org-mode file? I'm guessing I would need to use
elisp (perl, lisp, etc) in a literate way, i.e., my org-mode file would
have code sections and results sections. But could the results of running
literate code then be fed into the next section of literate code? I need to
run code on data, get results, run more code on that -- all while
interactively composing my org-mode file. Is this possible?

Basically, I'm looking for something better than the typical Emacs REPL
session where you have the option of simply saving the entire session's
REPL buffer. But I don't want it to be so cumbersome that I'm writing a
tutorial, either -- even though that's what I'm sort of doing. The dream
would be that a whole day's work could be contained in org-mode files --
both the code and the description of what's going on and how things came
(in)to be(ing).

LB


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

2014-04-17 Thread Nicolas Goaziou
Bastien  writes:

> Nicolas Goaziou  writes:
>
>> FWIW, I vote for regular URI mailto:j...@doe.com?subject=Test.
>
> Yep, 100% agreed.

Done in b9f2e17f07faf01109fc6f7f1eb5a34e0f97eafb.


Regards,

-- 
Nicolas Goaziou



Re: [O] HTML export to just a single file?

2014-04-17 Thread J. David Boyd
"Diez B. Roggisch"  writes:

> Hi,
>
> there was a time (org 7.x) when I was able to use org-mode to write google
> doc documents - by actually composing them in emacs, and then use the
> exported single-page HTML and paste it into a google doc.
>
> Since org 8.x (I'm currently using 8.2.5h), I get this separation in
> navigate able sections.
>
> I unfortunately have no use for that feature.
>
> So - is there a way to get my beloved single page HTML file export back? 
>
> Thanks,
>
> Diez

It sounds like you've got the
 
#+INFOJS_OPT: view:info toc:1 

line in your settings somewhere.  Without that, you get one big file.
With it, you get collapsed sections and navigation.

Dave




Re: [O] Is `org-preview-latex-fragment` sensitive to alignment specified by document class options?

2014-04-17 Thread Bastien
Hi Rob,

Rob Stewart  writes:

> So, is there a way to make `org-preview-latex-fragment` sensitive to
> LaTeX class options?

Normally it should be.  What version of Emacs and Org are you using?

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

Also, maybe have a look at `org-format-latex-header' and see if there
are no conflicting options there.  Previewing combines the in-buffer
LaTeX options with those.

Best,

-- 
 Bastien



Re: [O] Altering effect of deadline on priority calculation

2014-04-17 Thread Bastien
Hi Inanna,

peregrinehill  writes:

> I would like to make deadlines have a larger impact on priority
> calculation than scheduled date, but I can't figure out how to
> extract how many days before or past deadline from an agenda entry.
>  I would also like to extract how many days overdue a task is from
> its scheduled date.
>
> Is there a function that gives me this information easily?
>
> Alternatively, can anybody point me to where priority is increased by
> 1 for each day late?

I'm not sure where do you want to get this information from:
from an agenda view? from a normal buffer?

What value of `org-agenda-sorting-strategy' comes closest to
what you are trying to achieve?

Let us know,

-- 
 Bastien



Re: [O] Assign clocking gaps to tasks in clockcheck view?

2014-04-17 Thread Bastien
Hi Martin,

"Martin Beck"  writes:

> It would be very handy, if I could navigate to the line with the gap
> and then use a command to copy that time gap and move it to the
> logbook of a heading or clock.
> Is that possible already?

Check `org-clock-continuously', which you may turn on when you work,
this will probably avoid the workaround you describe.

Hope this helps,

-- 
 Bastien



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

2014-04-17 Thread Bastien
Hi Arun,

Arun Persaud  writes:

> thanks for the answer. It would be nice to be able to reference tables
> in other files easily though, so some form of : would
> be great for the remote call. Is there some special ref syntax that
> could be used here?

 remote(NAME-OR-ID,REF)

describes a reference to a table in a section, possibly in a different
file, and the ID property is probably more stable than a filename, so
I'd argue that what we have is enough.

-- 
 Bastien



Re: [O] update to ob-clojure.el

2014-04-17 Thread Bastien
Hi Greg and Oleh,

Soapy Smith  writes:

> I'm not sure about removing nrepl and slime, as there may be some still
> using them, especially nrepl.  As long as it is not getting in the way,
> perhaps at this time it would be better to leave them in?

Agreed.

> I'm not sure
> the open-source and/or emacs-org philosophy on this kind of thing.

"If it ain't broken, don't fix it."

> Prior to updating the documentation for Clojure code blocks earlier this
> year, which was several years old, I did a lot of searching around and
> came to the conclusion that the slime and swank-clojure functionality
> was no longer being developed, and the community had moved on to nrepl.
> CIDER evolved from nrepl, and is the current direction.
>
> https://github.com/clojure-emacs/cider
>
> The revised documentation is very "CIDER-centric":
>
> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html

Yes, we shall put all efforts into supporting CIDER, and then ping the
Clojure community to know whether slime and nrepl still need to be
supported.  But for Org 8.3, let's continue to have those.

-- 
 Bastien



Re: [O] Embedding an image in base64; exporting to ascii, html, and latex?

2014-04-17 Thread Bastien
Skip Collins  writes:

> On the other hand, it would be very nice for org-mode to support the
> inclusion of org files in a zipped container.

How would that be different that zipping org files along with pictures
and related needed content?

-- 
 Bastien



Re: [O] Patch for testing `org-open-at-point'

2014-04-17 Thread Bastien
Hi York,

York Zhao  writes:

> * Peter
> :PROPERTIES:
> :ADDRESS: xxx xxx  
> :HOME_PHONE: xxx xxx xxx
> :WORK_PHONE: xxx xxx xxx
> :URL: www.foo.bar
> :END:

The question is this: are we fine handling raw links in properties,
or do we also need Org links (e.g. bracket links) there?

Speaking for me, raw links is enough, and this is what I plan to
implement.  But maybe other users have existing use-cases for Org
links there, I don't know.

-- 
 Bastien



Re: [O] Bug? (was Request for worg page -- escaping questions)

2014-04-17 Thread Bastien
Rustom Mody  writes:

> So if you still think it classifies as an emacs bug I can file it
>
> Please let me know

Please go ahead, thanks!

-- 
 Bastien



Re: [O] Embedding an image in base64; exporting to ascii, html, and latex?

2014-04-17 Thread Skip Collins
> I see how base64 images can be used for HTML, but I don't know
> how to use them for LaTeX -- and I doubt it makes sense.  But for
> HTML, yes, we can explore this feature... on my MAYBE list!

I would vote against inclusion of ascii-encoded binary files in org.
This violates the "it's just text" spirit of org.

On the other hand, it would be very nice for org-mode to support the
inclusion of org files in a zipped container. Developing a standard
folder structure to include images and other files in a single ".orgz"
that could be directly edited in emacs would be wonderful. This could
be very useful for doing reproducible research. It would allow easy
file exchange. Inclusion of specific export formats could also be
easily supported.

A quick test show that Emacs Archive mode already allows editing of
org files contained in zip files. Using external programs such as
latex almost works. An exported pdf file is generated correctly, but
it ends up not inside the zip file, but in the same folder that
contains the zip file. It has a name that starts with the zip
filename, but it has "/" and the intended name of the pdf file
appended.

It might not be that much work to fix export code and image import
macros to fully support a standard org archive format.



Re: [O] Bug? (was Request for worg page -- escaping questions)

2014-04-17 Thread Rustom Mody
On Thu, Apr 17, 2014 at 11:31 PM, Bastien  wrote:

> Rustom Mody  writes:
>
> > Ive checked it about 4 times.
> > I cant exactly give the exact offending file because once it goes
> > into 100% cpu mode theres nothing I can do but to kill emacs from a
> > shell.
>
> Probably an Emacs issue, M-x report-emacs-bug and provide the recipe.
>
>
Sure I can do that.

It looks like some runaway regexp falling off the end of file to me:

It does not happen with builtin org (7.9)
Happens with what I pulled yesterday 8.2.5e
Happens equally with emacs23 and 24
Does not happen if the table is followed by anything
So if you still think it classifies as an emacs bug I can file it

Please let me know

Rusi

-- 
http://www.the-magus.in
http://blog.languager.org


Re: [O] Bug? (was Request for worg page -- escaping questions)

2014-04-17 Thread Nick Dokos
Rustom Mody  writes:

> On Thu, Apr 17, 2014 at 9:42 PM, Bastien  wrote:
>
> Hi Rustom,
>
> >  3. How to enter a '|' into tables
>
> IIRC this is a FAQ: http://orgmode.org/worg/org-faq.html
>
> Trying to dig a bit into this -- some table issues -- I seem to have stumbled 
> onto a bigger issue: org seems to be crashing
> emacs.
>
> Ive checked it about 4 times.
> I cant exactly give the exact offending file because once it goes into 100% 
> cpu mode theres nothing I can do but to kill emacs
> from a shell.
>
> 1 Started org with: make vanilla in org directory
> 2 version is 8.2.5e
> 3. Now I edit something.org (to get into org mode):
> 4 Now type as follows
> * Intro
> |a|b|c^
> 5. (point is at ^)Hit C-c C-c
> emacs hangs (ie gets unresponsive, cpu 100% needs to be killed from outside)

Does

(setq debug-on-quit t)

and pressing C-g do anything?

Nick





Re: [O] Bug? (was Request for worg page -- escaping questions)

2014-04-17 Thread Bastien
Rustom Mody  writes:

> Ive checked it about 4 times.
> I cant exactly give the exact offending file because once it goes
> into 100% cpu mode theres nothing I can do but to kill emacs from a
> shell.

Probably an Emacs issue, M-x report-emacs-bug and provide the recipe.

-- 
 Bastien



Re: [O] Counting number of children under heading

2014-04-17 Thread Doyley, Marvin M.

Hi Thorsten,

It is not working like a charm.

Thanks
M



[O] Bug? (was Request for worg page -- escaping questions)

2014-04-17 Thread Rustom Mody
On Thu, Apr 17, 2014 at 9:42 PM, Bastien  wrote:

> Hi Rustom,
>
>
> >  3. How to enter a '|' into tables
>
> IIRC this is a FAQ: http://orgmode.org/worg/org-faq.html
>

Trying to dig a bit into this -- some table issues -- I seem to have
stumbled onto a bigger issue: org seems to be crashing emacs.

Ive checked it about 4 times.
I cant exactly give the exact offending file because once it goes into 100%
cpu mode theres nothing I can do but to kill emacs from a shell.

1 Started org with: make vanilla in org directory
2 version is 8.2.5e
3. Now I edit something.org (to get into org mode):
4 Now type as follows
* Intro
|a|b|c^
5. (point is at ^)Hit C-c C-c
emacs hangs (ie gets unresponsive, cpu 100% needs to be killed from outside)


Re: [O] babel and long-running computations

2014-04-17 Thread Nick Dokos
Christoph Groth  writes:

> Eric Schulte  writes:
>
>> Currently Babel does not have support for long-running computations,
>> however this feature has been discussed and there are previous
>> messages on the mailing list and even some comments in the code
>> outlining a potential implementation strategy.  So this may change
>> if/when someone finds the time and drive to tackle the implementation.
>
> Hmm, I searched the list archives before asking of course, but I didn’t
> find any previous discussion.  Could you please provide some references?
>

One example:

 http://thread.gmane.org/gmane.emacs.orgmode/52852

--
Nick





Re: [O] HTML export to just a single file?

2014-04-17 Thread Bastien
"Diez B. Roggisch"  writes:

> I don't want that. I don't want HELP/Toggle View headers, or
> navigational links.

There is no HELP/Toggle header in the default configuration

> I don't need to navigate the document using key-commands.
>
> Just all the content laid out in a large document.

Maybe you can show what is the output of C-c C-e h h with
emacs -Q and what you don't want in there?

-- 
 Bastien



Re: [O] babel and long-running computations

2014-04-17 Thread Christoph Groth
Eric Schulte  writes:

> Currently Babel does not have support for long-running computations,
> however this feature has been discussed and there are previous
> messages on the mailing list and even some comments in the code
> outlining a potential implementation strategy.  So this may change
> if/when someone finds the time and drive to tackle the implementation.

Hmm, I searched the list archives before asking of course, but I didn’t
find any previous discussion.  Could you please provide some references?

Thanks,
Christoph




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

2014-04-17 Thread Arun Persaud
Hi

>> Is there a reason not to allow link-syntax like
>> remote(file:::, )?
> 
> 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.

thanks for the answer. It would be nice to be able to reference tables
in other files easily though, so some form of : would
be great for the remote call. Is there some special ref syntax that
could be used here?

Arun



Re: [O] empty default captions for src blocks

2014-04-17 Thread Bastien
Hi Nicolas,

Nicolas Goaziou  writes:

> Well, not really. But it looks like a bug on the "listings" side, not
> the Org one. If we add a workaround in Org core, it may stay here
> forever, even after the bug is fixed upstream. I think the OP should
> first ask "listings" maintainer about it.

Dominik, can you ask the listings maintainers about this?

In the meantime, let's stick with the current workaround.

-- 
 Bastien



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

2014-04-17 Thread Bastien
Nicolas Goaziou  writes:

> You forgot to update :version and :package-version keywords in the
> defcustom.

Indeed, fixed, thanks,

-- 
 Bastien



Re: [O] empty default captions for src blocks

2014-04-17 Thread Nicolas Goaziou
Hello,

Bastien  writes:

> Bug confirmed and fixed in maint, with a dummy fix:
>
> Nicolas, do you see another way around this?

Well, not really. But it looks like a bug on the "listings" side, not
the Org one. If we add a workaround in Org core, it may stay here
forever, even after the bug is fixed upstream. I think the OP should
first ask "listings" maintainer about it.


Regards,

-- 
Nicolas Goaziou



Re: [O] HTML export to just a single file?

2014-04-17 Thread Diez B. Roggisch
On Apr 17, 2014, at 5:59 PM, Bastien wrote:

> Hi Diez,
> 
> "Diez B. Roggisch"  writes:
> 
>> So - is there a way to get my beloved single page HTML file export
>> back?
> 
> C-c C-e h h should do -- or maybe I misunderstood the question.


No, unfortunately it doesn't. If you open the created file (which is btw. 
nothing different than the thing I already do - C-c C-e h o), you will see that 
it immediately collapses to just the first section.

I don't want that. I don't want HELP/Toggle View headers, or navigational 
links. I don't need to navigate the document using key-commands.

Just all the content laid out in a large document.

Diez




signature.asc
Description: Message signed with OpenPGP using GPGMail


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

2014-04-17 Thread Nicolas Goaziou
Hello,

Bastien  writes:

> Indeed.  The default in now `nil'.

You forgot to update :version and :package-version keywords in the
defcustom.


Regards,

-- 
Nicolas Goaziou



Re: [O] small folding issue

2014-04-17 Thread Bastien
Hi Robert,

yes, this is a tickling issue.

I circumvent it by using (setq require-final-newline t)
in my emacs.el, as the proper fix is somewhat tricky.

-- 
 Bastien



Re: [O] Request for worg page -- escaping questions

2014-04-17 Thread Bastien
Hi Rustom,

Rustom Mody  writes:

>  1. How to put a '=' into code

~=~

>  2. How to start a line with a '*' -- (a) for headers (b) for
> ordinary lines?

*A line.

* A header

* * A header starting with a '*'

>  3. How to enter a '|' into tables

IIRC this is a FAQ: http://orgmode.org/worg/org-faq.html

>  4. Newlines -- \\ behaves inconsistently in latex and html [Same  as
> above because its about escaping newlines]

You mean it is "visually inconsistent" or "functionally" inconsistent?

(In HTML \\ will insert , which is the right thing to do IMO.)

>  5. How to make normal (ie not radio) text like this <>

Remove radio links from `org-activate-links'.

>  6. How to make normal text that looks like  [fn::somestuff]

Mhhh... what do you mean by look like?

> Note all these may not have solutions, eg a C programmer cannot get a
> '*/' into a comment however he may try.  However he can get a '\'
> into a string or a quote mark itself with '\\' and '\"'.  For getting
> a '%' into a printf format however, '\%' is not the way but '%%' Such
> things are documented (and taught to) C programmers.
>
> Just expressing a similar need of org-moders!

Hopefully you get enough to start a tutorial on Worg :)

-- 
 Bastien



Re: [O] org-table-copy-down incrementor

2014-04-17 Thread Bastien
Hi Stacey,

Stacey Marshall  writes:

> I am not a member of this list...  I discovered it via
> , a link to the list there would
> be helpful.

I added a link to the manual, thanks.

> I discovered org-table-copy-down and its ability to increment dates.
> I would like to be able to specify the number to increment, and then
> ideally increment by that number again.  For example lets say I want
> to create a table of Mondays

The idea came up earlier on to let org-table-copy-down increment by
using a table formula -- which is my TODO list for Org 8.3.  I'll let
the list know when it's ready, but I think it would be a useful
feature.

Thanks,

-- 
 Bastien



Re: [O] HTML export to just a single file?

2014-04-17 Thread Bastien
Hi Diez,

"Diez B. Roggisch"  writes:

> So - is there a way to get my beloved single page HTML file export
> back?

C-c C-e h h should do -- or maybe I misunderstood the question.

HTH,

-- 
 Bastien



[O] HTML export to just a single file?

2014-04-17 Thread Diez B. Roggisch
Hi,

there was a time (org 7.x) when I was able to use org-mode to write google doc 
documents - by actually composing them in emacs, and then use the exported 
single-page HTML and paste it into a google doc.

Since org 8.x (I'm currently using 8.2.5h), I get this separation in navigate 
able sections.

I unfortunately have no use for that feature.

So - is there a way to get my beloved single page HTML file export back? 

Thanks,

Diez


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] babel and long-running computations

2014-04-17 Thread Eric Schulte
Christoph Groth  writes:

> Thorsten Jolitz  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
>
>

Hi Christoph,

Currently Babel does not have support for long-running computations,
however this feature has been discussed and there are previous messages
on the mailing list and even some comments in the code outlining a
potential implementation strategy.  So this may change if/when someone
finds the time and drive to tackle the implementation.

Best,

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



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

2014-04-17 Thread Eric Schulte
Alan Schmitt  writes:

> Hello,
>
> 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?
>

#+name: z
: bar

#+name: test1
#+begin_src emacs-lisp :var x="foo"
x
#+end_src

#+name:test2
#+begin_src emacs-lisp :var y=test1(x=z)
y
#+end_src

#+RESULTS: test2
: bar

Best, Eric

>
> Thanks,
>
> Alan
>

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



Re: [O] is it possible to customise what headline level which-function displays?

2014-04-17 Thread Bastien
Hi Eric,

Eric S Fraga  writes:

> I have not been able to figure out how which-function picks up the
> information it displays.  Is there any way to customise org to
> display different information?

`which-function' uses `imenu--index-alist' so you can
change the value of `org-imenu-depth' from 2 to 3 to get
what you want (not tested.)

HTH,

-- 
 Bastien



Re: [O] Embedding an image in base64; exporting to ascii, html, and latex?

2014-04-17 Thread Bastien
Hi Grant,

Grant Rettke  writes:

> Got curious about how one might embed an image in base64 encoding
> inside an org mode document and allow export
> to asciii, html, and latex.

I somehow remember Ken Mankoff suggested this a while ago.

I see how base64 images can be used for HTML, but I don't know
how to use them for LaTeX -- and I doubt it makes sense.  But for
HTML, yes, we can explore this feature... on my MAYBE list!

Thanks,

-- 
 Bastien



Re: [O] [bug] customizing org-journal file format breaks calendar integration

2014-04-17 Thread Bastien
Hi Amit,

Amit Patel  writes:

> I just started using org-journal (with org-mode 8.2.5h) and went
> through the customization options. I wanted my journal files to use
> -MM-DD instead of MMDD, so I changed two variables:
>
> org-journal-file-format to "%Y-%m-%d"
> org-journal-file-pattern to "[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}"
>
> However, this breaks browsing journal entries with the calendar, as
> well as org-journal-open-next-entry
> and org-journal-open-previous-entry.

I'm not sure org-journal's developer is reading the list.

Maybe you'll get a better answer by filling an issue here:
https://github.com/bastibe/org-journal/issues

Hope this helps,

-- 
 Bastien



Re: [O] babel and long-running computations

2014-04-17 Thread Eric S Fraga
On Thursday, 17 Apr 2014 at 11:52, Christoph Groth wrote:

[...]

> - Not freezing the editor during the execution of a task

This is a problem but I solve this by running multiple instances of
emacs.  The difficulty arises if you wish to edit the same file in more
than one emacs...  but if you can avoid this, multiple instances work.

> - Being able to execute multiple independent tasks in parallel

Ditto.

> - Being able to interrupt a running task

Trickier but easy enough via the shell, of course (kill xxx).

> - Being able to inspect the incomplete output of a running task

Tricky as well unless the task sends its output to a file or even "tee"s
the output so that you can "tail -f" that file.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.5h-898-g11f8ef



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

2014-04-17 Thread Eric S Fraga
On Wednesday, 16 Apr 2014 at 20:28, M wrote:
> This is off-topic, but I hope that someone can give me some good advice:

Not at all off-topic.

> 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.

There's definitely no need to keep all org emails as they are archived
on gmane.  Streamline your 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 in
> such a list (without doing it as a full time job)?

As others have said: gnus with scoring (adaptive or manual) and by
judicious use of killing threads that are not of interest to you.  Given
the broad nature of org's capabilities, many thread topics may not be
relevant to you at any given time.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.5h-898-g11f8ef



Re: [O] Fwd: Is `org-preview-latex-fragment` sensitive to alignment specified by document class options?

2014-04-17 Thread Bastien
Hi Rob,

Rob Stewart  writes:

> I asked the question below a few days ago, about whether
> `org-preview-latex-fragment` is sensitive document class options that
> might affect alignment. I've so far not received feedback, and
> wondered whether there is more information that I could provide, or if
> my question is not interesting to other people :-)

You got two answers: was one of them useful to you?

Please follow-up on issues you raise on the mailing list,
especially when you insist on getting an answer, this keeps
everyone happy to help.

Thanks!

-- 
 Bastien



Re: [O] ox-bibtex: Customization of HTML heading

2014-04-17 Thread Bastien
Hi Julian,

Julian Gehring  writes:

> Would it be reasonable to have an additional option for customizing the
> HTML heading of the reference section for ox-bibtex?

Yes -- I added the word "References" to `org-export-dictionary',
and ox-bibtex.el is now using it.

Can you provide a patch to translate it into german?

Thanks!

-- 
 Bastien



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

2014-04-17 Thread J. David Boyd
Bastien  writes:

> Hi,
>
> jdavidb...@adboyd.com (J. David Boyd) writes:
>
>> 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.
>
> You can use C-c C-x C-w to kill (cut) a subtree then C-c C-x C-y to yank
> (paste) it again: if the subtree was folded when you cut it, it will be
> pasted and folded.
>
> HTH,

I should have know it was in there somewhere.  Thanks for the info!

Dave




Re: [O] empty default captions for src blocks

2014-04-17 Thread Bastien
Hi Dominik,

Dominik Ernst  writes:

> I have a small question, I hope it is right here.

It is!

> #+BEGIN_SRC
> vmpovapd %%zmm0, %zmm1
> #+END_SRC

(Btw, you need a language after BEGIN_SRC ...)

> which results in the rendered pdf as two listings with the same caption, 

Bug confirmed and fixed in maint, with a dummy fix:

Nicolas, do you see another way around this?

-- 
 Bastien



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

2014-04-17 Thread J. David Boyd
Thorsten Jolitz  writes:

> 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

Thanks, I like the idea of moving to the end automatically and pasting it
folded.  That is great!

Dave




Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater  writes:

> Using this a bit, it doesn't quite do what I want it to do.
>
> Is there any way to sort recursively?

Not implemented, but you can hack around.

Anyway, "sorting recursively" sounds like a nice idea but you
probably want to just run this once in a while, not often enough
to require a core command for that.

-- 
 Bastien



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

2014-04-17 Thread Igor Sosa Mayor
Sacha Chua  writes:

[...]
> I also have some more rules that score things up if they mention my name
> or other things I'm interested in. =)
>
> Hope that helps!

yes, it helps a lot. At least me... 

But I'm still unsure how to use it exactly... Is your config visible
anywhere? 

many thanks in advance.




Re: [O] babel and long-running computations

2014-04-17 Thread Waldemar Quevedo
Hey Christoph,

Not sure if this would help you, but I've playing with the idea of
extracting some of the functionality that Org babel provides and created a
small tool for doing reproducible runs using Org mode syntax:
https://gist.github.com/wallyqs/10989253
It is based on the Org ruby parser implementation so not all the latest
syntax and features are covered...

I named it `org-converge` in the sense that a reproducible run should
converge into the same result, and also because in the long run I hope to
achieve some similar functionality (or at least wrap around) what is
possible to do currently with tools like chef, ansible etc...

I' ve found it useful for doing reproducible runs along with other tools
like Chef and Capistrano, and also for some development work. If you have
some ideas or feature requests the feedback is welcome :)
The repository is here: https://github.com/wallyqs/org-converge

Hope this helps,

- Wally


On Thu, Apr 17, 2014 at 9:45 PM, Christoph Groth
wrote:

> Thorsten Jolitz  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] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater  writes:

> 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.

... or wait a bit more and send your gratitude as patches!

-- 
 Bastien



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

2014-04-17 Thread Bastien
Hi,

jdavidb...@adboyd.com (J. David Boyd) writes:

> 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.

You can use C-c C-x C-w to kill (cut) a subtree then C-c C-x C-y to
yank (paste) it again: if the subtree was folded when you cut it, it
will be pasted and folded.

HTH,

-- 
 Bastien



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  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  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  wrote:
>>
>>> Noah Slater  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] Counting number of children under heading

2014-04-17 Thread Thorsten Jolitz
Marvin Doyley  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] 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  writes:

> Hi Alan,
>
> Alan Schmitt  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] (OT) How to follow a mailing list with very high activity (like this one here)?

2014-04-17 Thread Bastien
John Hendy  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] 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  writes:

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

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] Kill ring contains non-killed output after an export

2014-04-17 Thread Bastien
Hi Konstantin,

Konstantin Kliakhandler  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] Kill ring contains non-killed output after an export

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

Richard Lawrence  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] [babell] How to report generated files and generation time from org-babel-tangle?

2014-04-17 Thread Bastien
Hi Grant,

Grant Rettke  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] Clocktable for this week starting at Sunday

2014-04-17 Thread Bastien
Hi Torben,

Torben Hoffmann  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] (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  wrote:
> John Hendy  writes:
>
>> On Apr 16, 2014 2:29 PM, "M"  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] Feature Request. org-bibtex-tags-are-keywords inherit tags

2014-04-17 Thread Bastien
Hi Leonard,

Leonard Randall  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] (org-insert-headline '(4)) should insert new headline before point

2014-04-17 Thread Bastien
Hi York,

York Zhao  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] 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] problem with call lines with post block that are not exported (elpa org)

2014-04-17 Thread Bastien
Hi Alan,

Alan Schmitt  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] 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] noninteractive use of org-export

2014-04-17 Thread Bastien
Julien Cubizolles  writes:

> Thanks for guiding me.

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

-- 
 Bastien



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] (OT) How to follow a mailing list with very high activity (like this one here)?

2014-04-17 Thread J. David Boyd
John Hendy  writes:

> On Apr 16, 2014 2:29 PM, "M"  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] Counting number of children under heading

2014-04-17 Thread Eric Abrahamsen
Thorsten Jolitz  writes:

> Eric Abrahamsen  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] noninteractive use of org-export

2014-04-17 Thread Julien Cubizolles
Bastien  writes:

> Julien Cubizolles  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.



[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] (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"  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
>
>
>


Re: [O] babel and long-running computations

2014-04-17 Thread Christoph Groth
Thorsten Jolitz  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] 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  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  wrote:
>
>> Noah Slater  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
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  wrote:

> Noah Slater  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  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 Bastien
Noah Slater  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 Bastien
Noah Slater  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 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  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  wrote:
>
>> Noah Slater  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 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  wrote:

> Hi Noah,
>
> Noah Slater  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] babel and long-running computations

2014-04-17 Thread Thorsten Jolitz
Christoph Groth  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
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  wrote:

> Noah Slater  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  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 
Subject: Re: Get counting of items
Newsgroups: gmane.emacs.orgmode
To: "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 Bastien
Noah Slater  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] 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  wrote:

> Noah Slater  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 Bastien
Noah Slater  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] Org clock cookies

2014-04-17 Thread Bastien
Hi Noah,

Noah Slater  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



  1   2   >