[O] [BUG] Cannot export a raw link

2014-04-14 Thread Bastien
Hi Nicolas,

1. create a file with http://orgmode.org; as its contents
2. export it to HTML
3. the exported link is wrong: http:orgmode.org

I guess it has to do with this commit:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=3589f6

Can you double-check?

Thanks,

-- 
 Bastien




Re: [O] Fwd: Mac OS Alias file links

2014-04-14 Thread Bastien
Hi Ken,

Ken Mankoff mank...@gmail.com writes:

 http://article.gmane.org/gmane.emacs.orgmode/84707 appears blank

The article is displayed correctly for me, probably a temporary
issue with gmane.org.

 so perhaps the no reply is due to a posting issue. Hence, I send the
 email again...

I don't use MacOSX so it's hard to know where to start.

Even for those who uses MacOSX, you should perhaps be more specific
on how Org-mode would store such links, then somebody might step up.

Best,

-- 
 Bastien



Re: [O] update to ob-clojure.el

2014-04-14 Thread Oleh
 I've made an update to ob-clojure.el, which wasn't working for me with
 the new cider (the required function was removed).

 I haven't looked into 'nrepl or 'slime options for evaluation, is
 anyone using them?

 Eric, should 'nrepl option be removed as obsolete? And maybe 'slime as well?


 I'm not sure about removing nrepl and slime, as there may be some still
 using them, especially nrepl.  As long as it is not getting in the way,
 perhaps at this time it would be better to leave them in?  I'm not sure
 the open-source and/or emacs-org philosophy on this kind of thing.

 Prior to updating the documentation for Clojure code blocks earlier this
 year, which was several years old, I did a lot of searching around and
 came to the conclusion that the slime and swank-clojure functionality
 was no longer being developed, and the community had moved on to nrepl.
 CIDER evolved from nrepl, and is the current direction.

 https://github.com/clojure-emacs/cider

 The revised documentation is very CIDER-centric:

 http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html

My point was that if even CIDER, which is a favorite method, has
bit-rotted to the point of not working, makes it a bit questionable to
try to support the other two methods.

For instance, I could not get SLIME to work with org when I tried a
year ago, so I don't know if it's working now.

And CIDER replaces nREPL, so nREPL should be dropped at some point.
On the other hand, since nREPL isn't being edited now it's unlikely to
produce the same problem as CIDER did (the function used by ob-clojure
was removed from CIDER).

regards,
Oleh



Re: [O] ob-clojure: ':results pp' parses the output as a string value

2014-04-14 Thread Oleh
Hi Phil,

Could you test my last commit? Your case should be working now.

regards,
Oleh



Re: [O] [BUG] Cannot export a raw link

2014-04-14 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 1. create a file with http://orgmode.org; as its contents
 2. export it to HTML
 3. the exported link is wrong: http:orgmode.org

 I guess it has to do with this commit:
 http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=3589f6

 Can you double-check?

Correct. It should be fixed.

Though, export back-ends in the wild implementing their own link
handling (i.e., not through a derived back-end) need to apply the
change.

IMO, this can still be part of Org 8.2.6, but it should be notified as
an incompatible change in Org News.


Regards,

-- 
Nicolas Goaziou



Re: [O] Fwd: Mac OS Alias file links

2014-04-14 Thread Ken Mankoff
Hi Bastien,

Thanks for letting me know it displays properly and email received. The
URL works for me this morning too.

On 2014-04-14 at 05:22, Bastien wrote:
 Even for those who uses MacOSX, you should perhaps be more specific
 on how Org-mode would store such links, then somebody might step up.

Aliases are a type of links (ln on linux, shortcut on Windows
alias on OS X (OS X of course also supports ln)). The difference
between an OS X alias and ln is that if the target is moved, the OS X
alias still points to it, and double-clicking on an alias (or issuing
the open command in a terminal) will open the target, wherever it
is. I just checked in a VM and Windows Shortcuts also behave this way.

Therefore, if in addition to file: there were an alias: option, Org
could link to files that move. I think this is a powerful feature. I
imagine alias: would be an option when I press C-cl, and a way to set
it as the default when I press C-ucl.

That is, links would be [[alias:foo][FileName]] where foo is a string
version (hashed?) of the alias.

In BibDesk, foo is ~1200 characters long, and according to the BibDesk
documentation, that ~1200 characters is:

 The Bdsk-File entries store Mac OS aliases, which contain a file ID
 and absolute path. Bdsk-File entries also store a relative path, which
 is used if the alias is broken.

So it looks like an Alias can be hashed some way and stored as just a
string. An example BibDesk entry in by BibTeX file looks like:

@article{citekey,
Author = {Someone},
Journal = {Nature},
Pages = {24--42},
Title = {{A Paper}},
Bdsk-File-1 = {YnBsa...etc for 1200 characters...}}

Opening the file with C-o would involve un-hashing it, and then treating
it the same way a file: is opened.

I imagine Org would mostly store the links the same way it stores file
links. The change would be that since the link is the alias (long ugly
string), the description would be required, and perhaps default to
/path/to/filename. Although since the whole point is that the /path/to/
can change, perhaps the default name would just be filename.

  -k.



Re: [O] tiny patch for org-expiry

