Re: [PATCH] Apply emacs manual css to org pages

2020-12-28 Thread Kyle Meyer
TEC writes:

> Subject: [PATCH] mk/default.mk: use same html doc style as emacs
>
> * mk/default.mk: Add CSS stylesheet ref to HTML generated by TEXI2HTML,
> specifically the stylesheet used with the online Emacs manual.
> ---
>  mk/default.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mk/default.mk b/mk/default.mk
> index fbfdaf5..e92d58c 100644
> --- a/mk/default.mk
> +++ b/mk/default.mk
> @@ -139,7 +139,7 @@ MKDIR = install -m 755 -d
>  MAKEINFO = makeinfo
>  
>  # How to create the HTML file
> -TEXI2HTML = makeinfo --html --number-sections
> +TEXI2HTML = makeinfo --html --number-sections --css-ref 
> "https://www.gnu.org/software/emacs/manual.css;

Hmm, while I barely ever look at the online manual, I thought I recalled
it having custom styling, and indeed it looks like that was the case:

  https://web.archive.org/web/20171222052224/https://orgmode.org/org.html

At least based on the Wayback Machine rendering, it seems like the
custom CSS was lost shortly after the snapshot above.

If you look in the repo for org-manual.css, you can see there is still
handling for it.

So, if we're going to go in the direction of this patch, there should be
some mention of the previous approach, why it was dropped, and the
handling for org-manual.css should probably be removed.  Perhaps Bastien
can help fill in some details here.



Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Hongyi Zhao
On Tue, Dec 29, 2020 at 12:02 PM Robert Thorpe
 wrote:
>
> Hongyi Zhao  writes:
>
> > Is it possible for me to edit Microsoft Excel spreadsheet directly
> > from within emacs, especially utilizing the powerful capabilities of
> > orgmode?
>
> People here have suggested lots of things.
>
> It depends on the application.  Jean Louis is correct to say that Emacs
> spreadsheets are not as fully featured as things like Libreoffice.
>
> Plotting charts is a problem.  So is sending spreadsheets to other
> people in a way that they can read the file.
>
> In my past jobs I've used spreadsheets a lot.  I've found that Emacs is
> very useful for the beginning steps.  If you have data in
> comma-separated-value format or tab-separated-value format then you can
> quickly check it over in Emacs and do cleaning-up changes.  But then
> I've found it best to take that CSV/TSV output and put it into a full
> spreadsheet package, to generate final output.  That is, if you need
> charts and distribution to others.

>From this point of view, if we want to have both full-features and
powerful capabilities in manipulating spreadsheet, it seems that only
the python based programmatic tools/packages, say, openpyxl
, can meet the requirements
currently.

Regards
-- 
Assoc. Prof. Hongyi Zhao 
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China



Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Robert Thorpe
Hongyi Zhao  writes:

> Is it possible for me to edit Microsoft Excel spreadsheet directly
> from within emacs, especially utilizing the powerful capabilities of
> orgmode?

People here have suggested lots of things.

It depends on the application.  Jean Louis is correct to say that Emacs
spreadsheets are not as fully featured as things like Libreoffice.

Plotting charts is a problem.  So is sending spreadsheets to other
people in a way that they can read the file.

In my past jobs I've used spreadsheets a lot.  I've found that Emacs is
very useful for the beginning steps.  If you have data in
comma-separated-value format or tab-separated-value format then you can
quickly check it over in Emacs and do cleaning-up changes.  But then
I've found it best to take that CSV/TSV output and put it into a full
spreadsheet package, to generate final output.  That is, if you need
charts and distribution to others.

BR,
Robert Thorpe



Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Carson Chittom
On Mon, Dec 28, 2020, at 6:06 PM, andres.ramirez wrote:
> Hi. Jean Louis.
> 
> > "Jean" == Jean Louis  writes:
> 
> Jean> You have high expectations but Emacs Org mode does not nearly 
> replace the capabilities of
> Jean> a dedicated spreadsheet.
> 
> Emacs has an spreadsheet mode builtin:
> --8<---cut here---start->8---
> (info "(ses) Quick Tutorial")
> --8<---cut here---end--->8---
> 
> ses-mode could be embedded within an 'org source code block'.
> 
> Perhaps someone has a tool for converting ms-spreadsheet files to
> ses-mode.

I have tried to use ses-mode. I recommend that you not.



Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread andres . ramirez
Hi. Jean Louis.

> "Jean" == Jean Louis  writes:

Jean> You have high expectations but Emacs Org mode does not nearly replace 
the capabilities of
Jean> a dedicated spreadsheet.

Emacs has an spreadsheet mode builtin:
--8<---cut here---start->8---
(info "(ses) Quick Tutorial")
--8<---cut here---end--->8---

ses-mode could be embedded within an 'org source code block'.

Perhaps someone has a tool for converting ms-spreadsheet files to
ses-mode.

Best Regards



[New Package] org-fts: full text search of your org-mode files with ivy integration

2020-12-28 Thread Bill Burdick
Just posted this to Reddit:

https://www.reddit.com/r/orgmode/comments/klyzjv/new_package_orgfts_full_text_search_of_your/


