Re: Supporting non-free SQL clients in ob-sql

2023-01-25 Thread Loris Bennett
Richard Stallman  writes:

> [[[ To any NSA and FBI agents reading my email: please consider]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > The 'support' is essentially specialised comint based interfaces tweaked
>   > to work with the various SQL database engine command line clients such
>   > as psql for Postgres and sqlplus for Oracle. This involves codes to use
>   > the comint buffer to send commands/regions to the SQL client and read
>   > back the results and run interactive 'repl' like sessions with the
>   > client.
>
> Thanks.
>
> Based on our general policies, it is ok to do this.  It is ok for
> Postgres because that is free software.  It is ok for Oracle because
> that is widely known.
>
> Ihor Radchenko  wrote:
>
>   > It is hard to define "well known". For me, oracle and mssql databases
>   > are well-known (just by company name), while saphana and vertica are
>   > not.
>
> I have never heard of saphana or vertica, which suggests that maybe
> this is an issue.  However, I don't know the database field, so I
> am the wrong one to judge.

I assume that 'saphana' actually refers to 'SAP HANA'[1], which is an
in-memory RDMS produced by SAP, the large German software company.  I
think this product may well qualify as being 'well-known', at least in
the field of enterprise software.

Cheers,

Loris

Footnotes:
[1]  https://en.wikipedia.org/wiki/SAP_HANA

-- 
This signature is currently under constuction.



Re: org-agenda-entry-text-mode

2023-01-25 Thread David Masterson
 writes:

> On Wed, Jan 25, 2023 at 01:24:56PM +, Ihor Radchenko wrote:
>> David Masterson  writes:
>> 
>> > Ooh!  Found org-agenda-entry-text-exclude-regexp!  It's so close to what
>> > I want.  With it, I can delete everything on a line that I don't want to
>> > be displayed with org-agenda-entry-text-mode.  But I can't get rid of
>> > the line, so I wind up with blank lines where the log would've been.
>> 
>> You can. Just include newline into your regexp.
>
> If you are entering it interactively into the minibuffer, that's
> CTRL-J (in a terminal you might have to do CTRL-Q CTRL-J).

How do you represent that in Elisp? I can't quite get it from the Elisp
Manual, but I think it's "\n" (CMIIAW)
-- 
David Masterson



Re: Supporting non-free SQL clients in ob-sql (was: [PATCH] ob-sql: Add support for Athena)

2023-01-25 Thread Richard Stallman
[[[ To any NSA and FBI agents reading my email: please consider]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > I am not sure about SaaSS - even postgresql (free software) may be used
  > as a service provider by running it on server the user does not control.

For sure, it CAN be used that way.  If a Lisp package is designed to
work with a subprocess, a user can certainly rig it to talk with a
remote server.  It is the nature of free software that people can
customize it, even so as to do something foolish with it.  When a user
does this, it's per responsibility, not ours.

We should not distribute specific support or recommendations to use
the Lisp package in that particular way.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





Re: Supporting non-free SQL clients in ob-sql (was: [PATCH] ob-sql: Add support for Athena)

2023-01-25 Thread Richard Stallman
[[[ To any NSA and FBI agents reading my email: please consider]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > The 'support' is essentially specialised comint based interfaces tweaked
  > to work with the various SQL database engine command line clients such
  > as psql for Postgres and sqlplus for Oracle. This involves codes to use
  > the comint buffer to send commands/regions to the SQL client and read
  > back the results and run interactive 'repl' like sessions with the
  > client.

Thanks.

Based on our general policies, it is ok to do this.  It is ok for
Postgres because that is free software.  It is ok for Oracle because
that is widely known.

Ihor Radchenko  wrote:

  > It is hard to define "well known". For me, oracle and mssql databases
  > are well-known (just by company name), while saphana and vertica are
  > not.

I have never heard of saphana or vertica, which suggests that maybe
this is an issue.  However, I don't know the database field, so I
am the wrong one to judge.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





Re: [BUG] ob-shell doesn't evaluate last line on Windows (cmd/cmdproxy) [9.6.1 ( @ c:/Users/Osher/AppData/Roaming/.emacs.d/elpa/org-9.6.1/)]

2023-01-25 Thread Matt

 >   On Fri, 20 Jan 2023 04:27:18 -0500  Ihor Radchenko  wrote --- 
 > I think `org-babel--shell-command-on-region' will be more appropriate.
 > Because similar issues might appear when attempting to evaluate other
 > code blocks on Windows, where `shell-file-name' is set to cmdproxy.exe.

Is something like this what you're thinking?  Or, do we want to check 
explicitly for "cmdproxy.exe"?

Also, this bug isn't currently tracked in Woof!.  I'm not able to confirm it, 
but since we're putting in a fix, should be add it anyway?



ob-eval-handle-windows-shell.patch
Description: Binary data


Re: [PATCH][oc-csl] Improve reference parsing

2023-01-25 Thread András Simonyi
Dear All,

On Thu, 19 Jan 2023 at 11:15, M. ‘quintus’ Gülker
 wrote:

> That is, the macro has to work both in a citation and in> normal text. Even 
> if a @@csl: construct would be ignored in normal text,> I cannot see how to 
> write the macro then, because something like
>
> #+MACRO: name @@csl:$1latex:\textsc{$1}html: class="name">$1@@
>
> would still transfer the @@latex: and @@html: constructs into the
> footnote. They would have to be expressly ignored by the citation
> processor.

If we take the approach I suggested the macro definition you suggested
should work correctly both for LaTeX and HTML export combined with the
CSL citation processor, because in the case of citation locators and
affixes Citeproc would receive only the output produced by the planned
CSL ox backend, which would remove the non-CSL export snippets and
keep only the content of the csl snippet.  Citeproc would parse the
produced text into the appropriate
small-caps CSL representation and then format the citation with
small-caps using the Citeproc formatter corresponding to the export
format.

best wishes,
András

>
>   -quintus
>
> --
> Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
> Passau, Deutschland  | kont...@guelker.eu| O<



Re: Supporting non-free SQL clients in ob-sql (was: [PATCH] ob-sql: Add support for Athena)

2023-01-25 Thread Tim Cross
Ihor Radchenko  writes:

> Tim Cross  writes:
>
>> 3. There is no requirement to install non-free software to use
>> ob-sql.el. The software is fully functional using a free RDMS like
>> postgres.
>
> Yes, but there is requirement to install in order to use ob-sql.el
> __with :engine set to non-free option__.
>
> So, I can envision that someone who decided to use ob-sql.el and
> considering between free and non-free engine may prefer non-free one. Of
> course, it is not very strong argument, but the boundaries are fuzzy in
> this area.
>

in the same way someone could choose to run emacs on MS Windows. This
doesn't mean emacs encourages people to use MS Windows. Rather it means
that people who are restricted to MS Windows can at least use a free
editor on that platform. In a similar manner, people who are restricted
to working with a non-free database can access it using free software. I
think this is particularly relevant given the growth in large databases
where users are unable to use a free database or run it locally simply
because of the size of the data and the resource requirements and
administrative complexity involved. 

>> For maintenance reasons and to add session support, I would suggest that
>> using sql.el instead of re-inventing this wheel would be a better
>> outcome. I've used sql.el for years and it works extremely well and I
>> don't htink it would be too hard to integrate into ob-sql.
>
> Sure. That's what we usually do - just use whatever REPL is available
> for a given ob-* language. Just a question of someone sending a patch.




Re: [PATCH] oc-natbib: Provide a fallback bibliography style

2023-01-25 Thread András Simonyi
Dear All,

On Wed, 25 Jan 2023 at 16:10, Ihor Radchenko  wrote:

> If we do not specify a bibliography style, LaTeX export will fail.
> With the attached patch, the following simple-minded Org document will
> export without errors:

Thanks, I think that is an important improvement -- when I tried the
natbib exporter I expected it to do
something sensible without specifying a style.

> Also, should we provide some commonly available natbib styles in the
> defcustom?

What would this look like?

best wishes,
András



Re: Feature request: "task table" (similar to clock table)

2023-01-25 Thread Marcin Borkowski


On 2023-01-25, at 03:37, Max Nikulin  wrote:

> On 25/01/2023 03:09, Marcin Borkowski wrote:
 https://mbork.pl/2023-01-09_TODO_stats_table
>
> Sorry for a too late response. The feature is documented in the
> manual, see info "(org) Dynamic Blocks"
> https://orgmode.org/manual/Dynamic-Blocks.html

Ah, thanks!  I missed this.  (A long time ago I read almost all of the
Org manual, but I could have forgotten or omitted this.)

> Perhaps a close feature that might allow to return list that is
> converted to table by org-babel is "#+call:", see info "(org)
> Evaluating Code Blocks"
> https://orgmode.org/manual/Evaluating-Code-Blocks.html

Indeed.

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



Re: Should Org provide commonly used link types?

2023-01-25 Thread Ihor Radchenko
Jean Louis  writes:

>> Suggestions welcome
>
> Main suggestion would be to make interface for users to easy setup
> those hyperlinks.
>
> If user is supposed to adapt mind to programmer by setting this horror:
> (info "(org) Adding Hyperlink Types")
> that leads nowhere. Forget about "usability".

I am sorry, but what can be simpler than

 (org-link-set-parameters "man" :follow #'org-man-open)

?

At least, when we only consider Elisp interface.

> Customize interface is much better.
>
> How about this in customize?
>
> - prefix: pdf
> - format %s&%s
> - function to run: open-pdf

org-link-parameters

We can improve custom type definition there, but otherwise we do provide
customize interface.

> I am changing my mind, now I really think that it is better you hard
> code those hyperlinks in Org as you said, that way you will get
> functionality that users can still choose but need not be bothered by
> programming.
> ...

[ Some of the suggestions have been discussed in the past - we do not
  oppose including more built-in link types. Patches are welcome. ]

So, the suggested links are:
1. pdf + page
2. video/audio + timestamp
3. epub/djvu/mibi + page

Note that all these are basically file: links. While we can make users
say pdf:... or video:..., or would be more convenient to extend file:
link instead. Max pointed to experimental proof-of-concept code for pdf
+ page in another email.

> Message-ID, should support FOLDER+Message-ID

I am not sure here. How can we utilize FOLDER? It depend on the kind of
external application or Emacs package we use to open the link.

> Is it possible to support Emacs bookmarks as hyperlinks? I would
> include that.

There is ol-bookmarks package distributed as a part of org-contrib.
Someone with copyright assignment may take a look and re-implement it.

> Geo location shall be supported, as it has already many handlers in
> GNU/Linux, then GPX files, GeoJSON files

Are there any? I only know web handlers. I did search at some point.

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



Re: This is out of thread subject

2023-01-25 Thread Ihor Radchenko
Jean Louis  writes:

> Haven thanks Firefox developers did not complain on users setting
> their own content types. Firefox can open Org content type and launch
> Emacs on it, but Emacs "can't" as it is security risk. 

Well...
https://bugzilla.mozilla.org/show_bug.cgi?id=1678994
https://bugzilla.mozilla.org/show_bug.cgi?id=1565574

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



This is out of thread subject

2023-01-25 Thread Jean Louis
* Max Nikulin  [2023-01-25 18:33]:
> I had in mind another person:
> 
> Re: URLs with brackets not recognised. Wed, 12 May 2021 22:06:50 +0200.
> > I disagree. URLs are well-specified. Per RFC 3986, the characters
> > allowed in a URL are [A-Za-z0-9\-._~!$&'()*+,;=:@\/?]. Org mode should
> > implement proper URL detection, not asking its users "to give it some
> > hints" and using "a kind of heuristics". A string either is a valid URL
> > per the relevant RFCs or it is not.
> 
> You probably decided that I was writing about
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58774
> [WISH]: Let us make EWW browse WWW Org files correctly
> 
> That is from my point of view is an excellent example how to bury a valid
> feature request "allow me to do" by aggressive demand "it must be by
> default" disregarding unresolved security issues and by adding more noise by
> discussion of unrelated stuff (should Org files have text/... or
> application/... mime type).
> 
> Back to the topic, URI handling packages have incompatible features. It is
> the reason why users have to had explicit configuration.

I can't follow or understand you in everything above.

Purpose of community discussions is to yield with something
productive. Whatever I said in the first notion does not need to be
so, and I really don't mind when I see that discussion deviated from
the point.

I am not Don Quixote to fight mills for browser that few people use
and have decision making. EWW still cannot support customizable
content/types but I also do not find it hard to bypass it's functions.

At least there was "useful" (by irony) decision that "opening Org
files in Emacs is security risk" -- one big fricking LOL on
that. Emacs itself is security risk, as it is programming language and
security is measured by weakest chain.

Haven thanks Firefox developers did not complain on users setting
their own content types. Firefox can open Org content type and launch
Emacs on it, but Emacs "can't" as it is security risk. 

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Should Org provide commonly used link types?

2023-01-25 Thread Jean Louis
* Ihor Radchenko  [2023-01-25 15:56]:
> What we can do is add some more known link types. Some of them will use
> `browse-url' as :follow link parameter.
> 
> However, what are the link types which are worth including into the Org
> code? I am looking into the protocols supported by Firefox now.
> They are: mailto, news, nntp, snwes, afp, data, disk, disks, hcp, htp,
> htps, http, iehistory, ierss, ile, javascript, le, mk, moz-icon,
> ms-help, ms-msdt, ps, res, search, search-ms, shell, tps, ttp, ttps,
> vbscript, vnd.ms.radio, and file.

It is not relevant what Firefox support or not, as it is user
customizable option.

> Note that mid: is not listed.

User can set it.

> Suggestions welcome

Main suggestion would be to make interface for users to easy setup
those hyperlinks.

If user is supposed to adapt mind to programmer by setting this horror:
(info "(org) Adding Hyperlink Types")
that leads nowhere. Forget about "usability".

Customize interface is much better.

How about this in customize?

- prefix: pdf
- format %s&%s
- function to run: open-pdf

However, how it was programmed in Org in such demanding and boring
way. No wonder people complain for simple PDF opening by page number.

I am changing my mind, now I really think that it is better you hard
code those hyperlinks in Org as you said, that way you will get
functionality that users can still choose but need not be bothered by
programming.

1. For PDF there are not many PDF viewers that support opening by page
   number or query, so you could hard code it all. XPDF is so far best
   as it supports capturing in easy manner.

2. For mpv, vlc, you can open video and audio hyperlinks at specific
   place. I am using `mpv' package to capture video at exact point like this:

(defun hyperscope-capture-mpv-playback-position ()
  (interactive)
  (cond ((mpv-live-p)
 (mpv-pause)
 (let ((time (mpv-get-playback-position))
   ;; subtype?
   (name (rcd-ask-get "Name video position: ")))
   (cond (time (hyperscope-add-generic name hyperscope-mpv-played-video 
nil 3 nil 1 time))
 (t (rcd-warning-message "Could not get time for video play"
 (mpv-pause))
(t (rcd-warning-message "mpv not running"

which is very easy to convert to Org. Package `mpv' already supports
Org type Hyperlinks.

Summary for now, PDF, video, audio, plus all at exact location.

What about EPUB, DJVU, MOBI? 

- mupdf supports opening EPUB at specific page
- zathura will surely work with DJVU to open at specific page

Summary: PDF, EPUB, DJVU, video, audio, plus all at exact location.

I am using general "media" which can be either audio, or video, could be PDF or 
something else.

Message-ID, should support FOLDER+Message-ID

Is it possible to support Emacs bookmarks as hyperlinks? I would
include that.

xournalapp is software that I use, and RMS uses too I heard, it is
excellent for PDF editing. It has its own format and can open up also
by page number.

Geo location shall be supported, as it has already many handlers in
GNU/Linux, then GPX files, GeoJSON files

I have playlists as hyperlink, and other 100 different examples which
I do not consider immediately useful for Org.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Org cite in SQLite?

2023-01-25 Thread Thomas S. Dye

Aloha all,

The @ character in an Org citation seems to block import to an 
SQLite table.


Has anyone successfully imported an Org citation to an SQLite 
table?


All the best,
Tom

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



Re: [PATCH] Fix one remaining emacs-30 byte-compile warning

2023-01-25 Thread Arash Esbati
Robert Pluim  writes:

>> On Tue, 24 Jan 2023 10:29:17 +0100, Arash Esbati  said:
>
> I didnʼt miss it, it was next on my list,

Sorry for my wrong assumption here.

> Of course my fixes are incomplete, as Ihor has pointed out, so more
> work is needed there. 

I know why I volunteered for the change I suggested 

> Arash> +use it to set a major mode there, e.g.,
>
> I prefer ':' to ',' in such situations, but I donʼt recall what the
> official position is (if there is one).

-> git --no-pager grep "e.g.:$" | wc -l
13

-> git --no-pager grep "e.g.,$" | wc -l
49

':' would have been my preference my well.

Best, Arash



Re: [PATCH] Fix one remaining emacs-30 byte-compile warning

2023-01-25 Thread Arash Esbati
Ihor Radchenko  writes:

> Could you please write a full patch with commit message? See
> https://orgmode.org/worg/org-contribute.html#first-patch

Thanks for your response.  I hope I've got it right.

Best, Arash
>From c550ed05d29cf163c286cffc328e5860423c7cde Mon Sep 17 00:00:00 2001
From: Arash Esbati 
Date: Wed, 25 Jan 2023 16:34:42 +0100
Subject: [PATCH] lisp/ox.el: Pacify compiler warning

* lisp/ox.el (org-export-to-buffer): Escape single quote in the
example given in docstring.
Add missing '.' after the abbreviation.
---
 lisp/ox.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index ebf89bb..4c84686 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -6683,14 +6683,14 @@ see.
 Optional argument POST-PROCESS is a function which should accept
 no argument.  It is always called within the current process,
 from BUFFER, with point at its beginning.  Export back-ends can
-use it to set a major mode there, e.g,
+use it to set a major mode there, e.g.,
 
   (defun org-latex-export-as-latex
 ( async subtreep visible-only body-only ext-plist)
 (interactive)
 (org-export-to-buffer \\='latex \"*Org LATEX Export*\"
   async subtreep visible-only body-only ext-plist
-  #'LaTeX-mode))
+  #\\='LaTeX-mode))
 
 When expressed as an anonymous function, using `lambda',
 POST-PROCESS needs to be quoted.
-- 
2.39.1



Re: Link from orgmode file to E-Mail (using kmail or notmuch)

2023-01-25 Thread Max Nikulin

On 25/01/2023 00:49, Jean Louis wrote:

* Max Nikulin [2023-01-24 20:25]:

It reminds be complains by some person that Org must be able to recognize
any URL in free-form plain text just because there is a RFC describing
format of URL.


That person did not really propose to Org to do it, but to have Emacs
EWW to be customizable, so that any content type could be opened by
user's settings. You missed the point of it.


I had in mind another person:

Re: URLs with brackets not recognised. Wed, 12 May 2021 22:06:50 +0200.

I disagree. URLs are well-specified. Per RFC 3986, the characters
allowed in a URL are [A-Za-z0-9\-._~!$&'()*+,;=:@\/?]. Org mode should
implement proper URL detection, not asking its users "to give it some
hints" and using "a kind of heuristics". A string either is a valid URL
per the relevant RFCs or it is not.


You probably decided that I was writing about
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58774
[WISH]: Let us make EWW browse WWW Org files correctly

That is from my point of view is an excellent example how to bury a 
valid feature request "allow me to do" by aggressive demand "it must be 
by default" disregarding unresolved security issues and by adding more 
noise by discussion of unrelated stuff (should Org files have text/... 
or application/... mime type).


Back to the topic, URI handling packages have incompatible features. It 
is the reason why users have to had explicit configuration.





[PATCH] oc-natbib: Provide a fallback bibliography style

2023-01-25 Thread Ihor Radchenko

If we do not specify a bibliography style, LaTeX export will fail.
With the attached patch, the following simple-minded Org document will
export without errors:

 #+title: Testing org-cite \LaTeX export
 #+latex_header: \usepackage{natbib}
 #+bibliography: bibliography.bib
 #+options: toc:nil
 #+cite_export: natbib

 Hello World! This is a citation: [cite:@citationkey2023]

 #+print_bibliography:

Also, should we provide some commonly available natbib styles in the
defcustom?

>From f27e5b4f66b7e703f9b2fdaa5c1b5d756d38fd33 Mon Sep 17 00:00:00 2001
Message-Id: 
From: Ihor Radchenko 
Date: Wed, 25 Jan 2023 18:02:49 +0300
Subject: [PATCH] oc-natbib: Provide a fallback bibliography style

* lisp/oc-natbib.el (org-cite-natbib-bibliography-style): New custom
option for default bibliography style.
(org-cite-natbib-export-bibliography): Use the new custom option.
* etc/ORG-NEWS (New ~org-cite-natbib-export-bibliography~ option
defining fallback bibliography style): Document the new option.

If we do not specify a bibliography style, LaTeX export will fail.
After the patch, the following simple-minded Org document will export
without errors:

 #+title: Testing org-cite \LaTeX export
 #+latex_header: \usepackage{natbib}
 #+bibliography: bibliography.bib
 #+options: toc:nil
 #+cite_export: natbib

 Hello World! This is a citation: [cite:@citationkey2023]

 #+print_bibliography:
---
 etc/ORG-NEWS  | 10 ++
 lisp/oc-natbib.el | 21 -
 2 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 3ef76ec1a..04f6338a9 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -13,6 +13,16 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org.
 
 * Version 9.7 (not released yet)
 ** New options
+*** New ~org-cite-natbib-export-bibliography~ option defining fallback bibliography style
+
+~natbib~ citation export processor now uses
+~org-cite-natbib-export-bibliography~ (defaults to ~unsrtnat~) as a
+fallback bibliography style if none is specified by user in
+=#+cite_export:= keyword.
+
+Previously, export would fail without explicitly selected bibliography
+style.
+
 *** New options for the "csl" citation export processor's LaTeX output
 
 The ~org-cite-csl-latex-label-separator~ and
diff --git a/lisp/oc-natbib.el b/lisp/oc-natbib.el
index 855be2a5c..9153afd86 100644
--- a/lisp/oc-natbib.el
+++ b/lisp/oc-natbib.el
@@ -77,6 +77,15 @@ (defcustom org-cite-natbib-options nil
 (const :tag "redefine \\thebibliography to issue \\section* instead of \\chapter*" sectionbib)
 (const :tag "keep all the authors' names in a citation on one line" nonamebreak)))
 
+(defcustom org-cite-natbib-bibliography-style 'unsrtnat
+  "Default bibliography style."
+  :group 'org-cite
+  :package-version '(Org . "9.7")
+  :type
+  '(choice
+(const unsrtnat)
+(symbol :tag "Other")))
+
 
 ;;; Internal functions
 (defun org-cite-natbib--style-to-command (style)
@@ -143,11 +152,13 @@ (defun org-cite-natbib-export-bibliography (_keys files style  _)
   "Print references from bibliography FILES.
 FILES is a list of absolute file names.  STYLE is the bibliography style, as
 a string or nil."
-  (concat (and style (format "\\bibliographystyle{%s}\n" style))
-  (format "\\bibliography{%s}"
-  (mapconcat #'file-name-sans-extension
- files
- ","
+  (concat
+   (format "\\bibliographystyle{%s}\n"
+   (or style org-cite-natbib-bibliography-style))
+   (format "\\bibliography{%s}"
+   (mapconcat #'file-name-sans-extension
+  files
+  ","
 
 (defun org-cite-natbib-export-citation (citation style _ info)
   "Export CITATION object.
-- 
2.39.1


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


Re: [ANN] orgtbl-fit

2023-01-25 Thread tbanelwebmin

Hi Ihor & the List

GnuPlot is a great software. If you feel confortable with it, continue 
using it! If others are used to R or Python, that is fine too.


Orgtbl-fit may be useful if:

 * - You want a pure Emacs process, without external dependencies.
 * - You know that Emacs-Calc can fit your data, but you are not
   familiar with it.
 * - Your data is already available as an Org Mode table.
 * - You don't want to write a script (just point at the target column
   and type M-x orgtbl-fit, that's all).

Actually, orgtbl-fit is a bridge between Org Mode tables and Calc.

By the way, Org Mode table spreadsheet capabilities are also a bridge 
with Calc.


Examples & documentation can be read here:
https://github.com/tbanel/orgtblfit/blob/main/README.org

Have fun!


On 1/24/23 20:55, Ihor Radchenko wrote:

tbanelwebmin  writes:


The new orgtbl-fit package has just been released on Melpa. It
does regression fitting on Org Mode tables.

Example. We suspect that `obs' depends on `x' and `y'.
...

Let us put the cursor on the `obs' column, and type
M-x orgtbl-fit

Two columns are added
- predicted obs column
- difference between obs and predicted

|  x | y |  obs | Best Fit | Fit Diff |
|+---+--+--+--|
| 32 | 7 | 38.3 | 38.2 | -0.1 |
| 18 | 3 | 11.4 | 11.6 |  0.2 |
| 43 | 9 | 47.3 | 47.2 | -0.1 |
| 11 | 2 |  8.9 |  8.7 | -0.2 |
| 35 | 8 | 45.1 | 45.3 |  0.2 |
#+TBLFM: $4=-0.289267886829 - 1.06613976706*$1 + 10.3668885192*$2;
%.1f::$5=$4-$3; %.1f

Are there situations when this package is actually useful for data
analysis? (I am usually using gnuplot for fitting)






Re: Supporting non-free SQL clients in ob-sql (was: [PATCH] ob-sql: Add support for Athena)

2023-01-25 Thread Jean Louis
* Richard Stallman  [2023-01-25 07:32]:
> [[[ To any NSA and FBI agents reading my email: please consider]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> 
>   > > Would someone please tell me more concretely what kind of "support"
>   > > this is?
> 
>   > You can find interactive support in `sql' library, functions such as:
> 
>   > M-x sql-oracle 
> 
>   > which supports proprietary Oracle Database:
> 
> This raises two questions.
> 
> 1. For this purpose, what kind of thing is "the Oracle Database"?
> a. A library to link with?
> b. A program to run in a subprocess?

It is program that runs in a subprocess.

> c. A server running SaaSS?

Theoretically it could be as access may be network based. 

But according to my knowledge this product is proprietary and may be
downloaded and run on users' computer or network computers.

> 2. How does Emacs communicate with that thing?
> a. By function calls within a process?

Yes.

> b. Via shared memory?
> c. Via a pty or pipe?
> d. Via sockets?

By invoking proprietary program named "sqlplus" which function is
defined in library "sql.el" and by using comint-mode

(defcustom sql-oracle-program "sqlplus"
  "Command to start sqlplus by Oracle.

Starts `sql-interactive-mode' after doing some setup.

On Windows, \"sqlplus\" usually starts the sqlplus \"GUI\".  In order
to start the sqlplus console, use \"plus33\" or something similar.
You will find the file in your Orant\\bin directory."
  :type 'file)


(comint-mode)

Major mode for interacting with an inferior interpreter.
Interpreter name is same as buffer name, sans the asterisks.
Return at end of buffer sends line as input.
Return not at end copies rest of line to end and sends it.
Setting variable ‘comint-eol-on-send’ means jump to the end of the line
before submitting new input.

This mode is customized to create major modes such as Inferior Lisp
mode, Shell mode, etc.  This can be done by setting the hoo



In my opinion Emacs should not be invoking proprietary programs, and
distributing sql.el with Emacs opposes the principle of not
recommending proprietary software.

By having functions to run proprietary software from within Emacs we
are advertising proprietary software.


--
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: Org mode links: Open a PDF file at a given page and highlight a given string

2023-01-25 Thread Jean Louis
* AW  [2023-01-25 14:48]:
> Has this been done? I'm struggeling (again), how to link to a certain page of 
> a PDF, being opened in okular. 
> 
> ./link/xyz.pdf::123 does not open the pdf at p. 123

Simply do elisp: links with the below function:

[[elisp:(rcd-okular "/home/user/my-file" 2 "small percentage")][small 
percentage]]

(defun rcd-okular (file  page query-string)
  "Open `okular' on PDF FILE.

PAGE is optional page number
QUERY-STRING will be eventually found highlighted."
  (let* ((okular (executable-find "okular"))
 (args (list file))
 (args (if page (append (list "-p" (format "%s" page)) args) args))
 (args (if query-string (append (list "--find" query-string) args) 
args))
 (name "*Okular*")
 (buffer (generate-new-buffer-name name)))
(cond (okular
   (apply #'start-process name buffer okular args))
  (t (user-error "Program `okular' not found")

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: Supporting non-free SQL clients in ob-sql (was: [PATCH] ob-sql: Add support for Athena)

2023-01-25 Thread Ihor Radchenko
Tim Cross  writes:

> 3. There is no requirement to install non-free software to use
> ob-sql.el. The software is fully functional using a free RDMS like
> postgres.

Yes, but there is requirement to install in order to use ob-sql.el
__with :engine set to non-free option__.

So, I can envision that someone who decided to use ob-sql.el and
considering between free and non-free engine may prefer non-free one. Of
course, it is not very strong argument, but the boundaries are fuzzy in
this area.

> For maintenance reasons and to add session support, I would suggest that
> using sql.el instead of re-inventing this wheel would be a better
> outcome. I've used sql.el for years and it works extremely well and I
> don't htink it would be too hard to integrate into ob-sql.

Sure. That's what we usually do - just use whatever REPL is available
for a given ob-* language. Just a question of someone sending a patch.

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



Re: Supporting non-free SQL clients in ob-sql (was: [PATCH] ob-sql: Add support for Athena)

2023-01-25 Thread Tim Cross
Ihor Radchenko  writes:

> Tim Cross  writes:
>
>> to be very clear, ob-sql is not adding any NEW interface to any external
>> program. It is just using the Emacs built-in SQL library (Elisp), which
>> has been part of Emacs for a long time (I was using it in late 90s to
>> work with Oracle RDMS). It is this library that provides the 'support'
>> for things like Oracle's RDMS. If you want more specific information,
>> ask on emacs-devel. Org mode is just using this built-in library.
>
> This is wrong.
> `org-babel-execute:sql' directly calls the CLI executable via `process-file'.
>
> That said, the discussion about sql.el is also relevant wrt non-free SQL
> client support. It will be helpful to clarify what is morally acceptable
> for all the scenarios, not just for Org's use-case.
>
>> The Oracle database is simply a relational database management system in
>> the same way as Postgres, MySQL, Ingris, MS-Sql server etc. All of these
>> have a CLI client and support connections via JDBC. The sql.el library
>> provides specialised comint based interfaces which run the CLI to
>> communicate with the RDMS. The closest of your 3 choices is b, as the
>> build-in Emacs sql library executes the RDMS CLI in a sub-process comint
>> buffer.
>
> Org does not use this comint interface yet. We may in future though, for
> sessions:
>
> (defun org-babel-prep-session:sql (_session _params)
>   "Raise an error because Sql sessions aren't implemented."
>   (error "SQL sessions not yet implemented"))

OK, thanks the for correction. I was confused because the set of
supported RDBMS is the same as those supported by sql.el and the
connection credentials uses the same variable name
i.e. sql-connection-alist.

However, I gues the point remains, sql.el and ob-sql.el support a number
of non-free RDMS and I think this is fine given that

1. There is no encouragement, implicit or explicit, to use a non-free
database
2. Provided support provides a way to interact with these non-free RDMS using
free software.
3. There is no requirement to install non-free software to use
ob-sql.el. The software is fully functional using a free RDMS like
postgres.

For maintenance reasons and to add session support, I would suggest that
using sql.el instead of re-inventing this wheel would be a better
outcome. I've used sql.el for years and it works extremely well and I
don't htink it would be too hard to integrate into ob-sql.




Re: oeg-agenda-entry-text-mode

2023-01-25 Thread tomas
On Wed, Jan 25, 2023 at 01:24:56PM +, Ihor Radchenko wrote:
> David Masterson  writes:
> 
> > Ooh!  Found org-agenda-entry-text-exclude-regexp!  It's so close to what
> > I want.  With it, I can delete everything on a line that I don't want to
> > be displayed with org-agenda-entry-text-mode.  But I can't get rid of
> > the line, so I wind up with blank lines where the log would've been.
> 
> You can. Just include newline into your regexp.

If you are entering it interactively into the minibuffer, that's
CTRL-J (in a terminal you might have to do CTRL-Q CTRL-J).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [PATCH] Fix one remaining emacs-30 byte-compile warning

2023-01-25 Thread Robert Pluim
> On Tue, 24 Jan 2023 10:29:17 +0100, Arash Esbati  said:

Arash> Hi all,
Arash> Robert sent a patch[1] which pacifies emacs-30 compiler warning.  He
Arash> missed one which is fixed by the patch below.  It is against org-mode
Arash> master (6b15897a56).

I didnʼt miss it, it was next on my list, since I didnʼt want to mix
different types of fixes in the same commit. Of course my fixes are
incomplete, as Ihor has pointed out, so more work is needed there. 

Arash> +use it to set a major mode there, e.g.,

I prefer ':' to ',' in such situations, but I donʼt recall what the
official position is (if there is one).

Robert
-- 



[TODO] Document org-forward-element and org-backward-element in the manual (was: missing from the manual)

2023-01-25 Thread Ihor Radchenko
Peter Mao  writes:

> Dear maintainers,
>
> The following commands are missing from the manual!
>
> org-forward-element
> org-backward-element
>
> These two should be mentioned in the manual in section 2.3 "Motion"

I think we all agreed that it will be a welcome addition.
This also sounds like something others can easily contribute by editing
doc/org-manual.org. Patches welcome!

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



Re: oeg-agenda-entry-text-mode

2023-01-25 Thread Ihor Radchenko
David Masterson  writes:

> Ooh!  Found org-agenda-entry-text-exclude-regexp!  It's so close to what
> I want.  With it, I can delete everything on a line that I don't want to
> be displayed with org-agenda-entry-text-mode.  But I can't get rid of
> the line, so I wind up with blank lines where the log would've been.

You can. Just include newline into your regexp.

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



Re: Babel (scheme): Evaluation errors are not shown

2023-01-25 Thread Ihor Radchenko
Marc Nieper-Wißkirchen  writes:

>> > Rebased against the latest main.  Please see the appended patch.

Applied, onto main, adding TINYCHANGE cookie and removing "." from the
commit summary.

https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f35fb8ac2

You are now also listed as Org contributor:
https://git.sr.ht/~bzg/worg/commit/4f193b43

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



[FR] Should Org provide commonly used link types? (was: Link from orgmode file to E-Mail (using kmail or notmuch))

2023-01-25 Thread Ihor Radchenko
Jean Louis  writes:

> You see, Org is part of Emacs, me I expect that when I follow Emacs
> Instructions that Org will be using Emacs settings, but it follows
> it's own settings.
>
> I mean these settings:
>
> browse-url-handlers is a variable defined in ‘browse-url.el’.
>
> Its value is
> (("gemini:" . elpher-go)
>  ("gopher:" . elpher-handler-go)
>  ("about:" . hyperscope-about)
>  ("mid:" . my-handler)
>  ("hyperscope:" . hyperscope-url)
>  ("e2dk://" . amule-handler))
> Original value was nil

I do not mind adding several useful link protocols. But which ones?

Org cannot just treat arbitrary [[foo:bar]] as links because it will
break internal link references like

[[ref:one]]
<>

So, we cannot just say: use `browse-url' when the link type is known.
The link types in Org are a closed list.

What we can do is add some more known link types. Some of them will use
`browse-url' as :follow link parameter.

However, what are the link types which are worth including into the Org
code? I am looking into the protocols supported by Firefox now.
They are: mailto, news, nntp, snwes, afp, data, disk, disks, hcp, htp,
htps, http, iehistory, ierss, ile, javascript, le, mk, moz-icon,
ms-help, ms-msdt, ps, res, search, search-ms, shell, tps, ttp, ttps,
vbscript, vnd.ms.radio, and file.

Note that mid: is not listed.

Suggestions welcome. Probably, we can at least support the protocols
available via Emacs packages (e.g. notmuch does support mid: links).

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



Re: Link from orgmode file to E-Mail (using kmail or notmuch)

2023-01-25 Thread Max Nikulin

On 25/01/2023 00:32, Bruno Barbier wrote:


I'm using an extension for Thunderbird that allows to copy a direct link to a
message. I then paste it into a org file so that I can reopen the
message in one click:

https://camiel.bouchier.be/en/cb_thunderlink


Perhaps I found this add-on too early. I had a look into its code and 
decided to find another way. Another point is that I prefer to have 
Message-ID in links not obscured. Fortunately I noticed the issue 
dedicated to "mid:" in the bug tracker.


Some minor inconveniences exist, but I do not plan to discard mid: 
links. E.g. I can easily convert links to messages in this list between 
mid: and https://list.orgmode.org/


I decided that it should be convenient to have links from thunderbird to 
my notes. A proof of concept:


https://github.com/maxnikulin/orco/

Max Nikulin to emacs-orgmode. Org Column in Thunderbird. Wed, 8 Jun 2022 
20:11:33 +0700. https://list.orgmode.org/t7q766$m5k$1...@ciao.gmane.io


If Message-ID still can be decoded from cb_thinderlink URIs than it 
should be possible adapt orco to handle such links as well.





Re: Supporting non-free SQL clients in ob-sql (was: [PATCH] ob-sql: Add support for Athena)

2023-01-25 Thread Ihor Radchenko
Tim Cross  writes:

> to be very clear, ob-sql is not adding any NEW interface to any external
> program. It is just using the Emacs built-in SQL library (Elisp), which
> has been part of Emacs for a long time (I was using it in late 90s to
> work with Oracle RDMS). It is this library that provides the 'support'
> for things like Oracle's RDMS. If you want more specific information,
> ask on emacs-devel. Org mode is just using this built-in library.

This is wrong.
`org-babel-execute:sql' directly calls the CLI executable via `process-file'.

That said, the discussion about sql.el is also relevant wrt non-free SQL
client support. It will be helpful to clarify what is morally acceptable
for all the scenarios, not just for Org's use-case.

> The Oracle database is simply a relational database management system in
> the same way as Postgres, MySQL, Ingris, MS-Sql server etc. All of these
> have a CLI client and support connections via JDBC. The sql.el library
> provides specialised comint based interfaces which run the CLI to
> communicate with the RDMS. The closest of your 3 choices is b, as the
> build-in Emacs sql library executes the RDMS CLI in a sub-process comint
> buffer.

Org does not use this comint interface yet. We may in future though, for
sessions:

(defun org-babel-prep-session:sql (_session _params)
  "Raise an error because Sql sessions aren't implemented."
  (error "SQL sessions not yet implemented"))

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



Re: Org mode links: Open a PDF file at a given page and highlight a given string

2023-01-25 Thread Max Nikulin

On 25/01/2023 18:46, AW wrote:

Has this been done? I'm struggeling (again), how to link to a certain page of
a PDF, being opened in okular.

./link/xyz.pdf::123 does not open the pdf at p. 123


It is still at the stage of proof of concept. Currently you need to 
adjust your init.el, see


Max Nikulin. Sat, 3 Sep 2022 20:00:47 +0700. 
https://list.orgmode.org/tevj61$17d8$1...@ciao.gmane.io


and the `org-file-apps' docstring.



Re: [BUG] Org citations do not render in tables [9.5.5 (9.5.5-g8ef620 @ /home/stas/.emacs.d/straight/build/org/)]

2023-01-25 Thread Ihor Radchenko
Stanislav Vlasov  writes:

> #+BEGIN_SRC emacs-lisp :results table replace
> "Prior research [cite:@paper] suggests that..."
> #+END_SRC
>
> #+RESULTS:
> | Prior research suggests that... |
>
> The expected outcome should be:
>
> #+RESULTS:
> | Prior research [cite:@paper] suggests that... |
>
> It seems that this does not depend on src language (I have also tried with R 
> and got the same issue).

Confirmed.

The problem is rather fundamental one.

Citation processing is supposed to be independent from the export
backends. However, `orgtbl-to-generic' is bypassing the citation
processing and calls `org-export-data-with-backend` directly with ox-org
backend not handling citation objects.

There are multiple issues revealed here:
1. ox.el currently treats missing transcoder info as "export all the
   unknown elements/objects and empty strings" - this is rather
   forward-incompatible design that may catch users by surprise when Org
   adds new syntax elements (as it happened here, with citations)

   May ox.el treat missing transcoders as `identity' and only export
   empty string when transcoder is set to nil explicitly?

2. Does it even make sense to apply the default oc-basic when exporting
   to org? Should we instead introduce something like oc-identity that
   does nothing and simply leaves the citations in the original Org
   syntax, later possibly processed by the specific export backend?
   Then, we can use this oc-identity in the default value of
   `org-cite-export-processors': (org identity)?

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



Re: [BUG] updates.orgmode.org returns 502 Bad Gateway

2023-01-25 Thread Ihor Radchenko
em...@s.ptr.dev writes:

> Hi all, I'm trying to find the RSS feed for org-mode, which I expect to
> live in updates.orgmode.org (as mentioned in the first line of [1]).
> Unfortunately, the nginx server is misconfigured (or something) and
> returns a "502 Bad Gateway" error.
>
> This is not a software bug, but I'm not sure where else to report this.

This is the right place to report this.
CCing Bastien.

FYI, we are upgrading the software behind updated.orgmode.org with old
version being broken (completely, now) and new version not yet ready for
production (AFAIK).

Maybe Bastien has more to say. He is developing Woof! - software we used
to provide mailing list summaries.

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



Re: orgmode website contributions to translations? -- Was: It's possible, to translate the org-mode website into Spanish?

2023-01-25 Thread Ihor Radchenko
Ruijie Yu via "General discussions about Org-mode."
 writes:

> This intrigues me as well.  I would like to extend this question into a
> more general one: how does one contribute translations to an existing
> language, and/or to a new language?

CCing Bastien.

The main issue with non-English translations is maintenance. As you
noticed, English and non-English pages are already out of sync.

We need some better way to maintain translations. For example, we may
maintain a checksum of the translation vs. original English version
per-paragraph or per-section. Then, we can automate export for
non-English pages that will only use the translations that correspond to
the originally translated paragraphs and fall back to English otherwise.

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



Re: CSL export not using local #+bibliography:

2023-01-25 Thread Ihor Radchenko
Britt  writes:

> I reported the following as an issue to citeproc, but was advised by the
> library maintainer to report it here instead.
>
> The problem is summarized in the subject line.
>
> I set ~org-cite-global-biography~ in my init.el.
>
> I then write a file for export with ~org-publish~ to html and where the
> org file has in the header ~#+bibliography:
> "path-to-different-bib-file.bib"~ I can C-c C-c and am told that the
> local environment has been updated, but when I export with
> ~org-publish-project~ the bib file being used is still the global one.
> I have to manually ~setq~ the global bib to get the correct file used at
> export.

Thanks for reporting!
May you include a minimal example demonstrating the problem?
See https://orgmode.org/manual/Feedback.html#Feedback

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



Re: [PATCH] Fix one remaining emacs-30 byte-compile warning

2023-01-25 Thread Ihor Radchenko
Arash Esbati  writes:

> Robert sent a patch[1] which pacifies emacs-30 compiler warning.  He
> missed one which is fixed by the patch below.  It is against org-mode
> master (6b15897a56).

Thanks!
Could you please write a full patch with commit message? See
https://orgmode.org/worg/org-contribute.html#first-patch

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



Re: Org mode links: Open a PDF file at a given page and highlight a given string

2023-01-25 Thread Ihor Radchenko
AW  writes:

>> I understand your idea. What I am suggesting is to implement support for
>> a subset of popular viewers (the Libre ones) and add it to Org core.
>> Support for non-Libre viewers could be added ad third-party packages
>> based on the Org core implementation.
>> 
>
> Has this been done? I'm struggeling (again), how to link to a certain page of 
> a PDF, being opened in okular. 
>
> ./link/xyz.pdf::123 does not open the pdf at p. 123

Patches welcome :)

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



Re: [BUG] HTML-export citation suffix rendering with CSL [9.6 (9.6-??-bed47b437 @ /home/romeo/.emacs.d/.local/straight/build-28.2.50/org/)]

2023-01-25 Thread Ihor Radchenko
Romeo Valentin  writes:

> To reproduce, please download the .org and .bib file (place .bib in
> /tmp), run org-html-export-to-html, and open the file e.g. with a browser.
> Notice that the citations, in particular the suffixes, are rendered 
> incorrectly.

Confirmed, after replacing the .bib key with abnarQuantifyingAttentionFlow2020a.

András, may you take a look?

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



Re: Org mode links: Open a PDF file at a given page and highlight a given string

2023-01-25 Thread AW
Am Mittwoch, 21. September 2022, 10:18:41 CET schrieb Ihor Radchenko:
> Max Nikulin  writes:
> >> I think that it is a very good idea for Org core to support search terms
> >> in file links that are handled by Free Software.
> > 
> > Maybe I misunderstand something, but your stress on Free Software here
> > surprised me. I did not mention explicitly any proprietary application
> > such as Adobe Reader. On the other hand support of Chromium (that is
> > free) unavoidably assumes Google Chrome and likely MS Edge with other
> > derived products with same customization as chromium vs.
> > chromium-browser command name discrepancy in Linux distros.
> 
> I was referring to GPL-compatible software.
> If we have better integration with Libre/Free Software, it is suitable
> for Org core. IMHO.

[...]

> > I am considering a single package, something like org-pdfviewer, that
> > has definitions for all popular viewers: evince, okular, firefox,
> > chromium, etc. I believed that user should explicitly configure
> > preferred viewer by either adding an entry with supplied function to
> > `org-file-apps' or this package has its own defcustoms and the entry
> > injected to some variable as you suggested in
> > Ihor Radchenko. Re: [PATCH v2] org.el: Fix percent substitutions in
> > `org-open-file' Mon, 05 Sep 2022 13:46:41 +0800.
> > https://list.orgmode.org/875yi2xtj2.fsf@localhost
> > 
> > The point of defcustoms in the package instead of (or in addition to)
> > `org-file-apps' is that evince and okular support more formats than PDF.
> 
> I understand your idea. What I am suggesting is to implement support for
> a subset of popular viewers (the Libre ones) and add it to Org core.
> Support for non-Libre viewers could be added ad third-party packages
> based on the Org core implementation.
> 


Has this been done? I'm struggeling (again), how to link to a certain page of 
a PDF, being opened in okular. 

./link/xyz.pdf::123 does not open the pdf at p. 123





orgmode website contributions to translations? -- Was: It's possible, to translate the org-mode website into Spanish?

2023-01-25 Thread General discussions about Org-mode.


Antonio Simón  writes:

> Greetings from Spain.
>
> I'm a newbie in the FOSS world and a big fan of Emacs and org-mode in which 
> I'm taking my first steps.
>
> I have seen that the Org mode page is available in several languages, and 
> Spanish is not one of them.
>
> I was thinking of contributing my time to the project by developing the 
> Spanish version of the site, if you find it useful.
>
> If you accept this collaboration I would need a small list of the tools and 
> procedures to use, to ensure that I'm competent with them.
>
> Thank you for your patience, I look forward to hearing from you.
>
> Regards,
>
> ___
> Antonio Simón (Quijote)

This intrigues me as well.  I would like to extend this question into a
more general one: how does one contribute translations to an existing
language, and/or to a new language?

Also, two small nitpicks:

1. The Japanese version has the following lines that are not translated:

> Install via GNU ELPA: M-x package-install RET org RET
> Download: git clone git://git.sv.gnu.org/emacs/org-mode.git
> Bug reports: emacs-orgmode@gnu.org
> Org project: https://sr.ht/~bzg/org

2. The English version does not have the equivalent snippet above.

Best,


RY



It's possible, to translate the org-mode website into Spanish?

2023-01-25 Thread Antonio Simón

Greetings from Spain.

I'm a newbie in the FOSS world and a big fan of Emacs and org-mode in 
which I'm taking my first steps.


I have seen that the Org mode page  is 
available in several languages, and Spanish is not one of them.


I was thinking of contributing my time to the project by developing the 
Spanish version of the site, if you find it useful.


If you accept this collaboration I would need a small list of the tools 
and procedures to use, to ensure that I'm competent with them.


Thank you for your patience, I look forward to hearing from you.

Regards,

___
/*Antonio Simón (Quijote)*/

Re: [Bug] 'org-font-lock-extra-keywords' appear next to the parent heading when its subtree is folded.

2023-01-25 Thread Philipp Kiefer

On 24.01.2023 18:56, Ihor Radchenko wrote:

Philipp Kiefer  writes:


You set 'invisible text property to nil, which tells Emacs - make the
text visible. Emacs obeys.

Well, with Orgmode version 9.5, Emacs was never *this* obedient, i. e.
this problem only began after I updated Orgmode to 9.6, which is why I
considered it a bug in the first place. I am aware I have set the
keywords to be visible but would not expect them to appear at the end of
the parent heading for a folded subtree! (see the screenshots and the
explanatory .org file). Showing them there does not make any sense in my
opinion. I would expect Orgmode to hide these keywords when they are in
a collapsed subtree, regardless of the 'invisible text' setting, which
is how it was handled pre 9.6 unless I'm much mistaken.

Org may or may not do it, depending on the implementation details.
What you are seeing is because we changed the way Org is folding text to
use text properties instead of overlays (see
https://orgmode.org/Changes.html).

You may get the old behavior back by (1) Setting
`org-fold-core--optimise-for-huge-buffers' to '(grab-invisible); (2)
Setting `org-fold-core-style' to 'overlays before loading Org.

Thank you very much, that fixed it for me.

I do not consider what you report as a bug. There were ways to break Org
folding in the past (for example, by using overlays with high priority).
Actually, I am not sure why you even need to set 'invisible to nil in
your font-lock-keywords.
I chose this option to make it easier to remove emphasis markers but 
have now set up functions to do this for me automatically and have set 
'invisible to true.




Re: Supporting non-free SQL clients in ob-sql (was: [PATCH] ob-sql: Add support for Athena)

2023-01-25 Thread Tim Cross
Richard Stallman  writes:

> [[[ To any NSA and FBI agents reading my email: please consider]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > > Would someone please tell me more concretely what kind of "support"
>   > > this is?
>
>   > You can find interactive support in `sql' library, functions such as:
>
>   > M-x sql-oracle 
>
>   > which supports proprietary Oracle Database:
>
> This raises two questions.
>
> 1. For this purpose, what kind of thing is "the Oracle Database"?
> a. A library to link with?
> b. A program to run in a subprocess?
> c. A server running SaaSS?
>

None of the above!

Richard,

to be very clear, ob-sql is not adding any NEW interface to any external
program. It is just using the Emacs built-in SQL library (Elisp), which
has been part of Emacs for a long time (I was using it in late 90s to
work with Oracle RDMS). It is this library that provides the 'support'
for things like Oracle's RDMS. If you want more specific information,
ask on emacs-devel. Org mode is just using this built-in library.

The Oracle database is simply a relational database management system in
the same way as Postgres, MySQL, Ingris, MS-Sql server etc. All of these
have a CLI client and support connections via JDBC. The sql.el library
provides specialised comint based interfaces which run the CLI to
communicate with the RDMS. The closest of your 3 choices is b, as the
build-in Emacs sql library executes the RDMS CLI in a sub-process comint
buffer.