Re: [O] Variable settings in .emacs VS cross device portability.

2012-02-03 Thread Eric S Fraga
Thomas S. Dye t...@tsdye.com writes:


[...]

 If you (and the receiver) tangle your export-settings source code block
 to init.el (:tangle init.el), then execute something like the following
 source code block

 #+begin_src sh
 emacs -Q -l init.el examplebug.org
 #+end_src

 you should be able to ensure that the receiver will get the same result
 you get.

 Of course, anything in your .emacs (or other initialization files) that
 is needed to produce the results will need to be included in
 export-settings.  

 hth,
 Tom

Thanks Tom!

Actually, I must apologise.  Your message addresses the OP's initial
question but somehow the thread has diverged from that and it's probably
my fault it has...  Sorry!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.03 (release_7.8.03.300.g9b820)




Re: [O] Unicode (hindi/devnagari) in beamer export

2012-02-03 Thread suvayu ali
On Fri, Feb 3, 2012 at 06:09, Vikas Rawal
vikasli...@agrarianresearch.org wrote:
 Works with a minor change as below:

 (setq org-latex-to-pdf-process
      '(xelatex -interaction nonstopmode -output-directory %o %f
       xelatex -interaction nonstopmode -output-directory %o %f
       xelatex -interaction nonstopmode -output-directory %o %f))

Ah, extremely sorry about that typo. I am glad things worked for you. :)

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [bug]Bug in export to LaTex: Lists with source code blocks

2012-02-03 Thread Thomas Holst
Hi,

· Nicolas Goaziou n.goaz...@gmail.com wrote:
 Boyun Tang tangbo...@hotmail.com writes:

 Hello,
 Today I found a bug which was well described in 
 http://thread.gmane.org/gmane.emacs.orgmode/48388

 I have pushed a fix for that bug.

 Thank you for reminding me about it, and to Thomas Holst for reporting
 it in the first place.

 Regards,

only today I had a chance to test the fix. Works like a charm. Thanks a
lot to Nicolas and to Boyun Tang for giving this thred a kick.

-- 
Mit freundlichen Grüßen / Best regards 

Thomas Holst 



Re: [O] org-babel export latex problem

2012-02-03 Thread Riccardo Romoli
The version is 6.33x

Best

2012/2/3 Thomas S. Dye t...@tsdye.com

 Riccardo Romoli ric.rom...@gmail.com writes:

  Hi, I'm new of these list and of the org-babel world.
  I need to use both LaTeX and R, so I write the R code within an src
  block:
 
  #+begin_src R :results output silent :exports none
  library(chemometrics)
  library(MASS)
  library(lattice)
  #+end_src
 
  When I export to LaTex (C-c C-e l) the R code I wrote, this is the
  result:
 
  \begin{verbatim}
  library(chemometrics)
  library(MASS)
  library(lattice)
  \end{verbatim}
 
  How could I  not display the result of the R computation? In the org-
  manual (chapter 14 ) I read that what I need should be done using:
 
  :results output silent :exports none
 
  but despite I use this option nothing change.
 
  Do you have any suggestion??
 
  Best
  Riccardo
 
 
 Aloha Riccardo,

 What version of Org mode are you using?

 All the best,
 Tom
 --
 Thomas S. Dye
 http://www.tsdye.com



Re: [O] org-babel export latex problem

2012-02-03 Thread suvayu ali
On Fri, Feb 3, 2012 at 12:43, Riccardo Romoli ric.rom...@gmail.com wrote:
 The version is 6.33x

That is way too old, I believe org-babel is a much newer feature. At
least its more mature now. Try one of the newer releases like 7.8.03.

http://orgmode.org/w/?p=org-mode.git;a=commit;h=2b3534a81f6f4c925f55ed7aaec31ead6f400577

-- 
Suvayu

Open source is the future. It sets us free.



[O] [beamer] Italic in overlay text

2012-02-03 Thread Sebastien Vauban
Hello,

When trying to have italic text inside some paragraph that must only be
displayed in some overlays, the text inside `/' is not converted into italic.

ECM:

--8---cut here---start-8---
#+TITLE: ECM
#+DATE:  2012-02-03
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:t

#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation,t]
#+BEAMER_HEADER_EXTRA: \usetheme{Madrid}\usecolortheme{default}
#+BEAMER_FRAME_LEVEL: 1
#+COLUMNS: %40ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) 
%4BEAMER_col(Col) %8BEAMER_extra(Extra)

* Italic in overlay text

#+LaTeX: \only1-2{

- On overlay 1 and 2

  /This quoted text should be in italic./

  #+LaTeX: \textit{
  This is in italic, but only in PDF LaTeX, because of the workaround.
  #+LaTeX: }

#+LaTeX: }\pause

- Always there

#+LaTeX: \pause

- Idem

--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




[O] TAB from within a text

2012-02-03 Thread François Pinard
Hi, everybody.

Writing a longish text for my coworkers this morning, I notice that I do
not know a quick way for collapsing the whole set of paragraphs I'm
currently writing, when their header happens to be many screenfuls above
point.  I have to first return to that header and do TAB there.  Even
this return was not evident to me at first.  I wrongly thought that `C-c
C-u' would do it, but it jumps far too much and lands one level higher
than I expected.  Then, /(org)Motion node/ taught me that I could use
`C-c C-j up' to this purpose; which is slightly convoluted to me, as I
always perceived `C-c C-j' as a kind of sophisticated reveal.