-- Bill


Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Uwe Brauer
>>> "JL" == Jean Louis  writes:

> * Daniel Martín  [2020-12-28 19:22]:
>> Hongyi Zhao  writes:
>> 
>> > Is it possible for me to edit Microsoft Excel spreadsheet directly
>> > from within emacs, especially utilizing the powerful capabilities of
>> > orgmode?
>> 
>> Not directly, but you could first save the Excel spreadsheet as CSV and
>> then import it into Org-Mode using M-x org-table-import.  I haven't
>> checked how this works in practice, so YMMV.

> It performs poorly and takes very long time. It is limited unless
> limits are raised. And its usability on the scale from 0 to 10 is 1.


Not for me. What sort of files were you converting?


smime.p7s
Description: S/MIME cryptographic signature


Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Jean Louis
* Daniele Nicolodi  [2020-12-28 22:56]:
> On 28/12/2020 20:36, Jean Louis wrote:
> > * Hongyi Zhao  [2020-12-28 18:19]:
> >> Is it possible for me to edit Microsoft Excel spreadsheet directly
> >> from within emacs, especially utilizing the powerful capabilities of
> >> orgmode?
> > 
> > You have high expectations but Emacs Org mode does not nearly replace
> > the capabilities of a dedicated spreadsheet.
> > 
> > In comparison to all major known spreadsheets Org tables is not
> > powerful and not even comparable.
> 
> Without specific details on which functionalities are not supported in
> Org tables, this advice is not useful.

I just think that 3 references to proper spreadsheets are sparing time
of users who think that Org mode is great and powerful wizard of Oz.

> There are many use cases in which Org tables are superiors to
> spreadsheets

I find Org tables useful for small reports. Just as table mode is also
useful within Emacs. Org tables are primitives that are not comparable
to spreadsheet software.

Please show if you have some practical example where it could be
superior to spreadsheet. I just do not see how it is comparable as Org
tables are simply not a spreadsheet, rather hack in text to visualize
something similar to spreadsheet programs.

Within Emacs use Org tables and table mode and similar ARE useful. But
that does not make them comparable. A toy computer with sounds is
useful for a child, but that does not make it comparable to real
computer, as analogy.

> there are use cases where a dedicated spreadsheet application works
> better

Without considering the use within Emacs, as for that use Org tables
ARE good (but are toy computer), in all other cases a dedicated
spreadsheet works better. That would mean if file is not tied to Emacs
then in all cases spreadsheet works better.

> and there are use cases where a spreadsheet is an horrible solution
> but whoever found themselves solving the problem didn't know better
> and hammered around till they got a spreadsheet to output what they
> wanted.

Absolutely yes. One way to replace spreadsheet is to use the
database. There are horrible spreadsheet errors in the world.

> In my personal experience, in the 80% of the cases where a
> spreadsheet has been used, it was the wrong tool for the job.

I would like to know how you use it. I think they are useful for
simple non-critical applications, let us say expenses reports sent to
central database, quotations, invoices, lists of things and their
prices and similar. Entry errors and formula errors apply everywhere
also in Emacs. Emacs does not make it more useful for anybody who need
spreadsheet functionalities as it is a hack, not accessible
application. Org mode requires user to be advanced, careful reader of
a manual. Spreadsheet is more or less intuitive, Org mode tables are
not, so comparison is hard.

If we compare it from Emacs Lisp side or formula side, there is
nothing that Emacs cannot process in formula. I have myself in the
database so much more than just a spreadsheet and Emacs processes
anything necessar, just like any other programming language. But that
approach from programming side does not make program accessible and
usable as that is for small number of users.

Spreadsheet users are more or less average or basic computer
literates. 

References on spreadsheets at Wikipedia:

https://en.wikipedia.org/wiki/Spreadsheet

https://en.wikipedia.org/wiki/Comparison_of_spreadsheet_software

Maybe Org tables shall be included there?
https://en.wikipedia.org/wiki/Talk:Comparison_of_spreadsheet_software

For me, I am not convinced it is a spreadsheet program.

>From manual:

"The table editor makes use of the Emacs Calc package to implement
spreadsheet-like capabilities.  It can also evaluate Emacs Lisp forms
to derive fields from other fields."

Great and we love our horse, but it is not an elephant.



Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Uwe Brauer
>>> "HZ" == Hongyi Zhao  writes:

> Is it possible for me to edit Microsoft Excel spreadsheet directly
> from within emacs, especially utilizing the powerful capabilities of
> orgmode?


You can export and import them to org files, without the excel formula
of course

