Re: Failing tests

2020-04-20 Thread Kyle Meyer
Marco Wahl  writes:

> When building with "make test" I get
>
> #v+
> 2 unexpected results:
>FAILED  ob-tangle/jump-to-org
>FAILED  test-org-attach/dir
> #v-
>
> does this ring a bell for anybody?

FWIW I don't see either failure on my end (Emacs 26.3).  Do they fail
for you consistently?



Re: Bug: Weird error message whenever creating org file [8.2.5h (8.2.5h-elpa @ /Users/kevin/.emacs.d/elpa/org-20140130/)]

2020-04-20 Thread Kyle Meyer
Kevin Van Horn  writes:

> Whenever I create a new *.org file, I get this error message:
>
> File mode specification error: (error "'recenter'ing a window that does
> not display current-buffer.")

This will be tricky for others to debug without a minimal config to
trigger it.  For debugging on your end, you could find out where the
error is happening by setting debug-on-error to t and looking at the
backtrace.



Re: Subject: [PATCH] org-id: Allow file name to be overridden on ID creation

2020-04-20 Thread Kyle Meyer
Kyle Meyer  writes:

> Subject: [PATCH] org-id: Allow file name to be overridden on ID creation

Applied (c716b7c08).



Re: [PATCH] Fix typo in doc

2020-04-20 Thread Kyle Meyer
Leo Vivier  writes:
> Subject: [PATCH] * lisp/org.el (org-mode-map): fix typo

Thanks.  Applied with minor commit message tweaks in 41fe01086.



Re: [PATCH] Re: Inconsistent use of \ref and \eqref in ox-latex and ox-html

2020-04-20 Thread Brian Powell

Thanks again. Please find attached patch addressing issues below.

Cheers,
Brian


On Mon, Apr 20 2020, Nicolas Goaziou wrote:

>> Subject: [PATCH] add org-html-equation-reference-format to customize MathJax
>>  ref command
>
> The commit message should reference the file being modified. I suggest
> something along the lines:
>
> Add customizable format string for equations
>
> * lisp/ox-html.el (org-html-equation-reference-format): New variable.

updated

>> +(defcustom org-html-equation-reference-format "\\eqref{%s}"
>> +  "MathJax command to use when referencing equations. This is a
>> +format controls string, expecting a single argument, the equation
>> +being referenced that is generated on export.
>
> Small nit here. The first line of a docstring must contain complete
> sentences only. Therefore you need to move "This is a" part to the line
> below.
>
> Also : controls -> control
>
> Otherwise, it looks good! Could you provide an entry in ORG-NEWS about
> it? I think Version 9.4 > Miscellaneous is a fine place for it.

Done and done.

>From f3a8e7d99a390c6dd965f347d95f35780e7d3a77 Mon Sep 17 00:00:00 2001
From: Brian Powell 
Date: Mon, 20 Apr 2020 09:49:12 -1000
Subject: [PATCH] Add customizable format string for equations in HTML export

* lisp/ox-html.el (org-html-equation-reference-format): New variable.
* doc/org-manual.org update to reference new variable
---
 doc/org-manual.org |  1 +
 etc/ORG-NEWS   |  9 +
 lisp/ox-html.el| 25 ++---
 3 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 6d5a34e56..4b1a14ef4 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -15851,6 +15851,7 @@ Settings]]), however, override everything.
 | ~:html-link-use-abs-url~   | ~org-html-link-use-abs-url~   |
 | ~:html-mathjax-options~| ~org-html-mathjax-options~|
 | ~:html-mathjax-template~   | ~org-html-mathjax-template~   |