Is it unreasonable for me to hope that, instead of `C-c C-j up TAB', a
mere TAB from within a long text would quickly do what I wanted?

François



[O] Howto customize tags-todo to ignored scheduled Tasks

2012-02-03 Thread Jakob Lombacher
I'd like to make a TODO list, filtered by TAGS. This is working so
far, but now I also want to filter the scheduled TODOs.

I thought  something like that should do it, but it doesn't:

(1 asdf  tags-todo  HOME ((org-agenda-todo-ignore-scheduled 'all)

(org-agenda-todo-ignore-with-date 'all)))

Has anybody an idea how to do it?


Jakob



[O] org-special-ctrl-a/e induces problems in items

2012-02-03 Thread François Pinard
Hi, Org mode maintainers.

When org-special-ctrl-a/e is active, and when a list item is a whole
paragraph spanning many visual lines, `C-a' and `C-e' both misbehave.

`C-e' moves to the end of the visual paragraph (that is, the end of the
physical line) instead of moving at the end of the visual line.

`C-a' produces an error if the cursor is after the first visual line in
the visual paragraph, see the traceback below.  My guess is that
(org-list.el) org-at-item-p should return true only when on the first
visual line, while currently, it always return a true value.

François



Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  (11477 nil)
  (or ( pos after-bullet) (= (point) pos))
  (if (or ( pos after-bullet) (= ... pos)) (progn (goto-char after-bullet)))
  (when (or ( pos after-bullet) (= ... pos)) (goto-char after-bullet))
  (if (eq special t) (when (or ... ...) (goto-char after-bullet)) (when (and 
... ...) (goto-char after-bullet)))
  (let ((after-bullet ...)) (if (eq special t) (when ... ...) (when ... ...)))
  (cond ((and ... ...) (setq refpos ...) (goto-char ...)) ((org-at-item-p) (let 
... ...)))
  (progn (cond (... ... ...) (... ...)))
  (if special (progn (cond ... ...)))
  (when special (cond (... ... ...) (... ...)))
  (let ((pos ...) (special ...) refpos) (if (org-bound-and-true-p 
line-move-visual) (beginning-of-visual-line 1) (beginning-of-line 1)) (if (and 
arg ...) (call-interactively ...) (if ... nil ... ...)) (when special (cond ... 
...)) (org-no-warnings (and ... ...)))
  org-beginning-of-line(nil)
  call-interactively(org-beginning-of-line nil nil)



Re: [O] org-babel export latex problem

2012-02-03 Thread Thomas S. Dye
The current version is 7.8. Could you update and see if the problem persists?

Tom

Sent from my iPhone

On Feb 3, 2012, at 1:43 AM, Riccardo Romoli ric.rom...@gmail.com wrote:

 The version is 6.33x
 
 Best
 
 2012/2/3 Thomas S. Dye t...@tsdye.com
 Riccardo Romoli ric.rom...@gmail.com writes:
 
  Hi, I'm new of these list and of the org-babel world.
  I need to use both LaTeX and R, so I write the R code within an src
  block:
 
  #+begin_src R :results output silent :exports none
  library(chemometrics)
  library(MASS)
  library(lattice)
  #+end_src
 
  When I export to LaTex (C-c C-e l) the R code I wrote, this is the
  result:
 
  \begin{verbatim}
  library(chemometrics)
  library(MASS)
  library(lattice)
  \end{verbatim}
 
  How could I  not display the result of the R computation? In the org-
  manual (chapter 14 ) I read that what I need should be done using:
 
  :results output silent :exports none
 
  but despite I use this option nothing change.
 
  Do you have any suggestion??
 
  Best
  Riccardo
 
 
 Aloha Riccardo,
 
 What version of Org mode are you using?
 
 All the best,
 Tom
 --
 Thomas S. Dye
 http://www.tsdye.com
 


Re: [O] TAB from within a text

2012-02-03 Thread Nick Dokos
François Pinard pin...@iro.umontreal.ca wrote:

 Hi, everybody.
 
 Writing a longish text for my coworkers this morning, I notice that I do
 not know a quick way for collapsing the whole set of paragraphs I'm
 currently writing, when their header happens to be many screenfuls above
 point.  I have to first return to that header and do TAB there.  Even
 this return was not evident to me at first.  I wrongly thought that `C-c
 C-u' would do it, but it jumps far too much and lands one level higher
 than I expected.  Then, /(org)Motion node/ taught me that I could use
 `C-c C-j up' to this purpose; which is slightly convoluted to me, as I
 always perceived `C-c C-j' as a kind of sophisticated reveal.
 

Checking the navigation menu, I thought that

C-c C-p == outline-previous-visible-heading
C-c C-b == org-backward-same-level
C-c C-u == outline-up-heading

(in particular, C-c C-p in this case) would be the more natural choices for
navigation.

C-c C-j == org-goto does a lot more than that - in particular, it is modal
and you have to get out of the mode, e.g. by selecting a location and pressing
RET.

 Is it unreasonable for me to hope that, instead of `C-c C-j up TAB', a
 mere TAB from within a long text would quickly do what I wanted?
 

It does seem unreasonable to me, looking from the outside in: TAB is
overworked, overloaded and much too smart for its own good, and you are
asking it to be smarter and do more :-) But I wouldn't dismiss it as
impossible: org itself came about from a similar idea applied to outline.el
Whether it's worth it, I don't know: C-c C-p TAB has worked for me and has
seemed painless enough to me so as not to go looking for something better.

Nick





Re: [O] TAB from within a text

