Re: [O] link recognition in orgmode

2017-09-05 Thread John Kitchin

Nicolas Goaziou writes:

> Hello,
>
> John Kitchin  writes:
>
>> With this definition of a link in org-9:
>>
>> #+BEGIN_SRC emacs-lisp
>> (org-link-set-parameters "test" :follow (lambda (path) (message "check")))
>> #+END_SRC
>>
>> #+RESULTS:
>>
>> Should both of these be "linkfied"? I would have expected the first one
>> to be, but not the second one. It seems like the "test:rtree" parts of
>> both of these are linkified.
>>
>>  test:rtree  :test:rtree
>
> It looks correct. `org-plain-link-re' regexp expects a word boundary
> before the type. If you disagree, what do you suggest as allowed
> characters before a plain link?

I thought I knew the answer to that, which is I normally would say a
space or a [, but...

The reason this came up is related to restructured text in a src block
docstring. For example, using
http://sphinxcontrib-bibtex.readthedocs.io/en/latest/usage.html#roles-and-directives,
one can write: "See :cite:`1987:nelson` for an introduction to
non-standard analysis." and the cite: appears to be recognized as part
of a link with `1987:nelson` as the path. In this case I would not
expect that to be interpreted as a link. The backticks in the path are
a little problematic for org-ref since they are not part of the actual
key.

However, it is pretty common (in my work) to put citations right after
punctuation when they are superscripted, e.g. after a comma,cite:somekey
or after the end of a sentence.cite:anotherkey. That is common because
old LaTeX packages couldn't put them in the right place; it was up to
you. It is a pain to switch to bracketed citations though, because
brackets typically go before punctuations. I normally use bracketed
links in this scenario, but I would expect plain links to work here
(mostly because they always have), including all the other punctuations.

Newer latex packages handle the citation placement for you and let you
do what makes the most sense to me which is to put citations before a
comma like cite:thirdkey, and before a period cite:fourthkey. That way
the citations are in the sentence they belong to and the rest is just
styling during export.

So, in the end I am a little conflicted on the solution here. It seems
specific to this particular markup conflict, which is links should not
start with " :" or "^:". On the other hand, org-ref fails harmlessly for
me (although in some setups it might lead to a traceback, e.g.
https://github.com/jkitchin/org-ref/issues/492), and I am inclined to
leave well enough alone and stick with the harmless fail (the fail is
when you generate help on the link and it can't find the key in the
bibtex file).

Thoughts?

>
> Regards,


--
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



[O] directory from which attachments are taken

2017-09-05 Thread kevinbanjo
I'm downloading files into my "~/Downloads" directory and attaching them to
an org file in "~/Private/org" and every time it tries to look in the
latter for the attachment and I have to navigate back to the former.  Is
there a setting where I can direct it where to initially look for the files
to attach or a setting where it will just keep the last place I attached a
file and just use that as the initial value?


Re: [O] Bug: Fix for org-make-link-description-function use in org-insert-link [9.0.10 (9.0.10-5-g1654a5-elpa @ /home/rrt/.emacs.d/elpa/org-20170904/)]

2017-09-05 Thread Nicolas Goaziou
Reuben Thomas  writes:

> ​If you (or someone) can confirm your interpretation above, I would be
> happy to update my patch to implement the two behaviours required, namely,
> that org-make-link-description-function is only called if the
> default-description argument to org-insert-link is nil

Ack.

> and that if that function returns nil, then the link location is used.
> I would also clarify the docstring regarding the second behaviour.

It may not be a terribly useful behaviour anyway. You can always use
(lambda (link description) link) as
`org-make-link-description-function'.

Perhaps we can simply remove "When nil, the link location will be used"
from the docstring. Your call.

Thank you.

Regards,



Re: [O] broken links to gmane on orgmode.org

2017-09-05 Thread Eric Abrahamsen
Ilya Shlyakhter  writes:

> At http://orgmode.org/community.html the links to browse or search
> emacs-orgmode through Gmane are broken.  Maybe, remove them until
> Gmane is fixed?  Is there another service similar to Gmane?

You almost wish someone could get hold of the spools and make an ad-hoc
search index until Gmane search is back up and running...




Re: [O] [PATCH] Fix org-duration-to-minutes call on ox-taskjuggler

2017-09-05 Thread Nicolas Goaziou
Hello,

Eduardo Bellani  writes:

> contrib/lisp/ox-taskjuggler.el (org-taskjuggler--build-task): Change call
> From the removed 'org-duration-minutes' function to
> 'org-duration-to-minutes'.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Scheme output results

2017-09-05 Thread Nicolas Goaziou
Hello,

Neil Jerram  writes:

> Hi Bastien & Nicolas,
>
> I've been told by "Theodore Teah via RT "
> that my copyright assignment is in place now.

Great!

I tried to build Org with your patch, but it generates compilation
warnings. Could you look into it?

Thank you.

Regards,

-- 
Nicolas Goaziou



