Re: [Orgmode] Bug: Entering formula in cell on spreadsheet replaces all other formulas

2010-04-02 Thread Carsten Dominik


On Apr 2, 2010, at 12:17 AM, Russell Adams wrote:


When using the =formula syntax in the spreadsheet and tabbing to the
next cell instead of using C-u C-c =, the entire TBLFM line is
overwritten.


Hi Russel,

I do not understand what the problem is here.  Can you make a more  
detailed description with a test file?


Thanks.

- Carsten



___
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] question on missing scheduled entries in agenda

2010-04-02 Thread David Maus
Emin.shopper Martinian.shopper wrote:
Dear Experts,

I have noticed that if I have a nested entry in an org-mode file, it
does not get picked up properly in my agenda.

For example, if I have something like the stuff shown below in an
org-mode file and I create an agenda or export it, I sometimes get an
entry for the top level item which includes the bottom level item. For
example, if I do C-c C-e c and export this to an icalendar agenda
then I get an entry for PLAN even though it is not schedule but I get
no entry for quick morning stuff even though it is scheduled. Any
thoughts on what I can do so that such scheduled items are handled
properly?

First let's single out the problem: Is it about iCal export or agenda
display?  I've tried the example and both entries show up in the
agenda (M-x org-agenda RET a).

For the iCal export I get:

,
| BEGIN:VCALENDAR
| VERSION:2.0
| X-WR-CALNAME:OrgMode
| PRODID:-//David Maus//Emacs with Org-mode//EN
| X-WR-TIMEZONE:CEST
| CALSCALE:GREGORIAN
| BEGIN:VEVENT
| UID: TS-b9d39029-8b23-49a4-81ea-968da38c60ad
| DTSTART;VALUE=DATE:20100322
| DTEND;VALUE=DATE:20100323
| SUMMARY:PLAN   :PLAN:DAILY:
| DESCRIPTION: ** quick morning stuff
| CATEGORIES:PLAN,DAILY,test
| END:VEVENT
| END:VCALENDAR
`

So indeed: The scheduled subheadline doesn't get an entry but is used
as description of the PLAN headline.

Did you customize the iCal export properly (M-x customize-group RET
org-export-icalendar RET)?

If not this behavior is actually okay.  There is this variable with
the default setting:

,
| Hide Org Icalendar Use Scheduled:
| [ SCHEDULED timestamps in non-TODO entries become events
| [ ] SCHEDULED timestamps in TODO entries become events
| [X] SCHEDULED in TODO entries become start date
|State: STANDARD.
|Contexts where iCalendar export should use a scheduling time stamp. More
`

So SCHEDULED entries are only exported when they have a TODO keyword.

HTH
 -- David

--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgp3tw2v3QaNG.pgp
Description: PGP signature
___
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] using orgmode to send html mail?

2010-04-02 Thread David Maus
Eric Schulte wrote:

 Thinking functional this might be the first function of
 org-mail-htmlize[1]: Create a html representation of message body if
 necessary or appropriate.


Oh, so this would be a slightly different issue,

So this function could be run *every* time an email is sent.  I agree
that in those cases running on the entire message would be the right way
to go.

Right, this would be nice for people who are obliged to send out html
messages.  If this is turned on org-mime should display the string
HTML in the mode line.  In the WL it's done this way:

,
| (defun dmj/wl-send-html-message-draft-init ()
|   Create buffer local settings for maybe sending html message.
|   (unless (boundp 'dmj/wl-send-html-message-toggled-p)
| (setq dmj/wl-send-html-message-toggled-p nil))
|   (make-variable-buffer-local 'dmj/wl-send-html-message-toggled-p)
|   (add-to-list 'global-mode-string
|'(:eval (if (eq major-mode 'wl-draft-mode)
|dmj/wl-send-html-message-toggled-p
`

This function is hooked into mime-edit mode and set's a buffer local
variable that indicates html message mode and is displayed in the
mode line.


 2/

 The second function: Attach external files that are referenced in the
 message.  This might be useful even if you don't send out html
 messages: All external files are stashed into a multipart/mixed
 container along with a Content-Id: header field.

 Than all references are changed accordingly to point to the attached
 files:

   - for html use src/href with the cid: prefix

   - for text: good question.  Maybe replace occurences of the file
 with a customizable string saying: see attached file foo.bar.


I'm not sure I understand, I'm currently happy with my mail agent's
method of attaching files to email, what else would this use of the
function add aside from a new attachment syntax.

What I meant was: Suppose you write a document in Org with references
to external files (images etc.).  If finished you'd like this document
to a fellow by mail including all external files.  So this function
collects all these files, and maybe converts the message body to html,
fires up Gnus/WL with a new message and inserts something like

 #multipart type=alternate
 #part type=text/plain ...plain text body...
 #part type=text/html ...html body...
 #/multipart
 #multipart type=mixed
 #part type=image/png image1.png
 #part type=image/png image2.png
  ...
 #/multipart

That is: The original document including all external files -- and all
references in the original file are replaced by references to the
attachments.

Original
,
| ...
| As you can see in [[file:figure1.png][Figure 1]], cats
| *are* the cutest animals on earth.
| ...
`

figure1.png will be attached and the reference adjusted to the
attachment.

HTML
,
| As you can see in a href=cid:id-of-figure1.png title=Figure 1Figure 
1/a,
| cats bare/b the cutest animals on earth.
`

Plain

,
| As you can see in Figure 1 (see attached file: figure1.png), cats
| *are* the cutest animals on earth.
`

 4/

 Detecting the plain text body should not just stop on end of buffer
 but also on the first occurence of a MIME delimiter: Maybe the user
 already added a attachment.


Good point, one open question here is how to treat that mime border, I'm
thinking it may be best to simply stash it in a

#+BEGIN_HTML
original mime content
#+END_HTML

block, so that it survives the Org-mode export unscathed, however maybe
it's simpler just to end the html alternative part at the first mime
border.

Yes, it is simpler.  Simply search for the end of the message body
with the condition: either eobp or MIME delimiter.

For example when in mml (line 92ff in org-mime.el):

,
| (html-end (or (and region-p (region-end))
| (if (not (re-search-forward ^#part\\|^#multipart nil t))
| (point-max)
|   ;; one line up
|   (end-of-line 0)
|   (point
`

With this you can even catch the signature that is separate by --
\n.  If re-search-forward finds an attachment the body ends right
before.  Small glitch: This code assumes MIME delimiters start at the
beginning of a line (^).

 -- David

--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpHXDu19724y.pgp
Description: PGP signature
___
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: IMPORTANT: (possibly) incompatible Change

2010-04-02 Thread Carsten Dominik


On Apr 2, 2010, at 3:17 AM, Mark Elston wrote:


Carsten,

Thanks for this clarification.  This makes the transition much
simpler than I originally thought.  I can certainly remove the
common package names.

The existing org-export-latex-classes also contains the
documentclass line.  That won't change, will it?  I am
assuming from what you have written that the generated LaTeX code
will be something like:

contents of org-export-latex-classes for the selected class
contents of org-export-latex-default-packages-alist
contents of org-export-latex-packages-alist for the selected class


Yes.  But the latter two variables are independent of class.
And after these three components, #+LaTeX_HEADER stuff will be
added as well.

- Carsten



Is this correct?

Mark

On 3/31/2010 11:59 PM, Carsten Dominik wrote:

Hi Mark,

OK, it seems that I have really overstated this change. You are of
course right that your header for a document type can be very long,
that that defining it in org-export-latex-classes is a viable option
(other being to put this stuff into a separate file).

So let me restate what I am trying to say in this thread.

--

Org-mode contains now a new variable
`org-export-latex-default-packages-alist'
which contains all the LaTeX packages it needs to use for basic Org- 
mode
functionality. The corresponding \usepackage statements used to be  
part
of the header definitions in org-export-latex-classes, and they had  
to
be repeated for each document class. This is wasteful, error prone,  
and

hard to maintain.
Therefore, these packages are now collected in the new variable,
and they will be spliced into the header.

If you have customized the variable org-export-latex-classes, you  
need to

remove the following lines from each class definition:

\usepackage[AUTO]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}

If you have other packages you always want to use in all
classes, you can add them to another variable,
`org-export-latex-packages-alist'.
--



I think this makes more sense, thank you for making me clarify this.

- Carsten






___
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


- Carsten





___
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: Show notes in clock report

2010-04-02 Thread Carsten Dominik

Hi Nathan,

there is nothing like this right now.  I think I would add
some marker to the headline like {XXX} or so for you as
a reminder.  And then use the fact that the heading in
the clock table can be a link in order to jump to the heading
and check what your notes say.

- Carsten

On Apr 1, 2010, at 9:42 PM, Nathan Neff wrote:


Here's the use-case:

I'm working on Task 1, and encounter an unusual problem.
I want my clock report to show some detail about why Task 1
took more time than usual.

I don't want to create a sub-heading and clock into it then
adjust the clock, etc.  I just want to store a note or create a
heading with an inactive timestamp, and have the note appear
in the clock report.


Example:

--
* Task 1

 :LOGBOOK:
  CLOCK: [2010-03-01 Mon 10:35]--[2010-03-01 Mon 11:40] =  1:05
  :END:

** Encountered unusual problem
[2010-03-01 Mon 10:45]
-

I'd like the clock report to look like this:

Clock summary at [2010-03-03 Wed 14:15]

| L | Headline | Time   |
|---+--+|
|   | *Total time* | *1:05* |
|---+--+|
| 1 | Task 1   | 1:05   |
|| Encountered unusual problem | |


I've tried the C-2 C-c C-c approach, where I create a remember
note, then refile it under the currently clocking task.  The problem  
with
that approach is that the note won't show up in the clock report  
unless

it has time  1 min.

Thanks for the consideration,

--Nate
___
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


- Carsten





___
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] Publishing not working: troubleshooting

2010-04-02 Thread David Maus
Leo Ferres wrote:
When I attempt to publish the project with C-c C-e X, and I choose
courses, absolutely nothing happens. There's not even a message that
appears. I therefore don't know how to troubleshoot this by myself.
Could anyone help?

Okay, so if you can select courses than this must mean that the
project definition was picked up by the require.

I would approach this problem as follows:

  - check the :exclude property -- maybe the regexp is wrong and
matches all files;

  - remove the timestamps in ~/.org-timestamps -- maybe org-publish
doesn't publish because it considers the files not to be modified;

  - set the publishing directory to a local path (i.e.: simplify the
project to find the glitch)

HTH
 -- David

--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpomtq9nRChI.pgp
Description: PGP signature
___
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] Spreadsheet FR

2010-04-02 Thread Carsten Dominik


On Apr 1, 2010, at 11:46 PM, Russell Adams wrote:


Fellow Org'ers,

I adore the text spreadsheet, however there's one feature Excel
provides which I don't have in org.

I often use Excel for lists, where I can sort or narrow the data by
specific criteria from a larger list.

Would it be feasible to narrow a table by criteria on a specific
field in between separators? Ie: only display those cells in field A
if they are  2, or if field B matches Pick Me!.


This one might be possible - but dangerous for losing data.



A nice feature would be updating the totals at the bottom with only
the visible data.


I don't think Excel works like this, does it?



Just like the outline folding the goal would be to hide entries that
don't match, they should still remain.

So for example:

|+|
| *Lime* | *Cost* |
|+|
| Y  |  1 |
| Y  |  2 |
| Y  |  2 |
| N  |  3 |
| N  |  4 |
| Y  |  5 |
|+|
| Total  | 17 |
|+|
#+TBLFM: @8$2=vsum(@-...@-ii)

I can already sort by Lime or Cost, but if I filtered where Lime =
Y, I would have:

|+|
| *Lime* | *Cost* |
|+|
| Y  |  1 |
| Y  |  2 |
| Y  |  2 |...
| Y  |  5 |
|+|
| Total  | 10 |
|+|
#+TBLFM: @8$2=vsum(@-...@-ii)

No loss of the lines, on reload or changing the view they would come
back, but note that the formula at the end didn't consider
them. Ideally the cell references wouldn't change (the example above
would break if recalc was hit).

I'm not sure whether this would be cumulative or whether the criteria
specification would need to allow for multiple logical conditions.

Would anyone else consider this a useful feature? I'm not sure how
difficult the implementation would be.

Thanks.


___
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


- Carsten





___
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] Spreadsheet FR

2010-04-02 Thread Russell Adams
On Fri, Apr 02, 2010 at 09:49:46AM +0200, Carsten Dominik wrote:

 Would it be feasible to narrow a table by criteria on a specific
 field in between separators? Ie: only display those cells in field A
 if they are  2, or if field B matches Pick Me!.

 This one might be possible - but dangerous for losing data.

Ideally we're just narrowing away lines, collapsing a table like org
collapses headlines.

Why would that be more likely to cause data loss?

 A nice feature would be updating the totals at the bottom with only
 the visible data.

 I don't think Excel works like this, does it?

Absolutely. Excel 2003 and up support lists or in 2007 tables,
where you can do filter and summary work. I use it all the time for
customer planning because its the closest thing to grep/awk for Windows.

I think the real trick here is making the formulas ignore narrowed content.

If you'd like I can send you a sample.

Thanks.


--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


___
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: Entering formula in cell on spreadsheet replaces all other formulas

2010-04-02 Thread Russell Adams
On Fri, Apr 02, 2010 at 09:45:55AM +0200, Carsten Dominik wrote:

 On Apr 2, 2010, at 12:17 AM, Russell Adams wrote:

 When using the =formula syntax in the spreadsheet and tabbing to the
 next cell instead of using C-u C-c =, the entire TBLFM line is
 overwritten.

 Hi Russel,

 I do not understand what the problem is here.  Can you make a more  
 detailed description with a test file?

 Thanks.

 - Carsten

When entering data, you can type = and enter a formula in the cell
which apparently becomes the column formula when you hit tab. It is
written to the TBLFM line under the table.

Unfortunately it replaces the TBLFM line instead of appending to it,
wiping out current formulas.

I'm on 6.34c.

Thanks.



--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


___
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: using orgmode to send html mail?

2010-04-02 Thread David Maus
Vagn Johansen wrote:
David Maus dm...@ictsoc.de writes:

 Eric Schulte wrote:

[...]

I should have been clearer here.  I *am* using the multipart/alternative
appropriately.  When a chunk of org-mode text is converted to html I am
adding a single multipart/alternative block with two alternatives, both
the plain org-mode text, and the html, so that users like me who prefer
to see plain text can do so, and users of web clients like gmail can see
nice markup.

[...]

 But I still feel uncomfortable with the current solution: Even if the
 message created by current org-mail-htmlize is a valid MIME message (I
 think so) it is a rather complex MIME structure and I have no idea how
 other MUAs will display such a message.

Complex? That is how most emails are structured today.

I cannot not speak of most emails today but grepping for the
multipart/ entity in my mail archive ranging back to 2003 gives:


 | multipart entities in message | number of messages |
 |---+|
 | 0 |   4208 |
 | 1 |   3587 |
 | 2 |260 |
 | 3 |  8 |
 | 4 |  4 |
 |---+|
 | total |   8067 |

To avoid a misunderstanding: By complex I refer to a message that
looks like:

single text plain
multipart
  single text plain
  single text html
/multipart
single text plain
multipart
  single text plain
  single text html
/multipart
single text plain

And is considered to be just one document.

It just makes no sense to create such a nested message: If the
recipient requires html markup than send him html markup.  Why such a
nested message?

Moreover: Even if this message complies with the specs it is out of
their scope.

My impression is that current implementation of org-mail-htmlize mixes
up two completely different operations: /Creating/ a MIME message and
/displaying/ a MIME message.  Because it is assumed that a MIME message
as given above will be displayed as a single document or message.  And
this assumption cannot be based on the MIME specs of RFC2045-2049.

In RFC2046, p. 23 it is explicitely noted:

Conspicuously missing from the 'multipart' type is a notion of
structured, related body parts.

The relationship of the message parts in the example above: We are
parts of a single document is not transmitted.  This information is
not present at the recipient's side and a MUA is not obliged to
display all parts at once to be MIME compliant (cf. RFC2049).

And back to the purpose: The whole idea of sending html markup arouse
because some recipients require html markup to properly display the
transmitted information.  To achive this sending the entire plain text
as html markup in a single multipart/alternative is sufficient.  There
is no reason for ripping the original document apart, requiring a
certain interpretation of MIME messages on the client side.

Rhetoric question: Isn't this mixing up of sending and displaying
the problem of users who willingly or unwillingly send html messages
only?  They implicitely assume that the message will be rendered in
the same way on the recipients side as it is rendered for them.  Or
users who send out MS Word documents, based on their personal
experience that everybody they know is capable of displaying .doc
files?

 -- David

--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpGji5MsJ6sM.pgp
Description: PGP signature
___
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: Entering formula in cell on spreadsheet replaces all other formulas

2010-04-02 Thread Carsten Dominik


On Apr 2, 2010, at 10:19 AM, Russell Adams wrote:


On Fri, Apr 02, 2010 at 09:45:55AM +0200, Carsten Dominik wrote:


On Apr 2, 2010, at 12:17 AM, Russell Adams wrote:


When using the =formula syntax in the spreadsheet and tabbing to the
next cell instead of using C-u C-c =, the entire TBLFM line is
overwritten.


Hi Russel,

I do not understand what the problem is here.  Can you make a more
detailed description with a test file?

Thanks.

- Carsten


When entering data, you can type = and enter a formula in the cell
which apparently becomes the column formula when you hit tab. It is
written to the TBLFM line under the table.

Unfortunately it replaces the TBLFM line instead of appending to it,
wiping out current formulas.


Well, not for me, so there must be something funny in your formulas/ 
table.  Please make me an example.


- Carsten



___
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] org-reverse-note-order and date-tree

2010-04-02 Thread Evan
It seems that the org-reverse-note-order has no effects on the
following remember template

(Diary  ?d  * %U\n  %?\n  %i\n  %a  daily_notes/diary.org  date-tree)

Is this a feature?

Is it possible to to get a headline of reverse date tree in the
remember template?


___
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] Spreadsheet FR

2010-04-02 Thread Darlan Cavalcante Moreira

How can you expand/narrow the disabled lines if you want to show/hide them?
This will probably interfere with normal TAB use inside a table.

I think that the ability to disable some lines based on data in a column,
such as in your example, can be very useful. But maybe we don't need to
really collapse the lines. Only changing the face could be enough.

- Darlan

At Fri, 2 Apr 2010 03:16:58 -0500,
Russell Adams rlad...@adamsinfoserv.com wrote:
 
 On Fri, Apr 02, 2010 at 09:49:46AM +0200, Carsten Dominik wrote:
 
  Would it be feasible to narrow a table by criteria on a specific
  field in between separators? Ie: only display those cells in field A
  if they are  2, or if field B matches Pick Me!.
 
  This one might be possible - but dangerous for losing data.
 
 Ideally we're just narrowing away lines, collapsing a table like org
 collapses headlines.
 
 Why would that be more likely to cause data loss?
 
  A nice feature would be updating the totals at the bottom with only
  the visible data.
 
  I don't think Excel works like this, does it?
 
 Absolutely. Excel 2003 and up support lists or in 2007 tables,
 where you can do filter and summary work. I use it all the time for
 customer planning because its the closest thing to grep/awk for Windows.
 
 I think the real trick here is making the formulas ignore narrowed content.
 
 If you'd like I can send you a sample.
 
 Thanks.
 
 
 --
 Russell Adamsrlad...@adamsinfoserv.com
 
 PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/
 
 Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
 
 
 ___
 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


___
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] Re: Spreadsheet FR

2010-04-02 Thread Matt Lundin
Hi Russell,

Russell Adams rlad...@adamsinfoserv.com writes:

 I adore the text spreadsheet, however there's one feature Excel
 provides which I don't have in org.

 I often use Excel for lists, where I can sort or narrow the data by
 specific criteria from a larger list.

 Would it be feasible to narrow a table by criteria on a specific
 field in between separators? Ie: only display those cells in field A
 if they are  2, or if field B matches Pick Me!.

One way to achieve this behavior is by using properties + Eric Schulte's
org-collector.el in contrib. You can enter the data in a subtree using
properties and columns and then capture a subset of that data in a table
using a dynamic block. E.g., given the following subtree...

--8---cut here---start-8---
* My shopping list
  :PROPERTIES:
  :COLUMNS:  %40ITEM %10AMOUNT %10TYPE
  :ID:   41101c80-85b9-4af6-8138-8ad460a2949e
  :END:
** Bananas
   :PROPERTIES:
   :AMOUNT:   2.65
   :TYPE: fruit
   :END:
** Cheese
   :PROPERTIES:
   :AMOUNT:   4.54
   :TYPE: dairy
   :END:
** Flour
   :PROPERTIES:
   :AMOUNT:   3.00
   :TYPE: grain
   :END:
** Dish soap
   :PROPERTIES:
   :AMOUNT:   1.29
   :TYPE: kitchen
   :END:
** Lettuce
   :PROPERTIES:
   :AMOUNT:   1.80
   :TYPE: vegetable
   :END:
** Carrots
   :PROPERTIES:
   :AMOUNT:   2.56
   :TYPE: vegetable
   :END:
** Milk
   :PROPERTIES:
   :AMOUNT:   3.25
   :TYPE: dairy
   :END:
--8---cut here---end---8---

...you can use org-collector to capture a subset of data as follows...

--8---cut here---start-8---
* Data

#+begin: propview :id 41101c80-85b9-4af6-8138-8ad460a2949e :conds ((string= 
TYPE vegetable)) :cols (ITEM AMOUNT TYPE)
| ITEM| AMOUNT | TYPE  |
|---+--+-|
| Lettuce |  1.8 | vegetable |
| Carrots | 2.56 | vegetable |
|---+--+-|
|   | 4.36 | |
#+TBLFM: $LR2=vsum(@i+...@ii-1)
#+end
--8---cut here---end---8---

Change the conditions to match dairy items greater than 4 and you get
the following:

--8---cut here---start-8---
* Data

#+begin: propview :id 41101c80-85b9-4af6-8138-8ad460a2949e :conds ((and 
(string= TYPE dairy) ( AMOUNT 4))) :cols (ITEM AMOUNT TYPE)
| ITEM   | AMOUNT | TYPE  |
|--+--+-|
| Cheese | 4.54 | dairy |
|--+--+-|
|  | 4.54 | |
#+TBLFM: $LR2=vsum(@i+...@ii-1)
#+end
--8---cut here---end---8---

Best,
Matt


___
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: Entering formula in cell on spreadsheet replaces all other formulas

2010-04-02 Thread Russell Adams
 Well, not for me, so there must be something funny in your formulas/ 
 table.  Please make me an example.

 - Carsten


I just figured it out. I ran into it while composing the spreadsheet
for the narrowing FR.

Its that using = in a cell create a column formula, and I kept
replacing the same column. That wasn't what I was expecting. ;]

Thanks.

--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


___
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] Spreadsheet FR

2010-04-02 Thread Dan Davison
Hi Russell,

Carsten Dominik carsten.domi...@gmail.com writes:

 On Apr 1, 2010, at 11:46 PM, Russell Adams wrote:

 Fellow Org'ers,

 I adore the text spreadsheet, however there's one feature Excel
 provides which I don't have in org.

 I often use Excel for lists, where I can sort or narrow the data by
 specific criteria from a larger list.

 Would it be feasible to narrow a table by criteria on a specific
 field in between separators? Ie: only display those cells in field A
 if they are  2, or if field B matches Pick Me!.

How about keeping a master table containing all the information, and
then generating narrowed views as separate tables? The babel way to do
this would be to have a block function filter-table (provided below)
and then call it where needed:

#+TBLNAME: lime-table
| *Lime* | *Cost* |
|+|
| Y  |  1 |
| Y  |  2 |
| Y  |  2 |
| N  |  3 |
| N  |  4 |
| Y  |  5 |
| Total  | 17 |
#+TBLFM: @8$2=vsum(@-...@-ii)

#+call: filter-table(table=lime-table, field=0, value=Y)

#+results: filter-table(table=lime-table, field=0, value=Y)
| *Lime* | *Cost* |
|+|
| Y  |  1 |
| Y  |  2 |
| Y  |  2 |
| Y  |  5 |

As you can see I got rid of a few horizontal separator lines, and we
don't currently have totals. I'll suggest fixes for that below, but my
main point is that although it may make sense to extend org-mode, it's
already easy to do this in org-babel.

The separator lines are details, we can fix that by tinkering (if
there's interest we could continue this thread to do so). As for the
totals, we could go two routes:

1. We could add a final total row and use a table formula to compute the
   total
2. We could add the total row and compute the totals in a block
   function.

As far as I know there's no way to add a final row using a table formula
-- is that right? But we could automate (1) by wrapping the call to
filter-table in a second block function that is specific to this
problem:

#+call: filter-with-total-line(table=lime-table, field=0, value=Y)

#+results: filter-with-total-line(table=lime-table, field=0, value=Y)
| *Lime* | *Cost* |
|+|
| Y  |  1 |
| Y  |  2 |
| Y  |  2 |
| Y  |  5 |
| Total  | 10 |
#+TBLFM: @6$2=vsum(@-I..)

OK, so I hard wired a 6 into the TBLFM line. Perhaps someone can tell me
how to refer to the last line of the table. Also, it might be nice if
babel could apply the table formula automaticaly after generating the
table.

Here are the block functions. Once someone has written them, nobody else
needs to know anything about the implementation. They can be placed in
the same file (or in a different file, and added to your library of
babel using org-babel-lob-ingest). I've already added filter-table to
LoB on Worg.

#+function: filter-table(table, field, value)
#+begin_src emacs-lisp
  (defun org-lob-filter-table (table field value)
(if (and ( (length table) 1)
 (eq (second table) 'hline))
(append
 (list
  (first table)
  'hline)
 (org-lob-filter-table (cddr table) field value))
  (delq nil
(mapcar (lambda (row)
  (cond
   ((eq row 'hline) 'hline)
   ((equal (nth field row) value) row)))
table
  
  (org-lob-filter-table table field value)
#+end_src

#+function: filter-with-total-line(table, field, value)
#+begin_src emacs-lisp
  (append (org-lob-filter-table table field value)
  '((Total )))
#+end_src

For those who are still reading, 

1. These are written in elisp so that they're usable by anyone, although
   they would be one-liners in R.
2. The second one uses a function defined in the first one. This may be
   OK, but a perhaps preferable solution would be

#+function: append-total-line(table)
#+begin_src emacs-lisp
  (append table '((Total )))
#+end_src

#+call: append-total-line(table=filter-table(table=lime-table, field=0, 
value=Y))

Dan



 This one might be possible - but dangerous for losing data.


 A nice feature would be updating the totals at the bottom with only
 the visible data.

 I don't think Excel works like this, does it?


 Just like the outline folding the goal would be to hide entries that
 don't match, they should still remain.

 So for example:

 |+|
 | *Lime* | *Cost* |
 |+|
 | Y  |  1 |
 | Y  |  2 |
 | Y  |  2 |
 | N  |  3 |
 | N  |  4 |
 | Y  |  5 |
 |+|
 | Total  | 17 |
 |+|
 #+TBLFM: @8$2=vsum(@-...@-ii)

 I can already sort by Lime or Cost, but if I filtered where Lime =
 Y, I would have:

 |+|
 | *Lime* | *Cost* |
 |+|
 | Y  |  1 |
 | Y  |  2 |
 | Y  |  2 |...
 | Y  |  5 |
 |+|
 | Total  | 10 |
 |+|
 

Re: [Orgmode] Spreadsheet FR

2010-04-02 Thread Russell Adams
On Fri, Apr 02, 2010 at 10:44:23AM -0400, Dan Davison wrote:
 How about keeping a master table containing all the information, and
 then generating narrowed views as separate tables? The babel way to do
 this would be to have a block function filter-table (provided below)
 and then call it where needed:
 
 #+TBLNAME: lime-table
 | *Lime* | *Cost* |
 |+|
 | Y  |  1 |
 | Y  |  2 |
 | Y  |  2 |
 | N  |  3 |
 | N  |  4 |
 | Y  |  5 |
 | Total  | 17 |
 #+TBLFM: @8$2=vsum(@-...@-ii)
 
 #+call: filter-table(table=lime-table, field=0, value=Y)
 
 #+results: filter-table(table=lime-table, field=0, value=Y)
 | *Lime* | *Cost* |
 |+|
 | Y  |  1 |
 | Y  |  2 |
 | Y  |  2 |
 | Y  |  5 |
 
 As you can see I got rid of a few horizontal separator lines, and we
 don't currently have totals. I'll suggest fixes for that below, but my
 main point is that although it may make sense to extend org-mode, it's
 already easy to do this in org-babel.

That's a better way to do it than properties in my opinion.

Whether extension was required or not, my only point was that for
small lists the only reason I still use OO or Excel was for the
ability to dynamically narrow a list.

Given org narrows outlines, I thought it might fit.

I'll have to play with babel now!

 OK, so I hard wired a 6 into the TBLFM line. Perhaps someone can tell me
 how to refer to the last line of the table. Also, it might be nice if
 babel could apply the table formula automaticaly after generating the
 table.

This is why I use @-...@-ii, the separators are your cues. There's an
LR symbol, but I don't use it often.

That alone is a good reason to make sure separator lines are preserved.

Thanks.

--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


___
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: using orgmode to send html mail?

2010-04-02 Thread Dan Davison

[...]

 It just makes no sense to create such a nested message: If the
 recipient requires html markup than send him html markup.  Why such a
 nested message?

Hi David,

What about if I'm sending an email containing some org-mode elements
like tables, and also some code. I want the reader to he able to see the
plain text structure of the tables, so that they know exactly what's
going on. But for the code, I would like those using webmail clients to
see nicely formatted, fontified code.

Is that a potential justification?

Dan


___
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: IMPORTANT: (possibly) incompatible Change

2010-04-02 Thread Thomas S. Dye

Aloha Carsten and others,

The Worg FAQ on beamer export describes a setup that isn't up-to-date:

http://orgmode.org/worg/org-faq.php#beamer

All the best,
Tom

On Apr 1, 2010, at 6:51 AM, Carsten Dominik wrote:



On Apr 1, 2010, at 6:17 PM, Thomas S. Dye wrote:


Aloha Carsten,

Packages that aren't used for all classes can still appear in org- 
export-latex-classes, correct?


Aloha Tom,

Anything can appear there.  But you should not have the packages I  
have listed in the new variable org-export-latex-default-packages- 
alist, because these will be used anyway.  If you keep them in org- 
export-latex-classes, they will be called twice (which may or may  
not be a problem)


- Carsten



All the best,
Tom

On Apr 1, 2010, at 1:13 AM, Carsten Dominik wrote:


OK, this change is now in the master branch.

- Carsten

On Apr 1, 2010, at 8:59 AM, Carsten Dominik wrote:


Hi Mark,

OK, it seems that I have really overstated this change.  You are of
course right that your header for a document type can be very long,
that that defining it in org-export-latex-classes is a viable  
option

(other being to put this stuff into a separate file).

So let me restate what I am trying to say in this thread.

--
Org-mode contains now a new variable `org-export-latex-default- 
packages-alist'
which contains all the LaTeX packages it needs to use for basic  
Org-mode
functionality.  The corresponding \usepackage statements used to  
be part
of the header definitions in org-export-latex-classes, and they  
had to
be repeated for each document class.  This is wasteful, error  
prone, and

hard to maintain.
Therefore, these packages are now collected in the new variable,
and they will be spliced into the header.

If you have customized the variable org-export-latex-classes, you  
need to

remove the following lines from each class definition:

\usepackage[AUTO]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}

If you have other packages you always want to use in all
classes, you can add them to another variable,
`org-export-latex-packages-alist'.
--


I think this makes more sense, thank you for making me clarify  
this.


- Carsten



On Mar 31, 2010, at 8:41 PM, Mark Elston wrote:


On 3/31/2010 5:35 AM, Carsten Dominik wrote:


On Mar 31, 2010, at 11:00 AM, Chris Gray wrote:


Carsten Dominik wrote:


-

* =org-export-latex-classes= no longer should be customized  
for packages

...
So if you have customized this variable, please remove once  
more
(hopefully for the last time) your customization, so that it  
can

revert to its now much simpler default value. Put all your
package definitions into org-export-latex-packages-alist.
I hope this works, and we will not get conflicts because of the
sequence in which packages are called. If there are problems,
please let me know so that we can find a solution.


Is it sufficient to change the variable that is being set from
org-export-latex-classes to org-export-latex-default-packages- 
alist? Or

does the format of the list change at all?


org-export-latex-default-packages-alist has the same format as
org-export-latex-pakcages-alist. And I am filling
org-export-latex-default-packages-alist already with the  
correct set of

default packages, so you should not touch that variable.

Only if you have previously customized org-export-latex-classes  
in order

to add more usepackage statements, then you should remove your
customization of that variable and list your set of additional  
packages

in org-export-latex-packages-alist instead.

Am I making sense?



So, org-export-latex-classes will no longer be used to define
LaTeX_CLASS classes?  Instead these classes will be defined in
org-export-latex-default-packages-alist?

The problem is mainly nomenclature, I guess, but my LaTeX_CLASS
definitions are usually a *lot* more than a list of packages.

It seems a little odd, but OK.

Mark


___
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


- Carsten





- Carsten





___
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




- Carsten





___
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: Entering formula in cell on spreadsheet replaces all other formulas

2010-04-02 Thread Carsten Dominik


On Apr 2, 2010, at 4:37 PM, Russell Adams wrote:


Well, not for me, so there must be something funny in your formulas/
table.  Please make me an example.

- Carsten



I just figured it out. I ran into it while composing the spreadsheet
for the narrowing FR.

Its that using = in a cell create a column formula, and I kept
replacing the same column. That wasn't what I was expecting. ;]


You know about := ?

- Carsten



Thanks.

--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


___
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


- Carsten





___
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: Entering formula in cell on spreadsheet replaces all other formulas

2010-04-02 Thread Russell Adams
Carsten,

I do now! ;]

Thanks.

 You know about := ?

 - Carsten


--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


___
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] Spreadsheet FR

2010-04-02 Thread Russell Adams
On Fri, Apr 02, 2010 at 09:55:16AM -0500, Russell Adams wrote:
  As you can see I got rid of a few horizontal separator lines, and we
  don't currently have totals. I'll suggest fixes for that below, but my
  main point is that although it may make sense to extend org-mode, it's
  already easy to do this in org-babel.
 
 That's a better way to do it than properties in my opinion.
 
 Whether extension was required or not, my only point was that for
 small lists the only reason I still use OO or Excel was for the
 ability to dynamically narrow a list.
 
 Given org narrows outlines, I thought it might fit.

One issue I just realized is that babel in this format will strictly
be a *viewer*, that you could not reduce the dataset and edit it in
adjacent lines.



--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


___
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: using orgmode to send html mail?

2010-04-02 Thread David Maus
Dan Davison wrote:

[...]

 It just makes no sense to create such a nested message: If the
 recipient requires html markup than send him html markup.  Why such a
 nested message?

Hi David,

What about if I'm sending an email containing some org-mode elements
like tables, and also some code. I want the reader to he able to see the
plain text structure of the tables, so that they know exactly what's
going on. But for the code, I would like those using webmail clients to
see nicely formatted, fontified code.

Is that a potential justification?

I cannot answer this question because the whole idea of sending just
some parts of the entire document is based on a horrible mistake:

 But for the code, I would like those using webmail clients to see
 nicely formatted, fontified code.

I understand this idea, but: MIME is about message transport, not
message display.  You want the message displayed in a certain way but

  You have little control over how the content is displayed on the
  recipients side.

To give an example: I've sent one of the complex MIME messages to a
mail account at GMX, a quite popular german mail hoster and opened it
in the web interface.

The message was constructed like this (using mml like markup):

 #part type=text/plain
First MIME entity
 #multipart type=alternative
 #part type=text/plain
  Second in plain text
 #part type=text/html
  bSecond/b in HTML
 /#multipart
 #part type=text/plain
  Third MIME entity.
 #part type=text/plain
  Fourth in plain text
 #part type=text/html
  bFourth/b in HTML
 /#multipart

  - when I first opened the message I had to toggle the NoScript
extension to allow iframes:

http://s10.directupload.net/file/u/15851/wydtca3n_png.htm

  - after that the html was shown, but... totally messed up

http://s10.directupload.net/file/u/15851/j43xqkjt_png.htm

  - and finally I chose plain text display

http://s1.directupload.net/file/u/15851/plz64u4a_png.htm

And the second and fourth part was silently dropped.

Sending a simple message with a plain text body followed by it's html
representation was displayed fine:

http://s10.directupload.net/file/u/15851/ojdn8pdl_png.htm

See what I mean?

 -- David

--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpkGpK48iBO3.pgp
Description: PGP signature
___
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] Re: Spreadsheet FR

2010-04-02 Thread Matt Lundin
Dan Davison davi...@stats.ox.ac.uk writes:

 Hi Russell,

 Carsten Dominik carsten.domi...@gmail.com writes:

 On Apr 1, 2010, at 11:46 PM, Russell Adams wrote:

 Fellow Org'ers,

 I adore the text spreadsheet, however there's one feature Excel
 provides which I don't have in org.

 I often use Excel for lists, where I can sort or narrow the data by
 specific criteria from a larger list.

 Would it be feasible to narrow a table by criteria on a specific
 field in between separators? Ie: only display those cells in field A
 if they are  2, or if field B matches Pick Me!.

 How about keeping a master table containing all the information, and
 then generating narrowed views as separate tables? The babel way to do
 this would be to have a block function filter-table (provided below)
 and then call it where needed:

This is fantastic. Thanks, Dan!

- Matt


___
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: using orgmode to send html mail?

2010-04-02 Thread Eric Schulte
Hi,

Given the current setup, sending messages with multiple multipart
sections is simply one optional way of using the `org-mime-htmlize'
function.  By default when `org-mime-htmlize' is called without an
active region the entire message body is encoded as a single MIME
multipart/alternative -- the simpler approach you advocate below.

That said, I'm not sure what you are arguing for.  Are you arguing that
the option to send multiple multipart/alternative sections be removed?
This is an option which could only be used intentionally, hopefully in
full knowledge the potential risks and drawbacks.

In my opinion it is bad design to go out of your way to remove choice
and functionality from a program.  Additionally I don't like the idea of
limiting the functionality of a tool to the level of the lowest common
denominator of it's peers.  That is not how progress is made.

Thanks -- Eric

David Maus dm...@ictsoc.de writes:

 Dan Davison wrote:

[...]

 It just makes no sense to create such a nested message: If the
 recipient requires html markup than send him html markup.  Why such a
 nested message?

Hi David,

What about if I'm sending an email containing some org-mode elements
like tables, and also some code. I want the reader to he able to see the
plain text structure of the tables, so that they know exactly what's
going on. But for the code, I would like those using webmail clients to
see nicely formatted, fontified code.

Is that a potential justification?

 I cannot answer this question because the whole idea of sending just
 some parts of the entire document is based on a horrible mistake:

 But for the code, I would like those using webmail clients to see
 nicely formatted, fontified code.

 I understand this idea, but: MIME is about message transport, not
 message display.  You want the message displayed in a certain way but

   You have little control over how the content is displayed on the
   recipients side.

 To give an example: I've sent one of the complex MIME messages to a
 mail account at GMX, a quite popular german mail hoster and opened it
 in the web interface.

 The message was constructed like this (using mml like markup):

  #part type=text/plain
 First MIME entity
  #multipart type=alternative
  #part type=text/plain
   Second in plain text
  #part type=text/html
   bSecond/b in HTML
  /#multipart
  #part type=text/plain
   Third MIME entity.
  #part type=text/plain
   Fourth in plain text
  #part type=text/html
   bFourth/b in HTML
  /#multipart

   - when I first opened the message I had to toggle the NoScript
 extension to allow iframes:

 http://s10.directupload.net/file/u/15851/wydtca3n_png.htm

   - after that the html was shown, but... totally messed up

 http://s10.directupload.net/file/u/15851/j43xqkjt_png.htm

   - and finally I chose plain text display

 http://s1.directupload.net/file/u/15851/plz64u4a_png.htm

 And the second and fourth part was silently dropped.

 Sending a simple message with a plain text body followed by it's html
 representation was displayed fine:

 http://s10.directupload.net/file/u/15851/ojdn8pdl_png.htm

 See what I mean?

  -- David

 --
 OpenPGP... 0x99ADB83B5A4478E6
 Jabber dmj...@jabber.org
 Email. dm...@ictsoc.de
 ___
 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


___
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] Re: #+LABEL: in HTML export

2010-04-02 Thread Baoqiu Cui
Hi Carsten,

I've made corresponding changes in org-docbook.el to support this
feature in the DocBook exporter.  Please check the attached patch, in
which I also fixed a minor bug that was introduced in your recent change
of new and better support for entities.

diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
index 7c43211..700f1db 100644
--- a/lisp/org-docbook.el
+++ b/lisp/org-docbook.el
@@ -1259,13 +1259,13 @@ string, don't modify these.
   (if org-export-with-sub-superscripts
   (setq s (org-export-docbook-convert-sub-super s)))
   (if org-export-with-TeX-macros
-  (let ((start 0) wd rep ass)
+  (let ((start 0) wd rep)
 	(while (setq start (string-match \\([a-zA-Z]+\\)\\({}\\)?
 	 s start))
 	  (if (get-text-property (match-beginning 0) 'org-protected s)
 	  (setq start (match-end 0))
 	(setq wd (match-string 1 s))
-	(if (setq ass (org-entity-get-representation wd 'html))
+	(if (setq rep (org-entity-get-representation wd 'html))
 		(setq s (replace-match rep t t s))
 	  (setq start (+ start (length wd
   s)
@@ -1349,18 +1349,33 @@ string, don't modify these.
 	(replace-match 
 
 (defun org-export-docbook-finalize-table (table)
-  Change TABLE to informaltable if caption does not exist.
+  Clean up TABLE and turn it into DocBook format.
+This function adds a label to the table if it is available, and
+also changes TABLE to informaltable if caption does not exist.
 TABLE is a string containing the HTML code generated by
 `org-format-table-html' for a table in Org-mode buffer.
-  (if (string-match
-   ^table \\(\\(.\\|\n\\)+\\)caption/caption\n\\(\\(.\\|\n\\)+\\)/table
-   table)
-  (replace-match (concat informaltable 
-			 (match-string 1 table)
-			 (match-string 3 table)
+  (let ((table-with-label label))
+;; Get the label if it exists, and move it into the table element.
+(setq table-with-label
+	  (if (string-match
+	   ^table \\(\\(.\\|\n\\)+\\)a name=\\\(.+\\)\ id=\.+\/a\n\\(\\(.\\|\n\\)+\\)/table
+	   table)
+	  (replace-match (concat table xml:id=\ (match-string 3 table) \ 
+ (match-string 1 table)
+ (match-string 4 table)
+ /table)
+			 nil nil table)
+	table))
+;; Change table into informaltable if caption does not exist.
+(if (string-match
+	 ^table \\(\\(.\\|\n\\)+\\)caption/caption\n\\(\\(.\\|\n\\)+\\)/table
+	 table-with-label)
+	(replace-match (concat informaltable 
+			 (match-string 1 table-with-label)
+			 (match-string 3 table-with-label)
 			 /informaltable)
-		 nil nil table)
-table))
+		   nil nil table-with-label)
+  table-with-label)))
 
 ;; Note: This function is very similar to
 ;; org-export-html-convert-sub-super.  They can be merged in the future.

Carsten Dominik carsten.domi...@gmail.com writes:

 Hi Thomas,

 Are you talking about figures or about tables?

 For figures, the label is attached to the figure as the id of
 the div surrounding figure plus caption.  However, this only
 works if you also specify a caption.  But I think that only
 figures with caption should be targets for links.

 For tables, I have just made a change so that the label
 is inserted as an anchor just as you propose:

table border=2 cellspacing=0 cellpadding=6 rules=groups
 frame=hsides
a name=tab:yyy id=tab:yyy/a
captionThis is a table/caption

 Finally, I am now converting \ref{xxx} macros into links
 for the HTML backend.  One problem is that, so the same
 \ref macro will lead to the figure in both backends.

 Hope this helps.

Thanks,

-- 
Baoqiu
___
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] using orgmode to send html mail?

2010-04-02 Thread Eric Schulte
David Maus dm...@ictsoc.de writes:

 Eric Schulte wrote:

 Thinking functional this might be the first function of
 org-mail-htmlize[1]: Create a html representation of message body if
 necessary or appropriate.


Oh, so this would be a slightly different issue,

So this function could be run *every* time an email is sent.  I agree
that in those cases running on the entire message would be the right way
to go.

 Right, this would be nice for people who are obliged to send out html
 messages.  If this is turned on org-mime should display the string
 HTML in the mode line.  In the WL it's done this way:

 ,
 | (defun dmj/wl-send-html-message-draft-init ()
 |   Create buffer local settings for maybe sending html message.
 |   (unless (boundp 'dmj/wl-send-html-message-toggled-p)
 | (setq dmj/wl-send-html-message-toggled-p nil))
 |   (make-variable-buffer-local 'dmj/wl-send-html-message-toggled-p)
 |   (add-to-list 'global-mode-string
 |'(:eval (if (eq major-mode 'wl-draft-mode)
 |dmj/wl-send-html-message-toggled-p
 `

 This function is hooked into mime-edit mode and set's a buffer local
 variable that indicates html message mode and is displayed in the
 mode line.


Another option here is to add a defadvice to the actual sending command
(C-c C-c in gnus) such that if the command is called with a prefix
argument, then `org-mime-htmlize' is run on the entire message before
mail delivery.  To me this seems like a simpler solution than the above.



 2/

 The second function: Attach external files that are referenced in the
 message.  This might be useful even if you don't send out html
 messages: All external files are stashed into a multipart/mixed
 container along with a Content-Id: header field.

 Than all references are changed accordingly to point to the attached
 files:

   - for html use src/href with the cid: prefix

   - for text: good question.  Maybe replace occurences of the file
 with a customizable string saying: see attached file foo.bar.


I'm not sure I understand, I'm currently happy with my mail agent's
method of attaching files to email, what else would this use of the
function add aside from a new attachment syntax.

 What I meant was: Suppose you write a document in Org with references
 to external files (images etc.).  If finished you'd like this document
 to a fellow by mail including all external files.  So this function
 collects all these files, and maybe converts the message body to html,
 fires up Gnus/WL with a new message and inserts something like

  #multipart type=alternate
  #part type=text/plain ...plain text body...
  #part type=text/html ...html body...
  #/multipart
  #multipart type=mixed
  #part type=image/png image1.png
  #part type=image/png image2.png
   ...
  #/multipart

 That is: The original document including all external files -- and all
 references in the original file are replaced by references to the
 attachments.


Ah, this sounds similar to the extension proposed by Dan and seconded by
a couple of others on the list.  It seems like the big question here is
how to convey all of the required mime information from the org-mode
buffer to the message body.

If I'm understanding correctly both you and Dan seem to be in favor of
exporting to mime and packaging up the raw mime information from the
org-mode buffer.  I'm leaning towards thinking that it may be easier to
simply bring the mail buffer to the org-mode file by saving it to a
temporary location alongside the org-mode file (so all links resolve).
It will probably take some experimentation to find out which approach is
more feasible/natural.


 Original
 ,
 | ...
 | As you can see in [[file:figure1.png][Figure 1]], cats
 | *are* the cutest animals on earth.
 | ...
 `

 figure1.png will be attached and the reference adjusted to the
 attachment.

 HTML
 ,
 | As you can see in a href=cid:id-of-figure1.png title=Figure 1Figure 
 1/a,
 | cats bare/b the cutest animals on earth.
 `

 Plain

 ,
 | As you can see in Figure 1 (see attached file: figure1.png), cats
 | *are* the cutest animals on earth.
 `

 4/

 Detecting the plain text body should not just stop on end of buffer
 but also on the first occurence of a MIME delimiter: Maybe the user
 already added a attachment.


Good point, one open question here is how to treat that mime border, I'm
thinking it may be best to simply stash it in a

#+BEGIN_HTML
original mime content
#+END_HTML

block, so that it survives the Org-mode export unscathed, however maybe
it's simpler just to end the html alternative part at the first mime
border.

 Yes, it is simpler.  Simply search for the end of the message body
 with the condition: either eobp or MIME delimiter.

 For example when in mml (line 92ff in org-mime.el):

 ,
 | (html-end (or (and region-p (region-end))
 |   (if (not (re-search-forward ^#part\\|^#multipart nil t))
 |   (point-max)
 | ;; one 

[Orgmode] Org-mode and citations

2010-04-02 Thread John Hendy
Hi,


Just finishing up a report and was taking care of the citations. I've been
using C-c C-x f and it's been awesome... until I go to export to LaTeX when
everything falls apart. Footnotes in my document came during unordered list
items (bullets) and the LaTeX export had all kinds of mismatched brackets
that I haven't been able to sort through. Is there a better way? Here's an
example of what I'm experiencing:

--
\item Through further research, it turns out that World Choice Travel is
exactly how FHTM is generating income from Travelocity\footnote{Office
of the State Auditor, State of Montana
\end{itemize}

\end{itemize}
(2010). \emph{Temporary Cease and Desist Order and Opportunity for Hearing}
(SEC-2010-12), 29. \href{
http://www.sao.mt.gov/legal/securities/S10_HITECH%20Cease%20and%20Desist.pdf}{http://www.sao.mt.gov}
}
\begin{itemize}
\item \textbf{Magazines.com:} 35\% on all sales\footnote{Magazines.com
(2009). \emph{Sales Affiliate Information}. Retrieved
\end{itemize}
31 March 2010 from \href{
http://www.magazines.com/affiliate/index}{http://www.magazines.com} }
--

So... (2010). \emph... should be after 'State of Montana' on one item rather
than made to be in between an \end{itemize} and \begin{itemize} (no man's
land, that is). Same thing with the last line '31 March...': that should
have come after 'Retrieved' two lines above.

I have found all kinds of references, but nothing that lays things out play
by play. I would prefer to have org-mode integration so that I don't put in
bib info in the tex file, change something, and have to do it all over again
when I re-export.

So, I can find some info about Bibtex and Reftex but in my opinion it's just
not very helpful. Even the bibtex.org website seems difficult to me. I
copied their examples exactly and end up with 'Blablabla said Nobody ~[?]'
and some weird stuff at the bottom. I have also found Mario's Brain Dump (
http://www.mfasold.net/blog/2009/02/using-emacs-org-mode-to-draft-papers/)
which only says to put these lines in an org-mode file:

\bibliographystyle{plain}
\bibliography{ProbePosition}

I have also found this:
http://www.hep.manchester.ac.uk/u/jenny/jcwdocs/latex/bibtexbasics.html
and this: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg02317.html

Usually I just get something like no bibliography found, 'some references
were undefined' when exporting from LaTeX mode with C-c C-c, or at one point
got 'Wrong type argument stringp, nil when trying this:
http://article.gmane.org/gmane.emacs.orgmode/2406/match=bibliography

I completely admit that I might be stupid about not finding some obvious
information, but it's really been challenging!

Is there any sort of 'quick' way to use bibtex or reftex in org-mode?
Googling doesn't get me hits on the org-mode manual.

I would also accept user suggestions of how to use bibtex/reftex with
org-mode, but more of a 'from scratch' method. I have looked and looked and
could tell you:
- bibtex and reftex exist (but not really what the difference is)
- what bibtex file formats are like and what classes work with the various
source types (i have the manual)
- that there seems to be a way to use this in org-mode
- that those who use it really like it

But not much else.

As an alternative, is there a way to:
- fix my issue above?
- use endnotes instead of footnotes via this method?

Many thanks for sparing my hair.


John
___
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] Makefile: org-entities.el missing in the LISPF variable

2010-04-02 Thread Carsten Dominik

Hi Xiao-Yong,

thanks for catching this - it is fixed.

- Carsten

On Apr 2, 2010, at 10:18 PM, Xiao-Yong Jin wrote:


Hi,

The variable LISPF in the Makefile does not include the new
file org-entities.el.  I am not sure about the dependencies,
so I don't want to make a patch that might not be complete.
So I guess I can just sent a message, since it should be a
simple fix for developers.

Thanks,
-- jxy
--
Jc/*__o/*
X\ * (__
Y*/\  


___
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


- Carsten





___
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