Re: [O] [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets

2017-06-21 Thread Allen Li
On Mon, May 15, 2017 at 5:54 AM, Sebastian Reuße  wrote:
> * org.el (org-refile-get-targets): Setting org-refile-use-outline-path
> to `file' or `buffer-name' causes an additional target for the file’s
> root node to be inserted. This functionality was absent when using
> `full-file-path'. We now add this since it is convenient and makes the
> behavior more consistent.
> ---
>  lisp/org.el | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/lisp/org.el b/lisp/org.el
> index 97713c523..28277e352 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -11563,6 +11563,8 @@ (defun org-refile-get-targets (&optional 
> default-buffer)
>  (push (list (file-name-nondirectory f) f nil nil) tgs))
>(when (eq org-refile-use-outline-path 'buffer-name)
>  (push (list (buffer-name (buffer-base-buffer)) f nil nil) 
> tgs))
> +  (when (eq org-refile-use-outline-path 'full-file-path)
> +(push (list (file-truename (buffer-file-name 
> (buffer-base-buffer))) f nil nil) tgs))
>(org-with-wide-buffer
> (goto-char (point-min))
> (setq org-outline-path-cache nil)
> --
> 2.13.0
>
>

If I'm not mistaken, the full file path needs to be wrapped in
org-protect-slash?



Re: [O] [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets

2017-06-21 Thread Sebastian Reuße
Hello Allen,

Allen Li  writes:

> On Mon, May 15, 2017 at 5:54 AM, Sebastian Reuße  wrote:
>> * org.el (org-refile-get-targets): Setting org-refile-use-outline-path
>> to `file' or `buffer-name' causes an additional target for the file’s
>> root node to be inserted. This functionality was absent when using
>> `full-file-path'. We now add this since it is convenient and makes the
>> behavior more consistent.
>> ---
>>  lisp/org.el | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/lisp/org.el b/lisp/org.el
>> index 97713c523..28277e352 100644
>> --- a/lisp/org.el
>> +++ b/lisp/org.el
>> @@ -11563,6 +11563,8 @@ (defun org-refile-get-targets (&optional 
>> default-buffer)
>>  (push (list (file-name-nondirectory f) f nil nil) tgs))
>>(when (eq org-refile-use-outline-path 'buffer-name)
>>  (push (list (buffer-name (buffer-base-buffer)) f nil nil) 
>> tgs))
>> +  (when (eq org-refile-use-outline-path 'full-file-path)
>> +(push (list (file-truename (buffer-file-name 
>> (buffer-base-buffer))) f nil nil) tgs))
>>(org-with-wide-buffer
>> (goto-char (point-min))
>> (setq org-outline-path-cache nil)
>> --
>> 2.13.0
>>
>>
>
> If I'm not mistaken, the full file path needs to be wrapped in
> org-protect-slash?

Slashes that are part of file paths aren’t escaped anymore, as of
53bcf91a9. The only reason to escape slashes is to indicate they are not
part of the outline or file path, but part of the headline instead.

In fact it looks like Nicolas removed ‘org-protect-slash’ in 2b44a1a74
and inlined it at its only use site.

Kind regards,

Sebastian

-- 
Insane cobra split the wood
Trader of the lowland breed
Call a jittney, drive away
In the slipstream we will stay



Re: [O] [PATCH 2/2] org-refile: Fix inconsistency when listing refile targets

2017-06-21 Thread Allen Li
Thanks for the info. I was chasing down this bug in org-20170606,
where it still required `org-protect-slash`, so I was anxious about
its absence in your patch.

On Wed, Jun 21, 2017 at 12:55 AM, Sebastian Reuße  wrote:
> Hello Allen,
>
> Allen Li  writes:
>
>> On Mon, May 15, 2017 at 5:54 AM, Sebastian Reuße  wrote:
>>> * org.el (org-refile-get-targets): Setting org-refile-use-outline-path
>>> to `file' or `buffer-name' causes an additional target for the file’s
>>> root node to be inserted. This functionality was absent when using
>>> `full-file-path'. We now add this since it is convenient and makes the
>>> behavior more consistent.
>>> ---
>>>  lisp/org.el | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/lisp/org.el b/lisp/org.el
>>> index 97713c523..28277e352 100644
>>> --- a/lisp/org.el
>>> +++ b/lisp/org.el
>>> @@ -11563,6 +11563,8 @@ (defun org-refile-get-targets (&optional 
>>> default-buffer)
>>>  (push (list (file-name-nondirectory f) f nil nil) tgs))
>>>(when (eq org-refile-use-outline-path 'buffer-name)
>>>  (push (list (buffer-name (buffer-base-buffer)) f nil nil) 
>>> tgs))
>>> +  (when (eq org-refile-use-outline-path 'full-file-path)
>>> +(push (list (file-truename (buffer-file-name 
>>> (buffer-base-buffer))) f nil nil) tgs))
>>>(org-with-wide-buffer
>>> (goto-char (point-min))
>>> (setq org-outline-path-cache nil)
>>> --
>>> 2.13.0
>>>
>>>
>>
>> If I'm not mistaken, the full file path needs to be wrapped in
>> org-protect-slash?
>
> Slashes that are part of file paths aren’t escaped anymore, as of
> 53bcf91a9. The only reason to escape slashes is to indicate they are not
> part of the outline or file path, but part of the headline instead.
>
> In fact it looks like Nicolas removed ‘org-protect-slash’ in 2b44a1a74
> and inlined it at its only use site.
>
> Kind regards,
>
> Sebastian
>
> --
> Insane cobra split the wood
> Trader of the lowland breed
> Call a jittney, drive away
> In the slipstream we will stay



[O] Controlling new line characters during tangle

2017-06-21 Thread Giacomo M

Hi all,

I'm using emacs also under Windows, and would need to tangle 
scripts/config files to be used under Unix. Is there any header argument 
to enforce the desired new line characters in the tangled files?


Thanks,

Giacomo




[O] org table toggle narrowing and true column hiding

2017-06-21 Thread Uwe Brauer

Hi

Googling showed me that the question has been asked 2 years ago, so I
repeat it just in case:

Any plans to implement true column hiding for org tables?


Concerning narrowing (poor man version of hiding)


| Name | passport | Other |
|  | <2>  |   |
| John Doe |  1234567 |   |

In a org mode buffer (not here in a message buffer even with orgtbl-mode
enabled)

C-c C-C gives

| Name | <2> | Other |
|  | <2> |   |
| John Doe | <2> |   |


The question is simple: how can a toggle narrowing?

thanks

Uwe Brauer 




Re: [O] Controlling new line characters during tangle

2017-06-21 Thread Kaushal Modi
On Wed, Jun 21, 2017, 5:21 AM Giacomo M  wrote:

> Hi all,
>
> I'm using emacs also under Windows, and would need to tangle
> scripts/config files to be used under Unix.


Is there any header argument
> to enforce the desired new line characters in the tangled files?
>

At which point would you like to enforce the new line characters?

Can you post a MWE and explain what that it tangles to vs what you'd
actually like to see in the tangled file?

> --

Kaushal Modi


[O] link fontification issue in org 9.0.8

2017-06-21 Thread John Kitchin
in a recent upgrade to 9.0.8, all the links have reverted to being
fontified with an org-link face.

For example, this link definition

#+BEGIN_SRC emacs-lisp
(org-link-set-parameters
 "red"
 :follow (lambda (path) (message "You clicked me."))
 :export (lambda (path desc backend)
   (cond
((eq 'html backend)
 (format "%s"
 (or desc path)
 :face '(:foreground "red")
 :help-echo "Click me for a message.")
#+END_SRC

#+RESULTS:

should make this link -> red:test

have a red face with a tooltip, but it is just a blue org-link face with
the standard tooltip. The follow and export function seems to work, but not
the face and help-echo.

I think this is related to the consolidation of org-activate-links. In the
properties section it incorrectly uses code like: (org-link-get-parameter
type :face) where type is defined as plain/bracket/... etc. That code
should be replaced with this, which gets the link-type from (link-type
(org-element-property :type link-object)) and replaces type with link-type.

This is around line 5982 in org.el

(let* ((link-object (save-excursion
(goto-char start)
(save-match-data (org-element-link-parser
(link (org-element-property :raw-link link-object))
(link-type (org-element-property :type link-object))
(path (org-element-property :path link-object))
(properties ;for link's visible part
 (list
  'face (pcase (org-link-get-parameter link-type :face)
  ((and (pred functionp) face) (funcall face path))
  ((and (pred facep) face) face)
  ((and (pred consp) face) face) ;anonymous
  (_ 'org-link))
  'mouse-face (or (org-link-get-parameter link-type :mouse-face)
  'highlight)
  'keymap (or (org-link-get-parameter link-type :keymap)
  org-mouse-map)
  'help-echo (pcase (org-link-get-parameter link-type :help-echo)
((and (pred stringp) echo) echo)
((and (pred functionp) echo) echo)
(_ (concat "LINK: " link)))
  'htmlize-link (pcase (org-link-get-parameter link-type
:htmlize-link)
  ((and (pred functionp) f) (funcall f))
  (_ `(:uri ,link)))
  'font-lock-multiline t)))