[O] text search and restriction lock bugs

2017-09-05 Thread Samuel Wales
recent maint.  these are separate, but 1 and 3 might be related, and 1 and
2 might be related, so i hope you don't mind if i put them together.

1.

is it expected behavior that if you do a restriction lock on
a subtree, then do a text search, it will include matches
from org-agenda-text-search-extra-files?  imo it should not.

2.

if you remove the restriction lock and refresh the agenda,
it will produce different results.

imo, should act as if the restriction lock were still in place.  g
should refresh with the settings that were present at invocation.
sometimes you change buffer name, and run a new agenda, so that you
can have 2 agendas, one restricted and one not.

this makes sense if you think of refreshing as "get what i
got, but take into account file /content/ changes", instead
of "run again as if you ran the agenda from scratch".  the
restriction lock is not fontified nicely so it can be
desirable to remove it for editing.

3.

finally, a user will sometimes bind org-agenda-files to a
list that includes some of the
org-agenda-text-search-extra-files files.  to avoid showing
the same match twice, the user currently has to do
remove-duplicates.  imo the agenda could do
remove-duplicates to alleviate that burden.


-- 
The Kafka Pandemic: 

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
.



[O] [PATCH] Fix org-duration-to-minutes call on ox-taskjuggler

2017-09-05 Thread Eduardo Bellani
contrib/lisp/ox-taskjuggler.el (org-taskjuggler--build-task): Change call
From the removed 'org-duration-minutes' function to 'org-duration-to-minutes'.

TINYCHANGE
---
 contrib/lisp/ox-taskjuggler.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