2014-04-14 Thread Alan Schmitt
On 2014-04-13 00:11, Bastien b...@gnu.org writes:

 Hi Alan,

 Alan Schmitt alan.schm...@polytechnique.org writes:

 I'm trying to write some code to schedule reviews of projects, and I'm
 basing it on org-expiry. I found a couple of tiny bugs with it, which
 may be fixed with this patch.

 I Now Pronounce You Maintainer of Org Expiry :)

 Joke aside, I haven't touch the code since long, so please go ahead
 with bugfixes by committing them directly, unless there is something
 you're unsure about.

Will do.

Thanks,

Alan



Re: [O] Fwd: Mac OS Alias file links

2014-04-14 Thread Nick Dokos
Ken Mankoff mank...@gmail.com writes:

 Hi Bastien,

 Thanks for letting me know it displays properly and email received. The
 URL works for me this morning too.

 On 2014-04-14 at 05:22, Bastien wrote:
 Even for those who uses MacOSX, you should perhaps be more specific
 on how Org-mode would store such links, then somebody might step up.

 Aliases are a type of links (ln on linux, shortcut on Windows
 alias on OS X (OS X of course also supports ln)). The difference
 between an OS X alias and ln is that if the target is moved, the OS X
 alias still points to it, and double-clicking on an alias (or issuing
 the open command in a terminal) will open the target, wherever it
 is. I just checked in a VM and Windows Shortcuts also behave this way.

 Therefore, if in addition to file: there were an alias: option, Org
 could link to files that move. I think this is a powerful feature. I
 imagine alias: would be an option when I press C-cl, and a way to set
 it as the default when I press C-ucl.

 That is, links would be [[alias:foo][FileName]] where foo is a string
 version (hashed?) of the alias.

 In BibDesk, foo is ~1200 characters long, and according to the BibDesk
 documentation, that ~1200 characters is:

 The Bdsk-File entries store Mac OS aliases, which contain a file ID
 and absolute path. Bdsk-File entries also store a relative path, which
 is used if the alias is broken.

 So it looks like an Alias can be hashed some way and stored as just a
 string. An example BibDesk entry in by BibTeX file looks like:

 @article{citekey,
   Author = {Someone},
   Journal = {Nature},
   Pages = {24--42},
   Title = {{A Paper}},
   Bdsk-File-1 = {YnBsa...etc for 1200 characters...}}

 Opening the file with C-o would involve un-hashing it, and then treating
 it the same way a file: is opened.

 I imagine Org would mostly store the links the same way it stores file
 links. The change would be that since the link is the alias (long ugly
 string), the description would be required, and perhaps default to
 /path/to/filename. Although since the whole point is that the /path/to/
 can change, perhaps the default name would just be filename.


What does emacs do when you C-x C-f an alias?

If it opens it properly (i.e. opens the target file) then why is
anything needed in org? It seems to me that a file: link should just
work.

If it does not, then maybe that's where the capability should be added.
Org seems to be the wrong place for it.

But note that everything I know about aliases, I learnt in the last five
minutes, so I could be way off the mark.

-- 
Nick




Re: [O] Fwd: Mac OS Alias file links

2014-04-14 Thread Ken Mankoff

On 2014-04-14 at 08:42, Nick Dokos wrote:
 What does emacs do when you C-x C-f an alias?

Alias in OS X (and Shortcut in Windows) present as files. Org treats it
just as it should - as a file. Everything works.

 If it opens it properly (i.e. opens the target file) then why is
 anything needed in org? It seems to me that a file: link should just
 work.

 If it does not, then maybe that's where the capability should be added.
 Org seems to be the wrong place for it.

 But note that everything I know about aliases, I learnt in the last five
 minutes, so I could be way off the mark.

This requires me to 1) manually make an alias (something I never do), 2)
choose where to store that alias on disk, and then 3) link to the alias
in Org. Worse, the situation is not improved or difference since if the
alias moves, the Org link (to the alias) is broken.

I'm imagining the alias never exists on disk. Just as a representation
inside Org, and pointing to the target file. Now the link can never
break, unless the target is deleted. And there is no additional effort
on our part beyond the existing work to make a link.

  -k.

P.S. How does one make a link to a folder or directory in org? 





[O] empty default captions for src blocks

2014-04-14 Thread Dominik Ernst

Hallo,

I have a small question, I hope it is right here. The following org code:

#+CAPTION: caption of block 1
#+BEGIN_SRC
vmpovapd %%zmm0, %zmm1
#+END_SRC


#+BEGIN_SRC
vmpovapd %%zmm0, %zmm1
#+END_SRC

is exported (in my setup) to latex as:

\lstset{language=phiassembler,caption={caption of block1},numbers=none}
\begin{lstlisting}
vmpovapd %%zmm0, %zmm1
\end{lstlisting}

\begin{lstlisting}
vmpovapd %%zmm0, %zmm1
\end{lstlisting}

which results in the rendered pdf as two listings with the same caption, 
although only the first block has a caption. I think this is because of 
the lstlistings statemachine, that is maniupulated through lstset. It 
has an unchanged state in the second listing, which then gets the same 
caption.


Is there an easy way to  fix this? My hack so far is to modify 
ox-latex.el so that


