Re: Bug report

2022-06-01 Thread Eric S Fraga
On Wednesday,  1 Jun 2022 at 23:24, Max Nikulin wrote:
>
> I think, it is org and #+begin_src is used to demonstrate a snippet of
> org markup, so to reproduce the problem try it in a regular paragraph.

Ah, sorry, missed the point entirely! 

-- 
: Eric S Fraga, with org release_9.5.3-520-g4dda0d in Emacs 29.0.50



Re: Bug report

2022-06-01 Thread Eric S Fraga
On Wednesday,  1 Jun 2022 at 07:53, Topi Mäenpää wrote:
> I have trouble escaping a dollar sign in org-mode documents. I
> tried to enter the following:
>
> #+begin_src
> A (14 G$) B (6 G$)
> #+end_src

I have no problem with this.  What version of org are you using?

Out of curiosity, what language is this?  I ask because #+begin_src
expects a language argument normally.  Otherwise, I would use an example
block, e.g.:

#+begin_example
A (14 G$) B (6 G$)
#+end_example

which may also help with your problem.

-- 
: Eric S Fraga, with org release_9.5.3-520-g4dda0d in Emacs 29.0.50



Re: Timestamp with repeater interval AND END DATE?

2022-05-31 Thread Eric S Fraga
On Tuesday, 31 May 2022 at 14:46, Angel de Vicente wrote:
> Did I miss something in the manual?

No, you did not miss anything.  What you want cannot be done with a
single time stamp.  Instead, there are two alternatives:

1. use a diary s-exp (see info manual) which does allow this or
2. use org-clone-subtree-with-time-shift: create a single entry and then
   copy it as many times as desired.

HTH,
eric

-- 
: Eric S Fraga, with org release_9.5.3-511-g8e69ad in Emacs 29.0.50



Re: export a org table to ascii format (tabs) are not conserved, culprit orgtbl-to-tsv?

2022-05-30 Thread Eric S Fraga
On Monday, 30 May 2022 at 17:48, Uwe Brauer wrote:
> The problem also occurs when I export the table using the
> orgtbl-to-tsv

The hint is in the name: tsv means "tab separated values" so each entry
(stripped of trailing spaces) is separated by a tab character (\t, o11,
0x09).  If you look at the exported text carefully, you'll find that
there is only one character between each entry and C-x = will tell you
what that character is.

-- 
: Eric S Fraga, with org release_9.5.3-511-g8e69ad in Emacs 29.0.50



Re: # Comments export

2022-05-30 Thread Eric S Fraga
On Sunday, 29 May 2022 at 00:46, Ypo wrote:
> I wanted to export my #comments so I could share my notes with more
> people, using HTML export. I would export all of them.

I use drawers for this and then have specific processing of different
types of drawers, depending on target.

For instance, I might have :note: drawers (similar to inline tasks) with
the following processing (for odt export; similar for LaTeX):

--8<---cut here---start->8---
(setq-local org-odt-format-drawer-function
(lambda (name contents)
  (if (string= name "note")
  (progn
(format "%s" contents)
--8<---cut here---end--->8---

(progn because I used to do more in there...)

-- 
: Eric S Fraga, with org release_9.5.3-511-g8e69ad in Emacs 29.0.50



Re: Allow Currency Symbols and Grouping Commas in Table Numbers

2022-05-27 Thread Eric S Fraga
On Friday, 27 May 2022 at 19:17, Ihor Radchenko wrote:
> You are right. However, non-letter symbols do not work. Try, € or ☺️.

Interesting.  Seems rather strange but definitely the case. :-( I guess
I've only ever used Greek symbols if not ASCII.

-- 
: Eric S Fraga, with org release_9.5.3-511-g8e69ad in Emacs 29.0.50



Re: Allow Currency Symbols and Grouping Commas in Table Numbers

2022-05-27 Thread Eric S Fraga
On Friday, 27 May 2022 at 16:22, Ihor Radchenko wrote:
> However, calc does not appear work with unicode. 

Are you sure?  This works just fine for me with embedded Calc:


--8<---cut here---start->8---
n := 100

a := 0

b := 1.0

δx := (b - a) / n => 0.01

i := 15

xi := a + δx i => 0.15
--8<---cut here---end--->8---

Note use of δ.  I use Greek characters all the time in my Calc formulas.

If it works in embedded Calc, it should work with the rest of Calc?

-- 
: Eric S Fraga, with org release_9.5.3-511-g8e69ad in Emacs 29.0.50



Re: re-scanning bibliography for org-cite

2022-05-26 Thread Eric S Fraga
Hi Ihor,

I will try these out, hopefully tomorrow.  The difficulty will be
knowing whether they work or not given the sporadic nature of the
problem...

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.3-513-g292116 in Emacs 29.0.50



Re: re-scanning bibliography for org-cite

2022-05-26 Thread Eric S Fraga
On Thursday, 26 May 2022 at 13:00, Ihor Radchenko wrote:
> In theory, it might be related to one of the changes I made in this
> area. I am not 100% sure, but bibliography might not be rescanned if you
> edit a bibliography file in Emacs buffer, but do not actually save it.
> Is this what is happening?

No and, to be fair, I wouldn't expect the scanning to take place if I
hadn't saved the file.

I have my bibliography in an org file which I export to .bib using
org-bibtex.

Is there a function I can call to force a rescan?  That would satisfy me
as I could put it into a hook for org-bibtex (or advice the function if
no hook available).

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.3-472-gd2a459 in Emacs 29.0.50



Re: export regions of a org files to other formats (most likely only to a buffer).

2022-05-25 Thread Eric S Fraga
On Wednesday, 25 May 2022 at 16:35, Uwe Brauer wrote:
> Sometimes I only want to convert/export a region or a paragraph of an
> org file to another format, most likely as html or latex.
> I cannot find such a functionality also not in the package system
> does anybody knows about such a function?

You can narrow your buffer to the region, (narrow-to-region, C-x n r),
and export then.  I believe this will work.

Alternatively, you can always export the contents of a sub-heading by
specifying C-s during export, e.g C-c C-e C-s l l


-- 
: Eric S Fraga, with org release_9.5.3-511-g8e69ad in Emacs 29.0.50



Re: re-scanning bibliography for org-cite

2022-05-24 Thread Eric S Fraga
On Wednesday,  3 Nov 2021 at 17:21, Nicolas Goaziou wrote:
> oc-basic relies on a cache. The cache key contains a hash of the
> contents of the bib file. So whenever the bib file is modified, the
> cache is invalidated, and oc-basic parses again the file.
>
> IOW, rescanning happens automatically in oc-basic.

Hi Nicolas,

sorry to revisit this but I continue to run into the problem of the
bibliography not being rescanned automatically.  What is the easiest way
(other than leaving Emacs and restarting) to force it, assuming there is
one?  I.e. maybe I can invalidate or clear the cache?

I do not know why rescanning doesn't happen.  It usually does but then
sometimes it doesn't without any noticeable difference in the actions I
have taken.  Frustrating.

I hate restarting Emacs... ;-)

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.3-511-g8e69ad in Emacs 29.0.50



Re: About 'inline special blocks'

2022-05-24 Thread Eric S Fraga
On Tuesday, 24 May 2022 at 10:51, Timothy wrote:
> To me, this is another reason for comment and #+attr_X lines not to
> break paragraphs [...].

And, in fact, if this were true (which I would like), I personally would
see no reason for having inline special blocks.

Just my 2¢.

-- 
: Eric S Fraga, with org release_9.5.3-511-g8e69ad in Emacs 29.0.50



Re: Default attributes for images in beamer export

2022-05-23 Thread Eric S Fraga
On Friday, 20 May 2022 at 20:18, ed...@openmail.cc wrote:
> Is this the expected behaviour? Thanks again :) .

Well, looking at the code, if any of the :height or :width attributes
have been specified explicitly, the defaults for height and width are
ignored.  If you want to specify both, you will need to do so
explicitly.

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

-- 
: Eric S Fraga, with org release_9.5.3-508-ge268e4 in Emacs 29.0.50



Re: [SOLVED, but ]

2022-05-23 Thread Eric S Fraga
On Sunday, 22 May 2022 at 08:57, Uwe Brauer wrote:
> 1. org-table-recalculate-buffer-tables
> 2. org-table-iterate-buffer-tables
> Can anybody please enlighten me?

My understanding is: the first will be suitable if there is a simple
one-way transfer of data and the tables are in an order that means that
tables with the source of data for another table have been recalculated
before this other table.  The second function will be necessary if the
order of the tables is not suitable or if there are circular
dependencies.

-- 
: Eric S Fraga, with org release_9.5.3-508-ge268e4 in Emacs 29.0.50



Re: [PATCH] Avoid ignoring LaTeX export output errors when org-latex-pdf-process is a list

2022-05-23 Thread Eric S Fraga
This is very useful, especially being able to see the output of BiBTeX,
say.  Thank you.
-- 
: Eric S Fraga, with org release_9.5.3-508-ge268e4 in Emacs 29.0.50



Re: Default attributes for images in beamer export

2022-05-19 Thread Eric S Fraga
On Thursday, 19 May 2022 at 17:17, ed...@openmail.cc 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.  

-- 
: Eric S Fraga, with org release_9.5.3-507-g4f0f24 in Emacs 29.0.50



Re: [tip] Export and open a PDF in Android via Termux

2022-05-19 Thread Eric S Fraga
On Tuesday, 17 May 2022 at 17:56, Juan Manuel Macías wrote:
> but lately I have been forced to go back to these devices for work
> reasons, so I thought of Termux as the foreigner who is in a strange

Same with me.  I have to have a smartphone as our institution made the
decision to remove all landlines and have all staff use MS Teams as our
work "phone".  I use termux to give me access to Emacs + org so that I
at least get some real use out of the "smart"phone.

-- 
: Eric S Fraga, with org release_9.5.3-504-gcdbb1c in Emacs 29.0.50



Re: [tip] Export and open a PDF in Android via Termux

2022-05-16 Thread Eric S Fraga
Thank you for this. Very helpful.  I use termux to take org notes on the
move.  I don't often have to create a PDF but it's nice to know how to
do it and be able to view it.  And, best of all, is the pointer to
mu-pdf!
-- 
: Eric S Fraga, with org release_9.5.3-504-gcdbb1c in Emacs 29.0.50



Re: Org-cite/Citar cannot recognize neither biblatex nor natbib

2022-05-13 Thread Eric S Fraga
On Friday, 13 May 2022 at 09:48, Bruce D'Arcus wrote:
> It's not undocumented; it's poorly documented :-)

I don't that's entirely fair... just a little sparse maybe. ;-) (but
your comment taken as intended)

I've made use of it recently and it had what I needed.

-- 
: Eric S Fraga, with org release_9.5.3-481-gaea24b in Emacs 29.0.50



Re: [PATCH] Re: How to stop results being hidden when using ":results drawer"?

2022-05-13 Thread Eric S Fraga
On Friday, 13 May 2022 at 21:35, Ihor Radchenko wrote:
> In fact, forcefully folding the drawers is relatively recent addition by
> Nicolas in 1027e0256903bc2.

I wonder if this is related to my issue with ediff-ing org buffers and
having drawers hidden?  I've not had time yet to investigate but
interesting coincidence maybe?

-- 
: Eric S Fraga, with org release_9.5.3-481-gaea24b in Emacs 29.0.50



Re: Org-cite/Citar cannot recognize neither biblatex nor natbib

2022-05-13 Thread Eric S Fraga
On Friday, 13 May 2022 at 11:55, Alessandro Bertulli wrote:
>> Check out org-latex-pdf-process maybe?
>
> I don't know the library so in depth, but I'll try, thank you!

I have the following in my init file:

(setq org-latex-pdf-process '("pdflatex -output-directory %o %f"
  "bibtex %b"
  "pdflatex -output-directory %o %f"
  "pdflatex -output-directory %o %f"))

