Re: [O] particular capture method for a diet .. ?

2011-04-23 Thread Stinky Wizzleteet
Christopher Allan Webber cweb...@dustycloud.org writes:

Wow, really, that's awesome and inspring.
Congratulations !

I think the hacker's diet is the most useful thing to come out of autodesk.
The first time I lost some serious weight was when I followed the
hacker's diet in 2001, I used his palm III app for that.
I've gained weight since the birth of my son and the start of my company
and I want to curb it before it gets out of hand.
I cap the caloric deficit at a 500 kcal deficit per day, because for me 
and my genetic background of overweight family this is probably
not a diet but a lifestyle and I understood that at higher deficits ones
metabolism is trying to adapt, trying to defeat the dieting
purpose. (citation needed) -I cannot provide proof nor reference to this 
statement-  

Your approach is *exactly* what I was meaning to eventually throw together.
I would love to take a look at your code, as a total noob I may be able
to hack a workable system for myself -eventually, but help maintaining will be
possible only on the long term. Once I've mastered lisp and org.

However, as I am not the only one interested in your system you might
want to consider dumping it loosely unorganized on github. but mailing
us a tar package would be cool too.


thx !
wzzl



 So I've been meaning to put something up on this in worg for a while.

 I've been dieting using orgmode, basic calorie tracking, and something
 resembling the ideas out of The Hacker's Diet for the last year
 (actually 2.5 years with a 1.5 year break in which I continued to
 weigh in mostly but didn't follow my calorie goals ;)) and have lost 
 60 pounds so far (originally was 275, not all that's recorded in my
 files during the first few weeks of dieting, anyway at 210 now), going
 from morbidly obese to just overweight, and I'm still losing weight
 (soon enough, being a fat guy will be far behind me).  Here's the
 org-babel generated gnuplot graphs to show it (regenerated and pushed to
 my site every morning):

 http://dustycloud.org/tmp/weight.png
 http://dustycloud.org/tmp/weight_month.png

 Here's a screenshot:
 http://dustycloud.org/tmp/org-diet2.png

 Roughly in the terrible amount of hacks that compose org-diet I've
 wrapped together these ideas/tools:
  - calorie tracking
  - recipe calorie calculation
  - weigh-in via org-capture
  - calorie clocking (clock out at the end of the day to verify you've
got accurate numbers for that day)
  - habit tracking of whether you've met your calorie goals
  - weight graphing with 10 day moving averaging to remove some of the
noise from a daily weigh in/out
  - bmi calculation
  - a really shitty calories-per-day-to-lose-to-meet-your-goals estimator

 It's really nothing complex, and mostly it's not software, just a
 methedology with a *slight* amount of poorly written software in elisp
 and org-babel, but the system works great.

 I planned after meeting my diet goals (hitting normal weight) that I'd
 release the whole thing (including my present diet file for reference)
 under GPLv3, document it in worg, and put my own diet file out there
 under CC0, but maybe I should do it sooner... problem is I don't have
 time presently while trying to work on http://mediagoblin.org on
 weekends to make a proper release, but I could at least bundle
 together everything you need to have a full system using my hacks for
 now if you want, with really terrible but usable documentation, without
 taking up too much time. :)

 Interested?  I could probably throw together a terrible tarball this
 weekend if you want to use it and post it to the list.

 One thing that's clear from the diet I've collected: whenever I've
 followed the system, without fail, I've lost weight.  When I've deviated
 I've stayed level or I've gained weight (the no-movement middle of the
 diet graph I linked to).  Follow the system, use habit tracking and
 stuff, stick to your calorie goals (I shoot for a lower occasional-goal
 of 1300 calories and an absolute minimum goal of 1600 calories), and it
 *fucking works* without any support of the bullshit diet industry.

 I've heard a few people saying they have interest in the stuff I have so
 maybe I should just do that crappy release for now; better than nothing?

 Hopefully being useful while making embarassing admissions about my
 body,
  - cwebb

 Stinky Wizzleteet wizzlet...@hotmail.com writes:

 Hi all,

 I am too fat.

 And I found in the past that the best way for me to loose weight is to
 log my eating habit every day and make sure that I eat between 1800 and
 2200 kcal/day, no more, but also not less.

 I want to figure out a way how to create a custom capture template to
 keep track of my daily intake.

 The result should be a diary-style org file were every day would be
 filled with a table that features an updated total and an item list:

 TOTAL:  1965 kcal
 |apple  |   80|
 |orange |   65|
 |energy drink   |   300|
 ... etc
 
 

[O] editing org-export-latex-default-packages-alist has no effect

2011-04-23 Thread Stinky Wizzleteet
Hi all,

thanks to help on this list I found out about this variable as I need to
omit the textcomp and fontenc packages in my exported latex header.
My tex file won't compile otherwise on my n900.

my init.el contains :

(custom-set-variables

  '(org-export-latex-default-packages-alist (quote ((AUTO inputenc t) (T1 
fontenc nil) ( fixltx2e nil) ( graphicx t) ( longtable nil) ( 
float nil) ( wrapfig nil) ( soul t) ( textcomp nil) ( 
marvosym t) ( wasysym t) ( latexsym t) ( amssymb t) ( 
hyperref nil) \\tolerance=1000)))

)

However, fontenc and textcomp are still in the org-generated tex file.
bug, or feature ?

best,
wzzl 
-- 
Stinky Wizzleteet thinks: 
You are standing on my toes.