John

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


Re: [O] Controlling new line characters during tangle

2017-06-21 Thread Giacomo M
Dear Kashual,

1. I visit a (Unix EOL[1]) org file on Windows.
2. I write a shell script in a shell source block to be tangled.
3. I tangle it.
4. As a result, I get a (Windows EOL) shell script, while I would like a
Unix EOL shell script.

Thanks,

Giacomo

[1] End Of Line convention

On Jun 21, 2017 13:02, "Kaushal Modi"  wrote:

> On Wed, Jun 21, 2017, 5:21 AM Giacomo M  wrote:
>
>> Hi all,
>>
>> I'm using emacs also under Windows, and would need to tangle
>> scripts/config files to be used under Unix.
>
>
> Is there any header argument
>> to enforce the desired new line characters in the tangled files?
>>
>
> At which point would you like to enforce the new line characters?
>
> Can you post a MWE and explain what that it tangles to vs what you'd
> actually like to see in the tangled file?
>
>> --
>
> Kaushal Modi
>


Re: [O] org-table export to ods/xlsx etc

2017-06-21 Thread Uwe Brauer

   > Hello,
   > Eric S Fraga  writes:


   > According to `org-odt-convert-processes', `org-odt-convert-capabilities'
   > and `org-odt-convert', isn't it already possible?


Hm I set

(add-to-list 'org-odt-convert-processes '("gnumeric" "ssconvert %i %o"))
(setq org-odt-convert-process "gnumeric")

But then my function returns

Debugger entered--Lisp error: (error "Cannot convert from csv format to xlsx 
format?")
  signal(error ("Cannot convert from csv format to xlsx format?"))
  error("Cannot convert from %s format to %s format?" "csv" "xlsx")
  
org-odt-do-convert("/home/oub/ALLES/tex/vorlesungen/HG/HGQuim-Num-Estad/Notas/Notas2017/Controles/Rosa/rosa4.csv"
 "xlsx" nil)
  
org-odt-convert("/home/oub/ALLES/tex/vorlesungen/HG/HGQuim-Num-Estad/Notas/Notas2017/Controles/Rosa/rosa4.csv"
 "xlsx")
  org-export-to-xlsx()
  funcall-interactively(org-export-to-xlsx)
  call-interactively(org-export-to-xlsx nil nil)
  command-execute(org-export-to-xlsx)

   > Regards,




[O] refresh from google calendar before showing agenda

2017-06-21 Thread Gyro Funch
Hi,

I set up org-gcal to download my google calendar to an org file and
would like to do an automatic org-gcal-fetch before displaying an
org agenda view.

Unfortunately, I am a newbie with elisp, so am not sure of the best
way to accomplish this?

I would appreciate any help or suggestions on code I can use to make
this happen.

Thank you.

-gyro




[O] orgtable-->csv--> excel coding problems UTF8

2017-06-21 Thread Uwe Brauer


Hi

Consider


| Name   | Value |
| nación |10 |

The small function I wrote

(defun org-export-to-xlsx () 
  (interactive)
  (let* ((source-file  (file-name-sans-extension (buffer-file-name 
(current-buffer
 (csv-file (concat source-file ".csv")))
(org-table-export csv-file "orgtbl-to-csv")
(org-odt-convert csv-file "xlsx")))

Converts to an excel file, when opened with LO has the wrong coding, the
same happened to ods. I still can use gnumeric with a different lisp
function, but I am puzzled. Any idea?

Uwe Brauer 




Re: [O] org-table export to ods/xlsx etc

2017-06-21 Thread Eric S Fraga
On Wednesday, 21 Jun 2017 at 13:01, Uwe Brauer wrote:
> Debugger entered--Lisp error: (error "Cannot convert from csv format
> to xlsx format?")

What does (org-odt-do-reachable-formats "csv") return?

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.8-582-g15c9e9


signature.asc
Description: PGP signature


Re: [O] refresh from google calendar before showing agenda

2017-06-21 Thread Eric S Fraga
On Wednesday, 21 Jun 2017 at 13:33, Gyro Funch wrote:
> Unfortunately, I am a newbie with elisp, so am not sure of the best
> way to accomplish this?

You could possibly *advice* the agenda dispatch command.  See "Advising
Named Functions" in the Elisp info manual.

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.8-582-g15c9e9


signature.asc
Description: PGP signature


Re: [O] refresh from google calendar before showing agenda

2017-06-21 Thread Gyro Funch
On 6/21/2017 7:54 AM, Eric S Fraga wrote:
> On Wednesday, 21 Jun 2017 at 13:33, Gyro Funch wrote:
>> Unfortunately, I am a newbie with elisp, so am not sure of the best
>> way to accomplish this?
> 
> You could possibly *advice* the agenda dispatch command.  See "Advising
> Named Functions" in the Elisp info manual.
> 

Thank you for the advice. It was very helpful.

Though perhaps not optimal, the following seems to work:

(advice-add 'org-agenda :before #'org-gcal-fetch)

-gyro




[O] mimetype for orgmode files

2017-06-21 Thread John Kitchin
Is there an official mimetype for orgmode files?

John

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


Re: [O] [PATCH] protocol: allow users to disable warning about old style links

2017-06-21 Thread Tyler Smith
On Fri, Jun 16, 2017, at 02:13 AM, Nicolas Goaziou wrote:
> 
> Wouldn't it be better to report it upstream as a bug? I don't think
> there are many Org protocols applications out there and the conversion
> to the new syntax is easy.

I'm just starting to use org-protocol, and I'm confused by this warning.
I can't find any description of the differences between the old and new
link styles in the documentation, or any pointers as to how and what I
should change to adopt the new syntax. The org manual links to
http://orgmode.org/worg/org-contrib/org-protocol.html, which seems to be
a year or more out of date.

I'm not sure who is 'upstream' in this context, and what, if anything, I
can do as an end-user to use the new style. Any suggestions?

Thanks,

Tyler

 



Re: [O] [PATCH] protocol: allow users to disable warning about old style links

2017-06-21 Thread Tyler Smith
On Wed, Jun 21, 2017, at 12:01 PM, Mario Martelli wrote:
> 
> I have shared a proposal to move org-protocol documentation to core 
> documentation.
> It’s mainly copied together from the old one and 9.0 NEWS.
> 
> The important part regarding the new syntax could be found here:
> 
> https://github.com/mgmart/org-mode/blob/documentation/org-protocol/contrib/orgmanual.org#L7347-L7364
> 
> Would that help or is there still something to add?

Thanks, Mario.

Your documentation refers to the new-style links, but the examples still
use the old style I think? My javascript is very basic, but from some
experimenting here, I think the old style links are what you've used:

javascript:location.href='org-protocol://sub-protocol://'+
  encodeURIComponent(location.href)+'/'+
  encodeURIComponent(document.title)+'/'+
  encodeURIComponent(window.getSelection())

whereas the new-style key-value links would be:

javascript:location.href='org-protocol://sub-protocol?url='+
  encodeURIComponent(location.href)+'&title='+
  encodeURIComponent(document.title)+'&selection='+
  encodeURIComponent(window.getSelection())

(I'm not actually sure what the name corresponding to `getSelection()`
is)

This is based on the following link style for store-link, which works
for me with Firefox 45.9 and Org 9.0 on Emacs 26.0.50:

    
javascript:location.href='org-protocol://store-link?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)

Also, I think your example for store-link should include the
document.title element?


javascript:location.href='org-protocol://store-link://'+encodeURIComponent(location.href)

It's true that old style links are still supported, but if they produce
a warning error when you use them, it would make sense to suggest the
new style syntax as the default for use by us newbies.

Best,

Tyler

--
plantarum.ca






Re: [O] mimetype for orgmode files

2017-06-21 Thread Grant Rettke
On Wed, Jun 21, 2017 at 9:52 AM, John Kitchin  wrote:
> Is there an official mimetype for orgmode files?

In `mailcap-mime-extensions' there is a value `(".org"   . "text/x-org")'.

