Re: [O] Incorrect hexification in URLs in LaTeX Export

2014-05-25 Thread David Maus
Hi all,

At Sun, 25 May 2014 07:56:15 +0200,
Bastien wrote:
> 
> Hi Michael,
> 
> "R. Michael Weylandt "
>  writes:
> 
> > TLDR: remove ?\= from org-link-escape-chars.
> 
> Done (in master.)
> 
> I'm copying David since he's the author of this commit:
> http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=1a68b6
> 
> David, sorry to jump in, but are there any reason why the
> characters + ; and = where escaped in this commit?
> 

I think the only reason was that these characters already had been
escaped in `org-link-escape-chars'.

The commit removed the special rules for the letters with
diacritics. The previous commit (0c4bb0e) introduced an algorithm that
covered non-ASCII characters in general, thus special rules for
letters with diacritics where no longer necessary.

I can only speculate why they were escaped in the first place: + ; and
= do have special meaning in HTTP URIs and IIRC Org did not draw a
strict distinction between escaping for internal purposes and escaping
of HTTP URIs.

Best,
  -- David

> Thanks in advance,
> 
> -- 
>  Bastien



Re: [O] Incorrect hexification in URLs in LaTeX Export

2014-05-25 Thread Bastien
Hi David,

David Maus  writes:

> I can only speculate why they were escaped in the first place: + ; and
> = do have special meaning in HTTP URIs and IIRC Org did not draw a
> strict distinction between escaping for internal purposes and escaping
> of HTTP URIs.

Yes, that's certainly it -- thanks for enlightening me on this.

+ ; and = are not the only reserved characters, cf. RFC 3986 mentions
# @ and others that we don't escape.  So I think we're good here.

Best,

-- 
 Bastien



Re: [O] Incorrect hexification in URLs in LaTeX Export

2014-05-25 Thread David Maus

Followup: There has been a discussion about hex-escaping last year
with some back-and-forth on the topic of link escaping:

http://thread.gmane.org/gmane.emacs.orgmode/74983/focus=75002

It's quite a muddy area.

Best,
  -- David

At Sun, 25 May 2014 09:09:50 +0200,
David Maus wrote:
> 
> Hi all,
> 
> At Sun, 25 May 2014 07:56:15 +0200,
> Bastien wrote:
> > 
> > Hi Michael,
> > 
> > "R. Michael Weylandt "
> >  writes:
> > 
> > > TLDR: remove ?\= from org-link-escape-chars.
> > 
> > Done (in master.)
> > 
> > I'm copying David since he's the author of this commit:
> > http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=1a68b6
> > 
> > David, sorry to jump in, but are there any reason why the
> > characters + ; and = where escaped in this commit?
> > 
> 
> I think the only reason was that these characters already had been
> escaped in `org-link-escape-chars'.
> 
> The commit removed the special rules for the letters with
> diacritics. The previous commit (0c4bb0e) introduced an algorithm that
> covered non-ASCII characters in general, thus special rules for
> letters with diacritics where no longer necessary.
> 
> I can only speculate why they were escaped in the first place: + ; and
> = do have special meaning in HTTP URIs and IIRC Org did not draw a
> strict distinction between escaping for internal purposes and escaping
> of HTTP URIs.
> 
> Best,
>   -- David
> 
> > Thanks in advance,
> > 
> > -- 
> >  Bastien



Re: [O] New worg page: Publishing beamer slideshows and articles from one source

2014-05-25 Thread Rasmus
Suvayu Ali  writes:

> Hi Bastien,
>
> On Wed, May 21, 2014 at 03:28:28PM +0200, Bastien wrote:
>> Suvayu Ali  writes:
>> 
>> > BTW, the ignoreheading thing has been asked so many times, maybe I
>> > should put it in an FAQ.  But then, the content is more appropriate for
>> > org-hacks ... I'm undecided.  Any thoughts?
>> 
>> It's both a FAQ and a hack, perhaps put the answer in the FAQ and the
>> details in org-hacks?
>
> Done!
>
> 

Fine.

> 

The intention is nice, but this entry is flawed to the point that it
should be removed or undergo some heavy editing IMO. . .

Take a quick example, after initializing emacs -q as in the footnote¹:

* my heading
  p1
* ignoreheading
  p2
* ignore this heading :ignoreheading:
  p3


When you export this with the proposed filter the result is
*completely broken* in plain text and html².  In html it doesn't even
manage to remove the offending headlines, much less fix the toc.  In
LaTeX it removes a headline too much, but of course it's kind of
artificial in the example above.

So if we *really* want to document this in the FAQ let us be honest:
all of our attempts so far suck badly!  The code posted only works in
LaTeX and this needs to be reflected in backend check.

Depending on the reader's use case there a better solutions.

   1. If you do not have :ignoreheading: after :noexport: a hook
  removing headlines is the best option.  You fully leverage the
  power of ox and it thus is the only trivial solution for
  non-LaTeX exporters.³
   2. If you only want to do LaTeX and you want to use the section
  filter and you do not have heading that consist only of
  =verbatim= then you can recover the ox-object representation
  from the text properties and check the actual tags.⁴
   3. If you do have =verbatim= only headings you can use a regexp.⁵

If you want to remove headings in html and text via a section filters
it's going to be pretty nontrivial as content such as the TOC is
generated by Org.

—Rasmus