2171:(when caption-str `((caption ,caption-str)))

becomes:

2171:(if caption-str `((caption ,caption-str)) `((caption ,{})) )

which adds a default empty caption, which makes everything behave like I 
want it to, so no wrong captions on source blocks where I define no 
caption. My org version is 8.2.5h.


Regards,
Dominik




[O] total time spent on a task

2014-04-14 Thread Christoph Groth
Hello,

I’m looking for a quick way to check the total time spent on a task.  I
bet I’m missing something obvious.  (I have set
org-clock-mode-line-total to today, so I do not see the total time of a
clocked-in task in the mode line.)

Many thanks,
Christoph




Re: [O] total time spent on a task

2014-04-14 Thread Sacha Chua
Christoph Groth christ...@grothesque.org writes:

Hello, Christoph!

 I’m looking for a quick way to check the total time spent on a task.  I
 bet I’m missing something obvious.  (I have set
 org-clock-mode-line-total to today, so I do not see the total time of a
 clocked-in task in the mode line.)

C-c C-x C-d (org-clock-display) will show the task times as overlays on
the headings. If you want something exportable, you can use C-c C-x C-r
(org-clock-report) - see the info page for The clock table for lots of
options. If you want the number of minutes in Emacs Lisp, use
(org-clock-sum-current-item) for the current item or (org-clock-sum) to
add totals to all, then go to the heading and get the :org-clock-minutes
property.

Hope that helps!

Sacha




Re: [O] The Org Package

2014-04-14 Thread Achim Gratz
David Masterson writes:
 What does this mean?

What I said: don't load any part of Org until you have installed the
ELPA package.  This usually means not to run any startup scripts.

 Does this mean you expect people to build Emacs
 from scratch just to ensure they do not have Org built-in?

I don't expect anything like that from anybody.


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

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] Agenda items refer to the wrong headline

2014-04-14 Thread Fletcher Charest
Hi Nick,

I would like to thank you, since your message made me curious about git,
and I started using it. After reading a little bit, I was able to install
it, clone the org repository and revert the commit we were talking about
(that feels good). I can now use Org normally again. I just hope it's not a
very bad thing to do.

FC


On Thu, Apr 10, 2014 at 5:24 AM, Nick Dokos ndo...@gmail.com wrote:

 Fletcher Charest fletcher.char...@gmail.com writes:

  Nick, you say you could not reproduce the bug using version
  8.2.5h-667-g971dc4, but you did with version 8.2.5h-888-g798bb8d. Just
  out of curiosity: does the '888' in '8.2.5h-888-g798bb8d' is a number
  that is incremented chronologically? If this is correct (I'm not
  familiar with this at all), FWIW, the bug was not caused only by the
  patch '8.2.5h-888-g798bb8d', since I observed it also with version
  8.2.5h-94-g91175a.
 

 888 is the number of commits since the commit that was tagged
 '8.2.5h'. Unfortunately, that number can be misleading: in the
 face of merges, there may be multiple paths that lead from some commit
 back to the tagged commit (run `gitk master' if you want to see the
 multiple
 paths), so the number of commits since the tag is ambiguous. It is
 only unambiguous if the history is strictly linear.

 If you do `git log --oneline -100' on master, you'll see that there is a
 merge commit d25846b that looks like this:

 ,
 | $ git show d25846b
 | commit d25846b2340e32dea93fc89ea432f74a7f64d950
 | Merge: f261833 91175a3
 | Author: Nicolas Goaziou n.goaz...@gmail.com
 | Date:   Sat Mar 29 15:02:10 2014 +0100
 |
 | Merge branch 'maint'
 `

 The merge commit has two parents: f261833 and our old friend 91175a3.

 Try git describe on this commit:

git describe d25846b

 It's only one commit ahead of 91175a3 but I get