Maybe that is for Org-Mode.



Re: [O] [PATCH] protocol: allow users to disable warning about old style links

2017-06-21 Thread Tyler Smith
On Wed, Jun 21, 2017, at 12:24 PM, Tyler Smith wrote:
> 
> whereas the new-style key-value links would be:
> 
> javascript:location.href='org-protocol://sub-protocol?url='+
>   encodeURIComponent(location.href)+'&title='+
>   encodeURIComponent(document.title)+'&selection='+
>   encodeURIComponent(window.getSelection())
> 

Aha! The new-style links are documented in the function docs. E.g., for
`org-protocol-capture`:

  javascript:location.href = 'org-protocol://capture?url='+ 
encodeURIComponent(location.href) + '&title=' 
encodeURIComponent(document.title) + '&body=' + 
encodeURIComponent(window.getSelection())

It would be very helpful to have that visible in the new documentation.

Thanks,

Tyler



Re: [O] [PATCH] protocol: allow users to disable warning about old style links

2017-06-21 Thread Mario Martelli

> I'm just starting to use org-protocol, and I'm confused by this warning.
> I can't find any description of the differences between the old and new
> link styles in the documentation, or any pointers as to how and what I
> should change to adopt the new syntax. The org manual links to
> http://orgmode.org/worg/org-contrib/org-protocol.html 
> , which seems to be
> a year or more out of date.