Footnotes: 
¹   
(add-to-list 'load-path "/usr/share/emacs/site-lisp/org")
(require 'ox)

(defun sa-ignore-headline (contents backend info)
  "Ignore headlines with tag `ignoreheading'."
  (when (and (org-export-derived-backend-p backend 'latex 'html 'ascii)
  (string-match "\\`.*ignoreheading.*\n"
(downcase contents)))
(replace-match "" nil nil contents)))

(add-to-list 'org-export-filter-headline-functions 'sa-ignore-headline)
(progn
  (switch-to-buffer "test.org")
  (org-mode)
  (insert-string
   "* my heading
  p1
* ignoreheading
  p2
* ignore this heading :ignoreheading:
  p3"))

²
   ━━
TEST.ORG


 Rasmus
   ━━


Table of Contents
─

1 my heading
2 ignoreheading
3 ignore this heading:ignoreheading:


1 my heading


  p1


═══

  p2


═

  p3


³   https://lists.gnu.org/archive/html/emacs-orgmode/2014-03/msg01459.html

⁴   https://lists.gnu.org/archive/html/emacs-orgmode/2014-03/msg01480.html

⁵   
https://stackoverflow.com/questions/10295177/is-there-an-equivalent-of-org-modes-b-ignoreheading-for-non-beamer-documents

-- 
Lasciate ogni speranza, voi che leggete questo.





Re: [O] Org mode links for helm

2014-05-25 Thread John Kitchin
nice. I have similar code in org-ref  for a ref links to labels, but it
doesn't have #+name in it yet, but it does do table names. You might find
the function org-label-store-link (
https://github.com/jkitchin/jmax/blob/master/org-ref.org#label)
interesting, so you can use C-c l and C-c C-l to put your links in. I think
you could do something like that with #+name.



John

---
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Sat, May 24, 2014 at 11:32 PM, Thomas S. Dye  wrote:

> Aloha Bastien,
>
> Bastien  writes:
>
> > Hi Thomas,
> >
> > t...@tsdye.com (Thomas S. Dye) writes:
> >
> >> Has anyone implemented a helm interface for Org-mode #+name lines?  I
> >> think it might be useful for inserting cross reference links.
> >
> > did you try
> >
> > https://github.com/emacs-helm/helm/blob/master/helm-org.el
> >
> > ?
>
> This code, adapted from some code I found on John Kitchin's blog, does
> what I want.
>
> ** Cross references
> #+name: tsd-xref
> #+begin_src emacs-lisp
> (defun tsd-get-names-and-labels ()
>   (interactive)
>   (save-excursion
> (goto-char (point-min))
> (let ((matches '()))
>   (while (re-search-forward "\\#\\+\\(name\\|label\\):\\s-\\(.*\\)"
> (point-max) t)
> (add-to-list 'matches (match-string-no-properties 2) t))
>   matches)))
>
> (defun tsd-org-insert-crossref-link (&optional arg)
>   (interactive (list (completing-read "insert: "
> (tsd-get-names-and-labels
>   (insert (format "[[%s]]" arg)))
> #+end_src
>
> Now, when I'm referring to something I've labeled or named, I call
> tsd-org-insert-crossref-link and helm works on a list of labels and
> names defined in the buffer.
>
> It's almost as convenient as using Carsten's reftex mode when writing in
> LaTeX.
>
> All the best,
> Tom
> --
> Thomas S. Dye
> http://www.tsdye.com
>
>


Re: [O] [PATCH] sort TODO entries more usefully

2014-05-25 Thread Eric Abrahamsen
Bastien  writes:

> Hi Eric,
>
> Eric Abrahamsen  writes:
>
>> For some reason I've been sorting lots of TODOs recently, and found the
>> default behavior of org-sort-entries a little odd. It sorts according to
>> the order found in org-todo-keywords-1, which apparently just comes from
>> the order the keywords were scanned during setup. I don't think that's
>> all that useful, so the attached patch sorts first by
>> org-not-done-keywords vs org-done-keywords, then alphabetically.
>> Headings with no keywords sort "big".
>
> I don't think the alphabetical order is very useful here, and putting
> headlines without TODO keywords first when sorting by TODO order is
> counter-intuitive at least.
>
> Let me suggest the attached patch instead: it puts TODO entries, then
> entries without a TODO keyword, then DONE entries.
>
> Would it be an improvement?

Sure! The actual ordering of stuff was an arbitrary choice on my part --
the only thing I cared about was getting done and not-done separated.
This looks like a tidier solution, to boot...

E




Re: [O] Advice needed: Cant find a decent way to autosync my work TODO org file between laptop and work pc

2014-05-25 Thread Josh Berry
On Sat, May 24, 2014 at 1:11 AM, Xebar Saram  wrote:

>  need to sync my main work TODO org file between my work PC and laptop i
> carry around on work related trips and when im at home. i have tried
> several methods buy really none of them work.
>
> i mainly used git over the last 6 months but that forces me to
> pull/commit/push manually each time i add something to either machine and
> that is really annoying. plus i get merge conflicts all the time
>

I can't really help for the other items too easily, but have you tried
*not* syncing edits between a single files?  This would at least stop the
merge conflicts.

That is, if you had two sets of all of your .org files, one under
"desktop/" and the other under "laptop/", then you could setup a basic hook
in git that pushes/pulls on every change.  I believe org is good with the
refile commands that moving between the flies shouldn't be that much of a
burden, if you do that often.  Otherwise, things definitely work well for
agenda mode and such.

-josh


[O] Fwd: Advice needed: Cant find a decent way to autosync my work TODO org file between laptop and work pc

2014-05-25 Thread Martin Schöön
I sent the following to the wrong recipient earlier today:

-- Forwarded message --

Programs such as rsync and BittorrentSync only work if both computers are
up and running.
My computer at home is switched off when I don't use it and the same goes
for my
computer at work...

I have experimented a little with WebDAV but have failed to automate
syncing to the server.
I have not spent a lot of time on this so I don't say it isn't possible.

- Added comment: --

Commercial services such as Dropbox may not be OK for company sensitive
material.
Your mileage on this may differ depending on your company, where you live
and the
service provider.

-- 
Martin Schöön

http://hem.bredband.net/b262106/index.html


[O] possible bug in ox-odt.el?

2014-05-25 Thread Matt Price
Hello,

for some time I've noticed that the export to odt options were not
being offered in the export menu options (C-c E-c), even though I have
(require ox-odt) in my startup file.  Attempts to evaluate ox-odt
manually failed with this error:

defconst: Wrong type argument: stringp, nil

I've tracked the problem down to org-odt-lib-dir:

(defconst org-odt-lib-dir
  (file-name-directory load-file-name)
  "Location of ODT exporter.
Use this to infer values of `org-odt-styles-dir' and
`org-odt-schema-dir'.")


from what I can tell, 'load-file-name' appears to be nil.  Replacing

  (file-name-directory load-file-name)

with a string like:

  "/home/matt/src/org-mode/lisp/ox-odt.el"

fixes the problem for me, but that doesn't seem like a very robust
solution.  I don't understand emacs internals very well, but is this
possibly a bug in ox-odt.el, or more likely something in my own
(poorly maintained) setup files?

Thanks,

Matt



[O] Stickiness of agenda buffers overrides persistent filters

2014-05-25 Thread Thomas Morgan
Dear Org mode hackers,

When `org-agenda-sticky' and `org-agenda-persistent-filter' are
both set, filters are not carried over to new agenda views, at least
in some cases.  I'm using the maint branch.  Here is a recipe:

1. Run Emacs with `emacs -Q -l setup.el'.

2. Open the day agenda with `M-x org-agenda RET a'.

3. Add a tag filter with `C-/ TAB foo RET'.

4. Open a TODO list with `M-x org-agenda RET t'.
   There is no filter: it is not indicated in the mode line,
   and both items appear.

Best,

Thomas



setup.el
Description: application/emacs-lisp
* TODO Buckle my shoe   :foo:
  SCHEDULED: <2014-05-23 Fri>

* TODO Open the door
  SCHEDULED: <2014-05-23 Fri>


Re: [O] Clock-in in agenda makes some headings with links disappear

2014-05-25 Thread Thomas Morgan
Hi, Bastien, 

I've noticed some new issues on maint.

Sometimes refreshing with `r' can empty an agenda of all its contents.
I'm using sticky agendas and the only way to recover seems to be to
kill the agenda buffer and create a new one.

Sometimes scheduling in the agenda with `C-c C-s' or `S-right' hangs.
There is a message saying the item is scheduled but the popup calendar
window remains until I type `C-g'.  I had been seeing this bug for a
while but not immediately before the change from overlays to text
properties.

Sometimes changing the tag filter puts point at the end of a line,
which is inconvenient if it happens to fall on a long line.

Adding a tag filter is sometimes slow.

I'll try to investigate and send proper reports.

Thanks,

Thomas



Re: [O] Clock-in in agenda makes some headings with links disappear

2014-05-25 Thread Thomas Morgan
Here is a small patch for this bug.  It works as far as I can tell
though it's possible that it introduces other problems or that there's
a better solution.

>From 3181ee87106275bf947324b75054c6e2acb18ed1 Mon Sep 17 00:00:00 2001
From: Thomas Morgan 
Date: Sun, 25 May 2014 13:40:35 -0400
Subject: [PATCH] Fix bug where scheduling in agenda hangs.

* lisp/org-agenda.el (org-agenda-show-new-time): Disable invisibility
  before moving to the column where the new time will be shown.
  Otherwise org-move-to-column may skip past several filtered lines,
  and though the cursor appears at the end of the current line, point
  is actually on the newline before the next visible line.

TINYFIX
---
 lisp/org-agenda.el |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 1be2bdb..8e2a627 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9176,7 +9176,8 @@ Called with a universal prefix arg, show the priority instead of setting it."
   (while (not (bobp))
 	(when (equal marker (org-get-at-bol 'org-marker))
 	  (remove-text-properties (point-at-bol) (point-at-eol) '(display))
-	  (org-move-to-column (- (window-width) (length stamp)) t)
+	  (let ((buffer-invisibility-spec nil))
+	(org-move-to-column (- (window-width) (length stamp)) t))
   (if (featurep 'xemacs)
 	  ;; Use `duplicable' property to trigger undo recording
   (let ((ex (make-extent nil nil))
-- 
1.7.10.4


Thomas Morgan  writes:

> Hi, Bastien, 
>
> Here is a recipe for the bug where scheduling hangs.
>
> 1. Change the load path entry in `setup.el'.
>
> 2. Start Emacs with `emacs -Q -l setup.el'.
>
> 3. Open a TODO list with `M-x org-todo-list'.
>
> 4. Filter out tag with `C-u / TAB foo RET'.
>
> 5. Move point to first item with `C-s todo RET'.
>
> 6. Schedule it for today with `C-c C-s RET'.
>
> An indication that it was scheduled appears in the echo area:
>
> ,
> | Scheduled to <2014-05-25 Sun>
> `
>
> But the calendar window remains until you press `C-g'.
>
> Best,
>
> Thomas


[O] Adding source location information when tangling

2014-05-25 Thread Thomas Morgan
Dear Org hackers,

I have a question about tangling LilyPond code blocks.

Is there a way to put the commands `\sourcefilename' and
`\sourcefileline' in the tangled file before each block,
perhaps in place of the comment that includes the same information?
(These commands are equivalent to the `#line LINENUM "FILE"'
directive in C.)  If possible I'd like to let LilyPond know how
to give error messages that refer to the originating Org file.

Thanks,
Thomas



[O] Item scheduled in agenda based on Org player link's start time

2014-05-25 Thread Thomas Morgan
Dear Org mode hackers,

This is a recipe for a bug involving Org player, though the bug
might be in Org mode itself.

1. Start Emacs with `emacs -Q -l setup.el'.  This opens the day agenda,
   which looks like this.

,
| Day-agenda (W21):
| Friday 23 May 2014
|   test-case:   1:23.. Scheduled:  TODO Buckle my shoe
|8:00.. 
|   10:00.. 
|   12:00.. 
|   14:00.. 
|   14:12.. now - - - - - - - - - - - - - - - - - - - - - - - - 
-
|   16:00.. 
|   18:00.. 
|   20:00.. 
`

I did not expect the TODO item to be scheduled for 1:23am.
That time is part of the link and is intended for Org player's use.

The text of the TODO item is this:

,
| Buckle my [[file://shoe.ogg::1:23][shoe]]
`

This is the format Org player uses to specify where in the media file
to start playback.  From `org-player.el':

,
| ;;; Links can also specify track positions. When a link contains a track
| ;;; position, playback will start at that position in the track. For example:
| ;;;
| ;;; [[file:/path/to/song.mp3::2:43]]  Starts playback at 2 min 43 sec.
`

Best,

Thomas



setup.el
Description: application/emacs-lisp
* TODO Buckle my [[file://shoe.ogg::1:23][shoe]]
  SCHEDULED: <2014-05-23 Fri>


Re: [O] Clock-in in agenda makes some headings with links disappear

2014-05-25 Thread Thomas Morgan
Hi, Bastien, 

Here is a recipe for the bug where scheduling hangs.

1. Change the load path entry in `setup.el'.

2. Start Emacs with `emacs -Q -l setup.el'.

3. Open a TODO list with `M-x org-todo-list'.

4. Filter out tag with `C-u / TAB foo RET'.

5. Move point to first item with `C-s todo RET'.

6. Schedule it for today with `C-c C-s RET'.

An indication that it was scheduled appears in the echo area:

,
| Scheduled to <2014-05-25 Sun>
`

But the calendar window remains until you press `C-g'.

Best,

Thomas

* TODO Buckle my shoe

* TODO Open the door   :foo:

* TODO Pick up sticks


setup.el
Description: application/emacs-lisp


Re: [O] Filtering org-clock-display

2014-05-25 Thread Noah Slater
On 25 May 2014 07:26, Bastien  wrote:

> Hi Noah,
>
> Noah Slater  writes:
>
> > As for the rest, please try C-u C-u C-c C-x C-d from master.
> >
> > We can enhance it by having an option setting the default custom
> > range for such display, but going further would be too much.
> >
> >
> > What does this do? (What changed?) Does it let me filter the display
> > by time period?
>
> Yes -- try it, you'll see.


How do I configure the filtering?


[O] Is there a variable/way to change to something else, e.g. for use with Bootstrap CSS?

2014-05-25 Thread Omid
Hello,

- I am trying to build a statically-generated website purely with Org
  mode. I would like to use Bootstrap CSS to make the site mobile
  friendly. Bootstrap uses  for the "main" part
  of the  of HTML; Org mode export produces 
  for that part.

  Is there a variable to set/way to make Org wrap this part in the
  "container" class?

  Looking at several "apropos" results (with all the search keywords I
  could think of), I only see a setting for pre/postamble-class:

  org-html--pre/postamble-class
Variable: CSS class used for pre/postamble

- Assuming there is no Org-internal way to do this, is there a
  function that is run after a project is published to that I can,
  e.g., run a sed script on the HTML files generated? Again, the only
  remotely relevant result I see in M-x apropos RET org post is

  org-babel-post-tangle-hook
  Variable: Hook run in code files tangled by `org-babel-tangle'.
  Properties: standard-value custom-version custom-type
  custom-requests variable-documentation

- As a "meta question", how would one find the answer to these and
  similar questions without leaving Emacs, since we know Emacs is
  self-documenting and Org mode has a very comprehensive set of
  functions and documentation. Looking in the usual places (C-u M-x
  apropos, C-h v) did not lead me to an answer.

Thanks,

Omid

Sent from my Emacs




Re: [O] Is there a variable/way to change to something else, e.g. for use with Bootstrap CSS?

2014-05-25 Thread Eric Abrahamsen
Omid  writes:

> Hello,
>
> - I am trying to build a statically-generated website purely with Org
>   mode. I would like to use Bootstrap CSS to make the site mobile
>   friendly. Bootstrap uses  for the "main" part
>   of the  of HTML; Org mode export produces 
>   for that part.
>
>   Is there a variable to set/way to make Org wrap this part in the
>   "container" class?
>
>   Looking at several "apropos" results (with all the search keywords I
>   could think of), I only see a setting for pre/postamble-class:
>
>   org-html--pre/postamble-class
> Variable: CSS class used for pre/postamble

It would help to know your Org mode version, but I'm pretty sure
org-html-divs has been around for a bit. Check out its docstring, and
modify its second element, which is '(content "div" "content") by
default.

> - Assuming there is no Org-internal way to do this, is there a
>   function that is run after a project is published to that I can,
>   e.g., run a sed script on the HTML files generated? Again, the only
>   remotely relevant result I see in M-x apropos RET org post is
>
>   org-babel-post-tangle-hook
>   Variable: Hook run in code files tangled by `org-babel-tangle'.
>   Properties: standard-value custom-version custom-type
>   custom-requests variable-documentation
>
> - As a "meta question", how would one find the answer to these and
>   similar questions without leaving Emacs, since we know Emacs is
>   self-documenting and Org mode has a very comprehensive set of
>   functions and documentation. Looking in the usual places (C-u M-x
>   apropos, C-h v) did not lead me to an answer.

One good thing to know is that Org export variables related to a certain
backend all start with org-BACKEND-*. So you could do C-h v org-html-TAB
and see... a lot of variables. Still, that would (eventually) get you
there. I did apropos-variable for "org html container" and that got me a
similar list as C-h v, albeit slimmed down somewhat, and with
docstrings.

Hope that helps,
Eric




Re: [O] org-contacts development

2014-05-25 Thread Daimrod
Alexis  writes:

> Daimrod  writes:
>
>> So, as you said, we would need to define and document a specification
>> for org-contacts. And we need to be clear from the beginning about
>> what it can do and what it can not do. For example, it is unlikely
>> that org-contacts will be a 1:1 mapping with the vCard format in its
>> current form because vCard properties can have values.
>>
>> e.g.
>> PROP1;PROP2=VAL:FOO BAR
>>   ^
>
> Agreed. But it seem to me we could at least map e.g. "TEL;CELL:" (which
> is how my Android phone vCard-exports a mobile number) to
> e.g. ":MOBILE:" or ":PHONE_CELL:". And we could map things like
> e.g. "EMAIL;TYPE=work:" to e.g. ":EMAIL_WORK:". This is just
> brainstorming, however. :-)

Sure, but then how would we define the map? with a fixed set of rules?
with a user customizable map (e.g. '(("MOBILE" -> "TELL;CELL")
("EMAIL_WORK" -> "EMAIL;TYPE=work")))?

I'm not saying that it's impossible nor that we shouldn't do it but that
we need to think about it first. :)

>> An approach would be to keep using properties whenever it's possible
>> to keep the format simple when possible and use subtree instead of
>> properties when necessary.
>>
>> e.g.
>> #+BEGIN_SRC org
>>   ,* Contact Name
>>   ,** PHONE
>>  :PROPERTIES:
>>  :TYPE: WORK
>>  :END:
>>   - num1
>>   - num2
>> #+END_SRC
>>
>> But then we would need a special property to indicate that a subtree
>> is a contact and ignore subtree without this property (just like it
>> does with the EMAIL property ATM).
>>
>> #+BEGIN_SRC org
>>   ,* Contact Name
>> :PROPERTIES:
>> :TYPE: org-contacts
>> :END:
>>
>>   ,** PHONE
>>  :PROPERTIES:
>>  :TYPE: WORK
>>  :END:
>>   - num1
>>   - num2
>> #+END_SRC
>>
>> And of course it would be nice if we could keep as much compatibility
>> with the current format :)
>
> Well, to me this looks broadly similar to what Esben has proposed:
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2014-05/msg01055.html
>
> Although i like the idea of such a format in principle, my concern (as i
> noted in my reply to Esben) is that this might require a substantial
> modification of org-contacts.el, both to accommodate this format and to
> ensure backwards-compatibility. If this is indeed the case, and someone
> else is willing to commit to being the lead on undertaking that work,
> then i'll certainly support that work and write relevant MobileOrg code
> to work with both the new and old formats. Otherwise, from my
> perspective of wanting to simply add some more fields and be able to
> transfer contact details between MobileOrg and my phone's Contacts
> system, it's more than i'm willing to take on at this point.

Well, if people are willing to help, I'll see if I can come up with a
proposal.

-- 
Daimrod/Greg


signature.asc
Description: PGP signature


Re: [O] possible bug in ox-odt.el?

2014-05-25 Thread Nick Dokos
Matt Price  writes:

> Hello,
>
> for some time I've noticed that the export to odt options were not
> being offered in the export menu options (C-c E-c), even though I have
> (require ox-odt) in my startup file.  Attempts to evaluate ox-odt
> manually failed with this error:
>

Not sure what that means: do you mean "load"?

> defconst: Wrong type argument: stringp, nil
>
> I've tracked the problem down to org-odt-lib-dir:
>
> (defconst org-odt-lib-dir
>   (file-name-directory load-file-name)
>   "Location of ODT exporter.
> Use this to infer values of `org-odt-styles-dir' and
> `org-odt-schema-dir'.")
>
>
> from what I can tell, 'load-file-name' appears to be nil.  Replacing
>
>   (file-name-directory load-file-name)
>
> with a string like:
>
>   "/home/matt/src/org-mode/lisp/ox-odt.el"
>
> fixes the problem for me, but that doesn't seem like a very robust
> solution.  I don't understand emacs internals very well, but is this
> possibly a bug in ox-odt.el, or more likely something in my own
> (poorly maintained) setup files?
>

load-file-name is a variable that's supposed to hold the full name of
the file being loaded by `load'. It's going to be nil most of the time.
It's only while a file is being loaded that it assumes a non-nil value.
Try M-x load-file RET /path/to/ox-odt.el RET and see if you get an
error. And maybe update org.
-- 
Nick




Re: [O] org-contacts development

2014-05-25 Thread Alexis

Daimrod  writes:

> Sure, but then how would we define the map? with a fixed set of rules?
> with a user customizable map (e.g. '(("MOBILE" -> "TELL;CELL")
> ("EMAIL_WORK" -> "EMAIL;TYPE=work")))?

More the latter. My initial (again, brainstorming!) thinking has an
user-modifiable data structure along the lines of the following:

+---+++
| elisp var |org property| ~ vCard equivalent |
+---+++
| org-contacts-email-work-property  |EMAIL_WORK  |EMAIL;TYPE=work |
| org-contacts-mobile-work-property |MOBILE_WORK |TEL;CELL;TYPE=work  |
+---+++

English-language properties for the org property column could be
provided by default, but users who wanted to use non-English property
names could do so by modifying the relevant entries.

> I'm not saying that it's impossible nor that we shouldn't do it but that
> we need to think about it first. :)

Oh 100% agreed! That's why i've started this discussion here, so as to
get input, feedback, and hopefully at least rough consensus, on how to
approach all this. :-)

> Well, if people are willing to help, I'll see if I can come up with a
> proposal.

:-) Sounds good!


Alexis.



Re: [O] Is there a variable/way to change to something else, e.g. for use with Bootstrap CSS?

2014-05-25 Thread Omid
Thank you, Eric for your quick response.
- I am using Org mode 8.2.6 (from ELPA) and Emacs 24.3.1.
- org-html-divs does almost what I have been looking for, except for
  one, unfortunately crucial, shortcoming: I don't see any way of
  changing the "id" tag to "class". Bootstrap's container is a "class"
  and will not work as an "id". As far as see, I can only do

  (setq org-html-divs (quote ((preamble "div" "preamble")
  (content "div" "container")
  (postamble "div" "postamble"

  Looking at ox-html.el I see that the "id" tag is hard coded:

  (list :tag "Content"
  (const :format "" content)
  (string :tag "element") (string :tag " id"))

  Am I missing something here?

- I still could not find a "post publish" hook/variable. Neither
  apropos-variable with org publish, apropos with org publish gives me
  anything useful. C-h v reveals org-export-before-parsing-hook and
  org-export-before-processing-hook but I don't see anything with
  "after" or "post". The only way I see around my problem is to define
  an external publishing-function in org-publish-project-alist (maybe
  a makefile) and do the necessary post processing there. Any better
  suggestion is greatly appreciated.

Thanks,

Omid

Sent from my Emacs

On 05/25/2014 10:10 PM, Eric Abrahamsen wrote:
> Omid  writes:
> 
>> Hello,
>>
>> - I am trying to build a statically-generated website purely with Org
>>   mode. I would like to use Bootstrap CSS to make the site mobile
>>   friendly. Bootstrap uses  for the "main" part
>>   of the  of HTML; Org mode export produces 
>>   for that part.
>>
>>   Is there a variable to set/way to make Org wrap this part in the
>>   "container" class?
>>
>>   Looking at several "apropos" results (with all the search keywords I
>>   could think of), I only see a setting for pre/postamble-class:
>>
>>   org-html--pre/postamble-class
>> Variable: CSS class used for pre/postamble
> 
> It would help to know your Org mode version, but I'm pretty sure
> org-html-divs has been around for a bit. Check out its docstring, and
> modify its second element, which is '(content "div" "content") by
> default.
> 
>> - Assuming there is no Org-internal way to do this, is there a
>>   function that is run after a project is published to that I can,
>>   e.g., run a sed script on the HTML files generated? Again, the only
>>   remotely relevant result I see in M-x apropos RET org post is
>>
>>   org-babel-post-tangle-hook
>>   Variable: Hook run in code files tangled by `org-babel-tangle'.
>>   Properties: standard-value custom-version custom-type
>>   custom-requests variable-documentation
>>
>> - As a "meta question", how would one find the answer to these and
>>   similar questions without leaving Emacs, since we know Emacs is
>>   self-documenting and Org mode has a very comprehensive set of
>>   functions and documentation. Looking in the usual places (C-u M-x
>>   apropos, C-h v) did not lead me to an answer.
> 
> One good thing to know is that Org export variables related to a certain
> backend all start with org-BACKEND-*. So you could do C-h v org-html-TAB
> and see... a lot of variables. Still, that would (eventually) get you
> there. I did apropos-variable for "org html container" and that got me a
> similar list as C-h v, albeit slimmed down somewhat, and with
> docstrings.
> 
> Hope that helps,
> Eric
> 
> 



Re: [O] Is there a variable/way to change to something else, e.g. for use with Bootstrap CSS?

2014-05-25 Thread Omid
I think I found the answer to my second question: in
org-publish-project-alist, there is the property completion-function
that can be set to a (list of) functions to do some post processing.
My first question still stands, though.

Omid

Sent from my Emacs

On 05/26/2014 12:08 AM, Omid wrote:
> Thank you, Eric for your quick response.
> - I am using Org mode 8.2.6 (from ELPA) and Emacs 24.3.1.
> - org-html-divs does almost what I have been looking for, except for
>   one, unfortunately crucial, shortcoming: I don't see any way of
>   changing the "id" tag to "class". Bootstrap's container is a "class"
>   and will not work as an "id". As far as see, I can only do
> 
>   (setq org-html-divs (quote ((preamble "div" "preamble")
>   (content "div" "container")
>   (postamble "div" "postamble"
>   
>   Looking at ox-html.el I see that the "id" tag is hard coded:
> 
>   (list :tag "Content"
>   (const :format "" content)
>   (string :tag "element") (string :tag " id"))
> 
>   Am I missing something here?
> 
> - I still could not find a "post publish" hook/variable. Neither
>   apropos-variable with org publish, apropos with org publish gives me
>   anything useful. C-h v reveals org-export-before-parsing-hook and
>   org-export-before-processing-hook but I don't see anything with
>   "after" or "post". The only way I see around my problem is to define
>   an external publishing-function in org-publish-project-alist (maybe
>   a makefile) and do the necessary post processing there. Any better
>   suggestion is greatly appreciated.
> 
> Thanks,
>   
> Omid
> 
> Sent from my Emacs
> 
> On 05/25/2014 10:10 PM, Eric Abrahamsen wrote:
>> Omid  writes:
>>
>>> Hello,
>>>
>>> - I am trying to build a statically-generated website purely with Org
>>>   mode. I would like to use Bootstrap CSS to make the site mobile
>>>   friendly. Bootstrap uses  for the "main" part
>>>   of the  of HTML; Org mode export produces 
>>>   for that part.
>>>
>>>   Is there a variable to set/way to make Org wrap this part in the
>>>   "container" class?
>>>
>>>   Looking at several "apropos" results (with all the search keywords I
>>>   could think of), I only see a setting for pre/postamble-class:
>>>
>>>   org-html--pre/postamble-class
>>> Variable: CSS class used for pre/postamble
>>
>> It would help to know your Org mode version, but I'm pretty sure
>> org-html-divs has been around for a bit. Check out its docstring, and
>> modify its second element, which is '(content "div" "content") by
>> default.
>>
>>> - Assuming there is no Org-internal way to do this, is there a
>>>   function that is run after a project is published to that I can,
>>>   e.g., run a sed script on the HTML files generated? Again, the only
>>>   remotely relevant result I see in M-x apropos RET org post is
>>>
>>>   org-babel-post-tangle-hook
>>>   Variable: Hook run in code files tangled by `org-babel-tangle'.
>>>   Properties: standard-value custom-version custom-type
>>>   custom-requests variable-documentation
>>>
>>> - As a "meta question", how would one find the answer to these and
>>>   similar questions without leaving Emacs, since we know Emacs is
>>>   self-documenting and Org mode has a very comprehensive set of
>>>   functions and documentation. Looking in the usual places (C-u M-x
>>>   apropos, C-h v) did not lead me to an answer.
>>
>> One good thing to know is that Org export variables related to a certain
>> backend all start with org-BACKEND-*. So you could do C-h v org-html-TAB
>> and see... a lot of variables. Still, that would (eventually) get you
>> there. I did apropos-variable for "org html container" and that got me a
>> similar list as C-h v, albeit slimmed down somewhat, and with
>> docstrings.
>>
>> Hope that helps,
>> Eric
>>
>>



Re: [O] Is there a variable/way to change to something else, e.g. for use with Bootstrap CSS?

2014-05-25 Thread Eric Abrahamsen
Omid  writes:

> I think I found the answer to my second question: in
> org-publish-project-alist, there is the property completion-function
> that can be set to a (list of) functions to do some post processing.
> My first question still stands, though.

Yup, that's a bit of a pain.

When you need to really mess with the results of an Org export, the way
to do it is through the "filter" system, not regular hooks. See the
comments under "The Filter System" in lisp/ox.el for details on that.

Filters give you access to the exported strings produced from various
elements in the org buffer. Unfortunately there isn't a filter that
reaches the contents template, which is where ox-html is setting the div
id, so you'll probably need to use the nuclear option:
org-export-filter-final-output-functions. Functions placed in that
variable get access to the whole export string, and you can just do a
search-and-replace for your id/class string there.

Yours,
Eric

> On 05/26/2014 12:08 AM, Omid wrote:
>> Thank you, Eric for your quick response.
>> - I am using Org mode 8.2.6 (from ELPA) and Emacs 24.3.1.
>> - org-html-divs does almost what I have been looking for, except for
>>   one, unfortunately crucial, shortcoming: I don't see any way of
>>   changing the "id" tag to "class". Bootstrap's container is a "class"
>>   and will not work as an "id". As far as see, I can only do
>> 
>>   (setq org-html-divs (quote ((preamble "div" "preamble")
>>   (content "div" "container")
>>   (postamble "div" "postamble"
>>  
>>   Looking at ox-html.el I see that the "id" tag is hard coded:
>> 
>>   (list :tag "Content"
>>   (const :format "" content)
>>   (string :tag "element") (string :tag " id"))
>> 
>>   Am I missing something here?
>> 
>> - I still could not find a "post publish" hook/variable. Neither
>>   apropos-variable with org publish, apropos with org publish gives me
>>   anything useful. C-h v reveals org-export-before-parsing-hook and
>>   org-export-before-processing-hook but I don't see anything with
>>   "after" or "post". The only way I see around my problem is to define
>>   an external publishing-function in org-publish-project-alist (maybe
>>   a makefile) and do the necessary post processing there. Any better
>>   suggestion is greatly appreciated.
>> 
>> Thanks,
>>  
>> Omid
>> 
>> Sent from my Emacs
>> 
>> On 05/25/2014 10:10 PM, Eric Abrahamsen wrote:
>>> Omid  writes:
>>>
 Hello,

 - I am trying to build a statically-generated website purely with Org
   mode. I would like to use Bootstrap CSS to make the site mobile
   friendly. Bootstrap uses  for the "main" part
   of the  of HTML; Org mode export produces 
   for that part.

   Is there a variable to set/way to make Org wrap this part in the
   "container" class?

   Looking at several "apropos" results (with all the search keywords I
   could think of), I only see a setting for pre/postamble-class:

   org-html--pre/postamble-class
 Variable: CSS class used for pre/postamble
>>>
>>> It would help to know your Org mode version, but I'm pretty sure
>>> org-html-divs has been around for a bit. Check out its docstring, and
>>> modify its second element, which is '(content "div" "content") by
>>> default.
>>>
 - Assuming there is no Org-internal way to do this, is there a
   function that is run after a project is published to that I can,
   e.g., run a sed script on the HTML files generated? Again, the only
   remotely relevant result I see in M-x apropos RET org post is

   org-babel-post-tangle-hook
   Variable: Hook run in code files tangled by `org-babel-tangle'.
   Properties: standard-value custom-version custom-type
   custom-requests variable-documentation

 - As a "meta question", how would one find the answer to these and
   similar questions without leaving Emacs, since we know Emacs is
   self-documenting and Org mode has a very comprehensive set of
   functions and documentation. Looking in the usual places (C-u M-x
   apropos, C-h v) did not lead me to an answer.
>>>
>>> One good thing to know is that Org export variables related to a certain
>>> backend all start with org-BACKEND-*. So you could do C-h v org-html-TAB
>>> and see... a lot of variables. Still, that would (eventually) get you
>>> there. I did apropos-variable for "org html container" and that got me a
>>> similar list as C-h v, albeit slimmed down somewhat, and with
>>> docstrings.
>>>
>>> Hope that helps,
>>> Eric
>>>
>>>




Re: [O] [PATCH] sort TODO entries more usefully

2014-05-25 Thread Bastien
Hi Eric,

Eric Abrahamsen  writes:

> Sure! The actual ordering of stuff was an arbitrary choice on my part --
> the only thing I cared about was getting done and not-done separated.
> This looks like a tidier solution, to boot...

Applied, thanks!

-- 
 Bastien



Re: [O] M- does not work as described in the manual

2014-05-25 Thread Bastien
Hi Kevin,

Kevin Van Horn  writes:

> The attached PNG files illustrate the problem, for two different
> cases: one without any notes under the heading, and one with notes
> under the heading.

In the screenshots, I see that the point is not really at the start of
the line when you hit M-RET, but at the start of the heading's content.
You need to put the point at the start of the line.

Or am I missing something?

-- 
 Bastien



Re: [O] Filtering org-clock-display

2014-05-25 Thread Bastien
Hi Noah,

Noah Slater  writes:

> How do I configure the filtering?

What filtering?

Please re-read the whole thread (where I mention that we *could* have
an option for the default filtering option).  Also put more context in
your questions -- such terse sentences makes me feel like I'm just an
answering machine.

Thanks,

-- 
 Bastien



Re: [O] Incorrect hexification in URLs in LaTeX Export

2014-05-25 Thread Bastien
Hi David,

David Maus  writes:

> It's quite a muddy area.

Yes, I can see this.  I'm all for the status quo right now, as long
as there are no real bugs behind the current code.  Removing chars
from `org-link-escape-chars' won't fix anything deepl, but it may
help clearing the waters.

Thanks again,

-- 
 Bastien



Re: [O] New worg page: Publishing beamer slideshows and articles from one source

2014-05-25 Thread Bastien
Hi Rasmus,

Rasmus  writes:

> The intention is nice, but this entry is flawed to the point that it
> should be removed or undergo some heavy editing IMO. . .

Yes, the sa-ignore-headline function should be updated.

Can you give it a go?

I don't see why this should not be easy: you can simply try to match
different regexps depending on the backend, and remove the correct
stuff.  The only tricky part is to remove the heading from the table
of contents, but this is optional and the limitation can be advertized
as such.

Worg is a wiki, it's all yours!

Thanks,

-- 
 Bastien



Re: [O] Item scheduled in agenda based on Org player link's start time

2014-05-25 Thread Bastien
Hi Thomas,

Thomas Morgan  writes:

> This is a recipe for a bug involving Org player, though the bug
> might be in Org mode itself.

Fixed in maint, thanks!

-- 
 Bastien



Re: [O] Is there a variable/way to change to something else, e.g. for use with Bootstrap CSS?

2014-05-25 Thread Omid
Eric,

Thanks a lot for the pointer to the "Filter System." I was not aware
of it and, as you pointed out, the
org-export-filter-final-output-functions variable will help me achieve
what I was looking for.

Cheers,

Omid

Sent from my Emacs

On 05/26/2014 01:11 AM, Eric Abrahamsen wrote:
> Omid  writes:
> 
>> I think I found the answer to my second question: in
>> org-publish-project-alist, there is the property completion-function
>> that can be set to a (list of) functions to do some post processing.
>> My first question still stands, though.
> 
> Yup, that's a bit of a pain.
> 
> When you need to really mess with the results of an Org export, the way
> to do it is through the "filter" system, not regular hooks. See the
> comments under "The Filter System" in lisp/ox.el for details on that.
> 
> Filters give you access to the exported strings produced from various
> elements in the org buffer. Unfortunately there isn't a filter that
> reaches the contents template, which is where ox-html is setting the div
> id, so you'll probably need to use the nuclear option:
> org-export-filter-final-output-functions. Functions placed in that
> variable get access to the whole export string, and you can just do a
> search-and-replace for your id/class string there.
> 
> Yours,
> Eric
> 
>> On 05/26/2014 12:08 AM, Omid wrote:
>>> Thank you, Eric for your quick response.
>>> - I am using Org mode 8.2.6 (from ELPA) and Emacs 24.3.1.
>>> - org-html-divs does almost what I have been looking for, except for
>>>   one, unfortunately crucial, shortcoming: I don't see any way of
>>>   changing the "id" tag to "class". Bootstrap's container is a "class"
>>>   and will not work as an "id". As far as see, I can only do
>>>
>>>   (setq org-html-divs (quote ((preamble "div" "preamble")
>>>   (content "div" "container")
>>>   (postamble "div" "postamble"
>>> 
>>>   Looking at ox-html.el I see that the "id" tag is hard coded:
>>>
>>>   (list :tag "Content"
>>>   (const :format "" content)
>>>   (string :tag "element") (string :tag " id"))
>>>
>>>   Am I missing something here?
>>>
>>> - I still could not find a "post publish" hook/variable. Neither
>>>   apropos-variable with org publish, apropos with org publish gives me
>>>   anything useful. C-h v reveals org-export-before-parsing-hook and
>>>   org-export-before-processing-hook but I don't see anything with
>>>   "after" or "post". The only way I see around my problem is to define
>>>   an external publishing-function in org-publish-project-alist (maybe
>>>   a makefile) and do the necessary post processing there. Any better
>>>   suggestion is greatly appreciated.
>>>
>>> Thanks,
>>> 
>>> Omid
>>>
>>> Sent from my Emacs
>>>
>>> On 05/25/2014 10:10 PM, Eric Abrahamsen wrote:
 Omid  writes:

> Hello,
>
> - I am trying to build a statically-generated website purely with Org
>   mode. I would like to use Bootstrap CSS to make the site mobile
>   friendly. Bootstrap uses  for the "main" part
>   of the  of HTML; Org mode export produces 
>   for that part.
>
>   Is there a variable to set/way to make Org wrap this part in the
>   "container" class?
>
>   Looking at several "apropos" results (with all the search keywords I
>   could think of), I only see a setting for pre/postamble-class:
>
>   org-html--pre/postamble-class
> Variable: CSS class used for pre/postamble

 It would help to know your Org mode version, but I'm pretty sure
 org-html-divs has been around for a bit. Check out its docstring, and
 modify its second element, which is '(content "div" "content") by
 default.

> - Assuming there is no Org-internal way to do this, is there a
>   function that is run after a project is published to that I can,
>   e.g., run a sed script on the HTML files generated? Again, the only
>   remotely relevant result I see in M-x apropos RET org post is
>
>   org-babel-post-tangle-hook
>   Variable: Hook run in code files tangled by `org-babel-tangle'.
>   Properties: standard-value custom-version custom-type
>   custom-requests variable-documentation
>
> - As a "meta question", how would one find the answer to these and
>   similar questions without leaving Emacs, since we know Emacs is
>   self-documenting and Org mode has a very comprehensive set of
>   functions and documentation. Looking in the usual places (C-u M-x
>   apropos, C-h v) did not lead me to an answer.

 One good thing to know is that Org export variables related to a certain
 backend all start with org-BACKEND-*. So you could do C-h v org-html-TAB
 and see... a lot of variables. Still, that would (eventually) get you
 there. I did apropos-variable for "org html container" and that got me a
 similar list as C-h v, albeit slimmed down somewhat, and with
 docstrings.

 Hope that he