Re: [O] unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode

2018-05-30 Thread Van L


> Nicolas Goaziou writes:
> 
> I assume you mean that sub/superscript markers are hidden (i.e.,
> relevant configuration settings for WYSIWYG).
> 
> But in what cases do users need to edit the textual markup? Can they be
> avoided ?

I use the markup to help read language with differing variations in sounds, 
graphs and meaning.

The following is an example. Now I always enclose sup/subscripts with the curly 
braces to lessen the chances of WYSIWYG dropping out. And, in that case, I 
would need to edit the textual markup. Sometimes the markup mechanism won’t let 
me switch from sup/subscript appending to the end of the line.

#+BEGIN_EXAMPLE
  - 我永远感激郭先生对我在学术上的启迪和指导。

I will always feel my teacher showed me the way at school.

我^wo3_ngo5^{*1* I}_{*2* me}^{*3* my}
永^yong3_wing5^{(_streams flow forever_)}_forever^always_perpetual
远^yuan3_yun5^{(/robe/ moving)}_far^distant_remote^{by far intensifier}_much 
*1* forever *2* eternal
感^gan3_gam2^{(/salty/ mind-heart)}_{(_seeing_ /sounding/ meaning)}^{to 
feel}_{to move}^{to touch}_{to affect}^feeling_emotion^{sense of …}
激^ji1_gik1^{(_flowing water_ /clear-bright/)} *1* to be grateful *2* to 
appreciate *3* thankful
郭^guo1_gwok3^23_30^{_/city/ on hill_}_{city wall}^{family name}
先^xian1_sin1
生^sheng1_saang1 teacher
对^dui4_deui3
我^wo3_ngo5 assessed me
在^zai4_joi6^at
学^xue2_hok6^school
术^shu4_seut6
上^shang4_seung5
的^de5_dik1
启^qi3_kai2^78_8^{(_door opening open_)}
迪^di2_dik6^113_9^{(_move to low hanging fruit_)} to enlighten
和^he4_wo4^{(_grain and mouth_)}
指^zhi3_ji2
导^dao3_dou6 *1* to guide *2* to give directions *3* to direct *4* to coach 
*5* guidance *6* tuition

#+END_EXAMPLE




[O] [BUG] org-insert-structure-template on region selected text will delete some characters

2018-05-30 Thread stardiviner
For example:

Region select on:

ENTRYPOINT ["/usr/sbin/nginx"]

When I press =[C-c C-,]= on this region, the region content will be wrapped 
with src block,
but it deleted the last "]".

This is a bug I think.

-- 
[ stardiviner ] don't need to convince with trends.
   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



[O] org-publish report error cond: Unknown language ‘sh’ at line 2 in ‘ *temp*’

2018-05-30 Thread stardiviner
When org file use `#+begin_src sh` instead of `#+begin_src shell`. org-publish 
report error:

: cond: Unknown language ‘sh’ at line 2 in ‘ *temp*’

I'm sure I loaded (shell . t) babel language.

Here is my config:

