[Orgmode] [OT-emacs] Scrolling horizontally

2011-01-31 Thread Marcelo de Moraes Serpa
Hi list,

This might be slightly OT, but I started to miss the trackpad
functionality I have on MacVim. Not that I use it while programming,
but it could be useful to navigate through long orgfiles that span
across the available emacs width (without needing to use wrapping).
The only way I've found was to actually go to the long line and press
C-e, which is totally not what I would like :)

As a side note, scrolling in MacVim seems to be much better
implemented than in Cocoa emacs. Cocoa emacs jumps the lines (i.e it's
not smooth) making you loose track of where you are. MacVim has smooth
scrolling, not sure if it's pixel based but works much better and
integrates seamlessly with the Mac trackpad. Now, I've already talked
about this on the emacs mailing list, unsurprisingly, most of the
folks just said "why would you want that". Sad.

Anyway, what I would like is just a way to scroll horizontally in
emacs using the Mac trackpad. Does anyone know if it's possible?

Cheers,

Marcelo.

___
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] Status google calendar sync

2011-01-31 Thread Torsten Wagner
> So would it be possible to build a native emacs for android?

I checked this a while ago and unfortunately emacs comes with a relatively
large pack of dependencies. Android on the other side does not deliver many
standard libraries. Xorg libc and afaik dbus are a few dependencies which
are not (natively) available on Android.
I tried Emacs in a debian chroot on my keyboard less device. It wasn't
really usable and I doubt that keyboard based smartphones are much better
since they most likely miss alt ctrl and other important keys.

Ideally we have something like Mobileorg and a emacs dameon running.
Mobileorg could send emacs elisp code to execute and access all org-mode
functions natively. This would allow to "reduce" mobileorgs task to
touchfriendly input and result representation.

If I manage to port a very basic version of emacs to android I will let you
know.

Greetings
Totti
___
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] Re: Bug: UTF-8 characters in #+LINK does not work [7.4]