I have shared a proposal to move org-protocol documentation to core 
documentation.
It’s mainly copied together from the old one and 9.0 NEWS.

The important part regarding the new syntax could be found here:

https://github.com/mgmart/org-mode/blob/documentation/org-protocol/contrib/orgmanual.org#L7347-L7364
 


Would that help or is there still something to add?

Kind regards
Mario

smime.p7s
Description: S/MIME cryptographic signature


Re: [O] [PATCH] protocol: allow users to disable warning about old style links

2017-06-21 Thread Mario Martelli

>  it would make sense to suggest the
> new style syntax as the default for use by us newbies.

yeah, thought about that too. At the moment it’s still a copy of the old doc. 

Got no feedback so far wether my approach would be acceptable or not. Therefore 
I did not put much effort into it. 

But you’re right. The examples should be new style URIs and the infobox should 
reference the old style URIs.

Kind regards
Mario
— 



smime.p7s
Description: S/MIME cryptographic signature


Re: [O] mimetype for orgmode files

2017-06-21 Thread Mario Martelli
>> Is there an official mimetype for orgmode files?
> 
> In `mailcap-mime-extensions' there is a value `(".org"   . "text/x-org")'.
> 
> Maybe that is for Org-Mode.

It is :)
https://lists.gnu.org/archive/html/emacs-orgmode/2011-01/msg00977.html 