[O] Implemented word count for subtrees

2011-04-23 Thread Simon Guest
Dear Org mode people,

I implemented word counting for Org mode sub-trees.  That is, count
each sub-tree, and accumulate totals into the parent heading lines.
Others have asked about this, so I attach my code below.

I started with Paul Sexton's code posted to the list on 21/2/11.  I
had some different requirements, so I hacked this mercilessly.  Sorry,
Paul.

I was most concerned about speed, so I removed any check that caused
repeated hunting around in the org mode buffer - all the contextual
stuff.

I also skip heading lines, as I didn't want them in my total.
(I'm using the wonderful Org mode to write a novel, and the heading
lines are for my organisation only, not part of the text.)

Anyway, here it is.  I use this key-binding in my .emacs.
 (define-key org-mode-map \C-c\C-xw 'org-wc-display)

By the way, it complains if you call it without mark being set.  I
want to use (interactive r) to handle regions, but don't know how to
handle this error case.  Suggestions welcome.

cheers,
Simon

;; org-wc.el
;;
;; Count words in org mode trees.
;; Shows word count per heading line, summed over sub-headings.
;; Aims to be fast, so doesn't check carefully what it's counting.  ;-)
;;
;; Simon Guest, 23/4/11
;;
;; Implementation based on:
;; - Paul Sexton's word count posted on org-mode mailing list 21/2/11.
;; - clock overlays