+| ~:html-equation-reference-format~  | ~org-html-equation-reference-format~  |
 | ~:html-metadata-timestamp-format~  | ~org-html-metadata-timestamp-format~  |
 | ~:html-postamble-format~   | ~org-html-postamble-format~   |
 | ~:html-postamble~  | ~org-html-postamble~  |
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index f6f806b8f..fbee0124d 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -384,6 +384,15 @@ now. E.g.,
 This bug [[https://lists.gnu.org/archive/html/emacs-orgmode/2013-08/msg00072.html][originally reported]] by Matt Lundin and investigated by Andrew
 Hyatt has been fixed.  Thanks to both of them.
 
+*** Format of equation reference in HTML export can be specified
+
+By default, HTML (via MathJax) and LaTeX export equation references
+using different commands. LaTeX must use \ref{%s} because it is used
+for all labels; however, HTML (via MathJax) uses \eqref{%s} for equations
+producing inconsistent output. New option
+~org-html-equation-reference-format~ sets the command used in
+HTML export.
+
 * Version 9.3
 
 ** Incompatible changes
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index e70b8279b..266467345 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -121,6 +121,7 @@
 (:html-link-home "HTML_LINK_HOME" nil org-html-link-home)
 (:html-link-up "HTML_LINK_UP" nil org-html-link-up)
 (:html-mathjax "HTML_MATHJAX" nil "" space)
+(:html-equation-reference-format "HTML_EQUATION_REFERENCE_FORMAT" nil org-html-equation-reference-format t)
 (:html-postamble nil "html-postamble" org-html-postamble)
 (:html-preamble nil "html-preamble" org-html-preamble)
 (:html-head "HTML_HEAD" nil org-html-head newline)
@@ -761,6 +762,24 @@ The function should return the string to be exported."
 
  LaTeX
 
+(defcustom org-html-equation-reference-format "\\eqref{%s}"
+  "The MathJax command to use when referencing equations.
+
+This is a format control string that expects a single string argument
+specifying the label that is being referenced. The argument is
+generated automatically on export.
+
+The default is to wrap equations in parentheses (using \"\\eqref{%s}\)\".
+
+Most common values are:
+
+  \"\\eqref{%s}\"Wrap the equation in parentheses
+  \"\\ref{%s}\"  Do not wrap the equation in parentheses"
+  :group 'org-export-html
+  :package-version '(Org . "9.4")
+  :type 'string
+  :safe t)
+
 (defcustom org-html-with-latex org-export-with-latex
   "Non-nil means process LaTeX math snippets.
 
@@ -3113,9 +3132,9 @@ INFO is a plist holding contextual information.  See
 (eq 'latex-environment (org-element-type destination))
 (eq 'math (org-latex--environment-type destination)))
;; Caption and labels are introduced within LaTeX
-	  

Re: [PATCH] Re: Inconsistent use of \ref and \eqref in ox-latex and ox-html

2020-04-20 Thread Nicolas Goaziou
Hello,

Brian Powell  writes:

> Nicolas, thank you for the feedback, and I apologize for my errors.

No need to apologize! Peer review is about catching the mistakes we all
do.

> I have corrected the issues below and generated a commit patch attached. 
> Please let me know if there are any problems.

Thank you! I have some more work for you, if you don't mind ;)

> Subject: [PATCH] add org-html-equation-reference-format to customize MathJax
>  ref command

The commit message should reference the file being modified. I suggest
something along the lines:

Add customizable format string for equations

* lisp/ox-html.el (org-html-equation-reference-format): New variable.

> +(defcustom org-html-equation-reference-format "\\eqref{%s}"
> +  "MathJax command to use when referencing equations. This is a
> +format controls string, expecting a single argument, the equation
> +being referenced that is generated on export.

Small nit here. The first line of a docstring must contain complete
sentences only. Therefore you need to move "This is a" part to the line
below.

Also : controls -> control

Otherwise, it looks good! Could you provide an entry in ORG-NEWS about
it? I think Version 9.4 > Miscellaneous is a fine place for it.

Regards,

-- 
Nicolas Goaziou



Re: issue indent src block?

2020-04-20 Thread Nicolas Goaziou
Hello,

zimoun  writes:

> I have noted unexpected alignment with source blocks. For example:
>
> --8<---cut here---start->8---
> #+begin_src shell
> 0
> #+end_src
>
> * One
>
>   #+begin_src shell
>   1
>   #+end_src
>
> ** Two
>
>#+begin_src shell
>2
>#+end_src
> --8<---cut here---end--->8---
>
> where the blocks are filled using the usual C-c '.
>
> I was expecting that 0, 1 and 2 aligned with the 'b' of 'begin'.
> And if I move them by hand and them hit C-x h and Tab, they are placed
> again as in the example above.

I cannot reproduce it. You may want to check if something is setting
`org-edit-src-content-indentation' to 0, e.g., .dir-locals.el or some
such.

Regards,

-- 
Nicolas Goaziou



issue indent src block?

2020-04-20 Thread zimoun
Dear,
(please CC me because I have not subscribed)


I have noted unexpected alignment with source blocks. For example:

--8<---cut here---start->8---
#+begin_src shell
0
#+end_src

* One

  #+begin_src shell
  1
  #+end_src

** Two

   #+begin_src shell
   2
   #+end_src
--8<---cut here---end--->8---

where the blocks are filled using the usual C-c '.

I was expecting that 0, 1 and 2 aligned with the 'b' of 'begin'.
And if I move them by hand and them hit C-x h and Tab, they are placed
again as in the example above.


Is this alignment expected?
Do I misconfigure something? Even if I reproduce the behaviour with "emacs -q".


Emacs 26.3 and Org 9.3.6 comes from Guix
de5200ada9932501dbe010990ed1acf7688846a6.


Thank you in advance for any comment.

All the best,
simon



Re: links to _archive file not opened internally

2020-04-20 Thread Michael Maurer
Figured it out, had to set org-file-apps accordingly. Realized I don't
remember if _archive is the common nomenclature for archived
org-files, or if I set that.

On Mon, 20 Apr 2020 at 09:37, Michael Maurer  wrote:
>
> I'm trying to create a link to a _archive file, but every time I click
> it, Windows shows me the dialogue box for opening it in an external
> app. Is this something I have to change on a Windows-level, within
> .emacs, or both?



Re: babel/noweb concatenation of equally-named code blocks fails?

2020-04-20 Thread Nicolas Goaziou
Hello,

Greg Minshall  writes:

> thanks for the history!  sounds like a good tradeoff.  i agree, a bit
> more documentation would be good.

I sligthly reworded Noweb references section in the manual. Please let
me know if that is clearer.

Regards,

-- 
Nicolas Goaziou



Re: Bug: org-table-insert-column edits formulas wrongly [9.3 (release_9.3 @ /usr/local/Cellar/emacs-plus/HEAD-9d38564/share/emacs/28.0.50/lisp/org/)]

2020-04-20 Thread Eric S Fraga
On Saturday, 18 Apr 2020 at 16:30, Marco Wahl wrote:
> Indeed, why not?  I pushed a respective change.  I introduced a subtlety
> when deleting from the rightmost column or from immediately right of the
> table.  That was not needed with point moving to the left, as it has
> been before.

This works very well.  Thank you.  I hope others are okay with this
change.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-520-ge69937



links to _archive file not opened internally

2020-04-20 Thread Michael Maurer
I'm trying to create a link to a _archive file, but every time I click
it, Windows shows me the dialogue box for opening it in an external
app. Is this something I have to change on a Windows-level, within
.emacs, or both?