release_8.2.5h-873-gd25846b

 so it's 873 commits ahead of 8.2.5h, not 95! But that's because `git
 describe' takes a different, much longer, path back to the tagged
 commit: it follows the first parent of the merge commit.

 So I'm pretty sure that the patch that the bisection fingered is
 indeed the culprit.

 I believe this is correct but if not, Achim will correct me:-)

 --
 Nick





Re: [O] Fwd: Mac OS Alias file links

2014-04-14 Thread Achim Gratz
Ken Mankoff writes:
 Aliases are a type of links (ln on linux, shortcut on Windows
 alias on OS X (OS X of course also supports ln)). The difference
 between an OS X alias and ln is that if the target is moved, the OS X
 alias still points to it, and double-clicking on an alias (or issuing
 the open command in a terminal) will open the target, wherever it
 is.

If I understand correctly, this only works through Finder and not from a
shell and POSIX file access functions.  Whether or not Emacs could use
aliases therefore depends on what interface it is using to access files
on MacOS (I have no idea).

 I just checked in a VM and Windows Shortcuts also behave this way.

No, they don't.  Explorer does find the file if you move it into a
subfolder and will ask you to tell it where it went if it doesn't find
it, but any direct access through that shortcut will fail as if the file
didn't exist.  Also, WIndows shortcuts and Windows links are two totally
different things and links don't follow moving targets either.


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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] A file with 'org-mode rot'?

2014-04-14 Thread Eric S Fraga
On Friday, 11 Apr 2014 at 10:46, Bastien wrote:

[...]

 Just checking -- are things better now?

For me, they seem to be but I haven't consciously been thinking about
this problem... too busy with meetings at work!  I know that I have
recently upgraded org several times on at least one of my systems and I
didn't notice any performance hits.

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.5h-660-gef207f



Re: [O] total time spent on a task

2014-04-14 Thread Christoph Groth
Hello Sacha,

Thanks for your quick reply.

Sacha Chua sa...@sachachua.com writes:

 C-c C-x C-d (org-clock-display) will show the task times as overlays
 on the headings.

That seems to be exactly what I need.  It works, but only shows times
for top-level headings (i.e. for example miscellaneous but not the
TODO items underneath).  Is this the way this is supposed to work?

I can see that overlays are added for all the headings that were clocked
on lower levels as well, but that overlays contain only spaces.

Best,
Christoph




Re: [O] Fwd: Mac OS Alias file links

2014-04-14 Thread Ken Mankoff

On 2014-04-14 at 12:26, Achim Gratz wrote:
 Ken Mankoff writes:
 Aliases are a type of links (ln on linux, shortcut on Windows
 alias on OS X (OS X of course also supports ln)). The difference
 between an OS X alias and ln is that if the target is moved, the OS
 X alias still points to it, and double-clicking on an alias (or
 issuing the open command in a terminal) will open the target,
 wherever it is.

 If I understand correctly, this only works through Finder and not from
 a shell and POSIXfile access functions.  Whether or not Emacs could
 use aliases therefore depends on what interface it is using to access
 files on MacOS (I have no idea).

When you say this only works I'm not sure what you are referring to. I
assume creation and/or access.

* Creation 

Yes creating Aliases is a Finder function, although creation can be
scripted from the shell through the osascript CLI utility provided on
OSX.

* Access

Some access works through the shell.

If I make a link to an alias in Org, opening the link works and is
handled by the system for all the different types of files I can create
an alias to.

But an alias is not like an ln-like link. It presents to the OS as its
own file, so if you try to edit an alias to a plain text file, you get a
bunch of garbage (the alias), not the plain text file.

In my fantasy, the link wouldn't be to an alias file, it would *contain
the alias* the way the BibDesk field does. Therefore C-o on an alias:
link would require extra code: Decode the alias, then pass it off to the
system.

 I just checked in a VM and Windows Shortcuts also behave this way.

 No, they don't.  Explorer does find the file if you move it into a
 subfolder and will ask you to tell it where it went if it doesn't find
 it, but any direct access through that shortcut will fail as if the
 file didn't exist.  Also, WIndows shortcuts and Windows links are two
 totally different things and links don't follow moving targets either.

My system is different. I'm not sure why. I have an XP VM. I created a
New Text Document file on the desktop. I right-click, and select
Create Shortcut. I have a new shortcut on the desktop. I moved the
original file elsewhere (C:\, My Documents, etc. not just subfolders),
double-clicked on the shortcut (still on Desktop), and the original file
opened. I could edit and save it and saves were placed into the
relocated file. If direct access you mean POSIX-level access, then
perhaps. I don't know. But I think emacs can operate on files at a
higher level. 

  -k.



Re: [O] [BUG] Cannot export a raw link

2014-04-14 Thread Achim Gratz
Nicolas Goaziou writes:
 Correct. It should be fixed.

It still isn't correct.  If you put // after a file: scheme, then
you need to put an authority there (an empty authority means localhost
in some contexts, but then the path has to start with a slash).  Also,
with the new implementation relative file: links would stop working.  A
relative file link cannot have any slashes after the scheme, while an
absolute path must have three (not going into the vagaries of trying to
use UNC paths and file links that work around the security policies of
various web browsers).

http://www-archive.mozilla.org/quality/networking/testing/filetests.html


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Fwd: Mac OS Alias file links

2014-04-14 Thread Charles Berry
Ken Mankoff mankoff at gmail.com writes:

 
 
 On 2014-04-14 at 12:26, Achim Gratz wrote:
  Ken Mankoff writes:
  Aliases are a type of links (ln on linux, shortcut on Windows
  alias on OS X (OS X of course also supports ln)). The difference
  between an OS X alias and ln is that if the target is moved, the OS
  X alias still points to it, and double-clicking on an alias (or
  issuing the open command in a terminal) will open the target,
  wherever it is.
 
[...]

 In my fantasy, the link wouldn't be to an alias file, it would *contain
 the alias* the way the BibDesk field does. Therefore C-o on an alias:
 link would require extra code: Decode the alias, then pass it off to the
 system.
 

The point of using an alias rather than a filename or the name of a 
symbolic link that points to the file is that it inherits the property
of Mac OS X aliases that moving the file does not break the alias ---
it still points to file.

For this to work as you fantasize, you would need to enable the Finder 
application to modify the part of the *.org file that encodes the alias 
when you change the location of the aliased file just as the Finder 
does to the alias when the location of the aliased file is modified in the 
Finder.

That is a heavy lift.

OTOH, writing an AppleScript to make an alias in a folder that is never 
moved, writing elisp to call that script and then make an org-mode link to 
the alias just created might work for you.

HTH,

Chuck




Re: [O] total time spent on a task

2014-04-14 Thread Sacha Chua
Christoph Groth christ...@grothesque.org writes:

Hello, Christoph!

 C-c C-x C-d (org-clock-display) will show the task times as overlays
 on the headings.
 That seems to be exactly what I need.  It works, but only shows times
 for top-level headings (i.e. for example miscellaneous but not the
 TODO items underneath).  Is this the way this is supposed to work?
 I can see that overlays are added for all the headings that were clocked
 on lower levels as well, but that overlays contain only spaces.

Hmm, mine shows clock overlays for all headings with clock entries,
including TODO headings. I'm on Org 8.2.5h. By any chance, could those
overlays have invisible text? You can customize-face org-clock-overlay.
I remember that had been a problem for some people before.

Sacha




Re: [O] Fwd: Mac OS Alias file links

2014-04-14 Thread Ken Mankoff

On 2014-04-14 at 13:42, Charles Berry wrote:
 The point of using an alias rather than a filename or the name of a
 symbolic link that points to the file is that it inherits the property
 of Mac OS X aliases that moving the file does not break the alias ---
 it still points to file.

Exactly!

 For this to work as you fantasize, you would need to enable the Finder
 application to modify the part of the *.org file that encodes the
 alias when you change the location of the aliased file just as the
 Finder does to the alias when the location of the aliased file is
 modified in the Finder.

I don't think so. I'm not sure how BibDesk handles it, but my BibTeX
file is not modified when I move the PDF that is linked to an entry via
that 1200 character field that encodes the alias. Clearly BibDesk does
something neat to encode and decode that field, but once created, the OS
nor Finder know anything about that line or the file containing it. I
don't think Finder would need to know about a string in an Org file
either.

 OTOH, writing an AppleScript to make an alias in a folder that is
 never moved, writing elisp to call that script and then make an
 org-mode link to the alias just created might work for you.

Yes this would work too as a hack.

  -k.



Re: [O] [ANN] Firefox extension for org-protocol and org-capture

2014-04-14 Thread Alexander Baier
On 2014-02-21 15:06 Olivier Schwander wrote:
 Dear list,

 I would like to announce the first version of an extension to
 call org-capture through org-protocol from Firefox:
  - http://chadok.info/firefox-org-capture/

 It just does the same thing as the Javascript bookmarklet but without
 the need to register the scheme org-protocol:// in Firefox/Gnome/KDE/XDG
 (or whatever we are supposed to do this week to manage handler for
 protocols). I hope this solution to be easier and more reliable, at
 least for Firefox users.

 It is not on https://addons.mozilla.org for now, but I will submit it
 for review in a few days.

 Olivier




This sounds like a very useful thing, thank you!

I cannot, however, get this to work. I am not sure what to put into the
Template field on the preference page of the org-capture plugin. Can
anyone give me some advice here?

Regards,
-- 
 Alexander Baier



Re: [O] [BUG] Cannot export a raw link

2014-04-14 Thread Nicolas Goaziou
Hello,

Achim Gratz strom...@nexgo.de writes:

 It still isn't correct.  If you put // after a file: scheme, then
 you need to put an authority there (an empty authority means localhost
 in some contexts, but then the path has to start with a slash). 

The patch didn't change file scheme handling. It changed http,
https and ftp.

 Also, with the new implementation relative file: links would stop
 working. A relative file link cannot have any slashes after the
 scheme, while an absolute path must have three (not going into the
 vagaries of trying to use UNC paths and file links that work around
 the security policies of various web browsers).

With latest patch and following Org buffer

  file:test.org
  file:/test.org
  file:///test.org

I get (HTML export)

  a href=test.htmltest.html/a
  a href=file:///test.htmlfile:///test.html/a
  a href=file:///test.htmlfile:///test.html/a

So, it looks good so far.

Unfortunately, it fails with a non-empty authority. E.g.,

  file://hostname/test.org

becomes

  a href=hostname/test.htmltest.html/a

So it is not satisfactory.

One possibility is to store somewhere in the parsed link that the URI
provided the // part, and, if so, re-introduce it unconditionally when
building back the link.

Another one is to drop the whole thing, return to previous state, and
implement ad-hoc rules to fix file:, which is probably the only scheme
introducing problems.


Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] Cannot export a raw link

2014-04-14 Thread Achim Gratz
Nicolas Goaziou writes:
 With latest patch and following Org buffer

   file:test.org
   file:/test.org
   file:///test.org

 I get (HTML export)

   a href=test.htmltest.html/a
   a href=file:///test.htmlfile:///test.html/a
   a href=file:///test.htmlfile:///test.html/a

 So, it looks good so far.

groff has this snippet:

--8---cut here---start-8---
  (if (file-name-absolute-p raw-path)
  (concat file:// (expand-file-name raw-path))
(concat file:// raw-path)))
--8---cut here---end---8---

which unconditionally adds an authority if I read it correctly.

 Unfortunately, it fails with a non-empty authority. E.g.,

   file://hostname/test.org

 becomes

   a href=hostname/test.htmltest.html/a

 So it is not satisfactory.

Right, I didn't read as far into the patch.

 One possibility is to store somewhere in the parsed link that the URI
 provided the // part, and, if so, re-introduce it unconditionally when
 building back the link.

Well, there's the option of correctly parsing into scheme, authority,
path, query and fragment...  But that is probably not going into 8.2.6
in any case.

https://tools.ietf.org/html/rfc3986

 Another one is to drop the whole thing, return to previous state, and
 implement ad-hoc rules to fix file:, which is probably the only scheme
 introducing problems.

I forgot what the previous state was, but trying to fix file: URIs
without correctly parsing them sounds like a losing proposition.


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

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] org-agenda-custom-command for property AND TODO state (for a cooking guide :) )

2014-04-14 Thread Alexander Baier
On 2014-03-28 14:45 Xebar Saram wrote:
 Hi all i was wondering if anyone knew how to set
 a org-agenda-custom-command for property AND TODO state? that is create a
 custom view that is similar to this sparse tree command:

 C-c /  M   type=main/COOK

 where it would match on type=main and have a COOK todo keyword

 best

 Z

 P.S in case anyone wonders wth im using it for :) im trying to auto
 generate a list of things to cook (todo word COOK) by type of meal so id
 generate a list for main dishes, breakfast etc :)

Does this work for you?

C-c / m   +TODO=TODO+TYPE=main

HTH,
-- 
 Alexander Baier



Re: [O] [BUG] Cannot export a raw link

2014-04-14 Thread Nicolas Goaziou
Achim Gratz strom...@nexgo.de writes:

 groff has this snippet:


   (if (file-name-absolute-p raw-path)
   (concat file:// (expand-file-name raw-path))
 (concat file:// raw-path)))

This needs to be fixed, along with ox-man.el. Anyway, that wasn't
introduced with the patch being discussed.

 Well, there's the option of correctly parsing into scheme, authority,
 path, query and fragment...  But that is probably not going into 8.2.6
 in any case.

I don't think we need to completely parse the URI because:

  - we are not going to consume it,
  - Org syntax is not completely compatible with RFC3986 (e.g., search
options like [[file:test.org::* My headline]]).

I think we need scheme, authority, path+query+fragment, and search
options. At the moment, the parser handles scheme,
authority+path+query+fragment and search options.
`url-generic-parse-url' may help, too.

