Re: eval with :dir in included file

2023-07-19 Thread Dominique Dumont
On Friday, 7 July 2023 17:44:10 CEST Ihor Radchenko wrote:
> No, currently.
> We do something similar in `org-export--update-included-link', but not
> for :dir.

Thanks for the quick answer.

FTR, I'm now using ':eval never-export' [1] to workaround this issue.

All the best

[1] https://orgmode.org/manual/Evaluating-Code-Blocks.html








eval with :dir in included file

2023-07-07 Thread Dominique Dumont
Hi

I have a file with this code block:

~~~ file terraform-admin.org

** Retrieve public IPs
:PROPERTIES:
:CUSTOM_ID: retrieve-public-ips
:END:

#+begin_src shell :results verbatim :dir "stacks/public-ips" :exports both
terragrunt output ips
#+end_src

~~~

Exporting this file works fine.

I have another file which imports the file above:

~~~
#+include: "../../../infra-terraform/terraform-admin.org::#retrieve-public-ips" 
:only-contents  t
~~~

Here the export fails with this (slightly edited) error:

process-file: Setting current directory: No such file or directory, 
/home/domi/Documentation/admin/stacks/public-ips/

Indeed this directory does not exist: org-mode is looking for 
"stacks/public-ips" directory in the wrong place, i.e. org-mode
is starting to search "stacks/public-ips" from the *including* file.

Is there a way to tell org-mode to search "stacks/public-ips" directory 
starting from the directory of the *included* file ? 

All the best

Dominique







Re: Markdown export is non-deterministic?

2022-10-16 Thread Dominique Dumont
On Saturday, 8 October 2022 00:31:00 CEST Matias Eyzaguirre wrote:
> I’m using org-mode to generate a markdown README for a project that is
> under version control. I’ve noticed that the anchor tags used for the
> table of contents seem to be annoyingly random and change from export
> to export. Is it possible to make the generated ids deterministic?

The function shown in this blog helps a lot:

https://amitp.blogspot.com/2021/04/automatically-generate-ids-for-emacs.html

This works quite well for my org files.

HTH

Dod







Re: Deleting (not archiving) TODO items when done

2021-08-05 Thread Dominique Dumont
Le mercredi 4 août 2021, 19:47:11 CEST William Denton a écrit :
>  Is there a keystroke to delete a TODO?

I usually use C-c C-x C-w to delete a TODO item.

HTH






Re: Deleting (not archiving) TODO items when done

2021-08-05 Thread Dominique Dumont
Le mercredi 4 août 2021, 19:47:11 CEST William Denton a écrit :
>  Is there a keystroke to delete a TODO?

I usually use C-c C-x C-w to delete a TODO item.

HTH






Re: stability of toc links

2021-04-25 Thread Dominique Dumont
On Wednesday, 21 April 2021 18:24:27 CEST Nicolas Goaziou wrote:
> In particular, I'm not sure to understand how one system can generate an
> ID based on the heading content and still limit itself to alphanumeric
> characters. For example, what ID are generated with the following
> document?
> 
> --8<---cut here---start->8---
> * こんにちは
> * コンニチハ
> --8<---cut here---end--->8---

For what it's worth, DNS servers faces a similar problem where host names can 
contain any unicode character, but DNS servers support only ascii char. In DNS 
cases, this is worked around using punycode. (1) 

Using the example above, a host named "こんにちは.example" is converted to 
"xn--28j2a3ar1p.example". 

Punycode is available in Emacs through libidn (2)

HTH

(1) https://dnsquery.org/punycode
(2) https://www.gnu.org/software/libidn/








Re: stability of toc links

2020-12-14 Thread Dominique Dumont
On Wednesday, 9 December 2020 00:28:46 CET Samuel Wales wrote:
> when you link to a section using toc, you get a link like
>  
> https://thekafkapandemic.blogspot.com/2020/02/crimes-against-humanity_3.htm
> l#org080f0ab
> 
> will these links break if somebody copies them and pastes them
> elsewhere?  what if you add a section?

I have a similar problem. I write documentation for a customer in org format. 
I also have to generate Markdown files that are archived in a git repo (Unlike 
Github, Azure DevOps doesn't support org files).

Currently, TOC and headers lines change every time the markdown files are 
regenerated, which makes git diff much bigger, which also impacts code reviews.

So stabilizing the generated toc would be much welcome

All the best









Re: Help with moderating non-subscribers messages on the Org mailing list

2020-09-21 Thread Dominique Dumont
Hi

On mercredi 16 septembre 2020 11:04:42 CEST Bastien wrote:
> The task is to check the mailman administration page and to discard
> messages that should not be sent to the list, while allowing those
> sent by non-subscribers who ask relevant questions.

For what's it's worth, I use listadmin [1] to moderate a few Debian mailing 
list. 

I feel this is much faster than checking mailman pages: I run listadmin in a 
terminal and then mostly hit return to discard spam.

HTH

[1] https://sourceforge.net/projects/listadmin/





Re: Bug: ox-md: URL in HTML tables should not use markdown syntax [9.3.1 (9.3.1-dist @ /usr/share/emacs/site-lisp/elpa/org-9.3.1/)]

2020-06-23 Thread Dominique Dumont
On Tuesday, 23 June 2020 15:53:07 CEST Nicolas Goaziou wrote:
> Fixed. Thank you.

That was fast ! 

Thanks :-)








Bug: ox-md: URL in HTML tables should not use markdown syntax [9.3.1 (9.3.1-dist @ /usr/share/emacs/site-lisp/elpa/org-9.3.1/)]

2020-06-22 Thread Dominique Dumont
Hi

The following org-mode table is exported in plain markdown mode as an
HTML table:

| name   | link   |
|+|
| debian | [[http://www.debian.org][debian]] |

Unfortunately, the link inside the table is exported with Markdown
syntax:



debian
[debian](http://www.debian.org)


This is not allowed according to markdownguide.org : "You can’t use
Markdown syntax inside block-level HTML tags. For example, italic and
**bold** won’t work."

See https://www.markdownguide.org/basic-syntax#html-best-practices

Could you fix ox-md.el to export links (and maybe other markupds) as
HTML inside a table ?

All the best






Emacs  : GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)
 of 2020-05-17, modified by Debian
Package: Org mode version 9.3.1 (9.3.1-dist @ 
/usr/share/emacs/site-lisp/elpa/org-9.3.1/)

current state:
==
(setq
 org-duration-format '((special . h:mm))
 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-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-refile-targets '(("~/private/gtd/gtd.org" :maxlevel . 3)
  ("~/private/gtd/someday.org" :level . 1)
  ("~/private/gtd/tickler.org" :maxlevel . 2))
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-agenda-files '("~/private/gtd/inbox.org" "~/private/gtd/gtd.org"
"~/private/gtd/tickler.org")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-plantuml-jar-path "/usr/share/plantuml/plantuml.jar"
 org-mode-hook '(#[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]
 org-eldoc-load)
 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-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-babel-load-languages '((emacs-lisp . t) (shell . t) (perl . t) (js . t) 
(plantuml . t))
 org-link-file-path-type 'relative
 org-export-backends '(md odt latex icalendar html ascii)
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-src-lang-modes '(("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-structure-template-alist '(("n" . "notes") ("a" . "export ascii") ("c" . 
"center")
("C" . "comment") ("e" . "example") ("E" . 
"export")
("h" . "export html") ("l" . "export latex") 
("q" . "quote")
("s" . "src") ("v" . "verse"))
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence "TODO(t)" "WAITING(w)" "|" "DONE(d)" 
"CANCELLED(c)"))
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-babel-tangle-lang-exts '(("vala" . "vala") ("ruby" . "rb") ("python" . 
"py")
  ("picolisp" . "l") ("ocaml" . "ml") ("maxima" . 
"max")
  ("lua" . "lua") ("lisp" . "lisp") ("LilyPond" . 
"ly")
  ("latex" . "tex") ("java" . "java") ("groovy" . 
"groovy")
  ("clojure" . "clj") ("D" . "d") ("C++" . "cpp")
  ("perl" . "pl") ("emacs-lisp" . "el") ("elisp" . 
"el"))
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :follow org-attach-open-link :export
 

Re: org-babel strange html print in R

2020-02-07 Thread Dominique Dumont
On Friday, 7 February 2020 14:38:53 CET Bastien wrote:
> This seems to be a *very* version of org-mode ;)

Bummer... I remember that I've used org-version to get the version number. I 
guess I have cut'n'pasted an unrelated number :-/

For the record, I've tested R and html output on Org mode version 9.3.1

Sorry for the confusion.

All the best

Dod 








Re: org-babel strange html print in R

2020-02-07 Thread Dominique Dumont
On Thursday, 6 February 2020 19:23:36 CET Jeremie Juste wrote:
> I've found that some strange results when outputing html from R.
> Do you have some insights on a potential solution?

On my system, org-mode 3.6.1 provides the expected table. 

All the best









Re: Refresher on including R/ggplot2 output via latex/pdf?

2019-10-28 Thread Dominique Dumont
On Monday, 28 October 2019 05:16:00 CET John Hendy wrote:
> I just went to use what I think is how I used to include ggplot2
> results in PDF experts, but it's not working.
[...]
> My test file:
> -
> * test
> 
> #+begin_src R :results output graphics :exports results :file foo.png
> library(ggplot2)
> 
> df <- data.frame(x=c(1, 2), y=c(2, 4))
> p <- ggplot(df, aes(x = x, y = y)) + geom_point()
> print(p)
> #+end_src

I had a similar issue to get plots in a revealjs export. Long story short, I 
solved the issue by adding these instructions at the end of the R script:

 grid::grid.newpage()
 grid::grid.draw(p)

Hope this helps





[O] Bug: ox-s5: level 1 headers show up as slide sub-title [9.2.3 (9.2.3-dist @ /usr/share/emacs/site-lisp/elpa/org-9.2.3/)]

2019-09-25 Thread Dominique Dumont



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

While exporting an orf file to s5 slide, I would expect h1 section to
show up as slide title. Instead they show up as slide subtitle.

I.e an org file containing:

* My Title

blah-blah


is exported with C-c C-e s o as:


1 My Title


blah-blah





I would expect "My Title" to be enclosed in a  tag, not in a 
tag.

Did I miss something ?

All the best

Dod


Emacs  : GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.11)
 of 2019-09-22, modified by Debian
Package: Org mode version 9.2.3 (9.2.3-dist @ /usr/share/emacs/site-lisp/elpa/
org-9.2.3/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-
edit-buffer)
 org-capture-prepare-finalize-hook '(ejira--sync-new-comment)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-with-sub-superscripts '{}
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-refile-targets '(("~/private/gtd/gtd.org" :maxlevel . 3)
  ("~/private/gtd/someday.org" :level . 1)
  ("~/private/gtd/tickler.org" :maxlevel . 2))
 org-html-format-inlinetask-function 'org-html-format-inlinetask-default-
function
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-agenda-files '("~/private/gtd/inbox.org" "~/private/gtd/gtd.org" "~/
private/gtd/tickler.org")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-plantuml-jar-path "/usr/share/plantuml/plantuml.jar"
 org-mode-hook '(#[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]
 org-eldoc-load)
 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-from-is-user-regexp "|\\"
 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 '((emacs-lisp . t) (shell . t) (perl . t) (js . t) 
(haskell . t)
(plantuml . t) (R . t))
 org-export-backends '(s5 confluence md beamer odt latex icalendar html ascii)
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-src-lang-modes '(("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-structure-template-alist '(("n" . "notes") ("a" . "export ascii") ("c" . 
"center")
("C" . "comment") ("e" . "example") ("E" . 
"export")
("h" . "export html") ("l" . "export latex") 
("q" . "quote")
("s" . "src") ("v" . "verse"))
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence "TODO(t)" "WAITING(w)" "|" "DONE(d)" 
"CANCELLED(c)"))
 org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-
activate)
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-
function
 org-babel-tangle-lang-exts '(("haskell" . "hs") ("perl" . "pl") ("emacs-lisp" 
. "el")
  ("elisp" . "el"))
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("eww" :follow eww :store org-eww-store-link)
   ("rmail" :follow org-rmail-open :store org-rmail-store-
link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link 
:export org-irc-export)
   ("info" :follow org-info-open :export