Re: [O] horizontal rules in table confuse org-table-iterate

2019-01-07 Thread Juan Pechiar
Hi Hendrik,

Everything above the first hline is considered a table heading, and is
therefore not included in calculations.

This is explained in the docs:
https://orgmode.org/manual/Updating-the-table.html

On Mon, Jan 07, 2019 at 04:23:01PM +0100, Hendrik Tews wrote:
> org-table-iterate does not update tables for me. In the following
> table:
>
> | 1 | 1 |
> | 2 | 2 |
> |---+---|
> | 3 | 4 |
> #+TBLFM: $2=$1+1::@3$1=vsum(@1..@2)
>
> M-x org-table-iterate does not update the table, although I was
> expecting a 2 in cell @1$2. If I delete the horizontal rule, the
> table is updated. Am I doing something wrong?



Re: [O] negating a filetag on an entry?

2016-07-15 Thread Juan Pechiar
On Fri, Jul 15, 2016 at 08:20:58AM -0400, John Kitchin wrote:
> If I use a line like:
>
> #+FILETAGS: f16-06625
>
> and I want a headline in the file to not have that tag, is that possible?

There is a hack by David Maus to remove redundant (already inherited)
tags from a heading:

https://lists.gnu.org/archive/html/emacs-orgmode/2010-01/msg00630.html

Regards,
.j.



Re: [O] What is the symbol/glyph that ... ?

2015-06-20 Thread Juan Pechiar
"I" (capital letter i) is bound to org-agenda-clock-in.

You can check binding in your installation via describe-function:

   C-h f org-agenda-clock-in

In the agenda buffer, you can check what is "I" bound to:

   C-h k I

.j.

On Sat, Jun 20, 2015 at 06:30:17AM +0100, Sharon Kimble wrote:
> What is the symbol/glyph or whatever for clocking in on a task in the
> agenda please? The menu says that it is "I", yet whatever I press on
> this UK keyboard I can't find it! I've tried I, 1, !, and even |,
> but none of them work! I can clock out okay using the keyboard, but
> just not able to clock in from the keyboard in the agenda view.
>
> Is it possible to customise it please to something that will work
> here? I've looked in all the org-agenda customisation files that I
> can find but can't see where I can change it from.



Re: [O] Filter in Captured Column View

2014-03-18 Thread Juan Pechiar
Hi Mats,

You can add

 :skip-empty-rows t

to the columnview header, so that rows with no Status property will
not show.

This, however, will also hide the "Release" headers. Workaround is to
add a dummy 'Status' property to these.

Doc here: http://orgmode.org/manual/Capturing-column-view.html

.j.

On Tue, Mar 18, 2014 at 12:38:52PM +0100, Mats Kindahl wrote:
> I am using the capture column view to capture the contents of a subtree
> at the beginning of the subtree. However, there are a lot of sections
> that do not contain anything interesting for the capture in question, so
> I would like to filter out anything except trees with certain tags.
>
> So, for the example below, it shows some headers at the beginning that I
> would like to avoid showing. Only in information on the individual
> releases should be shown as groups.
>
> Best wishes,
> Mats Kindahl
>
> * Report
>   :PROPERTIES:
>   :COLUMNS:  %ITEM %Status
>   :END:
>
> #+BEGIN: columnview :hlines 3 :id local
> | ITEM | Status|
> |--+---|
> | * Report |   |
> |--+---|
> | ** Uninteresting summary |   |
> |--+---|
> | ** Details   |   |
> |--+---|
> | *** Release 1|   |
> |  Feature #1  | Design|
> |--+---|
> | *** Release 2|   |
> |  Feature #2  | Confused  |
> |  Feature #3  | Completed |
> |  Feature #4  | Coding|
> |--+---|
> | *** Release 3|   |
> |  Feature #5  | Baffled   |
> #+END:
>
> ** Uninteresting summary
> ** Details
> *** Release 1
>
>  Feature #1
> :PROPERTIES:
> :Status:   Design
> :END:
>
> *** Release 2
>
>  Feature #2
> :PROPERTIES:
> :Status:   Confused
> :END:
>
>  Feature #3
> :PROPERTIES:
> :Status:   Completed
> :END:
>
>  Feature #4
> :PROPERTIES:
> :Status:   Coding
> :END:
>
> *** Release 3
>
>  Feature #5
> :PROPERTIES:
> :Status:   Baffled
> :END:



Re: [O] Agenda bug: 'now' is on the wrong day

2012-12-27 Thread Juan Pechiar
Huy,

please check your setting for org-extend-today-until:

   The hour when your day really ends.  Must be an integer.
   This has influence for the following applications:
   - When switching the agenda to "today".  It it is still earlier
 than the time given here, the day recognized as TODAY is actually
 yesterday.

.j.

On Thu, Dec 27, 2012 at 01:20:38AM -0800, Huy wrote:
> It's 1:17am over here.
> And when I pop up the agenda and then hit 'l', it says:
>1:17.. now - - - - - - - - - - - - - - - - - - - - - - - - 
> -
>
> but it's on the wrong day: yesterday.



Re: [O] Multiline #+MACRO:

2012-12-03 Thread Juan Pechiar
On Mon, Dec 03, 2012 at 08:28:26PM +0100, Benny Simonsen wrote:
> I would like to make a multiline macro that contains somethiing like this:
> #+ATTR_HTML: class="centerimg"
> file:./gallery/$1
>
> is it possible, and how?

Hi,

\n inside a macro definition gets expanded as a new-line.

So you can implement your macro thus:

#+MACRO myimg #+ATTR_HTML: class="centerimg"\nfile:./gallery/$1



[O] [BUG] org-agenda-goto-today from end of agenda buffer fails / OS-X only

2012-09-28 Thread Juan Pechiar
A very minor bug when jumping to today from agenda buffer, on Emacs
for OS-X.

To reproduce:

On the weekly agenda buffer (C-c a a):
 - switch to a week other than the current week (e.g. press 'f')
 - go to the end of the buffer ('M->')
 - call org-agenda-goto-today (press '.')

This operation fails with

'call-interactively: Wrong type argument: consp, nil'

The following setf fails because org-agenda-overriding-arguments is nil:

(setf (nth 1 org-agenda-overriding-arguments) sd)

The value of org-agenda-overriding-arguments is set to