2012-02-03 Thread François Pinard
Alan Schmitt alan.schm...@polytechnique.org writes:

 On 3 Feb 2012, at 15:36, François Pinard wrote:

 Is it unreasonable for me to hope that, instead of `C-c C-j up
 TAB', a mere TAB from within a long text would quickly do what I
 wanted?

 I have this in my .emacs:

 ;; From
 http://stackoverflow.com/questions/8607656/emacs-org-mode-how-to-fold-block-without-going-to-block-header,
 how to fold a block from inside
 (defun zin/org-cycle-current-headline ()
   (interactive)
   (outline-previous-heading)
   (org-cycle))

 (add-hook 'org-mode-hook
 (lambda ()
   (define-key org-mode-map (kbd C-c t)
 zin/org-cycle-current-headline)
   ))

 Hope this helps,

Hello, Alan, and gang.

Yes, it does, yet a bit unexpectedly.  I see your usage of / to
control the my name space.  I also saw : and ::.  Maybe I should
change my habits, as I prepend fp-, which is a bit dumb.  I wonder if
some common wisdom developed in that area, which I should follow.

It also helps as telling that I'm abusing of global-set-key for my Org
mode key bindings, while I should be more particular, as you do. :-)

As for the real problem, my suggestion was really that TAB (and not `C-c
t') be used for such a purpose, in Org mode proper, as it seems to me as
the natural thing to do, and might be generally useful.  However, I'm
not fully sure the suggestion is necessarily a good one, as TAB also has
special meaning here and there (I'm thinking of tables).  Maybe TAB
would be good enough nevertheless to be worth amending?

François



[O] org-remember - org-capture: % functionality

2012-02-03 Thread Martin Pohlack
Hi,

org-remember templates could contain a % to jump to target location
immediately after storing note.

I can't find a similar thing for org-capture.  Is there a trick /
official way to achieve a similar effect with org-capture?

I like to tweak some entry in their context after capturing.

Thanks,
Martin



Re: [O] TAB from within a text

2012-02-03 Thread François Pinard
Nick Dokos nicholas.do...@hp.com writes:

 [Your suggestion of overloading TAB] does seem unreasonable to me, TAB
 is overworked, overloaded and much too smart for its own good [...]
 C-c C-p TAB [...] has seemed painless enough to me so as not to go
 looking for something better.

Sold! :-)  Thanks, Nick, for your wise comments.

François



[O] Hide only the :noexport: tag (or other specific tags) in agenda?

