Re: [O] [babel] Commenting out src blocks for tangling

2013-10-19 Thread Alan Schmitt
schulte.e...@gmail.com writes:

 I just tried it with my init file and it did not work. Here is a
 minimal example. Save this as test.org:

 --8---cut here---start-8---
 * Testing

 #+BEGIN_SRC emacs-lisp
 (message hello world)
 #+END_SRC

 * COMMENT Commenting

 #+BEGIN_SRC emacs-lisp
 (message Salut le monde 2)
 #+END_SRC
 --8---cut here---end---8---

 Then do a M-x org-babel-load-file giving test.org as file name.

 If you look at *Messages*, or at the generated test.el, you will see the
 second block has been tangled.

 Am I missing something with this feature, or is this a bug? (I tried
 with emacs -Q and loading a current org, and the same happens.)


 I can't reproduce, both manual tangling and tangling through
 org-babel-load-file only tangle the first block for me.  Maybe you
 aren't using a current version of Org-mode.

 I'm on.

 Org-mode version 8.2.1 (release_8.2.1-99-g2eef1b @ 
 /home/eschulte/src/org-mode/lisp/)

Thanks, my version was a couple weeks old and the current version does
work with this example. However I could not make it work with this
slightly bigger example:

--8---cut here---start-8---
* Testing

#+BEGIN_SRC emacs-lisp
(message hello world)
#+END_SRC

* COMMENT Commenting

#+BEGIN_SRC emacs-lisp
(message Salut le monde 2)
#+END_SRC

** Testing sub tree

#+BEGIN_SRC emacs-lisp
(message hello subtree)
#+END_SRC
--8---cut here---end---8---

I see that hello subtree is tangled. Does it mean that to comment a
whole tree I need to comment every subtree (recursively)?

Thanks,

Alan



Re: [O] linebreak after tag of headline in ox-latex.el

2013-10-19 Thread Nicolas Goaziou
Hello,

Rasmus Rempling 400...@gmail.com writes:

 I export frequently minutes with todos with latex to pdf. I always
 include planning information, e.g.:

 * NEXT Check this :Rasmus:
 DEADLINE: 2013-10-15 tis SCHEDULED: 2013-10-15 tis
 + some comments

 After upgrading to (Org-mode version 8.2.1, GNU Emacs 23.4.1 ) the
 deadline and schedule is not linebreaked after the tag. This gives
 a unwanted output with all task information on the same line.

I cannot reproduce this. Do you use some special class sectionning
format?


Regards,

-- 
Nicolas Goaziou



[O] Synchronizing folder structure with heading structure (was: Create sub-directories and files from within org)

2013-10-19 Thread Karl Voit
* Chris Henderson henders...@gmail.com wrote:

 If I create a project with ** project name, is there any way to create a
 sub-directory at *** level in ~/projects/project name and create txt files
 in that directory - all from within org?

Disclaimer: this is not an answer to your question but a remark.

I know of a cool project (non Org-mode related) from the Personal
Information Management professor William Jones (Univ. of Washington)
which is called Planz[1][4] (videos: [5]).  Its associated data
standard is called xooml[2]. (In case you are more interested in
this project/topic, drop me a line and I will happily share white
papers and links.) 

Simplified, the idea is that you can manage your files together with
an outlining structure of text, links, and such. The SW is
Windows-only. However, I found the idea very appealing because it
synchronizes folder structure together with the structure of your
text information.

It's a research software and thus it is not that good maintained.

Prof. Jones was a reviewer of my PhD thesis[3]. And we discussed a
bit the similarities and differences of Org-mode (my favorite tool)
to Planz (his favorite tool).

Since Planz is a decent Windows interface with cool workflow
support, I was thinking about implementing a bi-directional
synchronization tool between Org-mode and Planz. This should not be
that tough to do since xooml is based on text files (XML) and
Org-mode supports attached files and folders and such. However, my
focus changed (and I am not using Windows) and therefore the idea
pretty much died on my SOMEDAY ocean :-(

I just wanted to throw in this idea. Maybe somebody finds
Planz/xooml that cool that he/she is willing to spend a few
LISP-hours with it :-)