(defun org-in-heading-line ()
  Is point in a line starting with `*'?
  (equal (char-after (point-at-bol)) ?*))

(defun org-word-count (beg end) 
  Report the number of words in the Org mode buffer or selected region.
  (interactive r)
  (unless mark-active
(setf beg (point-min)
  end (point-max)))
  (let ((wc (org-word-count-aux beg end)))
(message (format %d words in %s. wc
 (if mark-active region buffer)

(defun org-word-count-aux (beg end)
  Report the number of words in the selected region.
Ignores: heading lines,
 blocks,
 comments,
 drawers.
LaTeX macros are counted as 1 word.

  (let ((wc 0)
(block-begin-re ^#\\\+BEGIN)
(block-end-re ^#\\+END)
(latex-macro-regexp [A-Za-z]+\\(\\[[^]]*\\]\\|\\){\\([^}]*\\)})
(drawers-re (concat ^[ \t]*:\\(
(mapconcat 'regexp-quote org-drawers \\|)
\\):[ \t]*$))
(drawers-end-re ^[ \t]*:END:))
(save-excursion
  (goto-char beg)
  (while ( (point) end)
(cond
 ;; Ignore heading lines.
 ((org-in-heading-line)
  (forward-line))
 ;; Ignore blocks.
 ((looking-at block-begin-re)
  (re-search-forward block-end-re))
 ;; Ignore comments.
 ((org-in-commented-line)
  (forward-line))
 ;; Ignore drawers.
 ((looking-at drawers-re)
  (re-search-forward drawers-end-re nil t))
 ;; Count latex macros as 1 word, ignoring their arguments.
 ((save-excursion
(backward-char)
(looking-at latex-macro-regexp))
  (goto-char (match-end 0))
  (setf wc (+ 2 wc)))
 (t
  (progn
(re-search-forward \\w+\\W*)
(incf wc))
wc))

(defun org-wc-count-subtrees ()
  Count words in each subtree, putting result as the property :org-wc on that 
heading.
  (interactive)
  (remove-text-properties (point-min) (point-max)
  '(:org-wc t))
  (save-excursion
(goto-char (point-max))
(while (outline-previous-heading)
  (org-narrow-to-subtree)
  (let ((wc (org-word-count-aux (point-min) (point-max
(put-text-property (point) (point-at-eol) :org-wc wc)
(goto-char (point-min))
(widen)

(defun org-wc-display (beg end total-only)
  Show subtree word counts in the entire buffer.
With prefix argument, only show the total wordcount for the buffer or region
in the echo area.

Use \\[org-wc-remove-overlays] to remove the subtree times.

Ignores: heading lines,
 blocks,
 comments,
 drawers.
LaTeX macros are counted as 1 word.
  (interactive r\nP)
  (org-wc-remove-overlays)
  (unless total-only
(let (wc p)
  (org-wc-count-subtrees)
  (save-excursion
(goto-char (point-min))
(while (or (and (equal (setq p (point)) (point-min))
(get-text-property p :org-wc))
   (setq p (next-single-property-change
(point) :org-wc)))
  (goto-char p)
  (when (setq wc (get-text-property p :org-wc))
(org-wc-put-overlay wc (funcall outline-level
;; Arrange to remove the overlays upon next change.
(when org-remove-highlights-with-change
  (org-add-hook 'before-change-functions 'org-wc-remove-overlays
nil 'local)
  (if mark-active
  (org-word-count beg end)
(org-word-count (point-min) (point-max

(defvar org-wc-overlays nil)
(make-variable-buffer-local 'org-wc-overlays)

(defun 

Re: [O] particular capture method for a diet .. ?

2011-04-23 Thread Christopher Allan Webber
Stinky Wizzleteet wizzlet...@hotmail.com writes:

 I cap the caloric deficit at a 500 kcal deficit per day, because for me 
 and my genetic background of overweight family this is probably
 not a diet but a lifestyle and I understood that at higher deficits ones
 metabolism is trying to adapt, trying to defeat the dieting
 purpose. (citation needed) -I cannot provide proof nor reference to this 
 statement-  

I've heard a lot about this, and when I started my diet I was at about
2600 calories on metabolism and set myself to approximately 1250
calories / day.  A bunch of people told me that my body would go into
starvation mode and it would count against me and it simply didn't
happen.  Advice: just don't overworry about it.

I think if you're at approximately 45% of your metabolism or more for
your daily caloric needs, it'll be fine.  I wouldn't recommend anyone
going lower than 1200 calories per day though.

Anyway, I'm at 1300-1600 calories / day now, it's not quite as super
fast of weight loss (about 7 pounds / month, still not bad!), but still
quite a bit of weight loss.  I think if you have a lot of weight to lose
you probably don't need to worry about it too much.

Also note that I barely exercised at all during my diet... when I did
exercise, I lost weight a little bit faster, but I simply don't believe
it's necessary for weight loss.  If you want to do it, great, but it's
simply easier to figure out how to eat the right amount of foods to feel
satisfied while having a serious calorie deficit.

 Your approach is *exactly* what I was meaning to eventually throw together.
 I would love to take a look at your code, as a total noob I may be able
 to hack a workable system for myself -eventually, but help maintaining will be
 possible only on the long term. Once I've mastered lisp and org.

 However, as I am not the only one interested in your system you might
 want to consider dumping it loosely unorganized on github. but mailing
 us a tar package would be cool too.

https://gitorious.org/org-diet/org-diet

I've gone and done it.  I haven't finished writing README.org but I've
added a base org-diet file to start with, the capture template in the
orgmode file, etc.

I've even checked in my whole embarassing diet.org file for you to see.
You'll notice that a few months into the thing I became a vegetarian,
but that was for ethical, not dietary reasons. :)

Once I am completely not a fat guy, I will upload the final diet.org.

As for how to find out how many calories things are I usually took three
approaches:

 - I used the program Food File, to which I made a couple of patches to
   make it run on GNU/Linux... I guess I should make those available
   soon.  It *was* released as free software under the GPL, not sure if
   the version online is still released as such.
 - Reading the back of packages
 - Looking at pre-existing data in my orgmode file.  Usually I'd split
   the file vertically and in one pane have my current daily diet table
   at point, in the other I'd be isearching for things I've already
   eaten... usually while dieting I tend to eat the same types of things
   a lot, but I've collected a vast amount of caloric information in
   there... maybe you can find how to eat a satisfying daily amount of
   calories by looking at some of my example days with successful
   CAL-OUT clocking
 - I just googled for things I didn't know.

Hope this is helpful to people!  I'll add more docs later.

(PS: the elisp is hacky, don't say I didn't warn you.)

-- 
퓒퓱퓻퓲퓼퓽퓸퓹퓱퓮퓻 퓐퓵퓵퓪퓷 퓦퓮퓫퓫퓮퓻



Re: [O] editing org-export-latex-default-packages-alist has no effect

2011-04-23 Thread Aankhen
Hi Stinky,

On Sat, Apr 23, 2011 at 12:54, Stinky Wizzleteet wizzlet...@hotmail.com wrote:
 thanks to help on this list I found out about this variable as I need to
 omit the textcomp and fontenc packages in my exported latex header.
 My tex file won't compile otherwise on my n900.

 my init.el contains :

 (custom-set-variables

  '(org-export-latex-default-packages-alist (quote ((AUTO inputenc t) 
 (T1 fontenc nil) ( fixltx2e nil) ( graphicx t) ( longtable 
 nil) ( float nil) ( wrapfig nil) ( soul t) ( textcomp nil) 
 ( marvosym t) ( wasysym t) ( latexsym t) ( amssymb t) ( 
 hyperref nil) \\tolerance=1000)))

 )

 However, fontenc and textcomp are still in the org-generated tex file.
 bug, or feature ?

That line you pasted contains both packages.  Maybe you forgot to set
it after customising it or some such thing?

Aankhen



[O] Parsing org files with python

2011-04-23 Thread Georges Racinet
Hi there,

I'm a quite recent user of org-mode (just a few months, very partial
usage for now), and a python developer.
Since I spend almost all my time in Emacs, org-mode is the most
efficient tool to keep track of my working time.

Now the question : are you aware of a python library to parse org files ?
The ultimate goal would be to write an importer for OpenERP, which is
itself written in python, and of course I'd prefer not to reinvent the
wheel.

A simple search on the web returned a project called OrgNode or orgtils,
hosted at Google Code :
 http://members.optusnet.com.au/~charles57/GTD/orgnode.html
 http://code.google.com/p/orgtils/
but it lacks as far as I can tell the capability of understanding CLOCK
markers and is not published on pypi.python.org either.

Perhaps is the author on this list, too ? Are there other known
libraries around that may prove useful ?

Being quite new to this game, I could be mistaken, but it doesn't seem
to have anything to do with org-babel, right ?

And please, don't hesitate to tell if this ain't the right mailing-list
for that kind of question :-)

Cheers

-- 
Georges Racinet, http://www.racinet.fr
Zope/CPS expertise, assistance  development
GPG: 0x4862FFF7 identi.ca  twitter: gracinet




signature.asc
Description: OpenPGP digital signature


Re: [O] Parsing org files with python

2011-04-23 Thread Juan Pechiar
NEO (No Emacs Org) has just been announced:

  http://lists.gnu.org/archive/html/emacs-orgmode/2011-04/msg00598.html

Regards,
.j.

On Sat, Apr 23, 2011 at 05:29:24PM +0200, Georges Racinet wrote:
 Now the question : are you aware of a python library to parse org files ?
 The ultimate goal would be to write an importer for OpenERP, which is
 itself written in python, and of course I'd prefer not to reinvent the
 wheel.

 A simple search on the web returned a project called OrgNode or orgtils,
 hosted at Google Code :
  http://members.optusnet.com.au/~charles57/GTD/orgnode.html
  http://code.google.com/p/orgtils/
 but it lacks as far as I can tell the capability of understanding CLOCK
 markers and is not published on pypi.python.org either.

 Perhaps is the author on this list, too ? Are there other known
 libraries around that may prove useful ?



Re: [O] Parsing org files with python

2011-04-23 Thread Georges Racinet
On 04/23/2011 05:58 PM, Juan Pechiar wrote:
 NEO (No Emacs Org) has just been announced:
 
   http://lists.gnu.org/archive/html/emacs-orgmode/2011-04/msg00598.html

Ah, indeed, should have searched the archives in reverse chronological order

Thanks, and sorry for the noise

-- 
Georges Racinet, http://www.racinet.fr
Zope/CPS expertise, assistance  development
GPG: 0x4862FFF7 identi.ca  twitter: gracinet



signature.asc
Description: OpenPGP digital signature


Re: [O] [ANN] org-bibtex.el --- convert between Org headings and bibtex entries

2011-04-23 Thread Thomas S. Dye

Hi Eric,

After tests on a variety of bibtex entries, using both point before  
the entry and selecting an entry, I can't reproduce the problem I had  
late the other night with org-bibtex-read/write.  Perhaps it was user  
error :(


Also, thanks for the text file patch.  My mail client and git am don't  
seem to cooperate.


I have a library session scheduled next week and am looking forward to  
taking my reading notes, including bibtex entries, entirely with Org- 
mode.


All the best,
Tom

On Apr 21, 2011, at 11:06 AM, Eric Schulte wrote:


Thomas S. Dye t...@tsdye.com writes:


Hi Eric,

On Apr 20, 2011, at 9:00 AM, Eric Schulte wrote:


Hi Tom,

Thomas S. Dye t...@tsdye.com writes:


Hi Eric,

This could be very useful and a significant enhancement to Org-mode
for note taking.  With it, library time can be spent almost  
entirely

within Org-mode, capturing bibliographic information and taking
reading notes.  It feels like the right level of functionality--
lightweight and easy to use, with lots of prompting material.



Thanks, I hope so.



I created an entry with org-bibtex-create and then another with  
org-
bibtex-read/write.  When I ran org-bibtex, only the second entry  
was
exported.  Also, the org-bibtex-read/write process mangled the  
bibtex

entry a bit, so the resulting .bib file wasn't useful.  Note the
addition of {} around the publisher and year, and the truncation of
multi-line entries.



I /believe/ I have fixed this issue.  I am now using pre-existing
bibtex
functions for reading in entries, and for cleaning up entries
written by
org-bibtex.



The org-bibtex-read/write process doesn't work on the example I sent.
The read appears to work (though I can't find a buffer *org-bibtex-
entries* afterwards), but the write inserts the headline asterisk  
then

fails with progn: Wrong type argument: char-or-string-p, nil.



Hmm, I can't re-create this error, the read and write work for me...

Are you placing the point immediately before the bibtex entry before
calling org-bibtex-read?

After calling the read, does the `*org-bibtex-entries*' variable  
appear

to hold the information for the bibtex entry?

Could you set `debug-on-error' to t, and then send me the entire error
backtrace so I could see where this is going wrong?





Can I suggest some changes?

1) In our multi-user environment, where several authors are
contributing to a master bibtex file, we depend on the key  
generating

algorithm of bibtex-mode to help weed out duplicate entries.   This
isn't 100% effective, but it catches lots of duplicates and saves  
us
time.  Would it be possible to lift this mechanism and use it in  
org-

bibtex to generate the CUSTOM_ID?



I've added a new variable `org-bibtex-autogen-keys' which when set  
to

t will result in auto-generated keys being used instead of prompting
the user to input such keys.



Beautiful!



2) It might be better to use the (generated) key as the Org  
headline,