If official would mean registered with IANA, then it’s not.
https://www.iana.org/assignments/media-types/media-types.xhtml 


Link regards
Mario
— 




smime.p7s
Description: S/MIME cryptographic signature


[O] [PATCH] noweb documentation update (Was: Re: How to use noweb reference with argument..)

2017-06-21 Thread Kaushal Modi
Hello list,

I have attached a patch (rebased off maint) that attempts at clarifying how
certain aspects of noweb work based on my experience, with few complete
examples.

Note: I had to also revert a little bit of wording change that was made
recently. I found pre-wording-change version easier to understand. Copying
Lambda Coder to comment on that.

This is what the current patch has in the "Noweb reference syntax section":

=
It is possible to include the @emph{results} of a code block rather than the
body.  This is done by appending parentheses to the code block name which
may
optionally contain arguments to the code block as shown below.
=

Earlier it was:

=
Org can handle naming of @emph{results} block, rather than the body of the
@samp{src} code block, using ``noweb'' style references.

For ``noweb'' style reference, append parenthesis to the code block name for
arguments, as shown in this example:
=


On Wed, Jun 21, 2017 at 12:57 AM, Kaushal Modi 
> wrote:
>
>>
>> I stand corrected; for the stuff that you are doing, I believe the code
>> block name needs to go to #+NAME instead of to :noweb-ref.
>>
>> Below works (Hit C-c C-c in the second source block and approve
>> evaluating that code block:
>>
>> * noweb reference with argument
>>
>> #+NAME: sh-print-something
>> #+BEGIN_SRC shell :var str=""
>> echo echo $str
>> #+END_SRC
>>
>> #+BEGIN_SRC shell :results output :noweb yes
>> echo "hello, "
>> <>
>> #+END_SRC
>>
>> #+RESULTS:
>> : hello,
>> : stardiviner
>>
>> Changes:
>>
>> (1) Switched back to #+NAME from :noweb-ref. Looks like if you need to
>> pass args, the reference name needs to be a code block name because
>> <> inserts the *results* of the code block "foo", not "foo" as
>> it is.
>> (2) So in the first block, you need to have code that *outputs* "echo
>> $str" with $str set to your set arg.
>> (3) Use shell instead of sh.
>>
>> To stress the point of "<> inserts the *results*", even the
>> below would work the same way as we care about the results output by the
>> first block, not how those results are obtained.
>>
>> * noweb reference with argument
>>
>> #+NAME: sh-print-something
>> #+BEGIN_SRC python :var str="foo" :results output
>> print('echo "' + str + '"')
>> #+END_SRC
>>
>> #+RESULTS: sh-print-something
>> : echo "foo"
>>
>> #+BEGIN_SRC shell :results output :noweb yes
>> echo "hello, "
>> <>
>> #+END_SRC
>>
>> #+RESULTS:
>> : hello,
>> : stardiviner
>>
>> --
>>
>> Kaushal Modi
>>
>
> --

Kaushal Modi


0001-Improve-noweb-documentation.patch
Description: Binary data


Re: [O] [PATCH] protocol: allow users to disable warning about old style links

2017-06-21 Thread Tyler Smith

On Wed, Jun 21, 2017, at 12:51 PM, Mario Martelli wrote:
> 
>>  it would make sense to suggest the
>> new style syntax as the default for use by us newbies.
> 
> yeah, thought about that too. At the moment it’s still a copy of the old doc. 
> 
> Got no feedback so far wether my approach would be acceptable or not. 
> Therefore I did not put much effort into it. 
> 
> But you’re right. The examples should be new style URIs and the infobox 
> should reference the old style URIs.

One last question/suggestion:

The default capture template didn't work for me:

(*"w"*
 *"Default template"*
 entry
 (file+headline *"~/org/capture.org"* *"Notes"*)
 *"* %^{Title}\n\n  Source: %u, %c\n\n  %i"*
 *:empty-lines* 1)

The %u and %c bits got replaced by the actual link code (i.e.,
javascript:...). The following works as I wanted:

("w" "Default capture " entry
  (file "~/org/notes.org")
  "* %^{Title}
Source: [[%:link][%:description]]
%:initial" :empty-lines 1)

At this point I'm still a little confused, so perhaps I borked something
else up and the problem is local to my setup.

Best,

Tyler



Re: [O] mimetype for orgmode files

2017-06-21 Thread William Denton

On 21 June 2017, Mario Martelli wrote:


If official would mean registered with IANA, then it’s not.
https://www.iana.org/assignments/media-types/media-types.xhtml 



On a related note, the =file= command [1] doesn't have the magic to identify Org 
files.


$ file work-notes.org
work-notes.org: UTF-8 Unicode text, with very long lines

Writing a pattern to make this work could be an interesting project if someone 
has some spare time some day ...


Bill

[1] https://en.wikipedia.org/wiki/File_%28command%29
--
William Denton :: Toronto, Canada :: https://www.miskatonic.org/
Caveat lector.

Re: [O] [PATCH] protocol: allow users to disable warning about old style links

2017-06-21 Thread Mario Martelli
> The default capture template didn't work for me:
> 
>(*"w"*
> *"Default template"*
> entry
> (file+headline *"~/org/capture.org "* *"Notes"*)
> *"* %^{Title}\n\n  Source: %u, %c\n\n  %i"*
> *:empty-lines* 1)

There are some asterisks which do not belong there. Probably it helps to remove 
them.
Otherwise it’s similar to the template I’m using.

> The %u and %c bits got replaced by the actual link code (i.e.,
> javascript:...). The following works as I wanted:
> 
>("w" "Default capture " entry
>  (file "~/org/notes.org ")
>  "* %^{Title}
>Source: [[%:link][%:description]]
>%:initial" :empty-lines 1)

It it works then it’s fine :)

Kind regards
Mario
— 





smime.p7s
Description: S/MIME cryptographic signature


Re: [O] org-protocol documentation

2017-06-21 Thread Nicolas Goaziou
Hello,

Mario Martelli  writes:

> Please find my attempt at: https://github.com/mgmart/org-mode
> 

Thank you.

However, AFAIU, this change is about orgmanual.org, which is an outdated
copy of the official manual in contrib/.

Could you modify "org.texi" in doc/ directory instead?

Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] org-protocol documentation

2017-06-21 Thread Mario Martelli

> However, AFAIU, this change is about orgmanual.org, which is an outdated
> copy of the official manual in contrib/.

Well, I thought I could begin with an easy task for my first contribution :)