For the sake of completeness, I want to add that there is also
research work from Boardman et al. (approx. 2000-2006) who was
researching and propagating synchronizing hierarchical structures in
emails, bookmarks, file system, and so on. WorkspaceMirror is a tool
which was developed within this project. Interesting stuff to read.

In case you are interested in reading more about those projects, get
my PhD thesis from [3] (whitepaper section). In the background
chapter, there is plenty of cool stuff described and linked :-)

  1. http://kftf.ischool.washington.edu/planner_index.htm
  2. https://code.google.com/p/xooml/source/browse/#svn/trunk/Planz
  3. http://tagstore.org
  4. https://en.wikipedia.org/wiki/Planz
  5. https://www.youtube.com/watch?v=w0YbebvDUd0noredirect=1
-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

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




Re: [O] Drag images from Firefox to org-mode

2013-10-19 Thread Oleh
Thanks for the feedback, Rick.

I strongly disagree, for a couple of reasons:

 - Esp. on non-unix systems, the contents of the cut-buffer are not
   necessarily the same as the contents of the system clipboard. This
   is the problem I was having w/ your code on windows, where the
   cut-buffer contained the value of the current (or possibly last)
   selection, but the clipboard had a url.


This can be fixed with a platform-aware function that checks both the
clipboard and the cut-buffer.


 - It is certainly possible to type in a url


URL to a site - maybe (still, probably 90% of people will copy it), but
an image where the relative path is just gibberish - certainly not.
And the point is that the clipboard is resorted to when drag-and-drop fails,
i.e. the image is a link and we want the link to the image, not the link
itself.
At that point, to get the address of the image, the user either clicks
Copy Image Location or View Image. With View Image there's an extra
step of copying the URL from the address bar.
At this point, when URL is surely in the clipboard, so extra yanking and
confirming is just red tape.


 - You might want to DND a url from another buffer.

No problem - M-w in one buffer, and `org-download-image' in the other.


 - It is ergonomically wrong for an interactive function defined to
   take an argument (and called download-image) to automagically use a
   value from somewhere else and not actually take an argument.

A new function with name `org-download-yank' can be added, no problem. And
Emacs is automagical by nature: I don't know why C-s C-w makes sense, but I
love it.


 It would however, make sense for the function to use the current
 clipboard contents if called with a prefix.

A customizable option can be added to configure this behavior.



 In the same vein, I was thinking about the automagically creating a
 subdirectory based on a top level heading. This is also wrong for a
 couple reasons:

 - Creating a potentially =very long directory name with spaces= can
   cause multiple problems, both on unix and esp. non-unix systems,
   where spaces may not be allowed in directory names, or there may be
   limits on filename/directory length.

 This can be fixed by adding `org-download-max-filename-length`. When it