(get-text-property (point) 'org-last-args)

So apparently, at end of agenda buffer (not on this week), this last
expression returns nil.

I get this error on Emacs for OSX (GNU Emacs 24.1.50.1
(x86_64-apple-darwin, NS apple-appkit-1038.36)), running Emacs -q or
otherwise, with latest org-mode development version (Org-mode version
7.9.1 (release_7.9.1-421-ge54882)).

Error does not occur on Linux.

Call trace:

Debugger entered--Lisp error: (wrong-type-argument consp nil)
  setcar(nil 734770)
  (let* ((c (nthcdr 1 org-agenda-overriding-arguments))) (setcar c sd))
  (setf (nth 1 org-agenda-overriding-arguments) sd)
  (let* ((sd (org-agenda-compute-starting-span (org-today) (or curspan 
org-agenda-ndays org-agenda-span))) (org-agenda-overriding-arguments args)) 
(setf (nth 1 org-agenda-overriding-arguments) sd) (org-agenda-redo) 
(org-agenda-find-same-or-today-or-agenda))
  (cond (tdpos (goto-char tdpos)) ((eq org-agenda-type (quote agenda)) (let* 
((sd (org-agenda-compute-starting-span (org-today) (or curspan org-agenda-ndays 
org-agenda-span))) (org-agenda-overriding-arguments args)) (setf (nth 1 
org-agenda-overriding-arguments) sd) (org-agenda-redo) 
(org-agenda-find-same-or-today-or-agenda))) (t (error "Cannot find today")))
  (let* ((args (get-text-property (point) (quote org-last-args))) (curspan (nth 
2 args)) (tdpos (text-property-any (point-min) (point-max) (quote org-today) 
t))) (cond (tdpos (goto-char tdpos)) ((eq org-agenda-type (quote agenda)) (let* 
((sd (org-agenda-compute-starting-span (org-today) (or curspan org-agenda-ndays 
org-agenda-span))) (org-agenda-overriding-arguments args)) (setf (nth 1 
org-agenda-overriding-arguments) sd) (org-agenda-redo) 
(org-agenda-find-same-or-today-or-agenda))) (t (error "Cannot find today"
  org-agenda-goto-today()
  call-interactively(org-agenda-goto-today nil nil)

Thanks,
.j.



Re: [O] Condition Case Before First Headline

2012-08-22 Thread Juan Pechiar
I can reproduce this (latest git version) if the clocktable
declaration lies before the first heading.

Minimal example:


bla bla

#+BEGIN: clocktable :maxlevel 7 :block yesterday :scope tree1

#+END:

bla bla

* heading1
  :LOGBOOK:
  CLOCK: [2012-08-22 Wed 14:18]--[2012-08-22 Wed 14:18] =>  0:00
  :END:

** heading2

* otherheading1


Position 2048 refers to the (character) position of the clocktable
declaration.

Debug trace:


  signal(error ("Before first headline at position 83 in buffer pepe.org"))

  error("Before first headline at position %d in buffer %s" 83 #)

  (condition-case nil (outline-back-to-heading invisible-ok) (error (error 
"Before first headline at position %d in buffer %s" (point) (current-buffer
  org-back-to-heading(t)

  (let (start-level re) (org-back-to-heading t) (setq start-level (funcall 
outline-level)) (if (equal start-level 1) nil (setq re (concat "^\\*\\{1," 
(number-to-string (1- start-level)) "\\} ")) (if (re-search-backward re nil t) 
(funcall outline-level
  org-up-heading-safe()

  ...


On Wed, Aug 22, 2012 at 07:10:10PM +0200, Bastien wrote:
> Esben Stien  writes:
>
> > I've stumbled into serious trouble with my org file.
>
> What version of org are you using?
>
> > I C-c C-c over:
> >
> >  #+BEGIN: clocktable :maxlevel 7 :block yesterday :scope tree1
> >
> > , but I get:
> >
> > condition-case: Before first headline at position 2408 in buffer agenda.org
> >
> > I cannot figure out what's wrong; there's nothing special at line 2408
> >
> > Is there some way to debug this?
>
> Can you make a minimal example to help us reproduce this?
>
> Thanks,
>



Re: [O] Tab to indent plain lists

2012-08-15 Thread Juan Pechiar
Hi Christopher,

M-right and M-left on item 1.1 will promote / demote it, just as with
headings.

http://orgmode.org/manual/Plain-lists.html#Plain-lists

Regards,
.j.

On Wed, Aug 15, 2012 at 05:49:52PM -0400, Christopher J. White wrote:
> I take miscellaneous meeting notes using plain lists.  It's usually
> a pretty hectic trying to take notes during a meeting, so I'm making
> up the structure as I go along.
>
> I often get to a point where I indented an item wrong:
>
>   - item 1
>   - item 1.1
>   - item 2
>
> I need to get up to item 1.1 and move it as a child of 1.  I'd like
> [tab] to adjust the indentation.
>
> I discovered the 'org-cycle-include-plain-lists' variable.  The
> documentation for the var states:
>
>  If `org-cycle-include-plain-lists' has not been set,  fixes
>  the indentation of the current line in a heuristic way.
>
> That sounds like what I want, but setting to nil doesn't do it, it
> just makes  a nop.



Re: [O] agenda: why are tags enclosed with two :?

2012-07-18 Thread Juan Pechiar
The empty tag '::' means that your TODO 12345 has no tags.

The :habit: tag was inherited from a parent heading.

.j.

On Wed, Jul 18, 2012 at 02:25:54PM -0400, mrigetitd...@safe-mail.net wrote:
> This is an except of my agenda:
>
> 14 days-agenda (W29-W31):
> Wednesday  18 July 2012
>   TODO 12345 *   !  
> :habit::
>
> Why is the tag enclosed with two :?



Re: [O] [bug] spreadsheet does not replace some fields

2012-06-20 Thread Juan Pechiar
On Wed, Jun 20, 2012 at 02:26:42PM +0200, Michael Brand wrote:
> Isn't there a nasty spreadsheet bug? I'm quite confused that it has
> not been discovered yet so I start to doubt on my reliability.

Hi, Michael.

This is a feature, not a bug.

>From the manual (section 3.5.6 Column Formulas):

  If the table contains horizontal separator hlines, everything before
  the first such line is considered part of the table header and will
  not be modified by column formulas.

So, you need to add a horizontal separator at the top of your table.
Otherwise the first 2 lines are considered as headers

Regards,
.j.

> - bug:
>   | this field is not replaced | 1 |
>   | this field is not replaced | 2 |
>   |+---|
>   | 3  | 3 |
>   #+TBLFM: $1 = $2
>
>   - last minutes' release_7.8.11-85-g62453c5
>   - at least back to release_7.8.09-555-g323836f
>   - emacs -q, 23.3.1
>
> - expected:
>   | 1 | 1 |
>   | 2 | 2 |
>   |---+---|
>   | 3 | 3 |
>   #+TBLFM: $1 = $2
>
> - this variation works as expected:
>   | 1 | 1 |
>   | 2 | 2 |
>   | 3 | 3 |
>   #+TBLFM: $1 = $2
>
> Michael



Re: [O] Scheduling: Finishing a task 'Yesterday' OR Repeat on the same day

2012-06-17 Thread Juan Pechiar
On Sun, Jun 17, 2012 at 08:12:19PM -0400, William LÉCHELLE wrote:
> > org-mode thinks I finished it for 'today' because it's after 0AM and
> > schedules it for 'tomorrow'. This way, I'll forget it for one day.
> >
> > Is there a simple day to say: "I finished this task yesterday" without
> > me having to manually change every date in the tree, the PROPERTIES
> > drawer, and in the Logbook?
>
> Is the org-extend-today-until variable what you're searching for ?
>
> (Assuming you don't do anything past midnight you don't consider to be done 
> the
> day before.)

And if you are even past your org-extend-today-until time, the
command org-agenda-todo-yesterday comes to the rescue: it will record
your state change at 23:59 the previous day.

Very useful for habit tracking.

.j.



Re: [O] Converting table to properties

2012-06-06 Thread Juan Pechiar
On Wed, Jun 06, 2012 at 05:55:52PM +0530, Vikas Rawal wrote:
> I have a table under each of several headlines in an org file. Each
> table has a row of column labels and a row of data. I would like to
> convert the table into properties, with labels coming from first row
> and values of properties coming from the second row.
>
> How should I do this?

Hi Vikas,

This is a quick hack on org-table-transpose-table-at-point to print
out a property list instead of a table.

#+begin_src elisp

(defun vikas-convert ()
  "table to props"
  (interactive)
  (let ((contents
 (apply #'mapcar* #'list
;; remove 'hline from list
   (delq nil (mapcar (lambda (x) (when (listp x) x))
   (org-table-to-lisp))
(delete-region (org-table-begin) (org-table-end))
(insert "  :PROPERTIES:\n")
(insert (mapconcat (lambda(x) (concat "  :" (first x) ": " (second
x) "\n" ))
   contents ""))
(insert "  :END:\n\n")))

#+end_src

This transforms:

| PROP1 | PROP2 | PROP3 |
| 1 | 2 | 3 |

into

  :PROPERTIES:
  :PROP1: 1
  :PROP2: 2
  :PROP3: 3
  :END:

Hope it helps.
.j.



Re: [O] Export individual clock entries to HTML?

2012-03-01 Thread Juan Pechiar
On Thu, Mar 01, 2012 at 12:10:16PM -0500, Jesse W. Wilson wrote:
>  After a year and a half with paper notebooks, I've decided to
> return to org-mode. :) One thing I could never figure out, though,
> is how to get org-export-as-html to export individual clock entries.
> The clock summary tables are very nice, but I would also like to see
> clock-in and clock-out timestamps for each entry I make.
>
> Is there an option or setting I am missing?

Add the 'd:t' option to the export options of the clocking subtree:

   :PROPERTIES:
   :EXPORT_OPTIONS: d:t
   :END:

(or to the file export options).

This will show drawer contents for every entry.

.j.



Re: [O] relative row reference in table formula

2012-03-01 Thread Juan Pechiar
Hi Osiris,

On Thu, Mar 01, 2012 at 11:01:39AM -0300, OSiUX wrote:
> is possible to define the reference to the last row of the following @II+$3, 
> to avoid
> having to change the number of row (@4$3)?
>
> in this example does not calculate:
>
>   | date | item  |cost |
>   |--+---+-|
>   | [2012-03-01 jue] | item 1|   30.00 |
>   | [2012-03-01 jue] | item 2|   20.00 |
>   |--+---+-|
>   |  |   |   30.00 |
>   #+TBLFM: @II+$3=vsum(@I..@II);%0.2f

It should be '@II+1$3' according to documentation, but anyway it
doesn't get evaluated.

However, '@>$3' (meaning the last row, col 3) does get evaluated
correctly.

In any case, if you add/remove rows/columns using M-S-arrows, the
absolute formula references get updated accordingly (e.g. formula at
@4$3 goes to @5$3 after inserting a row).

Saludos,
.j.



Re: [O] fast navigation

2011-12-15 Thread Juan Pechiar
Hi,

Have a look at org-goto (C-c C-j)

   http://orgmode.org/manual/Motion.html#index-org_002dgoto-83

And also completion features (eg. iswitchb emulation)

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

Regards,
.j.

On Thu, Dec 15, 2011 at 05:39:41PM +0400, sergio wrote:
> Is it possible to move through org file like cd on filesystem, ie press
> special hotkey and then /foo/bar/baz for goto baz headline in such file:
>
> * foo
> ** bar
> *** baz
>
> Is it possible to use completion for such paths (/foo/bar/b)?



Re: [O] [BUG] LaTeX subtree export gives spurious "unbalanced begin/end_%s blocks" error

2011-12-12 Thread Juan Pechiar
I have the same problem.

It occurs on a 2nd pass through org-export-blocks-preprocess (in
org-exp-blocks.el).

1st pass runs OK, 2nd pass gets the error condition.

1st pass processes the following:

   (buffer-substring match-start (point-max)) ->
   "#+begin_src emacs-lisp\n  (message \"Hello, World!\")\n#+end_src\n"

2nd pass processes an emptied skeleton of the block

   (buffer-substring match-start (point-max)) ->
   "#+begin_src emacs-lisp\n#+end_src\n"

And fails to balance begin with end.

At this point in the code, the regular expression for matching
begin/end contains (I made ^M and tab visible here):

  inner-re  =   "[\r\n][\t ]*#\\+\\(begin\\|end\\)_src"

And this expression fails right away:

  (re-search-forward inner-re nil t)  ->  nil

I'll try to dig further into what's goning on.

Regards,
.j.

On Mon, Dec 12, 2011 at 09:54:18AM +0100, Christian Moe wrote:
> Hi,
>
> Here's a minimal document:
>
> BEGIN EXAMPLE
>
> #+title: Testing
>
> * Src blocks
>
> Here's some Lisp:
>
> #+begin_src emacs-lisp
>   (message "Hello world!")
> #+end_src
>
> END EXAMPLE
>
> When I try to export the "Src blocks" subtree to PDF via LaTeX, I
> get the error:
>
> "unbalanced begin/end_src blocks"
>
> Export of the whole document to PDF via LaTeX is not affected.
>
> Neither, initially, is HTML export, including subtree export to
> HTML. However, after getting an error by trying to export the
> subtree to LaTeX, I get the same error when trying to export to HTML
> (whether subtree or the whole document). I can "clear" the HTML
> export error by exporting the whole document via LaTeX again.



Re: [O] org table spreadsheet problem

2011-11-28 Thread Juan Pechiar
Hi,

Please check the following thread on a similar problem:

   http://thread.gmane.org/gmane.emacs.orgmode/29877/focus=29920

There is a definition for 'vsumif' function you can use to add
conditionally.

Regards,
.j.

On Mon, Nov 28, 2011 at 03:32:05PM +0800, qkbey...@gmail.com wrote:
> hi,all.
> I have a orgtbl like the following,
>
> | # |  2 | a   |
> | # | -2 | abc |
> | # |  5 | abc |
> | # | -3 | a   |
> |---++-|
> |   || |
> | ^ |  x | |
>
> and i want to sum the second column which the corresponding  third
> column's values="abc"  to variable x. (in this example  $x = -2+5 = 3).
> what Formula syntax for Calc/Lisp can achieve this,please. thanks.



Re: [O] feature request for org-store-log-note

2011-09-27 Thread Juan Pechiar
Hi John,

Please check the variable

   org-log-states-order-reversed

Documentation:
Non-nil means the latest state note will be directly after heading.
When nil, the state change notes will be ordered according to time.

Regards,
.j.

On Tue, Sep 27, 2011 at 08:51:27PM -0400, John J Foerch wrote:
> I use org to manage TODO lists in which I want to keep time stamps for
> the creation of an item, and for each state change.  To be as clear as
> possible, I'll just paste the portion of my config that affects how
> TODOs work:
>
>   (setq org-treat-insert-todo-heading-as-state-change t
> org-log-into-drawer t
> org-log-done nil)
>
>   (setq org-todo-keywords
> '((sequence "TODO(t!)" "|" "DONE(d!)" "CANCELLED(c!)")))
>
>   (setcdr (assq 'state org-log-note-headings)
>   "State -> %s  %t")
>
> This logs each state change (including creation) into the LOGBOOK
> drawer.  It's great.  My feature request concerns the order in which the
> notes are logged.  Each new note is inserted at the top of the drawer.
> I would prefer it if they could be logged to the end of the drawer, so
> that one could read all of the state changes in chronological order from
> the top down.



Re: [O] deadline :: schedualed :: or-later

2011-08-29 Thread Juan Pechiar
Hi Michael,

Please check the purpose of SCHEDULED in org-mode:

   http://orgmode.org/manual/Deadlines-and-scheduling.html

It is exactly what you mean by starting at a day or later.

For a fixed date, just drop a timestamp inside a heading.

Regards,
.j.

On Mon, Aug 29, 2011 at 01:38:26PM +0200, Michael Hintz wrote:
> IMHO it needs a 3nd date-mode. I use deadline for all thinks
> that have to be done until the deadline-date. I use scheduled
> for a fix date ...
>
> and what about thinks that could start at a date "or later".
>
> I tried to fix it by using a time for fix and no time for
> non-fixed or has-to-be-start dates, but this is no solution,
> because there are todos that have to be done on a fix-time and
> others only on a fix day.



Re: [O] How to uniformly configure multiple org files

2011-08-05 Thread Juan Pechiar
Hi Darlan,

Please check #SETUPFILE

   http://orgmode.org/manual/In_002dbuffer-settings.html

Regards,
.j.

On Fri, Aug 05, 2011 at 02:54:30PM -0300, Darlan Cavalcante Moreira wrote:
>
> In each org file I usually put several configuration lines such
> as #+STARTUP, #+OPTIONS, #+LINK, etc. Is there a way to keep these
> configurations in a single file and then "include" this file in each org
> file I want? This would be particularly useful for projects.
>
> What I have in mind is something like a #+INCLUDE_CONF keyword similar
> to #+INCLUDE, but while #+INCLUDE includes the content of one org-file into
> another, the #+INCLUDE_CONF would include the configuration comments while
> ignoring the content (so that we could use headings to separate the
> configuration comments, for instance).
>



Re: [O] Crashing bug in spreadsheet

2011-07-22 Thread Juan Pechiar
Hi,

'@II..@III' means all rows between the second and third h-lines. In
your case, this is the same vsum(), so you get a circular reference.

Try @I..@II instead

Regards,
.j.

On Fri, Jul 22, 2011 at 06:48:36PM +, ken.willi...@thomsonreuters.com wrote:
> Hi,  I had the following text in a table, and hit  in the
> bottom-right cell:
>
> | Who | Amt |
> |-+-|
> | A   |   36.70 |
> | A   |  679.96 |
> | B   |  192.31 |
> | B   | 2500.03 |
> | B   |   74.47 |
> | C   |   26.64 |
> | D   |   82.00 |
> |-+-|
> | | :=vsum(@II..@III)   |
>
> This caused CPU usage to peg to 100%, and Emacs to hang until killed.
> Probably because of the invalid reference, I guess.



Re: [O] disable "org-decrypt: auto-save-mode may cause leakage"

2011-07-14 Thread Juan Pechiar
On Thu, Jul 14, 2011 at 02:22:32PM +0200, Karl Voit wrote:
> How can I auto-answer the question from the subject line with «n»
> (per default) any time it is asked?

Hi Karl,

You can customize this behaviour via

org-crypt-disable-auto-save

You probably have it set to 'ask'. Options exist for always
enabling/disabling auto save, and for encrypting the auto-saved
version automatically.

M-x customize-variable RET org-crypt-disable-auto-save RET

Regards,
.j.



Re: [O] [babel] using #+call for inline results

2011-06-22 Thread Juan Pechiar
Hi,

The documentation for #+call is rather confusing:

  It is also possible to evaluate named code blocks from anywhere in
  an Org-mode buffer or an Org-mode table. #+call (or synonymously
  #+function or #+lob) lines can be used to remotely execute code
  blocks...

Because aparently #+call only works on on a line by itself. Check the
following in ob-lob.el:

#+begin_src emacs-lisp
  (defconst org-babel-lob-one-liner-regexp
  (concat
   "^\\([ \t]*\\)#\\+\\(?:"
   (mapconcat #'regexp-quote org-babel-lob-call-aliases "\\|")
   "\\):[ \t]+\\([^\(\)\n]+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)"
   "\(\\([^\n]*\\)\)\\(\\[.+\\]\\|\\)[ \t]*\\([^\n]*\\)")
  "Regexp to match calls to predefined source block functions.")
#+end_src

This only matches whitespace at the beginning of line followed by
#+call (or lob or function), unlike the embedded calls of the form
src_{body} which can be inlined.

Regards,
.j.

On Wed, Jun 22, 2011 at 12:07:57PM +0100, Eric S Fraga wrote:
> I have been playing with org babel for putting results inline within an
> exported latex file.  A simple example is here:
>
> --8<---cut here---start->8---
> * testing inline evaluation of babel source blocks
>
>   #+srcname: benzene-chlorobenzene-relative-volatility
>   #+begin_src octave :exports none :results output raw :var T=25
> format bank
> pb = 10^(6.89272 - 1203.531/(T+219.888));
> pc = 10^(7.10690 - 1500.0  /(T+224.000));
> alpha = pb/pc;
> disp(alpha)
>   #+end_src
>
>   1. The first step is to evaluate the relative volatility at \(T=25 ^{\circ} 
> C\):
>  #+call: benzene-chlorobenzene-relative-volatility[:results output 
> raw](T=25) :exports results
>
>   2. Compare this to the value we get at 50 \(^{\circ}C\):
>  #+call: benzene-chlorobenzene-relative-volatility(T=50) :exports results
>
>   3. Next we use this value to draw an equilibrium curve.
>
> --8<---cut here---end--->8---
>
> If I evaluate the code block, I get what I expect:
>
> ,
> |   #+results: benzene-chlorobenzene-relative-volatility
> |   7.86
> `
>
> However, when I export the file, the #+call lines get wrapped in a
> verbatim environment regardless of what or where I specify for
> the :results header arguments.  E.g.:
>
> ,
> | \begin{enumerate}
> | \item The first step is to evaluate the relative volatility at \(T=25 
> ^{\circ} C\):
> |
> |
> | \begin{verbatim}
> |   7.86
> | \end{verbatim}
> |
> | \item Compare this to the value we get at 50 \(^{\circ}C\):
> |
> |
> | \begin{verbatim}
> |   6.32
> | \end{verbatim}
> `
>
> What am I doing wrong?  I have tried various permutations of the
> placement of the :results header and various options for it but do not
> seem to have hit on the right combination.
>
> Ideally, I would like the number to appear completely inline with the
> text the precedes and follows the #+call statement.  I would prefer to
> not have a new paragraph started, for instance.
>
> On a related note, although the manual seems to indicate that "raw" and
> "org" are synonymous, they behave differently when evaluating a code
> block with the latter encapsulating the output within #+begin_org
> and #+end_org.  The behaviour is fine but maybe the documentation,
> assuming I have understand things correctly, should be changed to
> reflect the difference in behaviour?
>
> Thanks,
> eric
>



Re: [O] HTML5 presentations

2011-06-15 Thread Juan Pechiar
On Wed, Jun 15, 2011 at 07:19:46PM +0100, Eric S Fraga wrote:
> What browser(s) are people using for this?  Conkeror doesn't work well
> at all and iceweasel (aka firefox) 3.5.19 sort of works.

Hi,

Opera 11 (OSX) seems to work OK, only that slides start to appear
shifted the higher the slide number shown. (~5% left for each slide).

.j.





Re: [O] Export option for hiding TODO keyword

2011-05-12 Thread Juan Pechiar
Hi,

Doesn't this option do what you want?

   #+OPTIONS: todo:nil

Just tested it, and it works.

Regards,
.j.

On Thu, May 12, 2011 at 10:27:20PM +0200, Sebastien Vauban wrote:
> I did not find a way to hide the TODO keywords from the headings, on export.
>
> Though, I think it would make sense in at least the 2 following cases:
>
> - You sometimes want to send a draft of a PDF doc, but don't necessarily want
>   to show to the readers all the statuses attached to every section (like
>   DONE, WAIT, DFRD, etc.).
>
> - You want to publish HTML notes, and don't want the *changing* TODO keyword
>   to be part of the URL, invalidating it as soon as the status changes.



Re: [O] turn headline(s) into plain list?

2011-05-06 Thread Juan Pechiar
Hi,

'C-c -' may help to some extent:

  Cycle the entire list level through the different itemize/enumerate
  bullets (‘-’, ‘+’, ‘*’, ‘1.’, ‘1)’) or a subset of them, depending on
  org-plain-list-ordered- item-terminator, the type of list, and its
  position17. With a numeric prefix argument N, select the Nth bullet
  from this list. If there is an active region when calling this,
  selected text will be changed into an item. With a prefix argument,
  all lines will be converted to list items. If the first line already
  was a list item, any item marker will be removed from the list.
  Finally, even without an active region, a normal line will be
  converted into a list item.

It will convert headings into nested list items, but not the other
way.

Regards,
.j.

On Fri, May 06, 2011 at 02:39:27PM -0400, Gary Oberbrunner wrote:
> Is there any way to turn a headline (and its subtree) into a plain
> list (and nested list items)?  Or better yet, turn all level N and
> below headlines into plain lists at the corresponding level?
>



Re: [O] Org table with long lines visibility

2011-05-04 Thread Juan Pechiar
If you're running Emacs on a graphic environment, there is a mouse
tooltip showing the whole cell contentes when you hover over a
truncated cell.

Regards,
.j.

On Wed, May 04, 2011 at 06:48:56PM +0100, Johnny wrote:
> I have a table with ridiculously long lines, so I have limited them by
> putting '' in the first row. To edit them, I use 'C-c `' to get the
> full text in a separate buffer, which works fine, especially together
> with 'longlines-mode'. However, browsing the table contents is very
> cumbersome, so I am wondering if there is any way to make the
> 'org-table-edit-field' to be permanently visible in a buffer,
> automatically updating while moving around in the table to view the full
> content of the current cell?  Similar to the way BBDB pops up and shows
> the sender in a separate buffer, if known.



Re: [O] DITAA and Unicode characters [babel]

2011-04-25 Thread Juan Pechiar
On Mon, Apr 25, 2011 at 01:13:41PM -0600, Eric Schulte wrote:
> I just pushed up a change to ob-ditaa which adds a new header argument,
> namely :java through which options can be passed to the java command.
> With that patch the following should work
>
> #+begin_src ditaa :file ... :cmdline -e utf-8 -r -v :java 
> -Dfile.encoding=UTF-8
>   ...
> #+end_src
>
> Now that there is a :java header argument for ditaa code, the following
> could be put in a user's init file to set this flag for *all* ditaa code
> run on their system.
>
> #+begin_src emacs-lisp
>   (push '(:java . "-Dfile.encoding=UTF-8") 
> org-babel-default-header-args:ditaa)
> #+end_src

Works perfectly! Thanks!

> I wonder if there would be any downside to adding this as a default
> value?  This could be added to `org-babel-default-header-args:ditaa' in
> ob-ditaa.el.

I think it'd be a reasonable default that will work out-of-the-box for
most users.

In case of not using UTF-8, the user can override this setting at
will as you show above.

Regards,
.j.



[O] DITAA and Unicode characters [babel]

2011-04-24 Thread Juan Pechiar
Hi,

Out of the box, ob-ditaa does not work with non-ascii characters.

I looked into the problem in order to answer a user request on
StackOverflow (yes, there are org-mode questions posted there instead
of here!).

http://stackoverflow.com/questions/5758498/problem-with-ditaa-and-foreign-characters-in-org-mode

In order for ditaa to accept UTF-8 characters in the input file, it
must be called with the corresponding property setting:

   java -Dfile.encoding=UTF-8 -jar path/to/ditaa.jar ...

Attached is a dirty patch for hard-coding this property setting.

I don't know what the proper way of setting this property should be:

 - somehow setting it system-wide (any Java guru out there?).

 - or adding a customization to ob-ditaa.el for this property

 - or adding magic to ob-ditaa so that the same encoding of the buffer
   gets set to this Java property

I can help with the implementation if given some feedback on the above
options.

Regards,
.j.
diff --git a/lisp/ob-ditaa.el b/lisp/ob-ditaa.el
index 20b5c42..dc17a4d 100644
--- a/lisp/ob-ditaa.el
+++ b/lisp/ob-ditaa.el
@@ -55,7 +55,7 @@ This function is called by `org-babel-execute-src-block'."
 		(cdr (assoc :file params
 	 (cmdline (cdr (assoc :cmdline params)))
 	 (in-file (org-babel-temp-file "ditaa-"))
-	 (cmd (concat "java -jar "
+	 (cmd (concat "java -Dfile.encoding=UTF-8 -jar "
 		  (shell-quote-argument
 		   (expand-file-name org-ditaa-jar-path))
 		  " " cmdline


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] Apply custom CSS class to headings in HTML export?

2011-03-31 Thread Juan Pechiar
You can add custom styles via properties:

  In order to add styles to a subtree, use the :HTML_CONTAINER_CLASS:
  property to assign a class to the tree. In order to specify CSS styles
  for a particular headline, you can use the id specified in a
  :CUSTOM_ID: property.

http://orgmode.org/manual/CSS-support.html#CSS-support

So you should do something like:

#+begin_example org
* Top heading
** Resource
   :PROPERTIES:
   :HTML_CONTAINER_CLASS: resource
   :END:
#+end_example

This exports as

#+begin_example html

Resource
...
#+end_example

So you can define styles thus:

#+begin_example css

div.resource h2 { font: comic_sans_forever; }

#+end_example

regards,
.j.

On Thu, Mar 31, 2011 at 06:46:45PM -0400, Uriel Avalos wrote:
> Suppose that you export the following document to HTML:
>
>   * Heading 1
>   ** Heading 2
>
> The HTML structure is pretty much the following:
>
>   div class=outline-2
> h2 Heading 1
> div class=outline-text-2
> div class=outline-3
>   h3 Heading 2
>
> Is there a way to apply a custom CSS class to the:
>
>  1. containing div (outline-2)?
>  2. heading itself (h2)?
>  3. text inside of the heading (outline-3)?
>
> Why? Suppose you have the following document
>
>  * Heading 1
>  ** Resources
>  ** Answers
>  * Heading 2
>  ** Quiz
>  ** Resources
>  ** Answers
>
> You need to apply a different style to the Resources and
> Quizzes. Unfortunately, these don't always appear in an
> outline and they don't always appear in the same order. It
> is infinitely easier to use a custom CSS class with each
> heading.



Re: [O] hide #+ lines?

2011-03-19 Thread Juan Pechiar
Hi,

If you are referring to directives such as export templates, etc.,
these can in general be placed anywhere in the document. For example,
inside a COMMENT'ed heading at the end of the document, with folded
view as default.

You can also have all that in another file and use #+setupfile or
#include for inclusion.

Other things such as #+category have their equivalent as properties,
which are normally folded.

Regards,
.j.

On Sat, Mar 19, 2011 at 05:27:23PM -0400, Filippo A. Salustri wrote:
> I've started using #+ blocks here and there, and (meaning no
> disrespect) I find them a bit ugly.  I would much rather there were
> some way to hide the #+ directives (without, of course, impeding their
> functionality).
> I believe I've done my due diligence, checking doc & google, but I
> can't find anything to help.
>
> Anyone got something to offer?



Re: [O] Delete in emacs on OS X

2011-03-10 Thread Juan Pechiar
Doing F1-k on backspace ("delete" key) gives:

  DEL (translated from ) runs the command
  delete-backward-char

And with delete (Fn-"delete") it says:

  DEL (translated from ) runs the command
  delete-backward-char

So both are mapped to DEL.

You can fix this with

  (global-set-key [kp-delete] 'delete-char)

Tested on

 GNU Emacs 24.0.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.32)
 of 2010-06-21 on black.porkrind.org

Personally, I'm used to C-d, M-d, etc. for forward deleting.

Saludos,
.j.

On Wed, Mar 09, 2011 at 08:33:49PM -0600, John Hendy wrote:
> I finally installed emacs/orgmode (using gnu emacs) on my OS X

> ... I can't figure out what key combo provides "delete." Fn+delete
> behaves like backspace. In my searching, I found reference to C-?,
> but that comes up as unrecognized.
>
> How do I delete?



Re: [O] Change default size of images?

2011-03-08 Thread Juan Pechiar
Add something like this together with your export headers:

#+BIND: org-export-latex-image-default-option 
"width=0.9\\textwidth,height=0.7\\textheight,keepaspectratio"

The general rule for +BIND is to provide LISP variables and values
(See 12.2 Export Options in Org manual).

You may need to customize org-export-allow-BIND so that org-mode does
not require confirmation each time you export.

Regards,
.j.

On Tue, Mar 08, 2011 at 12:28:31PM +0100, Rainer M Krug wrote:
> I want to change the default size of imanges when exporting to LaTeX -
> how can I do this?
>
> I know about,
>
> #+ATTR_LaTeX: width=5cm
>
> but as I have a lot of images, it would be much easier to change the
> setting for the whole document.
> In addition, my images are in a table and I would have no idea where
> to put the #+ATTR_LaTeX...



Re: [Orgmode] Help with translating the new variable `org-clock-clocktable-language-setup'

2011-02-15 Thread Juan Pechiar
Spanish:

("es" "Archivo" "N" "Fecha y hora" "Tarea" "Tiempo" "TODO" "Tiempo total" 
"Tiempo archivo")

I hope the "TODO" coincidence doesn't send org-mode into orbit.

On Sun, Feb 13, 2011 at 02:03:49PM +0100, Bastien wrote:
> I've pushed a fix which introduces a new custom variable
> `org-clock-clocktable-language-setup' - current value is:
>
> (("en" "File" "L" "Timestamp" "Headline" "Time" "ALL" "Total time" "File 
> time")
>  ("fr" "Fichier" "N" "Horodatage" "Tâche" "Durée" "TOUT" "Durée totale" 
> "Durée fichier"))

> Could people from various countries help with the translations of these
> strings?
>
> The format of each list in this alist is this:
>
> "en" : the two-characters language code
>   "File" : For the _file_ column
>  "L" : For the _level_ of the heading
>  "Timestamp" : For the timestamp
>   "Headline" : For the headline
>   "Time" : For the time spent on the task
>"ALL" : Well, for "all".
> "Total time" : For the total time of the clocktable
>  "File time" : For the time spent on a task in a file

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Merging .org files

2011-01-30 Thread Juan Pechiar
Hola Pere,

I'd suggest creating a master document with #includes of all your
Orgmode files, and then export this master document as org-mode.

http://orgmode.org/manual/Include-files.html#Include-files

There is a :minlevel attribute to automatically demote included
org-mode files.

Saludos,
.j.

On Sun, Jan 30, 2011 at 12:39:35PM +0100, Pere Quintana Seguí wrote:
> In my current system, I have about 200 .org files. With this number of
> files, building the agenda is very slow in my home computer and, also,
> makes the performance of MobileOrg quite poor.
>
> So, I would like to join files, to increase the system's performance.
>
> Is there any script to cleanly join files, by transforming the title of
> the file in a first level heading (*) and adding an star to all other
> headings of the file?
>
> I think this is the cleaner way to join files.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Block conventions

2011-01-04 Thread Juan Pechiar
The keyboard shortcuts produce lowercase text (e.g. typing  I was wondering whether it is common practice to indicate source code
> blocks with capital letters, as in
>
> #+BEGIN_SRC text
> Example source block
> #+END_SRC
>
> while indicating special blocks with lower-case, as in
>
> #+begin_latex
> This is \LaTeX.
> #+end_latex
>
> They both work (I think). But, I can't decide which one looks better
> to my eye. What are your thoughts?

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] How do I insert just a time stamp in a capture template?

2010-12-10 Thread Juan Pechiar
%(sexp) allows to include lisp expressions in a capture template.

%(format-time-string "%H:%M") should insert the current time.

Regards,
.j.

On Wed, Dec 08, 2010 at 10:08:32PM +, Charles Cave wrote:
> I use the following template
>
> ("l" "Log Time"
> entry (file+datetree "c:/charles/My Dropbox/GTD/timelog.org")
> "** %U - %^{Activity}  :TIME:")
> )
>
> A typical entry from this template looks like:
>
> * 2010
> ** 2010-12-December
> *** 2010-12-09 Thursday
>  [2010-12-09 Thu 08:10] - Arrived at the office   :TIME:
>
> I would like to just have the time in the headline not the complete date time
> stamp.
>
> I couldn't find a % extension in the documenation
> (9.1.3.2 Template expansion)

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: export comments in LaTeX ?

2010-11-22 Thread Juan Pechiar
Just note that tags work on _headings_, not on a line by line basis as
you suggest below:

Example:

8<
#+EXPORT_EXCLUDE_TAGS: privatnote

** This will get exported sometimes   :privatenote:
   Hi there!

8<

.j.

On Mon, Nov 22, 2010 at 10:53:20PM +0100, e20100633 wrote:
> Juan Pechiar  writes:
>
> > Maybe you can easily regexp-replace all 'COMMENT' keywords for a tag
> > (like :noexport:).
> >
> > Then there are header options for tags which should be included /
> > excluded on export.
> >
> >  #+EXPORT_SELECT_TAGS:   Tags that select a tree for export
> >  #+EXPORT_EXCLUDE_TAGS:  Tags that exclude a tree from export
>
> Ok, you mean for each commented line I have to put a tag which give me
> that result for example ? :
>
> --8<---cut here---start->8---
> # This is a comment line.   :mytag:
> # And this is an other comment line :mytag:
> --8<---cut here---end--->8---
>
> Then I'll just use the EXPORT_SELECT_TAGS ?
>
> Hum very interesting, I'll give it a try, thank you for your answer :)

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] export comments in LaTeX ?

2010-11-22 Thread Juan Pechiar
Hi,

Maybe you can easily regexp-replace all 'COMMENT' keywords for a tag
(like :noexport:).

Then there are header options for tags which should be included /
excluded on export.

 #+EXPORT_SELECT_TAGS:   Tags that select a tree for export
 #+EXPORT_EXCLUDE_TAGS:  Tags that exclude a tree from export

Regards,
.j.

On Mon, Nov 22, 2010 at 07:10:55PM +0100, e20100633 wrote:
> I have bunch of files in org-mode with comments, and I need to see the
> comments in my finals pdfs. For now, I just add them by hand in my .tex
> files and I surround them in boxes but it take me hours...
>
> So maybe there's a way to tell org-mode to treat comments as quotes or
> something ?

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Change DOCTYPE declaration?

2010-11-18 Thread Juan Pechiar
On Thu, Nov 18, 2010 at 10:35:50AM -0500, Uriel Avalos wrote:
> The only problem is that #+BIND is not working. I tried setting
> org-export-allow-BIND to t and it still does not work. Ideas?

Did you C-c C-c over (any of the) option headers?

This is required for org-mode to re-parse all options in the file.

http://orgmode.org/manual/The-very-busy-C_002dc-C_002dc-key.html#The-very-busy-C_002dc-C_002dc-key

.j.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Change DOCTYPE declaration?

2010-11-17 Thread Juan Pechiar
On Wed, Nov 17, 2010 at 05:25:05PM -0500, Nick Dokos wrote:
> #+BIND: uriel-change-doctype t
>
> but a good (if not scalable) solution to the problem.
>
> I have a question however: why is it that hooks can't be set using
> this mechanism?

>From my limited understanding, the #+BIND directive is for binding
variables.

For correctly adding a hook you must call add-hook, which adds a
function to the corresponding hook list.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Change DOCTYPE declaration?

2010-11-17 Thread Juan Pechiar
Yo can set variables on a per-file basis.

Check EXPORT OPTIONS on the manual. You can set variables there (but
not add hooks), so maybe something like this works:

#+begin_src emacs-lisp

;; in your .emacs file:

(add-hook 'org-export-html-final-hook
  (lambda ()
   (if ( (boundp 'uriel-change-doctype) )

   (let ((kill-whole-line t))
(goto-char (point-min))
(next-line)
(kill-line 2)
(insert "http://www.w3.org/TR/html4/strict.dtd\";>\n")
)
   )
  )

  )

#+end_src

So the hook body will only execute if uriel-change-doctype is bound to
some value.

Then, on your document, include

#+BIND uriel-change-doctype t

Not tested, good luck!

.j.


On Wed, Nov 17, 2010 at 03:23:08PM -0500, Uriel Avalos wrote:
> Thanks for the reply. After some monkeying around, I found I could do this:
>
> (add-hook 'org-export-html-final-hook
>   (lambda ()
>(let ((kill-whole-line t))
> (goto-char (point-min))
>   (next-line)
> (kill-line 2)
>   (insert " \"http://www.w3.org/TR/html4/strict.dtd\";>\n")
>   )
>  )
> )
>
> To undo it, I can call this:
>
> (setq org-export-html-final-hook nil)
>
> However, one question, the above sets the doctype GLOBALLY. Is there
> a way to do set this automagically per file? (I.e., some kind of
> file-specific export option)
>
> Juan Pechiar  wrote:
>
> > The DOCTYPE declaration is hardcoded inside org-html.el
> >
> > You may change it by defining a hook and modifying the generated HTML.
> > Have a look at the following message, where they get rid of the
> > declaration:
> >
> > http://lists.gnu.org/archive/html/emacs-orgmode/2010-06/msg00063.html
> >
> > you may add some 'insert' there with your own declaration.
> >
> > On Wed, Nov 17, 2010 at 01:04:09PM -0500, Uriel Avalos wrote:
> > > How do I change the doctype declaration?

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Change DOCTYPE declaration?

2010-11-17 Thread Juan Pechiar
Hi,

The DOCTYPE declaration is hardcoded inside org-html.el

You may change it by defining a hook and modifying the generated HTML.
Have a look at the following message, where they get rid of the
declaration:

http://lists.gnu.org/archive/html/emacs-orgmode/2010-06/msg00063.html

you may add some 'insert' there with your own declaration.

Regards,
.j.

On Wed, Nov 17, 2010 at 01:04:09PM -0500, Uriel Avalos wrote:
> How do I change the doctype declaration?
>
> Is there an export option or variable I can set? I tried searching
> for the variable. Perhaps I'm using a version of orgmode that's too
> old?
>
> The only thing I could find was org-export-html-xml-declaration but
> that's not the same thing.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Smart vsum

2010-11-15 Thread Juan Pechiar
Hi Cecil.

The attached email from orgmode mailing list includes code for a
conditional vsum, which is what you need here.

Regards,
.j.

On Mon, Nov 15, 2010 at 01:10:52PM +0100, Cecil Westerhof wrote:
> It is just a table with activities and the needed time pro activity.
> When there is an asterisk in the first column, that means that the
> activity is already done. I would like a little more fancy table that
> also displays the time needed for the activities that still have to be
> done. Like the following:
> |---+--+---|
> |   | activity | time  |
> |---+--+---|
> | * | A| 0@ 10'|
> | * | B| 0@ 05'|
> |   | C| 0@ 05'|
> |   | D| 0@ 05'|
> |   | E| 0@ 05'|
> |---+--+---|
> | # | Totaal   | 0.50  |
> | ^ |  | totalTime |
> | # | Totaal   | 0.25  |
> | ^ |  | restTime  |
> |---+--+---|
> #+TBLFM: $totalTime = deg(vsum(@-i...@-i)); f2
>
> Is this possible? If yes, how would I do this?
>
--- Begin Message ---

On 9/7/10 2:56 AM, Juan wrote:

A very complex way of not adding the extra column:

| name | a  | b | c |
|--++---+---|
| foo  | 1  | 2 | 3 |
| bar  | 3  | 2 | 1 |
| bar  | 4  | 5 | 6 |
|--++---+---|
|  | 7  |   |   |
#+TBLFM: @5$2='(apply '+ (mapcar* (lambda(x y) (if (string= x "bar") y 0)) 
'(@i$...@ii$1) '(@i$...@ii$2)));L

  * the two arguments at the end are the name and a columns: '(foo bar bar) and 
'(1 3 4)
  * the lambda function returns the second argument if first is "bar", 0 
otherwise.
  * mapcar* applies the lambda function to arguments from the 2 lists.
  * apply '+ adds the resulting list

Regards,
.j.


Neat! This is what I wanted to achieve. Good thing I gave up, though,
I see it would have kept me up all night.

(And yes, I meant "add a new /column/", not row.)

If one wants to do this often (e.g., in the other two columns), one
could tuck away some of the complexity into one's .emacs, and at the
same time get away from hard-coding the match string, like so:

#+begin_src elisp
  (defun vsumif (string x y)
  "Sum values of Y for all X matching STRING."
(apply '+
   (mapcar*
(lambda(x y)
  (if (string= x match) y 0))
x y)))
#+end_src

Now, one can e.g. put the string one is matching for in the table. Try
updating the spreadsheet below, then changing `foo' in the bottom row
(@5$1) to `bar' and updating again.

| name | a | b | c |
|--+---+---+---|
| foo  | 1 | 2 | 3 |
| bar  | 3 | 2 | 1 |
| bar  | 4 | 5 | 6 |
|--+---+---+---|
| bar  |   |   |   |
#+TBLFM: @5$2='(vsumif '@5$1 '(@i$...@ii$1) '(@i$...@ii$2));L

It's still a lengthy formula and not the easiest to write. If you'd
like to add up all foos or bars for columns a, b and c, you may be
better off swapping rows and columns so you can use column formulas:

|   | name | foo | bar | bar | bar |
|---+--+-+-+-+-|
| / | <>   |   < | |   > |  <> |
|   | a|   1 |   3 |   4 | |
|   | b|   2 |   2 |   5 | |
|   | c|   3 |   1 |   6 | |
#+TBLFM: $6='(vsumif '@1$6 '(@1$...@1$5) '($3..$5));L

Again, replace `foo' in @1$6 with `bar' to get totals for bar.

I have added vertical lines to the table.

One could presumable write =vsumif= in a more general form that would
not be hard-coded to test only for matching strings. The function
defined above might be better named =vsumifstring=.

Cheers,
CM


On Tue, Sep 07, 2010 at 12:44:03AM +0200, Christian Moe wrote:

On 9/6/10 3:38 PM, Inquisitive Scientist wrote:


   2. How do I compute the sum of a column only if a corresponding row
matches some condition? For example, how do I compute the sum of
numbers in column a for which the name in column "name" is "bar"? For
example, I should get 7 for the sum in column a in the table below:

| name | a | b | c |
|--+---+---+---|
| foo  | 1 | 2 | 3 |
| bar  | 3 | 2 | 1 |
| bar  | 4 | 5 | 6 |
|--+---+---+---|


Here's one way: Add a new row


sorry: meant "add a new column"


after the first, as below. Then run C-c
C-c on the formula line:

| name |   | a | b | c |
|--+---+---+---+---|
| foo  |   | 1 | 2 | 3 |
| bar  |   | 3 | 2 | 1 |
| bar  |   | 4 | 5 | 6 |
|--+---+---+---+---|
|  |   |   |   |   |
   #+TBLFM: $2='(if (string= $1 "bar") 1 0)::
@5$3=vsum(vmask(@i$...@ii$2,@i...@ii))

It does exactly what you asked, but I don't think it will scale well...



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



--- End Message ---
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] proposal for enhanced org-get-priority function

2010-11-15 Thread Juan Pechiar
I'm against feature-itis.

Orgmode has been losing some of its elegance to feature requests. And
by 'elegance' I mean ease of learning and using and maintaining, and
not having to decide between N different ways of achieving something
just because so many border-case features exist.

The agenda is for things you have to do today. Just do them.

If you need ordering, you have outlines and lists, properties, LISP,
hooks, column view, custom agenda views, etc.

Regards,
.j.

On Mon, Nov 15, 2010 at 11:25:30AM +0100, Carsten Dominik wrote:
> I would like to have a show of hands who is interested in this
> treatment of finer priorities.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] novice - inline src ?

2010-11-02 Thread Juan Pechiar
On Wed, Nov 03, 2010 at 03:34:58PM +1300, Adam wrote:
> Am a novice, and just trying my first src emacs lisp.
> Can a results output be included in the middle of a line of text ?

Hi,

Yo can include inline code blocks thus:

The date today is src_emacs-lisp{(format-time-string "%a %e %b %Y ")}.

The complete format is:

  src_lang[optional header arguments]{code body}

Check the following message on the mailing list:

Date: Tue, 03 Aug 2010 11:44:14 -0600   
   From: Eric Schulte 

Subject: Re: [Orgmode] Babel - display results 
in an overlay?

> Also,  is there a switch on setting to avoid the
> "Evaluate this Lisp code on your system?  (yes or no)"
> questions being asked at export - to always answer yes to this ?

Customize the following variable to nil:

org-confirm-babel-evaluate

Regards,
.j.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: conditional export based on target

2010-11-02 Thread Juan Pechiar
On Tue, Nov 02, 2010 at 04:41:05PM -0300, Ezequiel Birman wrote:
> #+source: tree1_latex
> #+BEGIN_SRC latex :exports (if (and (boundp 'latexp) latexp) "results" "none")
>   \begin{tikzpicture}
...
> \end{tikzpicture}
> #+end_src

> I still don't know how to export the TikZ code to latex but a png or svg
> (generated by TikZ) to html.

I don't know if I understand your problem here, but maybe it has
something to do with adding

   :results value latex

to the #+begin_src header

Check http://orgmode.org/manual/results.html#results

BR,
.j.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Sorting table columns (*not* content)

2010-11-01 Thread Juan Pechiar
If you don't mind losing h-lines, you can transpose the table, sort
rows, and transpose back.

This code (which I previously posted to the list) transposes a table:

#+begin_src: emacs-lisp

(defun org-transpose-table-at-point ()
  "Transpose orgmode table at point, eliminate hlines"
  (interactive)
  (let ((contents (apply #'mapcar* #'list
 (remove-if-not 'listp  ;; remove 'hline from list
(org-table-to-lisp  ;; signals 
error if not table
)
(delete-region (org-table-begin) (org-table-end))
(insert (mapconcat (lambda(x) (concat "| " (mapconcat 'identity x " | " ) " 
 |\n" ))
   contents
   ""))
(org-table-align)
)
)

#+end_src

Regards,
.j.

On Mon, Nov 01, 2010 at 02:42:55PM +0100, Gary wrote:
> Is there any way to sort the columns of a table, such that for example
>
> | Col 3 | Col 1 | Col 2 |
>
> can be converted to
>
> | Col 1 | Col 2 | Col 3 |
> |---+---+---|
> | ...   | ...   | ...   |
>
> ?

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] How to match items with tags and special todo keyword

2010-10-26 Thread Juan Pechiar
Hi Bar,

You should use C-c a m, and use a search string of the form

mytag+TODO="WAITING"

This matches for a specific TODO state (for example, WAITING).

Check the corresponding  manual section here:

http://orgmode.org/manual/Matching-tags-and-properties.html#Matching-tags-and-properties

BR
.j.

On Tue, Oct 26, 2010 at 04:23:50PM +0100, bar tomas wrote:
> I like to create an agenda view of all items that have a specific tag
> and also a specific TODO keyword.
> I've tried with
>
> C-c a M
>
> but this retrieves all TODO items that are not DONE but I would like
> to match only a specific TODO keyword (I've defined my own TODO
> categories with +SEQ_TODO)

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Table of Contents

2010-10-24 Thread Juan Pechiar
On Sun, Oct 24, 2010 at 10:58:00PM -0200, Flavio Souza wrote:
> I'd like to know if there is a way to change the "Table of Contents"
> title, when publishing a HTML file.
>
> The reason is that I'd like to translate "Table of Contents" to
> Portuguese automatically.

Hi Flavio,

Have a look at org-export-language-setup. You can customize this
variable via M-x customize-variable.

BR,
.j.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] conditional export based on target

2010-10-23 Thread Juan Pechiar
On Thu, Oct 07, 2010 at 01:24:28AM -0300, Ezequiel Birman wrote:
> Is there something like conditional export? I'd like to use tikz when
> exporting to latex but my own hand-made ascii drawing when exporting to
> ascii/latin1/utf8.

Hi,

I've been thinking on your request, and today this appeared on the
list which is quite similar:

http://lists.gnu.org/archive/html/emacs-orgmode/2010-10/msg01106.html

It seems as if block settings can be lisp function calls rather than a
fixed string.

So, for example:

//
** Test conditional export

#+source: test_output
#+begin_src octave :results value vector :exports (if (and (boundp 'htmlp) 
htmlp) "none" "results" )
rand(2)
#+end_src

#+results: test_output
| 0.3982018019389448 | 0.3879818701032038 |
| 0.8053847746148466 | 0.630867175288 |


Will export nothing to HTML, and the resulting output to other
formats.

Values for 'exports' can be 'both', 'none', 'code' or 'results'; and
there are export flags latexp, htmlp, asciip, docbookp.

I tested the above example, and it "mostly" works. Sometimes not, and
I don't yet know why.

BR
.j.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Wanted: org-publish-org-to-ascii

2010-10-13 Thread Juan Pechiar
On Wed, Oct 13, 2010 at 07:59:23PM +0200, Manuel Danzl wrote:
> I'm a happy org-mode user since a few month's and I'm using org-publish
> to write on some work related documentation. Now my collegues asked me
> to export the docs not only to html but also to plain text!
>
> Unfortunately, org-mode currently lacks a publishing function exporting
> to ascii, so I kindly ask you to implement it.

Copying from the definition for org-publish-org-to-html:

#+BEGIN_SRC: emacs-lisp

(defun org-publish-org-to-ascii (plist filename pub-dir)
  "Publish an org file to ASCII.
See `org-publish-org-to' to the list of arguments."
  (org-publish-with-aux-preprocess-maybe
(org-publish-org-to "ascii" plist filename pub-dir)))

#+END_SRC

you can even use "utf8" instead of "ascii".

Then use the newly defined org-publish-org-to-ascii as the
:publishing-function in your publish project.

Not tested, you try it :-)

Regards,
.j.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] bug? scheduled keyword inside org items.

2010-10-11 Thread Juan Pechiar
I'd imagine enclosing the email text in a #+BEGIN_EXAMPLE block would
make sense (semantically) and also avoid interpretation of SCHEDULED
keyword.

But even using #+BEGIN_COMMENT block, timestamps and SCHEDULED are
found by the agenda.

A workaround for your problem can be setting those timestamps as
inactive.

Regards,
.j.

On Mon, Oct 11, 2010 at 06:18:06PM +0200, Richard Riley wrote:
> I had stored a post here in my todo life as follows
>
> ,
> |
> | * my org item
> |
> | Subject: Re: Recurring scheduled items appearing in schedule
> | From: Bernt Hansen 
> | To: Dustin Hoffman 
> | Date: Sat, 09 Oct 2010 20:16:52 -0400
> |
> | Dustin Hoffman  writes:
> |
> | > I have scheduled reminders for things that occur weekly over a period
> | > of months.  The problem is, that each of these scheduled items appears
> | > under the current day in the agenda view and the multiplier (eg 6x,
> | > 5x) keeps going up.
> | >
> | > What I want is each of these scheduled items to appear only on the
> | > days that they occur in the agenda view.
> | >
> | > Here is an example of an org file with a schedule in it.
> | >
> | >  * Class Times
> | > ** Class
> | >SCHEDULED: <2010-09-28 Tue 12:30-13:48 +1w>
> | > ** Class
> | >SCHEDULED: <2010-09-23 Thu 12:30-13:48 +1w>
> | >
> | >
> `
>
> The SCHEDULED items inside the quoted text are appearing in my agenda.
>
> Bug, as expected or can I stop that?

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Feature request

2010-10-10 Thread Juan Pechiar
On Sun, Oct 10, 2010 at 09:50:47AM -0400, David Abrahams wrote:
> I have to reschedule quite a few items daily.  Often they're
> yesterday's items that I need to reschedule for today.
>   `C-c C-s . RET'
> is a bit much typing for that

I use S-right on the agenda buffer, which is quite easy.

Regards,
.j.

P.S. My reason to do this every day: day planning and regaining
consciouness about things to be done. Takes 1 minute at most.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Any equal setting of #+STARTUP: nologdone?

2010-10-08 Thread Juan Pechiar
On Fri, Oct 08, 2010 at 04:39:26PM +0800, Water Lin wrote:
> I am using following setting
> ---
> #+STARTUP: nologdone
> ---
> to avoid done log note while I mark one entry as DONE.
>
> But I want to set it as a global setting to avoid use it for every org
> file.

Hi Water,

The customizable variable 'org-log-done' is the global setting for all
files. Change it via M-x customize-variable, or by including "(setq
org-log-done nil)" in your .emacs.

Documentation for org-log-done:

Information to record when a task moves to the DONE state.

Possible values are:

nil Don't add anything, just change the keyword
timeAdd a time stamp to the task
notePrompt for a note and add it with template
`org-log-note-headings'

> Is there any equal setting of #+STARTUP: nologdone while I am setting my
> project using following code:
> 
> (setq org-publish-project-alist
> 
> ?

I'm lost here. I can't see the relation between TODO state logging and
project publishing.

Regards,
.j.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Agenda and weather forecast | language and units

2010-09-09 Thread Juan Pechiar
Hi,

The google API determines the unit system (C or F) based on the
language parameter (smart guys?!).

Ths parameter goes after the city in the call to org-google-weather:

E.g. %%(org-google-weather "Montevideo,Uruguay" "es")

This extension is magic!

Regards,
.j.

P.S. Cannot install into Notepad.exe   :-)

On Thu, Sep 09, 2010 at 11:37:39AM +0200, Sven Bretfeld wrote:
> I had °F at first instead of °C what I would prefer. I'm in Germany;
> adding ("DE" . "°C") in the customization of "Google Weather Unit System
> Temperature Assoc" didn't help. In the screenshot I noticed that you
> have a string "en-gb" which is not documented. Sounds like
> "English-GB", although you are in Paris. I also added this string, and I
> have °C now. Is that the correct way?

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-table: Table Navigation esp. for multi-line cells?

2010-08-27 Thread Juan Pechiar
Hi Livin,

As far as I know, orgmode does not support multi-line cells.

The example table you provided contains 7 rows (+ formatting at top)
plus 2 h-lines ("horizontal separator").

h-lines separate table sections (e.g. headings from contents).

In this context, the behaviour you are reporting with M-a and M-e is
correct.

Regards,
.j.

On Fri, Aug 27, 2010 at 03:59:16PM +0530, Livin Stephen Sharma wrote:
> The Manual describes these keys like this:
> > M-a Move to beginning of the current table field, or on to the previous 
> > field.
> > M-e Move to end of the current table field, or on to the next field.
>
> Are they supposed to work the same within mult-line cells?
>
> If cursor is before 'amet' in entry E-01,
>  is there a single command to move it:
>  a. to the end of "consectetur", or
>  b. to the beginning of "Lorem" in the same cell.
>
>|---+---+--+--|
>| / | <>| <>   | <>   |
>|   | <5>   | <20> | <20> |
>|   | s.no. | type;| text |
>|---+---+--+--|
>|   | E-01  | original | Lorem ipsum dolor|
>|   |   |  | sit amet,|
>|   |   |  | consectetur  |
>|---+---+--+--|
>|   | E-02  | caps | Lorem Ipsum Dolor|
>|   |   |  | Sit Amet,|
>|   |   |  | Consectetur  |
>|---+---+--+--|
>
> I find that the first 'M-a' will move the cursor to just before 'sit',
>  and a second 'M-a' will move it into the 'type;' column.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [BABEL] Output with octave [PATCH]

2010-08-01 Thread Juan Pechiar
Hi,

Below is a single PATCH for the 3 issues:
   - passing tables with EXP or complex notation to octave
   - correct formatting of matrixes into octave
   - interpretation of octave output as table

Regards,
.j.

8<

diff --git a/lisp/ob-octave.el b/lisp/ob-octave.el
index 8e99f86..bf7fdd3 100644
--- a/lisp/ob-octave.el
+++ b/lisp/ob-octave.el
@@ -119,8 +119,9 @@ end")
 Converts an emacs-lisp variable into a string of octave code
 specifying a variable of the same value."
   (if (listp var)
-  (concat "[" (mapconcat #'org-babel-octave-var-to-octave var ",
") "]")
-(format "%S" var)))
+  (concat "[" (mapconcat #'org-babel-octave-var-to-octave var
+(if (listp (car var)) "; " ",")) "]")
+(format "%s" var)))

 (defun org-babel-prep-session:octave (session params &optional
 matlabp)
   "Prepare SESSION according to the header arguments specified in
   PARAMS."
@@ -181,7 +182,7 @@ value of the last statement in BODY, as elisp."
   (org-babel-eval
cmd
(format org-babel-octave-wrapper-method body tmp-file
tmp-file))
-  (org-babel-eval-read-file tmp-file))
+  (org-babel-octave-import-elisp-from-file tmp-file))

 (defun org-babel-octave-evaluate-session
   (session body result-type &optional matlabp)

8<

On Sun, Aug 01, 2010 at 05:07:27PM -0300, Juan wrote:
> I'm starting to work with ob-octave and found several problems:
>
> The first, for which I have a fix (see patch below) is that octave's
> output was passed on as a string instead of being interpreted as a table:


> The second problem is that if I use octave table output as input to
> another block, it gets interpreted as a string instead of a vector:


> This has to do with the EXP notation. The 'e+00' suffix makes the
> whole table into a string. The problem is with "%S" in the formatting
> inside org-babel-octave-var-to-octave.


> A third problem is with org-babel-octave-var-to-octave.
>
> For example:
>
> : (org-babel-octave-var-to-octave '( ( 1 2 3 ) ( 4 5 6 ) ))
> : ->  "[[1, 2, 3], [4, 5, 6]]"
>
> This is not a 2x3 matrix, but a 1x6 vector:
>
> : octave-3.2.3:1> [[1,2,3],[4,5,6]]
> : ans =
> :1   2   3   4   5   6
>
> a semicolon ';' or '\n' is needed between rows instead of a comma.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [PATCH] org-capture with LISP function template

2010-07-18 Thread Juan Pechiar
Hi Carsten + crowd,

Below is a patch for org-capture when the template is given by a LISP
function.

Problem was that the function is inside a string (not a LISP form), so
the string has to be evaluated explicitly.

Now it's working for me. I use it to get a template formed by
URL/title and selected text from Opera browser (on Mac OSX). I´ll
publish this after polishing the code.

I've also been testing exotic org-capture templates and I've found no
other errors yet.

Best regards,
.j.

8<

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 2a3a1b8..409427f 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -440,8 +440,8 @@ bypassed."
  (setq txt (org-file-contents file))
(setq txt (format "* Template file %s not found" (nth 1
txt)
  ((and (listp txt) (eq (car txt) 'function))
-  (if (fboundp (nth 1 txt))
- (setq txt (funcall (nth 1 txt)))
+  (if (eval (concat "fboundp " (nth 1 txt)))
+ (setq txt (eval (read (nth 1 txt
(setq txt (format "* Template function %s not found" (nth 1
txt)
  ((not txt) (setq txt ""))
  ((stringp txt))

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Worldcup + time zone question

2010-06-07 Thread Juan Pechiar
Here is a quick and dirty function to update all timestamps in a
buffer by N hours:

8<

(defun uphours ( n )
  "update all timestamps n hours"
  (interactive "nAdd hours: ")
  (save-excursion
(goto-char (point-min))
 (while (re-search-forward "[[<]" nil t)
   (when (org-at-timestamp-p t)
 (org-timestamp-change n 'hour)
 

8<

S.Africa is UTC+2. To change to UTC-3 call with -5 as argument.

Use and modify as needed.

Regards,
.j.

On Mon, Jun 07, 2010 at 10:48:14PM +0300, Dirk-Jan C. Binnema wrote:
> I made a little org-mode schedule for the Football World Cup in South-Africa
> (attached); it may be useful for some.
>
> Anyway, my question: the times are the local times in South Africa -- is there
> some way to have the times shown in my org-agenda automatically corrected for
> my local time zone?

> #+STARTUP:content
> #+category:FIFA2010
>
> Note: all time are local (UTC+2 times)
>
> * Group A:A:
> ** Uruguay- France   <2010-06-11 Fri 20:30>

(will we beat France on Friday?)

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] latex-export + columnview: misinterpretation of section prefixes as emphasis

2010-05-30 Thread Juan Pechiar
Hi!

The test file below contains a columnview table showing section
headers.

Export to HTML works OK: the asterisks inside the table are
transformed into indentation.

Export to LaTeX: asterisk pairs are interpreted as emphasis, resulting
in an incorrect renering of asterisks and bold asterisks.

Following the code, I got lost at org-export-latex-fontify.

I will keep searching for what is happening, but any guidance will be
appreciated.

Thanks!

.j.


Test file:

#+COLUMNS: %25ITEM

* There comes the table

#+BEGIN: columnview :vlines 1 :id global
|   | ITEM|
|---+-|
|   | * There comes the table |
|   | * first |
|   | ** second   |
|   | *** third   |
|   | *** other third |
|   |  fourth |
|   | ** other second |
| / | <>  |
#+END:

* first
** second
*** third
*** other third
 fourth
** other second


LaTeX output:

\begin{tabular}{l}
 ITEM \\
\hline
 * There comes the table  \\
 * first  \\
 ** second\\
 *** third\\
 \textbf{*} other third   \\
 \textbf{**} fourth   \\
 ** other second  \\
\end{tabular}


And the PDF display reads:

ITEM
* There comes the table
first
* second
** third
* other third
** fourth
* other second




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] use of org-export-latex-verbatim-wrap

2010-05-26 Thread Juan Pechiar
Trying to adjust the style for fixed-width sections in LaTeX export
(drawers in particular), I found org-latex.el defines a customizable
wrapper for verbatim sections:

   (defcustom org-export-latex-verbatim-wrap
 '("\\begin{verbatim}\n" . "\\end{verbatim}\n")
 "Environment to be wrapped around a fixed-width section in LaTeX
 export.
   This is a cons with two strings, to be added before and after the
   fixed-with text.

But this variable is _only_ used in org-exp.el in function
org-export-format-source-code-or-example

All other fixed-width latex generation uses explicit "\verbatim" text
instead of the wrapper variables.

Is this the only intended use for org-export-latex-verbatim-wrap?

If not, then I can look into this and provide a patch for using the
wrapper variable in all appropriate places.

Saludos,
.j.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode