RE: [Orgmode] %20 in file://... URL

2010-11-04 Thread Vincent Belaïche
Hello,

Sorry to dwell on it: I am just wondering, is there any reason why %20
and suchlikes are not supported with the file: protocole ? 

I not, I can submit a patch to correct this and have the % constructs
decoded.

BR,
   Vincent.



___
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: How do I convert org to OpenOffice?

2010-11-04 Thread Jambunathan K

Hello Matt

> On Wed, Nov 3, 2010 at 1:37 AM, Jambunathan K  wrote:
>
>
>
> Anyone curious about the odt exporter can download a snapshot anytime
> and export or report problems.
>
> contrib/odt/  directory is the best place to get started.
>
> 1. README.org
>   - 'The one file' for jotting down TODOs, FIXMEs or any useful ideas.
>
> 2. setup.el
>   - Useful elisp stuff that can go in to a user's .emacs
>
> 3. files/ and files/test.org
>   - Unit Test file for feeding to the exporter.
>
> I have currently bound C-c C-e o and C-c C-e O for OpenOffice export.
>
>
>
> hi jambunathan,
>
> i'm probably being a bit stupid, but
> 1) couldn't get setup.el to load until changing require 'archive to require
> 'archive-mode
> 2) I even so i get this message
> get-setf-method: No setf-method known for quote
>

I have (hopefully) addressed the above two issues.

> this is with a recent org-mode, but my emacs-snapshot is over a year
> old. 

FYI, You don't need to checkout the whole repo:
1. Download the 2 elisp files - org-exp.el and org-odt.el
2. Download the whole of contrib/odt and modify the setting of
   org-odt-contrib-dir in setup.el to point to the above directory.

Thanks,
Jambunathan K.

> thanks,
> 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


[Orgmode] german-postfix and speedkeys (was: Umlauts in LaTeX export)

2010-11-04 Thread Memnon Anon
Jean-Marie Gaillourdet  writes:

> Although I am german, I use an american keyboard layout for coding and
> everything else. But there is a nice emacs solution to enter umlauts:
> =C-x RET C-\ german-postfix RET= This enables an input method which
> allows you to enter all german umlauts: ä ü ö Ä Ü Ö and ß. 
>
> Entering an `a' followed immediately by an `e' generates an ä, followed
> by another `e' it becomes `ae`, similar for ü and ö . `s` followed by
> `z` generates an `ß`. Larger variants are typed by typing two large
> letters.

Hi,

same situation here (german with an american keyboard layout).
I just use `C-\' and toggle my way in and out of german-postfix.

Just one thing to be aware of: 

If you use german-postfix, using the `u' speedkey command on stars will
not work in orgmode files; I use this frequently, so being able to
quickly toggle is essential.

Memnon


___
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: Override export filename

2010-11-04 Thread Aidan Gauland
Nick Dokos  hp.com> writes:
> If you just need a different extension, I think this works:
> 
> --8<---cut here---start->8---
> #+BIND: org-export-html-extension "goo"
> 
> * foo
> foo
> 
> * bar
> bar
> --8<---cut here---end--->8---

Yup, that works perfectly.  Thanks!

--Aidan



___
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] [PATCH] org-velocity and org-remember

2010-11-04 Thread Jeff Horn
Thanks for taking care of this, Paul. The patch works fine on my end.
I seem to remember an option for inserting the note with a date tree.
Has something changed or am I confusing org-velocity options with
another set of options?

Can I get org-velocity to automatically insert a timestamp, perhaps by
giving it a default capture template to use?

Jeff

On Wed, Nov 3, 2010 at 7:22 PM, Paul M. Rodriguez
 wrote:
>
> This patch supports org-capture (with fallback to org-remember) for
> org-velocity.  It also effects some internal changes, principally due to
> the use of `Electric-command-loop' to replace an expedient equivalent.
>
>
> ___
> 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
>
>



-- 
Jeffrey Horn
Graduate Lecturer and PhD Student in Economics
George Mason University

(704) 271-4797
jh...@gmu.edu
jrhorn...@gmail.com

http://www.failuretorefrain.com/jeff/

___
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: How do I convert org to OpenOffice?

2010-11-04 Thread Matt Price
On Wed, Nov 3, 2010 at 1:37 AM, Jambunathan K wrote:

>
>
> Anyone curious about the odt exporter can download a snapshot anytime
> and export or report problems.
>
> contrib/odt/  directory is the best place to get started.
>
> 1. README.org
>   - 'The one file' for jotting down TODOs, FIXMEs or any useful ideas.
>
> 2. setup.el
>   - Useful elisp stuff that can go in to a user's .emacs
>
> 3. files/ and files/test.org
>   - Unit Test file for feeding to the exporter.
>
> I have currently bound C-c C-e o and C-c C-e O for OpenOffice export.
>
>
hi jambunathan,

i'm probably being a bit stupid, but
1) couldn't get setup.el to load until changing require 'archive to require
'archive-mode
2) I even so i get this message
get-setf-method: No setf-method known for quote

this is with a recent org-mode, but my emacs-snapshot is over a year old.
thanks,
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: TaskJuggler3, revisited

2010-11-04 Thread John Hendy
Nice! I was able to do the following:

- grab your copy of org-taskjuggler.el and install it
- get the .org file here: http://orgmode.org/manual/TaskJuggler-export.html
- export to a .tjp
- swap out the default export with the code below and run "tj3 tj3-test.tjp"
and get a nice html report!
--- If you're looking for a default tj3 export... perhaps start with what's
below?

Great work!


John



The export code that creates quite a nice html report (from tj3
documentation)
--
navigator navbar {
  hidereport 0
}

macro TaskTip [
  tooltip istask() -8<-
'''Start: ''' <-query attribute='start'->
'''End: ''' <-query attribute='end'->

'''Resources:'''

<-query attribute='resources'->

'''Precursors: '''

<-query attribute='precursors'->

'''Followers: '''

<-query attribute='followers'->
->8-
]

textreport frame "" {
  header -8<-
== Accounting Software Project ==

<[navigator id="navbar"]>

  ->8-
  footer ""
  textreport index "Overview" {
formats html
center '<[report id="overview"]>'
  }

  textreport "Status" {
formats html
center -8<-
  <[report id="status.dashboard"]>
  
  <[report id="status.completed"]>
  
  <[report id="status.ongoing"]>
  
  <[report id="status.future"]>
->8-
  }

  textreport development "Development" {
formats html
center '<[report id="development"]>'
  }

  textreport "Deliveries" {
formats html
center '<[report id="deliveries"]>'
  }

  textreport "ContactList" {
formats html
title "Contact List"
center '<[report id="contactList"]>'
  }
  textreport "ResourceGraph" {
formats html
title "Resource Graph"
center '<[report id="resourceGraph"]>'
  }
}

# A traditional Gantt chart with a project overview.
taskreport overview "" {
  header -8<-
=== Project Overview ===

The project is structured into 3 phases.

# Specification
# <-reportlink id='frame.development'->
# Testing

=== Original Project Plan ===
  ->8-
  columns hierarchindex,
  name, start, end, effort, duration, cost,
  revenue, chart { ${TaskTip} }
  # For this report we like to have the abbreviated weekday in front
  # of the date. %a is the tag for this.
  timeformat "%a %Y-%m-%d"
  loadunit days
  hideresource 1
  caption 'All effort values are in man days.'

  footer -8<-
=== Staffing ===

All project phases are properly staffed. See [[ResourceGraph]] for
detailed resource allocations.

=== Current Status ===

The project started off with a delay of 4 days. This slightly affected
the original schedule. See [[Deliveries]] for the impact on the
delivery dates.
  ->8-
}

# Macro to set the background color of a cell according to the alert
# level of the task.
macro AlertColor [
  cellcolor plan.alert = 0 "#00D000" # green
  cellcolor plan.alert = 1 "#D0D000" # yellow
  cellcolor plan.alert = 2 "#D0" # red
]

taskreport status "" {
  columns wbs, name, start, end, effort, alert { tooltip plan.journal
  != '' "<-query attribute='journal'->" }, status

  taskreport dashboard "" {
headline "Project Dashboard (<-query attribute='now'->)"
columns name { title "Task" ${AlertColor} },
resources { width 200 ${AlertColor}
start ${projectstart} end ${projectend} },
alerttrend { title "Trend" ${AlertColor} },
journalmessages { width 260 ${AlertColor} }
hidetask ~hasalert(0)
sorttasks alert.down
period %{${now} - 1w} +1w
  }
  taskreport completed "" {
headline "Already completed tasks"
  }
  taskreport ongoing "" {
headline "Ongoing tasks"
  }
  taskreport future "" {
headline "Future tasks"
  }
}

# A list of tasks showing the resources assigned to each task.
taskreport development "" {
  headline "Development - Resource Allocation Report"
  columns hierarchindex, name, start, end, effort { title "Work" },
  duration, chart { ${TaskTip} scale day width 500 }
  timeformat "%Y-%m-%d"
  hideresource ~(isleaf() & isleaf_())
  sortresources name.up
}

# A list of all tasks with the percentage completed for each task
taskreport deliveries "" {
  headline "Project Deliverables"
  columns hierarchindex, name, start, end, note { width 150 }, complete,
  chart { ${TaskTip} }

  hideresource 1
}
# A list of all employees with their contact details.
resourcereport contactList "" {
  headline "Contact list and duty plan"
  columns name,
  email { celltext 1 "[mailto:<-email-> <-email->]" },
  chart { scale day }
  hideresource ~isleaf()
  sortresources name.up
  hidetask 1
}

# A graph showing resource allocation. It identifies whether each
# resource is under- or over-allocated for.
resourcereport resourceGraph "" {
  headline "Resource Allocation Graph"
  columns no, name, effort, rate, weekly { ${TaskTi

[Orgmode] Antwort: Re: org-babel: feature-request: allow table-cells to be passed as strings

2010-11-04 Thread marc-oliver . ihm
Hello Eric,


Thanx for coming back on me !

In fact I have found this problem when trying to use calc with babel.
And yes, I agree, using calc for parsing will probably solve this problem.

In fact I am quite excited about the plans for adding calc as a new 
language to babel. It will be a great tool and toy !


with kind regards, Marc-Oliver Ihm





"Eric Schulte"  
03.11.2010 21:12

An
Marc-Oliver Ihm 
Kopie
emacs-orgmode@gnu.org
Thema
Re: org-babel: feature-request: allow table-cells to be passed as strings





Hi Marc,

Sorry to stall this thread for so long.

Now that I've worked some with Calc it seems that it provides a mature
library of working with large numbers.  My new hope is to convert Babel
to using Calc for all of its numerical string parsing and printing.
That should solve your dilemma in the most natural way.

Does anyone foresee any problems in this potential approach?

Thanks -- Eric

Marc-Oliver Ihm  writes:

> Hello,
>
> This would be such an example. The Input table contains some numbers,
> the last of them larger than allowed for an integer.
>
> As the result table show, the last one is converted to float thereby
> using some precision.
>
> I would like to see them all as strings.
>
> with kind regards, Marc-Oliver Ihm
>
>
> #+tblname: numbers
>
> |   1 |
> |   2 |
> |  12 |
> |  45 |
> | 166 |
> |12567890 |
> | 23123128237198327938999 |
>
>
> #+begin_src emacs-lisp :var numbers=numbers
> (mapcar
>  (lambda (line)
>  (let ((number (car line)))
>(list number (type-of number))
>)
>  )
>numbers)
> #+end_src
>
> #+results:
> |  1 | integer |
> |  2 | integer |
> | 12 | integer |
> | 45 | integer |
> |166 | integer |
> |   12567890 | integer |
> | 2.3123128237198328e+26 | float   |
>
>
>
>
> Am 04.10.2010 15:30, schrieb Eric Schulte:
>> Hi,
>>
>> Could you send an example of the contents of such a cell, and what it 
is
>> converted to?  Maybe it will be possible to improve the parsing of
>> numerals in Babel s.t. we don't lose precision in these cases.
>>
>> Thanks -- Eric
>>
>> Marc-Oliver Ihm  writes:
>>
>>> Hello !
>>>
>>> Currently org-babel, when passing a table as input to a
>>> source-code-block, behaves like this:
>>> If the cell looks like a number, it will be converted to an integer or 
a
>>> float. Otherwise the cell-content is passed unconverted as a string.
>>>
>>> Now, dealing with very large numbers (which I want to process with
>>> calc), I found this behavior annoying, because babel converts my large
>>> numbers to float, loosing precision in the process.
>>>
>>> Now my request would be, to have a switch (maybe as a header argument)
>>> which would tell babel to pass all cells as unconverted strings.
>>>
>>> I have checked the documentation and the sources and have not been 
able
>>> to find such a switch.
>>>
>>>
>>> with kind regards, Marc-Oliver Ihm
>>>
>>>
>>> ___
>>> 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
>>



Namensgeber des neuen Mainzer Fussballstadions 
Aktuelle Infos zur Coface Arena: www.coface-arena.de


Naming right sponsor of the new Mainzer football stadium 
Latest news on the Coface Arena: www.coface-arena.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


[Orgmode] [PATCH] org-velocity and org-remember

2010-11-04 Thread Paul M. Rodriguez

This patch supports org-capture (with fallback to org-remember) for
org-velocity.  It also effects some internal changes, principally due to
the use of `Electric-command-loop' to replace an expedient equivalent.

diff --git a/contrib/lisp/org-velocity.el b/contrib/lisp/org-velocity.el
index 3e7453b..2a1f41b 100644
--- a/contrib/lisp/org-velocity.el
+++ b/contrib/lisp/org-velocity.el
@@ -4,7 +4,7 @@
 
 ;; Author: Paul M. Rodriguez 
 ;; Created: 2010-05-05
-;; Version: 2.1
+;; Version: 2.2
 
 ;; This file is not part of GNU Emacs.
 
@@ -59,23 +59,23 @@
 ;; but probably more useful for a keyboard-driven interface.
 
 ;; If the search does not occur in the file the user is offered a
-;; choice to create a new heading named with the search.  When
-;; org-remember is loaded, or the user customizes
-;; `org-velocity-use-remember', then org-remember is used to insert
-;; the new heading.  Otherwise the user is simply taken to a new
-;; heading at the end of the file.
+;; choice to create a new heading named with the search.  Org-Velocity
+;; will use `org-capture' or `org-remember' if they are loaded,
+;; preferring `org-capture'.  Otherwise the user is simply taken to a
+;; new heading at the end of the file.
 
 ;; Thanks to Richard Riley, Carsten Dominik, and Bastien Guerry for
 ;; their suggestions.
 
 ;;; Usage:
-;;; (require 'org-velocity)
-;;; (setq org-velocity-bucket (concat org-directory "/bucket.org"))
-;;; (global-set-key (kbd "C-c v") 'org-velocity-read)
+;; (require 'org-velocity)
+;; (setq org-velocity-bucket (concat org-directory "/bucket.org"))
+;; (global-set-key (kbd "C-c v") 'org-velocity-read)
 
 ;;; Code:
 (require 'org)
 (require 'button)
+(require 'electric)
 (eval-when-compile (require 'cl))
 
 (defgroup org-velocity nil
@@ -99,18 +99,6 @@
   :group 'org-velocity
   :type 'boolean)
 
-(defcustom org-velocity-use-remember (featurep 'org-remember)
-  "Use Org-remember or just visit the file?"
-  :group 'org-velocity
-  :type 'boolean)
-
-(defcustom org-velocity-remember-method 'bottom
-  "Where in files should `org-remember' record new entries?"
-  :group 'org-velocity
-  :type '(choice (const :tag "Add at bottom" bottom)
-		 (const :tag "Add at top" top)
-		 (const :tag "Use date tree" date-tree)))
-
 (defcustom org-velocity-edit-indirectly t
   "Edit entries in an indirect buffer or just visit the file?"
   :group 'org-velocity
@@ -124,17 +112,19 @@
 	  (const :tag "Match any word" any)
 	  (const :tag "Match all words" all)))
 
+(defcustom org-velocity-create-method 'capture
+  "Prefer `org-capture', `org-remember', or neither?"
+  :group 'org-velocity
+  :type '(choice
+	  (const :tag "Prefer capture > remember > default." capture)
+	  (const :tag "Prefer remember > default." remember)
+	  (const :tag "Edit in buffer." buffer)))
+
 (defcustom org-velocity-allow-regexps nil
   "Allow searches to use regular expressions?"
   :group 'org-velocity
   :type 'boolean)
 
-(defvar org-velocity-index
-  (nconc (number-sequence 49 57) 	;numbers
-	 (number-sequence 97 122)	;lowercase letters
-	 (number-sequence 65 90))	;uppercase letters
-  "List of chars for indexing results.")
-
 (defstruct (org-velocity-heading
 	(:constructor org-velocity-make-heading)
 	(:type list))
@@ -142,6 +132,13 @@
   (name (substring-no-properties
 	 (org-get-heading
 
+(defconst org-velocity-index
+  (eval-when-compile
+   (nconc (number-sequence 49 57) 	;numbers
+	  (number-sequence 97 122)	;lowercase letters
+	  (number-sequence 65 90)))	;uppercase letters
+  "List of chars for indexing results.")
+
 (defun org-velocity-use-file ()
   "Return the proper file for Org-Velocity to search.
 If `org-velocity-always-use-bucket' is t, use bucket file; complain
@@ -212,7 +209,12 @@ If there is no last heading, return nil."
   (goto-char (point-min))
   (add-hook 'org-ctrl-c-ctrl-c-hook 'org-velocity-dismiss nil t))
 (pop-to-buffer buffer)
-(message "%s" "Use C-c C-c to save changes.")))
+(set (make-local-variable 'header-line-format)
+	 (format "%s Use C-c C-c to finish."
+		 (abbreviate-file-name
+		  (buffer-file-name
+		   (marker-buffer
+		(org-velocity-heading-marker heading
 
 (defun org-velocity-dismiss ()
   "Save current entry and close indirect buffer."
@@ -222,21 +224,14 @@ If there is no last heading, return nil."
 
 (defun org-velocity-buttonize (heading)
   "Insert HEADING as a text button."
-  (insert (format "#%c " (nth (1- (line-number-at-pos)) org-velocity-index)))
-  (insert-text-button
-   (org-velocity-heading-name heading)
-   'action (org-velocity-make-button-action heading))
+  (insert (format "#%c " (nth (1- (line-number-at-pos))
+			  org-velocity-index)))
+  (let ((action (org-velocity-make-button-action heading)))
+   (insert-text-button
+(org-velocity-heading-name heading)
+'action action))
   (newline))
 
-(defun org-velocity-insert-heading (heading)
-  "Add a new heading named HEADING."
-  (with-current-buffer (org-velocity-bucket-buffer)

[Orgmode] Re: Enhancing the Org/Gnus experience

2010-11-04 Thread Jambunathan K




> I've just singed the FSF papers. 

You are not supposed to do this. How will your changes get in to Emacs
then?

Hint: http://www.merriam-webster.com/dictionary/singed

Jambunathan K.




___
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] org-link-escape and (wrong-type-argument stringp nil)

2010-11-04 Thread David Maus
Okay, back to link escaping.

What this is about:

Current implementation of percent escaping URIs uses a whitelist
approach, e.g. only percent escapes characters that are in
`org-link-escape-chars' or in a user supplied list.  This is a problem
because using this function requires knowledge about all possible
characters that could occur in a URI -- and URIs are limited to plain
ASCII, meaning a call to the function must list literally all possible
characters and their escapings to get a properly percent escaped
string.

To solve this problem the behavior of the function is changed to
percent escape every character that is an ASCII controll character or
not an ASCII character.  Subsequently the unescaping function is
changed accordingly to handle percent encoded multibyte unicode
characters.

1/ I did some testing with the new proposed org-link-escape and the
modified `org-protocol-unhex-string': Create a random string with
ASCII and multibyte unicode characters, randomly taken from
(ucs-names); perform escape-unescape; compare the result with the
original string.  Works perfect.  Testing randomly created string with
old escaping of non-ascii strings is on the list.

2/ Of course there could still be the problem, that a user had created
a sequence of old escapes that the new unescaping function will
interpret wrongly.  Not sure how likely this is, but in theory this
could happen.  Personally I think we should risk breaking peoples'
links in this way.

3/ I highly suggest changing the syntax of `org-link-escape-chars'.
Currently it is a list of cons with the character in car and the
replacement string in cdr.  Using such a table in escaping is easy
(assq char table), but in the unescaping process it might get tricky.

Moreover if the function should do percent escaping, the escpae
sequence is already determined by the string to replace.  The new
syntax would be simply a list of characters to escape in addition to
the rule mentioned above (< 32 and > 126).

This would break compatibility with functions that have used
org-link-escape/unescape for something else than percent escaping
(e.g. replace ] by %FF and not %5D and such).  But this again is
bearable: Although it the docstring talks about escaping things that
are problematic, the only way to do such escaping in a standardized
way is percent escaping.

4/ If all agree that breaking backward incompatibility in the case
mentioned above (or did I forgot one?) is bearable, I would go ahead
and perform the necessary changes:

  1. Use the new algorithm in `org-link-escape'
  2. Modify Syntax of `org-link-escape-chars'
  3. Issue a warning if someone calls `org-link-escape' with a table
 of the old syntax.
  4. Move the unescaping functions from org-protocol.el to org.el and
 rename them.
  5. Declare `org-protocol-unhex-string' and
 `org-protocol-unhex-compound' obsolete (make-obsolete).
  6. Drop a message to the list informing about these changes.
  7. Wait some months and purge the obsolete functions.

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


pgpGl4ur84NSO.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: [CEDET-devel] Org-mode

2010-11-04 Thread Eric Schulte
Jambunathan K  writes:

> The main challenge with breaking up org-html.el first and then say
> plugging in org-odt.el to that later is:
>
> 1. Code-churn that it would create in org-html.el
> 2. Proving that *nothing* in HTML export actually breaks.
>
> Carsten would like to avoid (1) - he might want to go with one bit
> commit and (naturally) shift the responsibility of (2) to the committer.
>
> So a committer has one more thing he needs to be concerned about.
>
> I do see some regression tests for html exporter and I am unsure how
> *complete* they are. What would have really made things easier is the
> following:
>

I don't believe that there are any existing unit tests for the org html
exporter, however writing a suite of such tests seems like the best
first step in this project.  It would allow sanity checks throughout the
implementation of the parser, and would give some confidence in the
parsers functionality before merging back into the core.

Org-mode has a test suite based around ERT, which should facilitate this
process.  Look in the testing directory of the Org-mode repository.

>
> 1. One Org file in repo that has *all* the Org-specific markups.

Yes, either one large file or many smaller files.  For the Babel tests
we use one large file with one subtree per test s.t. it is easy for a
specific test to jump to the appropriate section of the file.

> 
> 2. One HTML file that is a exported from this Org file which is
> re-checked in as and when the org-html.el changes it's markups.
>
> Everytime something changes in the exporter one just diffs the *new*
> HTML file with the one in the repo and be able to say with assured
> confidence that something has improved or broken.
>

I think a series of feature specific unit tests would provide more
granular feedback, would allow incremental development, and would allow
differences in non-essential properties like white-space.

Best -- Eric

___
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: [CEDET-devel] Org-mode

2010-11-04 Thread Lennart Borgman
On Thu, Nov 4, 2010 at 7:04 PM, Jambunathan K  wrote:
>>
>> Then perhaps the best we can do now is starting by breaking up
>> org-hml.el in the parser and a callback function for writing the
>> export. After that we can add new exports by adding new callback
>> functions.
>
> The suggested refactoring could be a side-effect of org-odt.el that is
> shaping up from org-html.el. Note that the refactoring happens or
> atleast is visible in org-odt.el (which I control) and *not* in
> org-html.el (which is in the field)
>
> The main challenge with breaking up org-html.el first and then say
> plugging in org-odt.el to that later is:
>
> 1. Code-churn that it would create in org-html.el
> 2. Proving that *nothing* in HTML export actually breaks.

I am playing a bit with refactoring. A main issue might be how refined
the callback function should be. Not sure what I think yet, but I will
come back with an example.

___
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: [CEDET-devel] Org-mode

2010-11-04 Thread Jambunathan K
Lennart Borgman  writes:

> On Thu, Nov 4, 2010 at 3:37 PM, Carsten Dominik
>  wrote:
>>
>> On Nov 3, 2010, at 1:34 PM, Lennart Borgman wrote:
>>
>>> On Wed, Nov 3, 2010 at 1:15 PM, Eric M. Ludlam 
>>> wrote:

 On 10/30/2010 03:45 AM, Konrad Scorciapino wrote:
>
> Hey!
>
> Is anybody working on Org-mode? My main interest is to build a parser to
> manipulate the nodes of the resulting tree and save them back. Tips on
> how to get started are also welcome.
>

 I know of no one doing that.  I don't know what org-mode's code
 structure is like, but I'd assume it already has a parser, and you could
 adapt the output to Semantic tag format.

 The HTML parser also handles arbitrary text so you could look in
 semantic-html to see what sort of things that  does.
>>>
>>> There are different exporters for org-mode.
>>>
>>> Currently we are trying to make an exporter to ODT files. I think a
>>> parser would come in handy.
>>
>>
>> org-html.el is probably the best starting point to make a complete parser.
>>  It does a very detailed analysis of the text.
>>
>> We should have built all the exporters on the same parser - unfortunately we
>> did not.  One of the hard to correct mistakes we made in early development.
>
> Then perhaps the best we can do now is starting by breaking up
> org-hml.el in the parser and a callback function for writing the
> export. After that we can add new exports by adding new callback
> functions.

The suggested refactoring could be a side-effect of org-odt.el that is
shaping up from org-html.el. Note that the refactoring happens or
atleast is visible in org-odt.el (which I control) and *not* in
org-html.el (which is in the field)

The main challenge with breaking up org-html.el first and then say
plugging in org-odt.el to that later is:

1. Code-churn that it would create in org-html.el
2. Proving that *nothing* in HTML export actually breaks.

Carsten would like to avoid (1) - he might want to go with one bit
commit and (naturally) shift the responsibility of (2) to the committer.

So a committer has one more thing he needs to be concerned about.

I do see some regression tests for html exporter and I am unsure how
*complete* they are. What would have really made things easier is the
following:

1. One Org file in repo that has *all* the Org-specific markups.
2. One HTML file that is a exported from this Org file which is
   re-checked in as and when the org-html.el changes it's markups.

Everytime something changes in the exporter one just diffs the *new*
HTML file with the one in the repo and be able to say with assured
confidence that something has improved or broken.

In some sense, test.org in my repo does this today:

- Base URL: http://repo.or.cz/w/org-mode/oo.git/blob_plain/HEAD
  Rel URL:  :/contrib/odt/files/test.org

What I believe I am recording here is that org-odt.el moves the Org
export engine in the "right" direction without me having to sell to
Carsten the need for a complete refactoring of org-html.

>From my experience, re-factoring is all good. But at the end of the day
if it is going to delay something useful or places overly much
responsibilities on regression and validation it is better avoided.

Then there is also this question of how many more export formats that
Org could be possibly have in the future ... If there aren'y many that
we foresee maybe the prudent thing to do is to be not overly much
concerned about refactoring the parsing engine.

Lennart 

Btw, can you summarize what UseCase in cedet-devel triggered this line
of thought ...

Just my 2 cents here. Sorry if I sound too overboard or venturing in to
the speculative realm.

Jambunathan K.








___
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: [patch] two bugs: one with comments and with exporting inline tasks

2010-11-04 Thread Nicolas Goaziou
Hello,
> Sébastien Vauban writes:

> Eric S Fraga wrote:
>> In terms of what to actually do with inline tasks on export, what I
>> would love to see would be to have an inline task converted to a
>> footnote with a marginpar note, along the lines of:
>> 
>> #+begin_src latex
>> \footnote{\textbf{<>}: <> text>>}\marginpar{\fbox{\thefootnote}}
>> #+end_src
>> 
>> i.e. where <> would be replaced by "TODO figure out
>> why this doesn't work" and <> by all the text between
>> the ** lines. This is roughly the type of construct I use when
>> I annotate latex documents directly. What do you think?

> ... that we need this.

What about creating a customizable alist, namely
org-inlinetask-export-templates, containing exporters paired with
format strings?

For example, it could contain :

'((html . "<@span class=\"%s %s\" %s@")
  (latex . "\\footnote{\\textbf{%s %s}: %s}\\marginpar{\\fbox{\\thefootnote}}"))

where first %s is TODO, second %s is heading, and third one is
content.

Default values would be whatever is used right now.

Any comments?

Regards,

-- Nicolas

___
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] [BABEL] C-v C-v M-x?

2010-11-04 Thread Jambunathan K

>> Is there a C-c C-v M-x? Can this be made available. I will find it
>> useful.
>>
> What behavior would you want this bound to?

C-c C-v C-x does this today:

#+begin_src emacs-lisp
  (org-babel-do-key-sequence-in-edit-buffer KEY)
#+end_src

In similar I vein, I would like C-c C-v M-x to do

#+begin_src emacs-lisp
  (org-babel-do-command-in-edit-buffer INTERACTIVE-COMMAND)
#+end_src

To be specific, I have a custom interactive function in my .emacs, that
cleans up or prettifies an XML buffer that is part of an OpenOffice file
which is invoked with M-x my-xml-cleanup in an XML buffer.

It basically converts "ugly / non-readable / long" xml stuff of the form

#+begin_src xml
   blah blah blah 
#+end_src

to

#+begin_src xml
  
blah blah blah 
  
#+end_src

Typical way I go about this is
1. C-c '
2. M-x my-xml-cleanup (in src buffer)
3. C-c '

I want all of 1,2,3 to be collapsed in to a single sequence,
- C-c C-v M-x my-xml-cleanup

Today if I have to get the above behaviour I would be required to bind
my-xml-cleanup to be bound to a key-sequence which I would like to
avoid.

Jambunathan K.


___
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: [patch] two bugs: one with comments and with exporting inline tasks

2010-11-04 Thread Sébastien Vauban
Eric,

Eric S Fraga wrote:
> In terms of what to actually do with inline tasks on export, what I would
> love to see would be to have an inline task converted to a footnote with a
> marginpar note, along the lines of:
>
> #+begin_src org
> * TODO figure out why this doesn't work
> Some text in the body of the inline task.
> * END
> #+end_src
>
> being converted to, say:
>
> #+begin_src latex
> \footnote{\textbf{<>}: < text>>}\marginpar{\fbox{\thefootnote}}
> #+end_src
>
> i.e. where <> would be replaced by "TODO figure out why this
> doesn't work" and <> by all the text between the ** lines.
> This is roughly the type of construct I use when I annotate latex documents
> directly. What do you think?

... that we need this.


> We could make this a two argument latex function:
>
> #+begin_src latex
> \newcommand{\processinlinetask}[2]{%
> \footnote{\textbf{#1}: #2}\marginpar{\fbox{\thefootnote}}%
> }
> #+end_src
>
> which is defined in the org latex preamble and which a user could
> customise through =\renewcommand= if desired (or through an org emacs
> variable, of course).  It would be invoked as
>
> #+begin_src latex
> \processinlinetask{<>}{<>}
> #+end_src
>
> We'd have to escape {}s maybe and it could be
> somewhat fragile if there are multiple paragraphs in the inline body
> text...
>
> For HTML, you could convert to end notes maybe or some type of box
> inline with the text... (well, customisable by the user through CSS I
> guess)
>
> Thanks,
> eric

In exactly the same line of sight, I'm using the following already for (pure)
LaTeX -- I mean, not yet integrated within Org --:

#+begin_src latex
% must be loaded after url and hyperref
\RequirePackage[colorinlistoftodos]{todonotes}% (not in medium TeX Live 
installation)
\renewcomman...@todonotes@backgroundcolor}{my-color-brand}
\renewcomman...@todonotes@linecolor}{my-color-brand}

\newcounter{mycomment}
\newcommand{\mycomment}[2][]{% initials of the author + note in the margin
\...@mycomment
\refstepcounter{mycomment}
{\setstretch{0.7}% spacing
\todo[color={red!100!green!33},size=\small]{%
\textbf{Comment [\uppercase{#1}\themycomment]:}~#2}}
\else
\relax
\fi
}

\newcommand{\mytodo}[2][]{% title in bold + note
\refstepcounter{mycomment}
{\todo[inline,color=blue!20]{
\textbf{TODO [\uppercase{#1}\themycomment]:}~#2}}}
#+end_src

This is using the package =todonotes= which is, euh, excellent!  Just have a
look, and you see that, with the above chunk of code, we can easily manage:

- mycomment :: margin notes (more for a comment, IMHO) and
- mytodo :: inlined notes (more for "inline tasks", IMHO).

Of course, this should now be automagically used by Org, as you do explain
above.

Best regards,
  Seb

-- 
Sébastien Vauban


___
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: Enhancing the Org/Gnus experience

2010-11-04 Thread Tassilo Horn
Eric S Fraga  writes:

Hi Eric,

>> if it is working, then the following code block should be fontified as
>> if in an Org-mode buffer
>>
>> #+begin_src emacs-lisp
>>   (message "is it working?")
>> #+end_src
>
> Definitely not working then!  This comes out as simple text in gnus
> and doesn't look at all like it would in an org buffer for me.

Hm, for me it's shown the same as verbatim blocks or stuff like

--8<---cut here---start->8---
this
--8<---cut here---end--->8---

with the difference that the markers are still visible, which is a good
thing, cause else the language wouldn't be visible.  I've added only

--8<---cut here---start->8---
;; Highlight org-babel source code blocks and results like verbatim marks.
(add-to-list 'mm-uu-type-alist
 '(org-babel-block
   "^#\\+begin_src"
   "^#\\+end_src"
   (lambda nil
 (mm-uu-verbatim-marks-extract 0 0))
   nil))

(add-to-list 'mm-uu-type-alist
 '(org-babel-results
   "^#\\+results:"
   "\n\n"
   (lambda nil
 (mm-uu-verbatim-marks-extract 0 0))
   nil))

(mm-uu-configure)
--8<---cut here---end--->8---

to my ~/.gnus.el.

I use the gnus version from its git repository, but that shouldn't make
a difference.

Bye,
Tassilo


___
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: Possible Calc support for Org-Babel?

2010-11-04 Thread Eric Schulte
Sébastien Vauban  writes:

> Eric,
>
> "Eric Schulte" wrote:
>> Sébastien Vauban  writes:
>>
>>> There must be something stupid in my config, but even a simple one like the
>>> following does not work for me:
>>>
>>> #+begin_src calc
>>> 1
>>> 2
>>> '+
>>> #+end_src
>>>
>>> Error is:
>>>
>>> #+begin_src emacs-lisp
>>> executing Calc code block...
>>> calc-push-list: Symbol's value as variable is void: calc-command-flags
>>> #+end_src
>>>
>>> Though, I confirm you that I have loaded both =calc= and =ob-calc=... Any 
>>> idea?
>>
>> That variable is defined in my version of calc.el (distributed with the
>> latest version of Emacs from git).  Is that variable not defined in your
>> calc.el file?  Maybe the solution is to upgrade your calc.
>
> I have "GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600) of 2009-10-14 on
> LENNART-69DE564 (patched)" (known as EmacsW32, latest version that Lennart put
> online).
>
> Library is file "c:/Program Files/Emacs/emacs/lisp/calc/calc.elc", and I see
> (on line 1544 of the =.el= file):
>
> #+begin_src emacs-lisp
> (defvar calc-command-flags)
> #+end_src
>
> ELC seems well compiled from that EL, as times report:
>
>   -rw-rw-rw-  1 Fabrice Aucun 138805 2009-10-14 02:45 calc.el
>   -rw-rw-rw-  1 Fabrice Aucun 103841 2009-10-14 02:46 calc.elc
>
> Setting it myself to nil -- I have no idea why I must do this! -- :
>
> #+begin_src emacs-lisp
> (setq calc-command-flags nil)
> #+end_src
>

Hmm, that is weird.  I guess you could search for the text variable name
in your calc.el file, but I don't know how that would help you.  Since
I'm requiring calc from ob-calc.el, and I am only calling existing calc
functions I'm going to treat this as a calc bug (i.e. beyond my scope).

>
> has the effect that many examples now work.
>
> Not all, though. For example,
>
> #+begin_src calc
> 2*e
> #+end_src
>
> returns =nil=:
>
> #+results:
> : nil
>

That is the only example I gave that uses a calc default variable.
Maybe this is also a difference in our calc implementations?

Best -- Eric

>
> Best regards,
>   Seb

___
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] [patch] two bugs: one with comments and with exporting inline tasks

2010-11-04 Thread Eric S Fraga
Nicolas Goaziou  writes:

>> Arggh! Not sure why this is happening.
>
> You need to (require 'org-inlinetask) before trying to export.

d'oh.  of course.  

doing this now makes exporting work fine, with emacs -Q and loading the
right org modules, of course.

Annoyingly, now it works just fine with my configuration.  Maybe
something left over in the existing emacs that I have been using all
day...  sorry for the noise!

In terms of what to actually do with inline tasks on export, what I
would love to see would be to have an inline task converted to a
footnote with a marginpar note, along the lines of:

#+begin_src org
* TODO figure out why this doesn't work
Some text in the body of the inline task.
* END
#+end_src

being converted to, say:

#+begin_src latex
\footnote{\textbf{<>}: <>}\marginpar{\fbox{\thefootnote}}
#+end_src

i.e. where <> would be replaced by "TODO figure out why
this doesn't work" and <> by all the text between the **
lines.  This is roughly the type of construct I use when I annotate
latex documents directly.  What do you think?  

We could make this a two argument latex function:

#+begin_src latex
\newcommand{\processinlinetask}[2]{%
\footnote{\textbf{#1}: #2}\marginpar{\fbox{\thefootnote}}%
}
#+end_src

which is defined in the org latex preamble and which a user could
customise through =\renewcommand= if desired (or through an org emacs
variable, of course).  It would be invoked as

#+begin_src latex
\processinlinetask{<>}{<>}
#+end_src

We'd have to escape {}s maybe and it could be
somewhat fragile if there are multiple paragraphs in the inline body
text...

For HTML, you could convert to end notes maybe or some type of box
inline with the text... (well, customisable by the user through CSS I
guess)

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.18.g3818.dirty)

___
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 text color highlights fails

2010-11-04 Thread Marvin Doyley
I see,

Does anybody know how to change text color in the Org buffer ?

for what it is worth I currently use the following for marking up my
students latex file

#+Latex_header:\newcommand{\insertt}[1]{\textcolor{blue}{#1} } ; Insert
the following text
#+Latex_header:\newcommand{\delete}[1]{\sout{\textcolor{red}{#1}} }; delete
the following

thanks
M

On Thu, Nov 4, 2010 at 11:29 AM, Christian Moe wrote:

> Hi,
>
> You are not doing anything wrong.
>
> The below solution only changes color in exported text (HTML, Latex).
>
> It doesn't put different faces on different link types in the Org buffer.
> So it's not a great help in editing.
>
> Yours,
> Christian Moe
>
>
> On 11/4/10 4:13 PM, Marvin Doyley wrote:
>
>> Hi there,
>>
>> There have been some useful discussions on changing text color in org
>> mode, a very useful feature when editing manuscripts.
>> Anyway, I tried the following function without any success. No change
>> in color, it just behave like a normal link (i.e, underlined). Could
>> someone shed some light on what I am doing wrong ?
>>
>> Cheers,
>>
>> M
>>
>> ;; org-mode color
>> (org-add-link-type
>>  "color"  nil
>>  (lambda (path desc format)p
>>   (cond
>>((eq format'html)
>> (format"%s"  path desc))
>>
>>((eq format'latex)
>> (format"{\\color{%s}%s}"  path desc)
>> ;; org-mode highlight
>> (org-add-link-type
>>  "hl"  nil
>>  (lambda (path desc format)
>>   (cond
>>((eq format'html)
>>
>> (format"%s"  path desc))
>>((eq format'latex)
>> (format"\\colorbox{%s}{%s}"  path desc) ;; require
>> \usepackage{color}
>>
>>
>> Examples:
>> [[color:blue][test this out]]
>> [[hl:yellow][highlighted text]]
>>
>>
>>
>>
>> ___
>> 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
>>
>
>
> --
>
> Christian Moe
> E-mail:  m...@christianmoe.com
> Website: http://christianmoe.com
>
>
___
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: Possible Calc support for Org-Babel?

2010-11-04 Thread Sébastien Vauban
Eric,

"Eric Schulte" wrote:
> Sébastien Vauban  writes:
>
>> There must be something stupid in my config, but even a simple one like the
>> following does not work for me:
>>
>> #+begin_src calc
>> 1
>> 2
>> '+
>> #+end_src
>>
>> Error is:
>>
>> #+begin_src emacs-lisp
>> executing Calc code block...
>> calc-push-list: Symbol's value as variable is void: calc-command-flags
>> #+end_src
>>
>> Though, I confirm you that I have loaded both =calc= and =ob-calc=... Any 
>> idea?
>
> That variable is defined in my version of calc.el (distributed with the
> latest version of Emacs from git).  Is that variable not defined in your
> calc.el file?  Maybe the solution is to upgrade your calc.

I have "GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600) of 2009-10-14 on
LENNART-69DE564 (patched)" (known as EmacsW32, latest version that Lennart put
online).

Library is file "c:/Program Files/Emacs/emacs/lisp/calc/calc.elc", and I see
(on line 1544 of the =.el= file):

#+begin_src emacs-lisp
(defvar calc-command-flags)
#+end_src

ELC seems well compiled from that EL, as times report:

--8<---cut here---start->8---
  -rw-rw-rw-  1 Fabrice Aucun 138805 2009-10-14 02:45 calc.el
  -rw-rw-rw-  1 Fabrice Aucun 103841 2009-10-14 02:46 calc.elc
--8<---cut here---end--->8---

Setting it myself to nil -- I have no idea why I must do this! -- :

#+begin_src emacs-lisp
(setq calc-command-flags nil)
#+end_src

has the effect that many examples now work.

Not all, though. For example,

#+begin_src calc
2*e
#+end_src

returns =nil=:

#+results:
: nil

Best regards,
  Seb

-- 
Sébastien Vauban


___
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] [Babel] detangle

2010-11-04 Thread Eric S Fraga
"Eric Schulte"  writes:

> Eric S Fraga  writes:
>
>> "Eric Schulte"  writes:
>>
>>> Hi Eric,
>>>
>>> The bug you mentioned should have been fixed by yesterday's commit
>>>
>>> ,[c6565eaa43d398f6771edd59c2bfe7ca54e4a93e]
>>> | commit c6565eaa43d398f6771edd59c2bfe7ca54e4a93e
>>> | Author: Eric Schulte 
>>> | Date:   Fri Oct 29 01:37:28 2010 -0600
>>> |
>>> | fixed typos in tangle comment link format strings
>>> |
>>> | * lisp/ob-tangle.el (org-babel-tangle-comment-format-beg): fix typo
>>> |   (org-babel-tangle-comment-format-end): fix typo
>>> `
>>>
>>> is it possible you haven't "make clean && make"'d your repo since the
>>> last push?
>>
>> done all that and org-reload several times today but I had not
>> re-started emacs; oops!
>>
>> I just did so and everything seems to be working much better.  The jump
>> to org doesn't actually make the buffer appear but it does move me to
>> the right place in the org buffer.
>
> Hmm, I can't re-create that problem.  When I call ob-tangle-jump-to-org
> from a tangled source code file the parent Org-mode file is opened and
> receives focus.
>
> Best -- Eric

I wouldn't worry about this too much.  It's probably some combination of
the window manager I might have been using at the time (usually
ratpoison but sometimes fluxbox), I often have quite a
few emacs frames open simultaneously and the file was already being
visited in some frame or another!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.18.g3818)

___
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: Clock report (R from the agenda)

2010-11-04 Thread Sébastien Vauban
Hi Carsten,

Carsten Dominik wrote:
> you should now be able to use `C-u R' to achieve this.

OK.


> The lighter in the mode line will then switch from "Clock" to "Clock{}",

A detail: I'd eventually would have written "Clock/" to remind the "/" used
for applying the filters.

Another: could we append, in the modeline, the tags (or their abbrev, such as
"w" for "work") used in the filtered view?


> and the current tags filtering should apply to the clock table in the
> agenda.
>
> Please test this and report back.

Only minor thing: while the logged lines are correctly shown or made invisible
in the grid time, you need to refresh the table with "g" for it to display the
correct values.

Until that, what's above is not in sync' with what's in the table. Isn't there
a way to make this refresh happen automatically?

BTW,

>> : | File | L | Headline | Time|  |
>> : |--+---+--+-+--|
>> : |  |   | *Total time* | *10:15* |  |
>> : |--+---+--+-+--|
>> : | Clock-Report.org |   | *File time*  | *10:15* |  |
>> : | Clock-Report.org | 1 | Work | 8:09|  |
>> : | Clock-Report.org | 2 | Client A | | 3:23 |
>> : | Clock-Report.org | 2 | Client B | | 4:46 |
>> : | Clock-Report.org | 1 | Personal | 2:06|  |
>> : | Clock-Report.org | 2 | DONE Lunch with Mary | | 2:06 |

Nice new layout. Much clearer for the levels...

| File | Headline | Time|  |
|--+--+-+--|
|  | ALL *Total time* | *10:15* |  |
|--+--+-+--|
| Clock-Report.org | *File time*  | *10:15* |  |
|  | Work | 8:09|  |
|  | \__ Client A | | 3:23 |
|  | \__ Client B | | 4:46 |
|  | Personal | 2:06|  |
|  | \__ DONE Lunch with Mary | | 2:06 |

Thanks *a lot* for your time!
  Seb

-- 
Sébastien Vauban


___
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] [BUG] org-babel :session breaks returning things with python?

2010-11-04 Thread Christopher Allan Webber
Hello,

In the latest org master, I get this issue:

#+BEGIN_SRC python
return 33
#+END_SRC

#+results:
: 33

#+BEGIN_SRC python :session
return 33
#+END_SRC

#+results:
: org_babel_python_eoe

Not really sure what's happening, but I'm seeing inside of *Python*:

: >>> return 33
: 
: open('/tmp/babel-283184et/python-28318XQy', 'w').write(str(_))
: 
: 
: 'org_babel_python_eoe'
:   File "", line 1
: SyntaxError: 'return' outside function
: >>> >>> >>> Traceback (most recent call last):
:   File "", line 1, in 
: NameError: name '_' is not defined
: >>> >>> >>> 'org_babel_python_eoe'
: >>> 

___
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: [CEDET-devel] Org-mode

2010-11-04 Thread Lennart Borgman
On Thu, Nov 4, 2010 at 3:37 PM, Carsten Dominik
 wrote:
>
> On Nov 3, 2010, at 1:34 PM, Lennart Borgman wrote:
>
>> On Wed, Nov 3, 2010 at 1:15 PM, Eric M. Ludlam 
>> wrote:
>>>
>>> On 10/30/2010 03:45 AM, Konrad Scorciapino wrote:

 Hey!

 Is anybody working on Org-mode? My main interest is to build a parser to
 manipulate the nodes of the resulting tree and save them back. Tips on
 how to get started are also welcome.

>>>
>>> I know of no one doing that.  I don't know what org-mode's code
>>> structure is like, but I'd assume it already has a parser, and you could
>>> adapt the output to Semantic tag format.
>>>
>>> The HTML parser also handles arbitrary text so you could look in
>>> semantic-html to see what sort of things that  does.
>>
>> There are different exporters for org-mode.
>>
>> Currently we are trying to make an exporter to ODT files. I think a
>> parser would come in handy.
>
>
> org-html.el is probably the best starting point to make a complete parser.
>  It does a very detailed analysis of the text.
>
> We should have built all the exporters on the same parser - unfortunately we
> did not.  One of the hard to correct mistakes we made in early development.

Then perhaps the best we can do now is starting by breaking up
org-hml.el in the parser and a callback function for writing the
export. After that we can add new exports by adding new callback
functions.

___
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: [CEDET-devel] Org-mode

2010-11-04 Thread Carsten Dominik


On Nov 4, 2010, at 4:45 PM, Lennart Borgman wrote:


On Thu, Nov 4, 2010 at 3:37 PM, Carsten Dominik
 wrote:


On Nov 3, 2010, at 1:34 PM, Lennart Borgman wrote:

On Wed, Nov 3, 2010 at 1:15 PM, Eric M. Ludlam >

wrote:


On 10/30/2010 03:45 AM, Konrad Scorciapino wrote:


Hey!

Is anybody working on Org-mode? My main interest is to build a  
parser to
manipulate the nodes of the resulting tree and save them back.  
Tips on

how to get started are also welcome.



I know of no one doing that.  I don't know what org-mode's code
structure is like, but I'd assume it already has a parser, and  
you could

adapt the output to Semantic tag format.

The HTML parser also handles arbitrary text so you could look in
semantic-html to see what sort of things that  does.


There are different exporters for org-mode.

Currently we are trying to make an exporter to ODT files. I think a
parser would come in handy.



org-html.el is probably the best starting point to make a complete  
parser.

 It does a very detailed analysis of the text.

We should have built all the exporters on the same parser -  
unfortunately we
did not.  One of the hard to correct mistakes we made in early  
development.


Then perhaps the best we can do now is starting by breaking up
org-hml.el in the parser and a callback function for writing the
export. After that we can add new exports by adding new callback
functions.


Be my guest.

- 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


[Orgmode] Re: [Babel] Marker does not point anywhere (when session buffer needs to be created)

2010-11-04 Thread Sébastien Vauban
HI Eric,

"Eric Schulte" wrote:
> Sébastien Vauban  writes:
>> * Marker does not point anywhere
>>
>> Executing the following:
>>
>> #+begin_src sh :session NoSuchSessionYet
>> cd ~
>> ls *.txt
>> #+end_src
>>
>> outputs this in *Messages*:
>>
>> : executing Sh code block...
>> : think it is Cygwin...
>> : ~ 
>> : ansi-color-process-output: Marker does not point anywhere
>>
>> when executed for the *first* time.
>
> This "mark doesn't point anywhere" error is common across a bunch of
> sessions (ruby and python as well as shell). It's simply a matter of Babel
> trying to use the session before it is ready. I haven't found these errors
> to be an issue as all subsequent use of the session works as expected.

OK.


> I suppose that we should try to be more careful on session creation
> explicitly waiting until the buffer is ready, however this would add some
> degree of complication to the code...

Just a stupid idea: adding a sleep for 5 seconds or so, the first time the
session is created?  I wouldn't mind having to wait a bit on the first session
invocation, if I'm sure everything works better that way.


>> All subsequent executions don't exhibit this error (currently, they hang,
>> but that's another story).

The new posting of today refers to this issue.


>> My prompt is colored -- I need it, really!  *None* of the =ls= results are
>> colored, though (in this above case: =ls ~/*.txt=).
>>
>> Can we fix this somehow?

For now, I've given up using a colored shell, just to be sure I try to get sh
sessions working before adding complexity into the game.

So, now, my prompt is without any ANSI color spec, and completely mono-lined
(no extra \n), as you can see in the other post. Don't look at this for now --
except if you find it great to use! ;-)


>> Test the following, and you'll see you need a colored prompt as well, if not
>> yet convinced:
>>
>> #+begin_src sh :tangle .sva-bashrc
>> #*** Controlling the Prompt
>>
>> # define some colors
>> RED='\e[1;31m'
>> GREEN='\e[1;32m'
>> NO_COLOR='\e[0m'
>>
>> # my format of the prompt
>> function my_prompt_command ()
>> {
>> # colorful prompt, based on whether the previous command succeeded or not
>> if [[ $? -eq 0 ]]; then
>> HILIT=${GREEN}
>> else
>> HILIT=${RED}
>> fi
>>
>> # replace the $HOME prefix by ~ in the current directory
>> if [[ $HOME == ${PWD:0:${#HOME}} ]]; then
>> NEWPWD="~${PWD:${#HOME}}"
>> else
>> NEWPWD=$PWD
>> fi
>>
>> # how many characters of the $PWD should be kept
>> local pwd_max_length=15
>>
>> if [[ ${#NEWPWD} -gt $pwd_max_length ]]; then
>> local pwd_offset=$(( ${#NEWPWD} - $pwd_max_length ))
>> NEWPWD="...${NEWPWD:$pwd_offset:$pwd_max_length}"
>> fi
>>
>> # prompt character
>> if [[ $(whoami) = "root" ]]; then
>> local PROMPTCHAR="#"
>> else
>> local PROMPTCHAR=">"
>> fi
>>
>> case $TERM in
>> dumb)  # for Tramp?
>> setenv PS1 "[...@\h] ${NEWPWD}${PROMPTCHAR}"
>> ;;
>> *)
>> setenv PS1 "\n\[${hilit}\]...@\h] 
>> ${NEWPWD}${PROMPTCHAR}\[${NO_COLOR}\]"
>> ;;
>> esac
>> }
>>
>> # shell prompt
>> setenv PROMPT_COMMAND my_prompt_command
>> echo ""
>> #+end_src

Best regards,
  Seb

-- 
Sébastien Vauban


___
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: Possible Calc support for Org-Babel?

2010-11-04 Thread Eric Schulte
Sébastien Vauban  writes:

> There must be something stupid in my config, but even a simple one like the
> following does not work for me:
>
> #+begin_src calc
> 1
> 2
> '+
> #+end_src
>
> Error is:
>
> #+begin_src emacs-lisp
> executing Calc code block...
> calc-push-list: Symbol's value as variable is void: calc-command-flags
> #+end_src
>
> Though, I confirm you that I have loaded both =calc= and =ob-calc=... Any 
> idea?
>

That variable is defined in my version of calc.el (distributed with the
latest version of Emacs from git).  Is that variable not defined in your
calc.el file?  Maybe the solution is to upgrade your calc.

___
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] [Babel] detangle

2010-11-04 Thread Eric Schulte
Eric S Fraga  writes:

> "Eric Schulte"  writes:
>
>> Hi Eric,
>>
>> The bug you mentioned should have been fixed by yesterday's commit
>>
>> ,[c6565eaa43d398f6771edd59c2bfe7ca54e4a93e]
>> | commit c6565eaa43d398f6771edd59c2bfe7ca54e4a93e
>> | Author: Eric Schulte 
>> | Date:   Fri Oct 29 01:37:28 2010 -0600
>> |
>> | fixed typos in tangle comment link format strings
>> |
>> | * lisp/ob-tangle.el (org-babel-tangle-comment-format-beg): fix typo
>> |   (org-babel-tangle-comment-format-end): fix typo
>> `
>>
>> is it possible you haven't "make clean && make"'d your repo since the
>> last push?
>
> done all that and org-reload several times today but I had not
> re-started emacs; oops!
>
> I just did so and everything seems to be working much better.  The jump
> to org doesn't actually make the buffer appear but it does move me to
> the right place in the org buffer.

Hmm, I can't re-create that problem.  When I call ob-tangle-jump-to-org
from a tangled source code file the parent Org-mode file is opened and
receives focus.

Best -- Eric

> I haven't tried de-tangling yet.

___
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: Enhancing the Org/Gnus experience

2010-11-04 Thread Eric Schulte
Sébastien Vauban  writes:

>> Also, I currently have a list of >10 emails in my lists.babel folder
>> marked for followup that I simply haven't had time to address.
>
> I *really* can imagine. *If you don't mind*, I'll try to make a small list of
> the couple of requests for which you could give me little pieces of advice in
> order for me to go further.
>

a small list of quick questions would be great.  It's generally only the
questions that require serious thought and/or development/debugging that
I delay until I have time. -- Eric

___
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] [Babel] Marker does not point anywhere (when session buffer needs to be created)

2010-11-04 Thread Eric Schulte
Hi Seb,

This "mark doesn't point anywhere" error is common across a bunch of
sessions (ruby and python as well as shell).  It's simply a matter of
Babel trying to use the session before it is ready.  I haven't found
these errors to be an issue as all subsequent use of the session works
as expected.  I suppose that we should try to be more careful on session
creation explicitly waiting until the buffer is ready, however this
would add some degree of complication to the code...

Thanks -- Eric

Sébastien Vauban  writes:

> * Marker does not point anywhere
>
> Executing the following:
>
> #+begin_src sh :session NoSuchSessionYet
> cd ~
> ls *.txt
> #+end_src
>
> outputs this in *Messages*:
>
> : executing Sh code block...
> : think it is Cygwin...
> : ~ 
> : ansi-color-process-output: Marker does not point anywhere
>
> when executed for the *first* time. All subsequent executions don't exhibit
> this error (currently, they hang, but that's another story).
>
> My prompt is colored -- I need it, really!  *None* of the =ls= results are
> colored, though (in this above case: =ls ~/*.txt=).
>
> Can we fix this somehow?
>
> Test the following, and you'll see you need a colored prompt as well, if not
> yet convinced:
>
> #+begin_src sh :tangle .sva-bashrc
> #*** Controlling the Prompt
>
> # define some colors
> RED='\e[1;31m'
> GREEN='\e[1;32m'
> NO_COLOR='\e[0m'
>
> # my format of the prompt
> function my_prompt_command ()
> {
> # colorful prompt, based on whether the previous command succeeded or not
> if [[ $? -eq 0 ]]; then
> HILIT=${GREEN}
> else
> HILIT=${RED}
> fi
>
> # replace the $HOME prefix by ~ in the current directory
> if [[ $HOME == ${PWD:0:${#HOME}} ]]; then
> NEWPWD="~${PWD:${#HOME}}"
> else
> NEWPWD=$PWD
> fi
>
> # how many characters of the $PWD should be kept
> local pwd_max_length=15
>
> if [[ ${#NEWPWD} -gt $pwd_max_length ]]; then
> local pwd_offset=$(( ${#NEWPWD} - $pwd_max_length ))
> NEWPWD="...${NEWPWD:$pwd_offset:$pwd_max_length}"
> fi
>
> # prompt character
> if [[ $(whoami) = "root" ]]; then
> local PROMPTCHAR="#"
> else
> local PROMPTCHAR=">"
> fi
>
> case $TERM in
> dumb)  # for Tramp?
> setenv PS1 "[...@\h] ${NEWPWD}${PROMPTCHAR}"
> ;;
> *)
> setenv PS1 "\n\[${hilit}\]...@\h] 
> ${NEWPWD}${PROMPTCHAR}\[${NO_COLOR}\]"
> ;;
> esac
> }
>
> # shell prompt
> setenv PROMPT_COMMAND my_prompt_command
> echo ""
> #+end_src
>
> Best regards,
>   Seb

___
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] [BABEL] C-v C-v M-x?

2010-11-04 Thread Eric Schulte
What behavior would you want this bound to?

Jambunathan K  writes:

> Is there a C-c C-v M-x? Can this be made available. I will find it
> useful.
>
> Jambunathan K.
>
> ___
> 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


Re: [Orgmode] [patch] two bugs: one with comments and with exporting inline tasks

2010-11-04 Thread Nicolas Goaziou

> Arggh! Not sure why this is happening.

You need to (require 'org-inlinetask) before trying to export.

___
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 text color highlights fails

2010-11-04 Thread Christian Moe

Hi,

You are not doing anything wrong.

The below solution only changes color in exported text (HTML, Latex).

It doesn't put different faces on different link types in the Org 
buffer. So it's not a great help in editing.


Yours,
Christian Moe

On 11/4/10 4:13 PM, Marvin Doyley wrote:

Hi there,

There have been some useful discussions on changing text color in org
mode, a very useful feature when editing manuscripts.
Anyway, I tried the following function without any success. No change
in color, it just behave like a normal link (i.e, underlined). Could
someone shed some light on what I am doing wrong ?

Cheers,

M

;; org-mode color
(org-add-link-type
  "color"  nil
  (lambda (path desc format)p
   (cond
((eq format'html)
 (format"%s"  path desc))

((eq format'latex)
 (format"{\\color{%s}%s}"  path desc)
;; org-mode highlight
(org-add-link-type
  "hl"  nil
  (lambda (path desc format)
   (cond
((eq format'html)

 (format"%s"  path desc))
((eq format'latex)
 (format"\\colorbox{%s}{%s}"  path desc) ;; require \usepackage{color}


Examples:
[[color:blue][test this out]]
[[hl:yellow][highlighted text]]




___
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



--

Christian Moe
E-mail:  m...@christianmoe.com
Website: http://christianmoe.com


___
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] [patch] two bugs: one with comments and with exporting inline tasks

2010-11-04 Thread Eric S Fraga
Nicolas Goaziou  writes:

>> Eric S Fraga writes:
>
>> Are there any other I should be looking for?
>
> Could you test it with a minimal setup (emacs -q)?

=emacs -q= is not good enough because it loads org version 6.33x.  I
have tried =emacs -Q= instead and then:

#+begin_src emacs-lisp
(add-to-list 'load-path "~/git/org-mode/lisp")
(add-to-list 'load-path "/usr/share/org-mode/lisp")
(require 'org-install)
(require 'org-exp)
(require 'org-latex)
#+end_src

If I then visit my =examplebug.org= file and type =C-c C-e l= to
generate a latex export, I actually get an error:

: Debugger entered--Lisp error: (args-out-of-range [0 1 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0] 29)
:  org-section-number(29)
:  org-export-define-heading-targets(nil)
:  org-export-preprocess-string(#("# -*- coding: utf-8; -*-\n#+TITLE: 
examplebug.org\n#+AUTHOR:Eric S Fraga\n#+EMAIL: 
e.fr...@ucl.ac.uk\n#+description: \n#+KEYWORDS: \n#+LANGUAGE:  en\n#+OPTIONS:   
H:3 num:t toc:nil \\n:nil @:t ::t |:t ^:t -:t f:t *:t <:t\n#+OPTIONS:   TeX:t 
LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc\n#+INFOJS_OPT: view:nil 
toc:nil ltoc:t mouse:underline buttons:0 
path:http://orgmode.org/org-info.js\n#+EXPORT_SELECT_TAGS: 
export\n#+EXPORT_EXCLUDE_TAGS: noexport\n#+LINK_UP:   \n#+LINK_HOME: \n#+XSLT: 
\n\n* problem exporting to latex with inline tasks\n\n*point 1* \n\nI often use 
inline tasks to help me organise my thoughts as I am\nwriting long documents.  
However, exporting these no longer seems 
to\nwork.\n\n* TODO figure out why this doesn't 
work\n* END\n\n\n\n*point 2*\n\nThis is some text 
the follows the inline task.\n" 0 25 (fontified nil font-lock-fontified t) 25 
26 (fontified nil) 26 34 (fontified nil font-lock-fontified t) 34 39 (fontified 
nil) 39 53 (fontified nil font-lock-fontified t) 53 54 (fontified nil) 54 63 
(fontified nil font-lock-fontified t) 63 67 (fontified nil) 67 79 (fontified 
nil font-lock-fontified t) 79 80 (fontified nil) 80 88 (fontified nil 
font-lock-fontified t) 88 93 (fontified nil) 93 110 (fontified nil 
font-lock-fontified t) 110 111 (fontified nil) 111 126 (fontified nil 
font-lock-fontified t) 126 127 (fontified nil) 127 139 (fontified nil 
font-lock-fontified t) 139 140 (fontified nil) 140 155 (fontified nil 
font-lock-fontified t) 155 156 (fontified nil) 156 225 (fontified nil 
font-lock-fontified t) 225 226 (fontified nil) 226 298 (fontified nil 
font-lock-fontified t) 298 299 (fontified nil) 299 368 (fontified nil 
font-lock-fontified t) 368 397 (fontified nil font-lock-fontified t) 397 398 
(fontified nil rear-nonsticky (mouse-face highlight keymap invisible intangible 
help-echo org-linked-text) font-lock-fontified t) 398 399 (fontified nil) 399 
427 (fontified nil font-lock-fontified t) 427 428 (fontified nil) 428 459 
(fontified nil font-lock-fontified t) 459 460 (fontified nil) 460 473 
(fontified nil font-lock-fontified t) 473 474 (fontified nil) 474 487 
(fontified nil font-lock-fontified t) 487 488 (fontified nil) 488 496 
(fontified nil font-lock-fontified t) 496 497 (fontified nil) 497 498 
(fontified nil) 498 500 (fontified nil) 500 544 (fontified nil) 544 545 
(fontified nil) 545 815 (fontified nil) 815 862 (fontified nil)) 
:emph-multiline t :for-LaTeX t :comments nil :tags not-in-toc :priority nil 
:footnotes t :drawers nil :timestamps t :todo-keywords t :add-text nil 
:skip-before-1st-heading nil :select-tags ("export") :exclude-tags ("noexport") 
:LaTeX-fragments nil)
:  org-export-as-latex(nil)
:  call-interactively(org-export-as-latex)
:  org-export(nil)
:  call-interactively(org-export nil nil)

Arggh!  Not sure why this is happening.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.18.g3818)

___
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 text color highlights fails

2010-11-04 Thread Marvin Doyley
Hi there,

There have been some useful discussions on changing text color in org mode,
a very useful feature when editing manuscripts.
Anyway, I tried the following function without any success. No change in
color, it just behave like a normal link (i.e, underlined). Could someone
shed some light on what I am doing wrong ?

Cheers,

M

;; org-mode color
(org-add-link-type
 "color" nil
 (lambda (path desc format)p
  (cond
   ((eq format 'html)
(format "%s" path desc))
   ((eq format 'latex)
(format "{\\color{%s}%s}" path desc)
;; org-mode highlight
(org-add-link-type
 "hl" nil
 (lambda (path desc format)
  (cond
   ((eq format 'html)
(format "%s" path desc))
   ((eq format 'latex)
(format "\\colorbox{%s}{%s}" path desc) ;; require \usepackage{color}

Examples:
[[color:blue][test this out]]
[[hl:yellow][highlighted text]]
___
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: Enhancing the Org/Gnus experience

2010-11-04 Thread Eric S Fraga
Sébastian & Eric,

Just to follow up on this... (today is my "don't get any real work done
and spend some time on org instead" day, I guess ;-)

I'm starting to understand the mm-uu-* codes.  I've added some
=(message...)= entries into the code you have written for fontifying org
blocks in gnus messages:

#+begin_src emacs-lisp
(defun my-display-org-inline (handle)
   (condition-case nil
   (let (ret)
 (message "about to invoke mm-display-inline with handle=%s\n" 
handle)
 (setq ret (mm-display-inline-fontify handle 'org-mode))
 (message "mm-display-inline-fontify returned %s\n" ret)
 ret
 )
 (error
  (progn
(message "Got an error in my-display-org-inline\n")
(insert (with-temp-buffer (mm-insert-part handle)
(buffer-string))
  "\n")
#+end_src

The codes appear to be invoked when required.  E.g. from *Messages*:

: about to invoke mm-display-inline with handle=( *mm-uu*<2> (text/org) nil nil 
nil nil nil nil)

where the buffer =*mm-uu*<2>= actually has the right contents (an emacs
lisp source block):

#+begin_src emacs-lisp
;;*** 1.2 (info "(emacs-mime)Non-MIME")

  ;; regexp of Emacs sources groups
  (setq mm-uu-emacs-sources-regexp "emacs")
[...]
(replace-match "" nil nil
#+end_src

An error does not appear to be thrown by this function.  However, the
string returned by mm-display-inline-fontify is strange:

: mm-display-inline-fontify returned 
: (lambda nil (let ((inhibit-read-only t)) (delete-region # #)))

(I've broken the line after "returned".) Could there be some interaction
with, say, gnus article /washing/ treatments?  I don't know what that
function should be returning but I am concerned about the
=delete-region= directive.  Could somebody maybe show me what I should
be getting for the source block to be fontified correctly?

The marker positions appear correct for the source block, by the way.

Again, thanks for your time and effort!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.18.g3818)

___
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: Enhancing the Org/Gnus experience

2010-11-04 Thread Sébastien Vauban
Eric,

Eric S Fraga wrote:
> "Eric Schulte"  writes:
>
> [...]
>
>> if it is working, then the following code block should be fontified as
>> if in an Org-mode buffer
>>
>> #+begin_src emacs-lisp
>>   (message "is it working?")
>> #+end_src
>
> Definitely not working then!  This comes out as simple text in gnus and
> doesn't look at all like it would in an org buffer for me.
>
> [...]
>
>> the above should do it.  My addition recovers from failures by inserting
>> the unfontified text into the buffer, so it's possible that whatever
>> issue I have that throws errors on non-src blocks is also an issue on
>> your machine and is throwing errors on all blocks, which would explain
>> why you aren't seeing any difference in your article buffers.
>
> Looks like it.  Is there any way to debug this?  I don't get any
> messages in Emacs (*Messages*).  I seem to have the same settings as
> Sébastien has posted along with your augmented error handling.  I don't
> really understand all the mm-uu code (although I'm learning...) so I am
> not sure how gnus knows to invoke the specific org code you guys have
> posted.
>
> Maybe other gnus configurations, especially gnus-part-display-hook, may
> be interfering?

The only thing that I have in that direction is:

#+begin_src emacs-lisp
  ;; change a `\205' figure to "..."
  (add-hook 'gnus-part-display-hook 'article-treat-dumbquotes)
#+end_src

Do you want me to send you my .gnus privately?

Other ideas:

- which version of Gnus?  Gnus v5.13?

- which fonts for your Org code?  With colored *background*?

  Maybe have a try with my color-theme (see on Worg), or insert such lines
  into yours:

#+begin_src emacs-lisp
  (let* ((inline-code '(:foreground "blue1" :background "#EAFFEA"))
 (block-code '(:foreground "blue1" :background "#EA")))

   ;; [...]

   (org-block ((t ,block-code)))
   (org-code ((t ,inline-code)))
   (org-column ((t ,column)))
   (org-document-info-keyword ((t (:foreground "#008ED1" :background 
"#EAEAFF"
   (org-meta-line ((t (:foreground "#008ED1" :background "#EAEAFF"
   (org-special-keyword ((t (:foreground "#00BB00" :background "#EAFFEA"
   (org-table ((t (:foreground "blue1" :background "#EAFFEA"
   (org-verbatim ((t ,inline-code)))
#+end_src

Best regards,
  Seb

-- 
Sébastien Vauban


___
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: Bug: Resilience to leaving Emacs w/o clocking out [7.02trans]

2010-11-04 Thread Sébastien Vauban
Hi Dave and Carsten,

Dave Abrahams wrote:
> On Mon, Nov 1, 2010 at 3:39 PM, Carsten Dominik
>> On Nov 1, 2010, at 3:56 PM, David Abrahams wrote:
 As a result, when I fired up emacs, it would always tell me there was a
 dangling clock, but I couldn't clock out, even by `j M-x org-clock-out'.
 Eventually I figured out to use "J" and it got cleaned up, but I'm still
 a bit baffled about how I ended up in this condition.
>>>
>>> and he replied:
>>>
 This happens for me if I exit Emacs without clocking out first.
>>>
>>> Seems like a bug.
>>
>> No, this is meant to work like this.  Next time you start up Emacs, you get
>> a chance to fix this clock.  What would you like to happen? That you always
>> clock out when you exit Emacs?
>
> No, I expected that I'd at least be *able* to clock out with `M-x
> org-clock-out' after I start Emacs back up.

The only thing that could make sense is something that was (more or less?)
standard with Planner: overriding =kill-emacs= (=C-c C-x=) in order to ask you
if you want to clock out before leaving Emacs, if you still have a running
clock.

Best regards,
  Seb

-- 
Sébastien Vauban


___
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] [patch] two bugs: one with comments and with exporting inline tasks

2010-11-04 Thread Nicolas Goaziou
> Eric S Fraga writes:

> Are there any other I should be looking for?

Could you test it with a minimal setup (emacs -q)?

I just can't see how description list could end at a wrong place.

Regards,

-- Nicolas

___
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: Possible Calc support for Org-Babel?

2010-11-04 Thread Sébastien Vauban
Eric,

> I've just pushed up support for variables. The following should all work as
> expected (or at least as I would expect them to).
>
> ** playing with calc support
> #+begin_src emacs-lisp :results silent
>   (require 'ob-calc)
> #+end_src

There must be something stupid in my config, but even a simple one like the
following does not work for me:

#+begin_src calc
1
2
'+
#+end_src

Error is:

#+begin_src emacs-lisp
executing Calc code block...
calc-push-list: Symbol's value as variable is void: calc-command-flags
#+end_src

Though, I confirm you that I have loaded both =calc= and =ob-calc=... Any idea?


> There are very likely some bugs, and as always I'm eager for a calc power
> user to show me the light of how this support could be make more "calc
> idiomatic".

Be hopeless: I won't be that one ;-(

Best regards,
  Seb

-- 
Sébastien Vauban


___
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] Ledger tutorial rewritten

2010-11-04 Thread Eric S Fraga
Giovanni Ridolfi  writes:

> Eric S Fraga  writes:
>
>
> Eric,
>
 I have just pushed changes to the org babel Ledger tutorial on Worg.
 Comments are more than welcome, of course!
>
> I found a typo, a  space missing in a "C-c C-c" sequence:
>
> ** An overall balance summary
> This code block can now be evaluated (C-cC-c) and the results generated
>   ^^

Fixed.  Thanks.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.18.g3818)

___
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] [patch] two bugs: one with comments and with exporting inline tasks

2010-11-04 Thread Eric S Fraga
Nicolas Goaziou  writes:

> Hello,
>
>> Eric S Fraga writes:
>
>> The one problem it has is that the description environment should be
>> closed when the /end/ of the inline task is found. At present, you
>> are closing the description environment well after that (I think
>> when you hit the next heading?).
>
> I can't reproduce it here. Description list is correctly ended (as
> long as you're exporting the whole buffer).
>
> Hmmm, do you have any peculiar setup regarding lists or inline tasks?

The following is a summary of all "org.*list" entries in my org
customisation file:

144:  org-cycle-include-plain-lists t
173:  org-list-ending-method 'regexp

Are there any other I should be looking for?

thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.18.g3818)

___
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: [CEDET-devel] Org-mode

2010-11-04 Thread Carsten Dominik


On Nov 3, 2010, at 1:34 PM, Lennart Borgman wrote:

On Wed, Nov 3, 2010 at 1:15 PM, Eric M. Ludlam engine.com> wrote:

On 10/30/2010 03:45 AM, Konrad Scorciapino wrote:

Hey!

Is anybody working on Org-mode? My main interest is to build a  
parser to
manipulate the nodes of the resulting tree and save them back.  
Tips on

how to get started are also welcome.



I know of no one doing that.  I don't know what org-mode's code
structure is like, but I'd assume it already has a parser, and you  
could

adapt the output to Semantic tag format.

The HTML parser also handles arbitrary text so you could look in
semantic-html to see what sort of things that  does.


There are different exporters for org-mode.

Currently we are trying to make an exporter to ODT files. I think a
parser would come in handy.



org-html.el is probably the best starting point to make a complete  
parser.  It does a very detailed analysis of the text.


We should have built all the exporters on the same parser -  
unfortunately we did not.  One of the hard to correct mistakes we made  
in early development.


- 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] Re: [babel] Ledger tutorial rewritten

2010-11-04 Thread Giovanni Ridolfi
Eric S Fraga  writes:


Eric,

>>> I have just pushed changes to the org babel Ledger tutorial on Worg.
>>> Comments are more than welcome, of course!

I found a typo, a  space missing in a "C-c C-c" sequence:

** An overall balance summary 
This code block can now be evaluated (C-cC-c) and the results generated 
  ^^ 


Thanks for the tutorial,

Giovanni

___
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: Enhancing the Org/Gnus experience

2010-11-04 Thread Eric S Fraga
Sébastien Vauban  writes:

> Eric,
>
> Eric S Fraga wrote:

[...]

>> If there are any obvious things I should be looking at, please let me know.
>
> Not that I know of.
>
> For the sake of completeness, this is the part I have about my viewing
> customizations.
>
> Maybe take this into your .gnus and see what it gives?

The only difference in your code (compared with mine) was:

>   (eval-after-load "mm-uu"
> '(progn

[... identical code follows until ...]

>(mm-uu-configure)))

I was evaluating everything immediately on loading gnus.  I've put in
all this within the =eval-after-load= and restarted emacs but everything
is the same.  No fontification of src blocks.

thanks again,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.18.g3818)

___
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: Enhancing the Org/Gnus experience

2010-11-04 Thread Eric S Fraga
"Eric Schulte"  writes:

[...]

> if it is working, then the following code block should be fontified as
> if in an Org-mode buffer
>
> #+begin_src emacs-lisp
>   (message "is it working?")
> #+end_src

Definitely not working then!  This comes out as simple text in gnus and
doesn't look at all like it would in an org buffer for me.

[...]

> the above should do it.  My addition recovers from failures by inserting
> the unfontified text into the buffer, so it's possible that whatever
> issue I have that throws errors on non-src blocks is also an issue on
> your machine and is throwing errors on all blocks, which would explain
> why you aren't seeing any difference in your article buffers.

Looks like it.  Is there any way to debug this?  I don't get any
messages in Emacs (*Messages*).  I seem to have the same settings as
Sébastien has posted along with your augmented error handling.  I don't
really understand all the mm-uu code (although I'm learning...) so I am
not sure how gnus knows to invoke the specific org code you guys have
posted.

Maybe other gnus configurations, especially gnus-part-display-hook, may
be interfering?

thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.14.g106ad)

___
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] [patch] two bugs: one with comments and with exporting inline tasks

2010-11-04 Thread Nicolas Goaziou
Hello,

> Eric S Fraga writes:

> The one problem it has is that the description environment should be
> closed when the /end/ of the inline task is found. At present, you
> are closing the description environment well after that (I think
> when you hit the next heading?).

I can't reproduce it here. Description list is correctly ended (as
long as you're exporting the whole buffer).

Hmmm, do you have any peculiar setup regarding lists or inline tasks?

Regards,

-- Nicolas

___
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-Babel - Clojure & Lazy Sequences Bug

2010-11-04 Thread Rick Moynihan
I have the following org file:

#+BEGIN_SRC clojure
(range 10)
#+END_SRC

#+results:
: clojure.lang.lazy...@f35bf8c6

Where as I would expect to see the sequence.  Evaluating the code
inside a doall doesn't seem to do anything either:

#+BEGIN_SRC clojure
(doall (range 10))
#+END_SRC

#+results:
: clojure.lang.lazy...@f35bf8c6

Is there any parameter I can pass to the block to get the code to
execute in a doall and return the sequence values rather than the
lazy-seq object itself?

R.

___
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: Enhancing the Org/Gnus experience

2010-11-04 Thread Sébastien Vauban
Hi Eric,

"Eric Schulte" wrote:
> Sébastien Vauban  writes:
>> "Eric Schulte" wrote:
>>> I was getting frequent errors throw by the org-mode fontification engine
>>> recursing too deeply. I've changed it to the following which augments what
>>> you sent with some simple error handling.
>>
>> I _never_ observed problems in my case. Anyway, adding such a protection is
>> the code is a great addition. Thanks!
>
> Hmm, I wonder what the difference could be in our setups.

If you have any interest in it, I can send you my .gnus file by private
email.[3]


>> When I have a bit of time (not directly ;-(), I will try adding missing
>> bits:
>>
>> - colorization of such =org-verbatim= strings, and
>> - of the =:results= "blocks" or lines.
>
> I wonder if the mechanism used by gnus for underlining and italics could
> easily be extended for verbatim markers...

Right. This could be quite easy, in fact.


>> [1] I will send an updated version on the one about sh session.
>
> Sounds good. I often miss emails which don't have [Babel] in the subject
> string.

And I forgot to put that prefix in front of my posting (from 2 hours ago):

--8<---cut here---start->8---
  + Sébastien Vauba   19k 2010-11-04 Thu 12:24o Executing sh code within 
sessions
--8<---cut here---end--->8---


> Also, I currently have a list of >10 emails in my lists.babel folder
> marked for followup that I simply haven't had time to address.

I *really* can imagine. *If you don't mind*, I'll try to make a small list of
the couple of requests for which you could give me little pieces of advice in
order for me to go further.


> I know that at least one of those is from you.

Great!

Best regards,
  Seb

Footnotes:
[3] I still have email addresses and the like to clean before being able to 
really
expose it publicly -- which is my ultimate goal.

-- 
Sébastien Vauban


___
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] Possible Calc support for Org-Babel?

2010-11-04 Thread Eric S Fraga
"Eric Schulte"  writes:

> Alright,
>
> I've just pushed up support for variables.  The following should all
> work as expected (or at least as I would expect them to).  Note that
> most all of these blocks would have an effect on the calc stack.  I
> think the next step would be to allow different sessions to specify
> different stacks.

[...]

works well for me!  Thanks.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.18.g3818)

___
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] Bug report: syntax highlighting fails with org-indent-mode and emacs 23.2

2010-11-04 Thread Jean-Marie Gaillourdet
Hi, 

Thanks for this great piece of software. 

Today, I've realised a regression in functionality with org-indent-mode
with org-mode of this morning. 

A file with #+STARTUP: indent isn't syntax highlighted at all. The
message buffer says fontification fails with: (invalid-function
with-silent-modifications)

All calls to =with-silent-modifcations= have been introduced by git
commit e40903a6. This commit replaces =org-unmodified= with
=with-silent-modifications=. I've reverted this manually and syntax
highlighting works again with org-indent-mode.

Is with-silent-modifications an addition of Emacs 24? I am still using
23.2 and would prefer to continue to do so. 

This on Mac OS X. 

Regards,
  Jean-Marie

___
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: Enhancing the Org/Gnus experience

2010-11-04 Thread Eric Schulte
Sébastien Vauban  writes:

> Hi Eric (and Dan),
>
> "Eric Schulte" wrote:
>> This is really great.  I finally folded it into my gnus setup, and while
>> it looks great when it works
>
> Great you love it. I'm *VERY* pleased. Moreover, having no reaction on that
> (and on some other posts[1]), I thought I'd been kill-filed ;-)[2]
>
>
>> I was getting frequent errors throw by the org-mode fontification engine
>> recursing too deeply. I've changed it to the following which augments what
>> you sent with some simple error handling.
>
> I _never_ observed problems in my case. Anyway, adding such a protection is
> the code is a great addition. Thanks!
>

Hmm, I wonder what the difference could be in our setups.

>
> I've just singed the FSF papers. Once received by the FSF, I'll
> propagate your update onto the Gnus newsgroup.
>

That sounds great.

>
>
>> ** Org-mode code block fontification
>> Correctly fontify Org-mode attachments
>> #+begin_src emacs-lisp
>> (add-to-list 'mailcap-mime-extensions '(".org" . "text/org"))
>> (add-to-list 'mm-automatic-display "text/org")
>> 
>> (add-to-list 'mm-inline-media-tests
>>  '("text/org" my-display-org-inline
>>(lambda (el) t)))
>> 
>> (defun my-display-org-inline (handle)
>>   (condition-case nil
>>   (mm-display-inline-fontify handle 'org-mode)
>> (error
>>  (insert (with-temp-buffer (mm-insert-part handle) (buffer-string))
>>  "\n"
>> #+end_src
>>
>> Update =org-src-lang-modes= to provide some leeway for posters
>> #+begin_src emacs-lisp
>>   (add-to-list 'org-src-lang-modes
>>'("elisp" . emacs-lisp))
>>   (add-to-list 'org-src-lang-modes
>>'("emacs_lisp" . emacs-lisp))
>> #+end_src
>>
>> Fontify code blocks in the text of messages
>> #+begin_src emacs-lisp
>>   (defun my-mm-org-babel-src-extract ()
>> (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) 
>> '("text/org")))
>>   
>>   (add-to-list 'mm-uu-type-alist
>>'(org-src-block
>>  "^[ \t]*#\\+begin_"
>>  "^[ \t]*#\\+end_"
>>  my-mm-org-babel-src-extract
>>  nil))
>>   
>>   (mm-uu-configure)
>> #+end_src
>
> When I have a bit of time (not directly ;-(), I will try adding missing bits:
>
> - colorization of such =org-verbatim= strings, and
> - of the =:results= "blocks" or lines.

I wonder if the mechanism used by gnus for underlining and italics could
easily be extended for verbatim markers...

>
> A difficulty, maybe, for the latter is the absence of explicit
> marker. Not that true: it's a newline...
>
> When that will be done, we will have a real Org experience when reading mails
> with Gnus. I love all this tools.
>

Agreed, I'm already finding the two to be a very comfortable pair.

>
> Best regards,
>   Seb
>
> Footnotes:
> [1] I will send an updated version on the one about sh session.

Sounds good.  I often miss emails which don't have [Babel] in the
subject string.  Also, I currently have a list of >10 emails in my
lists.babel folder marked for followup that I simply haven't had time to
address.  I know that at least one of those is from you.

Cheers -- Eric

> 
> [2] Just kidding. Using org-footnote BTW.

___
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] Possible Calc support for Org-Babel?

2010-11-04 Thread Eric Schulte
Alright,

I've just pushed up support for variables.  The following should all
work as expected (or at least as I would expect them to).  Note that
most all of these blocks would have an effect on the calc stack.  I
think the next step would be to allow different sessions to specify
different stacks.

** playing with calc support
#+begin_src emacs-lisp :results silent
  (require 'ob-calc)
#+end_src

#+begin_src calc :var some=8
  some
  some
  '*
  1
  '+
#+end_src

#+results:
: 65

#+begin_src calc
  2*(8+8)
#+end_src

#+results:
: 32

#+begin_src calc
  2*e
#+end_src

#+results:
: 5.43656365692

#+begin_src calc :var something=9
  2*something
#+end_src

#+results:
: 18

There are very likely some bugs, and as always I'm eager for a calc
power user to show me the light of how this support could be make more
"calc idiomatic".

Cheers -- Eric

Eric S Fraga  writes:

> Forgot to CC the list et al.
>
> "Eric Schulte"  writes:
>
>> Eric S Fraga  writes:
>
> [...]
>
>>> I now wonder if it would be worthwhile discussing the choices you have
>>> made regarding stack versus algebraic evaluation.  I would rather have
>>> the quote mean an algebraic expression, just from the simple reason that
>>> these will be longer than stack operations and so the overhead of a
>>> quote is smaller as a percentage of keystrokes...
>>>
>>
>> Hmm, one point against prefixing the algebraic expressions is that they
>> would be more likely to be used by themselves in an inline code block.
>
> Yes, I guess so.  My initial thoughts were that we have plenty of
> algebraic languages available already through babel (octave, R, python,
> ...) so why not support a stack based one more directly.   However, the
> real benefit of calc is that it is *emacs* and not external!  Algebraic
> is more natural to most people so making it easy for them to express
> themselves makes sense.

___
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: Enhancing the Org/Gnus experience

2010-11-04 Thread Eric Schulte
Eric S Fraga  writes:

> Sébastien Vauban  writes:
>
>> Hi Eric (and Dan),
>>
>> "Eric Schulte" wrote:
>>> This is really great.  I finally folded it into my gnus setup, and while
>>> it looks great when it works
>>
>> Great you love it. I'm *VERY* pleased. Moreover, having no reaction on that
>> (and on some other posts[1]), I thought I'd been kill-filed ;-)[2]
>
> Sébastien et al.,
>
> I have also included the code in my gnus configuration but I am not sure
> if it is actually doing anything or not.  Well, actually, I think it
> *is* doing something but I haven't actually seen any fontification etc.
> On the other hand, I am still getting to grips with gnus article display
> functionality so I've probably done something wrong...
>

if it is working, then the following code block should be fontified as
if in an Org-mode buffer

#+begin_src emacs-lisp
  (message "is it working?")
#+end_src

>
> If there are any obvious things I should be looking at, please let me
> know.
>

the above should do it.  My addition recovers from failures by inserting
the unfontified text into the buffer, so it's possible that whatever
issue I have that throws errors on non-src blocks is also an issue on
your machine and is throwing errors on all blocks, which would explain
why you aren't seeing any difference in your article buffers.

>
>>> I was getting frequent errors throw by the org-mode fontification engine
>>> recursing too deeply. I've changed it to the following which augments what
>>> you sent with some simple error handling.
>>
>> I _never_ observed problems in my case. Anyway, adding such a protection is
>> the code is a great addition. Thanks!
>>
>> I've just singed the FSF papers. Once received by the FSF, I'll
>> propagate your update onto the Gnus newsgroup.
>
> Please post here as well.  I do follow the gnus newsgroup but less
> frequently.
>
>> When that will be done, we will have a real Org experience when
>> reading mails with Gnus. I love all this tools.
>
> Yes, there's great potential for the gnus+org combination to give a
> really nice email experience!
>
> Thanks,
> eric

___
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: Enhancing the Org/Gnus experience

2010-11-04 Thread Sébastien Vauban
Eric,

Eric S Fraga wrote:
> Sébastien Vauban  writes:
>> Hi Eric (and Dan),
>> "Eric Schulte" wrote:
>>> This is really great.  I finally folded it into my gnus setup, and while
>>> it looks great when it works
>>
>> Great you love it. I'm *VERY* pleased. Moreover, having no reaction on that
>> (and on some other posts[1]), I thought I'd been kill-filed ;-)[2]
>
> Sébastien et al.,
>
> I have also included the code in my gnus configuration but I am not sure
> if it is actually doing anything or not.  Well, actually, I think it
> *is* doing something but I haven't actually seen any fontification etc.
> On the other hand, I am still getting to grips with gnus article display
> functionality so I've probably done something wrong...
>
> If there are any obvious things I should be looking at, please let me know.

Not that I know of.

For the sake of completeness, this is the part I have about my viewing
customizations.

Maybe take this into your .gnus and see what it gives?

#+begin_src emacs-lisp
;;*** 1.2 (info "(emacs-mime)Non-MIME")

  ;; regexp of Emacs sources groups
  (setq mm-uu-emacs-sources-regexp "emacs")

  ;; regexp matching diff groups
  (setq mm-uu-diff-groups-regexp
"\\(diff\\|commit\\|cvs\\|bug\\|devel\\|reviews\\|mc\\|orgmode\\)")

  ;; regexp matching TeX groups
  (setq mm-uu-tex-groups-regexp ".*") ;; 2010-10-21 was "tex"

  (eval-after-load "mm-uu"
'(progn
   ;; correctly fontify Org-mode attachments
   (add-to-list 'mailcap-mime-extensions '(".org" . "text/org"))
   (add-to-list 'mm-automatic-display "text/org")

   (add-to-list 'mm-inline-media-tests
'("text/org" my/display-org-inline
  (lambda (el) t)))

   (defun my/display-org-inline (handle)
 (condition-case nil
 (mm-display-inline-fontify handle 'org-mode)
   (error
(insert
 (with-temp-buffer (mm-insert-part handle) (buffer-string))
 "\n"

   ;; update `org-src-lang-modes' to provide some leeway for posters
   (add-to-list 'org-src-lang-modes '("elisp" . emacs-lisp))
   (add-to-list 'org-src-lang-modes '("emacs_lisp" . emacs-lisp))

   ;; fontify code blocks in the text of messages
   (defun my/mm-org-babel-src-extract ()
 (mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
 '("text/org")))

   (add-to-list 'mm-uu-type-alist
'(org-babel-block
  "^[ \t]*#\\+begin_"
  "^[ \t]*#\\+end_"
  my/mm-org-babel-src-extract
  nil))

   (mm-uu-configure)))


;;*** 1.5 (info "(emacs-mime)Display Customization")

  ;; You can view "text/html" parts of the current article with a WWW
  ;; browser by pressing `K H' (`gnus-article-browse-html-article')

  ;; ;; MIME type that will be displayed externally automatically
  ;; (add-to-list 'mm-automatic-external-display "text/html")

  ;; do not treat inline images as real attachments (display them,
  ;; instead)
  (add-to-list 'mm-attachment-override-types "image/.*")
; "text/x-vcard"...

  ;; don't render HTML automatically *when plain text alternative is
  ;; available*
  (eval-after-load "mm-decode"
'(progn
   (add-to-list 'mm-discouraged-alternatives "text/html")
   (add-to-list 'mm-discouraged-alternatives "text/richtext")
   (add-to-list 'mm-discouraged-alternatives "text/enriched")
   (add-to-list 'mm-discouraged-alternatives "multipart/related")))

  ;; all images fit in the buffer
  (setq mm-inline-large-images t)

  ;; ;; always show HTML mails as attachments (even if they can be
  ;; ;; displayed) use `browse-url-browser-function' (firefox) to render
  ;; ;; HTML mails
  ;; (push "text/html" mm-inline-override-types)


  ;; use `w3m' browser (if installed) to render HTML-only mails
  (setq mm-text-html-renderer
(cond ((executable-find "w3m") 'w3m)
  (t 'html2text))) ;; Emacs built-in

  (eval-after-load "w3m"
'(progn
   ;; (setq browse-url-browser-function 'w3m-browse-url)
   (setq mm-inline-text-html-renderer
 'mm-inline-text-html-render-with-w3m)
   (setq gnus-article-wash-function
 'gnus-article-wash-html-with-w3m)

   ;; Whenever you try to browse URLs found in articles, Gnus
   ;; (`emacs-w3m', in fact) complains that "This link is considered
   ;; unsafe...". To turn it off, frob the variables
   ;; `w3m-safe-url-regexp' and `mm-w3m-safe-url-regexp'.
   ))

  ;; allow retrieving images in HTML contents with the  tags
  (setq mm-inline-text-html-with-im

Re: [Orgmode] Re: [babel] Ledger tutorial rewritten

2010-11-04 Thread Eric S Fraga
Sébastien Vauban  writes:

> Hi Eric,
>
> Eric S Fraga wrote:
>> I have just pushed changes to the org babel Ledger tutorial on Worg.
>> This should hopefully be propagated to the actual web site in due course
>> and will be found at:
>>
>> : http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ledger.php
>>
>> I have removed the discussion on tangling and replaced this with the
>> more user friendly use of :noweb literate programming.  Comments are
>> more than welcome, of course!
>
> Thanks for that... Much better -- readability and portability wise -- way to
> do it (IMHO)!

Thanks!  I did get some very useful and appropriate feedback from you
all.
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.14.g106ad)

___
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: [babel] Ledger tutorial rewritten

2010-11-04 Thread Sébastien Vauban
Hi Eric,

Eric S Fraga wrote:
> I have just pushed changes to the org babel Ledger tutorial on Worg.
> This should hopefully be propagated to the actual web site in due course
> and will be found at:
>
> : http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ledger.php
>
> I have removed the discussion on tangling and replaced this with the
> more user friendly use of :noweb literate programming.  Comments are
> more than welcome, of course!

Thanks for that... Much better -- readability and portability wise -- way to
do it (IMHO)!

Best regards,
  Seb

-- 
Sébastien Vauban


___
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


[Accepted] [Orgmode] org-agenda: return multiple results when sexp return a string with "; "

2010-11-04 Thread Carsten Dominik
Patch 358 (http://patchwork.newartisans.com/patch/358/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C1288805538-13133-1-git-send-email-julien%40danjou.info%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] org-agenda: return multiple results when sexp return a
>   string with "; "
> Date: Wed, 03 Nov 2010 22:32:18 -
> From: Julien Danjou 
> X-Patchwork-Id: 358
> Message-Id: <1288805538-13133-1-git-send-email-jul...@danjou.info>
> To: emacs-orgmode@gnu.org
> Cc: Julien Danjou 
> 
> When evaluating my %%(org-calendar-holidays) on October 31st, I got a
> line like:
> 
> "Halloween; Daylight Saving Time Ends 3:00am (CEST)"
> 
> And it displays in calendar:
> 3:00  Halloween; Daylight Saving Time Ends (CEST)
> 
> This is wrong since Halloween is all day, not only at 3:00.
> 
> Splitting results on "; " allows to have an independant entry on each
> event and displays things correctly.
> 
> Signed-off-by: Julien Danjou 
> 
> ---
> lisp/org.el |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lisp/org.el b/lisp/org.el
> index cb99712..effe9b2 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -15025,7 +15025,7 @@ D may be an absolute day number, or a calendar-type 
> list (month day year)."
> (org-current-line)
> (buffer-file-name) sexp)
>   (sleep-for 2))
> -(cond ((stringp result) result)
> +(cond ((stringp result) (split-string result "; "))
> ((and (consp result)
>   (not (consp (cdr result)))
>   (stringp (cdr result))) (cdr result))
> 

___
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


[Accepted] [Orgmode] org-agenda: add support for category icons

2010-11-04 Thread Carsten Dominik
Patch 351 (http://patchwork.newartisans.com/patch/351/) is now "Accepted".

Maintainer comment: Great idea, thanks.  I added the required ChangeLog entry 
to the commit message, please look at them so that you can provide them next 
time.

This relates to the following submission:

http://mid.gmane.org/%3C1288342172-7194-1-git-send-email-julien%40danjou.info%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] org-agenda: add support for category icons
> Date: Fri, 29 Oct 2010 13:49:32 -
> From: Julien Danjou 
> X-Patchwork-Id: 351
> Message-Id: <1288342172-7194-1-git-send-email-jul...@danjou.info>
> To: emacs-orgmode@gnu.org
> Cc: Julien Danjou 
> 
> Signed-off-by: Julien Danjou 
> 
> ---
> doc/org.texi   |4 +++
>  lisp/org-agenda.el |   65 +++
>  2 files changed, 63 insertions(+), 6 deletions(-)
> 
> diff --git a/doc/org.texi b/doc/org.texi
> index aa4f30b..41121d3 100644
> --- a/doc/org.texi
> +++ b/doc/org.texi
> @@ -7337,6 +7337,10 @@ special category you want to apply as the value.
>  The display in the agenda buffer looks best if the category is not
>  longer than 10 characters.
>  
> +...@noindent
> +You can set up icons for category by customizing the
> +...@code{org-agenda-category-icon-alist} variable.
> +
>  @node Time-of-day specifications, Sorting of agenda items, Categories, 
> Presentation and sorting
>  @subsection Time-of-day specifications
>  @cindex time-of-day specification
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 70c698d..da96318 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -1211,11 +1211,11 @@ When nil, such items are sorted as 0 minutes effort."
>:group 'org-agenda)
>  
>  (defcustom org-agenda-prefix-format
> -  '((agenda  . "  %-12:c%?-12t% s")
> +  '((agenda  . " %i %-12:c%?-12t% s")
>  (timeline  . "  % s")
> -(todo  . "  %-12:c")
> -(tags  . "  %-12:c")
> -(search . "  %-12:c"))
> +(todo  . " %i %-12:c")
> +(tags  . " %i %-12:c")
> +(search . " %i %-12:c"))
>"Format specifications for the prefix of items in the agenda views.
>  An alist with four entries, for the different agenda types.  The keys to the
>  sublists are `agenda', `timeline', `todo', and `tags'.  The values
> @@ -1224,6 +1224,8 @@ This format works similar to a printf format, with the 
> following meaning:
>  
>%c   the category of the item, \"Diary\" for entries from the diary, or
> as given by the CATEGORY keyword or derived from the file name.
> +  %i   the icon category of the item, as give in
> +   `org-agenda-category-icon-alist'.
>%T   the *last* tag of the item.  Last because inherited tags come
> first in the list.
>%t   the time-of-day specification if one applies to the entry, in the
> @@ -1431,6 +1433,45 @@ determines if it is a foreground or a background 
> color."
>  (string :tag "Color")
>  (sexp :tag "Face"))
>  
> +(defcustom org-agenda-category-icon-alist nil
> +  "Alist of category icon to be displayed in agenda views.
> +
> +Each entry should have the following format:
> +
> +  (CATEGORY-REGEXP FILE-OR-DATA TYPE DATA-P PROPS)
> +
> +Where CATEGORY-REGEXP is a regexp matching the categories where
> +the icon should be displayed.
> +FILE-OR-DATA either a file path or a string containing image data.
> +
> +The other fields can be ommited safely if not needed:
> +TYPE indicates the image type.
> +DATA-P is a boolean indicating whether the FILE-OR-DATA string is
> +image data.
> +PROPS are additional image attributes to assign to the image,
> +like, e.g. `:ascent center'.
> +
> +   (\"Org\" \"/path/to/icon.png\" nil nil :ascent center)
> +
> +If you want to set the display properties yourself, just put a
> +list as second element:
> +
> +  (CATEGORY-REGEXP (MY PROPERTY LIST))
> +
> +For example, to display a 16px horizontal space for Emacs
> +category, you can use:
> +
> +  (\"Emacs\" '(space . (:width (16"
> +  :group 'org-agenda-line-format
> +  :type '(list :tag "Category icons"
> +(repeat
> + (list
> +  (string :tag "Category regexp")
> +  (string :tag "File or data")
> +  (string :tag "Type")
> +  (boolean :tag "Data?")
> +  (list :tag "Properties")
> +
>  (defgroup org-agenda-column-view nil
>"Options concerning column view in the agenda."
>:tag "Org Agenda Column View"
> @@ -4924,6 +4965,14 @@ The flag is set if the currently compiled format 
> contains a `%e'.")
>  (defvar org-prefix-category-max-length nil
>"Used by `org-compile-prefix-format' to remember the category field 
> width.")
>  
> +(defun org-agenda-get-category-icon (category)
> +  "Return an image for CATEGORY according to 
> `org-agenda-category-icon-alist'."
> +  (doli

Re: [Orgmode] Umlauts in LaTeX export

2010-11-04 Thread Nick Dokos
Eric S Fraga  wrote:

> Nick Dokos  writes:
> 
> [...]
> 
> > There are a couple of assumptions here (and in Eric F.'s mail about the
> > TeX input method as well). One is that the buffer is encoded in UTF-8:
> > if you use e.g iso-8859-1, you can use whatever input method you want,
> > but you'll end up with a byte in your file that LaTeX won't like.
> 
> Umm, just to clarify something: the file can well be in iso-8859-1
> encoding.  It need not be in UTF-8 if all you want are typical west
> European characters (umlauts etc.).  For instance, the following file
> contents work just fine (I've forced iso-8859-1 encoding although I use
> UTF-8 more often than not):
> 
> # -*- coding: iso-8859-1; -*-
> 
> * Introduction
> 
> This text includes a number of characters from España because we want
> to say /cigüeña/ instead of /swan/.
> 
> This exports just fine to latex and org automatically includes the line:
> 
> : \usepackage[latin1]{inputenc}
> 
> I've attached the org file in case anybody wants to play with this very
> small example.
> 
> 

Ah, thanks: I forgot how smart org is.

Nick

___
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: Enhancing the Org/Gnus experience

2010-11-04 Thread Eric S Fraga
Sébastien Vauban  writes:

> Hi Eric (and Dan),
>
> "Eric Schulte" wrote:
>> This is really great.  I finally folded it into my gnus setup, and while
>> it looks great when it works
>
> Great you love it. I'm *VERY* pleased. Moreover, having no reaction on that
> (and on some other posts[1]), I thought I'd been kill-filed ;-)[2]

Sébastien et al.,

I have also included the code in my gnus configuration but I am not sure
if it is actually doing anything or not.  Well, actually, I think it
*is* doing something but I haven't actually seen any fontification etc.
On the other hand, I am still getting to grips with gnus article display
functionality so I've probably done something wrong...

If there are any obvious things I should be looking at, please let me know.

>> I was getting frequent errors throw by the org-mode fontification engine
>> recursing too deeply. I've changed it to the following which augments what
>> you sent with some simple error handling.
>
> I _never_ observed problems in my case. Anyway, adding such a protection is
> the code is a great addition. Thanks!
>
> I've just singed the FSF papers. Once received by the FSF, I'll
> propagate your update onto the Gnus newsgroup.

Please post here as well.  I do follow the gnus newsgroup but less
frequently.

> When that will be done, we will have a real Org experience when
> reading mails with Gnus. I love all this tools.

Yes, there's great potential for the gnus+org combination to give a
really nice email experience!

Thanks,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.14.g106ad)

___
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] quick TODO entry

2010-11-04 Thread David Cross

From the Org-Mode Reference Card:

Insert new TODO entry/checkbox itemM-S-RET
Insert new TODO entry/ckbx after subtree   C-S-RET

Cheers

David Cross
d.cr...@tcu.edu
www.davidcross.us




On Nov 3, 2010, at 9:48 PM, Nick Parker wrote:


Sergio,

Check out org-capture (http://orgmode.org/manual/Capture.html).  You  
can set a keybinding to trigger it like so:


(define-key global-map "\C-cc" 'org-capture)

Nick Parker
www.developernotes.com


On Wed, Nov 3, 2010 at 9:38 PM, sergio_101   
wrote:

i have been away from org-mode and i have come back to it recently.
when i was using it before, i seem to remember having a keystroke
combo that allowed me to start up a TODO item, and then it would
quickly shift to deadline entry, then tag entry.

i can't find anything on this, nor can i remember what it was..

any ideas?

thanks!

--

peace,
sergio
photographer, journalist, visionary

http://www.CodingForHire.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101

___
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


[Accepted] [Orgmode] org-compat: defalias string-match-p rather than defun

2010-11-04 Thread Carsten Dominik
Patch 350 (http://patchwork.newartisans.com/patch/350/) is now "Accepted".

Maintainer comment: I added looking-at-p

This relates to the following submission:

http://mid.gmane.org/%3C1288340911-6825-1-git-send-email-julien%40danjou.info%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] org-compat: defalias string-match-p rather than defun
> Date: Fri, 29 Oct 2010 13:28:31 -
> From: Julien Danjou 
> X-Patchwork-Id: 350
> Message-Id: <1288340911-6825-1-git-send-email-jul...@danjou.info>
> To: emacs-orgmode@gnu.org
> Cc: Julien Danjou 
> 
> Signed-off-by: Julien Danjou 
> 
> ---
> lisp/org-compat.el |8 
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/lisp/org-compat.el b/lisp/org-compat.el
> index d55a83e..47a6599 100644
> --- a/lisp/org-compat.el
> +++ b/lisp/org-compat.el
> @@ -372,11 +372,11 @@ TIME defaults to the current time."
>(time-to-seconds (or time (current-time)))
>  (float-time time)))
>  
> -(defun org-string-match-p (&rest args)
> -  (if (fboundp 'string-match-p)
> -  (apply 'string-match-p args)
> +(if (fboundp 'string-match-p)
> +(defalias 'org-string-match-p 'string-match-p)
> +  (defun org-string-match-p (regexp string &optional start)
>  (save-match-data
> -  (apply 'string-match args
> +  (funcall 'string-match regexp string start
>  
>  (defun org-looking-at-p (&rest args)
>(if (fboundp 'looking-at-p)
> 

___
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] make a timeline from a table?

2010-11-04 Thread Eric S Fraga
Matt Price  writes:

> Hi eveyone,
>
> I'm trying to do something that seems really simple to me but i still don't
> know how to do.  I want to draw a timeline that represents the stages of a
> research project (inception, research, presentation, writing, submission,
> publication...)  and I would like it to look something like this:
>
> -
> \ \
>  \ \
>   inception    research
>
> only I want it to be pretty, say with little circular nodes connecting the
> diagonal lines to the main horizontal lines, and with the text aligned
> diagonally along the lines.  Is there an easy way to do this in org, and will
> it export say to html?  Or if not in org, some way to generate the graphic
> from a set of datapoints?  I imagine this must exist but I don't often make
> charts and graphics so I don't know how to do it. 
>
> Anyway, I appreciate your help.  Thanks,
> Matt

Matt,

I don't know of an org specific example of how to do this but I know
there are plenty of latex+tikz examples out there (google "timeline
latex tikz" for instance).  With some simple emacs lisp code, you should
be able to convert an org table to suitable input for tikz.

If you want a GANTT chart approach instead, check out a posting I made
to list back in early October:

  http://article.gmane.org/gmane.emacs.orgmode/31824

Maybe check that message out in any case for an example of how to work
with an org table and create tikz commands for latex export.

HTH,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.14.g106ad)

___
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] Executing sh code within sessions

2010-11-04 Thread Sébastien Vauban
#+TITLE: Executing sh-code within a session
#+AUTHOR:Seb Vauban
#+LANGUAGE:  en_US

* Executing sh-code within a session

** Context

- git pull done this morning (2010-11-04 Thu).

- EmacsW32 + Cygwin bash as inferior shell

  #+begin_src emacs-lisp
  (setq shell-file-name "bash")
  (setenv "SHELL" "bash")
  (setq shell-command-switch "-c")
  (setq w32-quote-process-args t)
  (setq explicit-shell-file-name "bash")
  #+end_src

** First time

The first time I execute the following:

#+begin_src sh :session sva
echo In $(pwd):
ls *.org
#+end_src

I get the following error:

#+begin_src emacs-lisp
Debugger entered--Lisp error: (error "Marker does not point anywhere")
  ansi-color-apply-on-region(# #)
  ansi-color-process-output("")
  run-hook-with-args(ansi-color-process-output "")
  comint-send-input(nil t)
  (lambda (line) (insert line) (comint-send-input nil t) (sleep-for 
0.25))("echo In $(pwd):")
  mapc((lambda (line) (insert line) (comint-send-input nil t) (sleep-for 0.25)) 
("echo In $(pwd):" "ls *.org" "echo 'org_babel_sh_eoe'"))
  (progn (goto-char (process-mark ...)) (let (... ...) (setq dangling-text ...) 
(delete-region start end)) (mapc (lambda ... ... ... ...) (append ... ...)) 
(while (progn ... ...) (accept-process-output ...)) (goto-char (process-mark 
...)) (insert dangling-text))
  (unwind-protect (progn (goto-char ...) (let ... ... ...) (mapc ... ...) 
(while ... ...) (goto-char ...) (insert dangling-text)) (remove-hook (quote 
comint-output-filter-functions) (quote my-filt)))
  (progn (fset (quote my-filt) (function* ...)) (add-hook (quote 
comint-output-filter-functions) (quote my-filt)) (unwind-protect (progn ... ... 
... ... ... ...) (remove-hook ... ...)))
  (unwind-protect (progn (fset ... ...) (add-hook ... ...) (unwind-protect ... 
...)) (if --cl-letf-bound-- (fset ... --cl-letf-save--) (fmakunbound ...)))
  (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind-protect (progn 
... ... ...) (if --cl-letf-bound-- ... ...)))
  (letf ((... ...)) (add-hook (quote comint-output-filter-functions) (quote 
my-filt)) (unwind-protect (progn ... ... ... ... ... ...) (remove-hook ... 
...)))
  (letf* ((... ...)) (add-hook (quote comint-output-filter-functions) (quote 
my-filt)) (unwind-protect (progn ... ... ... ... ... ...) (remove-hook ... 
...)))
  (flet ((my-filt ... ...)) (add-hook (quote comint-output-filter-functions) 
(quote my-filt)) (unwind-protect (progn ... ... ... ... ... ...) (remove-hook 
... ...)))
  (let ((string-buffer "") dangling-text raw) (flet (...) (add-hook ... ...) 
(unwind-protect ... ...)) (if (and t body ...) (setq raw ...)) (split-string 
string-buffer comint-prompt-regexp))
  (progn (unless (org-babel-comint-buffer-livep session) (error "buffer %s 
doesn't exist or has no process" session)) (set-buffer session) (let (... 
dangling-text raw) (flet ... ... ...) (if ... ...) (split-string string-buffer 
comint-prompt-regexp)))
  (unwind-protect (progn (unless ... ...) (set-buffer session) (let ... ... ... 
...)) (set-match-data save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal ...)) (unwind-protect (progn ... ... ...) 
(set-match-data save-match-data-internal ...)))
  (save-match-data (unless (org-babel-comint-buffer-livep session) (error 
"buffer %s doesn't exist or has no process" session)) (set-buffer session) (let 
(... dangling-text raw) (flet ... ... ...) (if ... ...) (split-string 
string-buffer comint-prompt-regexp)))
  (save-excursion (save-match-data (unless ... ...) (set-buffer session) (let 
... ... ... ...)))
  (org-babel-comint-in-buffer session (let (... dangling-text raw) (flet ... 
... ...) (if ... ...) (split-string string-buffer comint-prompt-regexp)))
  (org-babel-comint-with-output (session org-babel-sh-eoe-output t body) (mapc 
(lambda ... ... ... ...) (append ... ...)))
  (butlast (org-babel-comint-with-output (session org-babel-sh-eoe-output t 
body) (mapc ... ...)) 2)
  (mapcar (function org-babel-trim) (butlast (org-babel-comint-with-output ... 
...) 2))
  (mapconcat (function org-babel-sh-strip-weird-long-prompt) (mapcar (function 
org-babel-trim) (butlast ... 2)) "\n")
  (if (not session) (org-babel-eval org-babel-sh-command (org-babel-trim body)) 
(mapconcat (function org-babel-sh-strip-weird-long-prompt) (mapcar ... ...) 
"\n"))
  ((lambda (results) (when results ...)) (if (not session) (org-babel-eval 
org-babel-sh-command ...) (mapconcat ... ... "\n")))
  org-babel-sh-evaluate(# "echo In $(pwd):\nls *.org\n" ("replace"))
  (org-babel-reassemble-table (org-babel-sh-evaluate session full-body 
result-params) (org-babel-pick-name (cdr ...) (cdr ...)) (org-babel-pick-name 
(cdr ...) (cdr ...)))
  (let* ((session ...) (result-params ...) (full-body ...)) 
(org-babel-reassemble-table (org-babel-sh-evaluate session full-body 
result-params) (org-babel-pick-name ... ...) (org-babel-pick-name ... ...)))
  org-babel-execute:sh("echo In $(pwd):\nls *.org\n" ((:colname-names) 
(:rowname-names) (:result

[Orgmode] Re: Enhancing the Org/Gnus experience

2010-11-04 Thread Sébastien Vauban
Hi Eric (and Dan),

"Eric Schulte" wrote:
> This is really great.  I finally folded it into my gnus setup, and while
> it looks great when it works

Great you love it. I'm *VERY* pleased. Moreover, having no reaction on that
(and on some other posts[1]), I thought I'd been kill-filed ;-)[2]


> I was getting frequent errors throw by the org-mode fontification engine
> recursing too deeply. I've changed it to the following which augments what
> you sent with some simple error handling.

I _never_ observed problems in my case. Anyway, adding such a protection is
the code is a great addition. Thanks!

I've just singed the FSF papers. Once received by the FSF, I'll propagate your
update onto the Gnus newsgroup.


> ** Org-mode code block fontification
> Correctly fontify Org-mode attachments
> #+begin_src emacs-lisp
> (add-to-list 'mailcap-mime-extensions '(".org" . "text/org"))
> (add-to-list 'mm-automatic-display "text/org")
> 
> (add-to-list 'mm-inline-media-tests
>  '("text/org" my-display-org-inline
>(lambda (el) t)))
> 
> (defun my-display-org-inline (handle)
>   (condition-case nil
>   (mm-display-inline-fontify handle 'org-mode)
> (error
>  (insert (with-temp-buffer (mm-insert-part handle) (buffer-string))
>  "\n"
> #+end_src
>
> Update =org-src-lang-modes= to provide some leeway for posters
> #+begin_src emacs-lisp
>   (add-to-list 'org-src-lang-modes
>'("elisp" . emacs-lisp))
>   (add-to-list 'org-src-lang-modes
>'("emacs_lisp" . emacs-lisp))
> #+end_src
>
> Fontify code blocks in the text of messages
> #+begin_src emacs-lisp
>   (defun my-mm-org-babel-src-extract ()
> (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) 
> '("text/org")))
>   
>   (add-to-list 'mm-uu-type-alist
>'(org-src-block
>  "^[ \t]*#\\+begin_"
>  "^[ \t]*#\\+end_"
>  my-mm-org-babel-src-extract
>  nil))
>   
>   (mm-uu-configure)
> #+end_src

When I have a bit of time (not directly ;-(), I will try adding missing bits:

- colorization of such =org-verbatim= strings, and
- of the =:results= "blocks" or lines.

A difficulty, maybe, for the latter is the absence of explicit marker. Not
that true: it's a newline...

When that will be done, we will have a real Org experience when reading mails
with Gnus. I love all this tools.

Best regards,
  Seb

Footnotes:
[1] I will send an updated version on the one about sh session.
[2] Just kidding. Using org-footnote BTW.
-- 
Sébastien Vauban


___
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] Umlauts in LaTeX export

2010-11-04 Thread Eric S Fraga
Nick Dokos  writes:

[...]

> There are a couple of assumptions here (and in Eric F.'s mail about the
> TeX input method as well). One is that the buffer is encoded in UTF-8:
> if you use e.g iso-8859-1, you can use whatever input method you want,
> but you'll end up with a byte in your file that LaTeX won't like.

Umm, just to clarify something: the file can well be in iso-8859-1
encoding.  It need not be in UTF-8 if all you want are typical west
European characters (umlauts etc.).  For instance, the following file
contents work just fine (I've forced iso-8859-1 encoding although I use
UTF-8 more often than not):

--8<---cut here---start->8---
# -*- coding: iso-8859-1; -*-

* Introduction

This text includes a number of characters from España because we want
to say /cigüeña/ instead of /swan/.
--8<---cut here---end--->8---

This exports just fine to latex and org automatically includes the line:

: \usepackage[latin1]{inputenc}

I've attached the org file in case anybody wants to play with this very
small example.

# -*- coding: iso-8859-1; -*-

* Introduction

This text includes a number of characters from España because we want
to say /cigüeña/ instead of /swan/.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.14.g106ad)
___
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] [babel] Ledger tutorial rewritten

2010-11-04 Thread Eric S Fraga
I have just pushed changes to the org babel Ledger tutorial on Worg.
This should hopefully be propagated to the actual web site in due course
and will be found at:

: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ledger.php

I have removed the discussion on tangling and replaced this with the
more user friendly use of :noweb literate programming.  Comments are
more than welcome, of course!

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.14.g106ad)

___
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] make a timeline from a table?

2010-11-04 Thread Matt Price
Hi eveyone,

I'm trying to do something that seems really simple to me but i still don't
know how to do.  I want to draw a timeline that represents the stages of a
research project (inception, research, presentation, writing, submission,
publication...)  and I would like it to look something like this:


-
\ \
 \ \
  inceptionresearch

only I want it to be pretty, say with little circular nodes connecting the
diagonal lines to the main horizontal lines, and with the text aligned
diagonally along the lines.  Is there an easy way to do this in org, and
will it export say to html?  Or if not in org, some way to generate the
graphic from a set of datapoints?  I imagine this must exist but I don't
often make charts and graphics so I don't know how to do it.

Anyway, I appreciate your help.  Thanks,
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: extremely weird "bad sexp" errors with org-google-weather [was: extremely weird "bad sexp" errors]

2010-11-04 Thread Julien Danjou
On Wed, Nov 03 2010, Niels Giesen wrote:

> Of course, having this error intercepted in org-google-weather or in the
> general handling by org-mode would be preferable.

I've added such a fix, hoping it will work better. :)

-- 
Julien Danjou
// ᐰhttp://julien.danjou.info

___
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] [patch] two bugs: one with comments and with exporting inline tasks

2010-11-04 Thread Eric S Fraga
Nicolas Goaziou  writes:

> Oh my...
>
> Here is the third (and hopefully final) version of the patch.
>
> Sorry for the noise.
>
> -- Nicolas
>
>

Thanks Nicolas.  This one does work partly especially when exporting the
whole document and is a definite improvement on what was there before!

The one problem it has is that the description environment should be
closed when the /end/ of the inline task is found.  At present, you are
closing the description environment well after that (I think when you
hit the next heading?).

Thanks again,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.14.g106ad.dirty)

___
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: right customization

2010-11-04 Thread Carsten Dominik


On Nov 4, 2010, at 10:54 AM, Andreas Röhler wrote:


Am 04.11.2010 09:29, schrieb Carsten Dominik:


On Nov 4, 2010, at 8:16 AM, Andreas Röhler wrote:





Hi Carsten,

thanks. Error was in my way to load the devel version

Have been told to follow instructions and load

;; (load "~/org-mode/lisp/org-install.elc")


By who?

the right customization is

(require 'org-install).


Hi Carsten,

that surprises me.

AFAIU

(require

only loads a feature, if it's not present already.
As my distributed Emacs comes with an --basically empty--
org-install.el, which provides it (but does nothing in reality, then
sending a "provide"), I'd be afraid its done here.


Hi Andreas,

also the org-install.el that comes with Emacs is only loded when  
you (or

some other package) issues a require.



So I'm nearly drowned.
In my imagination an explicite "load" overwrites the symbols  
unconditionally,

while "require" does a check.



This is correct, it does.  However, if you path is not setup  
correctly, things will *still* fail after that.  You were saying that  
this is the recommended way which it is not.  And it is a  
misconception to assume that all files that come with Emacs will  
always be loaded


- 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: plain list do not work under Xemacs.21.4 [7.01trans]

2010-11-04 Thread Carsten Dominik


On Nov 4, 2010, at 10:45 AM, Uwe Brauer wrote:


Regarding Re: [Orgmode] Bug: plain list do not work under
Xemacs.21.4 [7.01trans]; Carsten Dominik
 adds:



Hi Uwe,
I just talked to Michael.



We will try to make things work with 21.5, not 21.4.


The odd thing is it worked perfectly in 6.36c,


The list code has been totally revamped since then.
I think it is OK to request that if one wants to use an old version of  
XEmacs, that an old version of Org-mode should be used with it.



but ok that
is your decision   to make.

The latex export error still remains?


Probably.  If this is a bug with XEmacs 21.5, please write to Michael,  
I hope he will look into it.


- 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] Re: right customization

2010-11-04 Thread Andreas Röhler

Am 04.11.2010 09:29, schrieb Carsten Dominik:


On Nov 4, 2010, at 8:16 AM, Andreas Röhler wrote:





Hi Carsten,

thanks. Error was in my way to load the devel version

Have been told to follow instructions and load

;; (load "~/org-mode/lisp/org-install.elc")


By who?

the right customization is

(require 'org-install).


Hi Carsten,

that surprises me.

AFAIU

(require

only loads a feature, if it's not present already.
As my distributed Emacs comes with an --basically empty--
org-install.el, which provides it (but does nothing in reality, then
sending a "provide"), I'd be afraid its done here.


Hi Andreas,

also the org-install.el that comes with Emacs is only loded when you (or
some other package) issues a require.



So I'm nearly drowned.
In my imagination an explicite "load" overwrites the symbols 
unconditionally,

while "require" does a check.



If you have set up the load path correctly, so that your own version of
org is seen before the one coming wiht Emacs, the require will load the
right one.

I think this is all covered pretty extensively in our tutorials, FAQ etc,

- Carsten



Andreas


ANd, when you are using git, you

need to *make* org-install.el yourself.
*Alternatively, you can also do (require 'org), but this
only works because people apparently do overlook the
org-install part in the installation instructions.

- Carsten



However, it works here that way:

(load "~/org-mode/lisp/org.el")

Do you have an idea whats the reason?

Maybe it's useful to drop some note how to load the devel code.

Thanks again

Andreas




Go to beginning of sentence, or beginning of table field.
This will call `backward-sentence' or `org-table-beginning-of-field',
depending on context.


Cheers



which doesn't meet info.

See screenshot attached.

Checked from git-repo code

Thanks

Andreas
___

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


Re: [Orgmode] Bug: plain list do not work under Xemacs.21.4 [7.01trans]

2010-11-04 Thread Uwe Brauer
>> Regarding Re: [Orgmode] Bug: plain list do not work under
>> Xemacs.21.4 [7.01trans]; Carsten Dominik
>>  adds: 

   > Hi Uwe,
   > I just talked to Michael.

   > We will try to make things work with 21.5, not 21.4.

The odd thing is it worked perfectly in 6.36c, but ok that
is your decision   to make.

The latex export error still remains?

Uwe 


___
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: right customization

2010-11-04 Thread Carsten Dominik


On Nov 4, 2010, at 8:16 AM, Andreas Röhler wrote:





Hi Carsten,

thanks. Error was in my way to load the devel version

Have been told to follow instructions and load

;; (load "~/org-mode/lisp/org-install.elc")


By who?

the right customization is

(require 'org-install).


Hi Carsten,

that surprises me.

AFAIU

(require

only loads a feature, if it's not present already.
As my distributed Emacs comes with an --basically empty--
org-install.el, which provides it (but does nothing in reality, then  
sending a "provide"), I'd be afraid its done here.


Hi Andreas,

also the org-install.el that comes with Emacs is only loded when you  
(or some other package) issues a require.


If you have set up the load path correctly, so that your own version  
of org is seen before the one coming wiht Emacs, the require will load  
the right one.


I think this is all covered pretty extensively in our tutorials, FAQ  
etc,


- Carsten



Andreas


ANd, when you are using git, you

need to *make* org-install.el yourself.
*Alternatively, you can also do (require 'org), but this
only works because people apparently do overlook the
org-install part in the installation instructions.

- Carsten



However, it works here that way:

(load "~/org-mode/lisp/org.el")

Do you have an idea whats the reason?

Maybe it's useful to drop some note how to load the devel code.

Thanks again

Andreas




Go to beginning of sentence, or beginning of table field.
This will call `backward-sentence' or `org-table-beginning-of- 
field',

depending on context.


Cheers



which doesn't meet info.

See screenshot attached.

Checked from git-repo code

Thanks

Andreas
bug.png>___

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


Re: [Orgmode] [patch] two bugs: one with comments and with exporting inline tasks

2010-11-04 Thread Nicolas Goaziou
Oh my...

Here is the third (and hopefully final) version of the patch.

Sorry for the noise.

-- Nicolas

>From a51b8a7919b935559a8716aa959851e7960d7ec4 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Thu, 4 Nov 2010 08:03:48 +0100
Subject: [PATCH] inlinetasks: fix latex export wrt conversion to lists

* org-inlinetask.el (org-inlinetask-export-handler): Remove protection
  from @ so it can be removed during LaTeX export.
---
 lisp/org-inlinetask.el |   22 ++
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index c000999..f3fcee9 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -183,15 +183,13 @@ Either remove headline and meta data, or do special 
formatting."
  (setq headline (concat
  (if (match-end 2)
  (concat
-  (org-add-props
-  (format
-   "@ %s@"
-   (if (member (match-string 2 headline)
-   org-done-keywords)
-   "done" "todo")
-   (match-string 2 headline)
-   (match-string 2 headline))
-  nil 'org-protected t)
+  (format
+   "@ %s@"
+   (if (member (match-string 2 headline)
+   org-done-keywords)
+   "done" "todo")
+   (match-string 2 headline)
+   (match-string 2 headline))
   " ") "")
  (match-string 4 headline)))
  (when content
@@ -200,11 +198,11 @@ Either remove headline and meta data, or do special 
formatting."
  (if (string-match "[ \t\n]+\\'" content)
  (setq content (substring content 0 (match-beginning 0
  (setq content (org-remove-indentation content))
- (if latexp (setq content (concat "\\quad \n" content)
+ (if latexp (setq content (concat "\\nbsp \\quad " content)
  (insert (make-string (org-inlinetask-get-current-indentation) ?\ )
- "- ")
+ "-  ")
  (setq indent (make-string (current-column) ?\ ))
- (insert headline " ::")
+ (insert headline " :: ")
  (if content
  (insert (if htmlp " " (concat "\n" indent))
  (mapconcat 'identity (org-split-string content "\n")
-- 
1.7.3.2

___
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] [patch] two bugs: one with comments and with exporting inline tasks

2010-11-04 Thread Nicolas Goaziou
Please disregard the last patch: it is buggy. Here is the new one.

Also, there is only one patch, even though it says [1/2].

-- Nicolas

>From e800cbfbb9e44d69f14bee874ce62e9a23224dab Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Thu, 4 Nov 2010 08:03:48 +0100
Subject: [PATCH 1/2] inlinetasks: fix latex export wrt conversion to lists

* org-inlinetask.el (org-inlinetask-export-handler): Remove protection
  from @ so it can be removed during LaTeX export.
---
 lisp/org-inlinetask.el |   22 ++
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index c000999..e67772e 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -183,15 +183,13 @@ Either remove headline and meta data, or do special 
formatting."
  (setq headline (concat
  (if (match-end 2)
  (concat
-  (org-add-props
-  (format
-   "@ %s@"
-   (if (member (match-string 2 headline)
-   org-done-keywords)
-   "done" "todo")
-   (match-string 2 headline)
-   (match-string 2 headline))
-  nil 'org-protected t)
+  (format
+   "@ %s@"
+   (if (member (match-string 2 headline)
+   org-done-keywords)
+   "done" "todo")
+   (match-string 2 headline)
+   (match-string 2 headline))
   " ") "")
  (match-string 4 headline)))
  (when content
@@ -200,11 +198,11 @@ Either remove headline and meta data, or do special 
formatting."
  (if (string-match "[ \t\n]+\\'" content)
  (setq content (substring content 0 (match-beginning 0
  (setq content (org-remove-indentation content))
- (if latexp (setq content (concat "\\quad \n" content)
+ (setq content (if latexp (concat "\\nbsp \\quad " content)
  (insert (make-string (org-inlinetask-get-current-indentation) ?\ )
- "- ")
+ "-  ")
  (setq indent (make-string (current-column) ?\ ))
- (insert headline " ::")
+ (insert headline " :: ")
  (if content
  (insert (if htmlp " " (concat "\n" indent))
  (mapconcat 'identity (org-split-string content "\n")
-- 
1.7.3.2

___
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] two bugs: one with comments and with exporting inline tasks

2010-11-04 Thread Nicolas Goaziou
Hello,

> Eric S Fraga writes:

> I have done so and there's some interesting behaviour. Here is a
> summary of 4 different results exporting essentially the same
> content for the attached org file:

> 1. export the whole file (C-cC-ed) produces a document with all the
> content but with the inline task defining a latex =\item= with a
> strange label (as indicated in my earlier message).

> 2. go to the headline and select the sub-tree (C-c@) and then export
> (C-cC-ed) generates a PDF with only the text up to the start (but
> not including) of the inline task.

> 3. place the cursor on *point 1* and export the sub-tree (C-cC-e1d)
> generates the same output as the previous point.

> 4. finally, place the cursor on *point 2* and export the sub-tree
> (C-cC-e1d) exports only the text *after* the inline task.

I have made an attempt to solve the first problem. Please have a look
at the provided patch.

As I didn't know what inline tasks should like in latex, it is for now
a description list separated from its body (if any) with a newline.
This doesn't look so good but, well, if there is better as a default
value, tell me. Note that, AFAICS, there is no way to configure the
appearance either.

The others problems look hairier to me.

Regards,

-- Nicolas

>From de9453852106fbdb542fa4751c355fd02da052bd Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Thu, 4 Nov 2010 08:03:48 +0100
Subject: [PATCH 1/2] inlinetasks: fix latex export wrt conversion to lists

* org-inlinetask.el (org-inlinetask-export-handler): Remove protection
  from @ so it can be removed during LaTeX export.
  Remove terminator as it is already handled by org-exp.el.
---
 lisp/org-inlinetask.el |   26 +++---
 1 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index c000999..c305d56 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -183,15 +183,13 @@ Either remove headline and meta data, or do special 
formatting."
  (setq headline (concat
  (if (match-end 2)
  (concat
-  (org-add-props
-  (format
-   "@ %s@"
-   (if (member (match-string 2 headline)
-   org-done-keywords)
-   "done" "todo")
-   (match-string 2 headline)
-   (match-string 2 headline))
-  nil 'org-protected t)
+  (format
+   "@ %s@"
+   (if (member (match-string 2 headline)
+   org-done-keywords)
+   "done" "todo")
+   (match-string 2 headline)
+   (match-string 2 headline))
   " ") "")
  (match-string 4 headline)))
  (when content
@@ -200,11 +198,11 @@ Either remove headline and meta data, or do special 
formatting."
  (if (string-match "[ \t\n]+\\'" content)
  (setq content (substring content 0 (match-beginning 0
  (setq content (org-remove-indentation content))
- (if latexp (setq content (concat "\\quad \n" content)
+ (setq content (if latexp (concat "\\nbsp \\quad " content)
  (insert (make-string (org-inlinetask-get-current-indentation) ?\ )
- "- ")
+ "-  ")
  (setq indent (make-string (current-column) ?\ ))
- (insert headline " ::")
+ (insert headline " :: ")
  (if content
  (insert (if htmlp " " (concat "\n" indent))
  (mapconcat 'identity (org-split-string content "\n")
@@ -212,7 +210,7 @@ Either remove headline and meta data, or do special 
formatting."
(insert "\n"))
  (insert indent)
  (backward-delete-char 2)
- (insert "THISISTHEINLINELISTTEMINATOR\n"))
+ (unless latexp (insert "THISISTHEINLINELISTTEMINATOR\n")))
 
 (defun org-inlinetask-get-current-indentation ()
   "Get the indentation of the last non-while line above this one."
@@ -266,8 +264,6 @@ Either remove headline and meta data, or do special 
formatting."
   '(add-hook 'org-font-lock-hook 'org-inlinetask-fontify))
 (eval-after-load "org-html"
   '(add-hook 'org-export-html-final-hook 'org-inlinetask-remove-terminator))
-(eval-after-load "org-latex"
-  '(add-hook 'org-export-latex-final-hook 'org-inlinetask-remove-terminator))
 (eval-after-load "org-ascii"
   '(add-hook 'org-export-ascii-final-hook 'org-inlinetask-remove-terminator))
 (eval-after-load "org-docbook"
-- 
1.7.3.2

___
Emacs-orgmode mailin

Re: [Orgmode] Using macros in worg

2010-11-04 Thread Benny Simonsen
2010/11/3 Sebastian Rose :
> Benny Simonsen  writes:
>>> there's no special setup needed.
>>
>> I had an old org-mode, after upgrade the macros are expanded :)
>>
>> I would like to auto-publish the web page when I push to the central server.
>
>
> You might be interested in this document:
>
>   http://orgmode.org/worg/worg-setup.php

Yep - I will look into it.

>
> and in the scripts in .git/hooks/  (which come with git).

There are example scripts comming with git (.git/hooks/*.sample).

Just to be sure - Worg don't use the hooks, but publishes the website
via a publish cron job (step 2).
I would expect that step 2 could be replaced by a .git hook via "mv
~/bin/publish-worg.sh .git/hooks/post-receive".

Step one can be omitted if the server with the central git repository
can write the files to the webserver.

I will try it.

Thanks
/Benny


>
>
>  Sebastian
>

___
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] right customization

2010-11-04 Thread Andreas Röhler




Hi Carsten,

thanks. Error was in my way to load the devel version

Have been told to follow instructions and load

;; (load "~/org-mode/lisp/org-install.elc")


By who?

the right customization is

(require 'org-install).


Hi Carsten,

that surprises me.

AFAIU

(require

only loads a feature, if it's not present already.
As my distributed Emacs comes with an --basically empty--
org-install.el, which provides it (but does nothing in reality, then 
sending a "provide"), I'd be afraid its done here.


Andreas


ANd, when you are using git, you

need to *make* org-install.el yourself.
*Alternatively, you can also do (require 'org), but this
only works because people apparently do overlook the
org-install part in the installation instructions.

- Carsten



However, it works here that way:

(load "~/org-mode/lisp/org.el")

Do you have an idea whats the reason?

Maybe it's useful to drop some note how to load the devel code.

Thanks again

Andreas




Go to beginning of sentence, or beginning of table field.
This will call `backward-sentence' or `org-table-beginning-of-field',
depending on context.


Cheers



which doesn't meet info.

See screenshot attached.

Checked from git-repo code

Thanks

Andreas
___
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] Re: Umlauts in LaTeX export

2010-11-04 Thread Stefan Vollmar
Dear Richard,

Nick was absolutely right in pointing out that all postings about using Umlauts 
in a more direct fashion in the LaTeX source assume that the buffer is encoded 
in UTF-8 and that "\usepackage[utf8]{inputenc}" is included in the LaTeX file 
(org does this by default).

I have been using a "(prefer-coding-system 'utf-8)" line in my .emacs file for 
some time and it works well for me. All better version control systems should 
be able to handle UTF-8 correctly (however, I believe that you might lose some 
functionality when using UTF-16 or other unicode flavours as files with this 
encoding might be treated as binary).

Warm regards,
 Stefan
-- 
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213  FAX +49-221-4726-298
Tel.: +49-221-478-5713  Mobile: 0160-93874279
Email: voll...@nf.mpg.de   http://www.nf.mpg.de








smime.p7s
Description: S/MIME cryptographic 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