Re: [PATCH] Add margin option to float for figure in ox-latex.el

2020-05-16 Thread Louis Gostiaux

Hi all,

Kyle could you please redirect also to Pablo's patch ? Couldn't find it.

That's also great that an exporter for tufte exists. However, as far as 
I understood, marginfigure is not exclusevely usedby tufte. I guess the 
marginfigure environment coule be supported in the generic latex export, 
and the tufte export could simply focus on the environments specific to 
tufte ?


That's great you found my post. At the time Bastien Guerry had replied, 
but no news since then.


Louis.

Le 16/05/2020 à 08:37, Kyle Meyer a écrit :

Pablo Palazon writes:


I've created a path to add a new option to float properties for figures on
latex. This is my first change for org-mode, and I don't really sure if
this is the correct way to do it.

Thank you!


* lisp/ox-latex.el (org-latex--inline-image): Include margin option
to create marginfigure environment for figures. It's useful for tufte
latex class, where with this environment shows the figure in the margin.

I wondered if something like this had been proposed or discussed before.
Searching the list, I see a patch [0] very similar to yours from a
couple of months back that didn't get a response (author added to cc).

Further back, there is a thread about an exporter Thomas Dye (+cc) wrote
to handle marginfigure and some other Tufte-y things [1].  It looks like
the code is available at ,
though I'm not sure if it still works with the current Org.

As for the proposed patch, while I think the specific code change itself
looks fine, skimming through the above thread makes me think that adding
marginfigure to ox-latex.el without considering similar cases may not be
the right approach.  What do others think?


[0]: https://yhetil.org/orgmode/35aac187-b751-5723-0f15-be6605fb8...@free.fr/
[1]: https://yhetil.org/orgmode/m2h9hsgdo2@tsdye.com/




org-clip-link should be included in core

2020-05-16 Thread Tory S. Anderson
Per alphapapa's suggestion to bring this up to this list, it seems that 
everyone (doom, spacemacs, and individuals) are rolling their own of a 
functionality that should be included in core: the ability to de-linkify text 
at point, leaving just the text without orgmode surroundings. One person claims 
it's already in there, but I don't see anything like =clip-link= in the actual 
code from https://code.orgmode.org/bzg/org-mode/src/master/lisp.

Discussion happening here:
https://www.reddit.com/r/emacs/comments/gjm8q6/delinking_orgmode_text/



Bug: Latex newline string "\\" in subtree export properties [9.3.3 (release_9.3.3-405-g817c0c @ /home/flare/.emacs.d/lisp/org-mode/lisp/)]

2020-05-16 Thread Flareriderdash
When exporting to latex from within an org subtree with properties like
EXPORT_AUTHOR set in a way to extend latex title capabilities
(i.e. adding instructor and institutional affiliation, ref
[[https://en.wikibooks.org/wiki/LaTeX/Title_Creation]]) the "\\" string
within the org property gets escaped to "$\backslash$\" during
export. Latex then doesn't treat this as a newline, deviating from
expected behaviour

This is the org property that is used during latex export
#+BEGIN_EXAMPLE

:EXPORT_AUTHOR: Gabriel S. X. Smith\\ CMST220\\ Professor Voso

#+END_EXAMPLE

This is the expected org to latex conversion
#+BEGIN_EXAMPLE

\author{Gabriel S. X. Smith\\ CMST220\\ Professor Voso}

#+END_EXAMPLE

This is the actual org to latex conversion
#+BEGIN_EXAMPLE

\author{Gabriel S. X. Smith$\backslash$\ CMST220$\backslash$\ Professor
Voso}

#+END_EXAMPLE

If you are familiar with latex you can see that this breaks the newlines
that would be typeset in the author section of the title by the latex
compiler.








Emacs  : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2020-05-02
Package: Org mode version 9.3.3 (release_9.3.3-405-g817c0c @
/home/flare/.emacs.d/lisp/org-mode/lisp/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-latex-listings 'minted
 org-link-shell-confirm-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function
'org-html-format-inlinetask-default-function
 org-edit-src-content-indentation 0
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-latex-pdf-process '("%latex -shell-escape -interaction nonstopmode
-output-directory %o '%f'" "%latex -shell-escape -interaction nonstopmode
-output-directory %o '%f'" "biber %f" "%latex -shell-escape -interaction
nonstopmode -output-directory %o '%f'")
 org-agenda-files '("~/Documents/school/High School/MaiaLearning/TODO.org"
   "~/Documents/school/2018 to 2020 school year/GEO105/Lecture Notes.org"
   "~/Documents/school/2018 to 2020 school year/SITREP.org"
   "~/Documents/school/2018 to 2020 school year/Expenses.org"
   "~/Documents/school/2018 to 2020 school year/JAPN121/Lecture Notes.org"
   "~/Documents/school/2018 to 2020 school year/JAPN121/TODO.org"
   "~/Documents/school/2018 to 2020 school year/CMST220/TODO.org"
   "~/Documents/school/2018 to 2020 school year/GEO105/TODO.org"
   "~/Documents/Personal Work/bin_hacking_local/TODO.org"
   "~/Documents/TODO.org" "~/TODO.org")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-reveal-start-hook '(org-decrypt-entry)
 org-mode-hook '(#[0 "\301\211\207" [imenu-create-index-function
org-imenu-get-tree] 2]
#[0 "\300\301\302\303\304$\207"
  [add-hook change-major-mode-hook org-show-all append local] 5]
#[0 "\300\301\302\303\304$\207"
  [add-hook change-major-mode-hook org-babel-show-result-all append local]
