Re: [PATCH] Enhance org-html--build-meta-info

2020-12-19 Thread TEC


Jens Lechtenboerger  writes:

>> For people who want to customise this to add metadata, the page title is
>> something they're probably interested in.
>
> What metadata would you derive from the title?

In my earlier example, I use the "og:title" property.

>> If so, I think it's work giving the title processed by
>> org-html--build-meta-info as it's not so simple as
>> (plist-get info :title).
>
> Extracting it from ~info~ might be more flexible as it would not be
> tied to the current implementation.

My thoughts are just that its seems like title/author may be handy, and
we've already worked those out, so why not just pass them along?

Could probably reduce to just info, not sure what's best though.

Other than this, is there anything else you think might be worth
considering before merging?

--
Timothy



Re: [PATCH] Enhance org-html--build-meta-info

2020-12-19 Thread TEC


Jens Lechtenboerger  writes:

>> For people who want to customise this to add metadata, the page title is
>> something they're probably interested in.
>
> What metadata would you derive from the title?

In my earlier example, I use the "og:title" property.

>> If so, I think it's work giving the title processed by
>> org-html--build-meta-info as it's not so simple as
>> (plist-get info :title).
>
> Extracting it from ~info~ might be more flexible as it would not be
> tied to the current implementation.

My thoughts are just that its seems like title/author may be handy, and
we've already worked those out, so why not just pass them along?

Could probably reduce to just info, not sure what's best though.

Other than this, is there anything else you think might be worth
considering before merging?

--
Timothy



Re: org-mime: markdown not html

2020-12-19 Thread Tim Cross


Uwe Brauer  writes:

> Hi
>
> Does anybody know a package which would allow, using say gnus, to
> markdown-ise an email, that would be useful for sending email to github
> issues.
>

No, sorry. I'm, also not sure Github will accept such MIME emails as an
issue. I think only plain text is supported (I'm not sure they even
support HTML for issue emails)

--
Tim Cross



org-mime: markdown not html

2020-12-19 Thread Uwe Brauer


Hi

Does anybody know a package which would allow, using say gnus, to 
markdown-ise an email, that would be useful for sending email to github
issues.

Thanks

Regards

Uwe Brauer 




Re: Bug: Babel+R handles spaces wrongly in tables [9.3.6 (release_9.3.6 @ /home/cassou/.emacs.d/lib/org/lisp/)]

2020-12-19 Thread Jeremie Juste
Hello,

Apologies for the late reply and thanks for pointing out this bug.
|| On Sunday,  6 Sep 2020 at 13:32, Damien Cassou wrote:

#+name: table
| | 2014 |
|-+--|
| A C |1 |
| C   |2 |

#+name: linechart
#+begin_src R :results value :var accounts="" :exports none
length(accounts)
#+end_src

#+call: linechart(accounts=table[,0])

#+RESULTS:
: 3

Currently there are no support for vectors. So it is either a
data.frame or an object of length 1. 

|| On Sun, 06 Sep 2020 18:23:19  Berry, Charles" wrote
> Actually the length should be 1, i.e. a data.frame with a single column of 
> two elements.

Indeed with the current handling the length should be 1 but it is
not. Even with the previous case solved, it might still be an
unexpected behavior for a typical R user who would expect a vector. Do you
think it is reasonable?

The following patch will at least harmonize the results towards the
data.frame. 

diff --git a/lisp/ob-R.el b/lisp/ob-R.el
index 420b8ccbc..81693d157 100644
--- a/lisp/ob-R.el
+++ b/lisp/ob-R.el
@@ -236,11 +236,11 @@ This function is called by `org-babel-execute-src-block'."
 (defun org-babel-R-assign-elisp (name value colnames-p rownames-p)
   "Construct R code assigning the elisp VALUE to a variable named NAME."
   (if (listp value)
-  (let* ((value (if (listp (car value)) value (list value)))
-(lengths (mapcar 'length (cl-remove-if-not 'sequencep value)))
+  (let* ((lengths (mapcar 'length (cl-remove-if-not 'sequencep value)))
 (max (if lengths (apply 'max lengths) 0))
 (min (if lengths (apply 'min lengths) 0)))
 ;; Ensure VALUE has an orgtbl structure (depth of at least 2).
+(unless (listp (car value)) (setq value (list value)))
(let ((file (orgtbl-to-tsv value '(:fmt org-babel-R-quote-tsv-field)))
  (header (if (or (eq (nth 1 value) 'hline) colnames-p)
  "TRUE" "FALSE"))


so the following will return a data.frame

#+begin_src R :results output :var accounts=(identity '("A B" "C")) 
print(accounts)
#+end_src

#+RESULTS:
:V1 V2
: 1 A B  C


I will add support for selection of 1 single column as a
vector soon.

Best regards,
Jeremie

PS: I am a newbie maintainer so feel free to comment if there you find
room for improvements ;-)



Re: LaTeX fragments not being generated due to extra * in tikz env

2020-12-19 Thread Jeremie Juste
Hello Thibault,

Many thanks. This looks like a reasonable trade off for me.

Best regards,
Jeremie
On Thursday, 17 Dec 2020 at 19:30, Thibault Marin wrote:
> Hi,
>
> I introduced the change that broke the behavior.  The attached patch
> seems to fix the issue for me, does it look reasonable?
>
> Thanks,
>
> thibault
>
> On 2020-12-09T13:16:19-0500, Jeremie Juste wrote:
>
>   Hello,
>
>   Thanks for reporting. Indeed this is an issue that hasn't been fixed
>   yet. This is the case for most latex environments
>
>   My solution is here
>   https://www.mail-archive.com/emacs-orgmode@gnu.org/msg129974.html
>
>   but consider also the idea behind the star
>   https://www.mail-archive.com/emacs-orgmode@gnu.org/msg129976.html
>
>   I will try to submit a patch soon.
>
>   Best regards,
>   Jeremie
>
>   On Tuesday,  8 Dec 2020 at 20:57, 10cadr wrote:
>   > I was trying out the new option tex:dvipng. The HTML result was a image
>   > with the tikz code.
>   >
>   > Turns out, debugging and telling the fragment processor not to delete the
>   > files, what org generates for the tikz fragment is:
>   >
>   > \begin{tikzpicture*}
>   >
>   > Removing the astherisk would make it work without any workarounds.
>   >
>   > How I got around this was
>   >
>   > #+LATEX_HEADER: \usepackage{environ,amsmath,multicol}
>   > #+LATEX_HEADER:
>   > 
> \NewEnviron{tikzpicture*}[1][]{\begin{tikzpicture}[#1]\BODY\end{tikzpicture}}
>   >
>   > Possibly fixing this issue, will make cross formats much easier.
>
>   --
>   Jeremie Juste
>
>
>

-- 
Jeremie Juste



Re: stability of toc links

2020-12-19 Thread Ihor Radchenko
Carsten Dominik  writes:

> Dear all,
>
> I am sorry, I have trouble finding the time to work on this - so if someone
> else wants to look further into this, that would be great.
>
> Carsten

FYI, there is also built-in generator for bibtex ids -
bibtex-generate-autokey from bibtex.el. It does a pretty decent job
generating unique citation keys. I guess one can also reuse it to
calculate heading IDs.

Best,
Ihor



Selecting a date to show on the agenda with time grids

2020-12-19 Thread Christopher Dimech
Dear Compeers,

I able to run the command

(org-agenda-list nil (org-read-date))

to select the date and get the week for the agenda.

But I would like the grid marks for the selected date to show up
together with the list of appointments in the time slots.

Would be very grateful if somebody can help me further with this.

Regards
Christopher