,
| (setq org-babel-load-languages
|   '((org . t)   ; Org-mode
| (shell . t) ; Shell Script
| (calc . t)  ; Calc
| ))
| 
| ;;; [ ob-shell ]
| (require 'ob-shell)
| (add-to-list 'org-babel-load-languages '(shell . t))
| (org-babel-do-load-languages 'org-babel-load-languages 
org-babel-load-languages)
| (add-to-list 'org-babel-tangle-lang-exts '("shell" . "sh"))
`


-- 
[ stardiviner ] don't need to convince with trends.
   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



[O] Agenda search: setting sort-order

2018-05-30 Thread Nathan Neff
Hi all,

I'm using org-mode version 9.1.13 from elpa, and
have a custom agenda command:


(setq org-agenda-custom-commands
   '(
 ("z" search ""
   ((org-agenda-sorting-strategy '(timestamp-up))

And I have an org-file with this data:

* TODO [#C] Test1
:foo:
<2018-04-24 Tue 19:30>
* TODO [#A] Test2
:foo:
<2018-05-24 Thu 19:30>
* TODO [#B] Test3
:foo:
<2017-12-24 Sun 23:33>

The data is not sorted according to timestamp.  I cannot seem to
get the data sorted in any fashion when using the "search" agenda mode.

However, if I change "search" to "tags" and search for the "foo" tag, then
it appears that the sorting works.  I've tested it with priority and
timestamp
using the above data and it sorts the items correctly.

Why is my "search" agenda command ignoring the org-agenda-sorting-strategy?

Thanks,
--Nate


Re: [O] C++ is not accepted for SRC block evaluation

2018-05-30 Thread Berry, Charles



> On May 30, 2018, at 4:11 AM, Nicolas Goaziou  wrote:
> 
> Hello,
> 
> Aaron Ecay  writes:
> 
>> Improved documentation is never a bad thing.  OTOH, I personally would
>> not spend time on implementing the mapping you propose.
> 
> I simply added a footnote about C++ and D languages.
> 
>> org-babel-do-load-languages is IMO a relic.  I think that all babel
>> languages should be autoloaded, just like normal lisp libraries are.
> 
> But we still need a mechanism to selectively allow evaluation of some
> source blocks based on their language. I guess some users expect to have
> this.
> 
> Otherwise, it sounds good.
> 
>> If I had to sketch a design for this, it would be a macro like:
>> 

It would be nice to have a concurrent update to template.el for this scheme.

https://code.orgmode.org/bzg/worg/raw/master/org-contrib/babel/ob-template.el

Chuck 



Re: [O] running a source code by name

2018-05-30 Thread Berry, Charles



> On May 29, 2018, at 11:59 PM, Julian M. Burgos  
> wrote:
> 
> I am building an org template to create html presentations using the R
> package xaringan.  In my case each slide is a markdown source block.
> The elisp block tangles everything into a Rmd file, and the R block runs
> rmarkdown::render and opens the resulting html file in a browser.
> 

Oh. 

Maybe ox-ravel would save you some steps.  It can turn *.org into *.Rmd with R, 
C/C++, and other language chunks.

For examples, see the slidify.org and demos.org files at 

https://github.com/chasberry/orgmode-accessories

HTH,

Chuck



Re: [O] [bzg/org-mode] Added latex export option to ob-plantuml.el (#1)

2018-05-30 Thread Nicolas Goaziou
Hello,

"Roger J. H. Welsh"  writes:

> On  Tue, May 22, 2018 at 11:16:44AM +0200 , Nicolas Goaziou wrote:
>> Thank you. Could you provide a proper commit message, i.e., including
>> the function being modified:
>>
>>   * lisp/ob-plantuml.el (... function ...): ... change ...
> I have made the changes to the patch.
> Does this fit your requirements?
>
>> You also need to add TINYCHANGE at the end of the message if you haven't
>> signed FSF papers yet.
> This is my first contribution.

Thank you.  

I applied it to "next" branch, which will be merged in master once Org
9.2 is out.

> What papers should I sign for regular contributions?

You need to fill this form :
 and send it to
.

See  for details.

Regards,

-- 
Nicolas Goaziou



Re: [O] org master: make fails

2018-05-30 Thread Julius Dittmar
Am 30.05.2018 um 12:36 schrieb Nicolas Goaziou:
> Julius Dittmar  writes:
>> on two of my computers, both openSUSE-based with org-mode current master
>> and current texlive installed, make fails.
>>
>> The last messages are:
>>
>> make -C doc info
>> make[1]: Entering directory `/XXX/git/org-mode-CURRENT/doc'
>> emacs  -Q -batch --eval '(setq vc-handled-backends nil
>> org-startup-folded nil)' \
>>   --eval '(add-to-list '"'"'load-path "../lisp")' \
>>   --eval '(load "../mk/org-fixup.el")' \
>>   --eval '(org-make-manuals)'
>> Loading /XXX/git/org-mode-CURRENT/mk/org-fixup.el (source)...
>> Wrong number of arguments: #[(string  separators omit-nulls)
>>
>> ... followed by a long mainly empty and unreadable quoted string,
>> followed by ...
>>
>> " [separators omit-nulls split-string-default-separators list notfirst
>> start t 0 nil string-match ...] 5 1648329], 4
>> make[1]: *** [org.texi] Fehler 255
>> make[1]: Leaving directory `/XXX/git/org-mode-CURRENT/doc'
>> make: *** [info] Fehler 2
>>
>> As on the third of my computers (with an old debian and texlive 2017)
>> make works, I guess that's a local problem, not one of org-mode.
>> Nonetheless: Do you have any hints on what might be missing there, or
>> how I could proceed tracking down the problem?
> 
> Is your Emacs old (e.g., Emacs 23)?

GNU Emacs 24.3.1 in one instance, the other not older than that (can't
check the details right now).

> Did you try with emacs -Q, just
> loading Emacs?

As far as I can tell, the make fails somewhere in the 'make doc' part.
According to the quote above emacs is called with -Q.

'make autoloads' does not throw errors, and what I use of org-mode works
except for a minor and probably unrelated glitch I did not yet find time
to track down.

Thanks for looking into it and for a terrific tool,

Julius



Re: [O] unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode

2018-05-30 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> +1 on this idea from me.

I created a "next" branch that we can merge in master once we're out
feature freeze.

> I describe the problem as: Org tries to be slightly WYSIWYG in terms of
> subscripts (with the relevant configuration settings).  But the facade
> over the underlying textual markup is imperfect.  Users sometimes need
> to edit the textual markup.

I assume you mean that sub/superscript markers are hidden (i.e.,
relevant configuration settings for WYSIWYG).

But in what cases do users need to edit the textual markup? Can they be
avoided ?

> The patch I created is based on a very similar emacs feature
> (prettify-symbols-mode).  (Unlike the org feature, the emacs feature
> only font-locks a static list of strings; it doesnʼt handle subscripts
> where the content to be font-locked can vary).  Once org supports emacs
> 25+ only (is it actually the case already?),

We officially support Emacs 24.3, even though at least Emacs 24.4 is
expected.

> I think it would be a good idea to replace the org-entities
> font-locking with the emacs built-in feature. Then my patch could
> extend that for subscripts (and we could recycle the core emacs
> defcustoms which control the featureʼs optionality, rather than
> needing our own).

About entities, we need to be able to distinguish between users entities
unrelated to Org, and the fixed set of entities in Org. Otherwise, if
can re-use code from Emacs, I'm all for it.

Regards,

-- 
Nicolas Goaziou



Re: [O] ox-odt in Org 8.2.10 and 9.1.13: killed buffer is read-only

2018-05-30 Thread Nicolas Goaziou
Hello,

Adonay Felipe Nogueira  writes:

> Make any .org file, and export it.
>
> The error is something like this:
>
> Making completion list...
> LaTeX to MathML converter not available.
> Formatting LaTeX using verbatim
> Wrote /tmp/odt-21540L0A/meta.xml
> Using vacuous schema [2 times]
> OpenDocument export failed: Buffer is read-only: #
> Mark set
>
> I verified that "/tmp/odt-21540L0A/meta.xml" and "/tmp/odt-21540L0A"
> don't exist.
>
> Side question: how do we debug this problem? Setting debug-on-error
> doesn't help.

I cannot reproduce your issue.

You may want to debug `org-odt--export-wrap'.  It seems the error
message comes from there.