> Could you modify "org.texi" in doc/ directory instead?

This will take a while, I assume. Although pandoc did a terrific job, there is 
some additional work to do.

Kind regards
Mario
— 




Re: [O] org-protocol documentation

2017-06-21 Thread Nicolas Goaziou
Mario Martelli  writes:

>> However, AFAIU, this change is about orgmanual.org, which is an outdated
>> copy of the official manual in contrib/.
>
> Well, I thought I could begin with an easy task for my first contribution :)
>
>> Could you modify "org.texi" in doc/ directory instead?
>
> This will take a while, I assume. Although pandoc did a terrific job, there 
> is some additional work to do.

I'm not sure why is pandoc needed here. Org can export to Texinfo
format, if needed. Also, if the syntax is not quite right, no worries,
we'll fix it.

Regards,



Re: [O] mimetype for orgmode files

2017-06-21 Thread John Kitchin
hm. I tried to use this to update the mime-types on Github
(https://github.com/jshttp/mime-db/pull/82#pullrequestreview-45516223),
but the email isn't primary enough for them.

It seems like if we had something on orgmode.org specifying a mimetype
it might work, although better would be to get it in IANA.

Could we come to an agreement on "text/x-org" or "text/x-orgmode" and
document that on orgmode.org?

Mario Martelli writes:

>  Is there an official mimetype for orgmode files?
>
>  In `mailcap-mime-extensions' there is a value `(".org" . "text/x-org")'.
>
>  Maybe that is for Org-Mode.
>
> It is :)
> https://lists.gnu.org/archive/html/emacs-orgmode/2011-01/msg00977.html
>
> If official would mean registered with IANA, then it’s not.
> https://www.iana.org/assignments/media-types/media-types.xhtml
>
> Link regards
> Mario
> —


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



