Re: [O] Attachments and refiling

2011-08-01 Thread Matt Lundin
Gustav Wikström  writes:

> However I think it also is nice to also be able to use custom names to
> attachment folders. And it would be nice be able to use some logic with
> this, like automatically setting the folder name to the same as the
> heading it's attached to. And to allow properties on a file/heading/
> sub-tree basis which defines the base-path to where attachments to that
> particular file/heading/sub-tree should reside on the system, relative
> or non-relative. This would allow for more atomic solutions if i'm
> writing a document on the side of my main setup and want to add some
> attachments in the same path.
>
> But still, it is a really nice feature to have control over the
> attachments. So from my point of view it seems sound to try to reason
> about different solutions to this or at least keep it in mind for
> future functionality.

One possibility is to advise the function org-attach-dir to call
org-attach-set-directory (and, optionally, org-attach-set-inherit) if
the entry does not already have an ATTACH_DIR property:

--8<---cut here---start->8---
(defadvice org-attach-dir (before my-org-attach-set-dir-before-attach activate)
  "Prompt for attachment directory (thus preempting org-get-id)."
  (unless (org-entry-get nil "ATTACH_DIR" 'inherit)
(org-attach-set-directory)))
--8<---cut here---end--->8---

This allows one to enter the name of the directory *before* org attaches
the file. This is the way I use org-attach, as I prefer human-readable
directories to UUIDs.

Best,
Matt



Re: [O] Fix commit 9ff7f80f51a15c4a3dd2b654f0b08e9e290f5375

2011-08-01 Thread Leo
On 2011-08-02 01:59 +0800, Achim Gratz wrote:
>> Please apply this patch to fix the bug:
>
> This gets rid of the error message, but does not fix the bug, IMHO.

Which bug? There is no reference to any bug report in the commit so I am
clueless.

Leo




Re: [O] Largest org file you have + performance

2011-08-01 Thread Bernt Hansen
Marcelo de Moraes Serpa  writes:

> What's the largest orgmode file you have, and what's the performance
> you get while manipulating/navigating it? Mine is a 5k lines file
> called reference.org, and I basically keep all kind of notes and
> attachments there. It's a bit slow to navigate on my Emacs 240.50.1,
> orgmode 7.4, although still usable. I'm just afraid that it will keep
> getting slower with time at the point of being unusable inside
> emacs+orgmode. I'm curious if there are users with larger orgmode
> files and what their experience is, and open to suggestions on how to
> improve performance.

My largest .org file is 6120 lines, 306741 bytes but I have 51 files
contributing to my agenda for a total of 29488 lines, 1,263,120 bytes
total.

My archive files are much bigger but not normally accessed.  This is on
a 32 bit linux system and the only slow thing I have is 5 seconds to
generate my block agenda which includes all of my org files.

Archiving things you don't need is the best way to keep things fast I
think.  You can still search the archive from the agenda if necessary.

Regards,
Bernt



Re: [O] Undefined variable: org-babel-execute-src-block-maybe

2011-08-01 Thread Eric Schulte
I've just reverted the commits introducing this error.

I will revisit this issue when I am back from vacation (in two weeks)
and will implement a full proper solution then.

Sorry for the breakage.

Best -- Eric

John Hendy  writes:

> On Mon, Aug 1, 2011 at 9:43 AM, Matt Lundin  wrote:
>> With the latest git, I get the following message when I try to follow a
>> link in org-mode:
>>
>> org-babel-execute-src-block-maybe: Symbol's value as variable is void: 
>> org-babel-inline-src-block-regexp
>>
>> The problem goes away if I reload org files with M-x org-reload.
>>
>> Note: I normally run org-mode from byte-compiled files. I.e., I type
>> "make clean && make" when updating a file.
>
> For reference to others responding, this has come up twice already in
> the recent days:
> - Same C-c C-o problem, reported by Hsiu-Khuern Tang
> --- http://www.mail-archive.com/emacs-orgmode@gnu.org/msg44896.html
>
> - Unable to export footnotes in LaTeX, reported by me
> --- http://www.mail-archive.com/emacs-orgmode@gnu.org/msg44895.html
>
> Both were traced to the same commit, same error message, and same workarounds:
> - M-x org-reload with an up to date git pull
> - Don't actually make the up to date git pull (or make clean after make)
> - Revert back to release_7.7
>
> Best regards,
> John
>
>>
>> Best,
>> Matt
>>
>>
>

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



[O] Fwd: Largest org file you have + performance

2011-08-01 Thread Marcelo de Moraes Serpa
-- Forwarded message --
From: Marcelo de Moraes Serpa 
Date: Mon, Aug 1, 2011 at 3:33 PM
Subject: Re: [O] Largest org file you have + performance
To: suvayu ali 


I think emacs on OSX underperforms significantly, at least comparing to its
Linux counterpart. I might be wrong...

The reference file is slow by itself, agenda commands are slow, but
acceptable.


On Mon, Aug 1, 2011 at 3:27 PM, suvayu ali wrote:

> On Mon, Aug 1, 2011 at 7:06 PM, Marcelo de Moraes Serpa
>  wrote:
> > What platform? OSX?
>
> Linux x86_64
>
> I also have other files which are larger (~3k lines) but they are not
> in the agenda files. These other files have lots of source code blocks
> and are meant for exporting to pdf via latex.
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
>


Re: [O] Largest org file you have + performance

2011-08-01 Thread suvayu ali
On Mon, Aug 1, 2011 at 7:06 PM, Marcelo de Moraes Serpa
 wrote:
> What platform? OSX?

Linux x86_64

I also have other files which are larger (~3k lines) but they are not
in the agenda files. These other files have lots of source code blocks
and are meant for exporting to pdf via latex.

-- 
Suvayu

Open source is the future. It sets us free.



[O] how to narrow Clock Total on repeating tasks?

2011-08-01 Thread Michael Gilbert
Hi —

I use the effort and clocking features of OM to a large degree and am trying to 
deepen that further. I have run into one problem that I don't know how to 
apprach. Quite possibly there is an obvious answer in the manual that I've 
missed and if so, please forgive me. (I have noticed that most of my questions 
don't, in fact, have such answers though.) I am trying to figure out how to 
limit the calculation of the clocking total to the latest iteration of a 
repeating task.

The most obvious place where this plays out is in column view. I am working my 
way through my agenda in column view, estimating efforts or reviewing my effort 
estimates against real-time clocking. The clock total in this view shows the 
full total over all iterations of repeating tasks — not helpful for this use 
case.

Am I being clear? (I hate to over-explain something to a group of this 
calibre.) Any advice on how to change that?

— Michael

Nonprofit News
http://nonprofitnews.org




Re: [O] Largest org file you have + performance

2011-08-01 Thread Eric Abrahamsen
On Mon, Aug 01 2011, Marcelo de Moraes Serpa wrote:

> Hey list,
>
> What's the largest orgmode file you have, and what's the performance
> you get while manipulating/navigating it? Mine is a 5k lines file
> called reference.org, and I basically keep all kind of notes and
> attachments there. It's a bit slow to navigate on my Emacs 240.50.1,
> orgmode 7.4, although still usable. I'm just afraid that it will keep
> getting slower with time at the point of being unusable inside
> emacs+orgmode. I'm curious if there are users with larger orgmode
> files and what their experience is, and open to suggestions on how to
> improve performance.

My largest file is 32k lines. It's a novel translation (so essentially
two very long novels in one file), and there's no perceptible lag in
navigation/folding. BUT! It's almost all plain text, very little
fontification besides the headlines, and I understand that fontification
is one of the major causes of lag. So, dunno if that's helpful, but it's
another data point.

Eric

(Using the Ubuntu version of Emacs, 23.3 I believe, and yesterday's org-mode)




Re: [O] Largest org file you have + performance

2011-08-01 Thread Florian Beck
Marcelo de Moraes Serpa  writes:

> Hey list,
>
>
> What's the largest orgmode file you have, and what's the performance you get 
> while manipulating/navigating it? Mine is a 5k lines
> file called reference.org, and I basically keep all kind of notes and 
> attachments there. It's a bit slow to navigate on my Emacs
> 240.50.1, orgmode 7.4, although still usable. I'm just afraid that it will 
> keep getting slower with time at the point of being
> unusable inside emacs+orgmode. I'm curious if there are users with larger 
> orgmode files and what their experience is, and open to
> suggestions on how to improve performance.

emacs-bzr, org-7.7

The largest file I have is 7.2M. Some 6300 entries, 137k lines. Agenda
commands are slow, of course, but otherwise the performance is
acceptable. Anything that involves completion is quite slow. Opening ID
links is also slower than I would like. Anything that works on the whole
buffer can take a long time (cycling from OVERVIEW to CONTENTS takes more
than a minute), so try to avoid that. (I keep old notes in that file, so
mostly I search or link to entries.)

If you are using the current bzr version of emacs, make sure to set
`bidi-display-reordering' to nil.

>
>
>
> Cheers,
>
>
>
> Marcelo.

-- 
Florian Beck



Re: [O] Fix commit 9ff7f80f51a15c4a3dd2b654f0b08e9e290f5375

2011-08-01 Thread Achim Gratz
Leo  writes:
> I am running org mode from trunk. I am getting this error:

Nitpick: there is no trunk.

> Please apply this patch to fix the bug:

This gets rid of the error message, but does not fix the bug, IMHO.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html




[O] Fix commit 9ff7f80f51a15c4a3dd2b654f0b08e9e290f5375

2011-08-01 Thread Leo
I am running org mode from trunk. I am getting this error:

,
| org-babel-pop-to-session-maybe: Symbol's value as variable is void:
| org-babel-inline-src-block-regexp
`

for M-up/down.

The error was introduced in
http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=9ff7f80f51a15c4a3dd2b654f0b08e9e290f5375

Please apply this patch to fix the bug:

--- a/ob.el
+++ b/ob.el
@@ -141,7 +141,7 @@
"\\([^\000]*?\n\\)?[ \t]*#\\+end_src")
   "Regexp used to identify code blocks.")
 
