Re: [O] regenerating agendas automatically if any .org files change

2011-11-10 Thread Viktor Rosenfeld
Hi Stephen,

AFAIK, there can only be one agenda view (an expert correct me, if I'm
wrong). But you can multiple blocks in the agenda. Search for "Office
block agenda" in:

http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.html 

Cheers,
Viktor

Stephen J. Barr wrote:

> Excellent. Thanks for the pointer. So, just to clarify, is it possible
> to have multiple simultaneous agenda views? I think it would be really
> cool to have my calendar and to-do-list and maybe another custom
> agenda view all dynamically refreshed every few minutes, just sitting
> on my second monitor. Then, as I add appointments, tasks, etc., they
> all start showing up.
> 
> How can I make this happen? My lisp skills still introductory. I can
> modify lisp code, but I haven't really written my own from scratch
> yet.
> 
> -stephen
> 
> On Thu, Nov 10, 2011 at 7:09 PM, suvayu ali  
> wrote:
> > Hello Stephen,
> >
> > Welcome to the list. Hope you have fun using org-mode. :)
> >
> > On Fri, Nov 11, 2011 at 00:54, Stephen J. Barr  
> > wrote:
> >> I would like B to simply regenerate 3 different agenda views
> >> whenever the .org files on Dropbox change.
> >
> > This is documented on our git based community wiki.
> > 
> >
> > --
> > Suvayu
> >
> > Open source is the future. It sets us free.
> >
> 



[O] Property inheritance in beamer export [7.4]

2011-11-10 Thread Chris Kauffman

I use org for constructing simple slide presentations quite a
bit.  I'd like to be able to set a global property which shrinks
all text to fit in the allotted space; this is great for source
examples. After some experimentation I put

#+PROPERTY: BEAMER_envargs [shrink]

in the preamble and evaluated

(set-variable (quote org-use-property-inheritance) t nil)

According to my understanding of the documentation, this should
make very outline entry inherit the property BEAMER_envargs,
regardless of whether it has a properties list itself.  After
reloading the file, internally this seems to work fine: I move to
any heading and eval the following lisp

(org-entry-get (point) "BEAMER_envargs" 1)

which gives the result "[shrink]".

However, on exporting the org file to pdf, the shrinking does not
seem to happen. The source code runs off the page. Is property
inheritance not respected during export?

Cheers,
Chris

--Example .org File---
#+TITLE: Java Lecture
#+AUTHOR:Christopher Kauffman
#+EMAIL: kauffma...@gmail.com
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 
path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+STARTUP: beamer
#+STARTUP: showall
#+LaTeX_CLASS: beamer
#+BEAMER_FRAME_LEVEL: 1
#+PROPERTY: BEAMER_envargs [shrink]

* Example
Want this shrink
#+BEGIN_SRC java
  public class Mouse{
private int age = 0;  // age of mouse in days
private double weight = 1.0;  // weight of mouse in grams
private double percentGrowthRate; // % weight increase per day
  
// This method assigns the mouse's percent growth rate.
public void setPercentGrowthRate(double percentGrowthRate) {
  this.percentGrowthRate = percentGrowthRate;
}
  
// This method simulates one day of growth for the mouse.
public void grow() {
  this.weight += (.01 * this.percentGrowthRate * this.weight);
  this.age++;
}
  
// This method prints the mouses's age and weight.
public void display() {
  System.out.printf(
"Age = %d, weight = %.3f\n", this.age, this.weight);
}
  } 
#+END_SRC

* Example
:PROPERTIES:
:BEAMER_envargs: [shrink]
:END:

Must add properties every time
#+BEGIN_SRC java
  public class Mouse{
private int age = 0;  // age of mouse in days
private double weight = 1.0;  // weight of mouse in grams
private double percentGrowthRate; // % weight increase per day
  
// This method assigns the mouse's percent growth rate.
public void setPercentGrowthRate(double percentGrowthRate) {
  this.percentGrowthRate = percentGrowthRate;
}
  
// This method simulates one day of growth for the mouse.
public void grow() {
  this.weight += (.01 * this.percentGrowthRate * this.weight);
  this.age++;
}
  
// This method prints the mouses's age and weight.
public void display() {
  System.out.printf(
"Age = %d, weight = %.3f\n", this.age, this.weight);
}
  } 
#+END_SRC

--END EXAMPLE-

current state:
==
(setq org-export-latex-after-initial-vars-hook
 '(org-beamer-after-initial-vars) org-speed-command-hook
 '(org-speed-command-default-hook org-babel-speed-command-hook)
 org-agenda-files '("~/mypubs/worklog") org-agenda-window-setup
 'other-window org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-export-latex-format-toc-function
 'org-export-latex-format-toc-default org-tab-first-hook
 '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe
 org-babel-hide-result-toggle-maybe) org-src-mode-hook
 '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 outline-mode-hook '((lambda nil
  (local-set-key "\356" (quote
  outline-next-visible-heading))
  (local-set-key "\360" (quote
  outline-previous-visible-heading))
  (local-set-key (quote [f12]) (quote
 ck-outline-toggle))) )
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook
 '(org-cycle-hide-archived-subtrees
 org-cycle-hide-drawers
 org-cycle-show-empty-lines
 org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook
 '(org-remove-file-link-modifiers)
 org-mode-hook '((lambda
 nil (local-set-key "d" (quote
   

Re: [O] regenerating agendas automatically if any .org files change

2011-11-10 Thread Stephen J. Barr
Excellent. Thanks for the pointer. So, just to clarify, is it possible
to have multiple simultaneous agenda views? I think it would be really
cool to have my calendar and to-do-list and maybe another custom
agenda view all dynamically refreshed every few minutes, just sitting
on my second monitor. Then, as I add appointments, tasks, etc., they
all start showing up.

How can I make this happen? My lisp skills still introductory. I can
modify lisp code, but I haven't really written my own from scratch
yet.

-stephen

On Thu, Nov 10, 2011 at 7:09 PM, suvayu ali  wrote:
> Hello Stephen,
>
> Welcome to the list. Hope you have fun using org-mode. :)
>
> On Fri, Nov 11, 2011 at 00:54, Stephen J. Barr  wrote:
>> I would like B to simply regenerate 3 different agenda views
>> whenever the .org files on Dropbox change.
>
> This is documented on our git based community wiki.
> 
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
>



Re: [O] regenerating agendas automatically if any .org files change

2011-11-10 Thread suvayu ali
Hello Stephen,

Welcome to the list. Hope you have fun using org-mode. :)

On Fri, Nov 11, 2011 at 00:54, Stephen J. Barr  wrote:
> I would like B to simply regenerate 3 different agenda views
> whenever the .org files on Dropbox change.

This is documented on our git based community wiki.


-- 
Suvayu

Open source is the future. It sets us free.



[O] regenerating agendas automatically if any .org files change

2011-11-10 Thread Stephen J. Barr
Hello,

First of all, thank you for a wonderful mode and a wonderful mailing
list. This is my first posting. I have the following idea for a
workflow, and I am not sure if there is already functionality to do
this: I keep all my .org files in a Dropbox. On my desk I have my main
workstation A and a slow workstation B. Both A and B are synced to
Dropbox. Throughout the day, as I work with org-mode using workstation
A, I would like B to simply regenerate 3 different agenda views
whenever the .org files on Dropbox change. This would really add to
the functionality of workstation B. Is there any built-in
functionality to do this?

Thanks,
-stephen



[O] [bug] error with % in agenda

2011-11-10 Thread Samuel Wales
Latest git.