Re: [O] Bibliograph:ref.bib vs. \printbibliograpy (WAS: Re: > Citations with org-ref in apa style)

2017-06-21 Thread edgar

On 2017-06-18 20:38, John Kitchin wrote:

https://tex.stackexchange.com/questions/17445/how-can-i-change-the-references-to-reference-in-the-thebibliography-environm
# This makes the bibliography section title empty and un-numbered
#+latex: \renewcommand{\bibsection}{\subsection*{}}

* References
bibliographystyle:unsrt
bibliography:References.bib

Thanks, I solved it by switching to BibLaTeX, as described in M-x 
org-ref-help :)




-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] mimetype for orgmode files

2017-06-21 Thread Gergely Polonkai
I'd say text/orgmode (text/x-orgmode if getting into IANA is not an
option). text/org feels too generic, as not everyone is familiar with Org.

On Wed, Jun 21, 2017, 21:36 John Kitchin  wrote:

> hm. I tried to use this to update the mime-types on Github
> (https://github.com/jshttp/mime-db/pull/82#pullrequestreview-45516223),
> but the email isn't primary enough for them.
>
> It seems like if we had something on orgmode.org specifying a mimetype
> it might work, although better would be to get it in IANA.
>
> Could we come to an agreement on "text/x-org" or "text/x-orgmode" and
> document that on orgmode.org?
>
> Mario Martelli writes:
>
> >  Is there an official mimetype for orgmode files?
> >
> >  In `mailcap-mime-extensions' there is a value `(".org" . "text/x-org")'.
> >
> >  Maybe that is for Org-Mode.
> >
> > It is :)
> > https://lists.gnu.org/archive/html/emacs-orgmode/2011-01/msg00977.html
> >
> > If official would mean registered with IANA, then it’s not.
> > https://www.iana.org/assignments/media-types/media-types.xhtml
> >
> > Link regards
> > Mario
> > —
>
>
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
>


Re: [O] link fontification issue in org 9.0.8

2017-06-21 Thread Nicolas Goaziou
Hello,

John Kitchin  writes:

