Re: [Q] Is there a convention for the formatting of messages in this mailing list?

2021-09-24 Thread Jonathan McHugh
Hi Rodrigo



September 25, 2021 1:34 AM, "Rodrigo Morales"  
wrote:

> Let's suppose I want to create a thread in the mailing list that
> contains different sections, code blocks and some quotes. I used to use
> Org Mode for the format in my messages, but I just read a discussion
> where someone mentioned that getting the Org Mode and Org Babel syntax
> in the mailing list is annoying.
> 
> Because of this, I had some questions
> 
> 1. Is there some kind of convention for the formatting of the messages
> in this mailing list?

> 2. If that's not the case, which one should I use (Org Mode, the
> built-in ASCII exporter, Markdown, HTML)?

May I mention that the Gemini protocol has a very terse and minimal format, 
GemText? Ive been content switching to it and I havent notice friction on Guix 
mailinglist(s), where I and others have utilised it.
=> https://gemini.circumlunar.space/docs/gemtext.gmi

There are some orgmode importers and exporters floating around fyi.


Jonathan McHugh
indieterminacy@libre.brussels



Re: [PATCH] Include support for evaluating julia code

2021-09-24 Thread Greg Minshall
Timothy, Pedro,

would it make sense to consider Pedro's patch as being against the one
in org-contrib?  (i'm not sure how such patches work.)

cheers, Greg



[Q] Is there a convention for the formatting of messages in this mailing list?

2021-09-24 Thread Rodrigo Morales


Let's suppose I want to create a thread in the mailing list that
contains different sections, code blocks and some quotes. I used to use
Org Mode for the format in my messages, but I just read a discussion
where someone mentioned that getting the Org Mode and Org Babel syntax
in the mailing list is annoying.

Because of this, I had some questions

1. Is there some kind of convention for the formatting of the messages
   in this mailing list?
2. If that's not the case, which one should I use (Org Mode, the
   built-in ASCII exporter, Markdown, HTML)?



Bug: org-element-map doesn't consider all links in the current buffer [9.4.4 (release_9.4.4 @ /usr/share/emacs/27.2/lisp/org/)]

2021-09-24 Thread Rodrigo Morales


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

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

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


* Introduction

This bug report show examples where it is noticeable that =org-element-map=, 
when =link= is the value for the =TYPES= argument, doesn't consider all links 
in the current buffer.

* Examples without errors
:PROPERTIES:
:CREATED: [2021-09-24 13:23:45 -05]
:END:

This section show examples where =org-element-map= correctly iterates through 
all links.

The following is an example.