(defun org-table-import-xlsx-to-csv-org () 
  (interactive)
  (let* ((source-file  (file-name-sans-extension (buffer-file-name 
(current-buffer
 (xlsx-file (concat source-file ".xlsx"))
 (csv-file (concat source-file ".csv")))
(org-odt-convert xlsx-file "csv")
(org-table-import csv-file  nil)))

(defun org-table-export-to-xlsx () 
  (interactive)
  (let* ((source-file  (file-name-sans-extension (buffer-file-name 
(current-buffer
 (csv-file (concat source-file ".csv")))
(save-excursion
  (org-table-export csv-file "orgtbl-to-csv")
  (org-odt-convert csv-file "xlsx"


> Regards


smime.p7s
Description: S/MIME cryptographic signature


Re: Org to ConTeXt exporter?

2020-12-28 Thread Marcin Borkowski


On 2020-12-28, at 19:03, Juan Manuel Macías  wrote:

> Hello, Diego,
>
> Diego Zamboni  writes:
>
>> I have never used ConTeXt, but from what I've seen, despite its many
>> differences, a lot is still similar to TeX/LaTeX (e.g. math). Given
>> this, I think it might be easier to create a new derived exporter from
>> ox-latex, and override the parts that differ, instead of creating a
>> new one completely from scratch.
>
> You are right, maybe it is better to start with ox-latex, since LaTeX
> and ConTeXt are related.

I beg to differ.  The relation between LaTeX and ConTeXt is that they
both come from plain TeX, but both came a long way, and there are
significant differences between the two.  Personally, I'd rather start
that exporter from scratch.  I wrote my exporter a few years ago, it's
not that difficult.

Here's the thing.  Some time ago, I have dedicated about 20 minutes per
day (sometimes less, sometimes more, but the average over the past 6
years is about 17 minutes now) to what I call "creative writing" -
mainly the book I was working on for the past 5 years with two more
people (and that book is now complete) and my blog.  I will try to use
some of that time to start that tutorial, and maybe I will then publish
it on my blog or somewhere.  (I also want to get back to the book on
Elisp I started a long time ago, but that can wait a few more weeks.)

But here's the thing: I'll need help.  I know LaTeX very well - I've
been using plain TeX for about 25 years now and LaTeX for about 20
years, including writing quite a few packages and classes - but I don't
know ConTeXt that well.  (I did use it a bit, but not very extensively.)

Where could we start working on it?  I suppose GitHub/GitLab is out of
question, so?

Best,

--
Marcin Borkowski
http://mbork.pl



Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Daniele Nicolodi
On 28/12/2020 20:36, Jean Louis wrote:
> * Hongyi Zhao  [2020-12-28 18:19]:
>> Is it possible for me to edit Microsoft Excel spreadsheet directly
>> from within emacs, especially utilizing the powerful capabilities of
>> orgmode?
> 
> You have high expectations but Emacs Org mode does not nearly replace
> the capabilities of a dedicated spreadsheet.
> 
> In comparison to all major known spreadsheets Org tables is not
> powerful and not even comparable.

Without specific details on which functionalities are not supported in
Org tables, this advice is not useful.

There are many use cases in which Org tables are superiors to
spreadsheets, there are use cases where a dedicated spreadsheet
application works better, and there are use cases where a spreadsheet is
an horrible solution but whoever found themselves solving the problem
didn't know better and hammered around till they got a spreadsheet to
output what they wanted.

In my personal experience, in the 80% of the cases where a spreadsheet
has been used, it was the wrong tool for the job.

Without knowing what is the problem at hand, it is impossible to know
which solution is the more appropriate.

Cheers,
Dan



Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Jean Louis
* Daniel Martín  [2020-12-28 19:22]:
> Hongyi Zhao  writes:
> 
> > Is it possible for me to edit Microsoft Excel spreadsheet directly
> > from within emacs, especially utilizing the powerful capabilities of
> > orgmode?
> 
> Not directly, but you could first save the Excel spreadsheet as CSV and
> then import it into Org-Mode using M-x org-table-import.  I haven't
> checked how this works in practice, so YMMV.

It performs poorly and takes very long time. It is limited unless
limits are raised. And its usability on the scale from 0 to 10 is 1.



Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Jean Louis
* Hongyi Zhao  [2020-12-28 18:19]:
> Is it possible for me to edit Microsoft Excel spreadsheet directly
> from within emacs, especially utilizing the powerful capabilities of
> orgmode?

You have high expectations but Emacs Org mode does not nearly replace
the capabilities of a dedicated spreadsheet.

In comparison to all major known spreadsheets Org tables is not
powerful and not even comparable.

LibreOffice Calc and Gnumeric on free systems are proper tools for
serious spreadsheet work.

http://gnumeric.org/

https://www.libreoffice.org/

https://apps.kde.org/en/calligrasheets

Jean



Re: Org to ConTeXt exporter?

2020-12-28 Thread Diego Zamboni
By the way, I just realized that the ox-pandoc exporter (
https://github.com/kawabata/ox-pandoc) has a number of "context" options,
since Pandoc itself supports ConTeXt output. I have no idea how well it
works, but it could be an option for ConTeXt users for the time being.

--Diego


On Mon, Dec 28, 2020 at 7:03 PM Juan Manuel Macías 
wrote:

> Hello, Diego,
>
> Diego Zamboni  writes:
>
> > I have never used ConTeXt, but from what I've seen, despite its many
> > differences, a lot is still similar to TeX/LaTeX (e.g. math). Given
> > this, I think it might be easier to create a new derived exporter from
> > ox-latex, and override the parts that differ, instead of creating a
> > new one completely from scratch.
>
> You are right, maybe it is better to start with ox-latex, since LaTeX
> and ConTeXt are related.
>
> > You can see an example in my own
> > https://github.com/zzamboni/ox-leanpub/blob/master/ox-leanpub-markua.el,
> > which uses ox-md as a backend for defining the new ox-markua exporter.
>
> Thank you very much for the link. As soon as I have some time I will
> study your code
>
> Regards,
>
> Juan Manuel
>


Re: Org to ConTeXt exporter?

2020-12-28 Thread Jonathan McHugh
Hello Juan,

Thanks for validating my suspicions re Latex and Context.

One area I used a lot was with regards to Tikz. I will have to make many
detours before I get the chance to adapt bespoke Tikz projects to to
something more generic and action from org-mode. Hopefully by then the
choice of an outputting document management system will be less of a
consideration.

I half suspect that the Context author (Hans Hagen) focusing on Metapost
allowed the Context community to not value Tikz so much (transposing the
Tikz manual to Context would be a great win IMHO).

Checking in on Context I see that they have a new generation:
https://wiki.contextgarden.net/LMTX

Im sure there will be some scripts which will need updating given
updated conventions. Im pleased that that the project still has momentum
and look forward to investigating what this means.

A Guix user, it saddens me that it is not packaged properly (time, time,
time) - especially given the LMTX shift.

Broadening the topic, I wonder whether the wider stemming of Tex derived
products should be approached with as much of the equivalent encapsulation as
possible. New to the Emacs and Lisp world, I do not know whether suggesting
Org-Mode outputting Racket's Scribble or Guile's Skribilo is productive
or relevant (or trolling!).

More practically speaking, it is worth noting that Skribilo outputs
Context (in addition to Latex):
https://www.nongnu.org/skribilo/doc/user-38.html#context-engine

It is entirely possible that that community has resolved a lot of the
challenges the Org-Mode contingent is currently deliberating over.

Best wishes,


Jonathan



Juan Manuel Macías  writes:

> Hello, Jonathan,
>
> Jonathan McHugh  writes:
>
>> I have wondered about the interoperability between Context and Latex.
>>
>> As somebody who (previously) invested a lot of time into Latex, my migration 
>> to
>> Context (due to its emphasis on Lua) grew problematic once other commitments
>> grew.
>
> What I like about ConTeXt is its (let's say) avant-garde vocation. But
> for my everyday work I prefer LaTeX: more extensible, more versatile,
> even more documented. But we must accept that ConTeXt is also an
> advanced typographic laboratory where many functionalities also end up
> in LaTeX over time. In fact, as far as I know, the future LaTeX3 adopts
> some ideas from ConTeXt.
>
> On Lua, LuaLaTeX also has good support. And many new LaTeX packages are
> already getting very good use of LuaTeX features.
>
>> The lack of Context support in Org-Mode has made me consider reverting
>> back to Latex.
>
> I know some advanced ConTeXt users (I am not) who are very interested in
> migrating to Org Mode. In that aspect, I think a native exporter to
> ConTeXt would be of great help.
>
> Generally speaking, I think Org is the perfect interface to use TeX and
> friends. One of the things I like the most about Org Mode is that it
> allows working in (La)TeX at a very high level. Of course, for advanced
> use, the more you know about LaTeX and TeX, the better. For example, if
> I work on a large book, I usually write the entire configuration (the
> preamble, my macros, my LaTeX code, etc.) to an Org file, and then I generate
> a Preamble.tex file using tangle. I have a master file and several
> subdocuments for the parts and sections of the book. And I make heavy
> use of Org Publish. But in all that workflow, LaTeX is always in the
> background. It is mainly a matter of comfort: I love TeX and its
> derivatives, its power and its typographic refinement, but its language
> is very verbose and the sources are difficult to debug. Org mode is much
> more human readable. And even much more readable and comfortable than
> Markdown.
>
>> If I had a lot of time it would be wonderful to develop parsing
>> expression grammars to capture it all, irrespective of direction ... mmm 
>> time
>
> Yes, time is the problem: I think TODO lists were invented to have a
> foot of mud in the future :-)
>
> Regards,
>
> Juan Manuel 


-- 
Jonathan McHugh
indieterminacy@libre.brussels



Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Filipp Gunbin
On 28/12/2020 17:21 +0100, Daniel Martín wrote:

> Hongyi Zhao  writes:
>
>> Is it possible for me to edit Microsoft Excel spreadsheet directly
>> from within emacs, especially utilizing the powerful capabilities of
>> orgmode?
>
> Not directly, but you could first save the Excel spreadsheet as CSV and
> then import it into Org-Mode using M-x org-table-import.  I haven't
> checked how this works in practice, so YMMV.

For very simple spreadsheets csv-mode / tsv-mode will do.



Re: [tip] Export subfigures to LaTeX (and HTML)

2020-12-28 Thread John Kitchin
This is an interesting use of links, in particular extending the
information in the description.

You might look at this
http://kitchingroup.cheme.cmu.edu/blog/2015/02/05/Extending-the-org-mode-link-syntax-with-attributes/
for another way to do that.

Check out this alternative approach all together that also uses a
special block.

http://kitchingroup.cheme.cmu.edu/blog/2016/01/17/Side-by-side-figures-in-org-mode-for-different-export-outputs/

I don't use either of these today, and they are old so who knows if they
still work, but they have some fun ideas in them.

Juan Manuel Macías  writes:

> Hi,
>
> I have come up with a way to export subfigures to LaTeX (with the subfigure 
> package) by
> defining a new link type. The 'subcaption' of the subfigure would be the 
> description of
> the link. If we want to add parameters such as width, scale, etc., we can put 
> them next
> between the marks '>( ... )'
>
> The code:
>
> #+begin_src emacs-lisp
>   (org-link-set-parameters
>"subfig"
>:follow (lambda (file) (find-file file))
>:face '(:foreground "chocolate" :weight bold :underline t)
>:display 'full
>:export (lambda (file desc backend)
>(when (eq backend 'latex)
>  (if (string-match ">(\\(.+\\))" desc)
>  (concat "\\subfigure[" (replace-regexp-in-string "\s+>(.+)" 
> "" desc) "]"
>  "{\\includegraphics"
>  "["
>  (match-string 1 desc)
>  "]"
>  "{"
>  file
>  "}}")
>(format "\\subfigure[%s]{\\includegraphics{%s}}" desc file)
> #+end_src
>
> Example:
>
> #+begin_src org
>   ,#+CAPTION: Lorem impsum dolor
>   ,#+ATTR_LaTeX: :options \centering
>   ,#+begin_figure
>   [[subfig:img1.jpg][Caption of img1 >(width=.3\textwidth)]]
>
>   [[subfig:img2.jpg][Caption of img2 >(width=.3\textwidth)]]
>
>   [[subfig:img3.jpg][Caption of img3 >(width=.6\textwidth)]]
>   ,#+end_figure
> #+end_src
>
> Results:
>
> #+begin_src latex
>   \begin{figure}\centering
> \subfigure[Caption of 
> img1]{\includegraphics[width=.3\textwidth]{img1.jpg}}
>
> \subfigure[Caption of 
> img2]{\includegraphics[width=.3\textwidth]{img2.jpg}}
>
> \subfigure[Caption of 
> img3]{\includegraphics[width=.6\textwidth]{img3.jpg}}
> \caption{Lorem impsum dolor}
>   \end{figure}
> #+end_src
>
> If we want to export to HTML it would be something more tricky. In this case, 
> the export
> function could be like this (a width parameter would be enclosed between >{ 
> ... }):
>
> #+begin_src emacs-lisp
>   (lambda (file desc backend)
> (cond
>  ((eq backend 'latex)
>   (if (string-match ">(\\(.+\\))" desc)
> (concat "\\subfigure[" (replace-regexp-in-string "\s*>.+" "" desc) 
> "]" "{\\includegraphics" "[" (match-string 1 desc) "]" "{"  file "}}")
>   (format "\\subfigure[%s]{\\includegraphics{%s}}" 
> (replace-regexp-in-string "\s*>.+" "" desc) file)))
>  ((eq backend 'html)
>   (if (string-match "{\\(.+\\)}" desc)
> (concat " (match-string 1 desc)
> "\""
> "/>"
> (replace-regexp-in-string "\s*.+" "" desc)
> "")
>   (format "%s"
>   file file
>   (replace-regexp-in-string "\s*.+" "" desc))
> #+end_src
>
> Example:
>
> #+begin_src org
>   ,#+CAPTION: Lorem impsum dolor
>   ,#+ATTR_LaTeX: :options \centering
>   ,#+begin_figure
>   @@html: style="margin-left:auto;margin-right:auto;">@@
>
>   [[subfig:img1.jpg][Caption of img1 >(width=.3\textwidth) >{300px}]]
>
>   [[subfig:img2.jpg][Caption of img2 >(width=.3\textwidth) >{300px}]]
>
>   @@html:  style="margin-left:auto;margin-right:auto;">@@
>
>   [[subfig:img3.jpg][Caption of img3 >(width=.6\textwidth) >{600px}]]
>
>   @@html:Lorem ipsum dolor@@
>   ,#+end_figure
> #+end_src
>
> As you can see, it is not the panacea, and you have to apply some direct 
> format...
>
> Happy holidays
>
> Juan Manuel


--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: Org to ConTeXt exporter?

2020-12-28 Thread Juan Manuel Macías
Hello, Diego,

Diego Zamboni  writes:

> I have never used ConTeXt, but from what I've seen, despite its many
> differences, a lot is still similar to TeX/LaTeX (e.g. math). Given
> this, I think it might be easier to create a new derived exporter from
> ox-latex, and override the parts that differ, instead of creating a
> new one completely from scratch.

You are right, maybe it is better to start with ox-latex, since LaTeX
and ConTeXt are related.

> You can see an example in my own
> https://github.com/zzamboni/ox-leanpub/blob/master/ox-leanpub-markua.el,
> which uses ox-md as a backend for defining the new ox-markua exporter.

Thank you very much for the link. As soon as I have some time I will
study your code

Regards,

Juan Manuel 



Re: Org to ConTeXt exporter?

2020-12-28 Thread Juan Manuel Macías
Hello, Jonathan,

Jonathan McHugh  writes:

> I have wondered about the interoperability between Context and Latex.
>
> As somebody who (previously) invested a lot of time into Latex, my migration 
> to
> Context (due to its emphasis on Lua) grew problematic once other commitments
> grew.

What I like about ConTeXt is its (let's say) avant-garde vocation. But
for my everyday work I prefer LaTeX: more extensible, more versatile,
even more documented. But we must accept that ConTeXt is also an
advanced typographic laboratory where many functionalities also end up
in LaTeX over time. In fact, as far as I know, the future LaTeX3 adopts
some ideas from ConTeXt.

On Lua, LuaLaTeX also has good support. And many new LaTeX packages are
already getting very good use of LuaTeX features.

> The lack of Context support in Org-Mode has made me consider reverting
> back to Latex.

I know some advanced ConTeXt users (I am not) who are very interested in
migrating to Org Mode. In that aspect, I think a native exporter to
ConTeXt would be of great help.

Generally speaking, I think Org is the perfect interface to use TeX and
friends. One of the things I like the most about Org Mode is that it
allows working in (La)TeX at a very high level. Of course, for advanced
use, the more you know about LaTeX and TeX, the better. For example, if
I work on a large book, I usually write the entire configuration (the
preamble, my macros, my LaTeX code, etc.) to an Org file, and then I generate
a Preamble.tex file using tangle. I have a master file and several
subdocuments for the parts and sections of the book. And I make heavy
use of Org Publish. But in all that workflow, LaTeX is always in the
background. It is mainly a matter of comfort: I love TeX and its
derivatives, its power and its typographic refinement, but its language
is very verbose and the sources are difficult to debug. Org mode is much
more human readable. And even much more readable and comfortable than
Markdown.

> If I had a lot of time it would be wonderful to develop parsing
> expression grammars to capture it all, irrespective of direction ... mmm 
> time

Yes, time is the problem: I think TODO lists were invented to have a
foot of mud in the future :-)

Regards,

Juan Manuel 



Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Daniel Martín
Hongyi Zhao  writes:

> Is it possible for me to edit Microsoft Excel spreadsheet directly
> from within emacs, especially utilizing the powerful capabilities of
> orgmode?

Not directly, but you could first save the Excel spreadsheet as CSV and
then import it into Org-Mode using M-x org-table-import.  I haven't
checked how this works in practice, so YMMV.



Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Stefan Monnier
>> Is it possible for me to edit Microsoft Excel spreadsheet directly
>> from within emacs, especially utilizing the powerful capabilities of
>> orgmode?
>
> Not directly, but you could first save the Excel spreadsheet as CSV and
> then import it into Org-Mode using M-x org-table-import.

There's also a `csv-mode` in GNU ELPA.


Stefan




Re: Org to ConTeXt exporter?

2020-12-28 Thread Diego Zamboni
I have never used ConTeXt, but from what I've seen, despite its many
differences, a lot is still similar to TeX/LaTeX (e.g. math). Given this, I
think it might be easier to create a new derived exporter from ox-latex,
and override the parts that differ, instead of creating a new one
completely from scratch.

You can see an example in my own
https://github.com/zzamboni/ox-leanpub/blob/master/ox-leanpub-markua.el,
which uses ox-md as a backend for defining the new ox-markua exporter.

There is also already some documentation at
https://orgmode.org/worg/dev/org-export-reference.html

--Diego


On Mon, Dec 28, 2020 at 4:09 PM Marcin Borkowski  wrote:

>
> On 2020-12-28, at 14:38, Juan Manuel Macías 
> wrote:
>
> > Hi,
> >
> > Just out of curiosity, I am wondering if there are plans to create an
> > Org to ConTeXt exporter in the future, or if there is already some work
> > in progress on this front.
> >
> > I have to say that among TeX formats I tend to prefer LaTeX to ConTeXt;
> > but ConTeXt has very interesting features (grid typesetting, for
> > example) that LaTeX lacks (for now) and has a more monolithic structure,
> > that is, it does not need to be extended through packages as in LaTeX.
>
> Creating an exporter from scratch is probably easier than you think.
> A few years ago I planned a tutorial about this, but another job
> happened, then covid happened etc.  Now that I finished some big project
> taking me a lot of time, I might be tempted to revisit that.  Would
> there be demand for a DYI Org-exporter-from-scratch tutorial?
>
> Best,
>
> --
> Marcin Borkowski
> http://mbork.pl
>
>


Re: Org to ConTeXt exporter?

2020-12-28 Thread Jonathan McHugh
Hello \Context folks,

I have wondered about the interoperability between Context and Latex.

As somebody who (previously) invested a lot of time into Latex, my migration to
Context (due to its emphasis on Lua) grew problematic once other commitments
grew.

The lack of Context support in Org-Mode has made me consider reverting
back to Latex.

However, I have  wondered if a possible shortcut is to compile a list of
the semantic differences between the two and attack it from there.

For example, the Context stub, 'From Latex to Context', gives some of the
distinctions:
https://wiki.contextgarden.net/From_LaTeX_to_ConTeXt

... which then cites a 45 page pdf (which may (possibly) be a little out
of date, having been written in 2003):
http://www.berenddeboer.net/tex/LaTeX2ConTeXt.pdf

Perhaps looking at Org-Modes Latex exporter and determining the Context
equivalent would help? After all, they should be satisfing equivalent 
requirements.

Even better, if a modern list of equivalents were in a locality suitable
for non Org-Mode users then it may become easier for users from either
communities to feed off eachothers work a little easier.

If I had a lot of time it would be wonderful to develop parsing
expression grammars to capture it all, irrespective of direction ... mmm 
time

Best wishes,


Jonathan

Juan Manuel Macías  writes:

> Hello, Marcin,
>
> Marcin Borkowski  writes:
>
>> Creating an exporter from scratch is probably easier than you think.
>> A few years ago I planned a tutorial about this, but another job
>> happened, then covid happened etc.  Now that I finished some big project
>> taking me a lot of time, I might be tempted to revisit that.  Would
>> there be demand for a DYI Org-exporter-from-scratch tutorial?
>
> Thank you for your answer. Actually a tutorial on how to create an
> exporter from scratch (I think) would be really interesting. Some time
> ago I was tempted to start writing an exporter for ConTeXt, studying the
> code of the other exporters, but for time and work reasons I left the
> project abandoned.
>
> If you finally write that tutorial, I could also translate it into
> Spanish to spread it out among Spanish-speaking Org users.
>
> Regards,
>
> Juan Manuel 
>
>> Best,


-- 
Jonathan McHugh
indieterminacy@libre.brussels



Re: Org to ConTeXt exporter?

2020-12-28 Thread Juan Manuel Macías
Hello, Marcin,

Marcin Borkowski  writes:

> Creating an exporter from scratch is probably easier than you think.
> A few years ago I planned a tutorial about this, but another job
> happened, then covid happened etc.  Now that I finished some big project
> taking me a lot of time, I might be tempted to revisit that.  Would
> there be demand for a DYI Org-exporter-from-scratch tutorial?

Thank you for your answer. Actually a tutorial on how to create an
exporter from scratch (I think) would be really interesting. Some time
ago I was tempted to start writing an exporter for ConTeXt, studying the
code of the other exporters, but for time and work reasons I left the
project abandoned.

If you finally write that tutorial, I could also translate it into
Spanish to spread it out among Spanish-speaking Org users.

Regards,

Juan Manuel 

> Best,




Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Hongyi Zhao
Is it possible for me to edit Microsoft Excel spreadsheet directly
from within emacs, especially utilizing the powerful capabilities of
orgmode?

Regards
-- 
Assoc. Prof. Hongyi Zhao 
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China



Re: Org to ConTeXt exporter?

2020-12-28 Thread Marcin Borkowski


On 2020-12-28, at 14:38, Juan Manuel Macías  wrote:

> Hi,
>
> Just out of curiosity, I am wondering if there are plans to create an
> Org to ConTeXt exporter in the future, or if there is already some work
> in progress on this front.
>
> I have to say that among TeX formats I tend to prefer LaTeX to ConTeXt;
> but ConTeXt has very interesting features (grid typesetting, for
> example) that LaTeX lacks (for now) and has a more monolithic structure,
> that is, it does not need to be extended through packages as in LaTeX.

Creating an exporter from scratch is probably easier than you think.
A few years ago I planned a tutorial about this, but another job
happened, then covid happened etc.  Now that I finished some big project
taking me a lot of time, I might be tempted to revisit that.  Would
there be demand for a DYI Org-exporter-from-scratch tutorial?

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: Let emacs align all columns automatically on-the-fly within orgmode.

2020-12-28 Thread Hongyi Zhao
On Mon, Dec 28, 2020 at 5:50 PM Ihor Radchenko  wrote:
>
> Hongyi Zhao  writes:
>
> > I use Chinese characters in some column, and it seems that pressing
> > TAB can't do the trick for this senario.
>
> Take a look at https://github.com/casouri/valign

Wonderful. Thanks a lot. I'll take a look and try it.

Best,
-- 
Assoc. Prof. Hongyi Zhao 
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China



Org to ConTeXt exporter?

2020-12-28 Thread Juan Manuel Macías
Hi,

Just out of curiosity, I am wondering if there are plans to create an
Org to ConTeXt exporter in the future, or if there is already some work
in progress on this front.

I have to say that among TeX formats I tend to prefer LaTeX to ConTeXt;
but ConTeXt has very interesting features (grid typesetting, for
example) that LaTeX lacks (for now) and has a more monolithic structure,
that is, it does not need to be extended through packages as in LaTeX.

Regards,

Juan Manuel 



Bug: org-tangle writes region for every single block [9.4.4 (9.4.4-elpa @ /home/miha/.config/emacs/elpa/org-20201222/)]

2020-12-28 Thread jakanakaevangeli


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Tangling a file with a lot of src blocks can get quite slow because
write-region is called for each individual src block.

On my machine it takes 8 seconds to tangle a file with 160 blocks of the
same language. Tangling the file over tramp would probably take about 5
minutes.

Perhaps it would be more optimal to only save each file at the end
of src block extraction.

Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22, 
cairo version 1.17.3)
 of 2020-08-28
Package: Org mode version 9.4.4 (9.4.4-elpa @ 
/home/miha/.config/emacs/elpa/org-20201222/)



Bug: (org-release) returns empty string on Elpa [ ( @ /home/pierre/.guix-profile/share/emacs/site-lisp/)]

2020-12-28 Thread Pierre Langlois
Hello there!

Since the latest update to 9.4.4, some of us in Guix have been
experiencing issues with loading packages that depend on Org [0]. It
seems the root of the problem is that (org-release) returns an empty
string, you can see this manifesting in this email actually :-).

Looking a little deeper, indeed the org-version.el packaged in Guix is
as follows:

--8<---cut here---start->8---
;;; org-version.el --- autogenerated file, do not edit
;;
;;; Code:
;;;###autoload
(defun org-release ()
  "The release version of Org.
Inserted by installing Org mode or when a release is made."
   (let ((org-release ""))
 org-release))
;;;###autoload
(defun org-git-version ()
  "The Git version of Org mode.
Inserted by installing Org or when a release is made."
   (let ((org-git-version ""))
 org-git-version))

(provide 'org-version)

;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; coding: utf-8
;; End:
;;; org-version.el ends here
--8<---cut here---end--->8---

We download the Org source code directly from ELPA [1], it would seemx
the org-version.el wasn't correctly generated, right?

Thanks so much for Org!
Pierre

[0]: https://issues.guix.gnu.org/45448
[1]: https://elpa.gnu.org/packages/org-9.4.4.tar

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.




Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, 
cairo version 1.16.0)
Package: Org mode version  ( @ 
/home/pierre/.guix-profile/share/emacs/site-lisp/)


signature.asc
Description: PGP signature


Re: [O] new links escaping mechanism causing some problems

2020-12-28 Thread Greg Minshall
> No, sorry; I stopped using this a while ago.  I now use the default
> exporter along this style sheet:
> 
> https://taopeng.me/org-notes-style/css/notes.css

thanks!



Re: [O] new links escaping mechanism causing some problems

2020-12-28 Thread Eric S Fraga
On Sunday, 27 Dec 2020 at 18:42, Greg Minshall wrote:
> hi, Eric, i wonder if you are still using ox-twbs?  

No, sorry; I stopped using this a while ago.  I now use the default
exporter along this style sheet:

https://taopeng.me/org-notes-style/css/notes.css

eric
-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.3-152-g713b3b



Re: Can't activate orgmode after the installation of its git master version.

2020-12-28 Thread tomas
On Mon, Dec 28, 2020 at 08:24:46AM +0800, Hongyi Zhao wrote:

[...]

> Eli Zaretskii  told the following fact:
> 
> I believe/hope this is a bug that was already fixed on the emacs-27
> branch, and hopefully will be merged to master soon.

Yes, thanks :)

Cheers
 - t


signature.asc
Description: Digital signature


Re: Let emacs align all columns automatically on-the-fly within orgmode.

2020-12-28 Thread Ihor Radchenko
Hongyi Zhao  writes:

> I use Chinese characters in some column, and it seems that pressing
> TAB can't do the trick for this senario.

Take a look at https://github.com/casouri/valign

Best,
Ihor



Re: Let emacs align all columns automatically on-the-fly within orgmode.

2020-12-28 Thread Hongyi Zhao
On Mon, Dec 28, 2020 at 4:28 PM Diego Zamboni  wrote:
>
> Normally, pressing TAB in any cell will align the whole table and move  the 
> cursor to the next cell.

I use Chinese characters in some column, and it seems that pressing
TAB can't do the trick for this senario.

>
> --Diego
>
> On Mon, 28 Dec 2020 at 02:06, Hongyi Zhao  wrote:
>>
>> When editing a table in orgmode, the columns become no longer aligned.
>> How to let emacs align all columns automatically on-the-fly within
>> orgmode?
>>
>> Regards
>> --
>> Assoc. Prof. Hongyi Zhao 
>> Theory and Simulation of Materials
>> Hebei Polytechnic University of Science and Technology engineering
>> NO. 552 North Gangtie Road, Xingtai, China
>>


-- 
Assoc. Prof. Hongyi Zhao 
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China



Re: Let emacs align all columns automatically on-the-fly within orgmode.

2020-12-28 Thread Diego Zamboni
Normally, pressing TAB in any cell will align the whole table and move  the
cursor to the next cell.

--Diego

On Mon, 28 Dec 2020 at 02:06, Hongyi Zhao  wrote:

> When editing a table in orgmode, the columns become no longer aligned.
> How to let emacs align all columns automatically on-the-fly within
> orgmode?
>
> Regards
> --
> Assoc. Prof. Hongyi Zhao 
> Theory and Simulation of Materials
> Hebei Polytechnic University of Science and Technology engineering
> NO. 552 North Gangtie Road, Xingtai, China
> 
>
>