(error "Listing directory failed but ‘access-file’ worked")

2024-04-12 Thread Edgar Lux
Hello.

I got this in an Org file:

#+begin_src org
[[file:Figures/Ti19-g(w, eta={0.1,}, R=1e-3).svg]]
[[file:Figures/Ti19-g(w, eta={0.1,}, R=1e-3).png]]
#+end_src

The files exist, and can be viewed in image-mode (tested with src_bash{emacs 
-q}).
With =C-c C-o= src_emacs-lisp{(org-open-at-point)}, the result is:

#+begin_example
Debugger entered--Lisp error: (error "Listing directory failed but 
‘access-file’ worked")
  signal(error ("Listing directory failed but ‘access-file’ worked"))
  error("Listing directory failed but `access-file' worked")
  insert-directory("/tmp/Figures/Ti19-g(w, eta={0.1,}, R=1e-3).svg" "--dired 
-alth --group-directories-first" t nil)
  dired-insert-directory("/tmp/Figures/Ti19-g(w, eta={0.1,}, R=1e-3).svg" 
"-alth --group-directories-first" nil t t)
  dired-readin-insert()
  #f(compiled-function () #)()
  combine-change-calls-1(1 1 #f(compiled-function () #))
  dired-readin()
  dired-internal-noselect("/tmp/Figures/Ti19-g(w, eta={0.1,}, R=1e-3).svg" nil)
  dired-noselect("Figures/Ti19-g(w, eta={0.1,}, R=1e-3).svg" nil)
  dired("Figures/Ti19-g(w, eta={0.1,}, R=1e-3).svg")
  (if (string-match "[*?{]" (file-name-nondirectory file-name)) (dired 
file-name) (apply #'org-open-file file-name arg (cond ((not option) nil) 
((string-match-p "\\`[0-9]+\\'" option) (list (string-to-number option))) (t 
(list nil option)
  (let* ((option (and (string-match "::\\(.*\\)\\'" path) (match-string 1 
path))) (file-name (if (not option) path (substring path 0 (match-beginning 
0) (if (string-match "[*?{]" (file-name-nondirectory file-name)) (dired 
file-name) (apply #'org-open-file file-name arg (cond ((not option) nil) 
((string-match-p "\\`[0-9]+\\'" option) (list (string-to-number option))) (t 
(list nil option))
  org-link-open-as-file("Figures/Ti19-g(w, eta={0.1,}, R=1e-3).svg" nil)
  (let* ((option (org-element-property :search-option link)) (path (if option 
(concat path "::" option) path))) (org-link-open-as-file path (let* ((val 
(org-element-property :application link))) (cond (arg (let nil arg)) ((equal 
val '"emacs") (let nil 'emacs)) ((equal val '"sys") (let nil 'system))
  (let nil (let* ((option (org-element-property :search-option link)) (path (if 
option (concat path "::" option) path))) (org-link-open-as-file path (let* 
((val (org-element-property :application link))) (cond (arg (let nil arg)) 
((equal val '"emacs") (let nil 'emacs)) ((equal val '"sys") (let nil 
'system)))
  (cond ((equal type '"file") (let nil (let* ((option (org-element-property 
:search-option link)) (path (if option (concat path "::" option) path))) 
(org-link-open-as-file path (let* ((val ...)) (cond (arg ...) (... ...) (... 
...))) ((member type '("radio" "fuzzy" "custom-id" "coderef")) (let nil (if 
(run-hook-with-args-until-success 'org-open-link-functions path) nil (if (not 
arg) (org-mark-ring-push) (switch-to-buffer-other-window 
(org-link--buffer-for-internals))) (let ((destination (save-excursion ...))) 
(if (and (<= ... destination) (>= ... destination)) nil (widen)) (goto-char 
destination) (t (let nil (let ((f (org-link-get-parameter type :follow))) 
(if (functionp f) (progn (condition-case nil (funcall ... path arg) 
(wrong-number-of-arguments ...
  (let ((type (org-element-property :type link)) (path (org-element-property 
:path link))) (cond ((equal type '"file") (let nil (let* ((option 
(org-element-property :search-option link)) (path (if option ... path))) 
(org-link-open-as-file path (let* (...) (cond ... ... ...)) ((member type 
'("radio" "fuzzy" "custom-id" "coderef")) (let nil (if 
(run-hook-with-args-until-success 'org-open-link-functions path) nil (if (not 
arg) (org-mark-ring-push) (switch-to-buffer-other-window 
(org-link--buffer-for-internals))) (let ((destination ...)) (if (and ... ...) 
nil (widen)) (goto-char destination) (t (let nil (let ((f 
(org-link-get-parameter type :follow))) (if (functionp f) (progn 
(condition-case nil ... ...
  org-link-open((link (:type "file" :path "Figures/Ti19-g(w, eta={0.1,}, 
R=1e-3).svg" :format bracket :raw-link "file:Figures/Ti19-g(w, eta={0.1,}, 
R=1e-3).svg" :application nil :search-option nil :begin 1 :end 51 
:contents-begin nil :contents-end nil :post-blank 0 :parent (paragraph (:begin 
1 :end 103 :contents-begin 1 :contents-end 103 :post-blank 0 :post-affiliated 1 
:mode top-comment :granularity element :cached t :parent (section (:begin 1 
:end 103 :contents-begin 1 :contents-end 103 :robust-begin 1 :robust-end 101 
:post-blank 0 :post-affiliated 1 :mode first-section :granularity element 
:cached t :parent (org-data ...))) nil)
  (cond ((not type) (user-error "No link found")) ((memq type '(comment 
comment-block node-property keyword)) (call-interactively 
#'org-open-at-point-global)) ((memq type '(headline inlinetask)) 
(org-match-line org-complex-heading-regexp) (let ((tags-beg (match-beginning 
5)) (tags-end (match-end 5))) (if (and tags-beg (>= (point) tags-beg) (< 

Re: Feature request: exclude sub-trees by backend

2024-03-27 Thread Edgar Lux
Hi, I had a need for this again (sorry for the necro-bump).

On Feb 26, 2024 at 5:51 PM, Ihor Radchenko  wrote:
> The suggestions to use backend-specific export tag in the links are used
> as ugly workarounds...

Ok. It was just to show that there are other people who may use it :) .

> As for ignore-heading, ...
> ... the author of Org export system
> repeatedly opposed it. This is why:
> https://list.orgmode.org/87mwdfzmox@nicolasgoaziou.fr/

Ok. Sorry. I should have assumed (or looked for) that there was a reason :) .

-- 
Sent with https://mailfence.com  
Secure and private email



Feature request: exclude sub-trees by backend

2024-02-22 Thread Edgar Lux
Hello!

I am trying to exclude different sub-trees (a.k.a. headings or sections), 
depending on the exporter backend. I am familiar with =:noexport:= to exclude 
selected sections (disregarding the backend). I found a solution, but it is 
only intended for a specific backend:

https://emacs.stackexchange.com/a/76454

I would like to recommend that such a thing is implemented for any backend. So 
that :noexport_X: (where X is a backend) is excluded. Something like:

* Not for html   :noexport_html:

* For HTML   :noexport_latex:

Thank you!



-- 
Sent with https://mailfence.com  
Secure and private email



Re: [BUG] Warning when creating preview

2023-10-09 Thread Edgar Lux
On Oct 9, 2023 at 3:59 PM

if I comment out the (add-hook 'org-mode-hook #'org-indent-mode), the error is 
gone

-- 
Sent with https://mailfence.com  
Secure and private email

-- 
Sent with https://mailfence.com  
Secure and private email



Re: [BUG] Warning when creating preview

2023-10-09 Thread Edgar Lux
On Oct 9, 2023 
> #--- bug.org
> \(a = 1\)
> #---

further, if you stay "inside" the equation and do C-u C-c C-x C-l (to remove 
the preview) and try to show it again with C-c C-x C-l, the preview is not 
regenerated, but the minibuffer shows =Creating LaTeX previews in section... 
done.=

-- 
Sent with https://mailfence.com  
Secure and private email


init.el.gz
Description: File Attachment: init.el.gz


[BUG] short TeX & in-text code highlighting [9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)]

2023-10-02 Thread Edgar Lux
I'm almost sure that this is known, but I don't want to assume.

I get the text between ~ ~ with colouring as if it was in-text code
snippet. I found it interesting

\(a ~b\) and \(\int_{\Omega}fv~\mathrm{d}\)

Emacs  : GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, 
cairo version 1.17.8)
Package: Org mode version 9.6.6 (release_9.6.6 @ 
/usr/share/emacs/29.1/lisp/org/)
 

-- 
Sent with https://mailfence.com  
Secure and private email



Re: [BUG] Warning when creating preview

2023-10-02 Thread Edgar Lux
Nope, there is still something wrong with my config (see attachment). Haven't 
been able to reproduce consistently.

-- 
Sent with https://mailfence.com  
Secure and private email


log.gz
Description: File Attachment: log.gz


language-specific org-babel-noweb-wrap-start?

2023-10-02 Thread Edgar Lux
Hi!

I wish you a nice day, week, month...
I would like to know if there is a way to set =org-babel-noweb-wrap-start= for 
a specific language. If I set that variable to a value, it will apply to all of 
them. Thank you.

This is fine right now
#+begin_src lang1 :noweb yes
//;name_of_anoter_block;//
#+end_src

# Local Variables:
# org-babel-noweb-wrap-start: "//;"
# org-babel-noweb-wrap-end: ";//"
# End:

What I would like is something like

#+begin_src lang1 :noweb yes
//;name_of_anoter_block;//
#+end_src

# Local Variables:
# org-babel-noweb-wrap-start_lang1: "//;"
# org-babel-noweb-wrap-end_lang1: ";//"
# End:

Thanks!

-- 
Sent with https://mailfence.com  
Secure and private email



Re: [BUG] Warning when creating preview

2023-09-28 Thread Edgar Lux
I forgot to say that now:

"9.7-pre"
GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo 
version 1.17.8)

-- 
Sent with https://mailfence.com  
Secure and private email

-- 
Sent with https://mailfence.com  
Secure and private email



Re: [BUG] Warning when creating preview

2023-09-28 Thread Edgar Lux
On Aug 28, 2023 at 11:00 AM, Ihor Radchenko  wrote:Edgar 
Lux  writes:

> On Aug 27, 2023 at 7:29 PM, Ihor Radchenko  wrote:
>> I recommend https://github.com/Malabarba/elisp-bug-hunter to narrow down
>> which part of the config is the culprit.
>
> We have a winner:

Another winner? I am not getting the bug anymore

  ;; THIS SUCKS!
  ;; ;; Set soft line wrapping (only on screen, not adding
  ;; ;; newlines to files)
  ;; (remove-hook 'org-mode-hook #'turn-on-auto-fill)
  ;; (add-hook 'org-mode-hook
  ;;   (lambda ()
  ;; (turn-on-visual-line-mode)
  ;; ;; Visual indent
  ;; (org-indent-mode)
  ;; ;; Turn off hard wrapping
  ;; ;; (adding newlines to text)
  ;; (auto-fill-mode -1)
  ;; ;; Align tags from right to
  ;; ;; left to the width of the column
  ;; ;; (setq org-tags-column -60)
  ;; (setq org-tags-column
  ;;   (- 3 fill-column

  ;; No more error
  ;; Set soft line wrapping (only on screen, not adding
  ;; newlines to files)
  (remove-hook 'org-mode-hook #'turn-on-auto-fill)
  (add-hook 'org-mode-hook #'turn-on-visual-line-mode)
  ;; Visual indent
  (add-hook 'org-mode-hook #'org-indent-mode)
  ;; Turn off hard wrapping
  ;; (adding newlines to text)
  (add-hook 'org-mode-hook (lambda () (auto-fill-mode -1)))
  ;; Align tags from right to
  ;; left to the width of the column
  ;; (setq org-tags-column -60)
  (add-hook 'org-mode-hook (lambda () (setq org-tags-column
(- 3 fill-column


-- 
Sent with https://mailfence.com  
Secure and private email



Re: [BUG] Warning when creating preview

2023-08-27 Thread Edgar Lux



On Aug 27, 2023 at 1:28 PM, Ihor Radchenko  wrote:

>>> 9. M-& make repro REPRO_ARGS="-l /tmp/bug.el /tmp/bug.org"

> Please run this command from terminal.
> It should spawn a clean Emacs instance with Org version from the repository.

No warning after   C-c C-x C-l(2x)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 

-- 
Sent with https://mailfence.com  
Secure and private email



Re: [BUG] Warning when creating preview

2023-08-27 Thread Edgar Lux
On Aug 26, 2023 at 6:28 PM, Ihor Radchenko  wrote:

> Did you see a new Emacs instance at this point?

Nope. I just launched Emacs again (there is another instance running) and 
copied the command

>> 9. M-& make repro REPRO_ARGS="-l /tmp/bug.el /tmp/bug.org"

Shell buffer shows
#+begin_example
  make -C doc cleanall;  make -C etc cleanall;  make -C lisp cleanall;
  make[1]: Entering directory '/path/to/org/repo/doc'
  rm -f *.pdf *.html *.info *_letter.tex org-version.inc org-version.tex \
*.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs *.toc \
*.tp *.tps *.vr *.vrs *.log *.ps
  rm -f org.texi orgguide.texi
  rm -fr guide manual
  make[1]: Leaving directory '/path/to/org/repo/doc'
  make[1]: Entering directory '/path/to/org/repo/etc'
  make[1]: Nothing to be done for 'cleanall'.
  make[1]: Leaving directory '/path/to/org/repo/etc'
  make[1]: Entering directory '/path/to/org/repo/lisp'
  rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc 
org-install.elc
  rm -f *.elc
  make[1]: Leaving directory '/path/to/org/repo/lisp'
  rm -fr /tmp/tmp-orgtest || { \
find /tmp/tmp-orgtest -type d -exec chmod u+w {} + && \
rm -fr /tmp/tmp-orgtest ; \
  }
  find . \( -name \*~ -o -name \*# -o -name .#\* \) -exec rm -f {} +
  find testing mk \( -name \*~ -o -name \*.elc \) -exec rm -f {} +
  make -C lisp autoloads
  make[1]: Entering directory '/path/to/org/repo/lisp'
  rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc 
org-install.elc
  org-version: 9.7-pre (release_9.6.7-698-g3cbd9f)
  Loading /path/to/org/repo/lisp/org-compat.el (source)...
  Loading /path/to/org/repo/mk/org-fixup.el (source)...
  org-loaddefs: 9.7-pre (release_9.6.7-698-g3cbd9f)
  Loading /path/to/org/repo/lisp/org-compat.el (source)...
  Loading /path/to/org/repo/mk/org-fixup.el (source)...
  make[1]: Leaving directory '/path/to/org/repo/lisp'
#+end_example

-- 
Sent with https://mailfence.com  
Secure and private email



Re: [BUG] Warning when creating preview

2023-08-26 Thread Edgar Lux
On Aug 23, 2023 at 9:56 AM, Ihor Radchenko 
> 1. Save the equation to file /tmp/bug.org
> 2. Save your `setq' snippet to /tmp/bug.el
> 3. cd /path/to/org/repo
> 4. make repro REPRO_ARGS="-l /tmp/bug.el /tmp/bug.org"
> 5. Move point to "t = 0" line
> 6. C-c C-x C-l (2x)
> 7. The preview appears and then disappears, as expected.
>
> May you please repeat my steps and let me know if your are seeing the warning?

1. emacs (loading my full configuration)
2. find the file of my previous bug report: t.org
3. dedent and mark the equation (without the =_quote=)
4. M-x copy-to-buffer RET bug.org RET
5. Save to /tmp/bug.org
6. add :tangle /tmp/bug.el to the emacs-lisp source block
7. C-u C-c C-v t to tangle (save) the file
8. find /path/to/org/repo (with dired)
9. M-& make repro REPRO_ARGS="-l /tmp/bug.el /tmp/bug.org"
10. M-x switch-to-buffer RET /tmp/bug.org RET
11. Move point to "t = 0" line
12. C-c C-x C-l (2x)

I see the warning.

After step 10, I removed the files in ltximg, ran =emacs -q=, find file 
/tmp/bug.org, step 11 & 12, and I see no warning. There must be something else 
in my configuration which triggers the error (if you want to follow the rabbit, 
let me know).

In this case, the warning was:

#+begin_example
  Warning (org-element-cache): org-element--cache: Org parser error in 
bug.org::22. Resetting.
   The error was: (error "Invalid search bound (wrong side of point)")
   Backtrace:
  "  backtrace-to-string(nil)
org-element-at-point()
org-element-context()
org-latex-preview(nil)
funcall-interactively(org-latex-preview nil)
call-interactively(org-latex-preview nil nil)
command-execute(org-latex-preview)
  "
   Please report this to Org mode mailing list (M-x org-submit-bug-report). 
Disable showing Disable logging
#+end_example

-- 
Sent with https://mailfence.com  
Secure and private email



Re: [BUG] Warning when creating preview

2023-08-22 Thread Edgar Lux
On Aug 18, 2023 at 6:04 PM, Ihor Radchenko  wrote:

> May you try to install the latest stable Org first, following
> https://orgmode.org/manual/Installation.html? You should get M-x
> org-version printing Org 9.6.7.

> Then, let us know if the warning keeps appearing.

* What happens

When I type some equations and get the preview, I get this warning

* Steps to reproduce

1. Type this equation

   #+begin_quote
   \begin{gather}
   t = 0
   \end{gather}
   #+end_quote

2. Ask for preview =C-c C-x C-l= with point on the equation

3. Ask to remove preview (without moving point) =C-c C-x C-l=

4. You get the message (below)

If you repeat 1--3, the message is gone. It comes back if you remove the 
=./ltximg/.svg=

* My "system"

#+begin_src emacs-lisp
  (setq org-latex-pdf-process
'("xelatex -file-line-error -no-pdf -interaction nonstopmode 
-shell-escape -output-directory %o %f"
  ;; Check this too: https://tex.stackexchange.com/a/455164
  "[[ -f %o/%b.idx ]] && texindy %o/%b.idx"
  ;; https://stackoverflow.com/a/57734531
  ;; "latexmk -pdfxe -bibtex %F") ; gives issues with silly errors
  "latexmk -shell-escape -f -pdfxe -bibtex %F")

;; https://emacs.stackexchange.com/a/33172
org-preview-latex-process-alist
(quote ((dvisvgm :programs ("xelatex" "dvisvgm")
:description "dvi > svg"
:message ((concat
  "you need to install the programs: "
  "xelatex and dvisvgm."))
:use-xcolor t
:image-input-type "xdv"
:image-output-type "svg"
:image-size-adjust (1.3 . 1.5)
:latex-compiler ("xelatex -no-pdf -interaction nonstopmode 
-output-directory %o %f")
:image-converter ("dvisvgm %o%b.xdv -n -b min -c %S -o %O"))
))

org-preview-latex-default-process 'dvisvgm)
#+end_src

#+begin_src emacs-lisp
  (format "%s\n%s"
  (org-version)
  (emacs-version))
#+end_src

#+RESULTS:
: 9.7-pre
: GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo 
version 1.17.6)
:  of 2023-01-03

Org commit: 3cbd9f423385bf725dc964a5cff573bba17db3ff

* The message

#+begin_example
  Warning (org-element-cache): org-element--cache: Org parser error in 
t.org::189. Resetting.
   The error was: (error "Invalid search bound (wrong side of point)")
   Backtrace:
  "  backtrace-to-string(nil)
org-element-at-point()
org-element-context()
org-latex-preview(nil)
funcall-interactively(org-latex-preview nil)
call-interactively(org-latex-preview nil nil)
command-execute(org-latex-preview)
  "
   Please report this to Org mode mailing list (M-x org-submit-bug-report). 
Disable showing Disable logging
#+end_example


-- 
Sent with https://mailfence.com  
Secure and private email



Re: [BUG] Warning when creating preview

2023-08-18 Thread Edgar Lux
On Aug 18, 2023 at 6:04 PM, Ihor Radchenko  wrote:Edgar 
Lux  writes:

> The Org version is very strange. Emacs 28 ships with Org 9.5.5 and the
> latest stable version of Org available on ELPA is Org 9.6.7. The warning
> comes from Org >9.6.

Super weird. I don't know why I ended up in some 9.4 branch (a246a1318), and 
when I did checkout master, I would still be there. Now in 9.7-pre

> Then, let us know if the warning keeps appearing.

I saw you holding your breath :P .

THAAANKS

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 

-- 
Sent with https://mailfence.com  
Secure and private email



[BUG] Warning when creating preview

2023-08-18 Thread Edgar Lux
Hi,

I don't really need help with this. Org has been telling me for days that I 
should report this, but I don't really want to share my configuration publicly, 
and I thought that it was only for a file on which I was working. It seems to 
be general for my configuration. I hope that it helps. If you have an encrypted 
personal account to which I can send my config file, let me know.

* What happens

When I type some equations and get the preview, I get this warning

#+begin_quote
\begin{gather}
t = 0
\end{gather}
#+end_quote

* My "system"

Emacs  : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, 
cairo version 1.17.6)
 of 2023-01-03
Package: Org mode version 9.4.6 (release_9.4.6-13-g4be129)

* The message

Warning (org-element-cache): org-element--cache: Org parser error in t.org::35. 
Resetting.
 The error was: (error "Invalid search bound (wrong side of point)")
 Backtrace:
"  backtrace-to-string(nil)
  (progn (backtrace-to-string (backtrace-get-frames 'backtrace)))
  (if (and (fboundp 'backtrace-get-frames) (fboundp 'backtrace-to-string)) 
(progn (backtrace-to-string (backtrace-get-frames 'backtrace
  (format \"Org parser error in %s::%S. Resetting.\\n The error ...\" 
(buffer-name (current-buffer)) epom err (if (and (fboundp 
'backtrace-get-frames) (fboundp 'backtrace-to-string)) (progn 
(backtrace-to-string (backtrace-get-frames 'backtrace)
  (let* ((format-string (format \"Org parser error in %s::%S. Resetting.\\n The 
error ...\" (buffer-name (current-buffer)) epom err (if (and (fboundp 
'backtrace-get-frames) (fboundp 'backtrace-to-string)) (progn 
(backtrace-to-string (backtrace-get-frames ...)) (format-string (if (or 
(not org-element--cache-diagnostics-ring) (not (eq 'backtrace 
org-element--cache-self-verify))) format-string (prog1 (concat (format 
\"Warning(%s): \" (buffer-name ...)) format-string \"\\nBacktrace:\\n  \" 
(mapconcat #'identity (ring-elements org-element--cache-diagnostics-ring) \"\\n 
 \")) (setq org-element--cache-diagnostics-ring nil) (if (and (boundp 
'org-batch-test) org-batch-test) (error \"%s\" (concat \"org-element--cache: \" 
format-string)) (display-warning 'org-element-cache (concat 
\"org-element--cache: \" format-string
  (condition-case err (org-element--parse-to epom) ((debug error) (let* 
((format-string (format \"Org parser error in %s::%S. Resetting.\\n The error 
...\" (buffer-name (current-buffer)) epom err (if (and ... ...) (progn ... 
(format-string (if (or (not org-element--cache-diagnostics-ring) (not ...)) 
format-string (prog1 (concat ... format-string \"\\nBacktrace:\\n  \" ...) 
(setq org-element--cache-diagnostics-ring nil) (if (and (boundp 
'org-batch-test) org-batch-test) (error \"%s\" (concat \"org-element--cache: \" 
format-string)) (display-warning 'org-element-cache (concat 
\"org-element--cache: \" format-string (org-element-cache-reset) 
(org-element--parse-to epom)))
  (if cached-only (if (and (org-element--cache-active-p) (or (not 
org-element--cache-sync-requests) (< epom (aref (car 
org-element--cache-sync-requests) 1 (progn (org-element--cache-find epom))) 
(condition-case err (org-element--parse-to epom) ((debug error) (let* 
((format-string (format \"Org parser error in %s::%S. Resetting.\\n The error 
...\" (buffer-name ...) epom err (if ... ...))) (format-string (if (or ... ...) 
format-string (prog1 ... ... (if (and (boundp 'org-batch-test) 
org-batch-test) (error \"%s\" (concat \"org-element--cache: \" format-string)) 
(display-warning 'org-element-cache (concat \"org-element--cache: \" 
format-string (org-element-cache-reset) (org-element--parse-to epom
  (setq element (if cached-only (if (and (org-element--cache-active-p) (or (not 
org-element--cache-sync-requests) (< epom (aref (car 
org-element--cache-sync-requests) 1 (progn (org-element--cache-find epom))) 
(condition-case err (org-element--parse-to epom) ((debug error) (let* 
((format-string (format \"Org parser error in %s::%S. Resetting.\\n The error 
...\" ... epom err ...)) (format-string (if ... format-string ...))) (if (and 
(boundp ...) org-batch-test) (error \"%s\" (concat \"org-element--cache: \" 
format-string)) (display-warning 'org-element-cache (concat 
\"org-element--cache: \" format-string (org-element-cache-reset) 
(org-element--parse-to epom)
  (let (element) (if (org-element--cache-active-p) (progn (if (not 
org-element--cache) (org-element-cache-reset) (if cached-only nil 
(org-element--cache-sync (current-buffer) epom) (setq element (if 
cached-only (if (and (org-element--cache-active-p) (or (not 
org-element--cache-sync-requests) (< epom (aref ... 1 (progn 
(org-element--cache-find epom))) (condition-case err (org-element--parse-to 
epom) ((debug error) (let* ((format-string ...) (format-string ...)) (if (and 
... org-batch-test) (error \"%s\" ...) (display-warning ... ...))) 
(org-element-cache-reset) (org-element--parse-to epom) (if (and 

Re: How to preserve indentation of title inside a latex src block when exporting to LaTeX?

2023-08-15 Thread Edgar Lux
This didn't work (I tried)

  ;; Indent title 
  (defun my-latex-filter-indent-title (text backend info)
"Ensure \"\\title\" is indented in LaTeX export."
(when (org-export-derived-backend-p backend 'latex)
  (replace-regexp-in-string
   ;; (rx (group (and (syntax escape) "title")))
   ;; (rx (and "  " (backref 1))) text)))
   "title"
   "  title" text)))

  (make-local-variable 'org-export-filter-plain-text-functions)
  (add-to-list 'org-export-filter-plain-text-functions
   'my-latex-filter-indent-title)
  ;;  indent title ends


On Aug 15, 2023 at 12:35 PM, Edgar Lux  wrote:Hello. 
How to preserve indentation of title inside a latex src block when
exporting to LaTeX?

For (annoying) reasons, I need a frontmatter block which is able to indent its
contents. I am almost there, but the title line is not. I can edit this
manually after export, but I would like to know if there is a way to do this...
wait... there are filters. Is a filter the only solution? Thanks. 

#+options: toc:nil title:nil timestamp:nil

#+begin_src emacs-lisp
  (org-babel-do-load-languages 
 'org-babel-load-languages 
 '( (latex   . t) ))
#+end_src

#+begin_frontmatter
  #+begin_src latex -i :exports results :eval yes :results replace
  \title{Determine in-situ matrix properties}
  \nothing{a}
  #+end_src
#+end_frontmatter

#+caption: Notice that title is not indented, but nothing is.
#+results:
: \begin{frontmatter}
: \title{Determine in-situ matrix properties}
:  \nothing{a}
: \end{frontmatter}

#+begin_src emacs-lisp
  (concat (emacs-version) "\n" (org-version))
#+end_src

#+RESULTS:
: GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo
version 1.17.6)
:  of 2023-01-03
: 9.5.5

-- 
Sent with https://mailfence.com  
Secure and private email

-- 
Sent with https://mailfence.com  
Secure and private email



How to preserve indentation of title inside a latex src block when exporting to LaTeX?

2023-08-15 Thread Edgar Lux
Hello. How to preserve indentation of title inside a latex src block when 
exporting to LaTeX?

For (annoying) reasons, I need a frontmatter block which is able to indent its 
contents. I am almost there, but the title line is not. I can edit this 
manually after export, but I would like to know if there is a way to do this... 
wait... there are filters. Is a filter the only solution? Thanks. 

#+options: toc:nil title:nil timestamp:nil

#+begin_src emacs-lisp
  (org-babel-do-load-languages 
 'org-babel-load-languages 
 '( (latex   . t) ))
#+end_src

#+begin_frontmatter
  #+begin_src latex -i :exports results :eval yes :results replace
  \title{Determine in-situ matrix properties}
  \nothing{a}
  #+end_src
#+end_frontmatter

#+caption: Notice that title is not indented, but nothing is.
#+results:
: \begin{frontmatter}
: \title{Determine in-situ matrix properties}
:  \nothing{a}
: \end{frontmatter}

#+begin_src emacs-lisp
  (concat (emacs-version) "\n" (org-version))
#+end_src

#+RESULTS:
: GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo 
version 1.17.6)
:  of 2023-01-03
: 9.5.5

-- 
Sent with https://mailfence.com  
Secure and private email



#+startup: noalign & C-c }

2023-08-14 Thread Edgar Lux
Hi! Is there a way to prevent resizing of a table with 
=org-table-toggle-coordinate-overlays=?

#+caption: there are some extra spaces after =1=, and before and after =b=.
#+begin_src org
,#+startup: noalign

| 1 | 2 |   b   |
#+end_src

When typing C-c } (command for =org-table-toggle-coordinate-overlays=) and then 
C-c } again to get out of that mode, the cells become

#+caption: the spaces are gone
#+begin_src org
| 1 | 2 | b |
#+end_src

#+begin_src emacs-lisp
  (emacs-version)
#+end_src

#+RESULTS:
: GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo 
version 1.17.6)
:  of 2023-01-03

#+begin_src emacs-lisp
  (org-version)
#+end_src

#+RESULTS:
: 9.5.5

Thanks! 

P.S. Is it polite that I reply with a thanks? or is it better to stay silent to 
avoid the extra e-mail (reading on your side)?

-- 
Sent with https://mailfence.com  
Secure and private email



Re: how can I get the output of a =#+begin_src org= in the current buffer?

2023-08-12 Thread Edgar Lux
Thanks!!!

Regarding the typo, it does not show here. But in the info buffer, the =(see 
*note...= becomes (see see ...).

See (:P) attachment

On Aug 12, 2023 at 1:07 PM, Ihor Radchenko  wrote:Edgar 
Lux  writes:

> #+begin_src org
>   #+latex_header: \usepackage{nil}
> #+end_src
>
> What I want is to get =#+latex_header: \usepackage{nil}= in the current
buffer. The documentation (Org-info and the docstring of
=org-babel-execute-src-block=) says that this command would
> #+begin_quote
> Insert the results of execution into the buffer
> #+end_quote
>
> Tips, advice? Thank you!

See https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-org.html
You need

#+begin_src org :results replace
  #+latex_header: \usepackage{nil}
#+end_src

> - There is a typo in the info pages (parses as see see; remove see from
below):
>   (org) Results of Evaluation
>   #+begin_quote
>The ‘file-desc’ header argument defines the description (see *note
>  Link Format::) for the link
>   #+end_quote

May you elaborate?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 

-- 
Sent with https://mailfence.com  
Secure and private email


how can I get the output of a =#+begin_src org= in the current buffer?

2023-08-12 Thread Edgar Lux
Hello, how can I get the output of a =#+begin_src org= in the current buffer?

#+begin_src emacs-lisp
  (org-babel-do-load-languages 
 'org-babel-load-languages 
 '((shell   . t)
   (latex   . t)
   (emacs-lisp  . t)
   (org . t)
   ))
#+end_src

#+caption: This shows the contents of the block in the mini-buffer with =C-c 
C-v e= (=org-babel-execute-maybe=)
#+begin_src org
  #+latex_header: \usepackage{nil}
#+end_src

What I want is to get =#+latex_header: \usepackage{nil}= in the current buffer. 
The documentation (Org-info and the docstring of =org-babel-execute-src-block=) 
says that this command would
#+begin_quote
Insert the results of execution into the buffer
#+end_quote

Tips, advice? Thank you!

Org 9.4.6
Emacs 28.2
Linux

P.S.
- I saw this, but it is unrelated (a src block inside another src block).
https://emacs.stackexchange.com/questions/35489/babel-src-block-inside-src-block
- There is a typo in the info pages (parses as see see; remove see from below):
  (org) Results of Evaluation
  #+begin_quote
   The ‘file-desc’ header argument defines the description (see *note
 Link Format::) for the link
  #+end_quote

-- 
Sent with https://mailfence.com  
Secure and private email



Re: keep intermediary tex from latex preview

2023-06-05 Thread Edgar Lux
By the way, using Ihor's suggestion, I was able to debug the issue. There is 
nothing wrong with my configuration. The issue is that the font cannot deal 
with that symbol, and LaTeX just skips it. Still, it would be convenient not to 
have to create a separate .tex to debug the preview. Thanks!

On Jun 5, 2023 at 11:34 AM, Edgar Lux  wrote:When using 
xetex and dvisvgm, an equation like this:

\(µp\)

will render as p (see attached file), most likely because my configuration is
wrong. I don't know how I fixed it for another buffer, but then I restart
and--without knowing what happened--the "no-µ" behaviour is back.  Also (I am
not saying that I have a test case), some times the PDF is produced correctly,
but the preview isn't. Also, in the past, I have noticed that the (failed) .tex
for a (wrong) preview is slightly different. When the equation is definitely
wrong, I get to see the .tex in =/tmp/=, but the Emacs + LaTeX configuration is
so versatile that I get an output even if I type =\({µp\)= (which is a good
feature in most cases). Right now, 

1. setting (setq org-latex-pdf-process '("cp %f /tmp/debug.tex"))
2. reloading Org (org-reload) and
3. creating a new Org buffer 
4. preview or export to PDF 

does not produce =/tmp/debug.tex=. I hope that I was able to describe my
situation. Right now, I will look into =org-latex-packages-alist= again. I want
to say that I appreciate Emacs and Org very much. Thank you.

On Jun 4, 2023 at 5:52 PM, Timothy  wrote:Hi Edgar,

> Looks promising!
> Is the functionality which I mentioned there as well? (get the .tex for the
preview even in absence of error)

Currently, no. Could you elaborate on why you’re interested in this
functionality?

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/tec>.

-- 
Sent with https://mailfence.com  
Secure and private email

-- 
Sent with https://mailfence.com  
Secure and private email



Re: keep intermediary tex from latex preview

2023-06-05 Thread Edgar Lux
When using xetex and dvisvgm, an equation like this:

\(µp\)

will render as p (see attached file), most likely because my configuration is 
wrong. I don't know how I fixed it for another buffer, but then I restart 
and--without knowing what happened--the "no-µ" behaviour is back.  Also (I am 
not saying that I have a test case), some times the PDF is produced correctly, 
but the preview isn't. Also, in the past, I have noticed that the (failed) .tex 
for a (wrong) preview is slightly different. When the equation is definitely 
wrong, I get to see the .tex in =/tmp/=, but the Emacs + LaTeX configuration is 
so versatile that I get an output even if I type =\({µp\)= (which is a good 
feature in most cases). Right now, 

1. setting (setq org-latex-pdf-process '("cp %f /tmp/debug.tex"))
2. reloading Org (org-reload) and
3. creating a new Org buffer 
4. preview or export to PDF 

does not produce =/tmp/debug.tex=. I hope that I was able to describe my 
situation. Right now, I will look into =org-latex-packages-alist= again. I want 
to say that I appreciate Emacs and Org very much. Thank you.

On Jun 4, 2023 at 5:52 PM, Timothy  wrote:Hi Edgar,

> Looks promising!
> Is the functionality which I mentioned there as well? (get the .tex for the
preview even in absence of error)

Currently, no. Could you elaborate on why you’re interested in this
functionality?

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/tec>.

-- 
Sent with https://mailfence.com  
Secure and private email


Re: keep intermediary tex from latex preview

2023-06-04 Thread Edgar Lux
On Jun 4, 2023 at 8:34 AM, Ihor Radchenko  wrote:
> In short no.
> And we are also in the process of refactoring the preview system:
> https://list.orgmode.org/orgmode/87lek2up0w@tec.tecosaur.net/

Looks promising!
Is the functionality which I mentioned there as well? (get the .tex for the 
preview even in absence of error)

> You may, however, try to narrow the buffer to the latex fragment of
> interest and then export body to latex via C-c C-e dispatch.

Thanks!

-- 
Sent with https://mailfence.com  
Secure and private email



keep intermediary tex from latex preview

2023-06-03 Thread Edgar Lux
Hello, this has possibly been asked before, but (OMFG) I haven't been able to 
find it (sorry). How can I keep the .tex file used to generate a latex preview 
from an Org buffer (or file)? (the closest that I got was 
=org-latex-logfiles-extensions=). I can usually see such file in =/tmp= if the 
preview fails. Thanks.

Org 9.4.6
Emacs 28.2 x86_64-pc-linux-gnu

-- 
Sent with https://mailfence.com  
Secure and private email



Re: [BUG] #+cite_export: ... bibstyle citestyle cannot be universally used as global defaults (was: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite)

2023-02-05 Thread Edgar Lux
Dear Ihor,

On Feb 4, 2023 at 12:31 PM, Ihor Radchenko  wrote:Edgar 
Lux  writes:

> For example, ... the proposed idea is
> a bit awkward:
>
> ...
> #+cite_export: processor[opt1=val1,opt2=val2,...] bibliography-style[...]
> citation-style[...]
>
> I assumed that there is one "major" bibliography-style/citation-style.
> However, it is not really the case in practice. The styles are combined.

First of all, I quickly glanced at the other citation processors, and they seem 
to have been implemented with a different design in Org. This *may* have to do 
with biblatex being more advanced (disclaimer: I'm not saying that it actually 
is, it's a possibility only).

If the idea is that all processors are going to get the same syntax, I think 
that the implementation may not suit one of them. At that point, it may be that 
the filters will have to be adapted to specific processors in contrived ways. 
This of course will be much dependent on the choice of processors chosen to be 
supported by Org. Some other groups may decide to implement, for example, the 
JabRef #+cite_export (this does not imply that JabRef is a citation processor, 
it's just a colourful example).

> For example, adding links to bibliography to citations is applied
> regardless of the particular citation command being used.
>
> So, I am not leaning closer to only allowing options being passed to
> "processor", but not to styles. This will at least come closer to
> certain settings being citation package global config applied to
> everything. If we have options applied to specific citation commands,
> they will rather fit into citation-style/sub-style.
>
> #+cite_export: processor[opt1=val1,opt2=val2,...] bibliography-style
> citation-style

If it were me, I would consider just having the options as =#+cite_export: 
processor :options "anything"=. If the bibliography-style is important for the 
user and processor, may be default values can be provided; and let the user 
read some documentation option which are needed to run her particular processor 
(provided by them, not necessarily Org). Again, being completely honest, I 
don't think that you should put a dummy (like me) making these very relevant 
decisions.

-- 
Sent with https://mailfence.com  
Secure and private email



Re: [BUG] #+cite_export: ... bibstyle citestyle cannot be universally used as global defaults (was: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite)

2023-02-03 Thread Edgar Lux
On Jan 24, 2023 at 11:54 AM, Ihor Radchenko  wrote:Edgar 
Lux  writes:

> I understand. My takeaway from here is that there is a need to provide
> extended global defaults for both bibliography style and citation style.
> 
> Which is a questionable design choice. I was referring to higher-level
> docstring for `org-cite-export-processors':
> 
>   (NAME BIBLIOGRAPHY-STYLE CITATION-STYLE)
> 
> There, NAME is the name of a registered citation processor providing
> export
> functionality, as a symbol.  BIBLIOGRAPHY-STYLE (respectively
> CITATION-STYLE)
> is the desired default style to use when printing a bibliography
> (respectively
> exporting a citation), as a string or nil.  Both BIBLIOGRAPHY-STYLE and
> CITATION-STYLE are optional.  NAME is mandatory.
> 
> oc-biblatex simply deviates from the global paradigm, making oc-biblatex
> special compared to other citation processors. Not ideal.
> 
> I think that we have a fundamental design flaw with org-cite:
> 
> #+cite_export: processor bibliography-style citation-style
> 
> introduces:
> 
>  - default bibliography style set document-wide
>  - default citation style set individually in every citation via
>   low-level commands, BUT NOT GLOBAL DEFAULT CITATION STYLE.
> 
> Basically, CITATION_STYLE cannot currently affect document preamble by
> design.
> 
> That's why awkward workarounds in oc-biblatex, where default citation
> style can be set globally, and we have to attach citation style to
> BIBLIOGRAPHY_STYLE keyword.
> 
> I suggest the following changes to the org-cite:
> 
> 1. :export-finalizer should accept export processor triplet instead of
>bibliography style as 4th argument. The assumption that only
>bibliography style is required to finalize the export is clearly not
>accurate.
> 
> 2. Allow passing extra arguments in #+cite_export:
> 
> #+cite_export: processor[opt1=val1,opt2=val2,...] bibliography-style[...]
> citation-style[...]
> 
>   The options listed within the square brackets will pass extra default
> options
>   to the processor/styles and used as needed by citation processor
> implementations.
> 
> WDYT?
> -- 
> Ihor Radchenko // yantar92,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 

Dear Ihor and Org mailing list,

I wanted to answer last weekend, because I had the intention to contribute a 
little in terms of code. However, I was very busy, and I will be very busy this 
weekend as well. All in all, the idea sounds great. I appreciate that my 
opinion is taken into account, but I know very little about citation systems. I 
was only a bit concerned about the effort which is needed to implement the 
changes, as little as they may be. 



-- 
Sent with https://mailfence.com  
Secure and private email



Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite

2023-01-23 Thread Edgar Lux
On Jan 23, 2023 at 12:06 PM, Ihor Radchenko  wrote:Edgar 
Lux  writes:
> So, what is the problem with LATEX_HEADER approach?

I thought that it would be preferable to have a native Org syntax.

> I do not like passing the options as-is in #+cite_export because not all
> the possible biblatex \usepackage options are affecting the
> bibliography. Options like sortcites, maxcitenames, autocite, etc are
> only affecting the citation style, not the bibliography. And options
> like bibencoding are totally irrelevant to both citation and
> bibliography styles.

That's fair, but it can just as well be used as a line to configure biblatex 
(since it is already being used anyway). Besides, there are many other options 
which do concern the style or are very needed 
(hyperref=true,backref=true,url=true,backend=biber,natbib=true). I'm not 
advocating for my suggestion, just showing my reasoning. As I said, I'm fine 
with the =#+latex_header:=.

> > 1. case
> >#+begin_src org
> >  #+cite_export: biblatex "how/much"
> >#+end_src
> >
> >the result is
> >#+begin_src latex
> >  \usepackage[bibstyle=how,citestyle=much]{biblatex}
> >#+end_src
>
> This is actually confusing.
> This code is by Nicolas, but does not seem to be consistent with the
> idea of "BIBLIOGRAPHY STYLE".
>
> I am CCing him in cause if there is something I am missing.

The docstring says:

;; "cite_export" keyword.  If you need to use different styles for 
bibliography
;; and citations, you can separate them with "bibstyle/citestyle" syntax.  
E.g.,
;;
;;   #+cite_export: biblatex authortitle/authortitle-ibid

> This is plain abusing.
> We might remove the "/" matching completely and throw an error if there
> are commas inside style name. Users must not rely on such undocumented
> behavior.

Let the user decide (?). If she gets to that point, she surely knows how to 
(ab)use it--in her favour.

> whether some of these are broken is up for discussion. The suggested patch
adds one conditional case, which searches for ="syle="=, takes away the
brackets and turns the above cases into:

[I do not see any patch attached]

WTF... again! (sorry)

diff --git a/lisp/oc-biblatex.el b/lisp/oc-biblatex.el
index a27f9e9bf..3e912f2d9 100644
--- a/lisp/oc-biblatex.el
+++ b/lisp/oc-biblatex.el
@@ -99,6 +99,10 @@ Return a string."
 (style-options
  (cond
   ((null style) nil)
+  ((string-match "style=" style)
+   (list (replace-regexp-in-string
+  "\\(style=[^/]*\\)/" "\\1,citestyle="
+  (org-unbracket-string "[" "]" style
   ((not (string-match "/" style)) (list (concat "style=" style)))
   (t
(list (concat "bibstyle=" (substring style nil (match-beginning 
0)))

> Why not storing email locally? Account limits are non-issue then ;)

The server does not allow me to download e-mails! (free as in... half a beer. I 
can get the full beer if I pay for it, though). Thanks for the suggestion.


-- 
Sent with https://mailfence.com  
Secure and private email



Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite

2023-01-22 Thread Edgar Lux
January 22, 2023 at 12:15:14 PM CET Ihor Radchenko  
wrote:Edgar Lux  writes:
> Note that we have https://orgmode.org/manual/Citation-export-processors.html
> Of course, the "Citations" section of the manual is not yet complete.
> More examples and details will be welcome.

Yes, indeed

> > #+cite_export: biblatex "bibstyle=numeric-comp,sorting=none, 
> > hyperref=true,backref=true,url=true,backend=biber,natbib=true"
>
> The general design is
> #+cite_export: NAME BIBLIOGRAPHY-STYLE CITATION-STYLE
> ... removed content ...
> I am not sure how your idea fits the above.

The general design only allows two options (and their values) to be passed to 
=biblatex= (in the =#+cite_export:= line): =bibstyle= and =citestyle=. However, 
=biblatex= can take many more options. Currently (correct me if I am wrong), 
the two alternatives to pass more options is to use a 
=org-cite-biblatex-options= or a line like this

#+begin_src org
  ,#+LaTeX_HEADER: \usepackage[bibstyle=numeric-comp,sorting=none, 
hyperref=true,backref=true,url=true,backend=biber,natbib=true]{biblatex}
#+end_src

> Also, note that `org-cite-biblatex--package-options' combines INITIAL
> option list from the \usepackage declaration already present with
> options dictated by STYLE.

Precisely.

> However, only certain options are considered.
> After applying your patch, things may be broken in this area.

One of the attachments showed what I considered to be all possible cases: the 
new string (containing =style==; it could be either =bibstyle==, =citestyle==. 
It is similar to the case which allows for ="bibstyle/citestyle"=, as 
documented on line 34 of =oc-biblatex.el=). Currently (these could, hopefully, 
also be used for the documentation), if somebody uses

1. case
   #+begin_src org
 #+cite_export: biblatex "how/much"
   #+end_src

   the result is
   #+begin_src latex
 \usepackage[bibstyle=how,citestyle=much]{biblatex}
   #+end_src

2. case
   #+begin_src org
 #+cite_export: biblatex "how" "much"
   #+end_src

   the result is
   #+begin_src latex
 \usepackage[style=how]{biblatex}
   #+end_src

3. case
   #+begin_src org
 #+cite_export: biblatex "how,opt=true"
   #+end_src

   the result is
   #+begin_src latex
 \usepackage[style=how,opt=true]{biblatex}
   #+end_src

4. case
   #+begin_src org
 #+cite_export: biblatex "how/much,hack=true"
   #+end_src

   the result is
   #+begin_src latex
 \usepackage[bibstyle=how,citestyle=much,hack=true]{biblatex}
   #+end_src

5. case
   #+begin_src org
 #+cite_export: biblatex "citestyle=corner/much"
   #+end_src

   the result is
   #+begin_src latex
 \usepackage[bibstyle=citestyle=corner,citestyle=much]{biblatex}
   #+end_src

6. case
   #+begin_src org
 #+cite_export: biblatex "citestyle=corner/much,opt=true"
   #+end_src

   the result is
   #+begin_src latex
 \usepackage[bibstyle=citestyle=corner,citestyle=much,opt=true]{biblatex}
   #+end_src

7. case
   #+begin_src org
 #+cite_export: biblatex "bibstyle=corner"
   #+end_src

   the result is
   #+begin_src latex
 \usepackage[style=bibstyle=corner]{biblatex}
   #+end_src

8. case
   #+begin_src org
 #+cite_export: biblatex "bibstyle=corner/much"
   #+end_src

   the result is
   #+begin_src latex
 \usepackage[bibstyle=bibstyle=corner,citestyle=much]{biblatex}
   #+end_src

9. case
   #+begin_src org
 #+cite_export: biblatex "[bibstyle=corner/much]"
   #+end_src

   the result is
   #+begin_src latex
 \usepackage[bibstyle=[bibstyle=corner,citestyle=much]]{biblatex}
   #+end_src

10. case (note that this can be combined with all the above)
#+begin_src emacs-lisp
  (setq org-cite-biblatex-options "nulloption=true")
#+end_src

#+begin_src org
  #+cite_export: biblatex "how/much"
#+end_src

the result is
#+begin_src latex
  \usepackage[nulloption=true,bibstyle=how,citestyle=much]{biblatex}
#+end_src

whether some of these are broken is up for discussion. The suggested patch adds 
one conditional case, which searches for ="syle="=, takes away the brackets and 
turns the above cases into:

1. case
   #+begin_src org
 #+cite_export: biblatex "how/much"
   #+end_src

   same result as above

2. case
   #+begin_src org
 #+cite_export: biblatex "how" "much"
   #+end_src

   same result as above

3. case
   #+begin_src org
 #+cite_export: biblatex "how,opt=true"
   #+end_src

   same result as above

4. case
   #+begin_src org
 #+cite_export: biblatex "how/much,hack=true"
   #+end_src

   same result as above

5. case
   #+begin_src org
 #+cite_export: biblatex "citestyle=corner/much"
   #+end_src

   the result is
   #+begin_src latex
 \usepackage[citestyle=corner,citestyle=much]{biblatex}
   #+end_src

6. case
   #+begin_src org
 #+cite_export: biblatex "citestyle=corner/much,opt=true"
   #+end_src

   the result is
   #+begin_src latex
 \usepackage[citestyle=corner,citestyle=much,opt=true]{biblatex}
   #+end_src


Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite

2023-01-22 Thread Edgar Lux
January 22, 2023 at 12:36:32 PM CET "András Simonyi"  
wrote:Dear All,

> There is also the customizable variable `org-cite-biblatex-options' to
> pass additional options,

That is very useful, indeed (I didn't know how to use it). Hopefully the e-mail 
which I just sent helps with the documentation.

> which could be used with #bind+ if document-specific options are needed.

Just in case, I think that you meant #+bind: . However, it didn't work for me 
(I'm blaming myself). I added this in line 16 of my 324-lines file

#+bind: org-cite-biblatex-options "opt=true"

but the =opt=true= value is not shown next to =\usepackage{biblatex}= when I 
export. I do have =org-export-allow-bind-keywords= set to =t=

> best wishes,
> András

you too!


-- 
Sent with https://mailfence.com  
Secure and private email



Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite

2023-01-21 Thread Edgar Lux
For the very silly reason that I was not aware of it >.< . Thank you, Ihor. 

For the uninformed: evaluate this as a lisp expression (require 'oc-biblatex) . 
Also, you can use either  #+LaTeX_HEADER: \usepackage... (like shown in this 
thread) or style options with #+cite_export: biblatex (read the documentation 
for oc-biblatex.el). I tested like this (and with the \usepackage line too):

#+cite_export: biblatex
#+bibliography: your_file.bib

This:

#+cite_export: biblatex "bibstyle=numeric-comp,sorting=none, 
hyperref=true,backref=true,url=true,backend=biber,natbib=true"

will create

\usepackage[style=bibstyle=numeric-comp,sorting=none, 
hyperref=true,backref=true,url=true,backend=biber,natbib=true]{biblatex}

(note the style=bibstyle=)

I would suggest that the org-info pages mention (require 'oc-biblatex) and show 
an example of  how one can use extra options (with the #+latex_header as well). 
Further, may be it would be better to allow something like this:

#+cite_export: biblatex "bibstyle=numeric-comp,sorting=none, 
hyperref=true,backref=true,url=true,backend=biber,natbib=true"
#+bibliography: your_file.bib

For which one can use the appended patch, which may break other things, of 
course :P . The gain is control over biblatex options without resorting to 
#+latex_header: \usepackage[...]{biblatex}

Cheers! Thanks.

January 21, 2023 at 9:37:18 AM CET Ihor Radchenko  
wrote:Edgar Lux  writes:

I now looked at the patch and I have one general question. What you
don't just use oc-biblatex in the above?


-- 
Sent with https://mailfence.com  
Secure and private email


oc-biblatex.patch.gz
Description: File Attachment: oc-biblatex.patch.gz


oc-biblatex-postpatch-tests.txt.gz
Description: File Attachment: oc-biblatex-postpatch-tests.txt.gz


Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite

2023-01-20 Thread Edgar Lux
LOL What an idio...! (sorry)

January 20, 2023 at 11:59:22 AM CET Ihor Radchenko  
wrote:Edgar Lux  writes:

> I send the attached patch for your consideration. It allows to use biber for
bibliographies. I tested it with this:

Thanks, but could you please attach the patch?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 

-- 
Sent with https://mailfence.com  
Secure and private email


oc-natbib.el.patch.gz
Description: File Attachment: oc-natbib.el.patch.gz


Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite

2023-01-19 Thread Edgar Lux
Dear list,

I send the attached patch for your consideration. It allows to use biber for 
bibliographies. I tested it with this:

(require 'oc-natbib)

#+cite_export: natbib
#+LaTeX_HEADER: \usepackage[style=numeric-comp,sorting=none, 
hyperref=true,backref=true,url=true,backend=biber,natbib=true]{biblatex}
#+LaTeX_HEADER: \addbibresource{../../Sources/sources.bib}

[cite:@mytest]

\printbibliography[heading=none]

These won't work
#+bibliography:
#+print_bibliography:

Thank you very much.

-- 
Sent with https://mailfence.com  
Secure and private email



Re: Tikz ugly hack

2022-10-28 Thread edgar

On 2022-10-26 09:58, Fraga, Eric wrote:
I wonder if, instead of a new LaTeX command you create a new 
environment

which you can then invoke using org special blocks?  For instance,

#+begin_BoundingBox

#+attr_latex: :height 1cm
[[image file]]

#+end_BoundingBox

--- snip 8< ---


Oh, I don't know how to do that, but it's good to know that at some 
point I can create it. Thanks!




Tikz ugly hack

2022-10-26 Thread edgar

Dear Org users,

I just want to share a way to combine Tikz (LaTeX) with figures (svg, 
png...). This may be needed to add elements (e.g. annotations) to your 
figure. The figure may still be exported with other back-ends (without 
annotations). If you know of a better way of doing this, please, let me 
know. Thanks.


#+latex_header: \usepackage{adjustbox,tikz}
#+latex_header: \newcommand*{\DrawGrid}{\draw[step=.2cm,help lines] 
(current bounding box.south west) grid (current bounding box.north 
east);}
#+latex_header: \newcommand*{\DrawBoundingBox}[2]{% 
https://tex.stackexchange.com/a/542819

#+latex_header: \draw [red, very thick, rounded corners]
#+latex_header: ([shift={(#1)}]current bounding box.south west)
#+latex_header: rectangle
#+latex_header: ([shift={(#2)}]current bounding box.north east);}
#+begin_export latex
\begin{tikzpicture}
  % left bottom right top
  \node {\adjustbox{height=0.7\textheight,trim=45.6mm 0mm 155mm 20mm, 
clip=true}{

#+end_export
  #+attr_latex: :height "" :width "" :options "" :center nil
  [[file:../diagram.svg]]
#+begin_export latex
  }};
  \DrawBoundingBox{5.7cm,0.71cm}{-0.1cm,-3.6cm}
  % \DrawGrid
\end{tikzpicture}
#+end_export



Re: Fwd: Re: Typo in info pages

2022-08-20 Thread edgar

On 2022-08-20 13:46, Ihor Radchenko wrote:

So, what I call "team" is equivalent to donations to the overall
development. These donations (note that it's not really much money) are
simply an extra motivation for Org committers. Org project has no real
expenses.


Yep, I saw the amounts. I mean 1 € per week!...

I didn't want to disrespect you in any way. I am still glad that I made 
the contribution, and I know that money is not the motivation for the 
good development (I tried to be generous, nevertheless). However, may be 
it would be wise to add that link 
(https://list.orgmode.org/87iloyyd1y.fsf@localhost/) next to the 
donations link so that people understand about the context beforehand (I 
would have liked to read the thread). Also, I appreciate the implied 
transparency when you sent me the link. (That is what I think that 
people will like. It is also important to educate each other).


In any case, it was just a recommendation, not a complaint :) . Cheers!

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: Fwd: Re: Typo in info pages

2022-08-20 Thread edgar

On 2022-08-20 07:12, Ihor Radchenko wrote:

ed...@openmail.cc writes:
--- snip 8< ---
Note that https://liberapay.com/org-mode is a "team" page aiming to
divide the donations across the interested Org contributors (see
https://list.orgmode.org/87iloyyd1y.fsf@localhost/). However,
cryptocurrencies are not supported by Liberapay. We cannot utilize
Liberapay for this purpose.
--- snip 8< ---


I think that a disclaimer or note like that should be added to


Support Org development at https://liberapay.com/org-mode,


Otherwise, it's misleading. My intention was to donate to the overall 
development of Org, not just a "team".


This would ensure:

https://list.orgmode.org/87iloyyd1y.fsf@localhost/

without creating confusion among donors on where to donate.


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: Fwd: Re: Typo in info pages

2022-08-19 Thread edgar

On 2022-08-19 05:39, Ihor Radchenko wrote:

Support Org development at https://liberapay.com/org-mode,


This is great! You should add cryptocurrencies there :) .

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Fwd: Re: Typo in info pages

2022-08-16 Thread edgar




 Original Message 
Subject: Re: Typo in info pages
Date: 2022-08-16 06:08
From: Philip Kaludercic 
To: ed...@openmail.cc

ed...@openmail.cc writes:


I stored this link with Org (mode):
[[info:org#Formula syntax for Calc]]

There, one can find

if(typeof(vmean($1..$7)) =​= 12, string(""), vmean($1..$7); E’

which I believe that should be

if(typeof(vmean($1..$7)) =​= 12, string(""), vmean($1..$7)); E’

Cheers!


You should probably send a message to emacs-orgmode@gnu.org about this.

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: how to concatenate string to spreadsheet formula

2022-08-16 Thread edgar

On 2022-08-15 14:40, Fraga, Eric wrote:

Hi Edgar,

I did not quite understand what you actually were calculating but maybe
consider the following expression for table formulas:

#+TBLFM: $3='(format "%s\\textwidth" (/ (* 1.0 $2) $1));N

If you specify ";N", the entries are treated as numbers.  The problem
with division is that if both numbers are integers, integer division is
used so I multiply one of the arguments by 1.0 to ensure floating point
numbers.

HTH,
eric


Aha! Thank you very much.

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



how to concatenate string to spreadsheet formula

2022-08-15 Thread edgar

Dear everyone,

At the moment, I am using an Org spreadsheet to concatenate a string  
to the ratio between 2 numbers. One of numbers is the  
[[sum-of-column][sum of a column]]. The other number would correspond  
to [[each-row-col1][each of the rows of another column]]  
([[ratio-to-0.95][multiplied by a factor]])

1. <>calculate the sum of a column
   - originally wanted vsum
   - corresponding part: =(reduce '+ (mapcar 'string-to-number (list  
@5$<..@6$<)))=

2. <>each of the values in column 1
   (string-to-number $1)
3. <>the ratio between [[each-row-col1]] and  
[[sum-of-column]] is multiplied by 0.95


The final value is concatenated with "\\textwidth".

| width | height |  w / Σw |   w / pic_row |
|   204 |120 |  0.10418795 |0.32606557 |
|   215 |125 |  0.10980592 |0.34364754 |
|   191 |119 | 0.097548519 |0.30528689 |
|   483 |125 |  0.24668029 |  0.7294912559614499\textwidth |
|   146 |128 | 0.074565884 | 0.22050874403854998\textwidth |
|   719 |101 |  0.36721144 |   |
|---++-+---|
|  1958 |718 | |   |
#+tblfm: @5$4..@6$4='(concat (number-to-string (* 0.95  
(string-to-number (math-format-number (math-div (string-to-number $1)  
(reduce '+ (mapcar 'string-to-number (list @5$<..@6$<  
"\\textwidth")


Is there a more succint way of doing this? For instance, my original  
intention was to have something like


#+tblfm: @5$4..@6$4=vsum($1 / vsum(@5$<..@6$<);"%0.4f\\textwidth"

which does not work. I would also like to avoid creating another  
column (=#+tblfm: @5$4..@6$4=vsum($1 /  
vsum(@5$<..@6$<);%0.4f::@<<$5..@>>$5='(concat $4 "\\textwidth")=).


Thank you very much!


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [PATCH] Re: how to beamer export overlay figure?

2022-08-12 Thread edgar

On 2022-08-12 14:53, Fraga, Eric wrote:

Excellent.  I forgot about SVG.


I actually think that it's kind of useless, anyway (won't hurt).

Attached: example of work-arounds to {preserve,reserve,allocate} space 
for pictures in case someone needs it.





-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  

save_overlay_space_with_beamer.tgz
Description: GNU Zip compressed data


Re: how to beamer export overlay figure?

2022-08-12 Thread edgar

On 2022-08-12 11:50, Fraga, Eric wrote:
Attached is a patch that seems to do what you want.  Are you able to 
try

this?

I'm sure there's a better way to do this but at least this seems to
work.


It worked! Thanks. I send a counter-patch :)  (for SVG).

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  

0001-lisp-ox-beamer-Enable-use-of-overlays-for-images.patch.gz
Description: GNU Zip compressed data


t.org.gz
Description: GNU Zip compressed data


Re: how to beamer export overlay figure?

2022-08-11 Thread edgar

On 2022-08-11 14:06, Fraga, Eric wrote:

On Thursday, 11 Aug 2022 at 13:05, ed...@openmail.cc wrote:

(the <2-> is within the square brackets).


Ooops.  Sorry about that.  Didn't look closely enough at the LaTeX
created.  My bad.

In that case, I'm out of suggestions other than to put the <2-> on the
list entry itself (which I believe is possible) or as an option for a
block that only contains the figure?


Thank you for your time and the suggestions :) .

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: how to beamer export overlay figure?

2022-08-11 Thread edgar

On 2022-08-11 09:51, Fraga, Eric wrote:

#+attr_latex: :options <2->
[[file:figure.png]]


Thanks. That creates

\begin{center}
\includegraphics[<2->,width=.9\linewidth]{example-image-a.png}
\end{center}

(the <2-> is within the square brackets).

GNU Emacs 28.1, Org 9.4.6. I did M-: (require 'ox-beamer)

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



how to beamer export overlay figure?

2022-08-10 Thread edgar

Hello!

I would like to know if there is an "Org" way of doing this with the 
beamer export:


#+begin_src latex
* Section
** Sub-section
*** Slide
 figure block
#+latex: \includegraphics<2->[height=0.5\regheight]{example-image-a}
#+end_src

That is: replacing the =#+latex:= line with a =[[file:figure.png]]= 
which allows for overlays with Beamer. I already tried some stuff, but I 
think that it would only be noise to add it here. Thanks!


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: Ignore, skip, omit headline when exporting to LaTeX

2022-07-08 Thread edgar

On 2022-07-08 05:04, Ihor Radchenko wrote:

ed...@openmail.cc writes:


This is on topic and can be useful for others  So, there should 
be no issue with

posting this here 


Thanks!


Note that this modified version of the function is derived from
org-export-ignore-headlines from ox-extra.el [1]


Thank you for the link.


However, a part of the original function code is omitted.
AFAIU, this version also discards the headline contents, in addition to
the headline itself (unlike what org-export-ignore-headlines does).


Sorry, I just had the version from 2014! :P  As mentioned in the comment 
of the new function, I just added a conditional and replaced "ignore" 
with "ignoreltx". As a suggestion, it could be possible to replace 
"ignore" with a variable and use another variable such that the headline 
is omitted when other export types (latex, html, etc.) are used.


In any case: Thanks for almost 20 years!



[1] https://git.sr.ht/~bzg/org-contrib

Best,
Ihor


To you too!

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Ignore, skip, omit headline when exporting to LaTeX

2022-07-07 Thread edgar

Firstly, do tell me if I am breaking the nettiquete.

I found someone asking online how to ignore a headline when exporting  
to LaTeX. This e-mail is to avoid creating an account on that forum  
and to provide a solution.


(require 'ox-extra)

  (defun org-export-ignore-headlines-latex (data backend info)
"Hack of `org-export-ignore-headlines' for LaTeX: add a  
conditional for the latex backend and replace 'ignore' with 'ignoreltx'"

(when (org-export-derived-backend-p backend 'latex)
  (org-element-map data 'headline
(lambda (object)
  (when (member "ignoreltx" (org-element-property :tags object))
(let ((level-top (org-element-property :level object))
  level-diff)
  (mapc (lambda (el)
  ;; recursively promote all nested headlines
  (org-element-map el 'headline
(lambda (el)
  (when (equal 'headline (org-element-type el))
(unless level-diff
  (setq level-diff (-  
(org-element-property :level el)

  level-top)))
(org-element-put-property
 el
 :level (- (org-element-property :level el)
 
level-diff)

  ;; insert back into parse tree
  (org-element-insert-before el object))
(org-element-contents object)))
(org-element-extract-element object)))
info nil)
  data))

  (push '(ignore-latex-headlines
  org-export-ignore-headlines-latex
  org-export-filter-parse-tree-functions)
ox-extras)
  (ox-extras-activate '(latex-header-blocks ignore-headlines  
ignore-latex-headlines))



-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: Default attributes for images in beamer export

2022-05-24 Thread edgar

On 2022-05-23 10:59, Timothy wrote:

Hi Eric,


But given that you also want to keep the aspect ratio, I am curious as
to why you would need/want to specify both?


Just on this, the `keepaspectratio' option of `graphicx' could be 
relevant here.


All the best,
Timothy


Thanks. Yes, I think that Eric is asking about why I have the three 
options set already: width, height and keepaspectratio.


In my experience, sometimes, my slide is too narrow (as compared to 
wide) and other times, it is too short (as compared to high). Since I 
don't want to be dealing with which one is going to work the best, I 
just set the three options to forget about them (as a default), and 
usually the smallest size will kick in (which is the safest for my 
slides). So, for example, even if I explicitly say that I want a 
specific width, it may be  that the height works better and LaTeX 
(Beamer) is lenient with me. I am not saying that it makes sense, it's 
just what I use :P .


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: Default attributes for images in beamer export

2022-05-20 Thread edgar

On 2022-05-20 19:50, ed...@openmail.cc wrote:

On 2022-05-19 18:29, Eric S Fraga wrote:

On Thursday, 19 May 2022 at 17:17, wrote:

#+BIND: org-latex-image-default-width 0.5\textwidth


Try

#+BIND: org-latex-image-default-width "0.5\\textwidth"

and make sure org-export-allow-bind-keywords is set to t.


Oh, ok! That works. Thank you!


Actually, if I have this (The =org-latex-image-default-option= is  
applied everywhere, but =org-latex-image-default-width= is not):


#+begin_src org
* Example

#+attr_latex: :height 0.5\regheight
file:example.png

file:example.png

* Configuration:ARCHIVE:noexport:
#+BIND: org-latex-image-default-width "0.98\\textwidth"
#+BIND: org-latex-image-default-height "\\regheight"
#+BIND: org-latex-image-default-option "keepaspectratio"
#+end_src

#+caption: Excerpt of results when exporting with Beamer LaTeX
#+begin_latex
\begin{frame}[label={sec:org22d94b4}]{Example}
\begin{center}
\includegraphics[keepaspectratio,height=0.5\regheight]{example.png}
\end{center}

\begin{center}
\includegraphics[keepaspectratio,width=0.98\textwidth,height=\regheight]{example.png}
\end{center}
\end{frame}
#+end_latex


But I was expecting

#+caption: Excerpt of results when exporting with Beamer LaTeX
#+begin_latex
\begin{frame}[label={sec:org22d94b4}]{Example}
\begin{center}
\includegraphics[keepaspectratio,width=0.98\textwidth,height=0.5\regheight]{example.png}
\end{center}

\begin{center}
\includegraphics[keepaspectratio,width=0.98\textwidth,height=\regheight]{example.png}
\end{center}
\end{frame}
#+end_latex

Is this the expected behaviour? Thanks again :) .


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: Default attributes for images in beamer export

2022-05-20 Thread edgar

On 2022-05-19 18:29, Eric S Fraga wrote:

On Thursday, 19 May 2022 at 17:17, wrote:

#+BIND: org-latex-image-default-width 0.5\textwidth


Try

#+BIND: org-latex-image-default-width "0.5\\textwidth"

and make sure org-export-allow-bind-keywords is set to t.


Oh, ok! That works. Thank you!

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Default attributes for images in beamer export

2022-05-19 Thread edgar

Hello,

I am trying to set the default height (or width) of all pictures for  
my Beamer  slides (ox-beamer) for a single file. How can I do it?


I am currently trying this:


#+begin_src org

#+BIND: org-latex-image-default-width 0.5\textwidth
#+property: :latex-image-default-width 0.6\regheight

* Test

** Slide:B_block:
:PROPERTIES:
:BEAMER_env: block
:END:

#+name: testing
#+caption: this figure
[[file:../some.png]]

#+begin_src emacs-lisp
  (org-version)
#+end_src

#+RESULTS:
: 9.5.2

#+begin_src emacs-lisp
  (emacs-version)
#+end_src

#+RESULTS:
: GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33,  
cairo version 1.17.6)

:  of 2022-04-20

#+end_src

and I get this
#+begin_src latex
% Created 2022-05-19 Thu 19:12
% Intended LaTeX compiler: pdflatex
\documentclass[presentation]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usetheme{default}
\date{\today}
\title{}
\hypersetup{
 pdfauthor={},
 pdftitle={},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 28.1 (Org mode 9.5.2)},
 pdflang={English}}
\begin{document}

\begin{frame}{Outline}
\tableofcontents
\end{frame}


\begin{frame}[label={sec:orgaf83f29},fragile]{Test}
 \begin{block}{Slide}
\begin{figure}[htbp]
\centering
\includegraphics{../some.png}
\caption{\label{fig:orga0f8614}this figure}
\end{figure}

\begin{verbatim}
(org-version)
\end{verbatim}

\begin{verbatim}
(emacs-version)
\end{verbatim}
\end{block}
\end{frame}
\end{document}
#+end_src


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: How to enforce sub-scripts with {} only for HTML export?

2022-02-20 Thread edgar

On 2022-02-20 23:29, Greg Minshall wrote:

Edgar,

one of my .org files has this

#  ^:{}: disable super/subscripting: 
https://stackoverflow.com/a/698791/1527747

#+options: ^:{}


ymmv.


Thank you, Greg. Sometimes I need to export sub-headings, selected text 
or included files, and the variable gets overridden. Thanks a lot :) .


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: How to enforce sub-scripts with {} only for HTML export?

2022-02-20 Thread edgar

On 2022-02-20 21:49, Kyle Meyer wrote:

{} should be a symbol.  Try

  (setq org-export-with-sub-superscripts '{})


Thank you!!!

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



How to enforce sub-scripts with {} only for HTML export?

2022-02-20 Thread edgar

Hi. I hope that this is not a known issue and that you can help me.

* Short description

If I export this as html

#+begin_src org
   test_my_subs
#+end_src

the corresponding line is exported as

#+begin_src html
   
   testmysubs
   
#+end_src

* Expected output

I was expecting the output to be
#+begin_src html
   
   test_my_subs
   
#+end_src

In the [[help:org-export-with-sub-superscripts][documentation]], it 
reads:

#+begin_quote
Still, ambiguity is possible.  So when in doubt, use {} to enclose
the sub/superscript.  If you set this variable to the symbol ‘{}’,
the braces are *required* in order to trigger interpretations as
sub/superscript.  This can be helpful in documents that need "_"
frequently in plain text.
#+end_src

What am I doing wrong? Thanks!

* Emacs and Org configuration

I am using this with ~emacs -q~:

#+begin_src emacs-lisp
(setq
   ;; Use {} for super and subscripts
   org-export-with-sub-superscripts "{}")
#+end_src

#+begin_src emacs-lisp
  (emacs-version)
#+end_src

#+RESULTS:
: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, 
cairo version 1.17.4)

:  of 2021-03-26

#+begin_src emacs-lisp
  (org-version)
#+end_src

#+RESULTS:
: 9.4.6

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: how to org-babel-detangle with nested noweb?

2021-10-18 Thread edgar

On 2021-10-18 16:31, Tom Gillespie wrote:

Hi Edgar,
Degangling of nested noweb blocks tangled using
:comments noweb is broken at the moment. There are
some deep bugs that need to be worked out, and last
time I looked at the code I think my conclusion that it
was better to do a complete rewrite starting from a new
specification of the behavior along with some gnarly test
cases to ensure that everything works as expected.
Best!
Tom


Thanks for the reply :) . If you need guinea pigs, let me know.

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



how to org-babel-detangle with nested noweb?

2021-10-16 Thread edgar

Hi,

I am tangling Python files with =:comments link=. I don't know if a  
way already exits, but I would like to detangle (=org-babel-detangle=)  
/noweb/ blocks. For instance:


#+name: binary_metrics.py
#+begin_src python
  import numpy as np

  np.random.seed(42)
  true_vals = np.random.randint(0, 2, size=5)
  pred_vals = np.ones(5)
#+end_src

#+name: binary_metrics2.py
#+begin_src python :tangle ../Code/Sandbox/tmp.py :dir  
../Code/Sandbox/ :comments noweb :noweb yes :padline yes

  <>
#+end_src

Then, if I modify tmp.py and do an =org-babel-detangle=, the changes  
would go back to =binary_metrics.py=. As it is not working for me at  
the moment, I would like to know if

1. I am doing something wrong (it should be working),
2. there is a package which can handle this, or
3. this can be a feature request
The reason for which I would like to have this is to take advantage of  
Org to have reproducible and maintainable documents when programming  
in Python.


The reason behind this is that I am unaware of any package which  
allows =org-edit-special= to integrate with other blocks in the  
document in such a way that modules are imported, e.g:


#+name: code1.py
#+begin_src python
  import numpy as np
#+end_src

#+caption: Try to =org-edit-special= and get the documentation for  
=np= (with eldoc for instance).

#+begin_src python :noweb yes
  <>
  np
#+end_src

#+begin_src emacs-lisp
  (format "%s\n%s"
   (emacs-version)
   (org-version))
#+end_src

#+RESULTS:
: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27,  
cairo version 1.17.4)

:  of 2021-03-26
: 9.4.6


Thank you!


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



ox-latex-subfig

2021-10-04 Thread edgar

Hello nice people!

I just want to let you know about ox-latex-subfig, which you can find 
here: https://notabug.org/broncodev/ox-latex-subfig.git . It provides a 
filter to convert Org tables into "sub-figures" when exporting to (PDF) 
\LaTeX.


As you may know, the subcapiton package is deprecated, and I just like 
having figures side by side. I hope that it's useful to you as it is for 
me :) .


Thanks for Org! (you changed my life for the better).

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: How to use Org with Python as an IDE?

2021-09-06 Thread edgar

On 2021-09-06 22:20, Dr. Arne Babenhauserheide wrote:

It’s the finding that’s hard, not the setup.


Very kind of you.
Sehr net von dir.


You may also want to use flake8. That helps keep your code pythonic. I
don’t know how much of that is in pylint.


Actually, it's running on my computer. I may have to configure it. Thank 
you for the heads-up.
Wirklich ist es in meinen Computer. Vielleicht, muss ich es gestalten. 
Danke für die Beratung.



What you may want to add is tangling and *detangling* of
Python-codeblocks in org-mode so you can get a full Python-IDE


Yes, that is a good advice. I really want to keep my code organised.
Ja, das ist wirklich einen gutte Beratung. Ich wil meinen Code gut 
organisieren.



Best wishes,
Arne


You too :)
Dir auch ! (I tried ;P )

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: How to use Org with Python as an IDE?

2021-09-04 Thread edgar

I am very sorry for wasting your precious time. This was very simple

1. Install (some are optional) python-language-server  
jedi-language-server bash-language-server python-pylint  
python-pydocstyle ccls python-pyls-black

2. Clone https://github.com/joaotavora/eglot
3. Add this to your .init.el or .emacs

(require 'package)
(package-initialize)

(defun load-eglot-company ()
  "Loads `eglot' and `company'"
  (eglot-ensure)
  (company-mode))
(add-hook 'python-mode-hook 'load-eglot-company)

(use-package eglot
  :after prog-mode
  :load-path "~/.emacs.d/plugins/eglot"
  :config
  (add-hook 'c-mode-hook 'load-eglot-company)
  (add-hook 'c++-mode-hook 'load-eglot-company)
  (add-hook 'c-mode-common-hook 'load-eglot-company))


I can't believe that I can now be in the 21st century. Thanks to all  
the developers and the free software community!
Quoting href="mailto:ed...@openmail.cc;>ed...@openmail.cc:type="cite" style="border-left:2px solid  
blue;margin-left:2px;padding-left:12px;">Is there a current way to  
have Python (not iPython, Jupyter, Anaconda, Conda...) IDE in  
Emacs?


I sent the forwareded message to the Org (mode) list, because I am  
planning to use Org, but I am in a defeated state, and if I can get  
regular files with autocompletion, navigation and documentation, that  
would be great.


Thanks!

#+begin_src elisp
 (org-version)
#+end_src

#+RESULTS:
: 9.3.7

#+begin_src elisp
 (emacs-version)
#+end_src

#+RESULTS:
: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27,  
cairo version 1.17.4)

: of 2021-03-26

| python-jedi| 0.18.0-2 |
| emacs-ctable| 0.1.2-3 |
| emacs-deferred   | 0.5.1-2 |
| emacs-epc | 0.1.1-4 |
| python-epc | 0.0.5-3 |
| python-black| 21.7b0-1 ||  
python-flake8-black | 0.2.2-1 |




-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Fwd: How to use Org with Python as an IDE?

2021-09-04 Thread edgar
 
(d . #s(deferred (closure ((callback . #[128  
"\302\300\303\301\"\"\207" [(lambda (msg output) (message "%s...Done"  
msg) (if python-environment--verbose (progn (message output  
("Running: pip install --upgrade ~/.emacs.d/elpa/jedi-core-0.2.8/")  
apply append] 6 "


(fn  ARGS2)"]) (callback . #[128 "\302\300\303\301\"\"\207"  
[(lambda (msg output) (message "%s...Done" msg) (if  
python-environment--verbose (progn (message output ("Running: pip  
install --upgrade ~/.emacs.d/elpa/jedi-core-0.2.8/") apply append] 6 "


(fn  ARGS2)"]) (d . #s(deferred (closure ((d . #8) (pd .  
#s(deferred deferred:default-callback deferred:default-errorback  
deferred:default-cancel #8 nil nil)) (args "install" "--upgrade"  
"~/.emacs.d/elpa/jedi-core-0.2.8/") (command .  
"~/.emacs.d/.python-environments/default/bin/pip") (f . start-process)  
cl-struct-deferred-tags t) (buf) (prog1 (save-current-buffer  
(set-buffer buf) (buffer-string)) (kill-buffer buf)))  
deferred:default-errorback (closure ((v . #8) (d . #8) (pd .  
#s(deferred deferred:default-callback deferred:default-errorback  
deferred:default-cancel #8 nil nil)) (args "install" "--upgrade"  
"~/.emacs.d/elpa/jedi-core-0.2.8/") (command .  
"~/.emacs.d/.python-environments/default/bin/pip") (f . start-process)  
cl-struct-deferred-tags t) (_x) (deferred:default-cancel d)  
(deferred:default-cancel pd)) #4 nil nil)) cl-struct-deferred-tags t)  
(x) (condition-case nil (progn (deferred:call-lambda callback x))  
(error nil)) x) (closure ((normal closure ((callback . #[128  
"\302\300\303\301\"\"\207" [(lambda (msg output) (message "%s...Done"  
msg) (if python-environment--verbose (progn (message output  
("Running: pip install --upgrade ~/.emacs.d/elpa/jedi-core-0.2.8/")  
apply append] 6 "


(fn  ARGS2)"]) (callback . #[128 "\302\300\303\301\"\"\207"  
[(lambda (msg output) (message "%s...Done" msg) (if  
python-environment--verbose (progn (message output ("Running: pip  
install --upgrade ~/.emacs.d/elpa/jedi-core-0.2.8/") apply append] 6 "


(fn  ARGS2)"]) (d . #s(deferred (closure ((d . #10) (pd .  
#s(deferred deferred:default-callback deferred:default-errorback  
deferred:default-cancel #10 nil nil)) (args "install" "--upgrade"  
"~/.emacs.d/elpa/jedi-core-0.2.8/") (command .  
"~/.emacs.d/.python-environments/default/bin/pip") (f . start-process)  
cl-struct-deferred-tags t) (buf) (prog1 (save-current-buffer  
(set-buffer buf) (buffer-string)) (kill-buffer buf)))  
deferred:default-errorback (closure ((v . #10) (d . #10) (pd .  
#s(deferred deferred:default-callback deferred:default-errorback  
deferred:default-cancel #10 nil nil)) (args "install" "--upgrade"  
"~/.emacs.d/elpa/jedi-core-0.2.8/") (command .  
"~/.emacs.d/.python-environments/default/bin/pip") (f . start-process)  
cl-struct-deferred-tags t) (_x) (deferred:default-cancel d)  
(deferred:default-cancel pd)) #4 nil nil)) cl-struct-deferred-tags t)  
(x) (condition-case nil (progn (deferred:call-lambda callback x))  
(error nil)) x) (callback . #[128 "\302\300\303\301\"\"\207" [(lambda  
(msg output) (message "%s...Done" msg) (if python-environment--verbose  
(progn (message output ("Running: pip install --upgrade  
~/.emacs.d/elpa/jedi-core-0.2.8/") apply append] 6 "


(fn  ARGS2)"]) (callback . #[128 "\302\300\303\301\"\"\207"  
[(lambda (msg output) (message "%s...Done" msg) (if  
python-environment--verbose (progn (message output ("Running: pip  
install --upgrade ~/.emacs.d/elpa/jedi-core-0.2.8/") apply append] 6 "


(fn  ARGS2)"]) (d . #s(deferred (closure ((d . #8) (pd .  
#s(deferred deferred:default-callback deferred:default-errorback  
deferred:default-cancel #8 nil nil)) (args "install" "--upgrade"  
"~/.emacs.d/elpa/jedi-core-0.2.8/") (command .  
"~/.emacs.d/.python-environments/default/bin/pip") (f . start-process)  
cl-struct-deferred-tags t) (buf) (prog1 (save-current-buffer  
(set-buffer buf) (buffer-string)) (kill-buffer buf)))  
deferred:default-errorback (closure ((v . #8) (d . #8) (pd .  
#s(deferred deferred:default-callback deferred:default-errorback  
deferred:default-cancel #8 nil nil)) (args "install" "--upgrade"  
"~/.emacs.d/elpa/jedi-core-0.2.8/") (command .  
"~/.emacs.d/.python-environments/default/bin/pip") (f . start-process)  
cl-struct-deferred-tags t) (_x) (deferred:default-cancel d)  
(deferred:default-cancel pd)) #4 nil nil)) cl-struct-deferred-tags t)  
(e) (condition-case nil (progn (deferred:call-lambda callback e))  
(error nil)) (deferred:resignal e)) deferred:default-cancel #0 nil  
nil)) cl-struct-deferred-tags t) (e) (condition-case nil (progn  
(deferred:call-lambda callback e)) (error nil)) (deferred:resignal e))  
deferred:default-cancel nil nil nil)

#+end_example

Plus this:
#+begin_example
  deferred error : (error "Deferred process exited abnormally:
command: /home/edgar/.emacs.d/.python-environments/default/bin/pip
exit status: exit 127
event: exited abnormally with code 127
buffer contents:  
\"~/.emacs.d/.python-environments/default/bin/python: error while  
loading shared libraries: libpython3.7m.so.1.0: cannot open shared  
object file: No such file or directory

#+end_example

--- End Message ---


How to use Org with Python as an IDE?

2021-09-04 Thread edgar
erred:default-callback deferred:default-errorback  
deferred:default-cancel #8 nil nil)) (args "install" "--upgrade"  
"~/.emacs.d/elpa/jedi-core-0.2.8/") (command .  
"~/.emacs.d/.python-environments/default/bin/pip") (f . start-process)  
cl-struct-deferred-tags t) (_x) (deferred:default-cancel d)  
(deferred:default-cancel pd)) #4 nil nil)) cl-struct-deferred-tags t)  
(x) (condition-case nil (progn (deferred:call-lambda callback x))  
(error nil)) x) (closure ((normal closure ((callback . #[128  
"\302\300\303\301\"\"\207" [(lambda (msg output) (message "%s...Done"  
msg) (if python-environment--verbose (progn (message output  
("Running: pip install --upgrade ~/.emacs.d/elpa/jedi-core-0.2.8/")  
apply append] 6 "


(fn  ARGS2)"]) (callback . #[128 "\302\300\303\301\"\"\207"  
[(lambda (msg output) (message "%s...Done" msg) (if  
python-environment--verbose (progn (message output ("Running: pip  
install --upgrade ~/.emacs.d/elpa/jedi-core-0.2.8/") apply append] 6 "


(fn  ARGS2)"]) (d . #s(deferred (closure ((d . #10) (pd .  
#s(deferred deferred:default-callback deferred:default-errorback  
deferred:default-cancel #10 nil nil)) (args "install" "--upgrade"  
"~/.emacs.d/elpa/jedi-core-0.2.8/") (command .  
"~/.emacs.d/.python-environments/default/bin/pip") (f . start-process)  
cl-struct-deferred-tags t) (buf) (prog1 (save-current-buffer  
(set-buffer buf) (buffer-string)) (kill-buffer buf)))  
deferred:default-errorback (closure ((v . #10) (d . #10) (pd .  
#s(deferred deferred:default-callback deferred:default-errorback  
deferred:default-cancel #10 nil nil)) (args "install" "--upgrade"  
"~/.emacs.d/elpa/jedi-core-0.2.8/") (command .  
"~/.emacs.d/.python-environments/default/bin/pip") (f . start-process)  
cl-struct-deferred-tags t) (_x) (deferred:default-cancel d)  
(deferred:default-cancel pd)) #4 nil nil)) cl-struct-deferred-tags t)  
(x) (condition-case nil (progn (deferred:call-lambda callback x))  
(error nil)) x) (callback . #[128 "\302\300\303\301\"\"\207" [(lambda  
(msg output) (message "%s...Done" msg) (if python-environment--verbose  
(progn (message output ("Running: pip install --upgrade  
~/.emacs.d/elpa/jedi-core-0.2.8/") apply append] 6 "


(fn  ARGS2)"]) (callback . #[128 "\302\300\303\301\"\"\207"  
[(lambda (msg output) (message "%s...Done" msg) (if  
python-environment--verbose (progn (message output ("Running: pip  
install --upgrade ~/.emacs.d/elpa/jedi-core-0.2.8/") apply append] 6 "


(fn  ARGS2)"]) (d . #s(deferred (closure ((d . #8) (pd .  
#s(deferred deferred:default-callback deferred:default-errorback  
deferred:default-cancel #8 nil nil)) (args "install" "--upgrade"  
"~/.emacs.d/elpa/jedi-core-0.2.8/") (command .  
"~/.emacs.d/.python-environments/default/bin/pip") (f . start-process)  
cl-struct-deferred-tags t) (buf) (prog1 (save-current-buffer  
(set-buffer buf) (buffer-string)) (kill-buffer buf)))  
deferred:default-errorback (closure ((v . #8) (d . #8) (pd .  
#s(deferred deferred:default-callback deferred:default-errorback  
deferred:default-cancel #8 nil nil)) (args "install" "--upgrade"  
"~/.emacs.d/elpa/jedi-core-0.2.8/") (command .  
"~/.emacs.d/.python-environments/default/bin/pip") (f . start-process)  
cl-struct-deferred-tags t) (_x) (deferred:default-cancel d)  
(deferred:default-cancel pd)) #4 nil nil)) cl-struct-deferred-tags t)  
(e) (condition-case nil (progn (deferred:call-lambda callback e))  
(error nil)) (deferred:resignal e)) deferred:default-cancel #0 nil  
nil)) cl-struct-deferred-tags t) (e) (condition-case nil (progn  
(deferred:call-lambda callback e)) (error nil)) (deferred:resignal e))  
deferred:default-cancel nil nil nil)

#+end_example

Plus this:
#+begin_example
  deferred error : (error "Deferred process exited abnormally:
command: /home/edgar/.emacs.d/.python-environments/default/bin/pip
exit status: exit 127
event: exited abnormally with code 127
buffer contents:  
\"~/.emacs.d/.python-environments/default/bin/python: error while  
loading shared libraries: libpython3.7m.so.1.0: cannot open shared  
object file: No such file or directory

#+end_example



-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



org babel and clang-format

2021-03-26 Thread edgar

Hello!

Is there a way to use clang-format in an Org Babel block? I get that 
"empty filenames are not allowed". Thanks!




#+include from same file when exporting

2020-09-15 Thread edgar

Hello, dear list!

My comment for today is that I have something like this:

this-file.org
..
* Fancy header 1

#+NAME: blk1
#+begin_src python
  import numpy as np
#+end_src

** Fancy subheader 2

Res 1
#+include: "this-file.org::blk1"

Res 2
#+include: "this-file.org::blk1" src python

Res 3
#+include: "./this-file.org::blk1" src python
.. end

When I export /Fancy subheader 2/ as text, I get

this-file.txt
..
  ━━━
   FANCY SUBHEADER 2
  ━━━


Table of Contents
─




Res 1
┌
│ import numpy as np
└

Res 2
┌
│ * Fancy header 1
│
│ #+NAME: blk1
│ #+begin_src python
│   import numpy as np
│ #+end_src
│
│ ** Fancy subheader 2
│
│ Res 1
│ #+include: "this-file.org::blk1"
│
│ Res 2
│ #+include: "this-file.org::blk1" src python
│
│ Res 3
│ #+include: "./this-file.org::blk1" src python
└

Res 3
┌
│ * Fancy header 1
│
│ #+NAME: blk1
│ #+begin_src python
│   import numpy as np
│ #+end_src
│
│ ** Fancy subheader 2
│
│ Res 1
│ #+include: "this-file.org::blk1"
│
│ Res 2
│ #+include: "this-file.org::blk1" src python
│
│ Res 3
│ #+include: "./this-file.org::blk1" src python
└
.. end

I think that all of them should just export the python block, right?

Also, I think that it would be very useful to have something like this:

another-file.org
..
* Fancy header 1

#+NAME: blk1
#+begin_src python :exports none
  print(2)
#+end_src

#+RESULTS:
: 2

** Fancy subheader 2

Res 1
#+include: "this-file.org::blk1" src python :exports both
.. end

Which would allow to have the =#+include= override the =:exports= 
directive from the original block and get the results from the block. 
Right now, I can do


yaf.org
..
* Fancy header 1

#+NAME: blk1
#+begin_src python
  print(2)
#+end_src

** Fancy subheader 2

Res 1
#+begin_src python :noweb yes :exports both
  <>
#+end_src

#+RESULTS:
: 2
.. end

to get the same result, but I thought that this could be a nice feature 
to add.



GNU Emacs 27.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.21, 
cairo version 1.17.3) of 2020-09-08


Org mode version 9.3.7 (release_9.3.7-25-g4f22fd @ 
/home/edgar/.emacs.d/org-mode/lisp/)


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: restore window configuration after org-edit-src-exit

2020-05-17 Thread edgar
Hello. I would like to request this to be pushed onto the =maint= branch 
(7684b59c7) or make it the default, please.


https://lists.gnu.org/archive/html/emacs-orgmode/2019-12/txtr_q1WmvVPH.txt

which is related to (at least) commits 7d5e931f7 and d833920de from the 
=master= branch. I have also tested by using lisp/org-src.el from the 
current =master= (9bc0cc7fb) on the =maint= branch (7684b59c7), and it 
works for me. Thanks!


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



All the best

2020-03-26 Thread edgar

Dear Emacs and Org community,

I just want to send a small note to wish you the best during these times 
of need. Let us remember that it is community which allows us to keep 
going as a species. Please, take care of yourselves and those who 
surround you, and let us do our best to overcome the circumstances with 
a smile :D .


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] org-babel noweb-ref

2019-09-29 Thread edgar

Hello dear list,

First of all, this may be related:
- https://lists.gnu.org/archive/html/emacs-orgmode/2018-02/msg00300.html
- https://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00044.html

- Emacs: src_emacs-lisp{emacs-version} {{{results(=26.3=)}}}
- Org: src_emacs-lisp{org-version} {{{results(=9.1.14=)}}}
- Parabola GNU/Linux: src_bash{uname -r} {{{results(=5.2.5-gnu-1=)}}}

I prepared the following hoping that it makes the issue clear. Let me 
know :) .


#+CAPTION: This works if ~org-babel-use-quick-and-dirty-noweb-expansion~ 
is ~nil~, but I don't want to import everything from ~libraries~
#+BEGIN_SRC python :tangle routines1.py :noweb yes :shebang # -*- 
coding: utf-8 -*-

  <>


  <>
#+END_SRC

* Explanation with example

- I noticed some differences between the output of tangling and 
previewing org-babel blocks.
- ~org-babel-use-quick-and-dirty-noweb-expansion~ interferes with 
~:noweb~ in a way that I did not expect


I want to know
1. if this is the expected behaviour
2. how I can expand a named block (which has ~#+name: tag~) which is 
inside a subtree (subheading with the ~:noweb-ref~ property)


** Option 1

Set src_emacs-lisp{(setq org-babel-use-quick-and-dirty-noweb-expansion 
nil)}


#+BEGIN_SRC python :tangle /tmp/routines1.py :noweb yes :shebang # -*- 
coding: utf-8 -*-

  <>


  <>
#+END_SRC

- Preview shows empty lines instead of ~imp1.py~ and no ~shebang~

  #+BEGIN_SRC python



def fun1():
pass


def fun2():
pass
  #+END_SRC

- Tangled ~/tmp/routines2.py~ shows ~shebang~, but no ~imp1.py~.

  #+BEGIN_SRC python
# -*- coding: utf-8 -*-
def fun1():
pass


def fun2():
pass
  #+END_SRC


*** What I expected

1. Both Preview and tangling to have the same content
2. for ~imp1.py~ to be expanded at the top of the code as ~import numpy 
as np~.


** Option 2

src_emacs-lisp{(setq org-babel-use-quick-and-dirty-noweb-expansion t)}

#+BEGIN_SRC python :tangle /tmp/routines2.py :noweb yes :shebang # -*- 
coding: utf-8 -*-

  <>


  <>
#+END_SRC

- Preview shows

  #+BEGIN_SRC python
import numpy as np


  #+END_SRC

- Tangled ~/tmp/routines2.py~ shows

  #+BEGIN_SRC python
# -*- coding: utf-8 -*-
import numpy as np
  #+END_SRC

*** What I expected

According to the manual, ~<>~ would not be solved correctly 
(as shown), but I expected to have the ~shebang~ in the preview.


A further comment can be made about the extra space (related to 
~:noweb-sep~), but that is minor and I don't care.


** Routines
:PROPERTIES:
:header-args: :noweb-ref routines :noweb-sep "\n\n\n"
:END:

#+NAME: fun1.py
#+BEGIN_SRC python
  def fun1():
  pass
#+END_SRC

#+NAME: fun2.py
#+BEGIN_SRC python
  def fun2():
  pass
#+END_SRC

** Libraries
:PROPERTIES:
:header-args: :noweb-ref libraries
:END:

#+NAME: imp1.py
#+BEGIN_SRC python
  import numpy as np
#+END_SRC

#+NAME: imp2.py
#+BEGIN_SRC python
  import os
#+END_SRC

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Unrelated Babel blocks interfering

2019-05-23 Thread edgar

Hi!

I don't know if I am doing something wrong, if this is a feature or a 
bug. Emacs asks me to assign a value to variable "10" when running Emacs 
26.2 with GTK 3.24.8 and Org 9.1.14 in GNU/Linux (running as emacs -q). 
Try to preview (org-babel-expand-src-block C-c C-v v) the block called 
dic_max_vals2straight_line_febpts_blk.py below (seems related to the ~# 
USE 0.1 * \Psi~ part). Please, reply directly to my e-mail if you need 
more information to debug or if I am doing something terribly wrong.


#+NAME: dic_xml_get_elmtag.py
#+BEGIN_SRC python
  treetag = tree.find(elmtag)
#+END_SRC

#+NAME: dic_xml_check_empty_elmtag.py
#+BEGIN_SRC python
  if treetag is not None and treetag is not []:
#+END_SRC

#+NAME: dic_xml_assert_elmtag.py
#+BEGIN_SRC python :noweb yes
  # * Make sure that the tag (node, subtree, whatever...)
  #   exists in the XML
#+END_SRC

#+NAME: dic_max_vals2straight_line_febpts_blk.py
#+BEGIN_SRC python :noweb yes
  <>
  <>
  loaddata = treetag
  # ** Remove all pre-existing `loadcurve' (or equivalent)
  xmlset = loaddata
  [xmlset.remove(VAL) for VAL in xmlset.findall(curvetag)]

#+END_SRC

#+NAME: dic_max_vals2straight_line_disppts.py
#+BEGIN_SRC python :noweb yes
  def max_vals2straight_line_disppts(tree,
 curvetag="loadcurve",
 vals=None,
 num_pts=11):

  <>

#+END_SRC

#+HEADER: :var mu_min = # USE 0.1 * \Psi
#+HEADER: :var mu_max = # USE 10 * \Psi
#+BEGIN_SRC python :noweb yes :tangle /tmp/t.py
  # Based on 
  # 
  <>
  <>


  # Program start #

  # * Experimental part *

  <>

  # DANGER: untested
  <>

  # * Simulation part *

  # *** Read XML file

  <>

  # * Create a series of values with a preset difference
  #   between them

  <>
#+END_SRC

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] No LaTeX label when using :mode math #+NAME with table

2019-05-11 Thread edgar
I had to add :math-suffix  to get a label in the exported TeX 
file (shown below), otherwise, there is no label. If I am the only one 
affected, disregard this message. I may not be able to answer in some 
days.


#+NAME: tbl-arbitrary-factors
#+CAPTION: Simplification of model parameters.
#+ATTR_LATEX: :mode math :environment align* :math-suffix 
\label{tbl-arbitrary-factors}
| a_{2} = \alpha\,10^{7}   || , || 
\frac{b_{2}}{3} = a_{2}|| , || \frac{d_{2}}{6.5} 
= a_{2}  |
| c_{2} = \beta\,10^{7}|| , || 
g_{n} = \frac{g_{n}^{\max}}{1 + \beta} || , || g_{n}^{\max} = 
0.55, 0.3, 0.15 |
| k_{0}=\kappa\,\frac{10^{-9}}{\gamma_{\text{H}_{2}\text{O}}}  || , || 
\tau_{n} = \frac{\tau_{n}^{\max}}{1 + \kappa}  || , || \tau_{n}^{\max} = 
20, 100, 200 |


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] bibtex setup .dir-locals.el

2018-11-01 Thread edgar

On 2018-10-31 15:27, John Kitchin wrote:

You do have to close the org-file, and then reopen it after you make
that file, and when I do that I am prompted whether to apply or ignore
the settings.


Oh! may be I need to re-open the file. I tried with reloading dir-local 
variables and reverting the buffer.



It might be simpler to just use a bibliography link in the file though:

bibliography:References.bib


Yes, I used to have \addbibresource{References.bib}, but I wanted to 
have the whole configuration on the .dir-locals.el file. I guess that 
bibliography:References.bib is more general.


Thank you very much, Dr. Kitchin!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] bibtex setup .dir-locals.el

2018-10-28 Thread edgar

Hello,

I would like to know how to set my ~References.bib~ as a dir-local 
variable for use with bibtex (org-ref, reftex). I have this in my 
~.dir-locals.el~. It keeps showing the global list of references. 
Thanks!


#+BEGIN_SRC emacs-lisp
  ;;; Directory Local Variables
  ;;; For more information see (info "(emacs) Directory Variables")

  (
   (org-mode
(reftex-default-bibliography . 
("/Class/Biomat/Hw/Project/References.bib"))
(org-ref-default-bibliography . 
("/Class/Biomat/Hw/Project/References.bib"))
(bibtex-completion-bibliography . 
("/Class/Biomat/Hw/Project/References.bib"))
(org-ref-bibliography-notes . 
"/Class/Biomat/Hw/Project/report-biomat.org")
(bibtex-completion-notes-path . 
"/Class/Biomat/Hw/Project/report-biomat.org")

(org-ref-pdf-directory . "/Class/Biomat/Hw/Project/Media/")
(bibtex-completion-library-path . "/Class/Biomat/Hw/Project/Media/")
)

   (bibtex-mode
(reftex-default-bibliography . 
("/Class/Biomat/Hw/Project/References.bib"))
(org-ref-default-bibliography . 
("/Class/Biomat/Hw/Project/References.bib"))
(bibtex-completion-bibliography . 
("/Class/Biomat/Hw/Project/References.bib"))


(org-ref-bibliography-notes
 .
 "/Class/Biomat/Hw/Project/report-biomat.org")

(bibtex-completion-notes-path
 .
 "/Class/Biomat/Hw/Project/report-biomat.org")

(org-ref-pdf-directory
 .
 "/Class/Biomat/Hw/Project/Media/")

(bibtex-completion-library-path
 .
 "/Class/Biomat/Hw/Project/Media/")
  )
   )
#+END_SRC

As an example:
#+BEGIN_EXAMPLE
  reftex-default-bibliography is a variable defined in ‘reftex-vars.el’.
  Its value is
  ("/Class/Biomat/Hw/Project/References.bib")
  Original value was nil
  Local in buffer report-biomat.org; global value is
  ("//Research/References.bib")

This variable’s value is directory-local, set by the file
‘/Class/Biomat/Hw/Project/.dir-locals.el’.

  Documentation:
  List of BibTeX database files which should be used if none are 
specified.

  When ‘reftex-citation’ is called from a document which has neither a
  ‘\bibliography{..}’ statement nor a ‘thebibliography’ environment,
  RefTeX will scan these files instead.  Intended for using 
‘reftex-citation’
  in non-LaTeX files.  The files will be searched along the BIBINPUTS or 
TEXBIB

  path.

  You can customize this variable.
#+END_EXAMPLE

My system
#+BEGIN_SRC emacs-lisp
  (concat
   (emacs-version) "\n"
   (org-version) "\n"
   (org-ref-version))
#+END_SRC

#+RESULTS:
: GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
:  of 2018-07-05
: 9.1.14
: org-ref: Version 1.1.1

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] filter for svg latex-export

2018-09-06 Thread edgar

Hi,

I want to report that I can use the new version  of the SVG (2.00b) 
LaTeX directly. The developer (Falk; Bcc) said that there will be a new 
release soon. I attach an example of the strange things that I can 
achieve. I hope that it's useful :) .


Cheers!

On 2018-01-09 03:34, John Kitchin wrote:

If all you are doing is replacing includesvg with simplesvg, then you
might try this:

#+BEGIN_SRC emacs-lisp
(let ((org-export-filter-link-functions  '((lambda (txt _ _)
 (replace-regexp-in-string "includesvg" 
"simplesvg" txt)
  (org-latex-export-as-latex))
#+END_SRC

If you are doing more than that (it looks like you are adding options?)
then one alternative option is just put a copy of your modified 
function

in your init file after you load org, and then it will shadow the
ox-latex function and you might not have to change anything when you
update as long as no incompatible changes are in the update. I know,
that is hacky, but it works in cases like this.



ed...@openmail.cc writes:


Hello,

I once tried to create a filter (is that the name?) to modify the
function which exports SVG files. Verdict: I suck! Thus, I keep
modifying the ox-latex.el every time that I upgrade (see attached).
Would someone please tell me what is the right way to achieve that
(without modifying the code, please? Thanks!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out 
of the NSA's hands!

$24.95 ONETIME Lifetime accounts with Privacy Features!
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  *** 
org-20180103/ox-latex.el	2018-01-07 16:53:43.477464348 -0700

--- plugins/ox-latex.el 2018-01-07 16:39:52.117462098 -0700
***
*** 2425,2434 
  (t (format "[%s]" options)))
path))
(when (equal filetype "svg")
!   (setq image-code (replace-regexp-in-string "^includegraphics"
!  "\\includesvg"
!  image-code
!  nil t))
(setq image-code (replace-regexp-in-string "\\.svg}"
   "}"
   image-code
--- 2425,2437 
  (t (format "[%s]" options)))
path))
(when (equal filetype "svg")
! (setq image-code
!   (format "\\simplesvg%s{%s}"
!   (cond ((not (org-string-nw-p options)) "")
! ((string-prefix-p "," options)
!  (format "{%s}" (substring options 1)))
! (t (format "{%s}" options)))
!   path))
(setq image-code (replace-regexp-in-string "\\.svg}"
   "}"
   image-code



--
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



-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  

svg-sample.tar.gz
Description: Binary data


Re: [O] General advice beyond Org

2018-05-23 Thread edgar
For posterity: I have answered to the messages on this thread elsewhere. 
Thanks!


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-20 Thread edgar

Message: 2
Date: Sat, 19 May 2018 19:24:12 +0200
From: Joseph Vidal-Rosset 
To: emacs-orgmode list ,   John Kitchin
,John Kitchin 
Subject: Re: [O] export to odt with LaTeX math formulae and tables
Message-ID:

[O] Exporting ODT to Org [was Re: General advice beyond Org]

2018-05-20 Thread edgar

Message: 4
Date: Sun, 20 May 2018 10:08:46 +0200
From: 
To: help-gnu-em...@gnu.org
Subject: Re: General advice beyond Org
Message-ID: <20180520080846.ga15...@tuxteam.de>
Content-Type: text/plain; charset=utf-8; x-action=pgp-signed

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, May 19, 2018 at 06:24:49PM -0700, Samuel Wales wrote:
perhaps we can start thinking about improving registration between 
formats?


This resonates with some vague ideas that keep haunting some
dark corners of my mind:

it isn't generally possible to convert "Word" [1] into Org. But what
if that "Word" is just a slight modification of something which has
been transformed from an Org document we know?

Of course, augmenting that with "pockets" where to stash 
meta-information
which might get lost on round-trip would be even more interesting. 
Perhaps
those pockets are external, tied to some (possibly change-resistant) 
hash

made of enough context.

Did I say dark corners?

Cheers


Makes me feel lucky of being able to tie my laces! :D .

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Exporting ODT to Org [was Re: General advice beyond Org]

2018-05-19 Thread edgar

On 2018-05-20 01:24, Samuel Wales wrote:
perhaps we can start thinking about improving registration between 
formats?


I don't really know what this means.


if you export org [you posted to org mailng list] to a foreign format,
you want your collaborator to be able to edit, save, send back without
raising a sweat.


Not really, although it would be nice--and possibly titanic to do.

now you have to integrate the changes.  you want to do this without 
annoyance.


suppose you export comments in the foreign format that contain the
equivalent of persistent markers.  you might or might not be willing
to put org id or custom id on every heading, but there might be
workarounds that are not so intrusive.  maybe your source can contain
comments with markers.  dunno.


Every great project had to start somewhere (this sounds like that). 
However, if I am going to devote time to such a gigantic task, I would 
rather spend it trying to convert others to free software rather than 
doing favours to a closed format. I am not saying that it wouldn't be 
nice to have it.



if your exported document is a subtree within a huge org file that you
edit all the time, registration allows your software to identify that
subtree, so you're not trying to change anything outside that subtree.
that alone is a win.


This sounds like a project for people in LibreOffice or Pandoc. I think 
I will contact them to see if they are interested.




but maybe we can do more.  the markers can register sections or even
paragraphs if you're doing intensive collaboration.  the tricky part
might be getting standard tools to understand that the mapping of
markers takes precedence over everything else.


Yes, big project.



details of this handwavey and possibly impossible brainstorm are left
as an exercise for the reader.


LL! you remind me of books with notes such as "after deriving the 
equation one arrives to the following expression" :P !


Thank you.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-19 Thread edgar

Message: 16
Date: Fri, 18 May 2018 14:48:56 +0200
From: Joseph Vidal-Rosset 
To: emacs-orgmode list 
Subject: Re: [O] export to odt with LaTeX math formulae and tables
Message-ID:

Content-Type: text/plain; charset="utf-8"

Hello again,

I just got this message error:

OpenDocument export failed: Wrong type argument: listp, 67




What is the meaning of this message and how can I do?

Many thanks for your help,

Jo.


I don't really know, Jo, but whenever I get something like that it means 
that

1. there is something wrong with my .emacs, or
2. there is something wrong with my document (strange character, missing 
bracket, mistyped #+OPTIONS line, etc.).


I would (and usually)
0. Open the *Messages* buffer to see if there is some useful information 
there.

1. fire up a new emacs ::  ~emacs -Q~,
2. load package ::  M-: (require 'package),
3. initialize package ::  M-: (package-initialize),
4. load Org ::  M-: (require 'org)   (you may need a path, if you did 
not install from elpa or similar).
5. take the document by chunks, export it piece by piece, and try to 
find which part holds the bug.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-19 Thread edgar

Message: 14
Date: Fri, 18 May 2018 12:01:22 +0200
From: Joseph Vidal-Rosset <joseph.vidal.ros...@gmail.com>
To: emacs-orgmode list <emacs-orgmode@gnu.org>
Subject: Re: [O] export to odt with LaTeX math formulae and tables
Message-ID: <87fu2p8eq5@gmail.com>
Content-Type: text/plain

Dear Edgar,

Thanks for your help on the export of bibliography for docx or odt. I 
am

going to persist in trying to succeed it.


One is glad to be of help :) ;) .



About proof.sty, really there is not  the least problem from org-mode 
to
latex, everything  is smoothly  exported and the  final pdf  document 
is
really nice (with the really pretty 
smfart.class

[[http://smf4.emath.fr/Publications/Formats/]] that I advice.)


I will try that. Thanks.



No,  my problem  is only  with the  export of  these proof  to odt,


Oh, I know!


and
Authorea fails  also (that is  the main reason  why I gave  up 
Authorea,
which seems  to me  being a  nice project, but  not complete  enough 
and

therefore unfortunately  useless for me).


I'm sorry if I mislead you: the only thing that I recommended was the 
LaTeXML style from them. I don't know what Authorea is, actually.



The  only reasonable solutions
seems to me the png export from a succeeding org export to an odt file.


This is by far the quickest solution, and if you don't care about having 
others modify your equations in the ODT, go for it! I would even send a 
compressed file with the Org and other required files (.bib, .png, 
etc.).


I make no promises, but I will try to make a template for you that can 
export tables and equations (on my machine)




Best wishes,

--
Joseph


I wish you the best of luck on this :) .

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-18 Thread edgar

On 2018-05-18 08:35, Joseph Vidal-Rosset wrote:

Hello Edgar, Nicolas, Eric, and everybody of the emacs-orgmode list,

I give news of my export tentatives from my .org file to odt , in a 
word:

it fails.
I suspect that the problem is my setup, but I am unable to be more 
precise

(if it was not the case, I could probably fix it).

Anyway, pandoc alone was useful and with

pandoc -f latex -t odt -o output.odt input.tex




or

pandoc my-document.tex -o my-document.docx




(I got help here:
https://askubuntu.com/questions/82634/how-to-convert-tex-into-odt
and here: 
https://jabranham.com/blog/2016/11/using-pandoc-export-to-word/ )


I have succeeded to get odt and docx files . But in these files:

   1. tables from tabular with multicolumn are not correctly exported,
   2. the bibliography is not exported
   3. figures of natural deduction proofs produced with proof.sty 
cannot be
   read, because only the latex code is given (I suppose that I need 
png
   images, but because my org export to odt fails, the export of all 
natural

   deductions proof schema also fails.).

 *Comment:* It is a terrible waste of time for a result that even if 
with a

lot of efforts the odt or docx export will finally succeed, the final
result will be far to be as nice as the pdf produced by the latex file.

Anyway, your help is still welcome.

Best wishes,

Jo.



Dear Jo,

First of all, I don't want you to have the wrong impression: I am not an 
Emacs nor Org guru. If I give you an advice, always, always take it with 
caution.


Secondly, I am glad that you are having progress! :D .

Thirdly, I think that I can help you with point (2). Did you try with 
pandoc like I said before?:


On 2018-05-16 20:19, hidden@mail wrote:

Export to ~LaTeX~ file first with ~C-c C-e l l~



  pandoc --csl=council-of-science-editors.csl \
  --bibliography=/path/to/myreferences.bib \
  -f latex+smart inputfile.tex \
  -t docx+smart -o outputname.docx


You will need
1. a CSL file to set a style to your references 
(council-of-science-editors.csl in this example). You can get some from 
here: https://github.com/citation-style-language/styles

2. a bib style (I use Biber; I don't know if that matters, just try).

This has worked for me in the past to produce a DOCX with references.

What I actually recommend is to get that DOCX and copy the references to 
what Org mode exports as ODT 
(https://lists.gnu.org/archive/html/emacs-orgmode/2018-05/msg00346.html), 
then save the ODT as DOCX in LibreOffice. The ODT produced by Org is 
almost ready, and it carries the advantage of
1. tweaking an OTT (template) to your needs to set a specific format 
(see the link above; you can try the same with --reference-doc in 
pandoc, by the way).
2. being able to (partially use siunitx or other LaTeX commands with 
LaTeXMLMath; although pandoc is working on getting siunitx as well--make 
sure to get the latest version). If you see siunitx.sty.ltxml from 
Authorea's github.com (see link above), you'll see that it may be 
possible to tweak it to your needs for proof.sty.
3. produces tables (you may need to change the format; did I mention the 
OTT?)


One disadvantage of this method is that you may need to replace the key 
to the references to the format which you need (i.e. [authoryear] to 
[1]), but you can use the Replace All function from LibreOffice (if 
there are not many references). I would advise to keep a copy of the 
list after you do the first Replace All, because it's going to be lost 
the next time that you export.


I am sure that there is a good reason for which exporting with 
references has not been implemented in the ODT export function in Org. 
As I said, I am not a guru, and I am not going to complain to the 
developers if I can't code it myself, but you may want to post a feature 
request (may be I should too).


I have never used proof.sty, but I know that there is a way to ask Org 
to load a set of packages when exporting. May be that helps (look for 
the documentation of org-latex-default-packages-alist and 
org-latex-packages-alist; C-h v org-latex-default-packages-alist)


Bonne chance! :) .

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] General advice beyond Org

2018-05-18 Thread edgar

On 2018-05-18 07:12, S. Champailler wrote:

Be aware that free software is politcally loaded. It's just not a
matter of having the right or best tools, it' sometimes a question of
ideal, that is something that is *very* hard to negociate about...

Moreover, if the people you work with use, say Word, it's pretty tough
to bring in, say Latex. Because you'll disrupt the organisation of the
team.

In the case of emacs, though, things are easier : it's made to work
with text files and that is quite compatible with any other
proprietary software. You won't affect anybody's job with that.

Here at my job, I don't control any of the software I use (I have to
use Oracle, Windows, Skype), but I can choose the software that *I*
use for myself. So it's a balance.

Changing other's mind, or methods is super hard, what you experience
is just the normal. It'd be nice to know why your advisor rejects free
software equivalents (lack of features ? fear of legal battles ?
organisational ...)

Stefan


Merci, Stefan. I have tried to understand her point, and I can dissect 
it into:


1. She does not see the advantage of having to learn how to use anything 
else. It works well for her, why change and waste time on doing it?


2. She likes and is used to the "features" of the software (today, I 
discovered that one of these is the so-called "track changes"; I swear I 
have tried to introduce her to Git, not that she cares).


3. I think that she is used to the interface.

4. She says (and I have no reason to question) that the whole department 
uses the proprietary software that she uses. It is an imposition to 
others (including her) to ask them to use something different.


It is only when we have to collaborate directly that the issue arises. I 
guess that it's a similar situation as you are having (programming? she 
does not care, I can do whatever I want; publication abstract? she wants 
a DOCX or DOC). What I find unfathomable is that I can produce the 
format that she needs (even with style) with free software (thanks 
community!), but what I perceive as her reluctance to my software (or 
just plain miscommunication) prevents her from informing me or me 
understanding what exactly it is that she considers important. In other 
words, she does not seem to want to deal with it in any way.


I'm sorry, I didn't want to make this very long. I hope that I explained 
myself.


The count goes like this (so that everyone knows that I am listening, 
the count is by far the least important):
- Yield partially (1) :: You will have to work with proprietary software 
in some way, but not always.
- There is no escape (1) :: You will have to work with proprietary 
software


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] General advice beyond Org

2018-05-17 Thread edgar

Hello,

_I_ need help. I am in graduate school, and I keep having issues with my 
advisor for my strong inclination to use free software. I am obviously 
not in position to refuse, but she dislikes to have discussions about 
it. She pays a stipend to me every month, and my tuition is waved.


Is anyone here aware of a place where they do computational human 
biomechanics, mechanics, materials or finite elements where I could 
interact with free software? (having github, LaTeX, Python, etc.; avoid 
Micro$oft products, Matlab, Mathematica, etc.). Is there no place where 
one can simply use free software on a daily basis?


It seems from her comments that I am, otherwise, a good researcher. She 
is a nice person, but I fear that this may become an issue in the future 
for me (whether with her or other people).


As a student or junior faculty, how do you go about this? Do you just 
nod and wave your freedom good bye?


Thank you! (I will post this in other fora as well; don't let that to 
discourage you from answering, please).


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] taskjuggler subtract scheduled and deadline

2018-05-17 Thread edgar

Bastien  writes:

AFAIK there isn't. Your patch was good start, but your expressions
inside the (or ...) were such that the one that collected the time was
never executed.

I see three options:

1. Hack the exported taskjuggler file. A hack but gets the job done
2. Try to use the START attribute on the node
3. Improve the source of ox-taskjuggler.el as you've started.

Hope that helps
Christian


Thank you, Christian and Bastien. I will try to work on this and get 
back to the list :) .


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-17 Thread edgar

On Fri, 11 May 2018 14:09:33 +0200

(Why an acedemic review request Word files? It should be forbidden.)
Joseph


I agree! (in some countries, universities are partially 
funded--influenced--by Micro$oft, that may explain).


On Fri, 11 May 2018 14:37:10 +0200

Nicolas Goaziou:
> #+OPTIONS: LaTeX:t

This option is obsolete since Org 8.0.



That option still shows up in org-info (Working with LaTeX math 
snippets):
GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21) of 
2017-09-22, modified by Debian

Org mode version 9.1.13 (9.1.13-elpa 20180507)
May be it's corrected in a newer Emacs...

Also, I hadn't seen this thread, sorry. Thus, I created this: 
https://lists.gnu.org/archive/html/emacs-orgmode/2018-05/msg00346.html


Hope it helps. You can potentially use it to get any other symbols. You 
can also try with pandoc (using 2.0.5 here; there is a binary on 
https://github.com/jgm/pandoc/releases/latest):


Export to ~LaTeX~ file first with ~C-c C-e l l~
#+BEGIN_SRC bash
  pandoc --csl=council-of-science-editors.csl \
  --bibliography=/path/to/myreferences.bib \
  -f latex+smart inputfile.tex \
  -t docx+smart -o outputname.docx
#+END_SRC

Good luck!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] A way to export to ODT

2018-05-15 Thread edgar
I want to share this little recipe in the hope that it is useful to 
someone. It is a partial solution to exporting with MathML to ODT from 
Org. I am not a fan of ODT, but my boss need DOCX like dope.


To get a working file
1. To get siunitx (partially) working, download 
[[https://github.com/Authorea/LaTeXML/blob/master/lib/LaTeXML/Package/siunitx.sty.ltxml][siunitx.sty.ltxml 
from Authorea's github.com]]
(there is an issue on the upstream 
[[https://github.com/brucemiller/LaTeXML][LaTeXML]] for this already; 
the author may be more motivated is someone else asks for it and/or 
helps) and save it somewhere (remember this location, you'll need it 
later). Here, ~~/.emacs.d/plugins~ is used.


   Do ~C-c C-c~ or ~C-c C-v C-e~ 
(src_emacs-lisp{(org-babel-execute-maybe)}) on the following block to 
add ~\mathrm{·}~ to the symbols (this removes italics from units). 
Change the path to the file accordingly.

   #+BEGIN_SRC bash
 sed -i "s-\(DefMacro.*\)'\([[:alpha:]]*\)'-\1'mathrm{\2}'-g" 
~/.emacs.d/plugins/siunitx.sty.ltxml

   #+END_SRC

   Add any required symbol to that same file (note that there is a ~\mm~ 
which should be ~\mmHg~; commit e134a5b @ Jul 24, 2017). Note that if 
you add something like ~DefMacro('\mm','some');~, strange things start 
to happen.


2. Install ~latexml~ (with ~latexmlmath~; 
https://dlmf.nist.gov/LaTeXML/get.html). Then, execute this command in 
Emacs (change ~latexmlmath~ to the actual path)

   #+BEGIN_SRC emacs-lisp
 (setq org-latex-to-mathml-convert-command
   "latexmlmath --presentationmathml=%o --preload=siunitx 
--path=~/.emacs.d/plugins/ --includestyles \"%i\"")

   #+END_SRC

3. Set the ~#+OPTIONS: LaTeX:t~ somewhere in the document

4. Export to odt with Org-mode (~C-c C-e o o~), and run this (you can do 
~C-c C-c~ on it; make sure that LibreOffice is not running)

   #+BEGIN_SRC shell
 libreoffice --headless --convert-to doc 
./.odt

   #+END_SRC

   You can use a template with the line (change file name accordingly). 
Modify the file at will.

   #+BEGIN_SRC org
 ,#+ODT_STYLES_FILE: "../Templates/odt-review-template.ott"
   #+END_SRC

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Change mode in org-edit-special

2018-02-03 Thread edgar

On 2018-02-02 18:07, Berry, Charles wrote:

On Feb 1, 2018, at 9:07 PM, ed...@openmail.cc wrote:

Is there a safe way to change mode in an org-edit-special buffer?


The safest thing would be to customize `org-src-lang-modes' so the
buffer is created with the mode you want to edit in.

Or if you want to edit in that mode only occasionally write a small
function that let-binds `org-src-lang-modes` to the value you need and
use that function as needed to create the buffer in that mode.

As far as changing major mode while already editing, the responses
here might help:

https://emacs.stackexchange.com/questions/21940/avoid-minor-modes-from-turning-off-when-changing-restarting-major-mode

HTH,

Chuck


Thanks. I will try :)

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Change mode in org-edit-special

2018-02-02 Thread edgar

Hello,

Is there a safe way to change mode in an org-edit-special buffer?

I remember that someone mentioned something like this some months ago, 
but I can't find it: If I change the mode within an org-edit-special 
buffer, the region on the original buffer gets blocked (can't edit), and 
neither C-c C-k nor C-c ' work to close the org-edit-special buffer. I 
only know that closing both buffers and visiting the file again will get 
rid of the problem.


Thanks.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] change in calling remote code blocks?

2018-01-18 Thread edgar

Message: 1
Date: Mon, 15 Jan 2018 10:07:33 -0800
From: John Kitchin 

with a syntax like:

#+call: si.org:figure-1() :wrap html


And C-c C-c on that line would call a code block named figure-1 in the 
file

si.org and insert the results.

in org 9.1.6, this does nothing. Does anyone know if this got changed, 
and

if there is a new way to do that?

John


You may try loading the file into the library of babel 
(org-babel-lob-ingest). Then, you can call the function without a 
reference to the file


#+CAPTION: s1.org
#+BEGIN_SRC org
  ,#+NAME: figure-1
  ,#+BEGIN_SRC python
return 2 + 2
  ,#+END_SRC
#+END_SRC

#+CAPTION: t.org
#+BEGIN_SRC org
  ,#+CALL: figure-1() :wrap html

  ,#+RESULTS:
  ,#+BEGIN_html
  4
  ,#+END_html
#+END_SRC


Message: 7
Date: Mon, 15 Jan 2018 23:49:54 +0100
From: Nicolas Goaziou 
To: John Kitchin 

This sounds like a bug.

Or missed feature?



It does ring a bell. However, I couldn't find any reference to this
syntax or behaviour in the manual. Am I missing something?


I only found the evident:
#+BEGIN_QUOTE
By calling a named code block(2) from an Org mode buffer or
a table.  Org can call the named ‘src’ code blocks from the
*current Org mode buffer* or from the *“Library of Babel”*
#+END_QUOTE
(bold added by me).



Message: 8
Date: Mon, 15 Jan 2018 16:08:26 -0800
From: John Kitchin 



babel documentation somewhere. I confirmed it does work in 8.2.10, e.g.
just with emacs -Q.


It would be nice if it did :) .

Thanks for working so well on Org. I have good news: Someone to whom I 
introduced Emacs is now using it! (not my advisor... yet).


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Feature request: #+INCLUDE: with anchors

2018-01-12 Thread edgar

Message: 6
Date: Thu, 11 Jan 2018 11:39:29 +0100
From: Rasmus 
To: emacs-orgmode@gnu.org
Subject: Re: [O] Feature request: #+INCLUDE: with anchors
Message-ID: <878td4r866@gmx.us>
Content-Type: text/plain; charset=utf-8

What would happen if one of the keywords aren?t unique?


Get the first instance? what happens when a referenced heading, block or 
table is not unique (or doesn't exist)?




Something similar can already be done in Org.  See this part of the
manual:

Inclusions may specify a file-link to extract an object matched by
org-link-search (see Search options).

To extract only the contents of the matched object, set
:only-contents property to non-nil. This will omit any planning lines
or property drawers. The ranges for :lines keyword are relative to the
requested element. Some examples:

#+INCLUDE: "./paper.org::#theory" :only-contents t
   Include the body of the heading with the custom id ?theory?
#+INCLUDE: "./paper.org::mytable"  Include named element.
#+INCLUDE: "./paper.org::*conclusion" :lines 1-20
   Include the first 20 lines of the headline named ?conclusion?.



Although I was aware of this, I think that what you write is very 
useful, thank you.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Feature request: #+INCLUDE: with anchors

2018-01-10 Thread edgar

Hello,

I have seen this syntax in markdown (one of the many versions):

!listing
path/to/file.ext
start=ini_keyword end=end_keyword

Here, ~file.ext~ is a source file, and both ~ini_keyword~ and 
~end_keyword~ are text strings in the text delimiting what should be 
included (responsibility of the writer to make sure they are unique). I 
think that having something like this in Org would be nice. I am aware 
of the ~:lines~ option, but having something like this would not require 
an update of the numeric reference every time the referenced file 
changes.


Thanks for the great work!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Orgmode repeater intervals with end date

2018-01-10 Thread edgar

Message: 8
Date: Tue, 09 Jan 2018 22:16:56 -0700
From: torys.ander...@gmail.com (Tory S. Anderson)
To: orgmode list 
Subject: [O] Orgmode repeater intervals with end date
Message-ID: <87incamgxj@byu.edu>
Content-Type: text/plain; format=flowed

Hi all,

When repeater intervals are set on on org dates (eg =<2018-01-10
Wed 16:00 +2w>=) 
the output is exported nicely to ical and appears

nicely in agenda. Is there anyway to put an end-date on org dates
so that the +2w will not just continue forever?

I could use org-class, but then it wouldn't be exported to ical
nicely. I was hopefully with <2018-01-10 Wed 16:00
+2w>--<2018-04-10 Wed 16:00 +2w> but this just put the range as
counting every day in the interim. Is there an existing way to
have an end-date on a repeating cycle?

- Tory


Have you tried with DEADLINE:? I seem to remember to have read something 
like that somewhere. Don't trust me. If it helps, I am glad, but I am 
not sure.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] filter for svg latex-export

2018-01-08 Thread edgar

On 2018-01-09 03:34, John Kitchin wrote:

Thank you, Dr. Kitchin! I will try this


If all you are doing is replacing includesvg with simplesvg,

#+BEGIN_SRC emacs-lisp
(let ((org-export-filter-link-functions  '((lambda (txt _ _)
 (replace-regexp-in-string "includesvg" 
"simplesvg" txt)
  (org-latex-export-as-latex))
#+END_SRC

If you are doing more than that (it looks like you are adding options?)


The only real difference in calling it is that I use {} instead of [], 
so I would not expect any problems


then one alternative option is just put a copy of your modified 
function

in your init file after you load org


Yep, I have been trying to avoid this. My init is already huge (not 
really: 2587 lines).


Thank you again!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] filter for svg latex-export

2018-01-07 Thread edgar

Hello,

I once tried to create a filter (is that the name?) to modify the 
function which exports SVG files. Verdict: I suck! Thus, I keep 
modifying the ox-latex.el every time that I upgrade (see attached). 
Would someone please tell me what is the right way to achieve that 
(without modifying the code, please? Thanks!


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  *** org-20180103/ox-latex.el2018-01-07 16:53:43.477464348 -0700
--- plugins/ox-latex.el 2018-01-07 16:39:52.117462098 -0700
***
*** 2425,2434 
  (t (format "[%s]" options)))
path))
(when (equal filetype "svg")
!   (setq image-code (replace-regexp-in-string "^includegraphics"
!  "\\includesvg"
!  image-code
!  nil t))
(setq image-code (replace-regexp-in-string "\\.svg}"
   "}"
   image-code
--- 2425,2437 
  (t (format "[%s]" options)))
path))
(when (equal filetype "svg")
! (setq image-code
!   (format "\\simplesvg%s{%s}"
!   (cond ((not (org-string-nw-p options)) "")
! ((string-prefix-p "," options)
!  (format "{%s}" (substring options 1)))
! (t (format "{%s}" options)))
!   path))
(setq image-code (replace-regexp-in-string "\\.svg}"
   "}"
   image-code


Re: [O] BeOrg

2018-01-04 Thread edgar
I am going to keep the thread just in case I ever need it. It's great! I 
have refrained myself from expressing my humble opinion for fear of a 
flame war, but...


"What's the point of a software which doesn't exist?" you say.

"What is the point of chaining people?" I would say.


Cheers!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] taskjuggler subtract scheduled and deadline

2017-12-26 Thread edgar

Hello,

I am trying this:

#+BEGIN_SRC org
  ,* TODO Pay the rent 
:taskjuggler_project:

  SCHEDULED: <2017-12-29 Fri 09:00> DEADLINE: <2017-12-29 Fri 11:00>
#+END_SRC

which gives me this:
#+BEGIN_EXAMPLE
  repeat.tjp:13: Error: The end date (2017-12-29-00:00-+) must be 
after the start date (2017-12-29-00:00-+).

#+END_EXAMPLE

I tried modifying ox-taskjuggler.el:
#+BEGIN_SRC diff
  ,*** org/ox-taskjuggler.el2017-12-26 16:39:52.633050180 -0700
  --- my/ox-taskjuggler.el  2017-12-26 19:42:17.921208465 -0700
  ,***
  ,*** 478,484 
  --- 478,490 
doesn't have any start date defined."
  (let ((scheduled (org-element-property :scheduled item)))
(or
  +  ;; How do I compile a regex to avoid locale day names?:
  +  ;; "%Y-%02m-%02d [[:alpha:][:space:]]* %[RT]"
 (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d"))
  +  (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d 
%R"))
  +  (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d %a 
%R"))
  +  (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d 
%T"))
  +  (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d %a 
%T"))

 (and (memq 'start org-taskjuggler-valid-task-attributes)
(org-element-property :START item)

  ,***
  ,*** 487,493 
ITEM is a headline.  Return value is a string or nil if ITEM
doesn't have any end date defined."
  (let ((deadline (org-element-property :deadline item)))
  ! (and deadline (org-timestamp-format deadline "%Y-%02m-%02d"



  --- 493,506 
ITEM is a headline.  Return value is a string or nil if ITEM
doesn't have any end date defined."
  (let ((deadline (org-element-property :deadline item)))
  ! ;; How do I compile a regex to avoid locale day names?:
  ! ;; "%Y-%02m-%02d [[:alpha:][:space:]]* %[RT]"
  ! (or
  !  (and deadline (org-timestamp-format deadline "%Y-%02m-%02d"))
  !  (and deadline (org-timestamp-format deadline "%Y-%02m-%02d 
%R"))
  !  (and deadline (org-timestamp-format deadline "%Y-%02m-%02d %a 
%R"))
  !  (and deadline (org-timestamp-format deadline "%Y-%02m-%02d 
%T"))
  !  (and deadline (org-timestamp-format deadline "%Y-%02m-%02d %a 
%T")





#+END_SRC

but I got the same error. Is there a way to set starting and ending 
times with a resolution of hours or minutes to be exported with 
taskjuggler? Thanks!


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] advice please: best way to export to DOC(X) with maths

2017-12-14 Thread edgar

Date: Thu, 14 Dec 2017 12:18:24 +
From: Eric S Fraga 
To: emacs-orgmode@gnu.org
Subject: [O] advice please: best way to export to DOC(X) with maths
Message-ID: <87ind9pkof@gmail.com>
Content-Type: text/plain; charset="us-ascii"

Hello,

almost all the writing I do that is intended to be exported will be
exported to LaTeX.  However, every now and again I need to export to
DOC/DOCX.

My query is: what is the best way (i.e. the state of the art) currently
in org to export to DOC/DOCX for text that has equations?  I have both
inline maths, e.g. \(i \in [0,n]\) and displayed equations.  Is there a
route that will convert these to something Word et al. can process
directly, other than images?  Maybe via pandoc?

Thanks,
eric

--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.3-168-g7455f4


I only know how to do a rough approximation by means of pandoc:

#+BEGIN_SRC bash
  pandoc -f org+smart my-original.org -t docx+smart -o my-output.docx
#+END_SRC

for slightly older versions of pandoc, this may work (there is an 
equivalent for the references, I think):

#+BEGIN_SRC bash
  pandoc -f org+smart --bibliography=../../References.bib 
my-original.org -o my-output.doc

#+END_SRC

I used to have a better solution, but at some point it stopped working. 
I didn't ask here, because 1/2 of my questions go under the radar, and I 
don't like to bug people with my issues:


To get a working file, first export to odt with Org-mode
(~C-c C-e o o~), and then run this (you can do ~C-c C-c~
on it; make sure that LibreOffice is not running)
#+BEGIN_SRC shell :results none
 libreoffice --headless --convert-to doc ./my-.odt
#+END_SRC

For the latter, I used to have
#+OPTIONS: tex:dvipng

A better solution would be most appreciated.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Can export the files with bibliography only to LaTeX

2017-12-14 Thread edgar

Date: Thu, 14 Dec 2017 12:28:46 +
Subject: Re: [O] Can export the files with bibliography only to LaTeX
I am sympathetic to these views but unfortunately it's not always
possible.  My university, for instance, requires me to prepare exam
scripts in DOC (hence my related email a few minutes ago... my yearly
task of preparing scripts is upon me).  I hate it but I have no choice.



I'm on the same boat: when your advisor "kindly" asks you to write 
everything in DOC{,X}. But it's a boat that is sinking, and let's hope 
sooner than later.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Prevent auto-filling of export snippets

2017-12-08 Thread edgar

Hello,

AFAIK, you are an Org guru (or at least have much more experience than I 
do), and I know that you are asking this for the benefit of everyone. I 
just want to say:


and with auto-fill-mode enabled (70 cols), if I hit Enter at the end of 
the line, I becomes:


I recommend using visual-fill-column-mode
  ;; Wrap text
  ;; http://danlovesprogramming.com/making-text-look-good-in-org-mode/
  ;; https://caolan.org/dotfiles/emacs.html
  (use-package visual-fill-column
:ensure t)
or

  (with-eval-after-load "org"
  (require 'visual-fill-column))

and add indent mode (I didn't keep the reference to the source of this; 
this may go inside the :config part of use-package org):


(add-hook 'org-mode-hook (lambda ()
 (org-indent-mode)
 (auto-fill-mode -1)
 (visual-fill-column-mode)
 (setq visual-line-fringe-indicators 
'(left-curly-arrow right-curly-arrow))

 (visual-line-mode 1)
 ))

Can the rules in Org set to prevent auto-filling (like in Headings) be 
set for Export Snippets too?

In that way, you really don't need auto-filling.

Note: I tried to set the right snippets to get visual-fill-column-mode 
working, but I don't know if more than that is needed.


Cheers!

---
Vive la liberté!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Ediff org files starts folded

2017-10-26 Thread edgar
Yeah, it would be nice to have something that folds the tree back to its 
original state after the ediff! (excitement)


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Taskjuggler effort and days

2017-10-19 Thread edgar

Hello,

I got an example from the web to run Taskjuggler (attached; 
https://emacs.stackexchange.com/a/31513).


However, when I try to set efforts to units other than hours (~:Effort: 
5d~ or ~:Effort: 1w~; see [[tjp.org::Another task]]), org-export 
multiplies 24 hours times the number of days. This results in 120.0h (3 
weeks in the HTML report) for 5d.


I would like to know if, instead of having 24 hours as the factor, there 
is a way to have the actual value copied (~:Effort: 5d~ from the tjp.org 
to ~effort 5d~ in the tjp.tjp).


I modified the resulting .tjp, and I can set ~effort 5d~ to get 5 
effective days (if no other task is allocated to the resource). Also, if 
I set ~:Length: 5d~ instead of ~:Effort: 5d~, the time is well allocated 
(results in ~length 5d~; may be that is a clue..?).


If this question has been answered before, I would appreciate if someone 
points me in the right direction. Thanks!


* My configuration
Org mode version 9.1.2 (9.1.2-15-g1d5142-elpa
GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
I copied and loaded the ox-taskjuggler.el from http://orgmode.org/elpa/ 
today.


#+BEGIN_SRC emacs-lisp
(require 'package)
(package-initialize)
(require 'org)
(add-to-list 'org-export-backends 'taskjuggler)
(require 'ox-taskjuggler)
#+END_SRC

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  project nil "test project" "1.0" 2017-03-25 +280d {
}
shift s40 "Part time shift" {
  workinghours wed, thu, fri off
}
resource people "People" {
  resource sdude "Some Dude" {
limits { dailymax 8.0h }
workinghours mon - fri 9:00 - 12:00, 13:00 - 18:00
  }
}
task test "test project" {
  start 2017-03-25
  task milestones "Milestones" {
task start "Start" {
  milestone
}
task end "End" {
  milestone
}
  }
  task tasks "tasks" {
task first_task "Some task" {
  depends !!milestones.start
  purge allocate
  allocate sdude
  complete 50
  effort 4.0h
}
task second_task "Another task" {
  depends !first_task
  purge allocate
  allocate sdude
  complete 50
  effort 120.0h
}
  }
}
textreport report "Plan" {
  formats html
  header '== test project =='

  center -8<-
[#Plan Plan] | [#Resource_Allocation Resource Allocation]

=== Plan ===
<[report id="plan"]>

=== Resource Allocation ===
<[report id="resourceGraph"]>
  ->8-
}

# A traditional Gantt chart with a project overview.
taskreport plan "" {
  headline "Project Plan"
  columns bsi, name, start, end, effort, chart
  loadunit shortauto
  hideresource 1
}

# A graph showing resource allocation. It identifies whether each
# resource is under- or over-allocated for.
resourcereport resourceGraph "" {
  headline "Resource Allocation Graph"
  columns no, name, effort, weekly
  loadunit shortauto
  hidetask ~(isleaf() & isleaf_())
  sorttasks plan.start.up
}
#+COLUMNS: %25ITEM %TODO %3PRIORITY %ALLOCATE(Owner) %DEPENDS(depends) 
%EFFORT(Effort) %TAGS
* test project  :taskjuggler_project:
  :PROPERTIES:
  :start:2017-03-25
  :END:

** Milestones

the milestones for the project

*** Start
:PROPERTIES:
:task_id:  start
:END:

the start of the project.

*** End
:PROPERTIES:
:task_id:  end
:depends:  blah
:END:

this is the end of the project

** tasks

*** TODO Some task
DEADLINE: <2017-03-29 Wed> SCHEDULED: <2017-03-27 Mon>
:PROPERTIES:
:task_id:  first_task
:Effort:   4:00
:depends:  start
:complete: 50
:ALLOCATE: sdude
:END:

this is a test of the system.

*** TODO Another task
DEADLINE: <2017-03-29 Wed> SCHEDULED: <2017-03-28 Tue>
:PROPERTIES:
:task_id:  second_task
:Effort:   5d
:depends:  first_task
:complete: 50
:ALLOCATE: sdude
:END:

* Resources:taskjuggler_resource:
  :PROPERTIES:
  :workinghours: sat, sun off
  :END:

** People
:PROPERTIES:
:COLUMNS:  %30Item(Person) %workinghours(Work hours) %15resource_id(ID) %email 
%Phone
:END:
These are the resources available to the project.

*** Some Dude
   :PROPERTIES:
   :resource_id: sdude
   :limits:   { dailymax 8.0h }
   :workinghours: mon - fri 9:00 - 12:00, 13:00 - 18:00
   :END:


Re: [O] width/height/alignement of images in tables

2017-09-22 Thread edgar

Date: Fri, 22 Sep 2017 09:56:35 +0200
From: C?dric ODY 
To: emacs-orgmode@gnu.org
Subject: [O] width/height/alignement of images in tables

Would there be a way to add width/height/alignment parameters for 
images

that are included in a table, say

| [[./a.png]] | [[./b.png]] |

by for instance adding the parameters inside the brackets
[[./a.png,width,height,halign,valign]]?

thanks,


Hope this helps: https://github.com/linktohack/ox-latex-subfigure

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



  1   2   >