instead of the title.  Titles can be longer than I find comfortable
for an Org-mode headline, whereas keys are usually about the right
length.



Hmm, I would tend to disagree here, but I think it may be a matter  
of

taste.  Note that if you include a TITLE property in a headline then
it will be used instead of the contents of the headline, leaving you
free to put whatever information you want into the headline.  I've
just updated the headline creation so that it will create such a
title property as well as using the title as the headline, leaving
you free to subsequently change the headline.



That sounds right to me.  Thanks.



3) org-bibtex-cite seems like a natural next step, especially if it
offers a list of keys in the Org-mode buffer.



Meaning a function to allow tab-completion on keys...  I could see
this
being useful but I would imagine that the bib entries would  
generally

not live in the same buffer as the Org-mode text... rather I'd think
some sort of global registry would be preferable.



I guess it depends on how one uses the software.  The use I envision
is for note taking while doing background reading for a project.
First, enter a reference with org-bibtex-create, then take notes  
while

reading, and finally write a summary that might later be used in the
project document.  At this stage, org-bibtex hasn't been called, so
the only place the key is present is in the Org-mode buffer.
Inserting a reference then involves jumping back to the headline,
opening the properties drawer, selecting the value of CUSTOM_ID,
navigating back to the reference point and pasting in the key.  A
function that collects keys and then presents them in a list like the
one used to choose TYPE would make this process very easy.

