Re: execute elisp link without prompt

2021-05-21 Thread Colin Baxter
> Tom Gillespie  writes:

>> In the end I've set as to nil as a local variable
> If you want something a bit more secure you could use a function
> that checks the block name ("some-block" in this example). Best!
> Tom

> (lambda (_lang _body) (not (string= "some-block" (plist-get (cadr
> (org-element-at-point)) :name

> #+begin_src elisp (setq-local org-confirm-babel-evaluate (lambda
> (_lang _body) (not (string= "some-block" (plist-get (cadr
> (org-element-at-point)) :name) #+end_src

> #+name: some-block #+begin_src elisp

> (message "yay!")  #+end_src

> #+RESULTS: some-block : yay!

> #+name: some-other-block #+begin_src elisp

> (message "I ask to run") #+end_src

> #+RESULTS: some-other-block : I ask to run


Thanks Tom. I'll try this.

Best wishes,

Colin Baxter.



Re:[PATCH] org.el: Make sure (org-agenda-files) search relative file paths in org-directory

2021-05-21 Thread ‪sunlin7
Hi Nicolas,Thank you so much. I had singed the FSF papers.  Original message From: Nicolas Goaziou Date: Sat, May 22, 2021, 00:31To: Sun Lin Cc: emacs-orgmode@gnu.orgSubject: Re: [PATCH] org.el: Make sure (org-agenda-files) search relative file paths in org-directoryHello,Sun Lin  writes:> Subject: [PATCH] org-agenda-files: work with relateive file paths.Applied. Thank you.I added TINYCHANGE cookie at the end of the commit message as I wasn'tsure you had signed the FSF papers already.Regards,-- Nicolas Goaziou

Re: execute elisp link without prompt

2021-05-21 Thread Tom Gillespie
> In the end I've set as to nil as a local variable

If you want something a bit more secure you could use a function that
checks the block name ("some-block" in this example). Best!
Tom

(lambda (_lang _body)
   (not
(string= "some-block"
 (plist-get (cadr (org-element-at-point)) :name

#+begin_src elisp
(setq-local
 org-confirm-babel-evaluate
 (lambda (_lang _body)
   (not
(string= "some-block"
 (plist-get (cadr (org-element-at-point)) :name)
#+end_src

#+name: some-block
#+begin_src elisp
(message "yay!")
#+end_src

#+RESULTS: some-block
: yay!

#+name: some-other-block
#+begin_src elisp
(message "I ask to run")
#+end_src

#+RESULTS: some-other-block
: I ask to run



Re: Custom <> possibility?

2021-05-21 Thread Samuel Wales
tahnk you.  that makes sense for validity.  still not sure about
uniqueness.  it's not needed for me to understand, though.
of course with across-export link stability then uniqueness would be meaningful.


On 5/21/21, Nicolas Goaziou  wrote:
> Hello,
>
> Samuel Wales  writes:
>
>> so i am curious what the purpose of the default is?
>
> I think the purpose of the default value is to offer a solution that
> works for everyone. It is certainly not the best one in all situations.
>
> For example, I heard that even in 2021, using full Unicode in a URL is
> not good idea. Yet, some users may want to use Unicode symbols in
> a target.
>
> Regards,
> --
> Nicolas Goaziou
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: execute elisp link without prompt

2021-05-21 Thread Colin Baxter
Dear Nicolas,

> Nicolas Goaziou  writes:

> Hello, Colin Baxter  writes:

>> I have an elisp link of the form (without spaces, of course) [
>> [elisp:(dired-other-window "/path/to/directory/") ][ Directory ]
>> ].
>> 
>> The link works with the directory in appearing in dired
>> window. However, when I first click on the link, a dialog box is
>> brought up asking me if a I wish to execute the command. Of
>> course, I do - and I click 'Yes'.
>> 
>> How can I go to link directly without being interrogated by the
>> dialog box?

> See org-link-elisp-confirm-function.

Thank you. I tried setting 'org-link-elisp-confirm-function' to y-or-n-p
as suggested by ol.el, but it gave me a dialog box, as before, which I
had to click. In the end I've set as to nil as a local variable:

#+begin_src elisp
eval: (set (make-local-variable 'org-link-elisp-confirm-function) nil)
#+end_src

The doc-string says it's risky when used as a local variable, but it
seems to work. The variable returns to the global default 'yes-or-no-p'
when the buffer is killed.

Best wishes,



Re: Bug: Failed to render org file during first load on buffer emacs 27.1 windows binaries [9.3 (release_9.3 @ c:/ProgramFilesh/emacs-27.1-x86_64/share/emacs/27.1/lisp/org/)]

2021-05-21 Thread Aaron Rea
Hello everyone,

Thanks for your input.
I'm using Windows 10 20H2 - OS Build 19042.985.

As for the org version, I hit this issue even when running it out of the
box.
I download the emacs-27.2-x86_64 zip file, extract it, cd to the bin
directory and run '.\emacs.exe -Q'.
When I C-x C-f test.org (a new file) it hangs briefly and outputs 'shell
command succeeded with no output' and the issue persists.
Running M-x org-version it outputs 'Org mode version 9.4.4 (release_9.4.4 @
c:/Users//OneDrive/Desktop/emacs-27.2-x86_64/share/emacs/27.lisp/org/'.
If I run M-x org-mode or open a new org file after the first one it works
just fine.

Is there perhaps a different set of windows binaries I should be using?
Or is there a way to run a stack trace on the entire emacs session?
It's not running into any actual error so debug isn't yielding anything.

All good things,
Aaron


On Fri, May 21, 2021 at 10:08 AM Shibu N.V  wrote:

> Hello Aaron,
> I think, the Issue is specific to the version of Windows.
> I faced the issue with Windows 10,1903. When I updated to Windows 10 20H1,
> it resolved itself.
>
>
> N.V.Shibu
> Assistant Professor Senior Grade
> Sri Ramakrishna Institute of Technology
> Coimbatore-10.
>
>
> On Fri, May 21, 2021 at 1:39 PM Aaron  wrote:
>
>> Hi folks,
>>
>>
>>
>> I upgraded emacs from 26.3 to 27.2 and am encountering this same issue on
>> Windows 10.
>>
>> I’ve tried using org 9.4.4 and 9.6 as well and also using emacs 27.1 but
>> no dice.
>>
>> This has all been done with a ‘clean’ install – wiped my .emacs file and
>> .emacs.d directory.
>>
>> I get the issue when I open any org file or even if I create a new file
>> ending in .org.
>>
>> Any other ideas on how to get it working?
>>
>>
>>
>> All good things,
>> Aaron
>>
>


Re: [PATCH] org.el: Make sure (org-agenda-files) search relative file paths in org-directory

2021-05-21 Thread Nicolas Goaziou
Hello,

Sun Lin  writes:

> Subject: [PATCH] org-agenda-files: work with relateive file paths.

Applied. Thank you.

I added TINYCHANGE cookie at the end of the commit message as I wasn't
sure you had signed the FSF papers already.

Regards,
-- 
Nicolas Goaziou



Re: execute elisp link without prompt

2021-05-21 Thread Nicolas Goaziou
Hello,

Colin Baxter  writes:

> I have an elisp link of the form (without spaces, of course)
> [ [elisp:(dired-other-window "/path/to/directory/") ][ Directory ] ].
>
> The link works with the directory in appearing in dired window. However,
> when I first click on the link, a dialog box is brought up asking me if
> a I wish to execute the command. Of course, I do - and I click 'Yes'.
>
> How can I go to link directly without being interrogated by the dialog
> box?

See org-link-elisp-confirm-function.

Regards,
-- 
Nicolas Goaziou



execute elisp link without prompt

2021-05-21 Thread Colin Baxter
Hello,

I have an elisp link of the form (without spaces, of course)
[ [elisp:(dired-other-window "/path/to/directory/") ][ Directory ] ].

The link works with the directory in appearing in dired window. However,
when I first click on the link, a dialog box is brought up asking me if
a I wish to execute the command. Of course, I do - and I click 'Yes'.

How can I go to link directly without being interrogated by the dialog
box?

Best wishes,

Colin Baxter.




have =make cleanall= remove .texi files in doc/

2021-05-21 Thread Greg Minshall
hi.  neither =make clean= nor =make cleanall= remove the two .texi files
built (by, e.g., =make info=) in the doc subdirectory.  this patch
removes those files with =make cleanall=.  i wasn't sure which to use,
but it sort of looked like =cleanall= might be the place.

i also noticed that =make cleanall= invokes =find= on =./contrib=, which
no longer (i assume) exists so =find= complains (which is logged, but
then ignored, by =make=).  i'm happy to do a patch for that (though it
would be, presumably, as trivial as this one).

cheers, Greg

>From 0584aec533d556bed94f6e90affb3ff11faca3b0 Mon Sep 17 00:00:00 2001
From: Greg Minshall 
Date: Fri, 21 May 2021 18:42:35 +0300
Subject: [PATCH] doc/Makefile: `cleanall` target now deletes
 doc/{org,orgguide}.texi

* doc/Makefile: `cleanall` target now deletes doc/{org,orgguide}.texi

In the past, at least one of these seems to have been a tracked
(source?) file.  That is no longer the case.
---
 doc/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/Makefile b/doc/Makefile
index da5a07ad9..d934258f3 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -58,6 +58,7 @@ clean:
 	  org-version.tex *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys \
   *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
 cleanall:	clean
+	$(RM) org.texi orgguide.texi
 	$(RMR) guide manual
 
 clean-install:
-- 
2.31.1



Re: new org-contrib and straight.el

2021-05-21 Thread Greg Minshall
Nick,

thanks.  i've submitted a bug report.

cheers, Greg

ps -- if anyone tried the recipe i gave before, this one seems to
actually work from a clean repository (i don't think the other did):

`(org :type git
   :repo "https://code.orgmode.org/bzg/org-mode.git";
   :local-repo "org"
   :depth full
   :pre-build ,(list (concat (when (eq system-type 'berkeley-unix) "g") 
"make")
 "autoloads"
 "info"
 (concat "EMACS=" invocation-directory invocation-name))
   :build (:not autoloads)
   :files (:defaults "lisp/*.el" ("etc/styles/" "etc/styles/*")))

(again, you might use this like
: (straight-use-package `(org type git ...))



Re: Bug: Failed to render org file during first load on buffer emacs 27.1 windows binaries [9.3 (release_9.3 @ c:/ProgramFilesh/emacs-27.1-x86_64/share/emacs/27.1/lisp/org/)]

2021-05-21 Thread Shibu N.V
Hello Aaron,
I think, the Issue is specific to the version of Windows.
I faced the issue with Windows 10,1903. When I updated to Windows 10 20H1,
it resolved itself.


N.V.Shibu
Assistant Professor Senior Grade
Sri Ramakrishna Institute of Technology
Coimbatore-10.


On Fri, May 21, 2021 at 1:39 PM Aaron  wrote:

> Hi folks,
>
>
>
> I upgraded emacs from 26.3 to 27.2 and am encountering this same issue on
> Windows 10.
>
> I’ve tried using org 9.4.4 and 9.6 as well and also using emacs 27.1 but
> no dice.
>
> This has all been done with a ‘clean’ install – wiped my .emacs file and
> .emacs.d directory.
>
> I get the issue when I open any org file or even if I create a new file
> ending in .org.
>
> Any other ideas on how to get it working?
>
>
>
> All good things,
> Aaron
>


Re: Bug: Failed to render org file during first load on buffer emacs 27.1 windows binaries [9.3 (release_9.3 @ c:/ProgramFilesh/emacs-27.1-x86_64/share/emacs/27.1/lisp/org/)]

2021-05-21 Thread Jeremie Juste
Hello Aaron,

The org-version that ships with emacs 27.2 is 9.4.4.
And, for me this version works well on windows 10 out of the box.

Can you confirm this?

Then if you want to upgrade orgmode, please let us know how you did it.
In general the instructions (Info-goto-node  "(org) Installation") works
for me.

Hope this helps,
Jeremie





Re: What's up with ob-template.el? It seems heavily outdated

2021-05-21 Thread Pedro Bruel
I would be interested in an updated ob-template.el file.
I have never added support for a new language, but I started working with
ob-julia.el, and I essentially read ob-R.el to learn how it all fits
together and how to add missing features to ob-julia.

Le ven. 21 mai 2021 à 10:34, dalanicolai  a écrit :

> I am trying to improve org-babel support for maxima.
> However, when starting from ob-template.el
> ,
> which is advised in the section "develop support for new languages" in the 
> org-mode
> docs ,
> it seems that the code within that template file is heavily incorrect.
>
> I can write a whole list with "bugs", but it already starts with most of
> the params in the `org-babel-execute` function getting processed
> incorrectly.
>
> So I am wondering, am I missing something here? Or is this documentation
> just heavily outdated?
>
> Would you be interested in some updated ob-template.el file?
>
> You have any experience with adding language support? Then how did you
> approach it?
>
> Also, I could not really find a (recent) bug-report about this issue. So
> nobody mentioned this before?
>
> I can already find my way, using edebug and checking out other ob-...el
> files. I am just interested in (and surprised about) the current situation
> and why it is like that. And I am wondering if maybe there is some more
> recent documentation available.
>
> Thanks!
>


Re: [wip-cite-new] Initial implementation of `biblatex' citation processor

2021-05-21 Thread Nicolas Goaziou
Hello,

Denis Maier  writes:

> Is there a way to use styles that aren't loaded via biblatex package
> options, but as distinct package. E.g., biblatex-chicago is loaded as 
> \usepackage{biblatex-chicago}. Internally, the package will then load
> biblatex on its own.

You can add a package with, e.g, 

  #+latex_header: \usepackage{biblatex-chicago}

but style is controlled through style, bibstyle or citestyle options
from "biblatex" package.

Hopefully, the solution suggested by Thomas S. Dye works. Otherwise, we
will need a different mechanism for managing styles. I though about
doing something like

  #+cite_export: biblatex  package:style

e.g.,

  #+cite_export: biblatex biblatex-chicago:author-date

which would insert

  \usepackage[style=author-date]{biblatex-chicago}

instead of

  \usepackage[style=biblatex-chicago:author-date]{biblatex}

in the preamble of the document.

But we cannot presume all packages will use "style=..." syntax. So…
hopefully, the suggested solution works.

Crossing fingers,
-- 
Nicolas Goaziou



Re: Bug: Failed to render org file during first load on buffer emacs 27.1 windows binaries [9.3 (release_9.3 @ c:/ProgramFilesh/emacs-27.1-x86_64/share/emacs/27.1/lisp/org/)]

2021-05-21 Thread Aaron
Hi folks, I upgraded emacs from 26.3 to 27.2 and am encountering this same issue on Windows 10.I’ve tried using org 9.4.4 and 9.6 as well and also using emacs 27.1 but no dice.This has all been done with a ‘clean’ install – wiped my .emacs file and .emacs.d directory.I get the issue when I open any org file or even if I create a new file ending in .org.Any other ideas on how to get it working? All good things,Aaron



What's up with ob-template.el? It seems heavily outdated

2021-05-21 Thread dalanicolai
I am trying to improve org-babel support for maxima.
However, when starting from ob-template.el
,
which is advised in the section "develop support for new languages" in
the org-mode
docs , it
seems that the code within that template file is heavily incorrect.

I can write a whole list with "bugs", but it already starts with most of
the params in the `org-babel-execute` function getting processed
incorrectly.

So I am wondering, am I missing something here? Or is this documentation
just heavily outdated?

Would you be interested in some updated ob-template.el file?

You have any experience with adding language support? Then how did you
approach it?

Also, I could not really find a (recent) bug-report about this issue. So
nobody mentioned this before?

I can already find my way, using edebug and checking out other ob-...el
files. I am just interested in (and surprised about) the current situation
and why it is like that. And I am wondering if maybe there is some more
recent documentation available.

Thanks!


Re: new org-contrib and straight.el

2021-05-21 Thread No Wayman



Greg Minshall  writes:


Nick,
...i have not been getting the updated org-mode info
pages with my org package. 


Straight provides its own means of building/installing package 
info.

This may be a bug with the Org mode recipe we provide.
Please file a bug report at:

https://github.com/raxod502/straight.el

Be sure to include the output of `M-x straight-version` and `M-x 
emacs-version` at a minimum.


If you feel you have a reproduction case or recipe that works 
better, you can include

that recipe with a report using `straight-bug-report'.
It's a macro that will install straight in a clean environment,
run your code and produce a formatted report to share.




Re: [wip-cite-new] Initial implementation of `biblatex' citation processor

2021-05-21 Thread Nicolas Goaziou
Hello,

Denis Maier  writes:

> Just one thing I was asking myself: Will/should users be able to
> customize that?

I considered it too, when I was writing oc-biblatex. For example, custom
commands could be a list of entries like

  (STYLE BASE-NAME MULTICITE? NO-OPTIONAL?)

E.g.,

  ("my-style/with-a-specifc-variant" "coolcite-alt" t nil)
  ("my-style" "coolcite" t nil)
  ...

However, I think this is a bit premature. Style/variant syntax has not
"sedimented" yet, and the oc-biblatex library has (understandably) close
to 0 users at the moment.

We should strive to provide a broad enough out-of-the-box experience
first.

> The function that handles the export doesn't look to complicated after
> all.

Indeed! It's a wonder no one implemented it earlier. ;)

Regards,
-- 
Nicolas Goaziou



Re: [wip-cite-new] Initial implementation of `biblatex' citation processor

2021-05-21 Thread Bruce D'Arcus
On Fri, May 21, 2021 at 9:13 AM Nicolas Goaziou  wrote:

> > Also, not sure about the "full" sub-styles. Do those have an
> > equivalent in biblatex?
>
> This is not a bug report, but a suggestion for additional bindings,
> isn't it?

Yes; sorry :-)

> In any case, it sounds fine to me, but Denis Maier made a similar
> suggestion with the following table:
>
> So maybe we should try to converge first. Then, I'll happily implement
> the result!

Will do; thanks!

Bruce



Re: [wip-cite-new] Initial implementation of `biblatex' citation processor

2021-05-21 Thread Nicolas Goaziou
Hello,

"Bruce D'Arcus"  writes:

> On Tue, May 18, 2021 at 11:45 AM Nicolas Goaziou  
> wrote:
>
>> I didn't test it much so it probably contains silly bugs. Sorry about
>> that.
>
> OK, a simple bug report.
>
> cite/bare -> \cite (currently is autocite)
> cite/bare-caps -> \Cite (currently is autocite)
>
> Also, not sure about the "full" sub-styles. Do those have an
> equivalent in biblatex?

This is not a bug report, but a suggestion for additional bindings,
isn't it?

In any case, it sounds fine to me, but Denis Maier made a similar
suggestion with the following table:

| Style | Variant   | Command  |
|---+---+--|
| author| caps  | Citeauthor*  |
| author| full  | citeauthor   |
| author| caps-full | Citeauthor   |
| author|   | citeauthor   |
|---+---+--|
| title | full  | citetitle*   |
| title |   | citetitle|
|---+---+--|
| year  | full  | citeyear*|
| year  |   | citeyear |
|---+---+--|
| locators  | parens| pnotecite|
| locators  | parens-caps   | Pnotecite|
| locators  | foot  | fnotecite|
| locators  | caps  | Notecite |
| locators  |   | notecite |
|---+---+--|
| nocite|   | nocite   |
|---+---+--|
| note  | text  | footcitetext |
| note  |   | footcite |
|---+---+--|
| smart | caps  | Smartcite|
| smart |   | smartcite|
|---+---+--|
| super |   | supercite|
|---+---+--|
| foot  |   | footcite |
|---+---+--|
| text  | caps  | Textcite |
| text  |   | textcite |
|---+---+--|
| parens| noauthor-caps | Parencite*   |
| parens| noauthor  | parencite*   |
| parens| caps  | Parencite|
| parens|   | parencite|
|---+---+--|
| plain | noauthor-caps | Cite*|
| plain | noauthor  | cite*|
| plain | caps  | Cite |
| plain |   | cite |
|---+---+--|
| (default) | caps  | Autocite |
| (default) |   | autocite |

So maybe we should try to converge first. Then, I'll happily implement
the result!

Regards,
-- 
Nicolas Goaziou



Re: Custom <> possibility?

2021-05-21 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> so i am curious what the purpose of the default is?

I think the purpose of the default value is to offer a solution that
works for everyone. It is certainly not the best one in all situations.

For example, I heard that even in 2021, using full Unicode in a URL is
not good idea. Yet, some users may want to use Unicode symbols in
a target.

Regards,
-- 
Nicolas Goaziou



Re: Bug: Failed to render org file during first load on buffer emacs 27.1 windows binaries [9.3 (release_9.3 @ c:/ProgramFilesh/emacs-27.1-x86_64/share/emacs/27.1/lisp/org/)]

2021-05-21 Thread Ihor Radchenko
Aaron  writes:
> Any other ideas on how to get it working?

This is most likely something on your side. Sounds like some kind of
mixed installation. Are you able to run `emacs -Q` from command line?
How did you install Org mode?

Best,
Ihor



Re: [wip-cite-new] Initial implementation of `biblatex' citation processor

2021-05-21 Thread Bruce D'Arcus
On Tue, May 18, 2021 at 11:45 AM Nicolas Goaziou  wrote:

> I didn't test it much so it probably contains silly bugs. Sorry about
> that.

OK, a simple bug report.

cite/bare -> \cite (currently is autocite)
cite/bare-caps -> \Cite (currently is autocite)

Also, not sure about the "full" sub-styles. Do those have an
equivalent in biblatex?

If not, can also map to \cite or \Cite, depending.

Input:

1. [cite:@latexcompanion]
2. [cite/text:@latexcompanion]
3. [cite/text/caps:@latexcompanion]
4. [cite/text/caps-full:@latexcompanion]
5. [cite/bare:@latexcompanion]
6. [cite/bare-full:@latexcompanion]
7. [cite/bare-caps:@latexcompanion]

Current output:

\item \autocite{latexcompanion}
\item \textcite{latexcompanion}
\item \Textcite{latexcompanion}
\item \textcite{latexcompanion}
\item \autocite{latexcompanion}
\item \autocite{latexcompanion}
\item \autocite{latexcompanion}

Bruce



Re: [PATCH] org-faq.org: Expand "What is the best setup for indenting?"

2021-05-21 Thread Bastien
Hi Maxim,

Maxim Nikulin  writes:

> Intermediate patch is attached.

Applied to worg, thanks!

-- 
 Bastien