which tells org to run pdflatex, then bibtex, and then pdflatex twice
more to ensure that all references are satisfied.

The default might not include bibtex...  I don't know.

-- 
: Eric S Fraga, with org release_9.5.3-481-gaea24b in Emacs 29.0.50



Re: Org-cite/Citar cannot recognize neither biblatex nor natbib

2022-05-13 Thread Eric S Fraga
On Thursday, 12 May 2022 at 20:31, Alessandro Bertulli wrote:
> displays some annoing "n.d."). 

For the record, n.d. means "no date" so your BiBTeX entry must be
missing the year field, for instance.

> After that, if I try again to directly export to pdf, it works. I
> suppose it's a problem in producing the intermediate bibliography
> files.

Check out org-latex-pdf-process maybe?

-- 
: Eric S Fraga, with org release_9.5.3-481-gaea24b in Emacs 29.0.50



Re: export to latex: begin_example gets exported to verbatim (

2022-05-12 Thread Eric S Fraga
Hi Uwe,

should this line

> #+begin_src matlab :results output src :exports results: exports code  :eval 
> never-export

not be

#+begin_src matlab :results output :exports both :eval never-export

I.e. I think you have the syntax not quite right.  

-- 
: Eric S Fraga, with org release_9.5.3-481-gaea24b in Emacs 29.0.50



Re: source block evaluation in #+DATE line

2022-05-11 Thread Eric S Fraga
On Wednesday, 11 May 2022 at 17:50, Eric S Fraga wrote:
> ⚠️ Caution: External sender
>
>
> On Wednesday, 11 May 2022 at 05:15, Andreas Leha wrote:
>> Thanks for the comments.  And sorry for the misleading example.  I do not
>> want to use source blocks to insert a date.  In fact I want to include
>> the current git commit hash on the title slide.
>
> I do this by:

[...] which I now realise uses a src block so probably not what you
want/need.

-- 
: Eric S Fraga, with org release_9.5.3-481-gaea24b in Emacs 29.0.50



Re: source block evaluation in #+DATE line

2022-05-11 Thread Eric S Fraga
On Wednesday, 11 May 2022 at 05:15, Andreas Leha wrote:
> Thanks for the comments.  And sorry for the misleading example.  I do not
> want to use source blocks to insert a date.  In fact I want to include
> the current git commit hash on the title slide.

I do this by:

--8<---cut here---start->8---
#+NAME: mydateline
#+BEGIN_SRC emacs-lisp
(format "#+DATE: \\copyright{} %s\n" *this*) 
#+END_SRC

src_shell[:post mydateline() :results raw]{echo -n $(date +%Y) '@@latex:\\ 
\vspace*{0.1cm} \tiny \color{gray}@@' version $(git log --format=format:"%ad 
%h" --date=short | head -1 )} 
--8<---cut here---end------->8---

HTH,
eric
-- 
: Eric S Fraga, with org release_9.5.3-481-gaea24b in Emacs 29.0.50



Re: [tip] Insert arbitrary LaTeX code at the beginning of any float environment

2022-05-09 Thread Eric S Fraga
On Monday,  9 May 2022 at 14:01, Juan Manuel Macías wrote:
> Although ---as Eric says--- we can always use special blocks, a :wrap
> attribute would drastically lighten the readability of the document,

One advantage of special blocks is that they work across all
(some/most/?) export backends and are not tied to LaTeX.

-- 
: Eric S Fraga, with org release_9.5.3-478-g2a6f5c in Emacs 29.0.50



Re: [tip] Insert arbitrary LaTeX code at the beginning of any float environment

2022-05-09 Thread Eric S Fraga
On Monday,  9 May 2022 at 20:47, Ihor Radchenko wrote:
> Moreover, it would be useful to be able to wrap the whole chunk into
> custom environment:
> #+attr_latex: :wrap [options]environmant

This is already possible using special blocks?  I.e.

#+begin_environment
... figure stuff
#+end_environment

unless you mean something different.

-- 
: Eric S Fraga, with org release_9.5.3-478-g2a6f5c in Emacs 29.0.50



Re: org-fold problems

2022-05-09 Thread Eric S Fraga
On Sunday,  8 May 2022 at 15:25, Ihor Radchenko wrote:
> I suspect the same issue. If you try
> M-: (setq org-fold-core-first-unfold-functions nil)
> before doing ediff and it helps, then I will know the culprit.

It doesn't; sorry.  With this set to nil, all drawers are closed on
ediff although all normal content is visible.

This is with both emacs and org up to date from git as of a few minutes
ago.

> Note that I tried to run ediff-buffers on Org buffers and everything
> remains folded with stable Org 9.5 as well.

That has not been my experience.  I think... but cannot verify.  I do
use drawers a lot and differences are often in them for the type of
document I was working on last week.

With ediff, we need the documents being compared to be completely
expanded in general.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.3-472-gd2a459 in Emacs 29.0.50



Re: org-fold documentation

2022-05-07 Thread Eric S Fraga
On Saturday,  7 May 2022 at 14:55, Vikas Rawal wrote:
> I am not sure I understand fully, but are you suggesting that the
> problem is because I forgot to compile org and therefore these files
> were being compiled during runtime? Would running "make" solve it
> then? I have  done that anyway since I was not sure if I did it
> earlier. 

Native compilation happens during runtime (i.e. when you are using
Emacs) for any .elc files loaded during use that are newer than an
existing .eln file or if the .eln file does not already exist.

-- 
: Eric S Fraga, with org release_9.5.3-472-gd2a459 in Emacs 29.0.50



Re: org-fold problems

2022-05-07 Thread Eric S Fraga
Hi Ihor,

On Saturday,  7 May 2022 at 13:30, Ihor Radchenko wrote:
> While you are at the deadline, feel free to switch org-fold-core-style
> back to overlays.

Thank you.  I should have done that (had I thought if it ;-)) but
deadline met in any case.  Next time.

> If you get some time and encounter the described issue, can you try to
> run M-: (setq org-fold-core-first-unfold-functions nil) and try
> org-reveal again?

Okay.  I cannot replicate the problem with the file I had problems with
yesterday (the file has obviously changed in the meantime) but will do
so when/if it arises again.

On a related matter, I typically use vc-ediff for comparing the current
working copy of a file and the last committed version.  This used to
expand the file completely (assuming I'm remembering correctly) but now
(some?) drawers are not opened so if there are differences inside a
drawer, I cannot see them via ediff.  Does this make sense?  If so, is
there something I should customise to have *everything* opened when
using ediff?

Thanks again,
eric

-- 
: Eric S Fraga, with org release_9.5.3-472-gd2a459 in Emacs 29.0.50



org-fold problems

2022-05-06 Thread Eric S Fraga
Hello all,

I am seeing very strange and somewhat frustrating behaviour with the new
org-fold implementation.  I have not been able to determine the exact
conditions leading to the problem but some subtrees cannot be revealed
by either org-cycle or org-fold-reveal and act as if the have no content
(even when they do).  However, the content can be revealed if I search
for some text, text I know is in the hidden content.

I'm busy with a deadline so cannot do more investigation at this point.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.3-472-gd2a459 in Emacs 29.0.50



Re: Organice with local WebDAV server on PinePhone

2022-05-05 Thread Eric S Fraga
On Wednesday,  4 May 2022 at 20:24, TRS-80 wrote:
> I keep thinking that the keyboard is going to be the key[0] to achieving
> Emacs / Org Mode editing nirvana on my PinePhone.  But I will have let
> you know if that's true or not, after it arrives.  :)

My Planet Computers Gemini (mobile "phone" with keyboard) is a fantastic
little org + Emacs on the move device.  Having the keyboard completely
changes the feel of such a device.

-- 
: Eric S Fraga, with org release_9.5.2-426-gf6813d in Emacs 29.0.50



Re: how to exclude several single dates from a diary block

2022-04-22 Thread Eric S Fraga
On Friday, 22 Apr 2022 at 16:15, Rainer Thiel wrote:
> I use Org-Mode to schedule most everything, including my lectures
> which typically are recurring events.  

Instead of using diary s-expressions, what I do is create one entry for
the first lecture, say, and then use org-clone-subtree-with-time-shift
to create the copies, typically shifted by 1 week.  Then I go through
the created entries and delete those weeks that need to be omitted.

Maybe not as elegant but works very well and it's what I've been doing
for years now for my own lectures.

-- 
: Eric S Fraga, with org release_9.5.3-397-g81289b in Emacs 29.0.50



Re: org table: generate a weekly calendar with column that represents the hours

2022-04-22 Thread Eric S Fraga
Something to play with:

| start | duration |   end | notes |
|---+--+---+---|
| 08:00 | 1:00 | 09:00 |   |
| 09:00 |01:00 | 10:00 |   |
| 10:00 |01:00 | 11:00 |   |
| 11:00 |01:00 | 12:00 |   |
| 12:00 |01:00 | 13:00 |   |
| 13:00 |01:00 | 14:00 |   |
| 14:00 |01:00 | 15:00 |   |
| 15:00 |01:00 | 16:00 |   |
| 16:00 |01:00 | 17:00 |   |
| 17:00 |01:00 | 18:00 |   |
| 18:00 |01:00 | 19:00 |   |
| 19:00 |01:00 | 20:00 |   |
| 20:00 |01:00 | 21:00 |   |
#+TBLFM: @<<<$2..@>$2=@-1;U::@<<<$1..@>$1=@-1+@-1$+1;U::$3=$1+$2;U

-- 
: Eric S Fraga, with org release_9.5.3-397-g81289b in Emacs 29.0.50



Re: Some feature requests/questions

2022-04-19 Thread Eric S Fraga
Hi Philip,

some quick comments on two of your requests:

On Tuesday, 19 Apr 2022 at 15:49, Philip Kaludercic wrote:

> 3. Related to the previous point, is there a way to configure capture
>templates /in/ org files?  That would make it easier to dynamically
>add notes, without having to do so centrally, in my configuration
>file.

You can define local variables in files and directories.  Check out the
info manual,

[[info:emacs#Specifying File Variables][emacs#Specifying File Variables]]

> 4. Limiting until when events may repeat, without having to duplicate
>timestamps manually (or via `org-clone-subtree-with-time-shift').
>Better yet being able to do so for an entire subtree/file, and have
>the property inherit itself.

You can use Emacs diary s-expressions to specify ranges of dates in org:

[[info:emacs#Special Diary Entries][emacs#Special Diary Entries]]

-- 
: Eric S Fraga, with org release_9.5.2-426-gf6813d in Emacs 29.0.50



Re: [FR] Please consider adding "none" as option for ':mode' table LaTeX attribute

2022-04-11 Thread Eric S Fraga
Hi Paul,

On Monday, 11 Apr 2022 at 12:08, Paul van Gelder wrote:
> First, to manually delete the following three lines from the .tex file:

If you add these options to the ATTR_LATEX line:

 :float nil :center nil

you should get what you wanted.

-- 
: Eric S Fraga, with org release_9.5.2-426-gf6813d in Emacs 29.0.50



Re: [BUG] org-cite does not support techreport, mastersthesis, phdthesis, and conference entries [9.5.2 (release_9.5.2-426-gf6813d @ /usr/share/emacs/site-lisp/org/)]

2022-04-08 Thread Eric S Fraga
On Friday,  8 Apr 2022 at 00:44, Olaf Trygve Berglihn wrote:
> When using the @techreport, @mastersthesis, @phdthesis, and @conference 
> org-cite
> fails to find the entry.  Export to some formats fails due to this.

I have tried this and it is true that org cite fails but only for
mastersthesis and conference, in my case, with org up to date as of a
few minutes ago.

According to https://www.bibtex.com/e/entry-types/, conference as a type
was only included for compatibility with Scribe (as either proceedings
or inproceedings do the job) but the others are definitely in the list
and should be supported, I guess.

-- 
: Eric S Fraga, with org release_9.5.2-426-gf6813d in Emacs 29.0.50



Re: problem with diary sexps

2022-04-08 Thread Eric S Fraga
On Friday,  8 Apr 2022 at 10:59, Ihor Radchenko wrote:
> Should be fixed now in f6813dbe. See

Confirmed.  Thank you!

-- 
: Eric S Fraga, with org release_9.5.2-426-gf6813d in Emacs 29.0.50



Re: How to handle strings with commas in macros?

2022-04-07 Thread Eric S Fraga
On Thursday,  7 Apr 2022 at 12:29, William Denton wrote:
> on export and LaTeX will format it.  That works fine.  But in an index of 
> names,
> if I want
>
> {{{m(Denton, William)}}}

You have to escape the , unfortunately:

{{{m(Denton\, William)}}}

-- 
: Eric S Fraga, with org release_9.5.2-427-g40a348 in Emacs 29.0.50



Re: Thanks for good docs

2022-04-07 Thread Eric S Fraga
I'm in total agreement.  The indexing of the org info manual is
excellent and generally gets me to what I want very quickly.

-- 
: Eric S Fraga, with org release_9.5.2-424-g09575c in Emacs 29.0.50



Re: problem with diary sexps

2022-04-05 Thread Eric S Fraga
On Tuesday,  5 Apr 2022 at 19:22, Ihor Radchenko wrote:
> More accurate error can be found after setting calendar-debug-sexp to t.
> I got the following backtrace clearly indicating lexical scope issue:

Which makes sense.  The diary code does use entry and date as global
variables so really needs updating...

-- 
: Eric S Fraga, with org release_9.5.2-423-g6d73cd in Emacs 29.0.50



Re: problem with diary sexps

2022-04-05 Thread Eric S Fraga
On Tuesday,  5 Apr 2022 at 12:28, Christian Stuermer wrote:
> I've had the same problem after updating org from git with entries like
> The commit introducing it is
> https://github.com/bzg/org-mode/commit/6d73cd34a07796c33f9435bfc8c9a19e67656c7a
>
> And the problem is gone, after reverting
>
> (result (if calendar-debug-sexp (eval sexp t)
>   (condition-case nil
>   (eval sexp t)
>
> back to
>
> (result (if calendar-debug-sexp (eval sexp)
>   (condition-case nil
>   (eval sexp)
>
> in org-diary-sexp-entry in org.el.

Confirmed.  Reverting this particular change makes diary sexps work
again properly (i.e. without complaint).

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.2-423-g6d73cd in Emacs 29.0.50



problem with diary sexps

2022-04-01 Thread Eric S Fraga
Hello all,

I updated org today and now get

Bad sexp at line 461 in /home/ucecesf/s/notes/diary.org:
   (let ((entry ) (date '(4 19 2022))) (diary-float t 2 3))

for a line that looks like

<%%(diary-float t 2 3)>

This has been in my diary for a very long time with no error.  I wonder
if this has anything to do with the changes to the use of advice?
Nothing else in the recent changes in the git log seem to be relevant.

Just a quick heads up as I don't have time to debug at the moment.  It's
not mission critical...

Have a good weekend all.

-- 
: Eric S Fraga, with org release_9.5.2-423-g6d73cd in Emacs 29.0.50



Re: A question/bug report(?)

2022-03-29 Thread Eric S Fraga
On Tuesday, 29 Mar 2022 at 21:44, Max Nikulin wrote:
> If LaTeX is the only export target then a more simple way exists:
>
> #+begin_export latex

Yes, of course!

-- 
: Eric S Fraga, with org release_9.5.2-420-g971eb6 in Emacs 29.0.50



Re: A question/bug report(?)

2022-03-29 Thread Eric S Fraga
I'm not sure but maybe you want to use a src block,

#+begin_src latex :exports results
...
#+end_src

?  I am not entirely clear how you wish org to know what is "raw" and
what is "LaTeX".

-- 
: Eric S Fraga, with org release_9.5.2-420-g971eb6 in Emacs 29.0.50



Re: citations: org-cite vs org-ref 3.0

2022-03-23 Thread Eric S Fraga
On Wednesday, 23 Mar 2022 at 10:39, Bruce D'Arcus wrote:
> Those mappings merely generalize existing systems (bibtex, natbib,
> biblatex, csl) used by millions of users (if you include Zotero,
> etc.), and already incorporate the feedback of those users.

I just want to jump in to say that the new cite functionality works very
well, at least for this LaTeX user.  I'm writing a book at the moment
using [cite:...].  No issues encountered and everything I need to do is
there, out-of-the-box!

My thanks to all that put in so much effort into this.

-- 
: Eric S Fraga, with org release_9.5.2-407-gc9c0b9 in Emacs 29.0.50



Re: leading superscript on a line for ODT export

2022-03-16 Thread Eric S Fraga
On Wednesday, 16 Mar 2022 at 07:04, Greg Minshall wrote:
> i'm not familiar with the '@@' construct.  in the manual, searching for
> the string "@@", i see references to various =@@foo...=, but not, for
> example, =@@org:@@=.
>
> is there a general definition?  

The general definition is @@target:code@@ where target is an export
engine, e.g. LaTeX, beamer, ODT, HTML, etc., and code is the actual text
to export "as is" when exporting to that target, i.e. it is not
interpreted by org and simply passes through.

This feature can be very useful (read: necessary) to tweak the behaviour
of the final exported output.

If the manual needs updating, and I'm sure it does, we always welcome
patches!

-- 
: Eric S Fraga, with org release_9.5.2-401-g91681f in Emacs 29.0.50



Re: leading superscript on a line for ODT export

2022-03-16 Thread Eric S Fraga
On Wednesday, 16 Mar 2022 at 20:46, Max Nikulin wrote:
> @@org:@@^1 blah

cute!  works very well.  Thank you.

-- 
: Eric S Fraga, with org release_9.5.2-401-g91681f in Emacs 29.0.50



Re: leading superscript on a line for ODT export

2022-03-16 Thread Eric S Fraga
On Wednesday, 16 Mar 2022 at 13:12, Juan Manuel Macías wrote:
> When I need to find out some xml markup in odt or docx I open the
> document from Dired with view-mode, and run C-c C-c

Yeah, I've done this in the past as well.  Dired and automatic
un-zipping really helps!

Thanks again,
eric

-- 
: Eric S Fraga, with org release_9.5.2-401-g91681f in Emacs 29.0.50



Re: leading superscript on a line for ODT export

2022-03-16 Thread Eric S Fraga
On Wednesday, 16 Mar 2022 at 12:03, Juan Manuel Macías wrote:
> I would use a macro. For example:

Yes, I guess this is the best way to do this.  Thank you in particular
for the xml code for odt which would have taken me some time to figure
out!

-- 
: Eric S Fraga, with org release_9.5.2-401-g91681f in Emacs 29.0.50



leading superscript on a line for ODT export

2022-03-16 Thread Eric S Fraga
Dear all,

I need to have a line starting with a superscript, e.g. 1, in an ODT
exported file.  If I write "^1 blah", it doesn't work.  I need a
character before the ^ to have it interpreted as a superscript.

Is there an "empty" character I can use?  I tried a non-breaking space
but that did not work.  The space is there but the ^1 gets exported
literally.

Thank you,
eric
-- 
: Eric S Fraga, with org release_9.5.2-312-g5d05f5 in Emacs 29.0.50



Re: debugging latex preview

2022-03-06 Thread Eric S Fraga
On Saturday,  5 Mar 2022 at 23:43, alain.coch...@unistra.fr wrote:
> Maybe this is not at all appropriate in this case, but I'm risking it:
> why not bug-hunter?

Thank you.  I'll check it out.
-- 
: Eric S Fraga, with org release_9.5.2-401-g91681f in Emacs 29.0.50



debugging latex preview

2022-03-04 Thread Eric S Fraga
Quick question: what is the best (or any) way to debug LaTeX preview in
org mode?  All of sudden, my previous are not shrink-wrapped (hope that
makes sense).  I cannot think of anything I changed although I'm sure I
did change something...

Suggestions welcome before I delve into the elisp code!

Have a great weekend all.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.2-401-g91681f in Emacs 29.0.50



Re: org-cite and org-ref-cite

2022-03-03 Thread Eric S Fraga
On Sunday, 27 Feb 2022 at 10:38, Henrik Frisk wrote:
> I see. Didn't realize that. I will look into citar then, thanks!

citar works very well.  Recommended.

-- 
: Eric S Fraga, with org release_9.5.2-386-g77d942 in Emacs 29.0.50



Re: org-cite and org-ref-cite

2022-02-25 Thread Eric S Fraga
On Friday, 25 Feb 2022 at 08:50, Henrik Frisk wrote:
> The only thing I can't seem to sort out is to change the style of the
> citation. Regardless where I do it I get the error "Wrong type
> argument: org-cite-processor,"

It would help if you could post a minimal example.

>
> Another question: if I would like to export to LaTeX but with citation
> commands rather than formated citations, would that be possible? I am
> sorry if I'm missing something obviuos.

Yes, definitely possible.  I have the following:

#+cite_export: bibtex plain

which does the job very well for LaTeX export.
-- 
: Eric S Fraga, with org release_9.5.2-385-g37d8bc in Emacs 29.0.50



Re: processing of babel blocks and select_tags

2022-02-19 Thread Eric S Fraga
Dear Jeremie,

On Saturday, 19 Feb 2022 at 08:54, Jeremie Juste wrote:
> If I change eval: no_export to :eval no, Only the =Description= section
> is evaluated and exported. 

Interesting.  I hadn't considered trying just "no".  What a difference
this makes!  The book compiles in seconds instead of minutes.  Thank
you.

It does beg the question: why do "no" and "no-export" behave differently
on export?  Something to explore in due course but I'm happy for now.

> I have a small helper function that toggle eval yes or no at the file
> level, if it is of any help.

Very useful; always good to have little snippets like this.

Thanks again,
eric

-- 
: Eric S Fraga, with org release_9.5.2-385-g37d8bc in Emacs 29.0.50



Re: processing of babel blocks and select_tags

2022-02-18 Thread Eric S Fraga
Hi John,

On Friday, 18 Feb 2022 at 10:33, John Kitchin wrote:
> I guess that is just expanding the src blocks, not actually running
> them. I couldn't find where that happens though, it is early in the
> export process I think.

There are two types of lines that appear often in *Messages*:

: org-babel-exp process julia at position 65992...

: Wrote /tmp/babel-B5awWV/ob-input-0gUtuB

The first is quite straightforward although why any processing is being
done is unclear unless this just means checking the header arguments,
which would make sense.  For the second, although I am not entirely sure
what they refer to (as the tmp files disappear), I have a feeling that
this is where the problem is.  I think this refers to where data tables
are being incorporated into or processed for a src block even when not
necessary.

It's reassuring that it doesn't sound like I am doing anything silly so
I will look into the babel code to see if I can figure out how to get it
to short-circuit sooner...

> Maybe you can just use a preprocessing hook to export to org, which
> should only include the selected sections, then export that to what
> you want.

I guess that is what I was hoping #+SELECT_TAGS would do for me. ;-)

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.2-385-g37d8bc in Emacs 29.0.50



[patch] give tables their own default placement in LaTeX export

2022-02-18 Thread Eric S Fraga
Hello,

attached is a small patch to give tables their own default placement in
LaTeX export.  Up to now, tables have used the default placement for
figures but figures and tables are very different creatures so it does
not make sense to have just one default for both.

This patch unfortunately could break documents (if people have changed
the default for figures, expecting that change to apply to tables as
well) but I see no way to avoid this.  So maybe not worth incorporating
but I leave that decision to others.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.2-385-g37d8bc in Emacs 29.0.50
>From 77d94298beb3a1b215e7602beba46b81e827b3a1 Mon Sep 17 00:00:00 2001
From: Eric S Fraga 
Date: Fri, 18 Feb 2022 12:23:01 +
Subject: [PATCH] lisp/ox-latex.el: give tables their own placement default

* ox-latex.el (org-latex--org-table): define and use a new variable,
org-latex-default-table-position, for setting the default placement
option for the export of tables.
---
 etc/ORG-NEWS |  5 +
 lisp/ox-latex.el | 11 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 5a94e737e..506161937 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -100,6 +100,11 @@ argument.
 
 ** Miscellaneous
 
+*** Tables now have separate default placement option for LaTeX export
+
+Tables and figures now have separate settings for the default
+placement in LaTeX export.
+
 *** Styles are customizable in ~biblatex~ citation processor
 
 It is now possible to add new styles or modify old ones in ~biblatex~
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 5dda9b3ab..48efc7d98 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -120,6 +120,7 @@
 (:latex-caption-above nil nil org-latex-caption-above)
 (:latex-classes nil nil org-latex-classes)
 (:latex-default-figure-position nil nil org-latex-default-figure-position)
+(:latex-default-table-position nil nil org-latex-default-table-position)
 (:latex-default-table-environment nil nil org-latex-default-table-environment)
 (:latex-default-quote-environment nil nil org-latex-default-quote-environment)
 (:latex-default-table-mode nil nil org-latex-default-table-mode)
@@ -753,6 +754,14 @@ environment."
   :package-version '(Org . "9.0")
   :safe #'stringp)
 
+(defcustom org-latex-default-table-position "htbp"
+  "Default position for LaTeX tables."
+  :group 'org-export-latex
+  :type 'string
+  :version "26.1"
+  :package-version '(Org . "9.0")
+  :safe #'stringp)
+
 (defcustom org-latex-inline-image-rules
   `(("file" . ,(rx "."
(or "pdf" "jpeg" "jpg" "png" "ps" "eps" "tikz" "pgf" "svg")
@@ -3274,7 +3283,7 @@ Return new environment, as a string."
 		  (t nil
 	 (placement
 	  (or (plist-get attributes :placement)
-	  (format "[%s]" (plist-get info :latex-default-figure-position
+	  (format "[%s]" (plist-get info :latex-default-table-position
 	 (center? (if (plist-member attributes :center)
 		  (plist-get attributes :center)
 		(plist-get info :latex-tables-centered)))
-- 
2.30.2



processing of babel blocks and select_tags

2022-02-18 Thread Eric S Fraga
Hello all,

TL;DR: can I have org completely ignore src blocks in non-selected
sections during export without using COMMENT?

Longer version: I am in the process of writing a book.  I prefer to have
all the content in one file and use SELECT_TAGS to limit the export (for
formatting) to the current section I am working on.

I have noticed that all org babel src blocks are processed in some way
even if (a) they are not in a selected section and (b) have, for
instance, ":eval no-export" set.  For some of these blocks, the
processing time appears to be quite significant, e.g. if they have a
":var x=somebigtable", but I could be wrong about this, of course.

I do not understand why these src blocks are processed at all.  Is there
some way to stop them being processed?  I know I could "comment" out all
other sections but that's a lot more work and messy than simply tagging
the current section to be selected.

Attached is a minimal example.  When I export, I see these messages:

org-babel-exp process julia at position 162...
org-babel-exp process julia at position 384...

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.2-385-g37d8bc in Emacs 29.0.50


tag.org
Description: Lotus Organizer


Re: [BUG] icalendar export fails with SCHEDULED/DEADLINE entries [9.5.2 (9.5.2-gbc8c3e @ /home/eliza/.emacs.d/straight/build/org/)]

2022-02-15 Thread Eric S Fraga
Dear Eliza,

On Tuesday, 15 Feb 2022 at 07:44, Eliza Velasquez wrote:
> It seems like `org-icalendar-export-to-ics' fails to consider the
> SCHEDULED and DEADLINE properties. Consider the following org file
> `foo.org':

By default, SCHEDULED and DEADLINE are properties of "tasks", i.e. TODO
items, not appointments (aka calendar entries).  Scheduled says when you
intend to start working on a task and deadline is when it needs to be
done by.

In any case, check out the values of org-icalendar-use-deadline and
org-icalendar-use-scheduled which should allow you to do what you want.

-- 
: Eric S Fraga, with org release_9.5.2-382-gfe4a60 in Emacs 29.0.50



Re: Unable to get current or via use-package

2022-02-09 Thread Eric S Fraga
On Wednesday,  9 Feb 2022 at 14:25, Loris Bennett wrote:
> Is this a problem use-package has with built-in packages, as described here
>
>   https://github.com/jwiegley/use-package/issues/319

Yes, I think so.

What happens if you "M-x package-list-packages" and then install org
from there?  (use "i" to request installation and then "x" to execute)

-- 
: Eric S Fraga, with org release_9.5.2-364-ge7ea95 in Emacs 29.0.50



Re: [BUG] beamer export -- text inside section, before next headline, has no frame [9.5.2 (9.5.2-ge7ea95 @ /home/hugo/.config/emacs/straight/build/org/)]

2022-02-04 Thread Eric S Fraga
Dear Hugo,

On Thursday,  3 Feb 2022 at 17:26, Hugo Heagren wrote:
> I have org-beamer-frame-level set to 2, so when exporting to beamer,
> top-level headlines become sections, and second-level headlines become
> frames. I often want to include a short explanation/intro of the
> section, before moving onto the more specific slide (I have found this
> is good for complex lectures).

But if you want that short explanation to be on a slide, simply use a
second level heading, e.g. "** Introduction to the section"?  Beamer
does not have a distinction in "levels" of slides/frames and it would
not make sense to have top level (section) text be a slide.

-- 
: Eric S Fraga, with org release_9.5.2-364-ge7ea95 in Emacs 29.0.50



Re: [PATCH] Add support for $…$ latex fragments followed by a dash

2022-01-25 Thread Eric S Fraga
On Monday, 24 Jan 2022 at 16:42, Sébastien Miquel wrote:
> The attached patch adds support for $…$ latex fragments followed by a
> dash, such as $n$-th.

But is not necessary (and further complicates the issue of support $...$
in org as recently discussed on this list) as you can simply type
\(n\)-th?

-- 
: Eric S Fraga, with org release_9.5.2-312-g5d05f5 in Emacs 29.0.50



Re: change the fontsize when exporting to HTML, header not really changed

2022-01-20 Thread Eric S Fraga
On Thursday, 20 Jan 2022 at 09:43, Uwe Brauer wrote:
> Now some text is changed as expected the text in the header not really.

What style file is being used, if any?  Have you looked at the HTML
created?  It could be that there is a style setting for H1, H2, etc. and
maybe those settings come after the extra one you have added, therefore
taking precedence?

-- 
: Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50



Re: call blocks as a function from inside elisp code

2022-01-19 Thread Eric S Fraga
On Wednesday, 19 Jan 2022 at 09:56, George Mauer wrote:
> So is there a way to do the equivalent of #+call:
> gim/get-python-program-info(filename="foo/bar/some_module.py") from
> *inside* an elisp code block? I am aware that I can call things via
> noweb, but I'm trying to see if I can avoid that for several other
> reasons

Two ways I can think of:

1. use the :post header argument to chain calls or
2. invoke (org-sbe "blockname") although I am not sure if you can pass
   variables.  org-sbe is a macro in ob-table.el.
   
There may be (very likely) a more general way to evaluate a src block
from with elisp.

HTH,
eric


-- 
: Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50



Re: should a "wrapped" table result behave differently than one that is not?

2022-01-18 Thread Eric S Fraga
Hi Chuck,

On Tuesday, 18 Jan 2022 at 18:43, Berry, Charles wrote:
> This is annoying, but I think you can get the product you want by
> "pre-wrapping" the results.

Ah, I see: do the wrapping manually instead of using the :wrap header
argument.  Yes, this works.  A little annoying but it's a solution and
easy enough to do.  It's not as if I have that many results that need
this processing.  Thank you.

eric
-- 
: Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50



should a "wrapped" table result behave differently than one that is not?

2022-01-18 Thread Eric S Fraga
Dear all,

Should the export of a table that is the result of a code block and has
been wrapped in a RESULTS special block be different than one that is
not wrapped (beyond the wrapping, of course)?  Specifically, wrapping
the results seems to cause org to ignore that ATTR_LATEX :center toggle
[1].  A minimal example, both org and resulting LaTeX, attached.

I guess it makes sense in that the attr line will probably be applied to
the results special block.  I am not sure how to get around this.
Suggestions very welcome indeed!  I do need to wrap the results in a
block of some type so I can control the formatting in the resulting PDF
export but I do not want the table centred necessarily [2].

Thank you,
eric

Footnotes:
[1] describing this as a toggle (in the info manual) does not really
 make much sense to me as it implies a known initial state which is
 not specified in the manual.  I would prefer to have to say
 ":center no" (or nil) which then allows for ":center t"...?

[2] centring should happen by request, not by default, in my opinion, as
 it is trivial to enclose a table in a centring environment
 explicitly but difficult to remove otherwise.

-- 
: Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50



t.org
Description: Lotus Organizer
% Created 2022-01-18 Tue 16:52
% Intended LaTeX compiler: pdflatex
\documentclass{scrartcl}
\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}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{soul}
\usepackage{listings}
\usepackage[version=3]{mhchem}
\usepackage{doi}
\usepackage{amsmath}
\usepackage[british, english]{babel}
\author{Eric S Fraga}
\date{\today}
\title{}
\hypersetup{
 pdfauthor={Eric S Fraga},
 pdftitle={},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 29.0.50 (Org mode 9.5.2)}, 
 pdflang={English}}
\begin{document}

\tableofcontents

A bare table gets exported properly:

\begin{tabular}{rr}
1 & 2\\
3 & 4\\
\end{tabular}

Now a table that is the result of some code:

\begin{tabular}{rr}
1 & 2\\
3 & 4\\
\end{tabular}

and finally a table from some code but wrapped:

\begin{results}
\begin{center}
\begin{tabular}{rr}
1 & 2\\
3 & 4\\
\end{tabular}
\end{center}
\end{results}

The last table is centred unfortunately.
\end{document}


ignore previous email please: found org-latex-tables-centered (blush)

2022-01-18 Thread Eric S Fraga
As the subject line says.  Missed it due to the plural tables... (my
bad).

Although I must add that I have spent some time playing with org babel
options and I am unclear about why ":results value verbatim" (or raw or
scalar or drawer) don't behave as I would have thought.  But that's a
discussion for another day maybe.

Apologies for the noise and thank you.
-- 
: Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50



Re: Question Regarding Creating Workflow For Automatic Formulas For Finance Based Org Spreadsheet

2022-01-16 Thread Eric S Fraga
On Sunday, 16 Jan 2022 at 10:35, Samuel Banya wrote:
> How would you able to keep the running totals in Column E?

Using your initial example, adding a header line to give a starting
point, the following works:

| Date   | Item|   |Debit |  |
|+-+---+--+--|
| 01/03/2022 | Example Rent Expense|   | -1061.67 | -1061.67 |
| 01/04/2022 | Example Food Expense|   | -1061.67 | -2123.34 |
|+-+---+--+--|
| 02/05/2022 | Example Utility Expense |   | -2061.67 | -4185.01 |
| 02/06/2022 | Example Random Expense  |   | -2061.67 | -6246.68 |
|+-+---+--+--|
#+TBLFM: $5=@-1+$-1;NE

I've not included monthly sums as this would complicate things (although
should still be possible...) but retain a dividing line for clarity.

The top entry of the last column could have a starting balance, if you
wanted.  At the moment, it's treated as a 0.00 value.

-- 
: Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50



Re: Playing down the text in org-mode

2022-01-16 Thread Eric S Fraga
On Friday, 14 Jan 2022 at 19:26, autofrettage wrote:
> The question triggers an old LaTeX reflex; If the layout tweak or
> typography tune turns out to be very difficult to accomplish with
> LaTeX (including all the mainstream add-ons), then the reason could be
> that you ask for something which most typographers consider to be a
> really bad idea.

+1

This is something I often have to drum into my students.  If you are
fighting LaTeX, you are probably trying to do something that won't
actually look very good at all.

The problem is that students have been exposed to Word & co. without
using styles, for instance, and think that they have to specify
everything including typefaces, spacing, indents, ...  and, of course,
they know noting about typography.  LaTeX (and org by corollary) does a
very good job with the defaults (including, as you say, the mainstream
add-ons).

-- 
: Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50



Re: Depreciating TeX-style LaTeX fragments

2022-01-16 Thread Eric S Fraga
On Sunday, 16 Jan 2022 at 00:36, Timothy wrote:
> Hmm. Not sure about this. Keystroke wise we’re comparing $$
> to \(. The latter can be completed by smartparens, but since
> single dollars are reasonable Org content the former can’t.
> At this point the only argument is muscle memory, and if

As an aside, I will suggest including the following code in your Emacs
customization:

#+begin_src emacs-lisp :tangle "esf-org.el"
  ;; from Nicolas Richard 
  ;; Date: Fri, 8 Mar 2013 16:23:02 +0100
  ;; Message-ID: <87vc913oh5@yahoo.fr>
  (defun yf/org-electric-dollar nil
"When called once, insert \\(\\) and leave point in between.
  When called twice, replace the previously inserted \\(\\) by one $."
 (interactive)
 (if (and (looking-at ")") (looking-back "("))
 (progn (delete-char 2)
(delete-char -2)
(insert "$"))
   (insert "\\(\\)")
   (backward-char 2)))
  (define-key org-mode-map (kbd "$") 'yf/org-electric-dollar)
#+end_src

I've been using this for years now and it works very well: I also had
$...$ in my muscle memory.

The only time it can be annoying is if you wish to edit/write org table
expressions directly instead of using org's features for this, such as
editing the equation (C-c ') or inserting one (C-c = with or without
C-u).

-- 
: Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50



Re: [bug] serious problem retrieving data from table for gnuplot

2022-01-14 Thread Eric S Fraga
On Friday, 14 Jan 2022 at 22:01, Ihor Radchenko wrote:
> Ouch. Sorry for this. This was introduced by fixing another bug.
> Should be fixed on main now.

Thank you for such a quick response and no worries!  Yes, it seems to
work now.

-- 
: Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50



Re: What determines if R source block output is wrapped in begin_example or not?

2022-01-14 Thread Eric S Fraga
On Friday, 14 Jan 2022 at 07:13, John Hendy wrote:
> is there a heuristic on when to look at the manual vs. when to M-x
> help RET v RET [guess-and-check-randomly]?

Pretty much the heuristic I use. ;-)

This is one of the problems with org: way too many variables.  However,
it is the presence of these variables that makes it so powerful and
gives it the capability to adapt to your own needs so I wouldn't want
less variables.

One technique I do use is "Info-index" in the manual (bound to i in
Info-mode by default) although not everything is indexed.

-- 
: Eric S Fraga, with org release_9.5.2-304-g1537bb in Emacs 29.0.50



Re: Playing down the text in org-mode

2022-01-14 Thread Eric S Fraga
On Friday, 14 Jan 2022 at 14:44, fatipa...@tutanota.com wrote:
> I would like to include the customisation using elisp code

Have a look at, for instance,

,[ C-h f set-face-foreground RET ]
| set-face-foreground is an interactive native compiled Lisp function in
| ‘faces.el’.
| 
| (set-face-foreground FACE COLOR  FRAME)
| 
| Change the foreground color of face FACE to COLOR (a string).
| FRAME nil or not specified means change face on all frames.
| COLOR can be a system-defined color name (see ‘list-colors-display’)
| or a hex spec of the form #RRGGBB.
| When called interactively, prompts for the face and color.
| 
`

and equivalent for background.  I think there's a more general way of
setting all the properties but I don't know enough as I use the
customisation interface for these.

-- 
: Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50



Re: [bug] serious problem retrieving data from table for gnuplot

2022-01-14 Thread Eric S Fraga
By the way, adding an empty column to front of the table fixes the
problem so at least I am not panicking (I have a presentation to give
with the data in a table etc.).  There must be a problem with a regex
looking for dividing lines maybe?

-- 
: Eric S Fraga, with org release_9.5.2-304-g1537bb in Emacs 29.0.50



Re: Playing down the text in org-mode

2022-01-14 Thread Eric S Fraga
On Friday, 14 Jan 2022 at 14:03, fatipa...@tutanota.com wrote:
> How can I remove the background and underline for footnotes, and change
> foreground colour.

M-x customize-face RET org-footnote RET

and adapt as you see fit?

-- 
: Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50



[bug] serious problem retrieving data from table for gnuplot

2022-01-14 Thread Eric S Fraga
Hello all,

as I recently updated org, I seem to have run into a bug with ob-gnuplot
(or ob more generally) where data from a table are not interpreted
correctly.  Specifically, if the first column entry in a row is a
negative number, the data file created for use by gnuplot consists of
only - signs, not the actual numbers.

This table, for instance,

#+begin_src org
,#+name: data
|  x |  y |
|+|
| -4 | 16 |
| -3 |  9 |
| -2 |  4 |
| -1 |  1 |
|  0 |  0 |
|  1 |  1 |
|  2 |  4 |
|  3 |  9 |
|  4 | 16 |
,#+TBLFM: $2=$1^2
#+end_src

when converted into a file for use by gnuplot for the following script

#+begin_src org
,#+begin_src gnuplot :var d=data :file t.png :results file
  plot d
,#+end_src
#+end_src

looks like this:

,
| --
| --
| --
| --
|  0 0  
|  1 1  
|  2 4  
|  3 9  
|  4 16 
`

I've not yet had a chance to track down why this might be.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50



Re: What determines if R source block output is wrapped in begin_example or not?

2022-01-14 Thread Eric S Fraga
Have a look at

,[ C-h v org-babel-min-lines-for-block-output RET ]
| org-babel-min-lines-for-block-output is a variable defined in ‘ob-core.el’.
| 
| Its value is 10
| 
| The minimum number of lines for block output.
| If number of lines of output is equal to or exceeds this
| value, the output is placed in a #+begin_example...#+end_example
| block.  Otherwise the output is marked as literal by inserting
| colons at the starts of the lines.  This variable only takes
| effect if the :results output option is in effect.
| 
`

-- 
: Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50



Re: Playing down the text in org-mode

2022-01-14 Thread Eric S Fraga
On Thursday, 13 Jan 2022 at 21:39, Juan Manuel Macías wrote:
> I think a custom link would suffice for text within the paragraph. A
> quick example:

Very nice example.  Thank you.

Custom links are excellent for this kind of behaviour tuning while being
portable if the link definition is included in the org file.  I use this
approach in lieu of inline tasks for creating margin notes (in the
export), for instance.   

-- 
: Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50



Re: puzzled about :fit for LaTeX src block

2022-01-13 Thread Eric S Fraga
On Thursday, 13 Jan 2022 at 15:41, Juan Manuel Macías wrote:
> Well, it seems that if you use ":imagemagick yes", the image is created
> with the `org-babel-latex-convert-pdf' function. 

Indeed.  I went to the code.  Thank you.  Everything is working like I
want it!

-- 
: Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50



Re: puzzled about :fit for LaTeX src block

2022-01-13 Thread Eric S Fraga
On Thursday, 13 Jan 2022 at 11:17, Juan Manuel Macías wrote:
> Another possibility: please try adding the header arg. :imagemagick yes

This did it!  Thank you.  I am curious now to find out what tool was
used instead... something for later today!

Thanks again,
eric

-- 
Professor Eric S Fraga, UCL; GnuPG: 0xc89193d8fffcf67d



Re: puzzled about :fit for LaTeX src block

2022-01-13 Thread Eric S Fraga
Hi Juan,

On Wednesday, 12 Jan 2022 at 17:22, Juan Manuel Macías wrote:
> Testing two possibilities:
>
> What (latex) code produces that image in the output *tex file of your book?

They both use the same LaTeX src block (as was in the attachment) which
creates an org link to the generated PDF or PNG file.  It's the
generation of the image file that is the problem, not how the file is
used in the end unfortunately.

> C-h v RET org-format-latex-header RET: what value?

Both the same and the default value from org.

thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50



puzzled about :fit for LaTeX src block

2022-01-12 Thread Eric S Fraga
I hope somebody here on this list can help me solve a puzzling
situation.

I have a LaTeX src block which creates an image using tikz.  In a book
I'm writing, the image, when created as a png, does not get shrunk but
is instead a full page (with the actual diagram in the top left corner).
If I create a PDF, instead, it works fine.

I have extracted this src block into a minimal file (attached).  For
that file, the image creation works fine whether I create a png or a
PDF.

I have gone through the settings in the book file but cannot find
anything that would affect this behaviour.

I am hoping somebody can suggest what it might be that makes the png
image not be shrunk!

Both emacs and org from git as of this morning.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50


t.org
Description: Lotus Organizer


Re: Question Regarding Creating Workflow For Automatic Formulas For Finance Based Org Spreadsheet

2022-01-10 Thread Eric S Fraga
I would suggest the following:

|+-+---+--|
| 01/03/2022 | Example Rent Expense|   | 
-1061.67 |
| 01/04/2022 | Example Food Expense|   | 
-1061.67 |
|+-+---+--|
|| January expenses| 0 | 
-2123.34 |
|+-+---+--|
| 02/05/2022 | Example Utility Expense |   | 
-2061.67 |
| 02/06/2022 | Example Random Expense  |   | 
-2061.67 |
|+-+---+--|
|| February expenses   | 0 | 
-4123.34 |
|+-+---+--|
#+TBLFM: 
@3$3=vsum(@-I..@-II)::@3$4=vsum(@-I..@-II)::@6$3=vsum(@-I..@-II)::@6$4=vsum(@-I..@-II)

where each month is collated separately; all you have to do is append
each month to the table, add some horizontal lines and copy the formulas
modifying the row number.

But I also would highly recommend ledger which is what I use for my
accounting and which integrates very nicely with org using babel.
Ledger supports converting CSV files from banks into a ledger file
(section 7.2.1 of the ledger info manual).

-- 
: Eric S Fraga, with org release_9.5.2-293-gb8656a in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: ascii-timestamps like 31.12.2021 to iso(org) format <2020-12-31> and back

2021-12-31 Thread Eric S Fraga
On Friday, 31 Dec 2021 at 17:05, Uwe Brauer wrote:
> Thanks the \{4\} surprise me. I tried
>
> (query-replace-regexp "\\(\\<[0-9]*\\)\\([\\.]\\)\\([0-9]*\\>\\)" "\\3\\2\\1")

Not sure what this is trying to do.  If it's going from <2021-12-31> to 
31.12.2021, you shouldn't escape the < or >, you are not matching the -, and 
there are only 2 number matches.  Maybe you want

<\\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\)>
to
\\3.\\2.\\1

?

-- 
: Eric S Fraga, with org release_9.5.2-289-gce75d2 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: ascii-timestamps like 31.12.2021 to iso(org) format <2020-12-31> and back

2021-12-31 Thread Eric S Fraga
On Friday, 31 Dec 2021 at 14:21, Uwe Brauer wrote:
> ⚠️ Caution: External sender
>
>
> Hi
>
> Does anybody know about a function that would convert between
> date format  like 31.12.2021 to  <2020-12-31> and back?

This is Emacs, of course, so you could use query-replace-regexp (M-%)
with, for instance

\([0-9][0-9]\)\.\([0-9][0-9]\)\.\([0-9]\{4\}\)

as the pattern to search for and

<\3-\2-\1>

as the replacement.  The converse is left as an exercise for the
reader. ;-)

-- 
: Eric S Fraga, with org release_9.5.2-289-gce75d2 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: caption width in LateX export

2021-12-28 Thread Eric S Fraga
On Tuesday, 28 Dec 2021 at 09:59, Seb wrote:
> That is strange, as it actually should not work (it still doesn't for me
> with your code).  

Well, it won't work if the figure is to float but will if you ask org to
not float the figure.

> However, I had made a mistake in my original post as I meant to have
> the minipage environment inside the floating figure environment in the
> output, as in:

That makes more sense and, for this case, special blocks cannot work
unfortunately.

I'm glad you did find a working solution but I simply wanted to clarify
that you can indeed pass options to special blocks which your original
post seemed to state was not possible.  I use special blocks all the
time, including minipages but others as well for custom LaTeX
environments.
-- 
: Eric S Fraga, with org release_9.5.1-279-g8908fb in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: caption width in LateX export

2021-12-28 Thread Eric S Fraga
On Sunday, 26 Dec 2021 at 19:22, Seb wrote:
> Using a special block, as in:

[...]

> fails, as it seems impossible to pass arguments to the special block.

Not true.  The following seems to create the LaTeX code you wanted:

--8<---cut here---start->8---
#+attr_latex: :options {0.7\textwidth}
#+begin_minipage

#+CAPTION: looong caption.
[[file_path]]

#+end_minipage
--8<---cut here---end--->8---

HTH,
eric

-- 
: Eric S Fraga, with org release_9.5.1-279-g8908fb in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: flyspell overlays removed in comments: does this make sense?

2021-12-28 Thread Eric S Fraga
On Wednesday, 22 Dec 2021 at 22:10, Ihor Radchenko wrote:
> I consider this a bug and mark your report as such.

Thank you.  I'm glad I'm not alone!

-- 
: Eric S Fraga, with org release_9.5.1-279-g8908fb in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



flyspell overlays removed in comments: does this make sense?

2021-12-20 Thread Eric S Fraga
Hello all,

for some time (years, really), I've suffered with flyspell overlays
disappearing in comments in org documents.  It never occurred to me that
this was due to org itself so I just put up with and chalked it up to
one of those Emacs mysteries.  Today, for unrelated reasons [1], I ended
up looking at the code, specifically

org-fontify-meta-lines-and-blocks-1

and see that org explicitly removes flyspell overlays in comments.

Before I look into maybe adding a user option for the flyspell issue,
can somebody explain the rationale for this?  My comments tend to be
natural languages so flyspell is most definitely useful.  Okay, spelling
errors in comments may matter less in terms of dissemination but
still...

Or have I misunderstood something fundamental?

thank you,
eric


Footnotes:

[1] The unrelated reason is that I was looking at how I could get my own
user-defined meta lines ("#+calc: " for my use of embedded calc in org,
for the curious amongst you) fontified the way I want them.  Not easy,
as far as I can see.  I further noticed that org also removes flyspell
overlays from any "other" meta line, i.e. any other meta line not
processed by specific code.

-- 
: Eric S Fraga, with org release_9.5.1-279-g8908fb in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: org-cite and export to ODT

2021-12-16 Thread Eric S Fraga
On Wednesday, 15 Dec 2021 at 23:57, Xianwen Chen (陈贤文) wrote:
> Thank you John. I'm not sure why it does not work. Below is the
> minimal example I created, using your example. I ran C-e o o to export
> to ODT. The resulted ODT file didn't have the reference.

I don't use org-ref but, just in case this helps, the new cite engine
needs a line asking to generate the actual bibliography, i.e.

#+printbibliography:

at the point in your document where you want it to apear.

-- 
: Eric S Fraga, with org release_9.5.1-254-g14ed65 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: when does :cache not cache?

2021-12-13 Thread Eric S Fraga
Dear Ihor,

> The reason why caching does not work is related to the way :var
> assignments work in ob-gnuplot. We dump the table data into temporary
> files and refer to those files in generated gnuplot script body. The
> temporary files names change on every execution and the gnuplot script
> hash is never going to be the same.

Ah, this makes perfect sense!  Thank you for looking into this.

I will try your patch later this week (busy with end of term teaching
aspects at the moment).

-- 
: Eric S Fraga, with org release_9.5.1-243-gad53c5 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]

2021-12-09 Thread Eric S Fraga
On Wednesday,  8 Dec 2021 at 17:33, Bruce D'Arcus wrote:
> If you like Selectrum (Vertico is another recent, similar,
> alternative), you might give citar a try.
>
> https://github.com/bdarcus/citar

+1

Works very well for me with selectrum.

-- 
: Eric S Fraga, with org release_9.5.1-243-gad53c5 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: Concrete suggestions to improve Org mode third-party integration :: an afterthought following Karl Voit's Orgdown proposal

2021-12-09 Thread Eric S Fraga
On Thursday,  9 Dec 2021 at 16:21, Russell Adams wrote:
> Did Org break your Org editing experience in Emacs for your Org files,
> or did this change just break some of the finer formatting details of
> your exported Org file?

It's been a while but, IIRC, the latter to a large extent; I should have
been more clear.

However, there have been changes in the past that affected the editing
experience but I cannot remember if they were with v8 or v9 or somewhere
in between, particularly dealing with locations of :LOGBOOK: and
scheduling directives.  These happened when Nikolas cleaned up the
parsing, to the benefit of org but at the cost of making some documents
non-compliant.

Nevertheless, as others have stated, given the stability provided by
Emacs (parts of my .emacs date back to 1985!), and org being all text,
even breaking changes are usually trivial to correct or adjust to.

-- 
: Eric S Fraga, with org release_9.5.1-243-gad53c5 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: Concrete suggestions to improve Org mode third-party integration :: an afterthought following Karl Voit's Orgdown proposal

2021-12-09 Thread Eric S Fraga
On Wednesday,  8 Dec 2021 at 17:16, Dr. Arne Babenhauserheide wrote:
> If you have 1400 slides of lectures, all carefully laid out to convey

Been there, done that.  I've learned to not upgrade org (or Emacs) for
a few weeks before the start of term!

I am a big fan of backwards compatibility but not if it becomes a
stranglehold on significant improvements.  Org v8 in particular was a
major step forward but broke many of my org files.  I was happy with the
trade-off: immediate pain but much better basis for future developments.

-- 
: Eric S Fraga, with org release_9.5.1-254-g14ed65 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: Handling conversion of fields with spaces to tables

2021-12-07 Thread Eric S Fraga
On Tuesday,  7 Dec 2021 at 08:09, Loris Bennett wrote:
> However, I can just pipe the output through 'sed' to get one at the
> beginning, so all is well.

Excellent!  sed is one of the most underrated tools in our arsenal and
actually highlights the great thing about org being all about text.

-- 
: Eric S Fraga, with org release_9.5.1-243-gad53c5 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: Handling conversion of fields with spaces to tables

2021-12-06 Thread Eric S Fraga
On Monday,  6 Dec 2021 at 15:43, Loris Bennett wrote:
> That's solves the problem of the field being split, but gives me the new
> problem that the output is no longer a table :-)

Ah, yes, sorry: you need to have each line of the output start with a
"|" as well.  If your external script can do that, it should work.

As in:

  #+BEGIN_SRC sh :results output raw
  echo "|marie|Curie|123"
  echo "|louis|De Broglie|456"
  #+END_SRC

  #+RESULTS:
  | marie | Curie  | 123 |
  | louis | De Broglie | 456 |

-- 
: Eric S Fraga, with org release_9.5.1-243-gad53c5 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: Handling conversion of fields with spaces to tables

2021-12-06 Thread Eric S Fraga
This might work for you:

  #+BEGIN_SRC sh :results output raw


-- 
: Eric S Fraga, with org release_9.5.1-243-gad53c5 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: On zero width spaces and Org syntax

2021-12-06 Thread Eric S Fraga
On Saturday,  4 Dec 2021 at 08:48, Tim Cross wrote:
> My vote is to simply maintain the status quo. 

A very strong +1 on this.  Org has enough /escape mechanisms/, as you
call them, to cater for special cases, and these include @@...@@, babel,
and filters, amongst others.  The simplicity of org is a major
advantage.

-- 
: Eric S Fraga, with org release_9.5.1-243-gad53c5 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: Faces for inline src blocks

2021-12-02 Thread Eric S Fraga
On Thursday,  2 Dec 2021 at 23:56, Timothy wrote:
> [...] but something like 6 faces for inline source blocks just feels
> excessive to me.

Why?  It's just a number.  I cannot imagine it would have any
performance impact?  

If you think that level of granularity is useful, I suggest you go for
it.  Or at least define the 3 you seem to have implicitly chosen already
(by using 2 existing ones and adding one new face)?

-- 
: Eric S Fraga, with org release_9.5.1-231-g6766c4 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096



  1   2   3   4   5   6   7   8   9   10   >