Do you mind my asking what your workflow is with org-bibtex?



Currently I'm just using org-bibtex to collect all of my scattered
reading notes into a single monolithic .org file, but I anticipate
dumping out .bib files from here when writing in the future.

I do see how an 

Re: [O] Parsing org files with python

2011-04-23 Thread Jonathan BISSON

You have PyOrgMode also (https://github.com/bjonnh/PyOrgMode)







[O] [OT] The Brain

2011-04-23 Thread Marcelo de Moraes Serpa
Hey list,

Have you seen this?

http://www.thebrain.com/

It's a mind-mapping-pim-everything-in-one kind of visualization
software. It seems pretty interesting - I like the way you can connect
the items at several levels, helping to build rich relationship
information.

I've been thinking on building something like this for org, where
links in the files would provide the relationship information and we
could then export as a freemind map (or any other format that easily
allows describing relationships), for example. The current exporter
does this, but only for individual files, the idea is to recursively
build it for a specific org directory (where multiple .org files are
found).

Food for thought :)

Cheers,

Marcelo.



Re: [O] particular capture method for a diet .. ?

2011-04-23 Thread Stinky Wizzleteet
Christopher Allan Webber cweb...@dustycloud.org writes:

 Stinky Wizzleteet wizzlet...@hotmail.com writes:

-snip-

 I think if you're at approximately 45% of your metabolism or more for
 your daily caloric needs, it'll be fine.  I wouldn't recommend anyone
 going lower than 1200 calories per day though.

 Anyway, I'm at 1300-1600 calories / day now, it's not quite as super
 fast of weight loss (about 7 pounds / month, still not bad!), but still
 quite a bit of weight loss.  I think if you have a lot of weight to lose
 you probably don't need to worry about it too much.

 Also note that I barely exercised at all during my diet... when I did
 exercise, I lost weight a little bit faster, but I simply don't believe
 it's necessary for weight loss.  If you want to do it, great, but it's
 simply easier to figure out how to eat the right amount of foods to feel
 satisfied while having a serious calorie deficit.

OK, I'll remember this.
I *should* exercise though, but that is definitely not for weightloss,
more for stress management and keeping the rsi at bay.



-snip-

 https://gitorious.org/org-diet/org-diet

 I've gone and done it.  I haven't finished writing README.org but I've
 added a base org-diet file to start with, the capture template in the
 orgmode file, etc.

Hey cool !
checked out already. will use it asap.

 I've even checked in my whole embarassing diet.org file for you to see.
 You'll notice that a few months into the thing I became a vegetarian,
 but that was for ethical, not dietary reasons. :)

me vega too, welcome !

 Once I am completely not a fat guy, I will upload the final diet.org.

 As for how to find out how many calories things are I usually took three
 approaches:

  - I used the program Food File, to which I made a couple of patches to
make it run on GNU/Linux... I guess I should make those available
soon.  It *was* released as free software under the GPL, not sure if
the version online is still released as such.
  - Reading the back of packages
  - Looking at pre-existing data in my orgmode file.  Usually I'd split
the file vertically and in one pane have my current daily diet table
at point, in the other I'd be isearching for things I've already
eaten... usually while dieting I tend to eat the same types of things
a lot, but I've collected a vast amount of caloric information in
there... maybe you can find how to eat a satisfying daily amount of
calories by looking at some of my example days with successful
CAL-OUT clocking
  - I just googled for things I didn't know.

 Hope this is helpful to people!  I'll add more docs later.

 (PS: the elisp is hacky, don't say I didn't warn you.)
Myself, I created a little list with most of my regular foods,
googled/backs of packcages and such and I kept them as a kcal/gram list.
I also maintained a list of my usual servings, measured the mugs and
cups I regularly used, some with a counter intuitive result.

I'm sure these two lists could be maintained in an org or even a bbdb,
But many pains must be suffered for this functionality and I found that my
personal lists never exceeded more than 50 items. Hardly database
material, so not a priority for my case.

thanks, wzzl
 
-- 
Stinky Wizzleteet thinks: 
What happened last night can happen again.




Re: [O] editing org-export-latex-default-packages-alist has no effect

2011-04-23 Thread Stinky Wizzleteet
Aankhen aank...@gmail.com writes:

 Hi Stinky,

 On Sat, Apr 23, 2011 at 12:54, Stinky Wizzleteet wizzlet...@hotmail.com 
 wrote:
 thanks to help on this list I found out about this variable as I need to
 omit the textcomp and fontenc packages in my exported latex header.
 My tex file won't compile otherwise on my n900.

 my init.el contains :

 (custom-set-variables

  '(org-export-latex-default-packages-alist (quote ((AUTO
 inputenc t) (T1 fontenc nil) ( fixltx2e nil) (
 graphicx t) ( longtable nil) ( float nil) ( wrapfig
 nil) ( soul t) ( textcomp nil) ( marvosym t) (
 wasysym t) ( latexsym t) ( amssymb t) ( hyperref nil)
 \\tolerance=1000)))

 )

 However, fontenc and textcomp are still in the org-generated tex file.
 bug, or feature ?

 That line you pasted contains both packages.  Maybe you forgot to set
 it after customising it or some such thing?

I figured that textcomp nil meant that textcomp was turned off..
I'll try to erase the entry alltogether.

wzzl


 Aankhen



