Re: [O] ~"~ doesn't register as verbatim

2014-02-25 Thread Sebastien Vauban
Hello Alan,

Alan Schmitt wrote:
> Oleh  writes:
>> On Sat, Feb 22, 2014 at 5:06 PM, Oleh  wrote:
>>> I'm using verbatim markers to export them as  in HTML.
>>> But ~"~ isn't recognized as verbatim. I've tried fiddling with 
>>> org-verbatim-re,
>>> but it doesn't update on revert-buffer.
>>>
>>> Can someone hep me with this?
>>> Maybe a workaround inline snippet that transforms to " on
>>> HTML export?
>>
>> Found the work-around:
>>
>> @@html:"@@
>>
>> will do what I want.
>
> I had a similar question recently
> (http://thread.gmane.org/gmane.emacs.orgmode/82300). The trick is to
> change the variable org-emphasis-regexp-components such that the borders
> part no longer include ".

Could you maybe share your customization, then?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] ~"~ doesn't register as verbatim

2014-02-25 Thread Oleh
> Hello Alan,
>
> Alan Schmitt wrote:
>> Oleh  writes:
>>> On Sat, Feb 22, 2014 at 5:06 PM, Oleh  wrote:
 I'm using verbatim markers to export them as  in HTML.
 But ~"~ isn't recognized as verbatim. I've tried fiddling with 
 org-verbatim-re,
 but it doesn't update on revert-buffer.

 Can someone hep me with this?
 Maybe a workaround inline snippet that transforms to " on
 HTML export?