index 2144b04..aee7ae9 100644
--- a/contrib/lisp/ox-taskjuggler.el
+++ b/contrib/lisp/ox-taskjuggler.el
@@ -861,7 +861,7 @@ a unique id will be associated to it."
  (and complete (format "  complete %s\n" complete))
  (and effort
   (format "  effort %s\n"
-  (let* ((minutes (org-duration-minutes effort))
+  (let* ((minutes (org-duration-to-minutes effort))
  (hours (/ minutes 60.0)))
 (format "%.1fh" hours
  (and priority (format "  priority %s\n" priority))
--
2.1.4


signature.asc
Description: PGP signature


[O] [PATCH] Fix table variable with commas in ob-sqlite

2017-09-05 Thread Eduardo Bellani

ob-sqlite.el: Enable table with fields containing commas to be used as
arguments to sqlite source blocks

* lisp/ob-sqlite.el: Stop interfering with the 'orgtbl-to-csv' default
  formatting.

* testing/lisp/test-ob-sqlite.el:: Adds a test using a table with
  commas in the content of any of its fields as an argument for a
  sqlite source block. Use the 'org-test-with-temp-text' pattern.


The problem here was that ob-sqlite was providing a format to the
'orgtbl-to-csv' that actually overwrote the default format in that
function, and in the case where there were commas in the content of the
table, broke the table as argument mechanism.

TINYCHANGE
---
 lisp/ob-sqlite.el  |  5 +
 testing/lisp/test-ob-sqlite.el | 45 ++
 2 files changed, 46 insertions(+), 4 deletions(-)
 create mode 100644 testing/lisp/test-ob-sqlite.el

diff --git a/lisp/ob-sqlite.el b/lisp/ob-sqlite.el
index 8094019..f381f43 100644
--- a/lisp/ob-sqlite.el
+++ b/lisp/ob-sqlite.el
@@ -123,10 +123,7 @@ This function is called by `org-babel-execute-src-block'."
   (if (listp val)
   (let ((data-file (org-babel-temp-file "sqlite-data-")))
 (with-temp-file data-file
-  (insert (orgtbl-to-csv
-   val '(:fmt (lambda (el) (if (stringp el)
-  el
-(format "%S" el)))
+  (insert (orgtbl-to-csv val nil)))
 data-file)
 (if (stringp val) val (format "%S" val
body)))
diff --git a/testing/lisp/test-ob-sqlite.el b/testing/lisp/test-ob-sqlite.el
new file mode 100644
index 000..f732515
--- /dev/null
+++ b/testing/lisp/test-ob-sqlite.el
@@ -0,0 +1,45 @@
+;;; test-ob-sqlite.el --- tests for ob-sqlite.el
+
+;; Copyright (C) 2017  Eduardo Bellani
+
+;; Author: Eduardo Bellani 
+;; Keywords: lisp
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see .
+
+;;; Code:
+(org-test-for-executable "sqlite")
+(unless (featurep 'ob-sqlite)
+  (signal 'missing-test-dependency "Support for sqlite code blocks"))
+
+(ert-deftest ob-sqlite/table-variables-with-commas ()
+  "Test of a table variable that contains commas. This garantees that this 
code path results in a valid CSV."
+  (should
+   (equal '(("Mr Test A. Sql"
+"Minister for Science, Eternal Happiness, and Finance"))
+ (org-test-with-temp-text
+ "#+name: test_table1
+| \"Mr Test A. Sql\" | Minister for Science, Eternal Happiness, and Finance |
+
+#+begin_src sqlite :db /tmp/test.db :var tb=test_table1
+  drop table if exists TestTable;
+  create table TestTable(person, job);
+  .mode csv TestTable
+  .import $tb TestTable
+  select * from TestTable;
+#+end_src"
+   (org-babel-next-src-block)
+   (org-babel-execute-src-block)
+
+;;; test-ob-sqlite.el ends here
--


signature.asc
Description: PGP signature


Re: [O] Scheme output results

2017-09-05 Thread Neil Jerram

Hi Bastien & Nicolas,

I've been told by "Theodore Teah via RT " that 
my copyright assignment is in place now.


Regards - Neil



On 31/08/17 13:21, Neil Jerram wrote:

Hi Bastien,

Thanks for checking this. I've written to ass...@gnu.org to kick off sorting 
out the additional assignment.

Regards - Neil


   Original Message
From: Bastien Guerry
Sent: Sunday, 27 August 2017 13:07
To: Nicolas Goaziou
Cc: Neil Jerram; emacs-orgmode@gnu.org
Subject: Re: [O] Scheme output results

Hi Neil,

Nicolas Goaziou  writes:


I cannot, I'm not the maintainer. I'm Cc'ing Bastien. I'll apply your
patch as soon as it is sorted out.

Thanks for contributing.

I’ve found your copyright assignment for GUILE but it does not cover
changes for GNU Emacs, you would need another copyright assignment for
this.

Thanks in advance,






Re: [O] Bug: Fix for org-make-link-description-function use in org-insert-link [9.0.10 (9.0.10-5-g1654a5-elpa @ /home/rrt/.emacs.d/elpa/org-20170904/)]

2017-09-05 Thread Reuben Thomas
On 5 September 2017 at 21:49, Nicolas Goaziou 
wrote:

> Hello,
>

​Hi, thanks for looking at this.​


> Reuben Thomas  writes:
>
> > This seems to be incorrect behaviour, as the docstring for
> > org-insert-link says:
> >
> >   If `org-make-link-description-function' is non-nil, this function
> will be
> >   called with the link target, and the result will be the default
> >   link description.
> >
> > The implication is that the value returned is used as the default, not
> > that it overrides the prompt.
>
> I agree.
>
> > First, org-make-link-description-function is called if it is non-nil,
> > and used to set default-description.
>
> I think the optional parameter from the function call should still
> prevail. I.e., shouldn't this function be called when
> DEFAULT-DESCRIPTION is nil (e.g., called interatively)?
>

​This question occurred to me too, but I didn't form an opinion. However, I
am inclined to agree with you on thinking about it some more.​


> > Then (unless auto-desc is non-nil) the description is prompted for with
> > default-description as the default value (unless
> > org-make-link-description-function returned nil, in which case the
> > current value of desc, if any, is used).
> >
> > There is one further matter that my patch does not address: the
> > docstring for org-make-link-description-function says:
> >
> > “When [org-make-link-description-function is] nil, the link location
> > will be used.”
> >
> > This does not happen (it’s precisely the behaviour I’ve been trying to
> > obtain!), and my patch does not make it happen. Indeed, it’s not clear
> > that it’s desirable (if one is using numbered sections, for example).
>
> Obviously, it would not be desirable.
>
> However, I think it should read "When
> `org-make-link-description-function' _returns_ nil, the link location is
> used". This is not what is implemented either, tho.
>

​If you (or someone) can confirm your interpretation above, I would be
happy to update my patch to implement the two behaviours required, namely,
that org-make-link-description-function is only called if the
default-description argument to org-insert-link is nil, and that if that
function returns nil, then the link location is used. I would also clarify
the docstring regarding the second behaviour.

-- 
https://rrt.sc3d.org 


[O] broken links to gmane on orgmode.org

2017-09-05 Thread Ilya Shlyakhter
At http://orgmode.org/community.html the links to browse or search
emacs-orgmode through Gmane are broken.  Maybe, remove them until
Gmane is fixed?  Is there another service similar to Gmane?



Re: [O] link recognition in orgmode

2017-09-05 Thread Nicolas Goaziou
Hello,

John Kitchin  writes:

> With this definition of a link in org-9:
>
> #+BEGIN_SRC emacs-lisp
> (org-link-set-parameters "test" :follow (lambda (path) (message "check")))
> #+END_SRC
>
> #+RESULTS:
>
> Should both of these be "linkfied"? I would have expected the first one
> to be, but not the second one. It seems like the "test:rtree" parts of
> both of these are linkified.
>
>  test:rtree  :test:rtree

It looks correct. `org-plain-link-re' regexp expects a word boundary
before the type. If you disagree, what do you suggest as allowed
characters before a plain link?

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Fix for org-make-link-description-function use in org-insert-link [9.0.10 (9.0.10-5-g1654a5-elpa @ /home/rrt/.emacs.d/elpa/org-20170904/)]

2017-09-05 Thread Nicolas Goaziou
Hello,

Reuben Thomas  writes:

> This seems to be incorrect behaviour, as the docstring for
> org-insert-link says:
>
>   If `org-make-link-description-function' is non-nil, this function will be
>   called with the link target, and the result will be the default
>   link description.
>
> The implication is that the value returned is used as the default, not
> that it overrides the prompt.

I agree.

> First, org-make-link-description-function is called if it is non-nil,
> and used to set default-description.

I think the optional parameter from the function call should still
prevail. I.e., shouldn't this function be called when
DEFAULT-DESCRIPTION is nil (e.g., called interatively)?

> Then (unless auto-desc is non-nil) the description is prompted for with
> default-description as the default value (unless
> org-make-link-description-function returned nil, in which case the
> current value of desc, if any, is used).
>
> There is one further matter that my patch does not address: the
> docstring for org-make-link-description-function says:
>
> “When [org-make-link-description-function is] nil, the link location
> will be used.”
>
> This does not happen (it’s precisely the behaviour I’ve been trying to
> obtain!), and my patch does not make it happen. Indeed, it’s not clear
> that it’s desirable (if one is using numbered sections, for example).

Obviously, it would not be desirable. 

However, I think it should read "When
`org-make-link-description-function' _returns_ nil, the link location is
used". This is not what is implemented either, tho.


Regards,

-- 
Nicolas Goaziou



Re: [O] How to use the list search?

2017-09-05 Thread Nick Dokos
Adam Porter  writes:

> You're not doing anything wrong, it's just not a very good search
> engine.
>

Ah, Gmane, Gmane - wherefore art thou, Gmane?

-- 
Nick




Re: [O] [RFC] Remove Org Struct mode

2017-09-05 Thread Michael Brand
On Tue, Aug 22, 2017 at 7:48 PM, Michael Brand
 wrote:

> 6) No syntax highlighting of headings

To get the above behavior of orgstruct-mode in outshine for
programming modes I added outshine-fontify. It makes me ready to let
orgstruct-mode go.

  outshine-fontify is a variable defined in ‘outshine.el’.
  Its value is (closure (t) nil (not (derived-mode-p 'prog-mode)))
  Original value was t

This variable is safe as a file local variable if its value
satisfies the predicate ‘(lambda (v) (memq v (quote (t nil’.

  Documentation:
  When to fontify the outshine headings in a buffer.

  Possible values are:

   ‘t’Always (the default).
   ‘nil’  Never.
   function   A Lisp predicate function with no arguments. For example
  ‘(lambda () (not (derived-mode-p (quote prog-mode’
  fontifies only when not in a programming mode.

  ‘t’ and ‘nil’ can be used for a file local variable to make an
  exception for certain files or to be independent of the user’s
  customization.

  You can customize this variable.

Michael



Re: [O] setting local variables

2017-09-05 Thread Eric Abrahamsen
Rasmus  writes:

> Hi,
>
> (Sorry for replying to this old thread which I am only reading now)
>
> Eric Abrahamsen  writes:
>
 I'm writing an Emacs manual in Org, using
 https://github.com/tarsius/ox-texinfo-plus to make things a bit
 easier.
>>>
>>> I don't know that library, but as a biased POV, it would be nice to use
>>> "ox-texinfo" and let us know about its shortcomings. Just saying.
>>
>> Oh I don't think it's about shortcomings, just about having a version
>> that's tweaked specifically for writing Emacs manuals. I _really_ want
>> my packages to have info manuals, and I _really_ don't want to learn how
>> to write texinfo. I saw Rasmus' Org manual in org, and it looked like a
>> lot of work. Then I noticed that the Magit manuals used this
>> texinfo-plus thing, and it seemed good enough.
>
> It was Thomas S. Dye who ported the Org manual in Org
>
> https://github.com/tsdye/orgmanual
>
> FWIW I like to see general tweaks added directly to ox-texinfo to the
> extend it’s feasible.

Oops, sorry about that.

Later I removed my manual's dependency on ox-texinfo+, and went with
plain Org export functionality. It looks a lot better now, and is more
correct, but it took me a good half day to learn texinfo and do the
work. I knew I'd have to do that at some point, so that's fine, I was
just putting it off.

The only real problem I encountered was that links to external Info
manuals did not export correctly, and couldn't be followed. I gave up on
learning the exact syntax of texinfo's @[px]ref commands because it was
dinnertime, but I can figure out what went wrong and maybe provide a
patch.

The other thing I'd like to know is how to "inline" sections (ie output
several sections on a single page), but still have links to those
sections work correctly.

That problem and most others could probably be "solved" by expanding the
docs. For instance, regarding the sectioning problem, "12.14.6 Headings
and sectioning structure" in the Org manual says:

  If an Org headline’s level has no associated Texinfo structuring
  command, or is below a certain threshold (*note Export settings), then
  the Texinfo export back-end makes it into a list item.

Why a list item? Plenty of Info manuals have multiple sub-headings on a
single page, how do we do that?

In general, I think the texinfo part of the Org manual could benefit
from some beefing up, and I'd be happy to provide suggestions.

Eric




Re: [O] Automatic mtime and ctime on all or select group of trees?

2017-09-05 Thread Jorge Morais Neto
[unfortunately the first email went only to Adam Porter; now I address the list]
On 2 September 2017 at 22:10, Adam Porter  wrote:
> Thanks for sharing that, I didn't even remember org-expiry.  Very clever
> use of it!  You seem to know more about elisp than you give yourself
> credit for.  :)
Thank you for the encouragement!

>> Suggestions welcome.  It currently
>> gives compile warnings, which I ignore for now:
>>
>> J-org.el:18:1:Warning: defcustom for ‘J-insert-created’ fails to specify
>> containing group
>
> You can fix that by adding e.g. ":group 'org" to the defcustom.
> Normally the defcustom would pick up whatever group was last defined in
> the same file.

Thank you for the tip.  But instead of adding precisely what you
suggested, I have added “:group 'org-expiry”.  The warning is gone and
the option does show up when I invoke customize-group and type
“org-expiry”.  I have run some other minimal tests and it seems to be
working.

Regards

--
- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free (as in free speech) software for Android: https://f-droid.org/



[O] Bug: Fix for org-make-link-description-function use in org-insert-link [9.0.10 (9.0.10-5-g1654a5-elpa @ /home/rrt/.emacs.d/elpa/org-20170904/)]

2017-09-05 Thread Reuben Thomas


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


I was trying to make link descriptions default to the link. This is
useful so that, for example, in LaTeX export, links without a
description do not turn into empty text if one has unnumbered sections.
Also, it’s useful if one is primarily using PDF output, with hyperlinks.

I used the following code:

(defun org-make-link-description (link desc)
  (or desc link))
(setq org-make-link-description-function #'org-make-link-description)

This works; however, no description is prompted for (the description is
*always* the default).

This seems to be incorrect behaviour, as the docstring for
org-insert-link says:

  If `org-make-link-description-function' is non-nil, this function will be
  called with the link target, and the result will be the default
  link description.

The implication is that the value returned is used as the default, not
that it overrides the prompt.

The current logic dates from commit d9e5aed2, which aims to fix a
previous bug where the prompt was not offered if
org-make-link-description-function failed. The commit message implies
that the prompt should not be offered if
org-make-link-description-function succeeds, but I believe that is
wrong.

Below is a patch which both corrects the behaviour and simplifies the
logic.

First, org-make-link-description-function is called if it is non-nil,
and used to set default-description.

Then (unless auto-desc is non-nil) the description is prompted for with
default-description as the default value (unless
org-make-link-description-function returned nil, in which case the
current value of desc, if any, is used).

There is one further matter that my patch does not address: the
docstring for org-make-link-description-function says:

“When [org-make-link-description-function is] nil, the link location
will be used.”

This does not happen (it’s precisely the behaviour I’ve been trying to
obtain!), and my patch does not make it happen. Indeed, it’s not clear
that it’s desirable (if one is using numbered sections, for example).

Patch follows:


Subject: [PATCH] Fix logic of calling org-make-link-desciption-function

* lisp/org.el (org-insert-link): Simplify so that description is only
prompted for once, and org-make-link-description-function obviously
sets the default description, as per the docstring. Then, always
prompt for the description, even if the default is set.
---
 lisp/org.el | 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 2680cee..0731cf7 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -10286,16 +10286,15 @@ Use TAB to complete link prefixes, then RET for 
type-specific completion support
(setq desc path)
 
 (if org-make-link-description-function
-   (setq desc
- (or (condition-case nil
- (funcall org-make-link-description-function link desc)
-   (error (progn (message "Can't get link description from 
`%s'"
-  (symbol-name 
org-make-link-description-function))
- (sit-for 2) nil)))
- (read-string "Description: " default-description)))
-  (if default-description (setq desc default-description)
-   (setq desc (or (and auto-desc desc)
-  (read-string "Description: " desc)
+   (setq default-description
+ (condition-case nil
+  (funcall org-make-link-description-function link desc)
+(error (progn (message "Can't get link description from `%s'"
+   (symbol-name 
org-make-link-description-function))
+  (sit-for 2) nil)
+
+(setq desc (or (and auto-desc desc)
+   (read-string "Description: " (or default-description 
desc
 
 (unless (string-match "\\S-" desc) (setq desc nil))
 (when remove (apply 'delete-region remove))
-- 
2.7.4


Emacs  : GNU Emacs 25.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2017-04-29
Package: Org mode version 9.0.10 (9.0.10-5-g1654a5-elpa @ 
/home/rrt/.emacs.d/elpa/org-20170904/)

current state:
==
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-latex-classes '(("article" "\\documentclass[11pt]{article}" 
("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}") 
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  ("\\paragraph{%s}" . "\\paragraph*{%s}") 
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
 ("report" "\\documentclass[11pt]{report}" 

Re: [O] Changing indentations of all the children at once

2017-09-05 Thread Eric S Fraga
On Tuesday,  5 Sep 2017 at 14:54, R Jain wrote:
> Hi Everyone,
>
> Is it possible to change the indentations of all the children
> (subheadings, subsubheadings, etc) at the same time, when we change
> the indentation of the main heading. In other words:

Try S-M-rightarrow.

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-723-g23eba9


signature.asc
Description: PGP signature


[O] Changing indentations of all the children at once

2017-09-05 Thread R Jain
Hi Everyone,Is it possible to change the indentations of all the children (subheadings, subsubheadings, etc) at the same time, when we change the indentation of the main heading. In other words:A. Main thingB. Somethingwhich expands to:A. Main thingB. Something	1. First thing		a. Second thing			i) third thingchange to:A. Main thing	1. Something		a. First thing			i) Second thing- third thingin one step, when I use 'M-rightarrow' on the main heading "B. Something".Thanks,Rishabh



Re: [O] mimetype for orgmode files

2017-09-05 Thread Bastien Guerry
John Kitchin  writes:

> I guess I have no objections. Let me know when it is done, and I will
> see about updating mimedb.

Done!

-- 
 Bastien



Re: [O] mimetype for orgmode files

2017-09-05 Thread John Kitchin
I guess I have no objections. Let me know when it is done, and I will
see about updating mimedb.

Carsten Dominik writes:

> On Tue, Sep 5, 2017 at 8:30 AM, Bastien Guerry  wrote:
>
>> Hi Yasushi,
>>
>> Yasushi SHOJI  writes:
>>
>> > There is RFC 6648, which "deprecating the "X-" Prefix".
>>
>> Thanks for letting us know!
>>
>> > So, it might be better to use "text/org".
>>
>> I’m fine with "text/org".  John?  Others?
>>
>
> text/org seems to be perfect.
>
> Carsten
>
>
>>
>> I’ll make the change later this week if nobody disagrees.
>>
>> Thanks,
>>
>> --
>>  Bastien
>>
>>


-- 
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] Different kinds of enumerate in the same latex export

2017-09-05 Thread Julien Cubizolles
Eric S Fraga  writes:

> On Tuesday,  5 Sep 2017 at 11:41, Julien Cubizolles wrote:
>> Does orgmode allow to pass some properties to a list that could be used
>> to alter its format ?
>
> Try maybe:
>
> #+attr_latex: :environment plickers
> 1. first
> 2. second
>
> Works for me with the etaremune environment (reverse ordered numbering).

It does, thanks. However my plickers environment depends on enumitem that
doesn't play nice with beamer. It turns out that

--8<---cut here---start->8---
#+attr_latex: :options [a)]
1. first
2. second
--8<---cut here---end--->8---

works as well, without the need to define a new enumerate-like
environment.

Julien.



Re: [O] setting local variables

2017-09-05 Thread Rasmus
Hi,

(Sorry for replying to this old thread which I am only reading now)

Eric Abrahamsen  writes:

>>> I'm writing an Emacs manual in Org, using
>>> https://github.com/tarsius/ox-texinfo-plus to make things a bit
>>> easier.
>>
>> I don't know that library, but as a biased POV, it would be nice to use
>> "ox-texinfo" and let us know about its shortcomings. Just saying.
>
> Oh I don't think it's about shortcomings, just about having a version
> that's tweaked specifically for writing Emacs manuals. I _really_ want
> my packages to have info manuals, and I _really_ don't want to learn how
> to write texinfo. I saw Rasmus' Org manual in org, and it looked like a
> lot of work. Then I noticed that the Magit manuals used this
> texinfo-plus thing, and it seemed good enough.

It was Thomas S. Dye who ported the Org manual in Org

https://github.com/tsdye/orgmanual

FWIW I like to see general tweaks added directly to ox-texinfo to the
extend it’s feasible.

Rasmus

-- 
In theory, practice and theory are the same. In practice they are not




Re: [O] Different kinds of enumerate in the same latex export

2017-09-05 Thread Eric S Fraga
On Tuesday,  5 Sep 2017 at 11:41, Julien Cubizolles wrote:
> Does orgmode allow to pass some properties to a list that could be used
> to alter its format ?

Try maybe:

#+attr_latex: :environment plickers
1. first
2. second

Works for me with the etaremune environment (reverse ordered numbering).

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-723-g23eba9


signature.asc
Description: PGP signature


Re: [O] Different kinds of enumerate in the same latex export

2017-09-05 Thread Rasmus
Hi Julien,

You could do it like this:

#+latex_header: \usepackage{enumitem}
#+latex_header: \newlist{plickers}{enumerate}{2} 
\setlist[plickers]{label=\alph*.}
#+attr_latex: :environment plickers
1. A
2. B

Hope it helps,
Rasmus

-- 
One thing that is clear: it's all down hill from here 




[O] Different kinds of enumerate in the same latex export

2017-09-05 Thread Julien Cubizolles
I have to use two different enumerate items in the same document, one
numbered (the default enumerate) and the other one ordered
alphabetically (which I will now call "plickers"). In my LaTeX class,

I've defined the "plickers" environment
--8<---cut here---start->8---
\RequirePackage{enumitem}

\newlist{plickers}{enumerate}{2}
\setlist[plickers]{label=\alph*.}
--8<---cut here---end--->8---

But I don't know how to have org-mode use one or the other to export an
ordered list. With:

--8<---cut here---start->8---
(setq org-beamer-environments-extra
  '(
("Plickers" "P" "\\begin{plickers}%a%U" "\\end{plickers}")))
--8<---cut here---end--->8---

The following obviously creates a enumerate environment nested within a
plickers one, not what's intended.
--8<---cut here---start->8---
 essai:B_Plickers:
:PROPERTIES:
:BEAMER_env: Plickers
:END:
1. 1st item
2. 2nd item
--8<---cut here---end--->8---

Does orgmode allow to pass some properties to a list that could be used
to alter its format ?

Julien.




Re: [O] mimetype for orgmode files

2017-09-05 Thread Carsten Dominik
On Tue, Sep 5, 2017 at 8:30 AM, Bastien Guerry  wrote:

> Hi Yasushi,
>
> Yasushi SHOJI  writes:
>
> > There is RFC 6648, which "deprecating the "X-" Prefix".
>
> Thanks for letting us know!
>
> > So, it might be better to use "text/org".
>
> I’m fine with "text/org".  John?  Others?
>

text/org seems to be perfect.

Carsten


>
> I’ll make the change later this week if nobody disagrees.
>
> Thanks,
>
> --
>  Bastien
>
>


Re: [O] Bug: markdown export errors on headers [9.0.9 (9.0.9-82-gb862c2-elpaplus @ /home/fommil/.emacs.d/elpa/org-plus-contrib-20170814/)]

2017-09-05 Thread Loris Bennett
Tim Cross  writes:

> Loris Bennett writes:
>
>> Adam Porter  writes:
>>
>>> "Loris Bennett"  writes:
>>>
 I didn't know about this function either.  Is it correct that the org
 parts of 'org-plus-contrib' shadow the whole of 'org', e.g.

   ...
   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/org hides 
 /usr/share/emacs/25.1/lisp/org/org
   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/org-install hides 
 /usr/share/emacs/25.1/lisp/org/org-install
   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-mscgen hides 
 /usr/share/emacs/25.1/lisp/org/ob-mscgen
   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/org-archive hides 
 /usr/share/emacs/25.1/lisp/org/org-archive
   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-tangle hides 
 /usr/share/emacs/25.1/lisp/org/ob-tangle
   ...
   
 plus hundreds of similar shadowings?
>>>
>>> That's shadowing the Org files distributed with Emacs; you want that.  :)
>>
>> D'oh, I copied the wrong bits.  This was what I was wondering about:
>>
>>   ...
>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ox-md hides 
>> /home/loris/.emacs.d/elpa/org-20170828/ox-md
>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-lilypond hides 
>> /home/loris/.emacs.d/elpa/org-20170828/ob-lilypond
>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-ruby hides 
>> /home/loris/.emacs.d/elpa/org-20170828/ob-ruby
>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-js hides 
>> /home/loris/.emacs.d/elpa/org-20170828/ob-js
>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/org-crypt hides 
>> /home/loris/.emacs.d/elpa/org-20170828/org-crypt
>>   ...
>>
>> M-x list-packages shows 'org-plus-contrib' as installed and 'org' as a
>> dependency required by
>>
>>   ox-twiki-20170803.1339, org-sticky-header-20170422.2135, 
>> org-dotemacs-20151119.1022
>>
>> So I guess the above packages should allow 'org-plus-contrib' as an
>> alternative requirement to 'org', but currently require only 'org', so I
>> end up with both installed.
>>
>> Cheers,
>>
>> Loris
>
> This is an artefact of having the two packages. The package system does
> not support alternatives. I have posted a few times regarding this. I
> don't think it does any harm, but many people will find they have both
> org-plus-contrib as well as org installed. The main draw back is that
> updates can take longer due to downloading org twice. 
>
> I and others have asked a few times why the packages are structured in
> this way, but nobody seems able to provide the rationale. Personally, I
> think we should just have an org package and an org-contrib package
> which depends on the org package.
>
> Tim
>

So is there a specific reason why there is no 'org-contrib' package
without 'org'?

Cheers,

Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de




Re: [O] Bug: markdown export errors on headers [9.0.9 (9.0.9-82-gb862c2-elpaplus @ /home/fommil/.emacs.d/elpa/org-plus-contrib-20170814/)]

2017-09-05 Thread Tim Cross


This is an artefact of having the two packages. The package system does
not support alternatives. I have posted a few times regarding this. I
don't think it does any harm, but many people will find they have both
org-plus-contrib as well as org installed. The main draw back is that
updates can take longer due to downloading org twice. 

I and others have asked a few times why the packages are structured in
this way, but nobody seems able to provide the rationale. Personally, I
think we should just have an org package and an org-contrib package
which depends on the org package.

Tim

Loris Bennett writes:

> Adam Porter  writes:
>
>> "Loris Bennett"  writes:
>>
>>> I didn't know about this function either.  Is it correct that the org
>>> parts of 'org-plus-contrib' shadow the whole of 'org', e.g.
>>>
>>>   ...
>>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/org hides 
>>> /usr/share/emacs/25.1/lisp/org/org
>>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/org-install hides 
>>> /usr/share/emacs/25.1/lisp/org/org-install
>>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-mscgen hides 
>>> /usr/share/emacs/25.1/lisp/org/ob-mscgen
>>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/org-archive hides 
>>> /usr/share/emacs/25.1/lisp/org/org-archive
>>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-tangle hides 
>>> /usr/share/emacs/25.1/lisp/org/ob-tangle
>>>   ...
>>>   
>>> plus hundreds of similar shadowings?
>>
>> That's shadowing the Org files distributed with Emacs; you want that.  :)
>
> D'oh, I copied the wrong bits.  This was what I was wondering about:
>
>   ...
>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ox-md hides 
> /home/loris/.emacs.d/elpa/org-20170828/ox-md
>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-lilypond hides 
> /home/loris/.emacs.d/elpa/org-20170828/ob-lilypond
>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-ruby hides 
> /home/loris/.emacs.d/elpa/org-20170828/ob-ruby
>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-js hides 
> /home/loris/.emacs.d/elpa/org-20170828/ob-js
>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/org-crypt hides 
> /home/loris/.emacs.d/elpa/org-20170828/org-crypt
>   ...
>
> M-x list-packages shows 'org-plus-contrib' as installed and 'org' as a
> dependency required by
>
>   ox-twiki-20170803.1339, org-sticky-header-20170422.2135, 
> org-dotemacs-20151119.1022
>
> So I guess the above packages should allow 'org-plus-contrib' as an
> alternative requirement to 'org', but currently require only 'org', so I
> end up with both installed.
>
> Cheers,
>
> Loris


-- 
Tim Cross



Re: [O] mimetype for orgmode files

2017-09-05 Thread Bastien Guerry
Hi Yasushi,

Yasushi SHOJI  writes:

> There is RFC 6648, which "deprecating the "X-" Prefix".

Thanks for letting us know!

> So, it might be better to use "text/org".

I’m fine with "text/org".  John?  Others?

I’ll make the change later this week if nobody disagrees.

Thanks,

-- 
 Bastien



Re: [O] Bug: markdown export errors on headers [9.0.9 (9.0.9-82-gb862c2-elpaplus @ /home/fommil/.emacs.d/elpa/org-plus-contrib-20170814/)]

2017-09-05 Thread Loris Bennett
Adam Porter  writes:

> "Loris Bennett"  writes:
>
>> I didn't know about this function either.  Is it correct that the org
>> parts of 'org-plus-contrib' shadow the whole of 'org', e.g.
>>
>>   ...
>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/org hides 
>> /usr/share/emacs/25.1/lisp/org/org
>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/org-install hides 
>> /usr/share/emacs/25.1/lisp/org/org-install
>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-mscgen hides 
>> /usr/share/emacs/25.1/lisp/org/ob-mscgen
>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/org-archive hides 
>> /usr/share/emacs/25.1/lisp/org/org-archive
>>   /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-tangle hides 
>> /usr/share/emacs/25.1/lisp/org/ob-tangle
>>   ...
>>   
>> plus hundreds of similar shadowings?
>
> That's shadowing the Org files distributed with Emacs; you want that.  :)

D'oh, I copied the wrong bits.  This was what I was wondering about:

  ...
  /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ox-md hides 
/home/loris/.emacs.d/elpa/org-20170828/ox-md
  /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-lilypond hides 
/home/loris/.emacs.d/elpa/org-20170828/ob-lilypond
  /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-ruby hides 
/home/loris/.emacs.d/elpa/org-20170828/ob-ruby
  /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/ob-js hides 
/home/loris/.emacs.d/elpa/org-20170828/ob-js
  /home/loris/.emacs.d/elpa/org-plus-contrib-20170828/org-crypt hides 
/home/loris/.emacs.d/elpa/org-20170828/org-crypt
  ...

M-x list-packages shows 'org-plus-contrib' as installed and 'org' as a
dependency required by

  ox-twiki-20170803.1339, org-sticky-header-20170422.2135, 
org-dotemacs-20151119.1022

So I guess the above packages should allow 'org-plus-contrib' as an
alternative requirement to 'org', but currently require only 'org', so I
end up with both installed.

Cheers,

Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de