2011-01-31 Thread Bastien Guerry
Patch 568 (http://patchwork.newartisans.com/patch/568/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C87d3nchlkj.fsf%40keller.adm.naquadah.org%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] Re: Bug: UTF-8 characters in #+LINK does not work [7.4]
> Date: Tue, 01 Feb 2011 01:20:28 -
> From: Julien Danjou 
> X-Patchwork-Id: 568
> Message-Id: <87d3nchlkj@keller.adm.naquadah.org>
> To: Matt Lundin 
> Cc: Gustav =?utf-8?Q?Wikstr=C3=B6m?= ,
>   emacs-orgmode@gnu.org
> 
> On Sat, Jan 29 2011, Matt Lundin wrote:
> 
> > The regexp in org-link-expand-abbrev does not allow for accented
> > characters in the link abbreviation. I am not sure whether this is an
> > intended limitation or a bug. :)
> 
> I don't see any reason. Patch attached.
> 
> 
> >From 1ec1e178aaa6a9935819a873ae492be7a2ddb2f6 Mon Sep 17 00:00:00 2001
> From: Julien Danjou 
> Date: Mon, 31 Jan 2011 21:19:07 +0100
> Subject: [PATCH] Allow more char type in link abbrev
> 
> * org.el (org-link-expand-abbrev): Allow any type of character
> in link expand.
> 
> 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 808c9ed..044d2ac 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -8185,7 +8185,7 @@ call CMD."
>  
>  (defun org-link-expand-abbrev (link)
>"Apply replacements as defined in `org-link-abbrev-alist."
> -  (if (string-match "^\\([a-zA-Z][-_a-zA-Z0-9]*\\)\\(::?\\(.*\\)\\)?$" link)
> +  (if (string-match "^\\([^:]*\\)\\(::?\\(.*\\)\\)?$" link)
>(let* ((key (match-string 1 link))
>(as (or (assoc key org-link-abbrev-alist-local)
>(assoc key org-link-abbrev-alist)))
> -- 
> 1.7.2.3
> 
> 

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


Re: [Orgmode] Re: Bug: UTF-8 characters in #+LINK does not work [7.4]

2011-01-31 Thread Julien Danjou
On Sat, Jan 29 2011, Matt Lundin wrote:

> The regexp in org-link-expand-abbrev does not allow for accented
> characters in the link abbreviation. I am not sure whether this is an
> intended limitation or a bug. :)

I don't see any reason. Patch attached.

From 1ec1e178aaa6a9935819a873ae492be7a2ddb2f6 Mon Sep 17 00:00:00 2001
From: Julien Danjou 
Date: Mon, 31 Jan 2011 21:19:07 +0100
Subject: [PATCH] Allow more char type in link abbrev

* org.el (org-link-expand-abbrev): Allow any type of character
in link expand.

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 808c9ed..044d2ac 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8185,7 +8185,7 @@ call CMD."
 
 (defun org-link-expand-abbrev (link)
   "Apply replacements as defined in `org-link-abbrev-alist."
-  (if (string-match "^\\([a-zA-Z][-_a-zA-Z0-9]*\\)\\(::?\\(.*\\)\\)?$" link)
+  (if (string-match "^\\([^:]*\\)\\(::?\\(.*\\)\\)?$" link)
   (let* ((key (match-string 1 link))
 	 (as (or (assoc key org-link-abbrev-alist-local)
 		 (assoc key org-link-abbrev-alist)))
-- 
1.7.2.3


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


pgptmY2jBcnhs.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] Encrypting org-mode files

2011-01-31 Thread Julien Danjou
On Sat, Jan 29 2011, Eric S Fraga wrote:

> Any suggestions?

% head -1 .gnupg/gpg.conf
use-agent

% cat .gnupg/gpg-agent.conf
default-cache-ttl 28800
max-cache-ttl 43200

That's all I got.

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


pgpjZRbaHbeWa.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] Problems with buffer-local variables

2011-01-31 Thread Dan Davison
Carsten Dominik  writes:

> On Dec 22, 2010, at 3:51 PM, Dan Davison wrote:
>
>> There's recently been some advocacy of using buffer-local variables
>> for
>> Org-mode configuration. It seems like a good idea to me. However, I
>> think that it raises a problem: there are at least two situations in
>> which Org internally spawns a buffer that is supposed to be a sort of
>> "copy" of another Org buffer: these situations are export and org-src
>> edit buffer. The problem is that the "copy" buffer doesn't inherit
>> local
>> variables from the parent buffer.
>>
>> It seems that either we should propagate all local variables in these
>> cases (but I suspect that is inappropriate for some variables), or we
>> have to have a rule for identifying the subset of local variables
>> which
>> need to be propagated.
>>
>> Below is one example which I think demonstrates a problem. If you
>> evaluate the elisp block and then export to HTML, the noweb does not
>> get
>> expanded, because the configuration variable is buffer-local (behind
>> the
>> scenes, Org creates a buffer copy just before exporting a buffer).
>>
>> --8<---cut here---start->8---
>> #+title: Local variables issues?
>>
>> Evaluate this block, then do C-c C-e h
>> #+begin_src emacs-lisp :results silent :exports none
>>  (set-default 'org-babel-default-header-args:sh
>>  nil)
>>  (set (make-local-variable 'org-babel-default-header-args:sh)
>>   '((:noweb . "yes")))
>> #+end_src
>>
>> #+begin_src sh :exports both
>> <>
>> #+end_src
>>
>> #+source: foo
>> #+begin_src sh :exports none
>> echo hello
>> #+end_src
>> --8<---cut here---end--->8---
>>
>> It's also a problem when spawning the org-src edit buffer. There is a
>> patch in the pipeline that tries to identify all the necessary local
>> variables and transmit them to the edit buffer:
>>
>> http://patchwork.newartisans.com/patch/438/
>>
>> That's a bit messy, but in the export case it seems even harder to
>> identify all variables that might need to be transmitted.
>>
>> What is a good solution?
>
>
> Hi Dan,
>
> I see only two possibilities.  Either use a list of variables that
> should be transported, or copy all local variables, or all local
> variables that match a pattern.  An example for doing something like
> this can be found in org-get-local-variables which is, for example,
> used by `org-run-like-in-org-mode'.

Here's a patch. It clones into the pre-export buffer all buffer-local
variables that match a regexp (currently "^\\(org-\\|orgtbl-\\)"). We
might want to watch out for unanticipated side effects.

This should mean that we can use buffer-local variables to set export
related variables on a per-buffer basis[1].

On reflection I think that the src edit buffer case should be dealt with
as it is currently (by ad-hoc transporting of variables in the org-src
code). I still stand by my pending patch 438, which tidies up the
local-variables stuff in org-edit-src-code.

http://patchwork.newartisans.com/patch/438/

Dan

Footnotes:
[1] Also, we can use the 'local argument to add-hook to set the various
export hooks.


Ensure that buffer-local variables have their effects during export.

* lisp/org.el (org-clone-local-variables): New function to copy local
variables from another buffer.
* lisp/org-exp.el (org-export-preprocess-string): Clone local
variables from source org buffer into temporary export preprocessing
buffer.

#+begin_src diff
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 97f17e5..6b333a7 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -1028,6 +1028,7 @@ on this string to produce the exported version."
 (inhibit-read-only t)
 (drawers org-drawers)
 (outline-regexp "\\*+ ")
+(source-buffer (current-buffer))
 target-alist rtn)
 
 (setq org-export-target-aliases nil
@@ -1051,6 +1052,7 @@ on this string to produce the exported version."
 
   (let ((org-inhibit-startup t)) (org-mode))
   (setq case-fold-search t)
+  (org-clone-local-variables source-buffer "^\\(org-\\|orgtbl-\\)")
   (org-install-letbind)
 
   ;; Call the hook
diff --git a/lisp/org.el b/lisp/org.el
index 808c9ed..dda97d9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8127,6 +8127,18 @@ Possible values in the list of contexts are `table', 
`headline', and `item'."
 x nil))
   varlist
 
+(defun org-clone-local-variables (from-buffer &optional regexp)
+  "Clone local variables from FROM-BUFFER.
+Optional argument REGEXP selects variables to clone."
+  (mapc
+   (lambda (pair)
+ (and (symbolp (car pair))
+ (or (null regexp)
+ (string-match regexp (symbol-name (car pair
+ (set (make-local-variable (car pair))
+  (cdr pair
+   (buffer-local-variables from-buffer)))
+
 ;;;###autoload
 (defun org-run-like-in-org-mode (cmd)
   "Run a command, pretending that the current b

Re: [Orgmode] Overlays and elisp code

2011-01-31 Thread Jeff Horn
I can reproduce this. emacs 23.1 and org 7.4

On Mon, Jan 31, 2011 at 5:04 AM, Andrea Crotti
 wrote:
> I found a strange behaviour which might be a bug, but maybe of my
> configuration.
>
> This is org mode version:
> Org-mode version 7.4 (release_7.4.199.g8be1.dirty)
> and emacs:
> "GNU Emacs 23.2.1 (x86_64-apple-darwin10.3.0, NS apple-appkit-1038.29)
>  of 2010-05-09 on linc"
>
> To reproduce the bug I do
> - go over an elisp code block
> - C-c ' to edit in the overlay
> - C-c ' to go back when done
>
> And it works perfectly, BUT if for example I remove a parenthesis before
> pressing C-c ', I can't go back.
>
> C-c ' becomes undefined and I have to kill both the overlay and the
> original buffer.
>
> While I was writing I also found the cause of the problem, Paredit!
> Removing the hook from emacs-lisp-mode-hook fixes this, but paredit is
> really useful with elisp, maybe someone has an idea of why this happens?
>
>
> ___
> 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
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


Re: [Orgmode] Status google calendar sync

2011-01-31 Thread Bastien
Hi Eric,

Eric S Fraga  writes:

> Please feel free to upload it to Worg.  

Done - should appear soon in 

  http://orgmode.org/worg/code/

with a link from 

  http://orgmode.org/worg/org-tools/

> I do actually have a task for myself to upload this and related
> scripts and to write some documentation (essentially what I wrote in
> my long email months ago when I posted these scripts) but I have just
> not had the time to spare (bad time of year work-wise...).  It's free
> to use, modify, copy, etc. No warranty blah blah blah.

Let this grow at its own pace, good luck for the work!

-- 
 Bastien

___
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] orgutil

2011-01-31 Thread Bastien
Hi Patrick,

Patrick Brennan  writes:

> I have created a TCL script which can be used to parse org files. Its
> primary purpose was for my personal use: I had a bunch of
> AbstractSpoon ToDoList files which needed to be converted to
> Org-mode. In the process I created a bidirectional converter: it will
> convert TDL to Org and vice-versa. It also has a lot of routines
> which might prove useful to the Org community.

This sounds great!  I added a link to it to Worg:

  http://orgmode.org/worg/org-tools/

A section about orgutil will appear on the next Worg export.
Feel free to request Worg access to Matt Lundin and to enrich 
this section with use cases.

Best,

-- 
 Bastien

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


Re: [Orgmode] Export issue of URL when the text begins with a date‏

2011-01-31 Thread Bastien
David Maus  writes:

> Attached patch factors out the link handling part of
> `org-export-as-html' in a separat function which takes the processed
> line and the exporting options as arguments and returns the possibly
> modified line.  Having the link handling in a separate function makes
> it way easier to test this specific behaviour of export.

Quite useful indeed -- I hope org-export-as-html looks a bit less
daunting now :)

-- 
 Bastien

___
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-faq: Invalid XHTML

2011-01-31 Thread Bastien
David Maus  writes:

> At Tue, 11 Jan 2011 03:31:11 +0530,
> Jambunathan K wrote:
>>
>>
>> There are 16 errors while validating org-faq page.
>>
>> http://validator.w3.org/check?uri=http%3A%2F%2Forgmode.org%2Fworg%2Forg-faq.html&charset=%28detect+automatically%29&doctype=Inline&group=0
>>
>> Can such errors be not caught as soon as it happens?

Jambunathan: thanks for the report!

> Attached patch fixes a glitch in Org's HTML export and mitigates the
> problem of invalid id and name attributes.

David, thanks a lot for this patch.  It fixes quite a lot of problems.
I've also pushed a tiny fix to use  instead of .

-- 
 Bastien

___
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-faq: Invalid XHTML

2011-01-31 Thread Bastien Guerry
Patch 563 (http://patchwork.newartisans.com/patch/563/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C87lj23eqa7.wl%25dmaus%40ictsoc.de%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-faq: Invalid XHTML
> Date: Sat, 29 Jan 2011 19:30:08 -
> From: David Maus 
> X-Patchwork-Id: 563
> Message-Id: <87lj23eqa7.wl%dm...@ictsoc.de>
> To: Jambunathan K 
> Cc: emacs-orgmode@gnu.org
> 
> At Tue, 11 Jan 2011 03:31:11 +0530,
> Jambunathan K wrote:
> >
> >
> > There are 16 errors while validating org-faq page.
> >
> > http://validator.w3.org/check?uri=http%3A%2F%2Forgmode.org%2Fworg%2Forg-faq.html&charset=%28detect+automatically%29&doctype=Inline&group=0
> >
> > Can such errors be not caught as soon as it happens?
> 
> Attached patch fixes a glitch in Org's HTML export and mitigates the
> problem of invalid id and name attributes.
> 
> Best,
>   -- David
> 
> ---
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber dmj...@jabber.org
> Email. dm...@ictsoc.de
> >From 7d3072bec82934499d463a076488dc7b36192756 Mon Sep 17 00:00:00 2001
> From: David Maus 
> Date: Sat, 29 Jan 2011 15:19:53 +0100
> Subject: [PATCH] Create proper id and name attribute values
> 
> * org-html.el (org-export-as-html)
> (org-export-html-format-image, org-format-org-table-html)
> (org-html-level-start): Solidify link targets.
> * org-exp.el (org-solidify-link-text): Use better regexp and replace
> string for id attributes.
> 
> This fixes a problem with HTML export reported by Jambunathan K
>  gmail.com>.
> 
> The regexp of invalid characters in `org-solidify-link-text' is
> oriented towards the xml:id 1.0 specification
> (cf. http://www.w3.org/TR/xml-id/).
> ---
>  lisp/org-exp.el  |2 +-
>  lisp/org-html.el |   17 +
>  2 files changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
> index a055bac..97f17e5 100644
> --- a/lisp/org-exp.el
> +++ b/lisp/org-exp.el
> @@ -1971,7 +1971,7 @@ can work correctly."
>  (let* ((rtn
>   (mapconcat
>'identity
> -  (org-split-string s "[ \t\r\n]+") "=="))
> +  (org-split-string s "[^a-zA-Z0-9_\\.-]+") "--"))
>  (a (assoc rtn alist)))
>(or (cdr a) rtn
>  
> diff --git a/lisp/org-html.el b/lisp/org-html.el
> index 9a5d225..8faf60f 100644
> --- a/lisp/org-html.el
> +++ b/lisp/org-html.el
> @@ -1150,7 +1150,7 @@ lang=\"%s\" xml:lang=\"%s\">
>(setq href
>  (replace-regexp-in-string
>   "\\." "_" (format "sec-%s" 
> snumber)))
> -  (setq href (or (cdr (assoc href 
> org-export-preferred-target-alist)) href))
> +  (setq href (org-solidify-link-text (or 
> (cdr (assoc href org-export-preferred-target-alist)) href)))
>(push
> (format
>  (if todo
> @@ -1814,7 +1814,7 @@ lang=\"%s\" xml:lang=\"%s\">
>   (format "%s
>  "
>   (if org-par-open "\n" "")
> - (if label (format "id=\"%s\" " label) "")))
> + (if label (format "id=\"%s\" " (org-solidify-link-text 
> label)) "")))
>   (format ""
>   src
>   (if (string-match "\\ @@ -1999,7 +1999,7 @@ for formatting.  This is required for the DocBook 
> exporter."
>;; DocBook document, we want to always include the caption to make
>;; DocBook XML file valid.
>(push (format "%s" (or caption "")) html)
> -  (when label (push (format "" label label)
> +  (when label (push (format "" 
> (org-solidify-link-text label) (org-solidify-link-text label))
>   html))
>(push html-table-tag html))
>  (setq html (mapcar
> @@ -2327,7 +2327,8 @@ When TITLE is nil, just close all open levels."
>  (setq extra-targets (remove (or preferred target) extra-targets))
>  (setq extra-targets
> (mapconcat (lambda (x)
> -(if (org-uuidgen-p x) (setq x (concat "ID-" x)))
> +(setq x (org-solidify-link-text
> + (if (org-uuidgen-p x) (concat "ID-" x) x)))
>  (format ""
>  x x))
>extra-targets
> @@ -2363,13 +2364,13 @@ When TITLE is nil, just close all open levels."
>   (progn
> (org-close-li)
> (if target
> -   (insert (format "" (or preferred target))
> +   (insert (format "" (org-solidify-link-text 
> (or preferred target)))
> extra-targets title "\n")
>   (insert "" title "\n")))

[Accepted] [Orgmode] Export issue of URL when the text begins with a date‏

2011-01-31 Thread Bastien Guerry
Patch 565 (http://patchwork.newartisans.com/patch/565/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C87sjwae2ar.wl%25dmaus%40ictsoc.de%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] Export issue of URL when the text begins with a
>   =?UTF-8?B?ZGF0ZeKAjw==?=
> Date: Sun, 30 Jan 2011 22:20:28 -
> From: David Maus 
> X-Patchwork-Id: 565
> Message-Id: <87sjwae2ar.wl%dm...@ictsoc.de>
> To: Bastien 
> Cc: David Maus ,
>   Vincent =?UTF-8?B?QmVsYcOvY2hl?= ,
>   Org mode 
> 
> At Mon, 17 Jan 2011 18:55:54 +0100,
> Bastien wrote:
> >
> > David Maus  writes:
> >
> > >> It seems that such a non-regression test base and script do not
> > >> exist. However that would be good to have in order to check that any
> > >> correction does not break anything.
> > >
> > > That's exactly what the testing framework[1] could and should do.
> > > I've just not figured out how to best write tests for entire export
> > > operations.  Thinking of it: We could create an input file dedicated
> > > to test link exporting, put in different kinds of links, export and
> > > then use regexps to check if the links have been exported fine.
> >
> > I've just added testing/links.org to the testing framework.
> >
> > Vincent, feel free to suggest any addition to testing/ so that we can
> > enrich our test-base with various examples!  Being able to reproduce
> > errors on those files will help people feel confident the error does
> > not come from their configuration.
> 
> Attached patch factors out the link handling part of
> `org-export-as-html' in a separat function which takes the processed
> line and the exporting options as arguments and returns the possibly
> modified line.  Having the link handling in a separate function makes
> it way easier to test this specific behaviour of export.
> 
> Best,
>   -- David
> 
> ---
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber dmj...@jabber.org
> Email. dm...@ictsoc.de
> >From ea1c1e8528af0490c03133a09575e72fa4d0f352 Mon Sep 17 00:00:00 2001
> From: David Maus 
> Date: Sun, 30 Jan 2011 18:12:06 +0100
> Subject: [PATCH] Factor out link Handling during export
> 
> * org-html.el (org-html-handle-links): New function. Factor out link Handling
> during export.
> (org-export-as-html): Use new function.
> 
> Putting the entire logic of link handling in a separate function makes
> it easier to test the link creation during html export and maybe
> refactor the function in the future.  The body of the function is a
> 1:1 copy of the original code in `org-export-as-html', symbols which
> were used by the link handling exclusively are removed from
> `org-export-as-html'.
> ---
>  lisp/org-html.el |  332 
> --
>  1 files changed, 171 insertions(+), 161 deletions(-)
> 
> diff --git a/lisp/org-html.el b/lisp/org-html.el
> index 9a5d225..2216852 100644
> --- a/lisp/org-html.el
> +++ b/lisp/org-html.el
> @@ -795,6 +795,173 @@ MAY-INLINE-P allows inlining it as an image."
>  (org-export-html-format-desc desc)
>  "")
>  
> +(defun org-html-handle-links (line opt-plist)
> +  "Return LINE with markup of Org mode links.
> +OPT-PLIST is the export options list."
> +  (let ((start 0)
> + (current-dir (if buffer-file-name
> +   (file-name-directory buffer-file-name)
> + default-directory))
> + (link-validate (plist-get opt-plist :link-validation-function))
> + type id-file fnc
> + rpl path attr desc descp desc1 desc2 link)
> +(while (string-match org-bracket-link-analytic-regexp++ line start)
> +  (setq start (match-beginning 0))
> +  (setq path (save-match-data (org-link-unescape
> +(match-string 3 line
> +  (setq type (cond
> +   ((match-end 2) (match-string 2 line))
> +   ((save-match-data
> +  (or (file-name-absolute-p path)
> +  (string-match "^\\.\\.?/" path)))
> +"file")
> +   (t "internal")))
> +  (setq path (org-extract-attributes (org-link-unescape path)))
> +  (setq attr (get-text-property 0 'org-attributes path))
> +  (setq desc1 (if (match-end 5) (match-string 5 line))
> + desc2 (if (match-end 2) (concat type ":" path) path)
> + descp (and desc1 (not (equal desc1 desc2)))
> + desc (or desc1 desc2))
> +  ;; Make an image out of the description if that is so wanted
> +  (when (and descp (org-file-image-p
> + desc org-export-html-inline-image-extensions))
> + (save-match-data
> +   (if (string-match "^file:" desc)
> +   (setq desc (substring desc (match-end 0)
> + (setq desc (org-add-props
> +(concat "")
> +'(o

[Orgmode] Re: Merging .org files

2011-01-31 Thread Pere Quintana Seguí
Al 30/01/11 22:51, En/na Matt Lundin ha escrit:
> Pere Quintana Seguí  writes:
> 
>> In my current system, I have about 200 .org files. With this number of
>> files, building the agenda is very slow in my home computer and, also,
>> makes the performance of MobileOrg quite poor.
>>
>> So, I would like to join files, to increase the system's performance.
> 
> FWIW, I've found the opposite to be true. Splitting up larger files and
> reducing the depth of the hierarchy marginally improves agenda
> performance (~ 0.2 seconds acc. to elp). But in my case, I split 10
> files into 40, so I have no idea what 200 files would do. Perhaps
> there's a sweet spot somewhere? I also haven't used mobile org.

So, maybe my initial assumption is wrong.

Has anybody run some experiments to check if it is better to have a
small number of big files or many small files?


> In my experience, archiving old items and reducing the number of active
> todos is the best way to keep the agenda snappy.
> 
>> Is there any script to cleanly join files, by transforming the title of
>> the file in a first level heading (*) and adding an star to all other
>> headings of the file?
> 
> Perl is always handy for this type of thing:
> 
> --8<---cut here---start->8---
> #!/usr/bin/perl
> use strict;
> use warnings;
> 
> my $mergefile = "/tmp/merged.org";
> 
> open NEWFILE, ">", $mergefile 
>   or die "Can't open $mergefile: $!";
> 
> while (<>) {
>   s/^(\*+)/*$1/;
>   s/^#\+TITLE:\s+(.*)$/* $1/;
>   s/^(#\+\w+:.*)$/: $1/;
>   print NEWFILE "$_";
> }
> 
> close NEWFILE;
> --8<---cut here---end--->8---
> 
> Note: This is a quick proof of concept. Use at your own risk. ;)

Great, thank you!

Pere


-- 
Dr. Pere Quintana Seguí
Observatori de l'Ebre (Universitat Ramon Llull - CSIC)
Horta Alta, 38. 43520 Roquetes (Tarragona), Spain.
T. (+34) 977 500 511 - F. (+34) 977 504 660
http://www.obsebre.es - http://pere.quintanasegui.com
GnuPG:2CAB4330
http://pere.quintanasegui.com/coses/key-transition.txt



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


[Orgmode] [CRASH] org-pretty-entities causes emacs to take 100% CPU

2011-01-31 Thread Vladimir Alexiev
1. Evaluate this:
(setq org-entities-user  ; name latex math-p html ascii latin1 utf8
  '(("ok" nil nil "ચ" "OK" "OK" "✔")
("nok" nil nil "ઞ" "NOK" "NOK" "✘")))
(setq org-pretty-entities t); \ok -> ✔ in buffer

2. Put this in an org buffer
- \ok Deploy on x
- \nok Deploy on y
- \nok Use a hosted version 
It should display the UTF graphic chars above (checkmark and cross)

3. Step on the mark and move around
- left/right: ok
- up: gives error "Args out of range"
- down: causes emacs to take 100% CPU, no response, have to kill it
GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2010-11-10 on SHAN-PC

Not 100% sure the above is reproducible (got tired of having to kill my emacs),
but if someone takes up debugging, I'll give more precise steps


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


Re: [Orgmode] export Org file as UTF-8 text file generate error and do not output file

2011-01-31 Thread Giovanni Ridolfi
Carl Bolduc  writes:

Hi, Carl,
>
> I run Emacs 23.2.1 on Windows 7 and Org's version is 7.3.

Here: 
Org-mode version 7.4 commit-de39bf05bea84b842711faa49e560ea4bc087211
GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600) of 2010-05-08 on G41R2F1
Windows XP

> When I do "C-c C-e u" to export an Org file as UTF-8 text file, I get the
> following message: "if: Wrong type argument: commandp, org-export-as-utf8"
> and nothing is exported.
>
> Exporting to ASCII works as expected.

I cannot reproduce it. But my version is newer than yours.
Would you please:

1. upgrade your version
2. verify if it happens with the new stable version
3. post an example file so I will try to reproduce with your file

cheers,
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] $0 replaced with ampersand (&) when invoking `org-edit-special'

2011-01-31 Thread Niels Giesen
On 30-1-2011 17:32, David Maus wrote:
> At Sun, 09 Jan 2011 14:36:45 +0100,
> David Maus wrote:
>> I can reproduce this with
>>
>> Org-mode version 7.4 (release_7.4.135.g84087)
>>
>> GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
>>  of 2010-12-11 on raven, modified by Debian
>>
>> And it sure looks like a bug to me.
> I did a first shot on a fix but are currently stuck with the question
> how to represent a reference to the current cell ($0) in the
> alphabetical notation.  Any suggestions?
>

Great to hear you are working on this. Perhaps simply keep $0, that
would mean no changes to the documentation are needed. Or maybe the
single ampersand (&) that is currently substituted for $0...

Thing is, of course, that whatever is the substitution should work in
calculations.

Anyone else wanting to chime in?

Regards,
Niels.

> Best,
>   -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber dmj...@jabber.org
> Email. dm...@ictsoc.de
>
>
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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


Re: [Orgmode] [ANN] OpenDocumentText/OpenOffice Exporter - 0.6 Release

2011-01-31 Thread Christian Moe

Hi,

This is great, and I look forward to seeing it as part of Org-mode.

Thanks for the detailed git instructions. Haven't dared try before.

Some feedback:

- *Captions/labels/references* do not yet integrate well with
  OpenOffice.

  - The illustration in sec 6.2.2 is captioned "Illustration fig:1024
Unicorn Logo", echoing the label. One would probably prefer
something *auto-numbered* like "Illustration 1: Unicorn Logo".

- (Even better if there were possible to choose other types names,
  like Chart, Figure, etc.).

  - The reference to the same illustration is a hyperlink containing
part of the label text ("1024"). A *cross-reference field* would
be preferable to a hyperlink, and "Illustration 1" or similar
better than "1024".

  - The table caption in sec 9.2, on the other hand, works the way I
would want illustration captions to work: What appears in the
caption is not the label text ("table:10"), but the auto-numbered
"Table 1 An Example Table".

- (It would be nice to have a colon or other *separator* between
  label and caption text: "Table 1: An Example Table".)

  - However, the reference to that table appears as a hyperlink saying
"10", and the hyperlink does not appear to work. A cross-reference
link to "Table 1" would be better.

- It might also be preferable to have links to inline targets, at
  least headline and CUSTOM_ID targets, exported as *cross-reference
  fields* rather than hyperlinks. In OpenOffice, a cross-reference
  field can give e.g. the automatically updated page number the target
  is at.

Exporting one of my own documents, I also found that:

- A space is inserted before *footnote markers*; it shouldn't be. You
  can't see this in the text document, where there is space before all
  footnote references anyway.

- Paragraphs were frequently split up, mid-sentence, by unwanted
  paragraph breaks. This bug is a bit of a mystery. The extra
  paragraph breaks appear where there is a newline in the text. But I
  can't discern any pattern as to why breaks are inserted at these
  newlines and not others. Nothing similar happens in HTML export.

Hope this helps you refine a really helpful contribution.

Yours,
Christian


On 1/28/11 10:46 PM, Jambunathan K wrote:


I am happy to make available 0.6 release of OpenOffice/OpenDocumentText
exporter. The exporter is based on org-parse.el contributed by Lennart
Borgman.

Web URL:
- http://repo.or.cz/w/org-mode/org-jambu.git

Checkout URLs:
- git://repo.or.cz/org-mode/org-jambu.git
- http://repo.or.cz/r/org-mode/org-jambu.git


1. Checkout my repo

#+begin_src sh
   git remote add org-odt http://repo.or.cz/r/org-mode/org-jambu.git
   git fetch org-odt
   git checkout -b org-odt org-odt/master
#+end_src

2. Create a simple "~/elisp/org-odt-setup.el" with the following
content. Replace "~/src/staging/org-mode" with the root of your
checkout dir..

#+begin_src emacs-lisp
   (custom-set-variables
'(initial-buffer-choice "~/src/staging/org-mode/contrib/odt/files/test.org")
'(org-export-latex-default-packages-alist (quote (("AUTO" "inputenc" t
'(org-export-with-LaTeX-fragments (quote dvipng))
   )

   (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
   (setq org-odt-base-dir "~/src/staging/org-mode")
   (load-file (expand-file-name "contrib/odt/setup.el" org-odt-base-dir))
#+end_src

3. Launch a minimal emacs and load the above file.

runemacs.exe -Q --load ~/elisp/org-odt-setup.el

You will find yourself in a 'test.org' buffer.

4. Use 'C-c C-e O' to export the above buffer as ODT and open it with
the default system app i.e., OpenOffice Writer for example.

I am attaching the test.odt created in my machine using the above
instructions.

Lately, I have been finding myself a bit tied down with other things. So
this release is a kind of a 'hasty' release. Needless to say, there are
lots of areas where obvious improvements can be made.

I will be a bit slow in responding for next few weeks. Let that not hold
you back.





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


[Orgmode] Overlays and elisp code

2011-01-31 Thread Andrea Crotti
I found a strange behaviour which might be a bug, but maybe of my
configuration.

This is org mode version:
Org-mode version 7.4 (release_7.4.199.g8be1.dirty)
and emacs:
"GNU Emacs 23.2.1 (x86_64-apple-darwin10.3.0, NS apple-appkit-1038.29)
 of 2010-05-09 on linc"

To reproduce the bug I do
- go over an elisp code block
- C-c ' to edit in the overlay
- C-c ' to go back when done

And it works perfectly, BUT if for example I remove a parenthesis before
pressing C-c ', I can't go back.

C-c ' becomes undefined and I have to kill both the overlay and the
original buffer.

While I was writing I also found the cause of the problem, Paredit!
Removing the hook from emacs-lisp-mode-hook fixes this, but paredit is
really useful with elisp, maybe someone has an idea of why this happens?


___
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] Status google calendar sync

2011-01-31 Thread Christopher Witte
 On 30 January 2011 02:21, Eric S Fraga  wrote:

> Torsten Wagner  writes:
>
>
> We need Emacs running on Android[1].  If Nokia can have Emacs native on
> their phones (n900), why can't Android???
>
> I can dream.
>
> vi is available, but not vim (so far as I know) so can't do org that
> way.
>

Apparently there is a native port of vim for android,
http://credentiality2.blogspot.com/2010/08/native-vim-for-android.html

So would it be possible to build a native emacs for android?

Chris.
___
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