>>>
>>> Found the work-around:
>>>
>>> @@html:"@@
>>>
>>> will do what I want.
>>
>> I had a similar question recently
>> (http://thread.gmane.org/gmane.emacs.orgmode/82300). The trick is to
>> change the variable org-emphasis-regexp-components such that the borders
>> part no longer include ".
>
> Could you maybe share your customization, then?
>

I can share it:

(setcar (nthcdr 2 org-emphasis-regexp-components) " \t\n,'")
(custom-set-variables `(org-emphasis-alist ',org-emphasis-alist))

regards,
Oleh



Re: [O] Help with tangling a table into a source-code representation of the data contained within

2014-02-25 Thread Rainer M Krug
t...@tsdye.com (Thomas S. Dye) writes:

> Aloha Grant,
>
> Grant Rettke  writes:
>
>> Hi,
>>
>> My goal is to define a table in org-mode, display it nicely to humans
>> using export, and tangle that same data table into
>> an elisp data structure for use elsewhere within the program. It might
>> look something like this:
>>
>> ;;;
>>
>> * Modes
>>
>> This is a place for humans to keep track both of what
>> modes activated for what file types; and also what utilies are used
>> with those modes when they are activated.
>>
>> #+tblname: modes_data
>> | mode name | file_type | paredit | auto-save |
>> |---+---+-+---|
>> | scheme | .scm  | yes | yes   |
>> | elisp | .el   | yes | yes   |
>> | ielm  | nil   | yes | no|
>>
>> * Test
>>
>> #+begin_src emacs-lisp :noweb tangle :tangle test.el
>>   (mapcar (lambda (row) (message (car row))) modes_data)
>> #+end_src
>
> I think you want:
> #+header: :var modes-data=modes-data

I don't know about the #+header, but the following works for me perfectly:'

* Columns to evaluate
#+NAME: COLS_TO_EVAL
|   | name  | usable |
|---+---+|
| 1 | NPPyC | FALSE  |
| 2 | DBBVy | TRUE   |
| 3 | DBRFy | FALSE  |
| 4 | DBSSy | FALSE  |
| 5 | levelstress_2 | TRUE   |
#+PROPERTY: var+ COLS_TO_EVAL=COLS_TO_EVAL

Cheers,

Rainer

>
> or something similar.
>
> hth,
> Tom

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug


pgpyoofro3oKB.pgp
Description: PGP signature


Re: [O] ~"~ doesn't register as verbatim

2014-02-25 Thread Alan Schmitt
Oleh  writes:

>> Could you maybe share your customization, then?

It was clearly not as elegant as this:

> I can share it:
>
> (setcar (nthcdr 2 org-emphasis-regexp-components) " \t\n,'")
> (custom-set-variables `(org-emphasis-alist ',org-emphasis-alist))

However I don't understand why the second line is necessary (but when
testing it, I found it necessary).

Alan



Re: [O] ~"~ doesn't register as verbatim

2014-02-25 Thread Oleh
>>> Could you maybe share your customization, then?
>
> It was clearly not as elegant as this:
>
>> I can share it:
>>
>> (setcar (nthcdr 2 org-emphasis-regexp-components) " \t\n,'")
>> (custom-set-variables `(org-emphasis-alist ',org-emphasis-alist))
>
> However I don't understand why the second line is necessary (but when
> testing it, I found it necessary).
>

`org-emphasis-alist` has a :set handler `org-set-emph-re` which will do the job
of setting up the regexps. I don't want to call `org-set-emph-re` directly,
instead I set `org-emphasis-alist` to itself and let the customize interface
call the handler for me.

regards
Oleh



Re: [O] Namespace problem org-mode / Clojure

2014-02-25 Thread Volker Strobel

Hi Soapy,

thank you! I feel at ease knowing that you could replicate
the behavior, as I was trying to find the error in my settings for a
long, long time (and as mentioned before, it did work for some time, and
I've no clue why - I've played around with some settings in the init file). 

And yes, adding an explicit namespace declaration (ns, in-ns) to every code
block works, but that's a rather roundabout way (I've many small
snippets in the same namespace) and it produces a bit 'unsightly',
tangled code. So, I'd be really glad, if this issue could be processed.

Best, Volker

Soapy Smith  writes:

> Hi Volker-
>
> I tried the your example code blocks on my system, and I concur with
> most of the behavior you described.
>
> org-babel-execute-buffer does not work, as it comes back with error
> "repl not connected".  It did not cause a crash.
> However, if I add explicit namespace declaration to the 2nd block, it
> works!  This is true even thought the 3rd block does not(???).
>
> I was thinking back to why I never encountered this problem, and it is
> because I have almost always used an explicit namespace declaration at
> the top of the block.  Fortunately, after the first block, you don't
> have to use the optional parameters, includes etc.  In your example
>
> (ns environment.my-test)
>
> added to subsequent code blocks you wish to execute in the same
> namespace should be sufficient.  I think this should be considered the
> "work-around" until someone can explain what is going on, or, even
> better, can fix this.
>
> I'm the person who updated the worg documentation for Clojure code
> blocks.  I'm thinking about adding a list of TODOs at the bottom, as
> there have been some other requests recently to the function behavior.
> This issue definitely will go on the list.  Hopefully Bastien is
> monitoring and can comment if this is appropriate to add to the Clojure
> specific worg page (or should it go somewhere else).
>
> Regards,
> Greg

-- 
Sent with my mu4e




Re: [O] ~"~ doesn't register as verbatim

2014-02-25 Thread Alan Schmitt
Oleh  writes:

>>> (setcar (nthcdr 2 org-emphasis-regexp-components) " \t\n,'")
>>> (custom-set-variables `(org-emphasis-alist ',org-emphasis-alist))
>>
>> However I don't understand why the second line is necessary (but when
>> testing it, I found it necessary).
>>
>
> `org-emphasis-alist` has a :set handler `org-set-emph-re` which will do the 
> job
> of setting up the regexps. I don't want to call `org-set-emph-re` directly,
> instead I set `org-emphasis-alist` to itself and let the customize interface
> call the handler for me.

Quite interesting! Thanks a lot for the very clear explanation.

Alan



Re: [O] Bug: shift-enter in org tables leaves cursor in wrong position [8.2.5h (8.2.5h-6-g8e1386-elpa @ /cygdrive/c/Users/jason/.emacs.d/elpa/org-20140203/)]

2014-02-25 Thread Michael Brand
Hi Bastien

On Thu, Feb 6, 2014 at 9:59 AM, Bastien  wrote:
> Jason Lewis  writes:
>
>> when using the Shift- feature in a table to copy values down, it
>> fails to place the cursor where you expect it to if the previous column
>> has a fixed width and the contents of the cell is truncated.
>
> Fixed in maint, thanks for reporting this!

The related commit

commit 323c7b3de2211a7d61bf0c71c6f5923b1ea62297
Author: Bastien Guerry 
Date:   Thu Feb 6 09:58:17 2014 +0100

org-table.el: Fix bugs about cursor repositioning

* org-table.el (org-table-copy-down)
(org-table-find-dataline, org-table-move-row)
(org-table-insert-hline, org-table-kill-row): Use
`org-move-to-column' with the IGNORE-INVISIBLE arg set to `t',
so that abbreviated rows don't interfer with setting the
cursor back at the correct position.

Thanks to Jason Lewis for reporting one of these bugs.

is a regression for Shift- on 1 in the table below when
hyperlinks are configured to be literal:

| [[http://www.orgmode.org]] | 1 |   |
| [[http://www.orgmode.org]] |   |   |
| [[http://www.orgmode.org]] |   |   |

Michael



Re: [O] Namespace problem org-mode / Clojure

2014-02-25 Thread Soapy Smith
I will add this issue to the list of TODOs for Clojure code blocks.

One thing I can do quickly is see if the problem exists in version 7.9
org with nrepl (prior to CIDER).  I have a machine which still has the
old configuration.  I will try later today and report.

Regards,
Greg
(alias Soapy Smith)


On Tue, 2014-02-25 at 10:22 +0100, Volker Strobel wrote:
> Hi Soapy,
> 
> thank you! I feel at ease knowing that you could replicate
> the behavior, as I was trying to find the error in my settings for a
> long, long time (and as mentioned before, it did work for some time, and
> I've no clue why - I've played around with some settings in the init file). 
> 
> And yes, adding an explicit namespace declaration (ns, in-ns) to every code
> block works, but that's a rather roundabout way (I've many small
> snippets in the same namespace) and it produces a bit 'unsightly',
> tangled code. So, I'd be really glad, if this issue could be processed.
> 
> Best, Volker





[O] Bug: open date in SCHEDULED: lines [8.2.5h (release_8.2.5h-662-ge4a955 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]

2014-02-25 Thread Nicolas Richard
Hiya,

Starting with fc9ce86cfc1ecf7e86028027a12875a26500e774, hitting C-c C-o
on a timestamp in a SCHEDULED: line doesn't work anymore ("No link
found"). I expected it to open the agenda like it does on other links.

Here's a test case:
emacs -Q -L lisp/ ~/tmp/test.org -f forward-line -f forward-line -f 
org-end-of-line -f backward-char -f org-open-at-point
where test.org is this :
#+STARTUP: showeverything
* blam
  SCHEDULED: <2014-02-25 mar>

Thanks,

Emacs  : GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.20)
 of 2014-01-30 on LDLC-portable
Package: Org-mode version 8.2.5h (release_8.2.5h-662-ge4a955 @ 
/home/youngfrog/sourcetrees/org-mode/lisp/)


[O] Problems with org-drill installation

2014-02-25 Thread Shahin Azad
One week ago I installed org-drill using the last version of org-mode
(tarball version) and everythings were fine.
A few days later I tried to install it using elpa (since it's easier to be
update). But after installation I was getting this error:

Making completion list...
Collecting due drill items:   0 |...
Creating unique IDs for items (slow, but only happens once)
mapcar: Wrong type argument: listp, \.\.\.

After a lot o tries to solve this problem I decided to back to old approach
and using the  tarball version. I added this package to the load path and
as you are seeing bellow this package is shadowed the default version of
emacs:

~/.emacs.d/thirdparty/org/lisp/org-bibtex hides
/usr/share/emacs/24.3/lisp/org/org-bibtex
~/.emacs.d/thirdparty/org/lisp/org-capture hides
/usr/share/emacs/24.3/lisp/org/org-capture
~/.emacs.d/thirdparty/org/lisp/ob-io hides
/usr/share/emacs/24.3/lisp/org/ob-io
...

Since I downloaded the tarball named org-8.2.5h.tar.gz I suppose executing
M-x org-version I have to get version 8.2.5 of org-mode, but this is what
I'm getting:

Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @
/home/shahin/.emacs.d/thirdparty/org/lisp/)

I'll be happy if someone help me to solve this problem. org-drill is
awesome and I really need it.

Kindly.

-- 
*Shahin Azad!*
My personal *blog*: http://shahinism.github.io
I like to keep it respectful with *OpenRespect* (http://www.openrespect.org)


Re: [O] Text emphasize with fill-paragraph ?

2014-02-25 Thread Alexander Baier
I remember a post from some time ago, where someone reported that this
kind of formatting only worked for filled paragraphs under 3 lines
long. Sadly I cannot find said post now. Is this the same for you?

I don't know if this a bug or not.

On 2014-02-21 16:31 Martin Leduc wrote:
> Hi all,
>
>   I don't know whether it is a bug, an unimplemented feature or simply
> that I use it wrongly, but I can't emphasize text (with // ** or _ _)
> within a filled paragraph. Moreover, sometime I get it to work but I'm
> not sure how to reproduce.
>
> Thanks,
> Martin
> 

Regards,
-- 
 Alexander Baier



Re: [O] Text emphasize with fill-paragraph ?

2014-02-25 Thread Martin Leduc
Hi,
 to be more specific, I can emphasize a maximum of two lines within a filled 
paragraph of any length. 

Thanks, now I can reproduce, at least... ;)



> From: lexi.ba...@gmail.com
> To: mart...@hotmail.com
> CC: emacs-orgmode@gnu.org
> Subject: Re: Text emphasize with fill-paragraph ?
> Date: Tue, 25 Feb 2014 15:22:32 +0100
> 
> I remember a post from some time ago, where someone reported that this
> kind of formatting only worked for filled paragraphs under 3 lines
> long. Sadly I cannot find said post now. Is this the same for you?
> 
> I don't know if this a bug or not.
> 
> On 2014-02-21 16:31 Martin Leduc wrote:
> > Hi all,
> >
> >   I don't know whether it is a bug, an unimplemented feature or simply
> > that I use it wrongly, but I can't emphasize text (with // ** or _ _)
> > within a filled paragraph. Moreover, sometime I get it to work but I'm
> > not sure how to reproduce.
> >
> > Thanks,
> > Martin
> >   
> 
> Regards,
> -- 
>  Alexander Baier
  

[O] Include on file open?

2014-02-25 Thread Peter Davis

I'd like to put a kind of menu bar at the top of most of my .org pages, so I 
can quickly jump around the most commonly edited files. I can do something like:

| [[file:first.org][first]] | [[file:second.org][second]] | ...

and simply include that in all my files. However, if I change the menu, I have 
to go back and update all those files. A better approach would be to include an 
up-to-date menu file
when each org file is opened, and maybe even reload to update the menu.  
However, the #+INCLUDE: option only works at export time.

Is there a way to automatically include an external file when I open/reload a 
.org file? Or is there a better way to create a menu or frequently visited 
files?

Thanks!
-pd

-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] http link character mistranslated

2014-02-25 Thread mirko
Hi,

(Org-mode version 8.2.5h (release_8.2.5h-651-g897b60)

I have an https address with an equal sign `=':
   https://forums.virtualbox.org/viewforum.php?f=3

When I try to access the link, the `=' is translated as `%D':
   https://forums.virtualbox.org/viewforum.php?f%3D3

I looked in org-open-at-point, and the translation appears somewhere in
org-element-property.  I did not look deeper.

I tested this in an Emacs session with only org mode loaded (no user init)

Thanks,

Mirko




Re: [O] Text emphasize with fill-paragraph ?

2014-02-25 Thread Nick Dokos
Martin Leduc  writes:

> Hi,
>  to be more specific, I can emphasize a maximum of two lines within a filled 
> paragraph of any length.
>
> Thanks, now I can reproduce, at least... ;)
>

If you want more, you need to customize org-emphasis=regexp-components,
in particular the maximum number of newlines allowed.  The doc says:

,
| org-emphasis-regexp-components is a variable defined in `org.el'.
| Its value is ("   ('\"{" "-   .,:!?;'\")}\\" "
| ,\"'" "." 1)
| 
| Documentation:
| Components used to build the regular expression for emphasis.
| This is a list with five entries.  Terminology:  In an emphasis string
| like " *strong word* ", we call the initial space PREMATCH, the final
| space POSTMATCH, the stars MARKERS, "s" and "d" are BORDER characters
| and "trong wor" is the body.  The different components in this variable
| specify what is allowed/forbidden in each part:
| 
| pre  Chars allowed as prematch.  Beginning of line will be allowed 
too.
| post Chars allowed as postmatch.  End of line will be allowed too.
| border   The chars *forbidden* as border characters.
| body-regexp  A regexp like "." to match a body character.  Don't use
|  non-shy groups here, and don't allow newline here.
| newline  The maximum number of newlines allowed in an emphasis exp.
| 
| You need to reload Org or to restart Emacs after customizing this.
`

Also check Oleh's method of customizing this variable: it's much less
error prone than doing it by hand. See

   http://thread.gmane.org/gmane.emacs.orgmode/82571/focus=82669

>> From: lexi.ba...@gmail.com
>> To: mart...@hotmail.com
>> CC: emacs-orgmode@gnu.org
>> Subject: Re: Text emphasize with fill-paragraph ?
>> Date: Tue, 25 Feb 2014 15:22:32 +0100
>>
>> I remember a post from some time ago, where someone reported that this
>> kind of formatting only worked for filled paragraphs under 3 lines
>> long. Sadly I cannot find said post now. Is this the same for you?
>>
>> I don't know if this a bug or not.
>>
>> On 2014-02-21 16:31 Martin Leduc wrote:
>> > Hi all,
>> >
>> > I don't know whether it is a bug, an unimplemented feature or simply
>> > that I use it wrongly, but I can't emphasize text (with // ** or _ _)
>> > within a filled paragraph. Moreover, sometime I get it to work but I'm
>> > not sure how to reproduce.
>> >

Nick




Re: [O] BUG: beamer export and overlay specifications for nested list

2014-02-25 Thread Nicolas Goaziou
Hello,

Andreas Leha  writes:

> there seems to be a bug that becomes apparent when overlay
> specifications are given to items in sublists.

This should be fixed. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: open date in SCHEDULED: lines [8.2.5h (release_8.2.5h-662-ge4a955 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]

2014-02-25 Thread Nicolas Goaziou
Hello,

Nicolas Richard  writes:

> Starting with fc9ce86cfc1ecf7e86028027a12875a26500e774, hitting C-c C-o
> on a timestamp in a SCHEDULED: line doesn't work anymore ("No link
> found"). I expected it to open the agenda like it does on other links.

This should be fixed. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou



[O] bug#16751: 24.3.50; Export during Org export to HTML

2014-02-25 Thread Bastien
Eli Zaretskii  writes:

> Ugh.  Bastien, could you (or someone else of Org developers) please
> look into this?  Why does the URI above causes the recent version of
> Org to pass an invalid file name such as
>
>///opt/tomcat/4/apache-tomcat-4.1.40/... to expand-file-name

I will look into this, but I can't promise anything before next week.

Thanks for the heads up,

-- 
 Bastien





Re: [O] custom link export and ox-md

2014-02-25 Thread Nicolas Goaziou
Hello,

Nick Dokos  writes:

> can you take a look at this patch?

Thank you for the patch. Here we go.

> If it looks OK, I can push it to maint.

Why maint? It isn't a bugfix.

> commit f820173bf514549134e8ba10a1e539cb89f6
> Author: Nick Dokos 
> Date:   Mon Feb 24 14:31:33 2014 -0500
>
> Add handling of user-defined custom links to org-md-link
> 
> * ox-md.el (org-md-link): Add code to handle user-defined custom links.
>   Refactor raw-path calculation to simplify the code.
> 
> Reported by John Peloquin 
> (http://thread.gmane.org/gmane.emacs.orgmode/82627)
>
> diff --git a/lisp/ox-md.el b/lisp/ox-md.el
> index 39843d5..fbc5d6f 100644
> --- a/lisp/ox-md.el
> +++ b/lisp/ox-md.el
> @@ -278,7 +278,8 @@ a communication channel."
>   (if (string= ".org" (downcase (file-name-extension raw-path ".")))
>   (concat (file-name-sans-extension raw-path) ".md")
> raw-path
> - (type (org-element-property :type link)))
> + (type (org-element-property :type link))
> + (raw-path (org-element-property :path link)))

I'd rather not bind RAW-PATH here, as only half the branches in the
`cond' are using it. Also, I think it is clearer to mostly do bindings
close to the areas where they are needed.

> -(let ((path (let ((raw-path (org-element-property :path link)))
> -  (if (not (file-name-absolute-p raw-path)) raw-path
> -(expand-file-name raw-path
> +(let ((path (if (not (file-name-absolute-p raw-path)) raw-path
> +(expand-file-name raw-path)))

See above.

> -(let ((ref (org-element-property :path link)))
> +(let ((ref raw-path))

If you want to go further, you could even remove REF, but, see above.

> -   (t (let* ((raw-path (org-element-property :path link))
> - (path
> +   ;; Link type is handled by a special function.
> +   ((functionp (setq protocol (nth 2 (assoc type org-link-protocols
> +(funcall protocol raw-path contents 'md))
> +

This raises an interesting question. What do we do with derived
back-ends? E.g., what should happen if TYPE is handled in
`org-link-protocols' for `html' but not `md'?

Also the blank line is not needed.


Regards,

-- 
Nicolas Goaziou



Re: [O] Drag and drop, pasting images and files

2014-02-25 Thread Marcelo de Moraes Serpa
Niiice! Thanks for sharing Oleh.

Does anyone know if a paste hook would be possible for the exact same use
case?



On Mon, Feb 24, 2014 at 12:01 PM, Oleh  wrote:

> > I actually posted it here:
> >
> > https://github.com/railwaycat/emacs-mac-port/issues/43
> >
> > Emacs + orgmode is the best combo for everything related to information
> > management. I've tried Evernote a couple of times, but the workflow feels
> > slow and awkward, no matter how polished they make the app.
> >
> > One things that I miss is a fast workflow for "embedding" images and
> files
> > in my org files, though. See the ticket description for more details.
> >
> > I'd be willing to actually take the time and try to implement it, could
> be a
> > good learning experience.
> >
> > Does anyone else think these new features would be a nice addition?
> >
> > I want to make sure it's not possible with a simpler approach as well,
> so if
> > you know a similar workflow is possible, please share.
> >
> >
>
> Image drag and drop is already implemented at
> org-mode/contrib/lisp/org-download.el.
> All you have to do is:
>
> (require 'org-download)
>
> It also does screenshots.
> Any issues can be reported to
> https://github.com/abo-abo/org-download/issues
>
> regards,
> Oleh
>
>


Re: [O] Drag and drop, pasting images and files

2014-02-25 Thread Oleh
> Niiice! Thanks for sharing Oleh.
>
> Does anyone know if a paste hook would be possible for the exact same use
> case?
>

`org-download-yank` will insert the image based on the address in the kill ring.
Address can be a path to a local file (remember "0 w" in `dired`)
or a http link.

regards,
Oleh



[O] bug#16751: 24.3.50; Export during Org export to HTML

2014-02-25 Thread Eli Zaretskii
> From: Bastien 
> Cc: Sebastien Vauban ,  16...@debbugs.gnu.org
> Date: Tue, 25 Feb 2014 18:12:05 +0100
> 
> Eli Zaretskii  writes:
> 
> > Ugh.  Bastien, could you (or someone else of Org developers) please
> > look into this?  Why does the URI above causes the recent version of
> > Org to pass an invalid file name such as
> >
> >///opt/tomcat/4/apache-tomcat-4.1.40/... to expand-file-name
> 
> I will look into this, but I can't promise anything before next week.

Thanks.  There's no rush.  I will fix expand-file-name so it doesn't
crash with such bogus file names.





[O] bug#16751: 24.3.50; Export during Org export to HTML

2014-02-25 Thread Nicolas Goaziou
Hello,

Bastien  writes:

>> Ugh.  Bastien, could you (or someone else of Org developers) please
>> look into this?  Why does the URI above causes the recent version of
>> Org to pass an invalid file name such as
>>
>>///opt/tomcat/4/apache-tomcat-4.1.40/... to expand-file-name
>
> I will look into this, but I can't promise anything before next week.
>
> Thanks for the heads up,

A quick analysis.

file:path

is a valid file link type in Org. Therefore,


file:///opt/tomcat/4/apache-tomcat-4.1.40/webapps/../user_projects/GHIJSP2/deploy/WEB-INF/sharedfiles/resources/FR/domVal.xml

is parsed as a file link with path:


///opt/tomcat/4/apache-tomcat-4.1.40/webapps/../user_projects/GHIJSP2/deploy/WEB-INF/sharedfiles/resources/FR/domVal.xml

This path passes `file-name-absolute-p' predicate, so "ox-html.el"
concatenates "file://" to

  (expand-file-name path)

Since path is absolute, per `file-name-absolute-p', `expand-file-name'
is probably needed for its "and canonicalize it" part.

Note that other export back-ends, like, "ox-md.el", also use this
construct.

FWIW, I don't see any wrong behaviour here (except that "file://" should
probably not be prepended to path in this case).


Regards,

-- 
Nicolas Goaziou





Re: [O] Drag and drop, pasting images and files

2014-02-25 Thread Marcelo de Moraes Serpa
That's simply awesome. I'll test it out. Thanks Oleh.


On Tue, Feb 25, 2014 at 11:28 AM, Oleh  wrote:

> > Niiice! Thanks for sharing Oleh.
> >
> > Does anyone know if a paste hook would be possible for the exact same use
> > case?
> >
>
> `org-download-yank` will insert the image based on the address in the kill
> ring.
> Address can be a path to a local file (remember "0 w" in `dired`)
> or a http link.
>
> regards,
> Oleh
>


[O] Export formats: Is there an in-house Emacs final format?

2014-02-25 Thread Lawrence Bottorff
I'm a beginner, and I'm trying to imagine how I'd use org mode to create a
sort of running conversation with myself. That is, I'd like to do a form of
journaling where I could make notes to myself, which would include the
usual text as outlne-hierarchy, hyperlinks too, but also babel code chunks,
as well as any sort of mathematical formulae I might want to include. It's
this last requirement that seems to be the hardest. As far as I can tell,
the readability of my raw org file would go out the window when I started
trying to put in math formulae. As I understand, you basically do raw Tex
markup for math stuff -- and you can only see the results when you export
to something external to Emacs like html for a browser or PDF for a PDF
viewer. Is this correct?

And for my title question, is there a native "in-house" i.e., the final
product is viewable in Emacs, export that would be rich enough (text,
images, and math symbols)? Besides the embedding of a PDF viewer in a
buffer trick, Emacs seems to have only Info. Does Info allow images and
fairly normal-looking math symbols? Or is "final product" always an
off-site, extra-Emacs business?

Lawrence Bottorff
North Shore MN


Re: [O] Export formats: Is there an in-house Emacs final format?

2014-02-25 Thread Ken Mankoff

Hi Lawrence,

emacs (in a window, not in the terminal) allows display of images. 
C-c C-x C-v will display your LaTeX equations as graphics in the 
buffer. No need for other software.


You could also look at UTF-8 mode (C-c C-x \) to display \alpha and 
x_y as their respective greek and subscript sympbols, for example.


And finally you could look into various pretty-symbol modes so your 
text and even python code looks more analog. With pretty symbols 
np.sum(sqrt(x)) looks like the greek sum and the sqrt symbols. A 
cheap ASCII view would be: Ev(x)


  -k.


On Tue, 25 Feb 2014, Lawrence Bottorff wrote:

I'm a beginner, and I'm trying to imagine how I'd use org mode to 
create a sort of running conversation with myself. That is, I'd 
like to do a form of journaling where I could make notes to 
myself, which would include the usual text as outlne-hierarchy, 
hyperlinks too, but also babel code chunks, as well as any sort of 
mathematical formulae I might want to include. It's this last 
requirement that seems to be the hardest. As far as I can tell, 
the readability of my raw org file would go out the window when I 
started trying to put in math formulae. As I understand, you 
basically do raw Tex markup for math stuff -- and you can only see 
the results when you export to something external to Emacs like 
html for a browser or PDF for a PDF viewer. Is this correct?


And for my title question, is there a native "in-house" i.e., the 
final product is viewable in Emacs, export that would be rich 
enough (text, images, and math symbols)? Besides the embedding of 
a PDF viewer in a buffer trick, Emacs seems to have only Info. 
Does Info allow images and fairly normal-looking math symbols? Or 
is "final product" always an off-site, extra-Emacs business?


Lawrence Bottorff
North Shore MN






[O] bug#16751: 24.3.50; Export during Org export to HTML

2014-02-25 Thread Eli Zaretskii
> From: Nicolas Goaziou 
> Cc: Eli Zaretskii ,  Sebastien Vauban 
> ,  16...@debbugs.gnu.org
> Date: Tue, 25 Feb 2014 19:04:10 +0100
> 
> >> Ugh.  Bastien, could you (or someone else of Org developers) please
> >> look into this?  Why does the URI above causes the recent version of
> >> Org to pass an invalid file name such as
> >>
> >>///opt/tomcat/4/apache-tomcat-4.1.40/... to expand-file-name
> >
> > I will look into this, but I can't promise anything before next week.
> >
> > Thanks for the heads up,
> 
> A quick analysis.
> 
> file:path
> 
> is a valid file link type in Org. Therefore,
> 
> 
> file:///opt/tomcat/4/apache-tomcat-4.1.40/webapps/../user_projects/GHIJSP2/deploy/WEB-INF/sharedfiles/resources/FR/domVal.xml
> 
> is parsed as a file link with path:
> 
> 
> ///opt/tomcat/4/apache-tomcat-4.1.40/webapps/../user_projects/GHIJSP2/deploy/WEB-INF/sharedfiles/resources/FR/domVal.xml

But that's exactly the problem: producing a file name from a file://
URL requires to remove the "file://" prefix.  It is invalid to leave
the 2 extra slashes and remove only "file:".  Why does Org do that?

> FWIW, I don't see any wrong behaviour here (except that "file://" should
> probably not be prepended to path in this case).

Now I'm confused: why are you talking about prepending "file://", when
the problem, as I understand it, happens because "file://" was not
_removed_ from it together with the 2 slashes?





[O] bug#16751: 24.3.50; Export during Org export to HTML

2014-02-25 Thread Glenn Morris
Eli Zaretskii wrote:

>> file:path
>> 
>> is a valid file link type in Org. Therefore,
[...]
> But that's exactly the problem: producing a file name from a file://
> URL requires to remove the "file://" prefix.  It is invalid to leave
> the 2 extra slashes and remove only "file:".  Why does Org do that?

Presumably because Org decided to use "file:" rather than standard
"file://" URI, hence leading to exactly this confusion.





[O] differnace between

2014-02-25 Thread Xebar Saram
Hya all. i cant understand what the advantages of org-id links over
internal ones?
in both cases it uses a fixed path right? its not like if i move my org
files to another PC with different paths then the links will all work?
whats the use case scenario to use org-id  over internal links?

thanks alot in advance

Z


Re: [O] bug#16751: 24.3.50; Export during Org export to HTML

2014-02-25 Thread Achim Gratz
Eli Zaretskii writes:
> But that's exactly the problem: producing a file name from a file://
> URL requires to remove the "file://" prefix.  It is invalid to leave
> the 2 extra slashes and remove only "file:".  Why does Org do that?

Because Org doesn't know squat about URI schemes and uses ad-hoc parsing
and manipulation rather than splicing it all out according to the spec.

Besides, why is three leading slashes even a problem?  IIRC, POSIX says
that any number of leading slashes (except when starting with exactly
two, which are system dependent and are usually interpreted as a UNC
path) should do exactly the same thing as a single slash.


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

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra




Re: [O] differnace between

2014-02-25 Thread Oleh
> Hya all. i cant understand what the advantages of org-id links over internal
> ones?
> in both cases it uses a fixed path right? its not like if i move my org
> files to another PC with different paths then the links will all work? whats
> the use case scenario to use org-id  over internal links?
>

As far as I understand, id links are unique, so you can have multiple
headings with same name, and move them about as much you like within
current file
or multiple files. You can't do that with plain links which are *very*
inflexible
and become stale fast.

Your scenario with another PC should also work, as org will search for
the needed id
across all known org files. So as long as the file you move across different PCs
is in the search path, the links will still work.

regards,
Oleh



[O] bug#16751: 24.3.50; Export during Org export to HTML

2014-02-25 Thread Eli Zaretskii
> From: Glenn Morris 
> Cc: Nicolas Goaziou ,  sva-n...@mygooglest.com,  
> b...@altern.org,  16...@debbugs.gnu.org
> Date: Tue, 25 Feb 2014 13:41:14 -0500
> 
> Eli Zaretskii wrote:
> 
> >> file:path
> >> 
> >> is a valid file link type in Org. Therefore,
> [...]
> > But that's exactly the problem: producing a file name from a file://
> > URL requires to remove the "file://" prefix.  It is invalid to leave
> > the 2 extra slashes and remove only "file:".  Why does Org do that?
> 
> Presumably because Org decided to use "file:" rather than standard
> "file://" URI, hence leading to exactly this confusion.

That cannot be right, though, can it?  If Org wants to support
file:/foo, fine, but then it should try the standard file:///foo
before falling back on non-standard forms, I think.  Am I missing
something?





Re: [O] BUG: beamer export and overlay specifications for nested list

2014-02-25 Thread Andreas Leha
Hi Nicolas,

Nicolas Goaziou  writes:

> Hello,
>
> Andreas Leha  writes:
>
>> there seems to be a bug that becomes apparent when overlay
>> specifications are given to items in sublists.
>
> This should be fixed. Thank you for reporting it.

Thank you very much for the quick fix.  I can confirm that it working.

Regards,
Andreas




Re: [O] Export formats: Is there an in-house Emacs final format?

2014-02-25 Thread Darlan Cavalcante Moreira

As I understand, "C-c C-x C-v" (org-toggle-inline-images) will only show
images inline, not latex fragments (equations). For latex you want "C-c
C-x C-v" (org-preview-latex-fragment).

I have a folder with org files as my personal "knowledge archive" and I
use both org-toggle-inline-images and
org-preview-latex-fragment. Org-mode is indeed very nice for this
"conversation with myself" use case. Obviously you still get better
(prettier) results if you export the org file, but I rarely need to do
that.

--
Darlan

mank...@gmail.com writes:

> Hi Lawrence,
>
> emacs (in a window, not in the terminal) allows display of images. 
> C-c C-x C-v will display your LaTeX equations as graphics in the 
> buffer. No need for other software.
>
> You could also look at UTF-8 mode (C-c C-x \) to display \alpha and 
> x_y as their respective greek and subscript sympbols, for example.
>
> And finally you could look into various pretty-symbol modes so your 
> text and even python code looks more analog. With pretty symbols 
> np.sum(sqrt(x)) looks like the greek sum and the sqrt symbols. A 
> cheap ASCII view would be: Ev(x)
>
>-k.
>
>
> On Tue, 25 Feb 2014, Lawrence Bottorff wrote:
>
>> I'm a beginner, and I'm trying to imagine how I'd use org mode to 
>> create a sort of running conversation with myself. That is, I'd 
>> like to do a form of journaling where I could make notes to 
>> myself, which would include the usual text as outlne-hierarchy, 
>> hyperlinks too, but also babel code chunks, as well as any sort of 
>> mathematical formulae I might want to include. It's this last 
>> requirement that seems to be the hardest. As far as I can tell, 
>> the readability of my raw org file would go out the window when I 
>> started trying to put in math formulae. As I understand, you 
>> basically do raw Tex markup for math stuff -- and you can only see 
>> the results when you export to something external to Emacs like 
>> html for a browser or PDF for a PDF viewer. Is this correct?
>>
>> And for my title question, is there a native "in-house" i.e., the 
>> final product is viewable in Emacs, export that would be rich 
>> enough (text, images, and math symbols)? Besides the embedding of 
>> a PDF viewer in a buffer trick, Emacs seems to have only Info. 
>> Does Info allow images and fairly normal-looking math symbols? Or 
>> is "final product" always an off-site, extra-Emacs business?
>>
>> Lawrence Bottorff
>> North Shore MN
>>


-- 
Darlan Cavalcante Moreira
darc...@gmail.com



Re: [O] Export formats: Is there an in-house Emacs final format?

2014-02-25 Thread Ken Mankoff


On Tue, 25 Feb 2014, Darlan Cavalcante Moreira wrote:
As I understand, "C-c C-x C-v" (org-toggle-inline-images) will 
only show images inline, not latex fragments (equations). For 
latex you want "C-c C-x C-v" (org-preview-latex-fragment).


I think the second should be C-c C-x C-l?

  -k.




[O] org-mode/elpa setup

2014-02-25 Thread John Kitchin
Hi,

I was wondering if there is any documentation somewhere on how the orgmode
elpa repo is setup. I am interested in how the tar files are created, and
how the archive-contents file is updated. I haven't been able to find any
documentation anywhere on creating these. Thanks!

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


Re: [O] Help with tangling a table into a source-code representation of the data contained within

2014-02-25 Thread Grant Rettke
Thanks everyone.

My tentative plan is to run some elisp that will dump the table to an
intermediate file and then dependent files may load it themselves.



Re: [O] Help with tangling a table into a source-code representation of the data contained within

2014-02-25 Thread Grant Rettke
This seems like a fine option:

#+name: mode_data
| mode   | paredit | auto-save |
|+-+---|
| scheme | TRUE| TRUE  |
| emacs-lisp | TRUE| TRUE  |
| ielm   | TRUE| FALSE |

#+begin_src emacs-lisp :var data=mode_data :exports results :file modes.json
  (require 'json)
  (json-encode data)
#+end_src

JSON because I will probably use it a few different ways, and most langs
today handle JSON just fine.


On Tue, Feb 25, 2014 at 10:41 PM, Grant Rettke wrote:

> Thanks everyone.
>
> My tentative plan is to run some elisp that will dump the table to an
> intermediate file and then dependent files may load it themselves.
>



-- 
Grant Rettke | ACM, AMA, COG, IEEE
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


Re: [O] Drag and drop, pasting images and files

2014-02-25 Thread Eric Abrahamsen
Marcelo de Moraes Serpa  writes:

> That's simply awesome. I'll test it out. Thanks Oleh.
>
>
> On Tue, Feb 25, 2014 at 11:28 AM, Oleh  wrote:
>
> > Niiice! Thanks for sharing Oleh.
> >
> > Does anyone know if a paste hook would be possible for the
> exact same use
> > case?
> >
>
> `org-download-yank` will insert the image based on the address in
> the kill ring.
> Address can be a path to a local file (remember "0 w" in `dired`)
> or a http link.

You can also just call org-insert-link with a "C-u" prefix. That will
give you the regular find-file interface, and then insert a link to
whatever file you find. Very useful!




Re: [O] Include on file open?

2014-02-25 Thread Eric Abrahamsen
Peter Davis  writes:

> I'd like to put a kind of menu bar at the top of most of my .org
> pages, so I can quickly jump around the most commonly edited files. I
> can do something like:
>
> | [[file:first.org][first]] | [[file:second.org][second]] | ...
>
> and simply include that in all my files. However, if I change the
> menu, I have to go back and update all those files. A better approach
> would be to include an up-to-date menu file
> when each org file is opened, and maybe even reload to update the
> menu. However, the #+INCLUDE: option only works at export time.
>
> Is there a way to automatically include an external file when I
> open/reload a .org file? Or is there a better way to create a menu or
> frequently visited files?
>
> Thanks!
> -pd

I think org-toc in the contrib/lisp directory is meant to do just this,
automatically. I haven't tried it, though...