We also need a function to build back the link, in order to make life of
back-end developers easier. This is why authority is needed.

 Another one is to drop the whole thing, return to previous state, and
 implement ad-hoc rules to fix file:, which is probably the only scheme
 introducing problems.

 I forgot what the previous state was, but trying to fix file: URIs
 without correctly parsing them sounds like a losing proposition.

Previous state was, in a nutshell, to recognize scheme:blob, which leads
to the same kind of problem since blob may or may not contain the
authority part.


Regards,

-- 
Nicolas Goaziou



[O] Fast Access to TODO States without C-t

2014-04-14 Thread Esben Stien

I'm trying to figure out how to bind fast access to TODO states, without
using C-t.

The reason is that I have C-t as escape code for my screen session.

The command org-todo is bound to C-c t here, so when I try to fast
access to the TODO state DONE(d!), I can't get to it. 

C-c t d just puts 'd' in the buffer after switching to the next state. 

According to the manual, I'm supposed to hit C-c C-t d

Any pointers as to how I can do this?

-- 
Esben Stien is b0ef@e s  a 
 http://www. s tn m
  irc://irc.  b  -  i  .   e/%23contact
   sip:b0ef@   e e 
   jid:b0ef@n n



[O] Multiple Recursive Directories with org-agenda-files

2014-04-14 Thread Esben Stien
I'm trying to add a few recursive directories to org-agenda-files, but
can't really find any examples doing this 