5]
org-babel-result-hide-spec org-babel-hide-all-hashes
(lambda nil "Custom keybinds for org mode" (interactive)
 (local-set-key (kbd "C-c i l l")
  (quote (lambda nil "" (interactive) (insert "#+LATEX:"
 (local-set-key (kbd "C-c i l h")
  (quote (lambda nil "" (interactive) (insert "#+LATEX_HEADER:"
 (local-set-key (kbd "C-c i l a")
  (quote (lambda nil "" (interactive) (insert "#+ATTR_LATEX:"
 (local-set-key (kbd "C-c i o c")
  (quote
   (lambda nil "" (interactive) (insert "#+BEGIN_COMMENT") (newline 2)
(insert "#+END_COMMENT") (previous-line 1))
   )
  )
 (local-set-key (kbd "C-c i o e")
  (quote
   (lambda nil "" (interactive) (insert "#+BEGIN_EXAMPLE") (newline 2)
(insert "#+END_EXAMPLE") (previous-line 1))
   )
  )
 (local-set-key (kbd "C-c i c c")
  (quote (lambda nil "" (interactive) (__org-insert-src-block "C"
 (local-set-key (kbd "C-c i c m")
  (quote (lambda nil "" (interactive) (__org-insert-src-block "makefile"
 (local-set-key (kbd "C-c i c s")
  (quote (lambda nil "" (interactive) (__org-insert-src-block "shell"
 (local-set-key (kbd "C-c l s") (quote org-store-link))
 (local-set-key (kbd "C-c l i") (quote org-insert-link))
 (local-set-key (kbd "C-c o t w") (quote org-table-wrap-region))
 (local-set-key (kbd "C-c m g l") (quote make-geo-item-org-item))
 (load-library "org-beautify-theme") (org-bullets-mode t))
)
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-latex-compiler "xelatex"
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-bab

Spelling corrections, file name changes

2020-05-16 Thread Mak Kolybabi

I noticed two spelling mistakes in the `worg` repo:

1. "maint[ai]nence" vs "maint[e]nance"
2. "gardner" vs "gardener"

-Mak

>From 031faffbea67e05be18a15fc48e2e2a4f3591f94 Mon Sep 17 00:00:00 2001
From: Mak Kolybabi 
Date: Sun, 10 May 2020 11:07:34 -0500
Subject: [PATCH] maint[ai|e]nance, gard[e]ner

---
 index.org | 6 +++---
 org-maintainance.org => org-maintenance.org   | 2 +-
 worg-maintainance.org => worg-maintenance.org | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
 rename org-maintainance.org => org-maintenance.org (99%)
 rename worg-maintainance.org => worg-maintenance.org (98%)

diff --git a/index.org b/index.org
index 26962cc3..4a075ad7 100644
--- a/index.org
+++ b/index.org
@@ -39,8 +39,8 @@ Org-mode is distributed as part of the popular [[http://www.gnu.org/software/ema
 runs wherever Emacs runs, including on GNU-Linux, Windows, and Mac.
 Written by Carsten Dominik, it is currently maintained by Bastien
 Guerry and used by many helpful people who, like you, are desperate to
-get and stay organized.  The way Org-mode maintainance is done is
-described [[file:org-maintainance.org][here]].
+get and stay organized.  The way Org-mode maintenance is done is
+described [[file:org-maintenance.org][here]].
 
 The page you're reading is part of =Worg=, a section of the [[https://orgmode.org/][Org-mode web
 site]] that is written by a volunteer community of Org-mode fans.  It
@@ -154,7 +154,7 @@ A collection of generally useful code blocks available as a [[file:library-of-ba
 - Intro
   - [[file:worg-about.org][About the Worg project]]
   - [[file:worg-setup.org][How Worg is set up on the server]]
-  - [[file:worg-maintainance.org][About Worg maintainer and gardners]]
+  - [[file:worg-maintenance.org][About Worg maintainer and gardeners]]
 - Tasks
   - [[file:worg-todo.org][The Worg TODO file]]
 - Howtos
diff --git a/org-maintainance.org b/org-maintenance.org
similarity index 99%
rename from org-maintainance.org
rename to org-maintenance.org
index c266ca34..9d3b62a2 100644
--- a/org-maintainance.org
+++ b/org-maintenance.org
@@ -1,7 +1,7 @@
 #+STARTUP:align fold nodlcheck hidestars oddeven lognotestate
 #+SEQ_TODO:   TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
 #+TAGS:   Write(w) Update(u) Fix(f) Check(c)
-#+TITLE:  Org maintainance
+#+TITLE:  Org maintenance
 #+EMAIL:  bzg at gnu dot org
 #+LANGUAGE:   en
 #+PRIORITIES: A C B
diff --git a/worg-maintainance.org b/worg-maintenance.org
similarity index 98%
rename from worg-maintainance.org
rename to worg-maintenance.org
index 1324c6d7..d8f0511e 100644
--- a/worg-maintainance.org
+++ b/worg-maintenance.org
@@ -1,7 +1,7 @@
 #+STARTUP:align fold nodlcheck hidestars oddeven lognotestate
 #+SEQ_TODO:   TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
 #+TAGS:   Write(w) Update(u) Fix(f) Check(c)
-#+TITLE:  Worg maintainance
+#+TITLE:  Worg maintenance
 #+AUTHOR: Worg people
 #+EMAIL:  mdl AT imapmail DOT org
 #+LANGUAGE:   en
@@ -20,7 +20,7 @@
 - give push access to new contributors in [[https://code.orgmode.org/bzg/worg][worg repo]].
 - access to the server and fix possible publishing issues from there
 
-* Worg gardners
+* Worg gardeners
 
 "Gardners" are people who take special care of directories, pages or
 sections in Worg.
-- 
2.24.2 (Apple Git-127)



Migrating from HUGO to org-publish

2020-05-16 Thread Alejandro Alcalde
Hello, I am looking to migrate from Hugo to org-publish, is there an easy
way? I’ve have found several guides to migrate from jekyll, like this one:
https://duncan.codes/posts/2019-09-03-migrating-from-jekyll-to-org/index.html
2


Unfortunately I do not know how to do it smoothly with my set up.

I have some posts written in plain org, that is no problem. But I also have
the majority of my blog posts written in markdown (With YAML header and
TOML header), since I once migrated from Jekyll to Hugo.

I though maybe pandoc could help me in the process, but when converting a
markdown file to org, I am loosing all TOML or YAML headers, so the
resulting org file have no #+ properties.

Any suggestions? I could write some python code that read YAML and TOML
headers and output, but I have lots of custom headers (
https://github.com/elbaulp/algui91-hugo/blob/master/content/post/create-deploy-telegram-bot.en.md)
like url that will cause 404 errors when migrating to org-publish

Thanks and Have a nice day.
*-- Alejandro Alcalde - elbauldelprogramador.com
*


possible fix for a bug in org-mode html export

2020-05-16 Thread bpanthi

When exporting an org file containing latex fragments with option

#+OPTIONS: tex:dvipng

in the html file the png image src attribute's value is not a valid URI. 
  while it should be src="file:///e:/dir/sth.png" ...>  for the browser to work. In my config 
I have  (setq org-preview-latex-image-directory "E:/tmp/ltximg/") so 
that all images are created in a single directory and don't clutter my 
org file directory.


I fixed this issue for me by modifying `org-html--format-image' function 
of ox-html.el file as follow:


(defun org-html--format-image (source attributes info)
  "Return \"img\" tag with given SOURCE and ATTRIBUTES.
SOURCE is a string specifying the location of the image.
ATTRIBUTES is a plist, as returned by
`org-export-read-attribute'.  INFO is a plist used as
a communication channel."
  (if (string= "svg" (file-name-extension source))
  (org-html--svg-image source attributes info)
(org-html-close-tag
 "img"
 (org-html--make-attribute-string
  (org-combine-plists
   (list :src (concat "file:///" source)
 :alt (if (string-match-p "^ltxpng/" source)
  (org-html-encode-plain-text
   (org-find-text-property-in-string 'org-latex-src source))
(file-name-nondirectory source)))
   attributes))
 info)))

I just changed (list :src source ...) to (list :src (concat "file:///" 
source).


I don't know if it is an acceptable way or it further causes bugs in 
other places.

Hope that this will find the proper way and fix it.

(emacs-version) = "GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-11-01"
(org-version) = "9.3.6"

Emacs Admirer,
Bibek Panthi

#+OPTIONS: tex:dvipng

* Vector Subspace
+ Subspace :: A subspace of a vector space $V$ is a subset $S \subset V$
  such that $S$ itself is a vector space. (i.e. it must be closed
  under addition, and scaling and thus also include $0$)


issue in orgmode manual

2020-05-16 Thread Max Mustermann
Hey,
On https://orgmode.org/manual/LaTeX-Export.html#Tables-in-LaTeX-export,
13.10.5 -13.10.11 refer back to its parent 13.10
same with 13.9.6-13.9.11 and probably others.

Sorry if this is already known or intended.

Have a nice weekend.


Org-agenda ignores archive tag set by "#+FILETAGS: ARCHIVE"

2020-05-16 Thread George Sokolsky
Hello!

I have .org files with  "#+FILETAGS: ARCHIVE" headers.

I want items from these .org files to be hidden by default from results
of "org-agenda" -> "s Search for keywords" by default.

This is not the case, unfortunately.

Calling "org-agenda-archives-mode" in agenda view also ignores
items from .org files with  "#+FILETAGS: ARCHIVE" and does not hide them.

Both "org-agenda" -> "s Search for keywords" and
"org-agenda-archives-mode" only hide items, which have :ARCHIVE: tag
assigned to them or to their parents.

Items from .org files with  "#+FILETAGS: ARCHIVE" are still shown in
agenda view. They are shown as having ":ARCHIVE::" tag and I could hide
them by calling "org-agenda-filter" ->  "-archive". But this is manual
effort every time.

Ideally I'd want to:

1. When calling "org-agenda" -> "s Search for keywords" both (a) items
with :ARCHIVE: tag and (b) all items from .org files with "#+FILETAGS:
ARCHIVE" are hidden by default

2. Calling "org-agenda-archives-mode" in agenda view will also show/hide
items from .org files with "#+FILETAGS: ARCHIVE"


*How the above could be done, please?*


I run org version 20200511 on GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, 
GTK+ Version 3.20.8) of 2020-04-25


Thank you!



[PATCH] ox: Add Dutch translations

2020-05-16 Thread Stanley Jaddoe
* lisp/ox.el (org-export-dictionary): Add missing Dutch (nl) translations.

TINYCHANGE
---
 lisp/ox.el | 20 
 1 file changed, 20 insertions(+)

diff --git a/lisp/ox.el b/lisp/ox.el
index 20d2ad88c..9cf62078a 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5769,6 +5769,7 @@ them."
  ("sl" :default "Nadaljevanje na naslednji strani"))
 ("Created"
  ("cs" :default "Vytvořeno")
+ ("nl" :default "Gemaakt op")  ;; must be followed by a date or date+time
  ("pt_BR" :default "Criado em")
  ("ro" :default "Creat")
  ("sl" :default "Ustvarjeno"))
@@ -5809,6 +5810,7 @@ them."
  ("fr" :ascii "Equation" :default "Équation")
  ("is" :default "Jafna")
  ("ja" :default "方程式")
+ ("nl" :default "Vergelijking")
  ("no" :default "Ligning")
  ("nb" :default "Ligning")
  ("nn" :default "Likning")
@@ -5829,6 +5831,7 @@ them."
  ("is" :default "Mynd")
  ("it" :default "Figura")
  ("ja" :default "図" :html "図")
+ ("nl" :default "Figuur")
  ("no" :default "Illustrasjon")
  ("nb" :default "Illustrasjon")
  ("nn" :default "Illustrasjon")
@@ -5848,6 +5851,7 @@ them."
  ("is" :default "Mynd %d")
  ("it" :default "Figura %d:")
  ("ja" :default "図%d: " :html "図%d: ")
+ ("nl" :default "Figuur %d:" :html "Figuur %d:")
  ("no" :default "Illustrasjon %d")
  ("nb" :default "Illustrasjon %d")
  ("nn" :default "Illustrasjon %d")
@@ -5895,6 +5899,7 @@ them."
  ("et" :default "Loendite nimekiri")
  ("fr" :default "Liste des programmes")
  ("ja" :default "ソースコード目次")
+ ("nl" :default "Lijst van programma's")
  ("no" :default "Dataprogrammer")
  ("nb" :default "Dataprogrammer")
  ("pt_BR" :html "Índice de Listagens" :default "Índice de 
Listagens" :ascii "Indice de Listagens")
@@ -5913,6 +5918,7 @@ them."
  ("is" :default "Töfluskrá" :html "Töfluskrá")
  ("it" :default "Indice delle tabelle")
  ("ja" :default "表目次")
+ ("nl" :default "Lijst van tabellen")
  ("no" :default "Tabeller")
  ("nb" :default "Tabeller")
  ("nn" :default "Tabeller")
@@ -5933,6 +5939,7 @@ them."
  ("fr" :default "Programme" :html "Programme")
  ("it" :default "Listato")
  ("ja" :default "ソースコード")
+ ("nl" :default "Programma")
  ("no" :default "Dataprogram")
  ("nb" :default "Dataprogram")
  ("pt_BR" :default "Listagem")
@@ -5951,6 +5958,7 @@ them."
  ("fr" :default "Programme %d :" :html "Programme %d :")
  ("it" :default "Listato %d :")
  ("ja" :default "ソースコード%d:")
+ ("nl" :default "Programma %d:" :html "Programma %d:")
  ("no" :default "Dataprogram %d")
  ("nb" :default "Dataprogram %d")
  ("ro" :default "Lista %d")
@@ -5966,6 +5974,7 @@ them."
  ("es" :default "Referencias")
  ("fr" :ascii "References" :default "Références")
  ("it" :default "Riferimenti")
+ ("nl" :default "Bronverwijzingen")
  ("pt_BR" :html "Referências" :default "Referências" :ascii 
"Referencias")
  ("ro" :default "Bibliografie")
  ("sl" :default "Reference"))
@@ -5974,6 +5983,8 @@ them."
  ("fr" :default "cf. figure %s"
   :html "cf. figure %s" :latex "cf.~figure~%s")
  ("it" :default "Vedi figura %s")
+ ("nl" :default "Zie figuur %s"
+  :html "Zie figuur %s" :latex "Zie figuur~%s")
  ("pt_BR" :default "Veja a figura %s")
  ("ro" :default "Vezi figura %s")
  ("sl" :default "Glej sliko %s"))
@@ -5981,6 +5992,8 @@ them."
  ("cs" :default "Viz program %s")
  ("fr" :default "cf. programme %s"
   :html "cf. programme %s" :latex "cf.~programme~%s")
+ ("nl" :default "Zie programma %s"
+  :html "Zie programma %s" :latex "Zie programma~%s")
  ("pt_BR" :default "Veja a listagem %s")
  ("ro" :default "Vezi tabelul %s")
  ("sl" :default "Glej izpis programa %s"))
@@ -5994,6 +6007,8 @@ them."
  ("fr" :default "cf. section %s")
  ("it" :default "Vedi sezione %s")
  ("ja" :default "セクション %s を参照")
+ ("nl" :default "Zie sectie %s"
+  :html "Zie sectie %s" :latex "Zie sectie~%s")
  ("pt_BR" :html "Veja a seção %s" :default "Veja a seção %s"
   :ascii "Veja a secao %s")
  ("ro" :default "Vezi secțiunea %s")
@@ -6006,6 +6021,8 @@ them."
  ("fr" :default "cf. tableau %s"
   :html "cf. tableau %s" :latex "cf.~tableau~%s")
  ("it" :default "Vedi tabella %s")
+ ("nl" :default "Zie tabel %s"
+  :html "Zie tabel %s" :latex "Zie tabel~%s")
  ("pt_BR" :default "Veja a tabela %s")
  ("ro" :default "Vezi tabelul %s")
  ("sl" :default "Glej tabelo %s"))
@@ -6019,6 +6036,7 @@ them."
  ("is" :default "Tafla")
  ("it" :default "Tabella")
  ("ja" :default "表" :html "表")
+ ("nl" :default "Tabel")
  ("pt_BR" :default "Tabela")
  ("ro" :default "Tabel")
  ("ru" :html "Таблица"
@@ -6035,6 +6053,7 @@ them."
  ("is" :default "Tafla %d")
  ("it" :default "Tabella %d:")
  ("ja" :default "表%d:" :html "表%d:")
+ ("

Headlines require both space and star

2020-05-16 Thread Ryan Tate
Hello, I am writing to suggest that the documents reflect that 
both a star and space are required to create a headline, not just 
a star.


Today I learned org mode through the manual, compact guide, "Org 
mode beginning at the basics" at orgmode.org and David O'Toole 
tutorial at orgmode.org.


I spent about 15 minutes trying to figure out why folding wasn't 
"working" in the very first org doc I then created.


It turns out I was not including a space after the star in my 
headlines. My doc looked like this:


*Intro
**First Part
**Second Part
***Sub part
**Third Part

etc.

When I did add spaces after the stars, suddenly the headlines were 
recognized (color changes) and folding worked as described in the 
manual at last. (I am on GNU Emacs 26.3 (build 1, 
x86_64-redhat-linux-gnu, GTK+ Version 3.24.11) of 2019-12-10)


I went to see if I missed something when I read the docs. Here are 
various ways headlines are described, none seem to mention the 
space after the star being required:


Manual, compact guide: " The headlines in Org start with one or 
more stars, on the left margin3. For example..." 
https://orgmode.org/manual/Headlines.html#Headlines

https://orgmode.org/guide/Headlines.html#Headlines

Org mode beginning at the basics: "This is a headline, it starts 
with one or more stars.  A heading has one star, a sub-heading 
two, etc."

https://orgmode.org/worg/org-tutorials/org4beginners.html

David O'Toole Org Tutorial: "First-level headlines begin with one 
star; second-level headlines begin with two stars, and so on. "

https://orgmode.org/worg/org-tutorials/orgtutorial_dto.html

I am presuming that the requirement of a space after a star has 
been omitted from the docs and is not an implementation error. If 
the latter I could probably put together a bug report for the code 
itself. If the former, I would simply suggest that the docs be 
amended to fully describe the actual requirements of headlines so 
others who do read the friendly manual as I did do not waste their 
own 15 minutes :-) If people are open to this, and a more proper 
patch is required, I would be happy to submit one in a more 
elaborate and correct format.


If this has been brought up before, or I am misunderstanding, I 
apologize in advance; the gmane gateway seems to be down so I 
cannot search the archives at the moment.


Cheers and thanks for org mode.

  Ryan



Subject: Bug: org-clock and indirect org buffer: unable to generate report with :scope file-with-archives [9.4 (nil @ /home/user/.emacs.d/.local/straight/build/org-mode/)]

2020-05-16 Thread Alois Janíček
When attempting to generate clock-report using ":scope
file-with-archives" from indirect org buffer, operation fails because
function `org-dblock-write:clocktable` builds list of files based on
`buffer-file-name` variable which is `nil` in indirect buffers.

As user I am expecting org-clock to generate clock-report for current
indirect org buffer as if it was direct buffer, which is default behavior
in case of ":scope file" where `org-dblock-write:clocktable` does:

(or (buffer-file-name (buffer-base-buffer))
(current-buffer))

Emacs  : GNU Emacs 27.0.91 (build 3, x86_64-pc-linux-gnu, GTK+ Version
3.24.20, cairo version 1.17.3)
 of 2020-05-03
Package: Org mode version 9.4



Doc string patch

2020-05-16 Thread Mak Kolybabi
I noticed a copy-and-paste error in the doc string for ox-md-link, 
corrected in the attached patch.


-Mak

>From 29c2ae2005e5d4baf22e54ec0573bcaebe1d0c20 Mon Sep 17 00:00:00 2001
From: Mak Kolybabi 
Date: Sun, 10 May 2020 00:41:54 -0500
Subject: [PATCH] Correct doc string for org-md-link.

---
 lisp/ox-md.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index f27645976..7dbae07be 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -386,7 +386,7 @@ channel."
  Link
 
 (defun org-md-link (link desc info)
-  "Transcode LINE-BREAK object into Markdown format.
+  "Transcode LINK object into Markdown format.
 DESC is the description part of the link, or the empty string.
 INFO is a plist holding contextual information.  See
 `org-export-data'."
-- 
2.24.2 (Apple Git-127)



Bug: babel python html export error [9.3.6 (9.3.6-25-g685b2c-elpaplus @ /home/johannes/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200330/)]

2020-05-16 Thread Johannes Wasmer
To: emacs-orgmode@gnu.org
Subject: Bug: babel python html export error [9.3.6
(9.3.6-25-g685b2c-elpaplus @
/home/johannes/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200330/)]
From: Johannes Wasmer 
--text follows this line--

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.


Hi there,
I have a very simple test.org file with the content:

#+begin_src python
return 2+2
#+end_src

#+RESULTS:
: 4

When I export this to PDF via ~C-e l p~, I get the PDF with both the
code and the output.

But when I export to HTML via ~C-e h h~, I get no file.
In the *Messages* buffer, I find the following error message:
org-babel-exp process python at position 3...
Can’t guess python-indent-offset, using defaults: 4
pythonic-python-readable-file-name: Wrong type argument: stringp, nil

Note: python code evaluation works fine (also with :exports both). Only
the HTML export does not work.
So this bug is very specific to babel python HTML export.
The Python version used is 3.7.4.
Thank you for any pointers on how to resolve this.
Best, Johannes


Emacs  : GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-09-16
Package: Org mode version 9.3.6 (9.3.6-25-g685b2c-elpaplus @
/home/johannes/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200330/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-after-execute-hook '(spacemacs/ob-fix-inline-images)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function
'org-html-format-inlinetask-default-function
 org-src-tab-acts-natively t
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-imenu-depth 8
 org-download-annotate-function 'org-download-annotate-default
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-mode-hook '(org-tempo-setup
 (lambda nil
  (local-set-key [C-M-up] (quote
org-table-move-single-cell-up))
  (local-set-key [C-M-down] (quote
org-table-move-single-cell-down))
  (local-set-key [C-M-left] (quote
org-table-move-single-cell-left))
  (local-set-key [C-M-right] (quote
org-table-move-single-cell-right)))
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-all append
local] 5]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook
org-babel-show-result-all append
local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes
 #[0 "\301\211 \207" [imenu-create-index-function
org-imenu-get-tree]
   2]
 flyspell-mode spacemacs/org-setup-evil-surround
 spacemacs/load-yasnippet toc-org-enable org-download-enable
 org-bullets-mode dotspacemacs//prettify-spacemacs-docs
 spacemacs//org-babel-do-load-languages
spacemacs//evil-org-mode
 org-eldoc-load spacemacs//init-company-org-mode
company-mode)
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-agenda-restore-windows-after-quit t
 org-confirm-elisp-link-function 'yes-or-no-p
 org-startup-with-inline-images t
 org-download-file-format-function 'org-download-file-format-default
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-babel-load-languages '((shell . t) (python . t) (C . t) (gnuplot . t)
(java . t))
 org-log-done 'time
 org-link-file-path-type 'relative
 org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS
WIDTH)"]
 org-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" . php)
("C" . c)
  ("C++" . c++) ("asymptote" . asy) ("bash" . sh)
  ("beamer" . latex) ("calc" . fundamental) ("cpp" .
c++)
  ("ditaa" . artist) ("dot" . fundamental) ("elisp" .
emacs-lisp)
  ("ocaml" . tuareg) ("screen" . shell-script) ("shell"
. sh)
  ("sqlite" . sql))
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide

Migrating from HUGO to org-publish

2020-05-16 Thread Alejandro Alcalde
Hello, I am looking to migrate from Hugo to org-publish, is there an easy
way? I’ve have found several guides to migrate from jekyll, like this one:
https://duncan.codes/posts/2019-09-03-migrating-from-jekyll-to-org/index.html
2


Unfortunately I do not know how to do it smoothly with my set up.

I have some posts written in plain org, that is no problem. But I also have
the majority of my blog posts written in markdown (With YAML header and
TOML header), since I once migrated from Jekyll to Hugo.

I though maybe pandoc could help me in the process, but when converting a
markdown file to org, I am loosing all TOML or YAML headers, so the
resulting org file have no #+ properties.

Any suggestions? I could write some python code that read YAML and TOML
headers and output, but I have lots of custom headers (
https://github.com/elbaulp/algui91-hugo/blob/master/content/post/create-deploy-telegram-bot.en.md)
like url that will cause 404 errors when migrating to org-publish

Thanks and Have a nice day.


*-- Alejandro Alcalde - elbauldelprogramador.com
*


Re: Display in minibuffer link under point

2020-05-16 Thread Garjola Dindi
On Mon 11-May-2020 at 17:53:06 +02, John Kitchin
 wrote: 
> org-ref doesn't do anything fancy here, it just runs an idle timer:
>
> https://github.com/jkitchin/org-ref/blob/master/org-ref-core.el#L597
>
> that runs a function defined at
> https://github.com/jkitchin/org-ref/blob/master/org-ref-core.el#L3633
>
> that function is kind of long because it computes the message, and only
> in specific contexts.
>

Hi,

This is what I did:

(when (not (or (looking-at " ") ;looking at a space
 (looking-at "^$")  ;looking at a blank line
 (looking-at "]")   ;looking at a bracket at the end
;looking at the end of the line.
 (looking-at "$")))

(save-restriction
  (widen)
  (when (eq major-mode 'org-mode)
(let* ((object (org-element-context))
   (type (org-element-property :type object))
   (link-content (org-element-property :path object)))
  (save-excursion
(message "%s:%s" type link-content))


It seems to do what I want.

Thank you very much for your help.

Garjola


> Garjola Dindi  writes:
>
>> Hi,
>>
>> Thanks both of you for your answers.
>>
>> What would be the way to automatically trigger =display-local-help= when the 
>> point is on the link? Org-ref does that beautifully ;)
>>
>> Thanks again.
>>
>> Garjola
>>
>> On Fri 08-May-2020 at 22:48:37 +02, John Kitchin  
>> wrote:
>>> It looks like that variable is obsolete now since Emacs 24.1, and 
>>> (tooltip-mode -1) is probably the way to get the same thing now.
>>>
>>> John
>>>
>>> ---
>>> Professor John Kitchin
>>> Doherty Hall A207F
>>> Department of Chemical Engineering
>>> Carnegie Mellon University
>>> Pittsburgh, PA 15213
>>> 412-268-7803
>>> @johnkitchin
>>> http://kitchingroup.cheme.cmu.edu
>>>
>>> On Fri, May 8, 2020 at 1:18 PM briangpowell .  
>>> wrote:
>>>
>>>  I use this variable to toggle my Gnu Emacs Org-Mode buffer into an audio 
>>> desktop:
>>>
>>>  (setq tooltip-use-echo-area (not tooltip-use-echo-area))
>>>
>>>  Of course I had to do some programming to do that but the above should get 
>>> you started
>>>
>>>  And we can leave that programming as an exercise for the class--right Dr. 
>>> Kitchin?
>>>
>>>  ;-)
>>>
>>>  On Fri, May 8, 2020 at 9:19 AM John Kitchin  
>>> wrote:
>>>
>>>  M-x display-local-help might do it.
>>>
>>>  John
>>>
>>>  ---
>>>  Professor John Kitchin
>>>  Doherty Hall A207F
>>>  Department of Chemical Engineering
>>>  Carnegie Mellon University
>>>  Pittsburgh, PA 15213
>>>  412-268-7803
>>>  @johnkitchin
>>>  http://kitchingroup.cheme.cmu.edu
>>>
>>>  On Fri, May 8, 2020 at 9:15 AM Garjola Dindi  wrote:
>>>
>>>  Hi,
>>>
>>>  Is there a way to display in the minibuffer the URL of the link under
>>>  the point in the same way as when the mouse pointer is over the link?
>>>
>>>  Thanks!
>>>
>>>  Garjola
>>>  --
>
>
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
-- 




Re: [PATCH] Add margin option to float for figure in ox-latex.el

2020-05-16 Thread Kyle Meyer
Louis Gostiaux writes:

> Kyle could you please redirect also to Pablo's patch ? Couldn't find it.

Sure, there were three patches, but the patch for the main code change
was in the message that mine as in reply to:


You can see the message at

  
https://yhetil.org/CAOKwhjswgMvE4jkTXgMeEg7G9s9R2jkJf==Zt=dew1pjcdt...@mail.gmail.com

or in Org mode's official archive:

  https://lists.gnu.org/archive/html/emacs-orgmode/2020-05/msg00243.html

> That's also great that an exporter for tufte exists. However, as far as 
> I understood, marginfigure is not exclusevely usedby tufte. I guess the 
> marginfigure environment coule be supported in the generic latex export, 
> and the tufte export could simply focus on the environments specific to 
> tufte ?

Thanks for the information.  So the marginfigure environment is defined
by the sidenotes package, right?  Should other environments from the
package be considered?  I suppose the main one I'm wondering about is
margintable.  Also, in the ox-tufte-LaTeX thread I linked to, Rasmus was
wondering [*] whether it'd make sense to instead have an :environment
attribute.  I _think_ the main appeal is that it would allow new
environments to be specified without tweaking org-latex--inline-image or
user-end customization.

[*] https://yhetil.org/orgmode/878u31ycc5@gmx.us/#t

> That's great you found my post. At the time Bastien Guerry had replied, 
> but no news since then.

Ah, I didn't see a reply from Bastien in my local mail or any archives.
Perhaps it didn't make it to the list or wasn't linked up to the
original mail.



Re: Bug: Latex newline string "\\" in subtree export properties [9.3.3 (release_9.3.3-405-g817c0c @ /home/flare/.emacs.d/lisp/org-mode/lisp/)]

2020-05-16 Thread Nicolas Goaziou
Hello,

Flareriderdash  writes:

> When exporting to latex from within an org subtree with properties like
> EXPORT_AUTHOR set in a way to extend latex title capabilities
> (i.e. adding instructor and institutional affiliation, ref
> [[https://en.wikibooks.org/wiki/LaTeX/Title_Creation]]) the "\\" string
> within the org property gets escaped to "$\backslash$\" during
> export. Latex then doesn't treat this as a newline, deviating from
> expected behaviour
>
> This is the org property that is used during latex export
>
> #+BEGIN_EXAMPLE
>
> :EXPORT_AUTHOR: Gabriel S. X. Smith\\ CMST220\\ Professor Voso
>
> #+END_EXAMPLE
>
>
> This is the expected org to latex conversion
>
> #+BEGIN_EXAMPLE
>
> \author{Gabriel S. X. Smith\\ CMST220\\ Professor Voso}
>
> #+END_EXAMPLE

No, this is not the expected conversion. AUTHOR, like TITLE, expects Org
syntax, not LaTeX.

You could write, e.g.,

  :EXPORT_AUTHOR: Gabriel S. X. Smith@@latex:\\@@ CMST220@@latex:\\@@ Professor 
Voso

Regards,

-- 
Nicolas Goaziou



Re: Bug: babel python html export error [9.3.6 (9.3.6-25-g685b2c-elpaplus @ /home/johannes/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200330/)]

2020-05-16 Thread Nicolas Goaziou
Hello,

Johannes Wasmer  writes:

> I have a very simple test.org file with the content:
>
> #+begin_src python
> return 2+2
> #+end_src
>
> #+RESULTS:
> : 4
>
> When I export this to PDF via ~C-e l p~, I get the PDF with both the
> code and the output.
> But when I export to HTML via ~C-e h h~, I get no file.

FWIW, I cannot reproduce it.

> In the *Messages* buffer, I find the following error message:
> org-babel-exp process python at position 3...
> Can’t guess python-indent-offset, using defaults: 4
> pythonic-python-readable-file-name: Wrong type argument: stringp, nil
>
> Note: python code evaluation works fine (also with :exports both). Only
> the HTML export does not work.
> So this bug is very specific to babel python HTML export.
> The Python version used is 3.7.4.
> Thank you for any pointers on how to resolve this.

It may be specific to the package providing
`pythonic-python-readable-file-name' instead. I suggest to look there.

Regards,

-- 
Nicolas Goaziou



Re: possible fix for a bug in org-mode html export

2020-05-16 Thread Nicolas Goaziou
Hello,

bpanthi  writes:

> When exporting an org file containing latex fragments with option
>
> #+OPTIONS: tex:dvipng
>
> in the html file the png image src attribute's value is not a valid URI. 
>   while it should be  src="file:///e:/dir/sth.png" ...>  for the browser to work.

I have fixed it in master. Please let me know how it goes.

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: Headlines require both space and star

2020-05-16 Thread Nicolas Goaziou
Hello,

Ryan Tate  writes:

> Hello, I am writing to suggest that the documents reflect that both
> a star and space are required to create a headline, not just a star.

[...]

> If people are open to this, and a more proper patch is
> required, I would be happy to submit one in a more elaborate and
> correct format.

OK, documentation could be clearer here. Patches are welcome, of course!

Thank you.

Regards,

-- 
Nicolas Goaziou



Unnecessary Warnings Evaluating Haskell Blocks [patch]

2020-05-16 Thread Nick Daly
Hello Org Maintainers,

This issue has been reproduced on org versions 9.1.14 and Git master,
and comes with a patch.

* Issue

ob-haskell.el::org-babel-execute:haskell produces spurious error
messages when running haskell blocks without =:results output=
specified.  If =:results= is not specified or is set to =value=, or
=silent=, evaluating haskell blocks with =C-c C-c= produces an error
message:

: org-babel-script-escape: ‘org-babel-script-escape’ expects a string".

Below is a minimal example that produces the unexpected behavior.

* ECM

The ECM is in two parts, below.

2. The Org sample that produces the error.
3. The minimal =~/.emacs=.

You may need to install the =ghc= package to get the =ghci=
executable.

** Org File

#+name: ecm-error-message
#+BEGIN_SRC org
  1. Evaluate the addThree-delcare block to produce the error message.
 If you receive an error about how =haskell-prompt-regexp= is
 undefined, evaluate the block again, that is a transient error.

  Create the =addThree= function that adds three to any number.  Use
  =:results silent= to suppress the RESULTS block because we don't
  care about the results of a function declaration.

  ,#+name: addThree-declare
  ,#+begin_src haskell :results silent
:{
addThree :: (Num a) =>  a -> a
addThree x = x + 3
:}
  ,#+end_src

  Observed behavior (without the patch below):

  "org-babel-script-escape: ‘org-babel-script-escape’ expects a string"

  With the patch:

  (no output)

  2. Apply the =addThree= function and get the result:

  ,#+name: addThree-apply
  ,#+begin_src haskell
addThree 10
  ,#+end_src

  With and without the patch:

  ,#+RESULTS: addThree-apply
  : 13
#+END_SRC

** .emacs

This is the minimal example .emacs file to produce this error:

#+BEGIN_SRC elisp
  (require 'org)
  (require 'ob-haskell)
  (setq org-babel-load-languages '((haskell . t)))
#+END_SRC

* Patch

This unnecessary error message can be corrected with the following
patch that applies cleanly on both Debian Stable's Org version 9.1.14
and the current git master (commit
#93c50e3a7867a1a85fc78b337172585f7a10dcc6).

#+BEGIN_SRC diff
--- org-9.1.14/ob-haskell.el
+++ org-9.1.14/ob-haskell.el
@@ -92,7 +92,7 @@
   (`output (mapconcat #'identity (reverse (cdr results)) "\n"))
   (`value (car results)
(org-babel-result-cond (cdr (assq :result-params params))
- result (org-babel-script-escape result)))
+ result (if (stringp result) (org-babel-script-escape result
  (org-babel-pick-name (cdr (assq :colname-names params))
   (cdr (assq :colname-names params)))
  (org-babel-pick-name (cdr (assq :rowname-names params))
#+END_SRC

This error may also prevent execution entirely in different
configurations, but I have not been able to reliably confirm that
behavior:

https://emacs.stackexchange.com/questions/35709/cannot-execute-org-babel-haskell-block

Thank you for your time,
Nick



Re: [PATCH] Add margin option to float for figure in ox-latex.el

2020-05-16 Thread Thomas S. Dye

Aloha Kyle,

This patch produces a LaTeX environment, marginfigure, that isn't 
part of the standard.  AFAIK, marginfigure is defined in the 
sidenotes package and separately in the tufte-latex class, neither 
of which Org mode loads by default.  If the patch is applied, then 
one of these packages should be added to the list of default LaTeX 
packages so ox-latex doesn't export code it is unable to compile.


My takeaway from the discussion surrounding ox-tufte-latex several 
years ago is that support for non-standard LaTeX constructs should 
not be part of Org mode core because they complicate maintenance 
unduly.


I haven't used ox-tufte-latex since I last used paper handouts at 
a presentation several years ago, so I don't know if it still 
works.  However, it really was cobbled together, a process that 
involved copying big chunks of Org mode code.  I knew then this 
approach is sub-optimal, but never found the time to puzzle out 
how to turn it into advice that could sit on top of a possibly 
changing code base.


Also, FYI, I found the tufte-latex class a bit difficult to use. 
Objects in the margin can easily overwrite one another and the 
author has to fix these manually, which can be tricky.  The upside 
is that when everything is right, the output can be terrific to 
look at.


All the best,
Tom

Kyle Meyer writes:


Pablo Palazon writes:

I've created a path to add a new option to float properties for 
figures on
latex. This is my first change for org-mode, and I don't really 
sure if

this is the correct way to do it.


Thank you!

* lisp/ox-latex.el (org-latex--inline-image): Include margin 
option
to create marginfigure environment for figures. It's useful for 
tufte
latex class, where with this environment shows the figure in 
the margin.


I wondered if something like this had been proposed or discussed 
before.
Searching the list, I see a patch [0] very similar to yours from 
a
couple of months back that didn't get a response (author added 
to cc).


Further back, there is a thread about an exporter Thomas Dye 
(+cc) wrote
to handle marginfigure and some other Tufte-y things [1].  It 
looks like
the code is available at 
,

though I'm not sure if it still works with the current Org.

As for the proposed patch, while I think the specific code 
change itself
looks fine, skimming through the above thread makes me think 
that adding
marginfigure to ox-latex.el without considering similar cases 
may not be

the right approach.  What do others think?


[0]: 
https://yhetil.org/orgmode/35aac187-b751-5723-0f15-be6605fb8...@free.fr/

[1]: https://yhetil.org/orgmode/m2h9hsgdo2@tsdye.com/



--
Thomas S. Dye
https://tsdye.online/tsdye



Re: Subject: Bug: org-clock and indirect org buffer: unable to generate report with :scope file-with-archives [9.4 (nil @ /home/user/.emacs.d/.local/straight/build/org-mode/)]

2020-05-16 Thread Nicolas Goaziou
Hello,

Alois Janíček  writes:

> When attempting to generate clock-report using ":scope
> file-with-archives" from indirect org buffer, operation fails because
> function `org-dblock-write:clocktable` builds list of files based on
> `buffer-file-name` variable which is `nil` in indirect buffers.

I pushed a fix in master. Could you try it?

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: Doc string patch

2020-05-16 Thread Nicolas Goaziou
Hello,

Mak Kolybabi  writes:

> I noticed a copy-and-paste error in the doc string for ox-md-link,
> corrected in the attached patch.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [PATCH] Add margin option to float for figure in ox-latex.el

2020-05-16 Thread Kyle Meyer
Thomas S. Dye writes:

> This patch produces a LaTeX environment, marginfigure, that isn't 
> part of the standard.  AFAIK, marginfigure is defined in the 
> sidenotes package and separately in the tufte-latex class, neither 
> of which Org mode loads by default.  If the patch is applied, then 
> one of these packages should be added to the list of default LaTeX 
> packages so ox-latex doesn't export code it is unable to compile.
>
> My takeaway from the discussion surrounding ox-tufte-latex several 
> years ago is that support for non-standard LaTeX constructs should 
> not be part of Org mode core because they complicate maintenance 
> unduly.

Thanks for your input and the helpful summary.  The stance in the second
paragraph sounds like a sensible one.

Given the desire to use the marginfigure environment has popped up a few
times, I wonder if an ox-latex guru can suggest a user-end customization
that would enable the use of that environment.  I suppose an alternative
is Rasmus's proposal of an :environment attribute for figures [*] that I
mentioned in a sibling thread.

[*]: https://yhetil.org/orgmode/878u31ycc5@gmx.us/



Re: possible fix for a bug in org-mode html export

2020-05-16 Thread Bibek Panthi
I verfied. It works well.
Thanks!
On Sat, 16 May, 2020, 11:15 PM Nicolas Goaziou, 
wrote:

> Hello,
>
> bpanthi  writes:
>
> > When exporting an org file containing latex fragments with option
> >
> > #+OPTIONS: tex:dvipng
> >
> > in the html file the png image src attribute's value is not a valid URI.
> >   while it should be  > src="file:///e:/dir/sth.png" ...>  for the browser to work.
>
> I have fixed it in master. Please let me know how it goes.
>
> Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: Spelling corrections, file name changes

2020-05-16 Thread Kyle Meyer
Mak Kolybabi writes:

> I noticed two spelling mistakes in the `worg` repo:
>
>  1. "maint[ai]nence" vs "maint[e]nance"
>  2. "gardner" vs "gardener"

Thanks.  It looks like your message was delayed hitting the list, and
the maintenance typos in the file names were pointed out by someone else
in the meantime.  I've applied the remaining fixes (cf415038), bundling
in one more gardener typo I found.

By the way, if you'd like access to the Worg repository, you should ask
Bastien, I believe.



[PATCH] agenda: Consider FILETAGS for archive skipping

2020-05-16 Thread Kyle Meyer
George Sokolsky writes:

> I have .org files with  "#+FILETAGS: ARCHIVE" headers.
>
> I want items from these .org files to be hidden by default from results
> of "org-agenda" -> "s Search for keywords" by default.
>
> This is not the case, unfortunately.
[...]

I'd guess that it's uncommon to try to set the ARCHIVE tag at the file
level, as file-level archiving is already dealt through
org-archive-location and friends.  These standard files can optionally
be included with vA (or C-u M-x org-agenda-archives-mode).

> *How the above could be done, please?*

I don't see a built-in way to do it, though I think the patch below may
be sufficient to provide the behavior you want.  It doesn't consider any
of the tag inheritance variables, but that's probably okay given that
those aren't considered for handling :ARCHIVE: subtrees either.

-- >8 --
Subject: [PATCH] agenda: Consider FILETAGS for archive skipping

* lisp/org-agenda.el (org-agenda-skip): Consider skipping all entries
in a file if org-archive-tag is set via FILETAGS.
---
 lisp/org-agenda.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9c73d0d6c..8ed5e402d 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4082,8 +4082,10 @@ (defun org-agenda-skip ()
 (when (or
   (save-excursion (goto-char p) (looking-at comment-start-skip))
   (and org-agenda-skip-archived-trees (not org-agenda-archives-mode)
-   (get-text-property p :org-archived)
-   (org-end-of-subtree t))
+   (or (and (get-text-property p :org-archived)
+(org-end-of-subtree t))
+   (and (member org-archive-tag org-file-tags)
+(goto-char (point-max)
   (and org-agenda-skip-comment-trees
(get-text-property p :org-comment)
(org-end-of-subtree t))
-- 
2.26.2