setq: Wrong type argument: number-or-marker-p, nil

  +(nil 1)
  (setq entries-marked (+ entries-marked 1))
  (progn (setq entries-marked (+ entries-marked 1))
(call-interactively (quote org-agenda-bulk-mark)))
  (if (string-match regexp (get-text-property ... ...)) (progn (setq
entries-marked ...) (call-interactively ...)))
  (when (string-match regexp (get-text-property ... ...)) (setq
entries-marked (+ entries-marked 1)) (call-interactively (quote
org-agenda-bulk-mark)))
  (while (re-search-forward regexp nil t) (when (string-match regexp
...) (setq entries-marked ...) (call-interactively ...)))
  (save-excursion (goto-char (point-min)) (goto-char
(next-single-property-change ... ...)) (while (re-search-forward
regexp nil t) (when ... ... ...)))
  (let (entries-marked) (save-excursion (goto-char ...) (goto-char
...) (while ... ...)) (if (not entries-marked) (message "No entry
matching this regexp.")))
  org-agenda-bulk-mark-regexp("e")
  call-interactively(org-agenda-bulk-mark-regexp)


Thanks.



Re: [O] Encrypting archived files

2011-11-10 Thread Marcelo de Moraes Serpa
Thanks,

I'm using OSX, I will research about Truecrypt.

- Marcelo.

On Mon, Nov 7, 2011 at 10:28 AM, Ian Barton  wrote:

>
>  I started archiving a bunch of pdf and jpg scans of some important
>> documents. I currently use the org-crypt package + gnupg to encrypt org
>> entries, I'm thinking about using gnupg to encrypt the files as well. Is
>> there any integration with org for encryption/decryption of attached
>> files? Any insights appreciated!
>>
>>
>>
> Not an org solution, but you could put te whole file inside a Truecrypt
> container. If you are using linux you can also use the ecrypt-fs utilities
> to encrypt your whole /home folder, or a selected sub folder.
>
> Ian.
>
>
>


Re: [O] Renew export fields

2011-11-10 Thread Sebastien Vauban
Hi Torsten,

Torsten Wagner wrote:
> Hi is there a way to renew or set export parameters specifically for a text
> block? I would like to change the date depending on which subtree I'm going
> to export. However the following way is not working.
> #+DATE: 08-11-2011
> * level 1
> #+DATE: 12-11-2011
> * level 2
> #+DATE: 15-11-2011
> trying to export only level 1 would still result with 15-11-2011 as date.
> Any sugesstions? I tried properties blocks but had trouble with them too.

See property (to be set in a drawer) EXPORT_DATE.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Getting rid of split frame with org-capture

2011-11-10 Thread Thomas Lockney
I'm attempting to get some code working that should create a new frame
with *just* org-capture, but when I run it, I keep getting a split
despite various attempts at running delete-other-windows. I'm running
on "GNU Emacs 24.0.90.1 (i386-apple-darwin10.8.0, NS
apple-appkit-1038.36)" so perhaps this is a 24 specific issue. Here's
the code I've currently got:

(defadvice org-capture-finalize (after delete-capture-frame activate)
  "Advise capture-finalize to close the frame if it is the capture frame"
  (if (equal "capture" (frame-parameter nil 'name))
  (delete-frame)))

(defadvice org-capture-destroy (after delete-capture-frame activate)
  "Advise capture-destroy to close the frame if it is the capture frame"
  (if (equal "capture" (frame-parameter nil 'name))
  (delete-frame)))

(defun make-capture-frame ()
  "Create a new frame and run org-capture."
  (interactive)
  (make-frame '((name . "Capture")
(width . 100)
(height . 15)))
  (select-frame-by-name "Capture")
  (delete-other-windows)
  (org-capture))

I've also tried this using the org-capture-mode-hook to call
delete-other-windows and I've tried placing delete-other-windows after
the call to org-capture (both of those based on solutions I've seen
posted to this list at various times). Anyone have any clues on this?
I'm stumped, but I'm also fairly inexperienced at programming emacs.

-- 
http://about.me/tlockney



Re: [O] Feature request: Accept org mode dates in the date export field

2011-11-10 Thread Jambunathan K
Torsten Wagner  writes:

> Hi,
> one should be able to use org-modes date function to enter or modify
> a date for the variable #+DATE:

> At the moment its exported as plain text including the < > brackets.
> Keeping the date org-mode friendly and exporting it nicley would be a
> nice little feature.

Btw, ODT exporter does this already. 

You can enter a #+DATE:  using C-c . or C-c ! and you will see the
right timestamp under File->Properties->General->Created/Modified
timestamp.

> Thanks
> Torsten
>
>
>

-- 



[O] Feature request: Accept org mode dates in the date export field

2011-11-10 Thread Torsten Wagner
Hi,
one should be able to use org-modes date function to enter or modify a date
for the variable #+DATE:
At the moment its exported as plain text including the < > brackets.
Keeping the date org-mode friendly and exporting it nicley would be a nice
little feature.

Thanks
Torsten


[O] Renew export fields

2011-11-10 Thread Torsten Wagner
Hi is there a way to renew or set export parameters specifically for a text
block? I would like to change the date depending on which subtree I'm going
to export. However the following way is not working.
#+DATE: 08-11-2011
* level 1
#+DATE: 12-11-2011
* level 2
#+DATE: 15-11-2011
trying to export only level 1 would still result with 15-11-2011 as date.
Any sugesstions? I tried properties blocks but had trouble with them too.

Thanks a lot
Torsten


Re: [O] zotero plain, org-odt, and citations in general

2011-11-10 Thread Erik Hetzner
Hi Jambunathan,

Thanks for the very detailed reply. Some responses below.

In your previous message, you asked who the author of zotero.el is. I
am. I will add author info.

At Thu, 10 Nov 2011 20:47:30 +0530,
Jambunathan K wrote:
> 
> I think I now have some understanding of what Erik's library does[1]. 
> 
> It creates a bibliographic entry (as in Footnotes) using Quick Copy.  It
> doesn not create a footnote reference. One can use the Firefox Zotero
> and see how Quick Copy works with both RTF and HTML formats[2].

This is correct. I should note that this method is totally inadequate,
as Frank Bennett showed me, for the generation of documents formatting
according to the various style guides. It cannot handle in-text
citations, bibliographies, or cross references. To get some idea of
how this happens in zot4rst (part of zotero-plain), see [1].

I should also note that this process is complicated, involving a
number of steps. Have a look at the python dir in zotero-plain to get
an idea.

> [Question to Erik: Can one not use "Copy from Clipboard" from elisp
> instead of going the mozrepl route to create a biblio.text]

Yes, but then one cannot select an item in Zotero and insert a link
into an org doc from org itself.

I should note that while the org/zotero integration in zotero-plain
“works for me”, I would welcome changes to make it more robust and
feature-full. But I use org for notes and todo lists, not for document
production.

> Instead of working with JS libraries, I think the right starting point
> would be to work with the underlying zotero.sqlite database itself. It
> is not difficult to get a key of the selected item in Zotero
> pane[3]. Once this is done the underlying zotero.sqlite database could
> be queried for the item properties[4].
> 
> Fortunately there is already a GUI/Command line tool - Gnotero[5] -for
> accessing the sqlite database.

This would certainly work. However, one problem would be that gnotero
cannot generate formatted citations from a reference, that is, it
cannot use CSL [2] style rules to generate arbitrary citation
formats. This might be fine; some simple c
 
> As for exploiting the power of using zotero within libreoffice - which
> is to have the same citation presented in different citation styles -
> one need to look at how the reference marks are produced within
> OpenDocument XML.

Not only that, but how the LibreOffice plugin communicates with
Zotero, specifically the citeproc-js [1] part of Zotero, to generate
in-text citations, bibliographies, etc.

> […]
>
> Footnotes: 
> 
> [1]  With Mozrepl 1.1 beta2 on Firefox 3.6.23, I am unable to make
> org-zotero.el work. It hangs and I have to C-g out (Christian! you are
> not alone). I am able to get as far as creating the LIBRARY_KEY for the
> selected item in the zotero pane and not further.
>
> […]

Have you started MozRepl from Firefox? I re-installed mozrepl, checked
that I am using the latest (and unmodified) versions of moz.el and
zotero-plain. Everything seems fine. This is with Emacs 23 - perhaps
Emacs 24 changes things?

best, Erik

1. http://gsl-nagoya-u.net/http/pub/citeproc-doc.html
2. http://www.zotero.org/styles
Sent from my free software system .


[O] new branch holding all pending code block changes

2011-11-10 Thread Eric Schulte
Hi,

There is now a new branch in the Org-mode git repository entitled
"standard-code-block-syntax" which holds all of the pending code block
changes including the following.
- standardized code block keywords
- documentation changes to reflect standardized code block keywords
- syntax for accumulating properties

This branch is passing all tests in the test suite, and I intend to
merge it into the master branch before the next release.

Given that some of these changes are significant (and because of some
recent interest in increased use of branches) I've placed them up in a
branch in the hope that they could receive some additional testing
before I push them to master.

Please try this out and let me know if you have any questions or
problems.

Thanks -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



[O] Beamer export of a subtree seems wrong.

2011-11-10 Thread Torsten Wagner
Hi,
I recently started to prepare lecture notes in org mode. I used the example
from Eric on worg as a template.
Everything works well. I used the first headline level to define groups of
slides, the second level are slide titels and so on. A full export to PDF
looks like expected. However, I thought I can do something like
* lecture 1...
* lecture 2...
* lecture 3...
and exporting only the subtree, I assumed should result in a PDF file for a
single lecture. This does not work :( A subtree export with the pointer on
a toplevel headline ommits all slide titles (all ** levels). I tried to be
smart and added :noexport: to all but one lecture. However, that had no
effect at all.
Any idea what might be wrong? Or did I misunderstood the usage of the
grouping frames function.

All the best
Torsten


[O] Conditionally archiving to an archive file or archive tree?

2011-11-10 Thread Christopher Allan Webber
Hiya all,

Is there an easy way to conditionally archive to an archive file or
archive tree?  I guess I should write my own tool but often times there
are builtin things and I end up rewriting tools without knowing it, so
querying on that before I go ahead and write something.  (Might also be
good to know if this is a need of other people than just me.)


Basically, imagine an orgmode file of the following structure:

#+begin_src org

* No archive file tree
** TODO Some task!  Should archive to sub-tree
** TODO Some task!  Should archive to sub-tree also!

* Archive things in here to an archive file
  :PROPERTIES:
  :ARCHIVE: %s_archive::* Somethingorother
  :END:

** TODO Archive me to an archive file!
** TODO Also archive me to an archive file!
*** TODO However not subtasks!
*** DONE archiving this subtask should move to an archive subtree
*** Archive:ARCHIVE:
 DONE See, like so
#+end_src

Is there a nice builtin way to do this, or should I write it myself?
Also, if I should write it myself, would anyone else find this
functionality useful?  Personally, I think this is a good way of doing
things to keep files from getting full of cruft but also allowing big
projects full of subtrees to stay coherent as you move things out of the
way.

Thanks!
 - Chris



Re: [O] Hiding

2011-11-10 Thread Neilen Marais
Hi Carsten,

Carsten Dominik  gmail.com> writes:

> 
> 
> Hi Neilen,
> 
> this was a pretty good attempt for someone who says he is new to org!

Why thanks :)



Been a while since I've been able to play with my Org, but thanks for the info.

> Scheduling normally has the purpose to make an item show up in your daily
> agenda on a specified date.  But you can use is also to hide items scheduled
> in the future from the task list.  Here is how:
> 
> Another, more compact possibility that is also more easily extended to your
> longer list of tasks in my-org-context-tags-alist is:
> 
> (setq org-agenda-custom-commands
>  '(
>   ("c" "Context Next Tasks" 
>tags-todo "SCHEDULED=\"\"|SCHEDULED<=\"\"/NEXT"
>((org-agenda-sorting-strategy '(tag-up))
> (org-agenda-overriding-header "Context Next Tasks")
> 
 
> Let me know if I need to further explain why these works - but I
> guess you can figure it out?

Finding http://orgmode.org/manual/Matching-tags-and-properties.html helped. I
ended up with

(setq org-agenda-custom-commands
  '(
("c" "Context Next Tasks" 
 tags-todo (concat
  "SCHEDULED=\"\"+{" 
  (mapconcat 'car my-org-context-tag-alist "\\|")
  "}|SCHEDULED<=\"\"+{"
  (mapconcat 'car my-org-context-tag-alist "\\|")
  "}/NEXT")
 ((org-agenda-sorting-strategy '(tag-up))
  (org-agenda-overriding-header "Context Next Tasks")
  ))
))

which seems a little clunky, but works :)  BTW, why does one need to escape the
pipe (|) character for regexes? Caused me a bit if head scratching till I looked
carefully at you example.
 
Thanks
Neilen
> Cheers
> 
> - Carsten
> 
> 







Re: [O] zotero plain, org-odt, and citations in general

2011-11-10 Thread Thomas S. Dye
Jambunathan K  writes:

>>1. org-zotero.el
>>
>>   This permits insertion of zotero reference links *only* and
>>   opening them with a browser. 
>>
>>   Specifically I don't see the translator of these links to
>>   individual backends like latex, html or more importantly ODT.
>>
>>   #+begin_src emacs-lisp
>> (org-add-link-type TYPE &optional FOLLOW EXPORT)
>>   #+end_src
>>
>>2. zotero.el
>>
>>   This (apparently) permits download of data from firefox and
>>   importing it within Emacs.
>
>
> I think I now have some understanding of what Erik's library does[1]. 
>
> It creates a bibliographic entry (as in Footnotes) using Quick Copy.  It
> doesn not create a footnote reference. One can use the Firefox Zotero
> and see how Quick Copy works with both RTF and HTML formats[2].
>
> [Question to Erik: Can one not use "Copy from Clipboard" from elisp
> instead of going the mozrepl route to create a biblio.text]
>
> Instead of working with JS libraries, I think the right starting point
> would be to work with the underlying zotero.sqlite database itself. It
> is not difficult to get a key of the selected item in Zotero
> pane[3]. Once this is done the underlying zotero.sqlite database could
> be queried for the item properties[4].
>
> Fortunately there is already a GUI/Command line tool - Gnotero[5] -for
> accessing the sqlite database.
>
> As for exploiting the power of using zotero within libreoffice - which
> is to have the same citation presented in different citation styles -
> one need to look at how the reference marks are produced within
> OpenDocument XML.
>
> Here is a typical reference mark for an item with local zotero URL[6]:
> zotero://report/items/579241_E7232HE2/html/report.html
>
> LIBRARY=>579241
> KEY=>E7232HE2
>
>
> #+begin_src nxml
>   
> http://zotero.org/groups/51961/items/E7232HE2"]}]}
>  RNDB7mi3QiueI"/>Crew, “Alltagsgeschichte.”
> http://zotero.org/groups/51961/items/E7232HE2"]}]}
>  RNDB7mi3QiueI"/>
>   
> #+end_src nxml
>
> One can see the following components:
> 1. ZOTERO_ITEM 
> 2. citationID and citationItems
>- The citationItem has the following Zotero URI:
>  http://zotero.org/groups/51961/items/E7232HE2
>  
>  GROUP=>51961
>  KEY=>E7232HE2
>
>  Note that the keys for the entry are the same on both the local
>  zotero store and the global zotero URI.
> 3. RNDB7mi3QiueI
>- This is a cookie entered by Zotero which maps the citation entry to
>  an entry in the zotero database. Note that it starts with RND.
>
>  This is what is called as a "FieldCode" in zotero parlance.
>
>  Note: Have you seen the "Remove Field Codes" in Zotero menu within
>  ODT document. Once you remove the field codes the document becomes
>  a simple ODT document and one would no longer be able to move
>  between different citation styles.
>
>  In essence, "Field Code" is the MAGIC WAND that zotero uses.
>
> From my little research, I can say with confidence that global zotero
> URIs and the above mentioned reference marks are *very* recent
> developments.
>
> Exercising the MAGIC WAND within ODT exporter requires diving in to
> zotero server inner workings - which is non-trivial as Erik notes - but
> would also be futile (as in chasing a shifting sand)
>
> I believe the best course would be to do convention/static footnoting
> with the simplest of Chicago styles using a choice of entry types like
> Article, Journal, Book or a Website.
>
> Proposal for Org+Zotero integration
> ===
>
> An org document like this
>
> #+begin_src org
> * Headline
>   This is a footnote reference[1]
>
> Footnotes:
> [1] zotero://report/items/579241_E7232HE2/html/report.html
> #+end_src org
>
> will be transformed to this on ODT export
>
> #+begin_odt
> * Headline
>   This is a footnote reference[1] 
>
> Bibliography:
>
> 1. David F. Crew, “Alltagsgeschichte: A New Social History ‘From
> below’?,” Central European History 22, no. 3/4 (1989): 394-407.
> #+end_odt
>
> Note that the footnote link is an org stlye link captured with
> org-protocol and has both a LIBRARY_ID and KEY_ID. The bibliography
> entry will be generated by "exporting" zotero link to the required
> format using a variation of gnotero. The "following/opening" of zotero
> link will be done by mapping the local zotero link to
> http://zotero.org-based URI (again) using gnotero.
>
>
> I see that there is a need for bib2odt in much the same way as there is
> a bib2html. Can someone post an example of Org file which would use
> BibTex for post-processing (either to HTML or LaTeX) The ODT exporter
> can also emulate what other backend does.
>
> ps: This mail is more of a note to self or a note to any future
> hackers. I am not certain I will be able to hack gnotero and have it
> integrate with Emacs - but for a whimsical and a bored hacker like
> nothing can be said with certainty.
>
> Btw, gnotero is good. Not sure how usa

Re: [O] zotero plain, org-odt, and citations in general

2011-11-10 Thread Jambunathan K

>1. org-zotero.el
>
>   This permits insertion of zotero reference links *only* and
>   opening them with a browser. 
>
>   Specifically I don't see the translator of these links to
>   individual backends like latex, html or more importantly ODT.
>
>   #+begin_src emacs-lisp
> (org-add-link-type TYPE &optional FOLLOW EXPORT)
>   #+end_src
>
>2. zotero.el
>
>   This (apparently) permits download of data from firefox and
>   importing it within Emacs.


I think I now have some understanding of what Erik's library does[1]. 

It creates a bibliographic entry (as in Footnotes) using Quick Copy.  It
doesn not create a footnote reference. One can use the Firefox Zotero
and see how Quick Copy works with both RTF and HTML formats[2].

[Question to Erik: Can one not use "Copy from Clipboard" from elisp
instead of going the mozrepl route to create a biblio.text]

Instead of working with JS libraries, I think the right starting point
would be to work with the underlying zotero.sqlite database itself. It
is not difficult to get a key of the selected item in Zotero
pane[3]. Once this is done the underlying zotero.sqlite database could
be queried for the item properties[4].

Fortunately there is already a GUI/Command line tool - Gnotero[5] -for
accessing the sqlite database.

As for exploiting the power of using zotero within libreoffice - which
is to have the same citation presented in different citation styles -
one need to look at how the reference marks are produced within
OpenDocument XML.

Here is a typical reference mark for an item with local zotero URL[6]:
zotero://report/items/579241_E7232HE2/html/report.html

LIBRARY=>579241
KEY=>E7232HE2


#+begin_src nxml
  
http://zotero.org/groups/51961/items/E7232HE2"]}]}
 RNDB7mi3QiueI"/>Crew, “Alltagsgeschichte.”
http://zotero.org/groups/51961/items/E7232HE2"]}]}
 RNDB7mi3QiueI"/>
  
#+end_src nxml

One can see the following components:
1. ZOTERO_ITEM 
2. citationID and citationItems
   - The citationItem has the following Zotero URI:
 http://zotero.org/groups/51961/items/E7232HE2
 
 GROUP=>51961
 KEY=>E7232HE2

 Note that the keys for the entry are the same on both the local
 zotero store and the global zotero URI.
3. RNDB7mi3QiueI
   - This is a cookie entered by Zotero which maps the citation entry to
 an entry in the zotero database. Note that it starts with RND.

 This is what is called as a "FieldCode" in zotero parlance.

 Note: Have you seen the "Remove Field Codes" in Zotero menu within
 ODT document. Once you remove the field codes the document becomes
 a simple ODT document and one would no longer be able to move
 between different citation styles.

 In essence, "Field Code" is the MAGIC WAND that zotero uses.

>From my little research, I can say with confidence that global zotero
URIs and the above mentioned reference marks are *very* recent
developments.

Exercising the MAGIC WAND within ODT exporter requires diving in to
zotero server inner workings - which is non-trivial as Erik notes - but
would also be futile (as in chasing a shifting sand)

I believe the best course would be to do convention/static footnoting
with the simplest of Chicago styles using a choice of entry types like
Article, Journal, Book or a Website.

Proposal for Org+Zotero integration
===

An org document like this

--8<---cut here---start->8---
#+begin_src org
* Headline
  This is a footnote reference[1]

Footnotes:
[1] zotero://report/items/579241_E7232HE2/html/report.html
#+end_src org
--8<---cut here---end--->8---

will be transformed to this on ODT export

--8<---cut here---start->8---
#+begin_odt
* Headline
  This is a footnote reference[1] 

Bibliography:

1. David F. Crew, “Alltagsgeschichte: A New Social History ‘From
below’?,” Central European History 22, no. 3/4 (1989): 394-407.
#+end_odt
--8<---cut here---end--->8---

Note that the footnote link is an org stlye link captured with
org-protocol and has both a LIBRARY_ID and KEY_ID. The bibliography
entry will be generated by "exporting" zotero link to the required
format using a variation of gnotero. The "following/opening" of zotero
link will be done by mapping the local zotero link to
http://zotero.org-based URI (again) using gnotero.


I see that there is a need for bib2odt in much the same way as there is
a bib2html. Can someone post an example of Org file which would use
BibTex for post-processing (either to HTML or LaTeX) The ODT exporter
can also emulate what other backend does.

ps: This mail is more of a note to self or a note to any future
hackers. I am not certain I will be able to hack gnotero and have it
integrate with Emacs - but for a whimsical and a bored hacker like
nothing can be said with certainty.

Btw, gnotero is good. 

Re: [O] Formatting clock tables in the agenda

2011-11-10 Thread Tommy Kelly
Excellent Niels, thanks.

On Wed, Nov 9, 2011 at 4:03 PM, Niels Giesen  wrote:
> You should probably check org-agenda-clockreport-parameter-plist
>
> On Wed, Nov 9, 2011 at 4:30 PM, Tommy Kelly  wrote:
>>
>> I have a clock table in my agendas -- I got it there by setting
>> org-agenda-start-with-clockreport-mode. I'm trying to control its
>> format. I've tried using org-clock-clocktable-default-properties but
>> that seems to have no effect. For example, this from my
>> custom-set-variables:
>>
>>  '(org-agenda-start-with-clockreport-mode t)
>>  '(org-clock-clocktable-default-properties (quote (:maxlevel 2 :scope
>> file :indent t :link t)))
>>
>> The presence/absence of that second line makes no difference to how my
>> agenda clocktable looks.
>>
>> How do I control that particular table's format?
>>
>> thanks
>> Tommy
>>
>
>
>
> --
> http://pft.github.com
>



-- 
Tommy Kelly
+1 (512) 289-8262
http://www.verilab.com



Re: [O] Bug: cdlatex-tab in math-env isn't considered when inside of a list item. [7.7 (release_7.7.513.g2a5877)]

2011-11-10 Thread Maik Beckmann
The attached patch what works for me.  It is however the result
of a short trail'n'error session, since I'm by no means an
experienced lisp/elisp programmer.

With the patch the behavior is slightly different than usual with
lists.  Before TAB cycles the list, the cursor jumps out of the
Latex fragment:

action:
 - $y = a_0 + a_{1[TAB]}$
  + foo

result:
 - $y = a_0 + a_1[CURSOR]$
  + foo

action:
 - $y = a_0 + a_1[TAB]$
  + foo

result:
 - $y = a_0 + a_1$[CURSOR]
  + foo

action:
 - $y = a_0 + a_1$[TAB]
  + foo

result: emacs mumbles "SUBTREE".

action:
 - $y = a_0 + a_1$[TAB]
  + foo

result:
 - $y = a_0 + a_1$...
From 43ae3ff0393d8a43c02938ae621ae7a1c1d67b61 Mon Sep 17 00:00:00 2001
From: Maik Beckmann 
Date: Thu, 10 Nov 2011 11:51:07 +0100
Subject: [PATCH] When in a Latex fragment, try cdlatex-tab before the trying
 to cyle the list.

---
 lisp/org.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 92ced78..6f81981 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6143,6 +6143,8 @@ in special contexts.
 	 (or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol
 	(org-inlinetask-toggle-visibility))
 
+   ((and (org-inside-LaTeX-fragment-p) (org-try-cdlatex-tab)))
+
;; At an item/headline: delegate to `org-cycle-internal-local'.
((and (or (and org-cycle-include-plain-lists (org-at-item-p))
 		 (save-excursion (beginning-of-line 1)
@@ -6158,8 +6160,6 @@ in special contexts.
 
((org-try-structure-completion))
 
-   ((org-try-cdlatex-tab))
-
((run-hook-with-args-until-success
 	 'org-tab-before-tab-emulation-hook))
 
-- 
1.7.7.3



[O] Bug: cdlatex-tab in math-env isn't considered when inside of a list item. [7.7 (release_7.7.513.g2a5877)]

2011-11-10 Thread Maik Beckmann
* The observed behavior
Inside a list item cdlatex-tab isn't considered.  An example:

  To circumvent emacs' fill-paragrah issue with \[ \] I prefer using a
  inline math environment in a single item list.  Unfortunately cdlatex
  isn't considered when hitting TAB then
   - $y = a_0 + a_{1[TAB]}$ .
  Emacs echos "EMPTY ENTRY" instead.  The same line without the leading
  list item qualifier works fine.  This line
 $y = a_0 + a_{1[TAB]}$
  results in
 $y = a_0 + a_1$ .


* The reason
In org.el in org-cycle a `cond' statement dispatches is done when
TAB is pressed.  The call to `org-try-cdlatex-tab' is part of
this dispatch.  Before `cond' reaches this entry it reaches the
one which determines whether or not the current context is a list
item.  Since this is true here, `cond' is satified and never
considers `org-try-cdlatex-tab'.  The entry calls
`org-cycle-internal-local' which then emits the "EMPTY ENTRY"
message.


* What I expected
Lets considering the case that there is a sub-item.
 - $y = a_0 + a_{1}$
  + foo
I expect cdlatex-tab to be tried first.  If it's nothing cdlatex
can reason about, expand/collapse the list.  For
 - $y = a_0 + a_{1[TAB]}$
  + foo
turns into
 - $y = a_0 + a_1$
  + foo
Another TAB
 - $y = a_0 + a_1[TAB]$
  + foo
turns it into
 - $y = a_0 + a_1$...


* Org mode version info
Emacs  : GNU Emacs 24.0.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.7)
 of 2011-11-04 on myhost
Package: Org-mode version 7.7 (release_7.7.513.g2a5877)



Re: [O] zotero plain, org-odt, and citations in general

2011-11-10 Thread Christian Moe

On 11/10/11 5:53 AM, Erik Hetzner wrote:

It works for me, with MozRepl 1.1beta2, and the latest Zotero plain.


Thanks. If that's with the latest Firefox too (apparently I'm on 8.0, 
Mozilla's new approach versioning makes me dizzy), there must be some 
problem with my setup. I'll try to figure it out.


Yours,
Christian