Regards,

-- 
Nicolas Goaziou



Re: [O] C++ is not accepted for SRC block evaluation

2018-05-30 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> Improved documentation is never a bad thing.  OTOH, I personally would
> not spend time on implementing the mapping you propose.

I simply added a footnote about C++ and D languages.

> org-babel-do-load-languages is IMO a relic.  I think that all babel
> languages should be autoloaded, just like normal lisp libraries are.

But we still need a mechanism to selectively allow evaluation of some
source blocks based on their language. I guess some users expect to have
this.

Otherwise, it sounds good.

> If I had to sketch a design for this, it would be a macro like:
>
> (org-babel-define-language R
>   :evaluate org-babel-R-evaluate
>   :session org-babel-R-creaete-session
>   :language-name "R"  ;; Both these Could be optional, with the
>   :language-mode R-mode   ;; default calculated from the language name
>   ...)
>
> This macro would expand to:
>
> (add-to-list org-src-lang-modes ...)
> (add-to-list org-babel-tangle-lang-exts ...)
> ;; Possibly some others ...
> (add-to-list org-babel-languages-alist
>  '(R . (evaluate . org-babel-R-evaluate)
>(session . org-babel-R-create-session)
>...))

On the implementation side of things, I suggest to stay away from macros
whenever possible. It would make sense, however, to define a language as
a defstruct, much like we do for export back-ends.

In any case, I like this idea.

> Iʼve held back on implementing this (among other reasons) because it
> would be a big disruption to the babel ecosystem.  For all the languages
> in core and contrib it would be manageable, but there are third-party
> libraries that would have to be transitioned as well, plus the growing
> pains of user config files, etc.  It would not be a small project.

This change would entail a new major release, indeed. I think it is
largely worth the incompatible changes it would introduce. BTW, we could
still support old variables and functions. E.g., if language Foo is not
defined as a proper defstruct, look for the old system to load it and
send a deprecation warning about it.

Regards,

-- 
Nicolas Goaziou



Re: [O] org master: make fails

2018-05-30 Thread Nicolas Goaziou
Hello,

Julius Dittmar  writes:

> on two of my computers, both openSUSE-based with org-mode current master
> and current texlive installed, make fails.
>
> The last messages are:
>
> make -C doc info
> make[1]: Entering directory `/XXX/git/org-mode-CURRENT/doc'
> emacs  -Q -batch --eval '(setq vc-handled-backends nil
> org-startup-folded nil)' \
>   --eval '(add-to-list '"'"'load-path "../lisp")' \
>   --eval '(load "../mk/org-fixup.el")' \
>   --eval '(org-make-manuals)'
> Loading /XXX/git/org-mode-CURRENT/mk/org-fixup.el (source)...
> Wrong number of arguments: #[(string  separators omit-nulls)
>
> ... followed by a long mainly empty and unreadable quoted string,
> followed by ...
>
> " [separators omit-nulls split-string-default-separators list notfirst
> start t 0 nil string-match ...] 5 1648329], 4
> make[1]: *** [org.texi] Fehler 255
> make[1]: Leaving directory `/XXX/git/org-mode-CURRENT/doc'
> make: *** [info] Fehler 2
>
> As on the third of my computers (with an old debian and texlive 2017)
> make works, I guess that's a local problem, not one of org-mode.
> Nonetheless: Do you have any hints on what might be missing there, or
> how I could proceed tracking down the problem?

Is your Emacs old (e.g., Emacs 23)? Did you try with emacs -Q, just
loading Emacs?

Regards,

-- 
Nicolas Goaziou



Re: [O] running a source code by name

2018-05-30 Thread Julian M. Burgos
Thanks guys.  A combination of org-babel-goto-named-src-block and
org-babel-execute-src-block did the trick.

I am building an org template to create html presentations using the R
package xaringan.  In my case each slide is a markdown source block.
The elisp block tangles everything into a Rmd file, and the R block runs
rmarkdown::render and opens the resulting html file in a browser.

Thanks again. :)

Berry, Charles writes:

> OK, I have to note that this will also do the job that the OP requested:
>
> #+begin_src emacs-lisp :results silent :var result=myRcode
>
> #+end_src
>
> although it seems a little strange to write an empty src block for its side 
> effects.
>
> I suppose I should have suggested this in the first place:
>
> #+begin_src emacs-lisp :results silent :noweb yes
> <>
> #+end_src
>
> although the return value from the noweb reference could be troublesome 
> depending on what else is included in the latter src block.
>
> Chuck
>
>> On May 28, 2018, at 1:16 PM, John Kitchin  wrote:
>>
>> Here is yet another variation, that may be suitable for what you want:
>>
>>
>> #+name: myPyCode
>> #+BEGIN_SRC python
>> print('Hello')
>> #+END_SRC
>>
>>
>> #+BEGIN_SRC emacs-lisp :var results=myPyCode
>> results
>> #+END_SRC
>>
>> #+RESULTS:
>> : Hello
>>
>>
>> John
>>
>> ---
>> Professor John Kitchin
>> Doherty Hall A207F
>> Department of Chemical Engineering
>> Carnegie Mellon University
>> Pittsburgh, PA 15213
>> 412-268-7803
>> @johnkitchin
>> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fkitchingroup.cheme.cmu.edu=02%7C01%7C%7Cfdaa27b411604ed32a0108d5c4d9fa01%7C8e105b94435e4303a61063620dbe162b%7C0%7C0%7C636631362846470731=4K%2B96NBf5KPaoz13laaAR0%2FaqY2FlefTLy%2BPXy6YtO8%3D=0
>>
>>
>> On Mon, May 28, 2018 at 9:25 AM, Berry, Charles  wrote:
>>
>>
>> > On May 28, 2018, at 7:35 AM, Eric S Fraga  wrote:
>> >
>> > On Monday, 28 May 2018 at 11:13, Julian M. Burgos wrote:
>> >> Dear list,
>> >>
>> >> I have an org file with an R source code block.  I want to have a second
>> >> code block with an elisp call to run that first code.  Something like this
>> >>
>> >>
>> >> #+begin_src emacs-lisp :results silent :tangle no
>> >>
>> >> ... Some elisp code to run the "myRcode" block.
>> >
>> > Something along the lines of:
>> >
>> >(org-babel-goto-named-src-block "myRcode")
>> >(org-babel-execute-src-block)
>> >
>> > should do the job?
>>
>> Maybe wrap it in
>>
>> (save-excursion ... )
>>
>> or use
>>
>> (org-sbe "myRcode")
>>
>> or
>>
>> (org-babel-ref-resolve "myRcode")
>>
>> which both can also pass :var args.
>>
>> HTH,
>>
>> Chuck
>>
>>
>>
>>
>>


--
Julian Mariano Burgos, PhD
Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
Marine and Freshwater Research Institute
Botnsjávarsviðs / Demersal Division
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian.bur...@hafogvatn.is