-- 
Stinky Wizzleteet thinks: 
Try the Moo Shu Pork.  It is especially good today.




Re: [O] editing org-export-latex-default-packages-alist has no effect

2011-04-23 Thread Stinky Wizzleteet
Stinky Wizzleteet wizzlet...@hotmail.com writes:

 Aankhen aank...@gmail.com writes:
-snip-
 However, fontenc and textcomp are still in the org-generated tex file.
 bug, or feature ?

 That line you pasted contains both packages.  Maybe you forgot to set
 it after customising it or some such thing?

 I figured that textcomp nil meant that textcomp was turned off..
 I'll try to erase the entry alltogether.

Yes, I have confirmed now that I need to erase these items from the list
in order for them to not show up in the header.
The customize-variable system toggled the entries from t to nil,
which apparently was not enough.
I think this is a bug.

But now, for me, it works.

thx.

-- 
Stinky Wizzleteet thinks: 
You'll never be the man your mother was!




Re: [O] editing org-export-latex-default-packages-alist has no effect

2011-04-23 Thread Aankhen
On Sat, Apr 23, 2011 at 23:51, Stinky Wizzleteet wizzlet...@hotmail.com wrote:
 Stinky Wizzleteet wizzlet...@hotmail.com writes:

 Aankhen aank...@gmail.com writes:
 -snip-
 However, fontenc and textcomp are still in the org-generated tex file.
 bug, or feature ?

 That line you pasted contains both packages.  Maybe you forgot to set
 it after customising it or some such thing?

 I figured that textcomp nil meant that textcomp was turned off..
 I'll try to erase the entry alltogether.

 Yes, I have confirmed now that I need to erase these items from the list
 in order for them to not show up in the header.
 The customize-variable system toggled the entries from t to nil,
 which apparently was not enough.
 I think this is a bug.

From the docstring:

,[ C-h v org-export-latex-default-packages-alist RET ]
| Each cell is of the format ( options package snippet-flag).
| If SNIPPET-FLAG is t, the package also needs to be included when
| compiling LaTeX snippets into images for inclusion into HTML.
`

If you look at the Customize interface, where you toggled it, the
label is ‘Snippet’.  The ‘INS’ and ‘DEL’ buttons are for manipulating
the list.

 But now, for me, it works.

 thx.

Glad I could help.

Aankhen



Re: [O] editing org-export-latex-default-packages-alist has no effect

2011-04-23 Thread Carsten Dominik

On 23.4.2011, at 09:24, Stinky Wizzleteet wrote:

 Hi all,
 
 thanks to help on this list I found out about this variable as I need to
 omit the textcomp and fontenc packages in my exported latex header.
 My tex file won't compile otherwise on my n900.
 
 my init.el contains :
 
 (custom-set-variables
 
  '(org-export-latex-default-packages-alist (quote ((AUTO inputenc t) 
 (T1 fontenc nil) ( fixltx2e nil) ( graphicx t) ( longtable 
 nil) ( float nil) ( wrapfig nil) ( soul t) ( textcomp nil) 
 ( marvosym t) ( wasysym t) ( latexsym t) ( amssymb t) ( 
 hyperref nil) \\tolerance=1000)))
 
 )
 
 However, fontenc and textcomp are still in the org-generated tex file.
 bug, or feature ?

Hi,

please read the docstring of the variable!

- Carsten




Re: [O] Parsing org files with python

2011-04-23 Thread Matt Lundin
Jonathan BISSON bissonjonat...@gmail.com writes:

 You have PyOrgMode also (https://github.com/bjonnh/PyOrgMode)

And there is a list of the various tools on Worg:

http://orgmode.org/worg/org-tools/index.html

Best,
Matt



Re: [O] [ANN] org-bibtex.el --- convert between Org headings and bibtex entries

2011-04-23 Thread Matt Lundin
Alan E. Davis lngn...@gmail.com writes:

 This works to both store bibtex database entries and export to .bib
 files.  I REALLY like the automagical harvesting of data using cb2Bib. 
 It is unique, and I don't see how to recruit it to produce a database
 in an org file, or pipe it into this org-bibtex tool.  

Could one perhaps call org-bibtex-read on entries in harvested via
cb2Bib?

 I understand I may add to the types variable.  When using
 org-bibtex-create, I can enter any arbitrary field as a PROPERTY;
 however, org-bibtex ignores anything outside of the universe it knows
 about.  Would it be bad practice to allow the export of any arbitrary
 field type one has recorded?  I think the emacs bibtex-mode may
 recognize erroneous bibtex entries.   

Bibtex-mode does indeed allow for arbitrary fields, as do bibtex and
biblatex. AFAIK, they are simply ignored when processing a bib file. One
limitation that arises when storing bibtex data as org properties is
that properties drawers are used for much more. For instance, one would
probably not want to see logging = {lognoterepeat}, in one's exported
bibtex file.

But for biblatex users, it would indeed be prohibitively expensive to
have to inform org-mode ahead of time about the innumerable odd fields
that various biblatex backends define.

 I am confused by the duplication of file names, though I can see that
 at some point one of the two will lose.  (Gauss's law of competitive
 exclusion, referring to the biological case of two species occupying
 the same ecological niche). 

Eric, the more I think about this, the more my vote would be to package
this new functionality separately.

IMO, hyperlinking to external data in bib files is somewhat orthogonal
to storing bib data within org files. In other words, the current
org-bibtex.el complements bibtex-mode use, whereas the new org-bibtex
functions, for the most part, are substitutes for bibtex-mode---i.e.,
they re-implement much of its configuration and basic functionality.

By packaging the new functionality separately perhaps we could lay the
groundwork for internal, backend agnostic bibliographical export and
formatting---not unlike the way in which org-contacts.el replaces bbdb.

Wishful thinking?... :)

Best,
Matt



Re: [O] [ANN] org-bibtex.el --- convert between Org headings and bibtex entries

2011-04-23 Thread Eric Schulte
Alan E. Davis lngn...@gmail.com writes:

 Some notes on initially trying out this new tool.  I have some reservations
 as to whether it use it.  There are certain good reasons in its favor.

 This works to both store bibtex database entries and export to .bib files.
 I REALLY like the automagical harvesting of data using cb2Bib.  It is
 unique, and I don't see how to recruit it to produce a database in an org
 file, or pipe it into this org-bibtex tool.


Org-bibtex can be used to collect bibtex entries from .bib files, and
(with this most recent attached version) directly from the clipboard
with `org-bibtex-yank'.