overflows, just resort to `default-directory' and provide a message/option
to fix.
By the way, which system doesn't allow for spaces in directory names?

- The use of the top-level heading is arbitrary and may have nothing
   to do with the current context (for instance, i sometimes group
   together multiple documents to be output w/ export subtree in the
   same master document)

Can be configured with a different function name / file-local variable.
I just think that sorting inline links by headings for some level (not
necessarily top-level, configuration should be added) is a useful idea.

My use case is figures for weekly assignments for an online course:
each week has a top-level heading: all movies and slides go there, as
well as the figures for the assignments. I wouldn't want 15 weeks worth
of figures to be stored in one dir.



 The default should be to save it in the same directory as the document
 (which by the way, may not be in emacs's idea of the current
 directory). Also, the filename should not be expanded to an absolute
 path, which makes the document non-portable and will break publishing.

This is a very good remark.



 If you want the ability to create arbitrary output directories based
 on document context, the customization can be made to accept a
 function (lambda) as a value, which could then return a directory
 prefix.

This isn't an option for users with no elisp skills. Customization is a
nice way to show what kind of things can be done. And when a user
requires just a bit more tweaking after the customization, she can ask on
the list.


 While i realize the current implementation meets your needs, if the
 code is to be included in the org-mode distribution it should follow
 emacs and org conventions and not contains any suprises.

I agree of course. It's still work in progress.


 I would be glad to make the above changes on tuesday when i get back
 to the office. Please send me (again) the url of the github repos with
 the current set of changes and I will update it so that it will allow
 the current functionality but have less magical default behavior.

The repo is at https://github.com/abo-abo/org-download.
I'll probably add some fixes and functionality in the meantime.

regards,
Oleh


[O] Watching the competition

2013-10-19 Thread Nick Dokos
LWN recently published an article on Fargo/Concord which might be of interest:

http://lwn.net/Articles/569269/

And it even mentions org-mode.

-- 
Nick






[O] Writing Challenge

2013-10-19 Thread Bob Newell
A couple of us who are writers have worked on a writing challenge
spreadsheet. This year, for the upcoming National Novel Writing Month,
I've greatly modified (read: made more complex) the challenge
spreadsheet, and implemented it in org-mode.

It's attached, for anyone who's interested. I know there are other
writers and WriMos out there.

It probably has bugs. No, it surely has bugs. Comments welcomed.

I'm kind of attachment-challenged so if it doesn't appear below, get it
at

http://www.bobnewell.net/filez/newchallenge.org

-- 
Bob Newell
Honolulu, Hawai`i
* Sent via Ma Gnus 0.8-Emacs 23.3-Linux Mint 13 *

#+STARTUP: align

* The new writing challenge - how it works

There are three numbers that enter into the challenge: base words,
quota words, and target words. The base is the minimal number of words
to write every day to count as a writing day. The quota is the number
of words you must write to meet the challenge. It is a dynamic value
which increases as you write more and decreases as you write less. The
target is the number of words you must write to reach your word goal by
the end of the challenge.

So for NaNoWriMo, the target is definitely 1667. The base can be
whatever you wish, but 250 seems good as a general number, for NaNo as
well as other challenges. The base should /not/ be set too high. The
whole point is to make each and every day a writing day, and not make
it so burdensome that it's easier to skip.

In non-NaNoWriMo-like situations, you may well want to set the target
equal to the base. It's up to you. However, if you have a deadline for,
say, a 10,000 word novelette, you can set the target accordingly by
dividing the number of days to deadline by the required word count.

You must write at least the 'base words' every day to keep
your chain going. If you write at least 'base words' you get a score
addition equal to your new chain count, but never less than a one point
addition.

Chain count increases by 1 if you meet quota exactly. It increases by
less than 1 if you're under quota but still at least at the base words
count. Chain count increases by more than 1 if you exceed quota. Chain
count will always increase if you meet base word count.

Quota then changes for the next day. The value is the multiple of the
most recent chain count times the increment value. The increment value
shouldn't be set too high. 4 is a good number; this would mean an
increase of about 120 over the course of the month if you write to
quota each day.

If you don't do the base word count, on the first day you miss, chain
count goes to -1. The chain count decreases by one for each missed day
in a row. The total score is decreased on each missed day by the chain
count. So as you miss more days, score drops faster. Quota gets reset to
the base word count. Score never goes below zero, though (it's like a
total reset when you reach zero).

When you starting meeting the base word count again, chain count is
changed to a positive number with the scoring and quota rules as above.

Sensitivity to being under or over quota is fairly low. The recommended
logbase value is 100 which yields log 100 of words/quota). You do get a
boost for being way over quota and less of a boost for being under, but
the real sensitivity of the method is to writing the base amount every
day for as many days in a row as possible. For this reason a low value
of logbase (which would lead to bigger chain count changes) isn't
recommended.

The target influences score but not chain count. Score is increased or
decreased based on both daily performance vs. target and cumulative
word count vs. cumulative target. The parameter tdlogbase controls
daily sensitivity, and tclogbase controls cumulative sensitivity. Make
these large numbers (like 1000) to largely cancel these score effects
if you don't want them. 100 for tdlogbase and 200 for tclogbase are
recommended for moderate but not excessive influence. 

Note that it is possible for score to decrease even if base and or quota
are met in a given day, due to target influences. Getting way behind on
cumulative target will have lasting effects. 

Point counts can get pretty large with sustained writing. The method
should be reset after each challenge period, which might be 30, 60, or
at most 90 days. A month is probably best.

This method is derived and modified from the original Hawai`i challenge
(by Tony Pisculli) which, while truly excellent, was fairly static and
used fewer tracking and scoring factors. The new method is more in line
with what you'd expect from an MIT engineer.

The advantage of the new method is that it is dynamic and adjusts to
performance. The more you write, the more you need to write to get
bigger bonuses. If you slack off, you still need to write minimums but
there is some mercy on the quota.  Bonuses are sustained by being built
in to the chain count. This makes the new method a stretch
method. However, using log 100 instead of log 10 ensures that the
stretch is 

Re: [O] [babel] Commenting out src blocks for tangling

2013-10-19 Thread Eric Schulte
Alan Schmitt alan.schm...@polytechnique.org writes:

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

 I just tried it with my init file and it did not work. Here is a
 minimal example. Save this as test.org:

 --8---cut here---start-8---
 * Testing

 #+BEGIN_SRC emacs-lisp
 (message hello world)
 #+END_SRC

 * COMMENT Commenting

 #+BEGIN_SRC emacs-lisp
 (message Salut le monde 2)
 #+END_SRC
 --8---cut here---end---8---

 Then do a M-x org-babel-load-file giving test.org as file name.

 If you look at *Messages*, or at the generated test.el, you will see the
 second block has been tangled.

 Am I missing something with this feature, or is this a bug? (I tried
 with emacs -Q and loading a current org, and the same happens.)


 I can't reproduce, both manual tangling and tangling through
 org-babel-load-file only tangle the first block for me.  Maybe you
 aren't using a current version of Org-mode.

 I'm on.

 Org-mode version 8.2.1 (release_8.2.1-99-g2eef1b @ 
 /home/eschulte/src/org-mode/lisp/)

 Thanks, my version was a couple weeks old and the current version does
 work with this example. However I could not make it work with this
 slightly bigger example:

 --8---cut here---start-8---
 * Testing

 #+BEGIN_SRC emacs-lisp
 (message hello world)
 #+END_SRC

 * COMMENT Commenting

 #+BEGIN_SRC emacs-lisp
 (message Salut le monde 2)
 #+END_SRC

 ** Testing sub tree

 #+BEGIN_SRC emacs-lisp
 (message hello subtree)
 #+END_SRC
 --8---cut here---end---8---

 I see that hello subtree is tangled. Does it mean that to comment a
 whole tree I need to comment every subtree (recursively)?

 Thanks,

 Alan

I just pushed up a fix, thanks for catching this bug.

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



Re: [O] Writing Challenge

2013-10-19 Thread Ivan Andrus
Very interesting! I have been working on a mode which gives the current 
word-count, WPM and an estimate of the time it will take to hit today's quota 
in the modeline.  I would be interested in feedback as well as integrating it 
with your spreadsheet.  You can find it at

https://bitbucket.org/gvol/nanowrimo.el

-Ivan

On Oct 19, 2013, at 3:03 PM, Bob Newell bobnew...@bobnewell.net wrote:

 A couple of us who are writers have worked on a writing challenge
 spreadsheet. This year, for the upcoming National Novel Writing Month,
 I've greatly modified (read: made more complex) the challenge
 spreadsheet, and implemented it in org-mode.
 
 It's attached, for anyone who's interested. I know there are other
 writers and WriMos out there.
 
 It probably has bugs. No, it surely has bugs. Comments welcomed.
 
 I'm kind of attachment-challenged so if it doesn't appear below, get it
 at
 
 http://www.bobnewell.net/filez/newchallenge.org
 
 -- 
 Bob Newell
 Honolulu, Hawai`i