2012-02-03 Thread John Hendy
I know one can hide all tags
(http://orgmode.org/worg/org-faq.html#sec-16-13)... but is it possible
to set set only certain tags not to display? I want to see the task
and other tags, but it'd be nice not to have all my instances of
:noexport: showing up.


Thanks,
John



Re: [O] TAB from within a text

2012-02-03 Thread Alan Schmitt

On 3 Feb 2012, at 15:36, François Pinard wrote:


Hi, everybody.

Writing a longish text for my coworkers this morning, I notice that I 
do

not know a quick way for collapsing the whole set of paragraphs I'm
currently writing, when their header happens to be many screenfuls 
above

point.  I have to first return to that header and do TAB there.  Even
this return was not evident to me at first.  I wrongly thought that 
`C-c

C-u' would do it, but it jumps far too much and lands one level higher
than I expected.  Then, /(org)Motion node/ taught me that I could use
`C-c C-j up' to this purpose; which is slightly convoluted to me, as 
I

always perceived `C-c C-j' as a kind of sophisticated reveal.

Is it unreasonable for me to hope that, instead of `C-c C-j up TAB', 
a

mere TAB from within a long text would quickly do what I wanted?


I have this in my .emacs:

;; From 
http://stackoverflow.com/questions/8607656/emacs-org-mode-how-to-fold-block-without-going-to-block-header, 
how to fold a block from inside

(defun zin/org-cycle-current-headline ()
  (interactive)
  (outline-previous-heading)
  (org-cycle))

(add-hook 'org-mode-hook
  (lambda ()
	(define-key org-mode-map (kbd C-c t) 
'zin/org-cycle-current-headline)

))

Hope this helps,

Alan


[O] hidestarsfile: hidestars for file

2012-02-03 Thread Michael Brand
Hi all

Using hooks for file find and for file save I implemented
hidestarsfile: On the fly and inspired by hidestars (a cleaner outline
view: http://orgmode.org/manual/Clean-view.html )
- remove the leading stars from all headings when writing a buffer to
  the file
- reinsert the leading stars when reading a file into the buffer

Following is an example of the _file content_ first with leading stars
as usual and below without leading stars through #+STARTUP: odd
hidestars hidestarsfile:

#+BEGIN_EXAMPLE
  #+STARTUP: odd hidestars
  [...]
  * TODO section
  *** subsection
  * subsubsec
- bla bla
  * section
- bla bla
  *** subsection
#+END_EXAMPLE

#+BEGIN_EXAMPLE
  #+STARTUP: odd hidestars hidestarsfile
  [...]
  * TODO section
* subsection
  * subsubsec
- bla bla
  * section
- bla bla
* subsection
#+END_EXAMPLE

The latter is convenient for better human readability when an Org
file, additionally to Emacs, is read with a file viewer or, for
smaller edits, with an editor not capable of the Org file format. To
change the format for the current file simply add or remove the
keyword hidestarsfile in the STARTUP line.

hidestarsfile is just a hack and can not become part of the Org core:
- An Org file with hidestarsfile can not contain list items with a
  star as bullet due to the syntax conflict at read time.
- An Org file with hidestarsfile can almost not be edited with an Org
  mode without added functionality of hidestarsfile as long as the
  file is not converted back.

I am still uncertain about if this could be made Org-mode-specific to
cover more use cases: When switching between Org mode and another
major mode like Fundamental mode it would remove and reinsert the
leading stars in the buffer itself, not only in the file. The current
state is that it only reinserts the leading stars in the buffer and
only removes them in the file. It does this regardless of the major
mode, assuming that not-Org-files don't contain the ^#\+STARTUP:
hidestarsfile keywords. This is a simplification but I think it also
helps to ensure better that it is less prone to the error of loosing
track if it should now remove or reinsert and whether to mark
not-modified. The org-mode-hook is called also when following a link
and sometimes (source blocks?) more than once when just opening a
file. I guess that this tracking could be even harder for leaving Org
mode.

The text until here and the 40 lines of Emacs Lisp are on Worg:
http://orgmode.org/worg/org-hacks.html#hidestarsfile

Are there opinions about making hidestarsfile Org-mode-specific as
mentioned above?

Is there a hook for the event of leaving Org mode or could one be
added for this purpose?

Michael



Re: [O] Convert from date to week number, howto?

2012-02-03 Thread Georges Ko
Jambunathan K kjambunat...@gmail.com writes:

 I sometimes have to convert from a date to a week number, 

 Try this. 

 (org-odt-format-date 2011-12-31 Sat %U)
 (org-odt-format-date [2011-12-24 Sat] %U)

 You can steal the implementation. The functions have nothing to do with
 org-odt, btw.

Another way to get the week of the year is:

(require 'calendar)
(require 'cal-iso)

(car
  (calendar-iso-from-absolute
(calendar-absolute-from-gregorian 
  (list month day year
-- 
 Georges Ko g...@gko.net  2012-02-03




Re: [O] Howto customize tags-todo to ignored scheduled Tasks

2012-02-03 Thread Bernt Hansen
Jakob Lombacher kont...@lombacher.net writes:

 I'd like to make a TODO list, filtered by TAGS. This is working so
 far, but now I also want to filter the scheduled TODOs.

 I thought  something like that should do it, but it doesn't:

 (1 asdf  tags-todo  HOME ((org-agenda-todo-ignore-scheduled 'all)

 (org-agenda-todo-ignore-with-date 'all)))

 Has anybody an idea how to do it?

Hi Jakob,

You probably want to also set this variable

org-agenda-tags-todo-honor-ignore-options

I just set that globally with 

(setq org-agenda-tags-todo-honor-ignore-options t)

Regards,
Bernt



Re: [O] [beamer] Italic in overlay text

2012-02-03 Thread Eric S Fraga
Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 Hello,

 When trying to have italic text inside some paragraph that must only be
 displayed in some overlays, the text inside `/' is not converted into
 italic.

This does seem to highlight a bug in the exporter.  I cannot help you
directly with that.

However, I can suggest a more org-appropriate approach: lists understand
1-2 type of syntax so you can change your input file to something like
the attached.  More concise and easier to read...

#+TITLE: ECM
#+DATE:  2012-02-03
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:t

#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation,t]
#+BEAMER_HEADER_EXTRA: \usetheme{Madrid}\usecolortheme{default}
#+BEAMER_FRAME_LEVEL: 1
#+COLUMNS: %40ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args)
%4BEAMER_col(Col) %8BEAMER_extra(Extra)

* Italic in overlay text

- 1-2 On overlay 1 and 2

  /This quoted text should be in italic./

  #+LaTeX: \textit{
  This is in italic, but only in PDF LaTeX, because of the workaround.
  #+LaTeX: }

- Always there

- 3- Idem


Give it a try.

HTH,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.03 (release_7.8.03.300.g9b820)


Re: [O] org-remember - org-capture: % functionality

2012-02-03 Thread Darlan Cavalcante Moreira

I don't know if such a feature exists for the capture template, but after
you captured an item you can use C-u C-u C-c c (supposing C-c c is your
key-binding for org-capture) to go to the captured item location. The same
feature exists for refiled notes.

I use this a lot and I find it more useful then specifying this behaviour
in the capture template.

--
Darlan

At Fri, 03 Feb 2012 16:32:56 +0100,
Martin Pohlack m...@os.inf.tu-dresden.de wrote:
 
 Hi,
 
 org-remember templates could contain a % to jump to target location
 immediately after storing note.
 
 I can't find a similar thing for org-capture.  Is there a trick /
 official way to achieve a similar effect with org-capture?
 
 I like to tweak some entry in their context after capturing.
 
 Thanks,
 Martin
 



Re: [O] Emacs/Org-mode configs spread over multiple accounts/machines

2012-02-03 Thread Eric Schulte
One more option in this space is the technique used in the emacs starter
kit, in which specialized config files named after both the user and the
machine hostname are loaded on startup.  This allows sharing of config
across users and machines.

http://eschulte.me/emacs24-starter-kit/
https://github.com/eschulte/emacs24-starter-kit

Best,

Alan E. Davis lngn...@gmail.com writes:

 By the way, all of these are called from .emacs.el .   Another point, I
 have elected not to byte-compile the loaded elisp files in
 ~/WorkBench/Emacs , so they will load ok on multiple versions of emacs.

 On Thu, Feb 2, 2012 at 7:16 AM, Alan E. Davis lngn...@gmail.com wrote:

 My setup, while far from ideal, is working pretty well.  It does require a
 modicum of manual oversight.

 I have a directory, ~/WorkBench , in which all of my going work is
 located.  Dozens of subdirectories including every project I have worked on
 or am working on, with PDFs, etc.  In ~/WorkBench/org are some setup files:

org-init-settings.el
org-local-init-settings.el (included in .gitignore)
emacs-common-settings.el   (all machines)
emacs-local-settings.el (local machine --- included in
 .gitignore)
emacs-frame-setup-magic.el

 The directory ~/WorkBench and all subdirectories are under git
 supervision, so long as it stays smaller than about 3 GB.  In that case, it
 can be carried around on an 8GB flash drive, and cloned on other machines,
 though I've had to delete and reclone, once the repo got too large.   It
 could be cloned to Dropbox if I wanted to spend money on it, and trusted
 it.

 I really like this setup, the use of git.  However, I am using git at the
 most trivial level, and perhaps there are more direct ways to do this.

 The next step is to encrypt the whole thing.  I have encrypted a couple of
 sensitive files using bcrypt.

 Alan




 On Thu, Feb 2, 2012 at 5:59 AM, Karl Voit devn...@karl-voit.at wrote:

 * Yu yu_...@gmx.at wrote:
  Hello!
 
  I was wondering if there is a possibility to make org-files fully
  portable in behaviour (especially when exporting) between different
  emacs installations.

 The Tread has turned into BIND and local variables only.  I wanted
 to add my current solution which uses a different approach.

 My ~/.emacs is a symlink to ~/hosts/${HOSTNAME}/emacs where
 host-specific or platform-specific configuration is stored. The
 directory ~/hosts is synchronized[1] on all of my machines and
 accounts.

 In ~/hosts/all/emacs.d/* I have got myorgmode.el, mycommon.el,
 myauctex.el, myedit-server.el, mypython.el, and so forth.

 As you can imagine, the ~/hosts/${HOSTNAME}/emacs contains a load
 command for mycommon.el which refers to all the other el files.

 Therefore mycommon.el and all the others are identical on all my
 machines whereas ~/.emacs contains (only few) platform-specific
 things.

 Maybe this is a possible attempt to overcome your problems when
 using Org-mode on different machines.

  1. I am currently using Unison File Synchronizer[2] in combination
 with crond/LaunchCtl but git or something like dvcs-autosync[3]
 or even Dropbox will work too.
  2. http://www.cis.upenn.edu/~bcpierce/unison/
  3. http://www.mayrhofer.eu.org/dvcs-autosync
 --
 Karl Voit





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



Re: [O] Question related to org-babel-expand-src-block

2012-02-03 Thread Eric Schulte
Christophe Pouzat christophe.pou...@gmail.com writes:

 Hi all,

 Using the last org-mode version from the git repository (7.8.03) I've found a
 mismatch between the key-chord required to call function
 =org-babel-expand-src-block= (=C-c C-v v=) and the ones given in the
 info file: =C-c C-v p= or =C-c C-v C-p=. The same goes for the
 [[http://orgmode.org/worg/org-contrib/babel/intro.html][Babel:
 Introduction]] where the given key-chord is =C-c M-b p=. 

 In the same line, I have a question concerning the inclusion of the
 /expanded/ source block in the generated output. Let's assume that I
 define in my =.org= file a variable containing a file name like:

 #+name: my-file-name
 : dataFile.mat

 I want then a code block (using =R= in that case) that checks if
 dataFile.mat is in the working directory with something like:

 #+BEGIN_SRC R :var fileName=my-file-name :exports both
   fileName %in% list.files(pattern=*.mat)
 #+END_SRC

 I'm passing the file name as a variable because I want to repeat the same
 analysis on different data files. But I would like to see in the HTML output
 the value of the above variable =fileName=. I would like essentially  to
 export the expanded source block. Is there a way to do that?

 Thanks,

 Christophe

Hi Christophe,

Thanks for reporting the documentation issue, I've just pushed up a
patch which updates the documentation appropriately.

I do not believe there is a way to export an expanded code blocks, and I
fear you may not want to see the variable assignment code in your
export.  You can however use noweb references to achieve the behavior
you are after with the following.

#+name: my-file-name
: dataFile.mat

#+BEGIN_SRC R :exports both :noweb yes
  my-file-name() %in% list.files(pattern=*.mat)
#+END_SRC

Best,

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



Re: [O] how do scientists use org mode?

2012-02-03 Thread GMX Christoph 13
Hi all

Real life took precedence for a while and also I realized that making the step 
towards org mode would be a rather more substantial leap than I had 
anticipated. Given how dissatisfied I had become with the more traditional 
solutions to the problem one would expect a shift in paradigms though. 

This is to do more with the underlying emacs rather than org mode itself but 
sadly one cannot have one without the other. I hope that  I will learn to 
appreciate one as well as the other but my previous exposure to emacs was 
limited to one mind-blowingly powerful major emacs mode which I treated 
strictly as a tool (RALEE by S. Griffiths-Jones), ignoring the emacs specifics 
for the most part. It seems that now is the time to dive into emacs for real, 
and org mode is the culprit...

At the moment decades of muscle memory get in the way in accomplishing even 
simple tasks, but Aquamacs provides some basic familiarity and alleviates at 
least some of the pain. 

For the moment I will limit myself to one project notebook with embedded todos 
and go from there. This is BTW the main reason I asked for feedback from fellow 
scientists (no offense to anyone else). GTD and other task management systems 
are generally discussed in a way that implies that most tasks simply appear out 
of nowhere presumably from your superior hence little thought is devoted to WHY 
or even IF it should be done. The thing about science is that we tend to grow 
our ideas as well as create the market for them. I have no real experience in 
the corporate world, maybe there is a difference maybe not, but the context of 
tasks is very important hence the idea of having it available when needed but 
hidden when not required is one of the most appealing features of org mode for 
me now. 

I will probably be around and asking silly questions for a while. Thanks for 
the friendly welcome and your constructive tips, all of which I studied most 
attentively but it may take a while. 
May the force be with me :-)

Christoph





Re: [O] Google Tasks Integration

2012-02-03 Thread Eric S Fraga
Simon Thum simon.t...@gmx.de writes:

 On 01/31/2012 08:10 PM, Eric S Fraga wrote:
 Simon Thumsimon.t...@gmx.de  writes:


 On 01/31/2012 02:12 PM, Eric S Fraga wrote:
 I would be very interested in this.  I have links to and from google
 calendar for appointments but could not figure out how to do either
 direction for TODO items.
 You might want to give my script a try:

 https://github.com/simonthum/ical2org

 I'm using it against SoGo but I reckon any iCalendar thing would work,
 which TTBOMK includes google calendar.

 Cheers,

 Simon

 Thanks.  I already have an equivalent (described here a long time ago
 and also on Worg, albeit out of date -- sorry).  The problem is that
 Google doesn't export the TODO list when you ask for an ics file for a
 particular calendar.  At least, I've not figured out how to get the list
 exported.
 I see. Is your script published?

The scripts I use, or slightly older versions, and other bits can be
found on Worg:

http://orgmode.org/worg/org-tutorials/org-google-sync.html

Sorry for delay in getting back to you -- I usually read my emails while
offline!


-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.03 (release_7.8.03.310.g64734)




[O] org-babel-expand-src-block

2012-02-03 Thread Christophe Pouzat
Hi all,

Using the last org-mode version from the git repository (7.8.03) I've found a
mismatch between the key-chord required to call function
=org-babel-expand-src-block= (=C-c C-v v=) and the ones given in the
info file: =C-c C-v p= or =C-c C-v C-p=. The same goes for the
[[http://orgmode.org/worg/org-contrib/babel/intro.html][Babel:
Introduction]] where the given key-chord is =C-c M-b p=. 

In the same lin,e I have a question concerning the inclusion of the
/expanded/ source block in the generated output. Let's assume that I
define in my =.org= file a variable containing a file name like:

#+name: my-file-name
dataFile.mat

I want then a code block (using =R= in that case) that checks if
dataFile.mat is in the working directory with something like:

#+BEGIN_SRC R :var fileName=my-file-name :exports both
  fileName %in% list.files(pattern=*.mat)
#+END_SRC

I'm passing the file name as a variable because I want to repeat the same
analysis on different data files. But I would like to see in the HTML output
the value of the above variable =fileName=. I would like essentially  to
export the expanded source block. Is there a way to do that?

Thanks,

Christophe
-- 

Most people are not natural-born statisticians. Left to our own
devices we are not very good at picking out patterns from a sea of
noisy data. To put it another way, we are all too good at picking out
non-existent patterns that happen to suit our purposes.
Bradley Efron  Robert Tibshirani (1993) An Introduction to the Bootstrap

--

Christophe Pouzat
MAP5 - Mathématiques Appliquées à Paris 5
CNRS UMR 8145
45, rue des Saints-Pères
75006 PARIS
France

tel: +33142863828
mobile: +33662941034
web: http://www.biomedicale.univ-paris5.fr/physcerv/C_Pouzat.html



[O] not converted to amp; when in equation enviroments

2012-02-03 Thread Lianheng Tong
Dear all,

I am using org-mode version 7.7, and tried to export my org documents into html 
using org-export-html functions. I found that in normal texts and inline maths, 
the characters ,  and  are converted correctly to amp; lt; and 
gt; according to the definitions made by org-export-html-protect-char-alist.

However, the  and ,  signs used in equations are NOT converted.  For 
example, if one has some thing like:

First, type   

This is an inline math $1  y  8$.

\begin{align}
  x  = a + b \\
  y   c - d
\end{align}

Will give the following segment in the exported html file:

p
First, type amp; lt; gt;.
/p

p
This is an inline math \(1 lt; y gt; 8\).
/p

\begin{align}
  x  = a + b \\
  y   c + d
\end{align}

This produces an error when I tried to validate against the XHTML standard (as 
one would expect).

Is this an intended feature, and is there a switch/flag I can use to change 
this behaviour or is it a bug, and is there an easy fix? Thank you very much 
for your help in advance.

Best regards,

Lianheng


==
Lianheng Tong Tel: 
+44 20 7679 3302
London Centre For Nanotechnology   Fax: +44 20 7679 0595
University College London
lianheng.t...@ucl.ac.uk
17–19 Gordon Street, London WC1H 0AH, U.K.
==




[O] Showing evaluation buffer while executing source blocks?

2012-02-03 Thread Klaus-Dieter Bauer
Hello!

I wondered if there is a way to show the evaluation buffer (if any)
during evaluation of commands -- in particular when the command takes
a long time (e.g. when trying to document a building process involving
`make' invocations) waiting for the command to finish is counter
productive. Even worse if the command used turns out to cause an
infinite loop.

If not possible yet: At least in the case of session based evaluation,
this would simply mean a construct of the form
  : (save-excursion
  : start the session if not yet started
  : (display-buffer session buffer)
  : send commands to session)

The idea came up because I'm currently trying to document the building
process of mathematical libraries (matplotlib, numpy, scipy) under
Cygwin -- building those is pretty tricky there. And waiting for a
`make' invocation to finish before seeing any result... well ^^'

On a side note, as mentioned in the [O] [bug] cannot execute shell
code blocks thread, for shell commands sadly this simple solution
won't work, as session based evaluation never returns from the
session.

simple because: I couldn't figure out where this would have to be done ^^'


king regards, Yu



Re: [O] [ANN] ASCII back-end for new export engine

2012-02-03 Thread Nicolas Goaziou
Hello,

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

 I haven't been able to export a listing yet.  The following source
 exports with the old exporter, but fails with the experimental
 exporter.

This long standing bug should be fixed now.


Regards,

-- 
Nicolas Goaziou



Re: [O] Way to replace normal tabular env with booktabs?

2012-02-03 Thread John Hendy
On Fri, Jan 13, 2012 at 9:39 AM, Carsten Dominik
carsten.domi...@gmail.com wrote:

 On Jan 13, 2012, at 3:52 PM, Niels Giesen wrote:

 There is a patch from me waiting to be incorporated into org mode that lets 
 one use booktabs as export for normal org tables.

 You can find it @ http://patchwork.newartisans.com/patch/1016/

 Hi NIels,

 I am looking now at this patch, and maybe it would be better to implement 
 these three variables as one, holding a property or association list?  Makes 
 it easily extendable.

 Equally important - it would be great if you could try to implement this same 
 change in the new exporter engine from Nicolas, to ensure that the new 
 exporter will not lag behind.

 Regards

 - Carsten


Any new thoughts on this? It would be great if this could be adjusted
as mentioned and merged into org-mode! I'm still using the current
patch from Niels in a separate branch because I like it so much!


John




 On Fri, Jan 13, 2012 at 2:21 PM, John Hendy jw.he...@gmail.com wrote:
 On Thu, Jan 12, 2012 at 6:01 PM, Thomas S. Dye t...@tsdye.com wrote:
 Hi John,

 The Library of Babel comes with your Org-mode distribution.

 You'll find it at /contrib/babel/library-of-babel.org


 I guess you learn something new every day!

 In the org file, look for
 * Tables
 ** LaTeX Table Export

 There should be functions booktabs and booktabs-notes.

 One way to use booktabs is described here:

 http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-13-2


 I'll check these out. Looked at the worg howto. Not a huge fan of the 
 method, especially with hiding my tables, but I'll give it a shot. I figure 
 there's got to be a simpler way; just change the first \hline - \toprule 
 and the bottom one to \bottomrule; \midrules in between.

 Thanks again,
 John

 hth,
 Tom

 John Hendy jw.he...@gmail.com writes:

  On Thu, Jan 12, 2012 at 2:12 PM, Thomas S. Dye t...@tsdye.com wrote:
 
  Hi John,
 
  Agreed, booktabs makes good looking tables.
 
  Check out your Library of Babel.  There should  be a couple of functions
  there that will help you go from Org mode to booktabs.
 
 
  Haven't done much with babel other than writing code blocks. Do you mean
  this page?
  --- http://orgmode.org/worg/org-contrib/babel/library-of-babel.html
 
  Thanks for the suggestion. Feeling a bit lost, but am happy to look around
  for something that seems similar. I have no elisp-fu, so it'll need to be
  pretty darn similar :)
 
 
  John
 
 
  hth,
  Tom
 
  John Hendy jw.he...@gmail.com writes:
 
   Greetings,
  
  
   I was using wikibooks for some formatting assistance on tables the other
   day and ran into mention of the booktabs package in the Professional
   tables section. [1] [2]
  
   I really, really liked it's formatting, especially since one of my 
   column
   headers was a fraction. The standard tabular package places the \hlines
   extremely close to the top and bottom of my header row vs., as the
  booktabs
   package says, having extremely nice looking spacing for the table. I
  ended
   up doing the table manually inside #+begin_latex block.
  
   Would there be any way to specify that booktabs should be used? The
   formatting is literally identical except for 1) including the booktabs
   package and 2) using \toprule, \midrule and \bottomrule instead of
  \hlines.
   In fact, even with booktabs included, if you use \hlines instead of the
   booktab specific lines, you'll get a regular tabular table.
  
   Any thoughts on this?
  
  
   Best regards,
   John
  
   -
   [1] http://en.wikibooks.org/wiki/LaTeX/Tables#Professional_tables
   [2] http://www.ctan.org/tex-archive/macros/latex/contrib/booktabs/
   Greetings,I was using wikibooks for some formatting assistance on tables
  the other day and ran into mention of the booktabs package in the
  Professional tables section. [1] [2]
   I really, really liked it#39;s formatting, especially since one of my
  column headers was a fraction. The standard tabular package places the
  \hlines extremely close to the top and bottom of my header row vs., as the
  booktabs package says, having extremely nice looking spacing for the 
  table.
  I ended up doing the table manually inside #+begin_latex block.
   Would there be any way to specify that booktabs should be used? The
  formatting is literally identical except for 1) including the booktabs
  package and 2) using \toprule, \midrule and \bottomrule instead of 
  \hlines.
  In fact, even with booktabs included, if you use \hlines instead of the
  booktab specific lines, you#39;ll get a regular tabular table.
   Any thoughts on this?Best regards,John-[1]
  http://en.wikibooks.org/wiki/LaTeX/Tables#Professional_tables
   [2] http://www.ctan.org/tex-archive/macros/latex/contrib/booktabs/
 
  --
  Thomas S. Dye
  http://www.tsdye.com
 
  On Thu, Jan 12, 2012 at 2:12 PM, Thomas S. Dye span 
  dir=ltrmailto:t...@tsdye.com/span wrote:
  Hi John,
 
  Agreed, booktabs makes good looking tables.
 
  Check 

[O] Bug: CLOCKSUM does not work in column view when generating a second time [7.8.02]

2012-02-03 Thread Don Roberts

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


Given the following org-mode file:

#+PROPERTY: Effort_ALL  0:10 0:20 0:30 1:00 2:00 4:00 6:00 8:00
#+COLUMNS: %38ITEM(Details) %TAGS(Context) %7TODO(To Do) %5Effort(Time){:} 
%6CLOCKSUM{Total}

* Tasks
** TODO Task A
   :LOGBOOK:
   CLOCK: [2012-02-03 Fri 17:02]--[2012-02-03 Fri 18:02] =  0:00
   :END:
   :PROPERTIES:
   :Effort:   0:30
   :END:
** TODO Task B
   :PROPERTIES:
   :Effort:   1:00
   :END:

If you put the cursor on the * Tasks line and generate a Column View (C-c C-x 
C-c), then quit (q), then generate the Column View again, it fails with the 
message: ad-Orig-error: The CLOCKSUM property can not yet be set with 
`org-entry-put


Emacs  : GNU Emacs 23.3.50.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
 of 2011-10-25 on braeburn.aquamacs.org - Aquamacs Distribution 2.4
Package: Org-mode version 7.8.02

current state:
==
(setq
 org-agenda-skip-scheduled-if-deadline-is-shown t
 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-custom-commands '((G Geektool agenda ((agenda ) (alltodo))
   ((org-agenda-ndays 1) (org-deadline-warning-days 
7))
   (~/agenda.txt))
  )
 org-agenda-files '(~/Dropbox/GaugeProject.org ~/DropBox/TODO.org)
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-agenda-window-setup 'other-frame
 org-hide-leading-stars t
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-deadline-warning-days 3
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-stuck-projects '(+PROJECT+LEVEL=2/-DONE (TODO NEXT NEXTACTION) nil
  Information)
 org-support-shift-select t
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-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-clock-persist t
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-directory ~/Dropbox
 org-blank-before-new-entry nil
 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-publish-project-alist '((orgfiles :base-directory
  ~/Documents/Evansville/Website/ :base-extension 
org
  :publishing-directory
  
/ssh:drobe...@csserver.evansville.edu:~/www_home/
  :section-numbers nil :table-of-contents nil
  :html-postamble nil)
 (files :base-directory 
~/Documents/Evansville/Website/
  :publishing-directory
  
/ssh:drobe...@csserver.evansville.edu:~/www_home/
  :base-extension zip\\|pdf :publishing-function
  org-publish-attachment)
 (website :components (orgfiles files))
 (dre :base-directory 
~/Documents/DonRobertsEnterprises
  :base-extension org :publishing-directory
  
/ssh:donrobe...@donrobertsenterprises.com:/Library/WebServer/ 
:section-numbers nil :table-of-contents nil :html-postamble nil)
 )
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-agenda-span 'day
 org-agenda-dim-blocked-tasks 'invisible
 org-mode-hook '((lambda nil
  (org-add-hook (quote change-major-mode-hook)
   (quote org-show-block-all) (quote append) (quote local))
  )
 org-babel-hide-all-hashes)
 org-refile-targets '((TODO.org :level . 1))
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-log-into-drawer t
 org-export-interblocks '((lob org-babel-exp-lob-one-liners)
  (src org-babel-exp-inline-src-blocks))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-enforce-todo-dependencies t
 org-occur-hook 

[O] how to manage org-ids for many org files scattered on system

2012-02-03 Thread Brian van den Broek
Hi all,

I've started having a lot of org files in various locations across my
system, and I am wondering how others manage keeping track of global
ids in this situation.

I am aware of org-id-extra-files, but adding things by hand has
started to seem a bit painful. Additionally, as some projects are
done, their dedicated org files go away (content is moved to a common
archive org file) and I know I won't always remember to delete the
relevant entires in org-id-extra-files.

So far, the best I can figure is to write a script that runs as a
chron job and uses the results of appropriate find commands to
generate a small .el file that sets org-id-extra-files and that itself
gets loaded as a library in my .emacs.

What do others do? Additionally, anyone have any light to shed on how
long org-id-extra-files can get (how much data it can point to) before
org-id-update-id-locations gets bogged down?

Thanks and best,

Brian vdB



[O] [BUG] cannot open menu when in an org buffer

2012-02-03 Thread suvayu ali
Hi,

In a minimal Emacs session when I open _any_ org file and try to access
the GUI menu with a mouse, I get the following back trace:

Debugger entered--Lisp error: (void-function org-in-clocktable-p)
  org-in-clocktable-p()
  org-context()
  (assq :todo-keyword (org-context))

Switching to a non-org buffer (e.g. scratch) the problem disappears. Can
someone take a look?

Thanks,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] tags in clock table

2012-02-03 Thread Anton Travleev
Hello Bernt,

I want to get clock summary over a week for each tag I set during this week.

I have a lot of tags, so the manual filtering is tedious, not to mention that I 
can forget some of them.

There is no possibility to split the clocktable into chunks by tags, only by 
days or weeks, see option :step  (there was discussion in the thread 
http://thread.gmane.org/gmane.emacs.orgmode/38195/focus=38889, maybe it is 
outdated)

So I thought I can first just see all tags I set during the week in the 
clocktable (that is my initial question), and then use :tag option of the 
clocktable to get time summary for each tag.

Regards, Anton 

31.01.2012, 21:34, Bernt Hansen be...@norang.ca:
 Anton Travleev trato...@yandex.ru writes:

  Hi,

  is there possibility to see tags in the clock table?

 What exactly are you trying to do?

 There is supposed to be a way to limit the clock report to specific tags
 using the :tags heading but I haven't played with this at all.

 The agenda clock report used to limit to the filtered tags with C-u R
 but that no longer seems to work either :/  I haven't looked into which
 commit broke that functionality yet.

 If you use 'v c' in the agenda to look at clocking lines the tags
 associated with the headline are included -- but this isn't a clock
 report which totals the values, it just shows the raw data.

 Regards,
 Bernt



Re: [O] Tweaking the export

2012-02-03 Thread Christian Wittern

Hi Nicolas,

Thank you very much for taking the time for such a detailed recipe.  Today I 
finally found time to go over it and try to implement my transformer.  It 
turned out to be really easy to get going, but in the end, I hit a roadblock.



On 2012-01-29 18:07, Nicolas Goaziou wrote:


   3. If all went well, you now have an impressive Org to Org converter.
  You can even test it with:

  #+begin_src emacs-lisp
  (switch-to-buffer (org-export-to-buffer 'translator *Translation*))
  #+end_src

  Obviously, there is not much to see.


It worked wonderful until here.


Now, we're going to redefine `org-translator-paragraph' to properly
ignore one language or the other, depending on `:translator-side' value.

#+begin_src emacs-lisp
(defun org-translator-paragraph (paragraph contents info)
   Convert PARAGRAPH to Org, ignoring one language.
Language kept is determined by `:translator-side' value.
   (let ((leftp (eq (plist-get info :translator-side) 'left)))
 (replace-regexp-in-string
  (if leftp \t+.*$ ^.*\t+)  contents)))
#+end_src


With a little tweaking, I got rid of errors when running this code.  
However, no changes in the output where observable.  Finally, I looked at 
the output from step 3 above and realized that the parser normalizes my 
tab characters away.  Only a bunch of spaces in the output!  Ouch!!

So I guess I would need an option on the parser to switch tab expansion off.

I also intended to implement my transformer in a way that I first define the 
general org-e-org transformer and then derive a specialized transcormer by 
somehow inheriting the general transformer and then implement my specialized 
paragraph transformation.   It seems that this is at the moment not 
possible, but I think it would be good to think about this, that will make 
defining new exporters or even org-file tweakers a breeze.


Anyhow, again thanks for writing the new parser /  exporter and for your 
help with my problem!


All the best,

Christian


--
Christian Wittern, Kyoto