-(eval-when-compile
+(eval-and-compile
   (defvar org-babel-inline-src-block-regexp
 (concat
  ;; (1) replacement target (2) lang

Diff finished.  Tue Aug  2 01:18:06 2011


Leo




Re: [O] Largest org file you have + performance

2011-08-01 Thread Marcelo de Moraes Serpa
What platform? OSX?

On Mon, Aug 1, 2011 at 11:54 AM, suvayu ali wrote:

> Hi Marcelo,
>
> On Mon, Aug 1, 2011 at 6:35 PM, Marcelo de Moraes Serpa
>  wrote:
> > What's the largest orgmode file you have, and what's the performance you
> get
> > while manipulating/navigating it? Mine is a 5k lines file called
> > reference.org, and I basically keep all kind of notes and attachments
> there.
>
> My largest agenda file used to be ~2k lines. Now I have archived many
> things, so my 2nd largest agenda file is ~1.5k lines. I don't see any
> performance problems. All agenda commands are almost instantaneous.
>
> Hope this helps.
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
>


Re: [O] Largest org file you have + performance

2011-08-01 Thread suvayu ali
Hi Marcelo,

On Mon, Aug 1, 2011 at 6:35 PM, Marcelo de Moraes Serpa
 wrote:
> What's the largest orgmode file you have, and what's the performance you get
> while manipulating/navigating it? Mine is a 5k lines file called
> reference.org, and I basically keep all kind of notes and attachments there.

My largest agenda file used to be ~2k lines. Now I have archived many
things, so my 2nd largest agenda file is ~1.5k lines. I don't see any
performance problems. All agenda commands are almost instantaneous.

Hope this helps.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Inline tasks in agenda search

2011-08-01 Thread suvayu ali
On Mon, Aug 1, 2011 at 5:57 PM, suvayu ali  wrote:
> Hi Orgers,
>
> Is there any way to ignore the "END" entries in inline tasks in agenda
> search results?

Strangely now this works! Don't know what I changed.

-- 
Suvayu

Open source is the future. It sets us free.



[O] Largest org file you have + performance

2011-08-01 Thread Marcelo de Moraes Serpa
Hey list,

What's the largest orgmode file you have, and what's the performance you get
while manipulating/navigating it? Mine is a 5k lines file called
reference.org, and I basically keep all kind of notes and attachments there.
It's a bit slow to navigate on my Emacs 240.50.1, orgmode 7.4, although
still usable. I'm just afraid that it will keep getting slower with time at
the point of being unusable inside emacs+orgmode. I'm curious if there are
users with larger orgmode files and what their experience is, and open to
suggestions on how to improve performance.

Cheers,

Marcelo.


[O] Inline tasks in agenda search

2011-08-01 Thread suvayu ali
Hi Orgers,

Is there any way to ignore the "END" entries in inline tasks in agenda
search results?

To give you an example the following entry:

*** Detector effects:Qn:
1. How is the Gaussian used for smearing of proper
   time resolution derived?
2. Why is the proper time error PDF needed? Why is
   smearing of time resolution not enough?
*** END

shows up in an agenda tag search for "Qn" (C-c a m Qn RET) as below.

analysis: Detector effects  :Qn:
analysis: END   :Qn:

My question is how do I ignore the entry END in the search results?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Undefined variable: org-babel-execute-src-block-maybe

2011-08-01 Thread Matt Lundin
John Hendy  writes:

> On Mon, Aug 1, 2011 at 9:43 AM, Matt Lundin  wrote:
>> With the latest git, I get the following message when I try to follow a
>> link in org-mode:
>>
>> org-babel-execute-src-block-maybe: Symbol's value as variable is void: 
>> org-babel-inline-src-block-regexp
>>
>> The problem goes away if I reload org files with M-x org-reload.
>>
>> Note: I normally run org-mode from byte-compiled files. I.e., I type
>> "make clean && make" when updating a file.
>
> For reference to others responding, this has come up twice already in
> the recent days:
> - Same C-c C-o problem, reported by Hsiu-Khuern Tang
> --- http://www.mail-archive.com/emacs-orgmode@gnu.org/msg44896.html
>
> - Unable to export footnotes in LaTeX, reported by me
> --- http://www.mail-archive.com/emacs-orgmode@gnu.org/msg44895.html
>
> Both were traced to the same commit, same error message, and same workarounds:
> - M-x org-reload with an up to date git pull
> - Don't actually make the up to date git pull (or make clean after make)
> - Revert back to release_7.7
>

O.K. Thanks. I'll await Eric's decision.

Best,
Matt



Re: [O] Undefined variable: org-babel-execute-src-block-maybe

2011-08-01 Thread Torsten Wagner

I can confirm that


- M-x org-reload with an up to date git pull


works as workaround.

Error appears also for setting a tag and executing code blocks...

Torsten




Re: [O] Undefined variable: org-babel-execute-src-block-maybe

2011-08-01 Thread John Hendy
On Mon, Aug 1, 2011 at 9:43 AM, Matt Lundin  wrote:
> With the latest git, I get the following message when I try to follow a
> link in org-mode:
>
> org-babel-execute-src-block-maybe: Symbol's value as variable is void: 
> org-babel-inline-src-block-regexp
>
> The problem goes away if I reload org files with M-x org-reload.
>
> Note: I normally run org-mode from byte-compiled files. I.e., I type
> "make clean && make" when updating a file.

For reference to others responding, this has come up twice already in
the recent days:
- Same C-c C-o problem, reported by Hsiu-Khuern Tang
--- http://www.mail-archive.com/emacs-orgmode@gnu.org/msg44896.html

- Unable to export footnotes in LaTeX, reported by me
--- http://www.mail-archive.com/emacs-orgmode@gnu.org/msg44895.html

Both were traced to the same commit, same error message, and same workarounds:
- M-x org-reload with an up to date git pull
- Don't actually make the up to date git pull (or make clean after make)
- Revert back to release_7.7

Best regards,
John

>
> Best,
> Matt
>
>



[O] Undefined variable: org-babel-execute-src-block-maybe

2011-08-01 Thread Matt Lundin
With the latest git, I get the following message when I try to follow a
link in org-mode:

org-babel-execute-src-block-maybe: Symbol's value as variable is void: 
org-babel-inline-src-block-regexp

The problem goes away if I reload org files with M-x org-reload.

Note: I normally run org-mode from byte-compiled files. I.e., I type
"make clean && make" when updating a file.

Best,
Matt



Re: [O] [PATCH] Footnote export to LaTeX "wrong number of arguments" error

2011-08-01 Thread John Hendy
On Sun, Jul 31, 2011 at 4:07 AM, Achim Gratz  wrote:
> John Hendy  writes:
>> Would this have an effect if I don't ever run 'make install'?
>
> Since it is added to the load-path during compile it might have
> undesirable side-effects if an older org-mode resides at that path.
>
> But, I'm now getting these errors too since I have started Emacs
> freshly.  The offending commit is 9ff7f80f51a by Eric Schulte, where he
> wraps the defvar definition into eval-when-compile.  This change defines
> the variable during compile and gets rid of that error, but then it is
> not defined when loading org-mode the first time.  If you do an
> org-reload this is rectified (which is why I didn't see the error
> yesterday.
>
> The original error during compile-time comes from using the variable in
> a macro expansion.  I don't think this is the right thing to do since we
> would not want to expand the variable at compile time (it would not be
> variable anymore after compilation).  The attached patch seems to
> correct this for me.
>
>
>
> Let us know if that fixes things for you and I'll let Eric decide if he
> pushes that patch or something different, depending on what he really
> wanted to do.
>

Thanks for the checking on this. Yes, M-x org-reload fixes this for
me. No exporting the first time, reload, then successful export the
second time with  no error about the babel variable.

Thanks for all your work,
John

>
> Regards,
> Achim.
> --
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
>
> Samples for the Waldorf Blofeld:
> http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra
>
>



Re: [O] Something like refile + make destination/subtree?

2011-08-01 Thread suvayu ali
On Mon, Aug 1, 2011 at 2:12 PM, John Hendy  wrote:
> It seems like a variable might allow for this fairly easily.
> 'org-refile-create-on-the-fly' or something...
>

Try:

(setq org-refile-allow-creating-parent-nodes 'confirm)

-- 
Suvayu

Open source is the future. It sets us free.



[O] Something like refile + make destination/subtree?

2011-08-01 Thread John Hendy
Would it be possible to specify a custom tree when refiling? I know if
a tree exists one can type a bit of it and use tab completion on the
existing file trees, but would it be possible to create a tree on the
fly? If a Level 1 headline existed, for example, but not the desired
Level 2, one could type in "File.org/Level1/Level2" and it would be
created for you and the refile snippet would be refiled under it?

Would this be useful for anyone else, or does something like it already exist?

It seems like a variable might allow for this fairly easily.
'org-refile-create-on-the-fly' or something...

Thanks for any input,
John



[O] Problems with latex exporting in verbatim environment

2011-08-01 Thread Stephen Eglen
Consider the following short example (code taken from Eric S's foo.org
file, which I'm working on):

--
* Example 1

Using colon, the text is not reported verbatim.

: were $\beta_2$ = src_R{round(out3$coef[3], 4)}
: and $\beta_3$ = src_R{round(out3$coef[4], 4)}



* Example 2

Using example environment it seems to be exported fine in .tex

#+begin_example
were $\beta_2$ = src_R{round(out3$coef[3], 4)}
and $\beta_3$ = src_R{round(out3$coef[4], 4)}
#+end_example
 
--
Example 1 is not exported okay, there are stray = and \texttt added;
whereas version two seems fine.  See snippet from tex file below.

This looks like a bug to me.  Are the two forms of verbatim really
equivalent?


Stephen


--
relevant snippet from tex file, exported from above.

\section{Example 1}
\label{sec-1}


Using colon

\begin{verbatim}
 were $\beta_2$ = =src_R{round(out3$coef[3], 4)}=
 and $\beta_3$ = \texttt{src\_R\{round(out3\$coef[4], 4)\}}
\end{verbatim}
\section{Example 2}
\label{sec-2}


Using example environment


\begin{verbatim}
were $\beta_2$ = src_R{round(out3$coef[3], 4)}
and $\beta_3$ = src_R{round(out3$coef[4], 4)}
\end{verbatim}


Stephen



[O] [PATCH] Agenda: Simplify old fix of face for deadline warning 0 day

2011-08-01 Thread Michael Brand
Agenda: Simplify old fix of face for deadline warning 0 day

* lisp/org-agenda.el (org-agenda-get-deadlines): Fix dfrac for the
case of wdays being 0.  Don't pass wdays to org-agenda-deadline-face,
like before the old fix.
(org-agenda-deadline-face): Revert to old state that was without
wdays.

This allows a deadline warning period of "-0d" to work also with a
custom configuration like:
(setq org-agenda-deadline-faces
  '((1.0001 . org-warning)  ; due yesterday or before
(0.0. org-upcoming-deadline)))  ; due today or later
For org-agenda-deadline-faces left at default and all other settings
not exceeding 1.0, the face for a deadline warning of any length
remains untouched by this patch.

references to history:
* commit of the old fix
  - http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=d0d6325
  - git show d0d6325
* mailing list old thread
  - http://thread.gmane.org/gmane.emacs.orgmode/5753
  - http://lists.gnu.org/archive/html/emacs-orgmode/2008-02/msg00395.html


0001-Agenda-Simplify-old-fix-of-face-for-deadline-warning.patch
Description: Binary data


Re: [O] making coloured tables

2011-08-01 Thread Rainer M Krug
On Mon, Aug 1, 2011 at 8:35 AM, Sebastien Vauban  wrote:

> Hi Andras,
>
> Andras Major wrote:
> >> Andras Major wrote:
> >>> I'm really intrigued by org-mode's table and spreadsheet functionality
> and
> >>> would like to use it for those cases where I found excel and gnumeric
> >>> impractically cumbersome.
> >>>
> >>> What I want are two slightly diffent things:
> >>>
> >>> - Make tables that have cells with individual background colours when
> >>>   exported as HTML or PDF.
> >>>
> >>> - Make tables that have cells with background colours and typeface
> details
> >>>   (bold, italic, etc.) based on contents of either the cells themselves
> or
> >>>   other cells in the table. (Example: mark all negative numerical
> values
> >>>   of a table with a red background.)
> >>>
> >>> Furthermore, the colouring should be portable, i.e. independent of the
> >>> settings in .emacs.
> >>
> >> I add wishes on the above list. Maybe someone will be able to implement
> >> them, if they seem to make sense... So, here's my idea: having some
> >> automagic style (background) applied on the cells to distinguish:
> >>
> >> - the input cells (the ones you cannot delete... without troubles): they
> >>   don't have any formula associated with them
> >>
> >> - the final result cells: the ones with computed results
> >>
> >> - the other ones, whose content is computed, but serves as input to
> other
> >>   cells.
> >>
> >> Would these be in different colors, I think it would make the reading of
> >> tables much more efficient. And, as far as I know, this does not exist
> yet
> >> in tools like Excel -- though people can manually apply such color
> >> conventions.
> >
> > I was thinking along slightly different lines. We have a customizable
> 
> > tag in HTML export already, but that customization isn't very flexible.
> If
> > we could have something like a  tag that can be set from values in
> the
> > table, or by Lisp code, then I think that would solve my problems.
>
> My above feature of the wishlist isn't for export -- I misread your
> original
> post. Just speaking of editing feature in the Org buffer, for giving more
> insight on formulas in tables.
>

I think that would be very useful feature to be included - I trashed a few
times already (fairly simple) tables because of modifying formula cells

Cheers,

Rainer




> These "color features" weren't intended IMHO for export. So the 2
> "problems"
> are in fact apart from each other.
>
> > It's important, however, that setting the export tag must be local to the
> > Org file so I can set it there instead of the global .emacs.
>
> Best regards,
>  Seb
>
> --
> Sebastien Vauban
>
>
>


-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax (F):   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug


Re: [O] making coloured tables

2011-08-01 Thread Andras Major
I have an idea how my feature could be implemented, and it consists of
two parts.

- introduce a special row, or extend the "/" type used for colgroup
and narrowing, to specify hidden (non-export) columns and special tag
columns;

- in that special row, there are two new special entries, say "T<" and
"T>" which specify that the contents of each cell in that column
should be exported into the  tag of the cell to the left or to the
right.

This way, the  tag can be set from within the table for each
relevant cell. The only drawback is that all this is backend-specific,
it only works for HTML, not for PDF in the way I've just described.

  András


On 8/1/11, Sebastien Vauban  wrote:
> Hi Andras,
>
> Andras Major wrote:
>>> Andras Major wrote:
 I'm really intrigued by org-mode's table and spreadsheet functionality
 and
 would like to use it for those cases where I found excel and gnumeric
 impractically cumbersome.

 What I want are two slightly diffent things:

 - Make tables that have cells with individual background colours when
   exported as HTML or PDF.

 - Make tables that have cells with background colours and typeface
 details
   (bold, italic, etc.) based on contents of either the cells themselves
 or
   other cells in the table. (Example: mark all negative numerical values
   of a table with a red background.)

 Furthermore, the colouring should be portable, i.e. independent of the
 settings in .emacs.
>>>
>>> I add wishes on the above list. Maybe someone will be able to implement
>>> them, if they seem to make sense... So, here's my idea: having some
>>> automagic style (background) applied on the cells to distinguish:
>>>
>>> - the input cells (the ones you cannot delete... without troubles): they
>>>   don't have any formula associated with them
>>>
>>> - the final result cells: the ones with computed results
>>>
>>> - the other ones, whose content is computed, but serves as input to other
>>>   cells.
>>>
>>> Would these be in different colors, I think it would make the reading of
>>> tables much more efficient. And, as far as I know, this does not exist
>>> yet
>>> in tools like Excel -- though people can manually apply such color
>>> conventions.
>>
>> I was thinking along slightly different lines. We have a customizable 
>> tag in HTML export already, but that customization isn't very flexible. If
>> we could have something like a  tag that can be set from values in the
>> table, or by Lisp code, then I think that would solve my problems.
>
> My above feature of the wishlist isn't for export -- I misread your original
> post. Just speaking of editing feature in the Org buffer, for giving more
> insight on formulas in tables.
>
> These "color features" weren't intended IMHO for export. So the 2 "problems"
> are in fact apart from each other.
>
>> It's important, however, that setting the export tag must be local to the
>> Org file so I can set it there instead of the global .emacs.
>
> Best regards,
>   Seb
>
> --
> Sebastien Vauban
>
>
>