I got like 250 org files spread over a few directories.

I want to add:

~/foo/bar/
~/baz/quux/
~/hukarz/grault/

..which again includes multiple directories with .org files and a few
other files which I don't want included.

Anyone who does this?

-- 
Esben Stien is b0ef@e s  a 
 http://www. s tn m
  irc://irc.  b  -  i  .   e/%23contact
   sip:b0ef@   e e 
   jid:b0ef@n n



Re: [O] Fwd: Mac OS Alias file links

2014-04-14 Thread Ivan Andrus
On Apr 14, 2014, at 12:36 PM, Ken Mankoff mank...@gmail.com wrote:

 On 2014-04-14 at 13:42, Charles Berry wrote:
 
 For this to work as you fantasize, you would need to enable the Finder
 application to modify the part of the *.org file that encodes the
 alias when you change the location of the aliased file just as the
 Finder does to the alias when the location of the aliased file is
 modified in the Finder.
 
 I don't think so. I'm not sure how BibDesk handles it, but my BibTeX
 file is not modified when I move the PDF that is linked to an entry via
 that 1200 character field that encodes the alias. Clearly BibDesk does
 something neat to encode and decode that field, but once created, the OS
 nor Finder know anything about that line or the file containing it. I
 don't think Finder would need to know about a string in an Org file
 either.

We can look at a BibDesk file to see how it works.  It adds a special field 
like:

Bdsk-File-1 = {YnBsaXN0MDDUA...AAAMO}

We guess that this base64 encoded, so we decode it (M-x base64-decode-region)  
This then gives us a binary plist (it starts with bplist) which we can turn 
into a readable form with M-: plutil -convert xml1 -o - - RET

This gives an xml representation of what BibDesk stores.  It’s an archived 
object of some kind, but I don’t know about OS X aliases to know what is the 
important part--I presume the NS.data portion.  It probably wouldn’t be too 
hard to borrow the code from BibDesk and extend Emacs to do the same thing, or 
write an external script.  I’m not sure whether it would be possible to do it 
without touching C/Obj-C.  I would be interested in using such a thing (in 
BibDesk .bib files actually), though probably not in writing it.  :-)

-Ivan


Re: [O] Fwd: Mac OS Alias file links

2014-04-14 Thread Charles C. Berry

On Mon, 14 Apr 2014, Ivan Andrus wrote:


On Apr 14, 2014, at 12:36 PM, Ken Mankoff mank...@gmail.com wrote:


On 2014-04-14 at 13:42, Charles Berry wrote:


For this to work as you fantasize, you would need to enable the Finder
application to modify the part of the *.org file that encodes the
alias when you change the location of the aliased file just as the
Finder does to the alias when the location of the aliased file is
modified in the Finder.


I don't think so. I'm not sure how BibDesk handles it, but my BibTeX
file is not modified when I move the PDF that is linked to an entry via
that 1200 character field that encodes the alias. Clearly BibDesk does
something neat to encode and decode that field, but once created, the OS
nor Finder know anything about that line or the file containing it. I
don't think Finder would need to know about a string in an Org file
either.


We can look at a BibDesk file to see how it works.  It adds a special field 
like:

Bdsk-File-1 = {YnBsaXN0MDDUA...AAAMO}



We guess that this base64 encoded, so we decode it (M-x 
base64-decode-region)  This then gives us a binary plist (it starts with 
bplist) which we can turn into a readable form with M-: plutil -convert 
xml1 -o - - RET


Or copy it and run

pbpaste | base64 -D | plutil -p -

in the shell.



This gives an xml representation of what BibDesk stores.


BibDesk has an archive of entries typically stored at

~/Library/Caches/Metadata/edu.ucsd.cs.mmccrack.bibdesk/*.bdskcache

and the 'NS.data' element of Bdsk-File-1 seems to point to one element.

The *.bdskcache file has a bplist and I guess the 'FileAlias' component 
is what points to the pdf or whatever.


The relevant source for the alias itself seems to be here:

http://sourceforge.net/p/bibdesk/svn/19370/tree//trunk/bibdesk/BDSKAlias.m

but I do not do objective C nor CoreFoundation.h, which I think is where 
the alias stuff lives now.


I think it would be necessary for one to have a good handle on 
the stuff in CoreFoundation.h to make sense of this.


It’s an 
archived object of some kind, but I don’t know about OS X aliases to 
know what is the important part--I presume the NS.data portion.  It 
probably wouldn’t be too hard to borrow the code from BibDesk and extend 
Emacs to do the same thing, or write an external script.  I’m not sure 
whether it would be possible to do it without touching C/Obj-C.  I would 
be interested in using such a thing (in BibDesk .bib files actually), 
though probably not in writing it.  :-)





One approach that sidesteps having to know the CoreFoundation.h stuff is 
to use the BibDesk AppleScript capabilities. There is a model for this at


http://www.jonathansick.ca/adsbibdesk/

written in python, FWIW.

HTH,

Chuck

Re: [O] Fast Access to TODO States without C-t

2014-04-14 Thread Eric Abrahamsen
Esben Stien b...@esben-stien.name writes:

 I'm trying to figure out how to bind fast access to TODO states, without
 using C-t.

 The reason is that I have C-t as escape code for my screen session.

 The command org-todo is bound to C-c t here, so when I try to fast
 access to the TODO state DONE(d!), I can't get to it. 

 C-c t d just puts 'd' in the buffer after switching to the next state. 

 According to the manual, I'm supposed to hit C-c C-t d

 Any pointers as to how I can do this?

I may be misunderstanding here, but screen will send the escape key to
the running program if you hit it twice, right? I use the StumpWM window
manager, with the escape key also set to C-t, and I think both of them
behave the same way: first escape is caught, second is sent to the
program. So you'd do C-c C-t C-t d. How does that work?

Also, if you set `org-use-speed-commands' to t, you can use single
keystrokes when point is to the left of headline stars. I find this
immensely useful. Get point to the left margin and hit t, that's all
you need.

Yours,
Eric




Re: [O] Fwd: Mac OS Alias file links

2014-04-14 Thread Ken Mankoff

On 2014-04-14 at 20:21, Charles C. Berry wrote:
 BibDesk has an archive of entries typically stored at

 ~/Library/Caches/Metadata/edu.ucsd.cs.mmccrack.bibdesk/*.bdskcache

 and the 'NS.data' element of Bdsk-File-1 seems to point to one element.

 The *.bdskcache file has a bplist and I guess the 'FileAlias' component 
 is what points to the pdf or whatever.

Aha! I think this is essentially what you described in your last
email when you said,

 OTOH, writing an AppleScript to make an alias in a folder that is
 never  moved, writing elisp to call that script and then make an
 org-mode link to  the alias just created might work for you.  

I guess that is how it is done. I think I can figure out how to do this
much in elisp + a system language. The elisp side will be a good
learning project.

 One approach that sidesteps having to know the CoreFoundation.h stuff
 is to use the BibDesk AppleScript capabilities. There is a model for
 this at

 http://www.jonathansick.ca/adsbibdesk/

 written in python, FWIW.

Yes. The AppKit module is a nice interface from Python to the OSX
system. I think I will likely write the non-emacs code using this, or
AppleScript or Automator directly.

  -k.



Re: [O] The Org Package

2014-04-14 Thread adam
Thank you for this discussion, John, David and others. 

When installing a new distro, it sure seems wise to not include 
the Org options at Emacs install time (Ubuntu installers I use). 
And to set up the Org location and Git system soonest.







Re: [O] Fast Access to TODO States without C-t

2014-04-14 Thread Esben Stien
Eric Abrahamsen e...@ericabrahamsen.net writes:

 I may be misunderstanding here, but screen will send the escape key to
 the running program if you hit it twice, right? I use the StumpWM window
 manager, with the escape key also set to C-t, and I think both of them
 behave the same way: first escape is caught, second is sent to the
 program. So you'd do C-c C-t C-t d. How does that work?

No, C-t C-t switches between screen windows.

 Also, if you set `org-use-speed-commands' to t, you can use single
 keystrokes when point is to the left of headline stars. I find this
 immensely useful. Get point to the left margin and hit t, that's all
 you need.

This speedy gonzales command was really cool and I think I'll use that
for a lot of things;)

, but I don't see how I can have fast access to TODO states.

If I hit 't' over a TODO item, it just changes the state to the next
state. How can I jump to DONE(d!), f.ex?

-- 
Esben Stien is b0ef@e s  a 
 http://www. s tn m
  irc://irc.  b  -  i  .   e/%23contact
   sip:b0ef@   e e 
   jid:b0ef@n n



Re: [O] Fast Access to TODO States without C-t

2014-04-14 Thread Eric Abrahamsen
Esben Stien b...@esben-stien.name writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 I may be misunderstanding here, but screen will send the escape key to
 the running program if you hit it twice, right? I use the StumpWM window
 manager, with the escape key also set to C-t, and I think both of them
 behave the same way: first escape is caught, second is sent to the
 program. So you'd do C-c C-t C-t d. How does that work?

 No, C-t C-t switches between screen windows.

Well there's got to be some way to send the escape sequence to the
running process! Googling indicates it might be C-t t -- does C-c C-t t
d work?

 Also, if you set `org-use-speed-commands' to t, you can use single
 keystrokes when point is to the left of headline stars. I find this
 immensely useful. Get point to the left margin and hit t, that's all
 you need.

 This speedy gonzales command was really cool and I think I'll use that
 for a lot of things;)

 , but I don't see how I can have fast access to TODO states.

 If I hit 't' over a TODO item, it just changes the state to the next
 state. How can I jump to DONE(d!), f.ex?

I think I get the menu because I have org-use-fast-todo-selection set to
t. Look at the docstring for that variable and try a few different
values -- I think you're almost there.




Re: [O] ob-clojure: ':results pp' parses the output as a string value

2014-04-14 Thread Phill Wolf
Yes, perfect!


On Mon, Apr 14, 2014 at 6:35 AM, Oleh ohwoeo...@gmail.com wrote:

 Hi Phil,

 Could you test my last commit? Your case should be working now.

 regards,
 Oleh



Re: [O] Export arrays for 'sh' code blocks when using bash

2014-04-14 Thread Eric Schulte
Pascal Fleury fle...@google.com writes:

 Hello,

 Great, thanks for the guidance. I hope I managed it all correctly.


I've applied this patch.

I made a couple of minor changes in a subsequent commit (a7189aa).
These were indentation and whitespace changes to enforce two coding
conventions,

1. limit line lengths to 80 characters
2. remove dangling parens on lines w/o any other text

and to rename one function to be specific to ob-shell.el.

Thanks for contributing!


 On Fri, Apr 11, 2014 at 11:33 AM, Bastien b...@gnu.org wrote:

 Hi Eric and Pascal,

 Eric Schulte schulte.e...@gmail.com writes:

  Also, I think the google-wide copyright stuff is sorted out.

 Yes it is: we can accept patch from employees of Google, Inc.


 Good :-)


 Pascal, I guess it's safe to assume anyone with a @google.com
 email address is a Google employee -- let me know if it's not
 the case.


 Yes, I checked internally, and this is a safe assumption.


 Also, if you can sign your patches (git format-patch -s) that'd
 be even better, but not mandatory.


 I did, also wrote the description of the patch according to the rules I
 found on orgmode.org


 Thanks!

 --
  Bastien



 Best regards,
 --paf


-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] Export arrays for 'sh' code blocks when using bash

2014-04-14 Thread Eric Schulte

 Also, if you can sign your patches (git format-patch -s) that'd
 be even better, but not mandatory.


Should I start signing my patches as well?

I'm very happy to, I've just never thought about it.  If so is there an
easy way to make -s a default option for the Org-mode repo?

Thanks,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] org-agenda-custom-command for property AND TODO state (for a cooking guide :) )

2014-04-14 Thread Xebar Saram
thx alot  Alexander!

this worked. any idea how to bind this to a key?
ie have  C-c / m   +TODO=TODO+TYPE=main bound to F1-c   etc..

best

Z


On Mon, Apr 14, 2014 at 11:03 PM, Alexander Baier lexi.ba...@gmail.com
wrote:

 On 2014-03-28 14:45 Xebar Saram wrote:
  Hi all i was wondering if anyone knew how to set
  a org-agenda-custom-command for property AND TODO state? that is create
a
  custom view that is similar to this sparse tree command:
 
  C-c /  M   type=main/COOK
 
  where it would match on type=main and have a COOK todo keyword
 
  best
 
  Z
 
  P.S in case anyone wonders wth im using it for :) im trying to auto
  generate a list of things to cook (todo word COOK) by type of meal so id
  generate a list for main dishes, breakfast etc :)

 Does this work for you?

 C-c / m   +TODO=TODO+TYPE=main

 HTH,
 --
  Alexander Baier