#+begin_src elisp
(let ((lines '("|---|"
   "| [[https://link1.com]] |"
   "| [[https://link2.com]] |"
   "| [[https://link3.com]] |"
   "|---|")))
  (with-temp-buffer
(org-mode)
(insert (string-join lines "\n"))
(org-element-map (org-element-parse-buffer)
'link
  (lambda (link) (org-element-property :raw-link link)
#+end_src

#+RESULTS:
#+begin_example
("https://link1.com"; "https://link2.com"; "https://link3.com";)
#+end_example

The following is another example.

#+begin_src elisp
(let ((lines '("#+BEGIN_QUOTE"
"[[https://link1.org]]";
"#+END_QUOTE")))
  (with-temp-buffer
(org-mode)
(insert (string-join lines "\n"))
(org-element-map (org-element-parse-buffer)
'link
  (lambda (link) (org-element-property :raw-link link)
#+end_src

#+RESULTS:
#+begin_example
("https://link1.org";)
#+end_example

The following is another example.

#+begin_src elisp
(let ((lines '("This is [[https://link1.com][a link]]"
   "#+BEGIN_SRC python"
   "print('[[https://link2.com][a link]]')"
   "#+END_SRC"
   "This is [[https://link3.com][a link]]")))
  (with-temp-buffer
(org-mode)
(insert (string-join lines "\n"))
(org-element-map (org-element-parse-buffer)
'link
  (lambda (link) (org-element-property :raw-link link)
#+end_src

#+RESULTS:
#+begin_example
("https://link1.com"; "https://link3.com";)
#+end_example

* Examples with errors
:PROPERTIES:
:CREATED: [2021-09-24 13:24:03 -05]
:END:

This section show examples where =org-element-map= doesn't iterate through all 
links in the buffer.

The following is an example. Links in properties drawers are not considered. I 
expect those links to be considered.

#+begin_src elisp
(let ((lines '("* John Doe"
   ":PROPERTIES:"
   ":ONE: [[https://link1.com]]";
   ":TWO: [[https://link2.com]]";
   ":END:"
   "[[https://link3.com]]";)))
  (with-temp-buffer
(org-mode)
(insert (string-join lines "\n"))
(org-element-map (org-element-parse-buffer)
'link
  (lambda (link) (org-element-property :raw-link link)
#+end_src

#+RESULTS:
#+begin_example
("https://link3.com";)
#+end_example


The following is another example.

The link in the =#+TITLE= line is not considered. I expect that links to be 
considered.

#+begin_src elisp
(let ((lines '("#+TITLE: A line with [[https://link1.com][a]] link"
   ""
   "[[https://link2.com]]";)))
  (with-temp-buffer
(org-mode)
(insert (string-join lines "\n"))
(org-element-map (org-element-parse-buffer)
'link
  (lambda (link) (org-element-property :raw-link link)
#+end_src

#+RESULTS:
#+begin_example
("https://link2.com";)
#+end_example

The following is another example.

In general, links in keyword lines (i.e. those starting with =#+=) are not 
considered. I expect those links to be considered.

#+begin_src elisp
(let ((lines '("#+TITLE: A line with [[https://link1.com][a link]]"
   "#+SUBTITLE: A line with [[https://link2.com][a link]]"
   "#+AUTHOR: A line with [[https://link3.com][a link]]"
   "#+SUBAUTHOR: A line with [[https://link4.com][a link]]"
   ""
   "A simple paragraph with [[https://link5.com][a link]]")))
  (with-temp-buffer
(org-mode)
(insert (string-join lines "\n"))
(org-element-map (org-element-parse-buffer)
'link
  (lambda (link) (org-element-property :raw-link link)
#+end_src

#+RESULTS:
#+begin_example
("https://link5.com";)
#+end_example

* Personal thoughts
:PROPERTIES:
:CREATED: [2021-09-24 17:41:12 -05]
:END:

I think that links in properties drawers and keyword lines should be considered 
by =org-element-map= because there are use cases for having links at these 
locations. I will mention a use case for each context

** Links in property drawers
:PROPERTIES:
:CREATED: [2021-09-24 17:49:32 -05]
:END:

For storing contacts' information

#+BEGIN_SRC org
,* John Doe
:PROPERTIES:
:LANGUAGE_NATIVE: SPA
:LANGUAGE_FLUENT: ENG
:PERSONAL_SITE: https://www.

Re: S-M-{,} on CLOCK timestamp

2021-09-24 Thread Tim Cross


Timothy  writes:

> Hi Tim,
>
> Jorge P. de Morais Neto  writes:
>
>> I am sorry, my description of the initial condition was incomplete.  To
>> reproduce the problem, you cannot simply copy the provided text to an
>> Org buffer.  You should create the clock timestamps with actual clocking
>> commands.  So please do the following:
>
>> *snip*
>
> Have you had a chance to try reproducing this again?
>

I'm now confused over this bug report. Originally, two similar bugs were
reported at the same time. I was able to confirm one and not the other.
The added instructions seem to be a hybrid of the two bug reports, so
I'm now confused and not sure on what was the precise bug for the second
report. Based on what I *think* was the second bug, I cannot reproduce
it, but I have little confidence in that.




Bug: Indenting empty description list item leaves point at beginning of line [9.4.4]

2021-09-24 Thread Bodertz


See this example plain list, where point is represented by :


- list item
- Indent the empty list item below by pressing M-
- 


After pressing M- as asked, the list will look like this:


- list item
- Indent the empty list item below by pressing M-
  - 


As you can see, point is after the dash.



Next see this example description list:


- list item  :: with description
- Indent the empty list item below by pressing M- :: description
-  :: 


After pressing M- as asked, the list will look like this:


- list item  :: with description
- Indent the empty list item below by pressing M- :: description
 - ::


As you can see, point is at the beginning of the line.  I think it
should be after the dash, as is the case when indenting plain list
items.


Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, 
cairo version 1.16.0)
Package: Org mode version 9.4.4 (release_9.4.4 @ 
/gnu/store/qbd7y4jm3lp1sgzyl6b8cqcf8hb3w1wz-emacs-pgtk-native-comp-28.0.50-203.92bc69e/share/emacs/28.0.50/lisp/org/)



Re: [PATCH] Include support for evaluating julia code

2021-09-24 Thread Pedro Bruel
Hi Timothy,

Thanks for the reply! I am submitting a modded version the of the original
ob-julia.el, where I had fixed the bugs I encountered and updated the
interface with org-mode.
I've been using the version on https://github.com/phrb/ob-julia for a while
now, mainly to write programming classes using julia.

Yours and Nicolò's version seems good though, I think you should submit it
when you consider it ready. In the meantime, what do we do?

Thanks,
Pedro

Le ven. 24 sept. 2021 à 17:08, Timothy  a écrit :

> Hi Pedro,
>
> Thanks for your patch, it’s great to see the interest in Julia support and
> it’s something that I absolutely think should be in org-core 🙂. However,
> ob-julia.el was moved into org-contrib because it was not well maintained,
> and very buggy. I’m actually currently working on a successor with Nicolò
> (see the linked repo) in my free time, and intend to submit that to Org
> when I feel it is mature enough. See https://github.com/nico202/ob-julia/
> for more information.
>
> All the best,
> *Timothy*
>
> * From*: Pedro Bruel <%22pedro+bruel%22+%3cpedro.br...@gmail.com%3E>
> * Subject*: [PATCH] Include support for evaluating julia code
> * To*: Org-mode <%22org-mode%22+%3cemacs-orgm...@gnu.org%3E>
> * Date*: Sat, 25 Sep 2021 03:56:43 +0800
> Hi,
>
> This patch includes ob-julia.el from org-contrib, and a tentative
> test-ob-julia.el test file.
> This is my first attempt at a patch, so please let me know if there's
> anything wrong!
>
> Thanks,
> Pedro
>
>
>


Re: [PATCH] Include support for evaluating julia code

2021-09-24 Thread Timothy
Hi Pedro,

Thanks for your patch, it’s great to see the interest in Julia support and it’s
something that I absolutely think should be in org-core 🙂. However, ob-julia.el
was moved into org-contrib because it was not well maintained, and very buggy.
I’m actually currently working on a successor with Nicolò (see the linked repo)
in my free time, and intend to submit that to Org when I feel it is mature
enough. See  for more information.

All the best,
Timothy


[PATCH] Include support for evaluating julia code

2021-09-24 Thread Pedro Bruel
Hi,

This patch includes ob-julia.el from org-contrib, and a tentative
test-ob-julia.el test file.
This is my first attempt at a patch, so please let me know if there's
anything wrong!

Thanks,
Pedro
From c002f541cad175573b102720e3880ba98d05bf67 Mon Sep 17 00:00:00 2001
From: Pedro Bruel 
Date: Fri, 24 Sep 2021 16:31:40 -0300
Subject: [PATCH] Include support for evaluating julia code

* lisp/ob-julia.el: included from org-contrib
* testing/lisp/test-ob-julia.el: start adapting from testing/lisp/test-ob-python.el
---
 lisp/ob-julia.el  | 344 ++
 testing/lisp/test-ob-julia.el | 274 +++
 2 files changed, 618 insertions(+)
 create mode 100644 lisp/ob-julia.el
 create mode 100644 testing/lisp/test-ob-julia.el

diff --git a/lisp/ob-julia.el b/lisp/ob-julia.el
new file mode 100644
index 0..cbc58d665
--- /dev/null
+++ b/lisp/ob-julia.el
@@ -0,0 +1,344 @@
+;;; ob-julia.el --- org-babel functions for julia code evaluation
+
+;; Copyright (C) 2013, 2014, 2021 G. Jay Kerns
+;; Authors: G. Jay Kerns, based on ob-R.el by Eric Schulte and Dan Davison
+;; Maintainer: Pedro Bruel 
+;; Keywords: literate programming, reproducible research, scientific computing
+;; Homepage: https://github.com/phrb/ob-julia
+
+;; This file is not part of GNU Emacs.
+
+;; 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 .
+
+;;; Commentary:
+
+;; Org-Babel support for evaluating julia code
+
+;;; Code:
+(require 'cl-lib)
+(require 'ob)
+
+(declare-function orgtbl-to-csv "org-table" (table params))
+(declare-function julia "ext:ess-julia" (&optional start-args))
+(declare-function inferior-ess-send-input "ext:ess-inf" ())
+(declare-function ess-make-buffer-current "ext:ess-inf" ())
+(declare-function ess-eval-buffer "ext:ess-inf" (vis))
+(declare-function ess-wait-for-process "ext:ess-inf"
+		  (&optional proc sec-prompt wait force-redisplay))
+
+(defvar org-babel-header-args:julia
+  '((width		 . :any)
+(horizontal		 . :any)
+(results . ((file list vector table scalar verbatim)
+			(raw org html latex code pp wrap)
+			(replace silent append prepend)
+			(output value graphics
+  "julia-specific header arguments.")
+
+(add-to-list 'org-babel-tangle-lang-exts '("julia" . "jl"))
+
+(defvar org-babel-default-header-args:julia '())
+
+(defcustom org-babel-julia-command "julia"
+  "Name of command to use for executing julia code."
+  :version "24.3"
+  :package-version '(Org . "8.0")
+  :group 'org-babel
+  :type 'string)
+
+(defvar ess-current-process-name) ; dynamically scoped
+(defvar ess-local-process-name) ; dynamically scoped
+(defun org-babel-edit-prep:julia (info)
+  (let ((session (cdr (assq :session (nth 2 info)
+(when (and session
+	   (string-prefix-p "*"  session)
+	   (string-suffix-p "*" session))
+  (org-babel-julia-initiate-session session nil
+
+(defun org-babel-expand-body:julia (body params &optional _graphics-file)
+  "Expand BODY according to PARAMS, return the expanded body."
+  (mapconcat 'identity
+	 (append
+	  (when (cdr (assq :prologue params))
+		(list (cdr (assq :prologue params
+	  (org-babel-variable-assignments:julia params)
+	  (list body)
+	  (when (cdr (assq :epilogue params))
+		(list (cdr (assq :epilogue params)
+	 "\n"))
+
+(defun org-babel-execute:julia (body params)
+  "Execute a block of julia code.
+This function is called by `org-babel-execute-src-block'."
+  (save-excursion
+(let* ((result-params (cdr (assq :result-params params)))
+	   (result-type (cdr (assq :result-type params)))
+   (session (org-babel-julia-initiate-session
+		 (cdr (assq :session params)) params))
+	   (graphics-file (and (member "graphics" (assq :result-params params))
+			   (org-babel-graphical-output-file params)))
+	   (colnames-p (unless graphics-file (cdr (assq :colnames params
+	   (rownames-p (unless graphics-file (cdr (assq :rownames params
+	   (full-body (org-babel-expand-body:julia body params graphics-file))
+	   (result
+	(org-babel-julia-evaluate
+	 session full-body result-type result-params
+	 (or (equal "yes" colnames-p)
+		 (org-babel-pick-name
+		  (cdr (assq :colname-names params)) colnames-p))
+	 (or (equal "yes" rownames-p)
+		 (org-babel-pick-name
+		  (cdr (assq :rowname-names params)) rownames-p)
+  

Re: [PATCH] Fix some typos

2021-09-24 Thread Juan Manuel Macías
I attach a patch with Shakespeare's sonnet completely fixed: the poem is
replaced by the version included in Wikipedia (Shakespeare, William.
Duncan-Jones, Katherine. Shakespeare’s Sonnets. Bloomsbury Arden 2010.
p. 113). I also removed a spurious phrase that I put in that patch
(Org-News).

Best regards,

Juan Manuel

Loris Bennett writes:

> Max Nikulin  writes:
>
>> On 23/09/2021 03:18, Juan Manuel Macías wrote:
>>> Max Nikulin writes:
>>>
 However there is namely "memory" in the "1609 Quarto", see e.g.
 https://en.wikipedia.org/wiki/Sonnet_1 Web pages with the same variant
 as in the Org manual do not mention the source (particular edition). I
 hope, I just do not know what is considered as the canonical variant
 for not so old language.
>>>
>>> I am not an expert on Shakespeare's poetry either, but as the author of
>>> the patch where Sonnet 1 is included, I can say that 'memeory' is a typo
>>> (sorry). At least I didn't use that word intentionally. I don't know if
>>> there is any textual variant 'memeory', but in my case it is nothing
>>> more than a simple typo :-).
>>
>> Then "mught" should be another typo.
>>
>> "His tender heire might beare his memory:" - 1609 Quatro
>
> I think "Quatro" is another typo and should be "Quarto" (unless there
> is a typo in the date and it is a line from little-know song by Suzi ...)
>
>> "His tender heir might bear his memory:" - Wikipedia citing Shakespeare,
>> William. Duncan-Jones, Katherine. Shakespeare’s Sonnets. Bloomsbury Arden
>> 2010. p. 113 ISBN 9781408017975
>>
>> "His tender heir mught bear his memeory:" - some web pages and Org manual.
>>
>>

>From f2e09b5e50a08b409e5f48df59dffbb36e9677ac Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias 
Date: Fri, 24 Sep 2021 13:58:30 +0200
Subject: [PATCH] org-manual.org, ORG-NEWS: fix Shakespeare' sonnet and another
 typo
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* doc/org-manual.org (Verse blocks in LaTeX export): The previous
version of Shakespeare's sonnet is replaced by the version included in
Wikipedia (Shakespeare, William. Duncan-Jones, Katherine. Shakespeare’s
Sonnets. Bloomsbury Arden 2010. p. 113)
* etc/ORG-NEWS (Support verse blocks in LaTeX export): The last
sentence is superfluous. There is no explanation below.
---
 doc/org-manual.org | 17 +
 etc/ORG-NEWS   |  3 +--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index b5de85cc9..ba396e205 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13897,24 +13897,25 @@ explained below.
 - =:latexcode= :: It accepts any arbitrary LaTeX code that can be
   included within a LaTeX =verse= environment.
 
-A complete example with Shakespeare's first sonnet:
+A complete example with Shakespeare's first sonnet (source:
+[[https://en.wikipedia.org/wiki/Sonnet_1]]):
 
 #+begin_src org
 ,#+ATTR_LATEX: :center t :latexcode \color{red} :lines 5
-,#+ATTR_LATEX: :versewidth Feed’st thy light’st flame with self-substantial fuel,
+,#+ATTR_LATEX: :versewidth Feed’st thy light’s flame with self-substantial fuel,
 ,#+BEGIN_VERSE
 From fairest creatures we desire increase,
 That thereby beauty’s rose might never die,
-But as the riper should by time decrease,
-His tender heir mught bear his memeory:
+But as the riper should by time decease
+His tender heir might bear his memory:
 But thou, contracted to thine own bright eyes,
-Feed’st thy light’st flame with self-substantial fuel,
+Feed’st thy light’s flame with self-substantial fuel,
 Making a famine where abundance lies,
 Thyself thy foe, to thy sweet self too cruel.
-Thou that art now the world’s fresh ornament
+Thou that art now the world’s fresh ornament,
 And only herald to the gaudy spring,
-Within thine own bud buriest thy content
-And, tender churl, makest waste in niggarding.
+Within thine own bud buriest thy content,
+And, tender churl, mak’st waste in niggardly.
 Pity the world, or else this glutton be,
 To eat the world’s due, by the grave and thee.
 ,#+END_VERSE
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 7a46e825b..9a674cc04 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -254,8 +254,7 @@ that Org mode configures LaTeX to process any new float type.
 The LaTeX export back-end accepts four attributes for verse blocks:
 =:lines=, =:center=, =:versewidth= and =:latexcode=. The three first
 require the external LaTeX package =verse.sty=, which is an extension
-of the standard LaTeX environment. The purpose of these attributes is
-explained below.
+of the standard LaTeX environment.
 
 *** Support quote blocks in LaTeX export
 
-- 
2.32.0



Re: [Worg] Proposing a few CSS changes

2021-09-24 Thread Eric S Fraga
On Thursday, 23 Sep 2021 at 21:37, Adam Porter wrote:
> The changes are simply removing some rules, which allows the user's
> configured browser font settings to be applied, as well as setting the
> max-width of the content to 60em.  

I fully support this.  Specifying font sizes is never a good idea.

-- 
: Eric S Fraga via Emacs 28.0.50, Org 9.5-dev-g4271f2
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: Switching to new Git repositories

2021-09-24 Thread Eric S Fraga
On Thursday, 23 Sep 2021 at 14:06, William Denton wrote:
> Error (use-package): org/:catch: Invalid version syntax: ‘9.5-dev’

Minor aside: this version number causes problems with org-caldav-sync as
well.  It doesn't enable "(version< ...)" and related to work properly.

-- 
: Eric S Fraga via Emacs 28.0.50, Org 9.5-dev-g4271f2
: Latest paper written in org: https://arxiv.org/abs/2106.05096