> in a recent upgrade to 9.0.8, all the links have reverted to being
> fontified with an org-link face.
>
> For example, this link definition
>
> #+BEGIN_SRC emacs-lisp
> (org-link-set-parameters
>  "red"
>  :follow (lambda (path) (message "You clicked me."))
>  :export (lambda (path desc backend)
>(cond
> ((eq 'html backend)
>  (format "%s"
>  (or desc path)
>  :face '(:foreground "red")
>  :help-echo "Click me for a message.")
> #+END_SRC
>
> #+RESULTS:
>
> should make this link -> red:test
>
> have a red face with a tooltip, but it is just a blue org-link face with
> the standard tooltip. The follow and export function seems to work, but not
> the face and help-echo.
>
> I think this is related to the consolidation of org-activate-links. In the
> properties section it incorrectly uses code like: (org-link-get-parameter
> type :face) where type is defined as plain/bracket/... etc. That code
> should be replaced with this, which gets the link-type from (link-type
> (org-element-property :type link-object)) and replaces type with link-type.
>
> This is around line 5982 in org.el
>
> (let* ((link-object (save-excursion
> (goto-char start)
> (save-match-data (org-element-link-parser
> (link (org-element-property :raw-link link-object))
> (link-type (org-element-property :type link-object))
> (path (org-element-property :path link-object))
> (properties ;for link's visible part
>  (list
>   'face (pcase (org-link-get-parameter link-type :face)
>   ((and (pred functionp) face) (funcall face path))
>   ((and (pred facep) face) face)
>   ((and (pred consp) face) face) ;anonymous
>   (_ 'org-link))
>   'mouse-face (or (org-link-get-parameter link-type :mouse-face)
>   'highlight)
>   'keymap (or (org-link-get-parameter link-type :keymap)
>   org-mouse-map)
>   'help-echo (pcase (org-link-get-parameter link-type :help-echo)
> ((and (pred stringp) echo) echo)
> ((and (pred functionp) echo) echo)
> (_ (concat "LINK: " link)))
>   'htmlize-link (pcase (org-link-get-parameter link-type
> :htmlize-link)
>   ((and (pred functionp) f) (funcall f))
>   (_ `(:uri ,link)))
>   'font-lock-multiline t)))

Fixed. Thank you for the report and the analysis.

Regards,

-- 
Nicolas Goaziou



[O] Mouse-over on bibliographic citation

2017-06-21 Thread Sharon Kimble

I've got this strange problem and I'm not sure when it started, possibly
when this new computer was first put to use last Friday afternoon with a
fresh install of Debian 9, or maybe before then, I'm not sure.

Anyway, whenever I mouse-over a bibliographic citation in an org-mode
document, it used to say for (cite:0072) '\Hair loss, 2015,
http://www.regrowth.com/hair-loss-articles/ \' but now just shows
'LINK:cite:0072'.

I am using 'org-ref' which is up to date, as is org-mode, and both from
ELPA.

This is what my bibliography item actually is -

--8<---cut here---start->8---
@Online{0072,
  Title= {Hair loss},
  Author   = {regrowth},
  Url  = {http://www.regrowth.com/hair-loss-articles/},
  Year = {2015}
}
--8<---cut here---end--->8---

So how can I regain my previous mouse-over abilities please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk  
Debian 9.0, fluxbox 1.3.5-2, emacs 25.1.1, org-mode 9.0.7


signature.asc
Description: PGP signature


Re: [O] Mouse-over on bibliographic citation

2017-06-21 Thread John Kitchin
this is a bug in the current org-mode 9.0.8. You have to revert it to org
9.0.7 for now. It has been fixed, but I am not sure when it will show up.

John

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


On Wed, Jun 21, 2017 at 5:50 PM, Sharon Kimble 
wrote:

>
> I've got this strange problem and I'm not sure when it started, possibly
> when this new computer was first put to use last Friday afternoon with a
> fresh install of Debian 9, or maybe before then, I'm not sure.
>
> Anyway, whenever I mouse-over a bibliographic citation in an org-mode
> document, it used to say for (cite:0072) '\Hair loss, 2015,
> http://www.regrowth.com/hair-loss-articles/ \' but now just shows
> 'LINK:cite:0072'.
>
> I am using 'org-ref' which is up to date, as is org-mode, and both from
> ELPA.
>
> This is what my bibliography item actually is -
>
> --8<---cut here---start->8---
> @Online{0072,
>   Title= {Hair loss},
>   Author   = {regrowth},
>   Url  = {http://www.regrowth.com/hair-loss-articles/
> },
>   Year = {2015}
> }
> --8<---cut here---end--->8---
>
> So how can I regain my previous mouse-over abilities please?
>
> Thanks
> Sharon.
> --
> A taste of linux = http://www.sharons.org.uk
> TGmeds = http://www.tgmeds.org.uk
> DrugFacts = https://www.drugfacts.org.uk
> Debian 9.0, fluxbox 1.3.5-2, emacs 25.1.1, org-mode 9.0.7
>


Re: [O] mimetype for orgmode files

2017-06-21 Thread Adonay Felipe Nogueira
`xdg-mime query filetype "[Path to some .org file.]"` shows
"text/plain", but Gnus in GNU Emacs shows it as "text/x-org".

-- 
- [[https://libreplanet.org/wiki/User:Adfeno]]
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre, por isso não uso. Iguais a ele prefiro
  GNU Ring, ou Tox. Quer outras formas de contato? Adicione o vCard
  que está no endereço acima aos teus contatos.
- Pretende me enviar arquivos .doc, .ppt, .cdr, ou .mp3? OK, eu
  aceito, mas não repasso. Entrego apenas em formatos favoráveis ao
  /software/ livre. Favor entrar em contato em caso de dúvida.