Is there a more natural way that this could integrate with external
tools like cb2bib?  I've just now installed cb2bib, and I'm not sure I
fully grasp its usage.


 The need to represent the bibtex database entry as a PROPERTY list would
 appear to me to limit its usefulness to me.


in any particular way?


 A nit: I would prefer to be free to enter any optional field type I wished,
 when I am entering the data.

It is possible to add arbitrary properties to a headline with
`org-set-property'.  Or you could customize the variables holding bibtex
field and entry types.  For example to add a personal :mynotes field to
every bibtex type just execute the following elisp code (or add it to
your configuration).  You will then be prompted for a mynotes field on
every bibtex entry.  You could also change the :required keyword to add
your field as an option field.

#+begin_src emacs-lisp
  (dolist (type org-bibtex-types)
(push :mynotes (cdr (assoc :required (cdr type)

  (push (cons :mynotes My personal field for notes) org-bibtex-fields)
#+end_src

 Of course, the tool as it stands helped me to filter out duplicate
 fields and unused optional fields from the one bibtex entry I tried
 using org-bibtex-read: the output of org-bibtex-write was cleaner, and
 correctly incorporated aligning tabs where I'd carelessly left them
 out.)


This functionality is all due to the formatting functions provided by
the existing bibtex.el package.


 My INPUT ENTRY

 @INCOLLECTION{AED-IER-CR,
   author = {Junior Noitall},
   title = {Specific disruption strategies},
   booktitle = {How to annoy the teacher},
   publisher = {Noitall Notes},
   year = {2011},
   editor = {Senior Noitall},
   chapter = {13},
   pages = {218--243},
   address = {Concentric Orbit},
   altauthor = {John Smith},
   alteditor = {Carl Pumpkin},
   isbn = {1-853-31-9},
   optaddress = {Room X777},
   optpages = {\frac{1}{2}}
 }

 In the following output, the isbn field is missing.

 OUTPUT from org-bibtex-write

 @incollection{AED-IER-CR,
   author = {Junior Noitall},
   title = {Specific disruption strategies},
   booktitle = {How to annoy the teacher},
   publisher = {Noitall Notes},
   year = 2011,
   editor = {Senior Noitall},
   type = {incollection},
   chapter = 13,
   pages = {218--243},
   address = {Concentric Orbit}
 }


 I understand I may add to the types variable.  When using org-bibtex-create,
 I can enter any arbitrary field as a PROPERTY; however, org-bibtex ignores
 anything outside of the universe it knows about.  Would it be bad practice
 to allow the export of any arbitrary field type one has recorded?

If a type is added as with the code given above, then it will be
exported to .bib files along with the default fields.

 I think the emacs bibtex-mode may recognize erroneous bibtex entries.
 Somewhere there is code that does that.

I do not know if bibtex-mode does that or not.  I think that bibtex
itself is supposed to simply ignore any fields which it does not
recognize allowing extensibility.

 It would be a huge and excellent addition to be able to pass other
 types, while checking for proper formatting.  Bibtex itself, and the
 .bst files (at least for bibtex itself; I don't know about biblatex,
 etc.) will cherry pick the needed fields.  Am I wrong about this?


The above sounds correct to me.

Given that org properties will likely contain non-bibtex content, I
wouldn't want the default behavior to be exporting every property entry
to bibtex.  However if the above solution of adding to the
org-bibtex-types/fields variables is not sufficient, it shouldn't be
difficult to change the org-bibtex command so that if it is called with
a prefix argument it will export *all* properties to the .bib file.



 I am confused by the duplication of file names, though I can see that at
 some point one of the two will lose.  (Gauss's law of competitive exclusion,
 referring to the biological case of two species occupying the same
 ecological niche).


I think that rather than competing these files may be merging into a
single file (as with the attached patch).  However this remains to be
seen.

Thanks for the feedback and suggestions -- Eric



 Alan Davis

From c9e76873e346e3eaf0a99c07458dfac28200490b Mon Sep 17 00:00:00 2001
From: Eric Schulte schulte.e...@gmail.com
Date: Sat, 23 

Re: [O] [OT] The Brain

2011-04-23 Thread John Hendy
On Sat, Apr 23, 2011 at 12:39 PM, Marcelo de Moraes Serpa
celose...@gmail.com wrote:
 Hey list,

 Have you seen this?

 http://www.thebrain.com/

Yes!


 It's a mind-mapping-pim-everything-in-one kind of visualization
 software. It seems pretty interesting - I like the way you can connect
 the items at several levels, helping to build rich relationship
 information.

 I've been thinking on building something like this for org, where
 links in the files would provide the relationship information and we
 could then export as a freemind map (or any other format that easily
 allows describing relationships), for example. The current exporter
 does this, but only for individual files, the idea is to recursively
 build it for a specific org directory (where multiple .org files are
 found)

*Note:* this got long, but it's because it's an exciting topic and I
was excited to share my thoughts. Hopefully it's entertaining or
helpful or at the very least not burdensome to your inbox...

Even without having an exportability, I have often longed for some
kind of semantic hierarchy for tracking information. That's the cool
thing about how Personal Brain works -- it links thinks to as many
places as you want vs. a traditional linear hierarchy. I think
something like this should be able to be accomplished by use of tags.
I actually tried a semantic filing system structure a bit back where
my plan was to name my files like so:[1]

proj_name-of-the-file_-mm-dd_[tag1-tag2-tag3].ext

I created a bunch of test files in this format and then used a shell
script to create a hierarchy of symlinked folders so that every file
was in every folder that applied. For a simple case, a structure might
exist like so:

Files:
- proj1_file1_[tag1-tag2]
- proj2_file2_[tag2-tag3]

Resulting hierarchy:
- proj1
--- tag1
--tag2
--- tag2
-- tag1

- tag1
--- proj1
-- tag2
--- tag2
-- proj1

- tag2
--- proj1
-- tag1
--- proj2
-- tag3
--- tag1
-- proj1

- tag3
--- proj2
-- tag2
--- tag2
-- proj2

That's the directory hierarchy only -- not listing the files. Each
file will appear in *every* folder that matches it's project or tag (I
was even going to go by extension as well and add in dirs for docs,
pdf, etc.). So, a little crazy, but the test run was actually really
neat. You can get to any file via any number of paths.

This was my idea for work, because I often organize things by project,
but get annoyed when I can't find what I'm looking for because it's
elsewhere. For example, my company has an invention submission system.
You do something in the lab, think it's worth attempting to patent, do
background searching, and then write up an Invention Submission. That
gets reviewed by a committee, and if they decide it's promising, you
present to a manager who approves the filing fees.

I have filed several of these submissions and keep the supporting
pictures/videos/etc. in the folder with the submissions, and those are
in a directory called ip. One day I was making a presentation and
hunting for a video I *knew* existed but couldn't find anywhere.
Whattya know -- it *was* for that project, but it was in the ip
folder. Bummer. I eventually found it, that's what gave me the idea
above.

proj would be short 3-4 letter abbreviations for projects.
tags would be things like ip, vid, reuse, pic, draw and would help tag
various uses for the files. If I tagged things, I could look in the
video symlinked directory and find what I wanted. Or go to videos -
project name and that would narrow it down even further.

Now, I wasn't actually going to move *anything* -- just create an
independent folder structure of symlinks created and updated by
running a bash script that would find all unique combinations and then
create dir structures to match.

To the point (and thanks if you made it this far): I would *love* for
something like this to be available in org, and it would give things
the feel of The Brain. Imagine being able to document your information
in typical headline fashion, but enter some separate viewing mode by
tag to find what you're looking for. Things just *aren't* linear,
often times. They double count in two or more meta categories --
projects, type of information, a todo, reminder, the class of
information (ip, personal note-to-self, something to read, report),
even how the information came to you (meeting minute?, website, etc.).
I think it would be slick to enter a brain like viewing system that
used tags or properties to swim through files in your agenda. I'm
often having to recall some tidbit of info and rack my brain for what
context I wrote it down in if the agenda search isn't working.
Eventually I'll remember what the meeting was about where it was said
and find it.

Plain and simple, what I write when something happens isn't how I'll
necessarily recall it later, hence search phrases not always being
useful. I think bucket tags (like the bucket nodes in Personal
Brain) would be very neat indeed.


[1] 

Re: [O] [ANN] org-bibtex.el --- convert between Org headings and bibtex entries

2011-04-23 Thread Alan E. Davis
Comments below

On Sun, Apr 24, 2011 at 10:52 AM, Eric Schulte schulte.e...@gmail.comwrote:


 Is there a more natural way that this could integrate with external
 tools like cb2bib?  I've just now installed cb2bib, and I'm not sure I
 fully grasp its usage.

  I also found cb2Bib pretty opaque when I first installed it.  It's not
hard to understand the basics, though.

Anything in your clipboard is queued up to import into cb2Bib.  The easiest
way, for example, to import a bibtex database entry from Google Scholar is
to highlight the entire entry in the browser with a mouse, and it's parts
are already displayed in cb2Bib.

If, for example, one is trying to save from a text-based bibliography entry,
it may be copied to the clipboard.  Highlight, for example, the title, and
right click, then select title.  And so on.  This is the automagical part
that I have found so very useful.

It is important to 'unplug' cb2Bib if the entry needs to be edited.  If not,
any action in the fields and displayed will be lost.  Then save using the
save icons.

I have to say, though, that a little explanation would go a long way, when
trying to use it.



Once this process is complete, I can see that being able to, in turn copy
this entry to the clipboard would indeed be useful with org-bibtex .  I
wonder if it's possible to set a pipe or one of those cryptic file types
(fifo?) I cannot remember would either work, or whether the developers would
agree to enabling this ability.

Alan