Re: Differentiating org element properties from built-ins?

2024-09-22 Thread tomas
On Sun, Sep 22, 2024 at 05:15:25PM +, Ihor Radchenko wrote:
>  writes:
> 
> > I do see foo and bar (well, OK, :FOO and :BAR) with their values, but lots
> > of other (let's call them "built-ins") like :begin and :post-affiliated.
> >
> > How do I keep those apart? Or do I have to resort to running regexps through
> > the buffer?
> 
>(defun org-element-headline-parser (&optional _ raw-secondary-p)
>  "Parse a headline.
> 
>Return a new syntax node of `headline' type containing `:raw-value',
>`:title', `:begin', `:end', `:pre-blank', `:contents-begin' and
>`:contents-end', `:level', `:priority', `:tags', `:todo-keyword',
>`:todo-type', `:scheduled', `:deadline', `:closed', `:archivedp',
>`:commentedp' `:footnote-section-p', `:post-blank' and
>`:post-affiliated' properties.
> 
>The plist also contains any property set in the property drawer,
>with its name in upper cases and colons added at the
>beginning (e.g., `:CUSTOM_ID').
> 
> So, properties from the property drawer are always upcased.

Thanks for that, Ihor

I ended up regexping my was through (which brought about some other
advantages with it; I'm using those props to communicate with other
things outside, and there, keeping the keys's cases is a nice-to-have).

Actually, the case treatment of property names is one of the most
acute pain points in Org for me, but this ship has sailed :-)

Cheers & thanks again for your help.
-- 
tomás


signature.asc
Description: PGP signature


Differentiating org element properties from built-ins?

2024-09-17 Thread tomas
Hi, Orgxperts

assume I have something like this:

** Some heading
   :properties:
   :foo: some value for foo
   :bar: some value for bar
   :end:

Now, when I do

  (org-element-properties-mapc
(lambda (k v) (message "%s -> %s" k v))
(org-element-at-point))

I do see foo and bar (well, OK, :FOO and :BAR) with their values, but lots
of other (let's call them "built-ins") like :begin and :post-affiliated.

How do I keep those apart? Or do I have to resort to running regexps through
the buffer?

Cheers & thanks
-- 
tomás


signature.asc
Description: PGP signature


Re: Unsubscribe

2024-09-02 Thread tomas
On Mon, Sep 02, 2024 at 10:47:53PM +, Helly, John wrote:
> unsubscribe

Unsubscribe yourself :-)

No, seriously. You want to send this mail to 
with the subject "unsubscribe". That will work.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Issue opening files with accented words, using org-attach-open

2024-08-05 Thread tomas
On Mon, Aug 05, 2024 at 08:44:29PM +, Kepa wrote:
> Funny: the path was p:/170 Buzon/oq.pdf, where the "o" was accentuated: 
> https://en.m.wikipedia.org/wiki/%C3%93

Perhaps relevant:

 - what file systems are on each of those drives? NTFS? some Linux?
   (Background: most Unix/Linux file systems consider file names
   as strings of bytes. What encoding /characters/ have there is
   up to the application [1]; NTFS has UTF-16 encoded Unicode, although
   if you access it with POSIX fopen(), it gets translated to UTF-8).

 - what applications do you access "normally" the "drive" which is
   showing the problem? What did you create the file with?

Cheers

[1] typically to the process's locale's encoding which creates/accesses
   it. Lots of fun when they're not consistent :-)

-- 
t


signature.asc
Description: PGP signature


Re: Issue opening files with accented words, using org-attach-open

2024-08-05 Thread tomas
On Mon, Aug 05, 2024 at 09:04:19AM +, Kepa wrote:
> Hi
> 
> Accentuated characters are in the path and in the file name.
> 
> It seems windows can't find the file, because emacs sends the accentuated 
> characters substituted.
> 
> As said before, this doesn't happen with Dired.

I guess this is an encoding thing. Since I haven't a Windows box, I
can't test :-(

Possibly org-attach-open isn't realizing that it needs to
treat paths differently on Windows.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Issue opening files with accented words, using org-attach-open

2024-08-04 Thread tomas
On Sun, Aug 04, 2024 at 08:37:32PM +, Kepa wrote:
> Hi
> 
> I'm encountering an issue when trying to open a file using org-attach-open 
> from org-attach. The problem occurs when the file name, or file path, contain 
> words with accents.
> Windows OS sends me this error:
> Error code: 0x80070002
> The system cannot find the file specified.

I can't help directly: trying to help to help: the accented characters are in
the file name, not in the content?

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Please document the caching and its user options

2024-06-18 Thread tomas
On Wed, Jun 19, 2024 at 12:06:42AM +0200, Rudolf Adamkovič wrote:
> Ihor Radchenko  writes:
> 
> > Can we instead store them in memory? Yes, but (1) it will make Emacs RAM
> > consumption grow constantly and more and more previews are generated;
> > (2) it will require significant changes in the Org mode codebase.
> 
> And, (3) all previews would be lost every time one shuts down their
> computer, say for the night, or even restarts Emacs, which would be
> terrible experience.

I was one of those clamouring for a "master switch". I'm aware of all
of that. I can live with that (not everyone will, that's why it should
be optional).

I arrived at the impression that the discussion was becoming unproductive,
that's why I gave up and went with the non-existing directory trick.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Asynchronous blocks for everything (was Re: [BUG] Unexpected result when evaluating python src block asynchronously [9.7-pre (release_9.6.17-1131-gc9ed03.dirty @ /home/yantar92/.emacs.d/straight/b

2024-02-20 Thread tomas
On Tue, Feb 20, 2024 at 11:00:28AM +, Ihor Radchenko wrote:
>  writes:

[...]

> > You "just" [1] need a way of stating dependencies :-)

[...]

> Let's not jump into this rabbit hole yet before we have async code
> working for less complicated scenarios.

:-)

My take is: it's never too early to *think* about it (and to have
a look what others are doing), but it might yet be too early to
design something.

Other than that... rabbit holes is what makes things interesting.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Asynchronous blocks for everything (was Re: [BUG] Unexpected result when evaluating python src block asynchronously [9.7-pre (release_9.6.17-1131-gc9ed03.dirty @ /home/yantar92/.emacs.d/straight/b

2024-02-20 Thread tomas
On Tue, Feb 20, 2024 at 10:28:06AM +, Ihor Radchenko wrote:
> Matt  writes:
> 
> > The blub implementation has the same shortcomings, at least for shells, as 
> > the current shell implementation.  It has a few ideas, such as everything 
> > being asynchronous and completely removing the prompt, that may prove 
> > useful for improving Babel generally.  The blub implementation is also 
> > simpler than related parts of Babel and may be useful for figuring out ways 
> > to solve the currently known shortcomings.  If you run into an error during 
> > execution, you will need to call (setq my-org-babel-comint--async-uuid nil).
> 
> Doing everything asynchronously is not always desired.
> Consider, for example,
> 
> #+begin_src bash
> echo "Contents" > /tmp/tmpfile
> #+end_src bash
> 
> #+begin_src bash
> cat /tmp/tmpfile # I must run after /tmp/tmpfile is created!
> #+end_src

You "just" [1] need a way of stating dependencies :-)

Cheers

[1] In quotes, because this opens a vast space of interesting
   and strange worlds. The functional folks have their monads,
   the compiler backend builders have their dependency graphs.
   Definitely doable, but treading with care will be helpful
   to not step into a mess :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: An academic journal entirely made in Org-Mode

2024-01-29 Thread tomas
On Mon, Jan 29, 2024 at 08:03:36PM +, Juan Manuel Macías wrote:
> Hi,
> 
> In last December, issue 23 of the "Revista de Estudios Latinos" (Journal
> of Latin Studies) was published, sponsored by the Spanish Society of
> Latin Studies. It is designed and produced by me using Org-Mode,
> Org-Publish and LuaTeX. If anyone is interested in the code I used for
> specific aspects of the publication, I can share it here :-).

Very nice, thanks :)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [PATCH] Fix warning about using `eq' to compare strings.

2023-11-01 Thread tomas
On Wed, Nov 01, 2023 at 11:29:23AM -0500, Karl Fogel wrote:

> [...] (which I guess is better than licking my
> laurels and resting on my wounds).

Don't underestimate Medirerranean cooking. Laurels can be...
yummy :)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Preferred posting style

2023-11-01 Thread tomas
On Wed, Nov 01, 2023 at 08:32:44AM +0100, Loris Bennett wrote:

[...]

> Assuming the quoting of previous postings works (above there seems to be
> a discrepancy between '>>' and '> >', although Gnus seems to handle
> that),  is there some sort of 'bottom-postify' command which would
> reorder the quotes?  I occasionally do this by hand if I find the text
> makes no sense to me otherwise.

ISTR there was something, not in the Emacs context, alas, and before
the First Internet Supernova (aka roughly Y2K, when Google had the
choice to either go bust or go evil).

I guess it won't work, since proper "bottom posting" is a bit more
than just putting the whole kaboodle above and your two lines below. 

It takes some involvement on the responder's side to pick and choose
the parts of the message she's addressing in the response.

Perhaps, with a large language model...

More seriously: those are simply different cultures. I strongly doubt
you can bridge that with "just" a technical device (although it may
help sometimes).

Cheers
-- 



signature.asc
Description: PGP signature


Re: Preferred posting style

2023-11-01 Thread tomas
On Tue, Oct 31, 2023 at 08:58:32PM -0700, David Masterson wrote:
> yaxp  writes:
> 
> > Hello,
> >
> > Which posting style is preferable in this list?
> >
> > Top or Bottom.
> 
> A decades old argument.  Top makes it easier for many mail readers to
> slice off all the previous thread history (which the reader has in
> previous messages).  Bottom makes it easier to have thread context in
> the message,
> 
> Most Emacs related mailing lists / newsgroups prefer bottom.

Let me add that top posting, while it might kind-of-work for personal
mail breaks down spectacularly in mailing lists.

A mixture of both is worse,of course :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: What is the purpose of \\ in org-add-note?

2023-10-29 Thread tomas
On Sun, Oct 29, 2023 at 07:01:53PM -0700, Karthik Chikmagalur wrote:
> > It ensures a line break (say, when the document is exported). From the
> > [[info:org#Paragraphs][org#Paragraphs]] section in the manual:
> >
> > #+begin_quote
> > Paragraphs are separated by at least one empty line.  If you need to
> > enforce a line break within a paragraph, use ‘\\’ at the end of a line.
> > #+end_quote
> 
> Good to know, thank you.

It is stolen from LaTeX, see,e.g. [1].

(it was difficult to find a ref which is *not* stackoverflow
and its ilk, sigh)

Cheers

[1] http://www.emerson.emory.edu/services/latex/latex_101.html#SEC101
-- 
t


signature.asc
Description: PGP signature


Re: [FR] org-num-mode inverse defaults

2023-10-16 Thread tomas
On Mon, Oct 16, 2023 at 08:39:14PM +0200, Maske wrote:
> Hi Ihor
> 
> I added: (setq org-global-properties '(("UNNUMBERED" . "t")))

This Elisp code has to be evaluated. Just adding it in an Org
file won't do that.

Where did you add it,and how?

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Suggestions for Text-To-Speech (TTS) from Org sources?

2023-09-11 Thread tomas
On Mon, Sep 11, 2023 at 09:52:30AM -0400, Jude DaShiell wrote:
> Why does this happen?
> 
> The gpg command given in the faq does not return what the faq claims will
> be returned.
> Look for the public key of Klaus Knopper:
> bash: Look: command not found
> bash-5.1$  gpg --keyserver pool.sks-keyservers.net --search-keys "Klaus
> Knopper"

Hm. Keyservers seem to be a dying species these days. Try

  --keyserver hkp://keyserver.ubuntu.com/

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Suggestions for Text-To-Speech (TTS) from Org sources?

2023-09-11 Thread tomas
On Mon, Sep 11, 2023 at 08:06:34AM -0400, Jude DaShiell wrote:
> fenrir-screenreader is also available.
> https://nashcentral.duckdns.org/projects/Jenux
> uses fenrir by default.
> Klaus Knopper's public key I haven't been able to find and none of his
> email addresses seem to be working any longer either for the ones I found.

The knoppix signing keys seem to be around here:

  http://ftp.knoppix.net/wiki/Downloading_FAQ

> You have a chance of getting a good version of knoppix if you download
> with a good bittorrent client and make sure your encryption required is
> turned on and make sure of integrity checks.

Look here:

  http://knoppix.net/

...and consider buying a CD (yes, that's still a thing ;-) or a stick
to support development.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [POLL] Should we accept breaking changes to get rid of Org libraries that perform side effects when loading?

2023-08-24 Thread tomas
On Thu, Aug 24, 2023 at 01:29:22PM +, Ihor Radchenko wrote:
>  writes:
> 
> >>
> >><...>
> >
> > Ah... it would be nice if Org could "go up one level",
> > wouldn't it?
> 
> What do you mean?

Not proposing to change anything, Org is what it is. Org's "sections"
are somewhat stepchildren, since the primary structure is the heading.

As a consequence, you "close" a section by "opening" a new one; if
you start a subsection, you can't end it "going back" to the enclosing
section: express this in Org:

  
this is some text in the main section
More text


(FWIW I cop out of this by declaring that a section name of - means
"going up" like so:

  * Main Section
this is some text in the main section
More text
  ** A Subsection
 Some text therein
  * -
Now we are "back" in the main section

(Note that here, the "-" gets one star, i.e. the level we are going
back to: this way, most things work as they should; and it is not
too hard to hack exporters to do the right thing :)

Back to the case in question: Someone proposed intercalating a
subsection instead of using an inline task, which would work
if there were a way of "closing" that subsection; otherwise the
idea messes with the document structure.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [POLL] Should we accept breaking changes to get rid of Org libraries that perform side effects when loading?

2023-08-24 Thread tomas
On Thu, Aug 24, 2023 at 02:36:31PM +0200, Bastien Guerry wrote:
> Ihor Radchenko  writes:
> 
> > ** Section X
> >
> > 
> >
> > 
> > <...>
> > 
> > <...>
> > 
> > <...>
> >
> > *** TODO Task for paragraph N
> >
> > Then, if I jump to the TODO, for example, from agenda view, I still need
> > to somehow find  location, which is awkward when the
> > section has multiple screens of text.
> 
> And what about this?
> 
>** Section X
>
>
>
>
><...>
>
>*** TODO Task for paragraph N
>
>
><...>
>
><...>

Ah... it would be nice if Org could "go up one level",
wouldn't it?

;-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: New Orgmode LaTex Document Class ?

2023-08-02 Thread tomas
On Wed, Aug 02, 2023 at 09:53:27AM -0700, David Masterson wrote:
>  writes:

[...]

> >   tomas@trotzki:~$ apt-file search latex-doc-ptr.pdf

[...]

> Ah!  That's the problem -- I didn't have texlive-lang-english installed!
> I also didn't know about 'apt-file search' -- useful command!

  sudo apt-get install apt-file

I couldn't live without :-)

> 'texdoc latex' now works for me.

good to hear.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: New Orgmode LaTex Document Class ?

2023-08-02 Thread tomas
On Tue, Aug 01, 2023 at 11:28:32PM -0700, David Masterson wrote:

[...]

> Hmm.  For me 'texdoc -l latex' in a shell showed me this:
> 
>  1 /usr/share/texlive/texmf-dist/doc/luatex/luaotfload/luaotfload-latex.pdf
>  2 /usr/share/texlive/texmf-dist/doc/support/light-latex-make/llmk.pdf
>  3 /usr/share/texlive/texmf-dist/doc/support/latex-papersize/README
>= Readme
>  4 /usr/share/texlive/texmf-dist/doc/support/latex-git-log/README.md
>  5 /usr/share/texlive/texmf-dist/doc/support/light-latex-make/README.md.gz
>  6 
> /usr/share/texlive/texmf-dist/doc/support/hook-pre-commit-pkg/pre-commit-latex.gz
> 
> Searching around my system, I don't find the file, but all latex
> packages seem to be installed.  Maybe it's not in Debian Bullseye?

It seems to be a problem in texdoc. The file itself is there:

  tomas@trotzki:~$ apt-file search latex-doc-ptr.pdf
  texlive-lang-english: 
/usr/share/doc/texlive-doc/latex/latex-doc-ptr/latex-doc-ptr.pdf

This is Bullseye, but I don't expect those things to change in Buster.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Preserving leading zeros

2023-05-28 Thread tomas
On Sun, May 28, 2023 at 01:50:15PM -0400, William Denton wrote:
> On 28 May 2023, Berry, Charles wrote:
> 
> > Have you considered http://gewhere.github.io/org-bibtex ??
> > 
> > Or using the approach therein, viz. use properties to store bib data in org?
> 
> That would be great for a smaller bibliography, but I'm dealing with over
> 2,400 books [...]

> |   isbn | title| pub_date |
> |+--+--+
> | 0006145396 | A Buyer's Market | 1952 |

Perhaps not very elegant, but sticking "ISBN" in front of that would work.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [BUG] org-texinfo-compile docstring sentence ends abruptly

2023-05-24 Thread tomas
On Wed, May 24, 2023 at 08:24:21PM +0200, Niall Dooley wrote:
> The `org-texinfo-compile' docstring contains the following sentence which ends
> abruptly.
> 
> "Processing is done through the command specified in 
> `org-texinfo-info-process',
> which see."
> 
> I think it is sufficient to remove the "which see" at the end.

I think this is just the English incarnation of the customary Latin
"q.v." [1], which in printed text used to denote a "link" (well,
something you could look up in the index, so printed text's most
close cousin to a link). That usage would be "vintage", but correct.

Cheers

[1] https://en.wiktionary.org/wiki/q.v.
-- 
t


signature.asc
Description: PGP signature


Re: Bug report for ox-icalendar: newlines should be CRLF

2023-04-14 Thread tomas
On Fri, Apr 14, 2023 at 10:13:48AM +, Ihor Radchenko wrote:
> "Stephen J. Eglen"  writes:
> 
> >> https://list.orgmode.org/87355ikzwk.fsf@localhost/T/#m180c100587d3d88ab5787942271a546b51891996
> >
> > Thanks for copying me in on this.
> >
> > There is a related issue about EOLs, not just \r\n -- each line should
> > be a maximum of 75 characters; this is handled by 
> > org-icalendar-fold-string 
> 
> May you please provide a link to the iCalendar spec document section
> describing this requirement?

It's in rfc5545 [1], referenced to from rfc7986 [2].

Cheers
[1] https://datatracker.ietf.org/doc/html/rfc5545#section-3.1
[2] https://datatracker.ietf.org/doc/html/rfc7986#section-1
-- 
t


signature.asc
Description: PGP signature


Re: [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda)

2023-02-14 Thread tomas
On Tue, Feb 14, 2023 at 10:41:38AM +0100, Heinz Tuechler wrote:
> Jean Louis wrote/hat geschrieben on/am 14.02.2023 07:00:

[...]

> > Then just representation must be clear: @UTC is unclear in those
> > cases, but @RELTOUTC would be clear.
> > 
> 
> @RELTOUTC seems unfortunate, as it states only the obvious. If at all,
> it should be @AHEADUTC or @BEHINDUTC or some abbreviation of it, but as
> said above, it seems not necessary to me.

That's what the "+" and "-" do, anyway.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda)

2023-02-12 Thread tomas
On Sun, Feb 12, 2023 at 12:33:40PM +0300, Jean Louis wrote:
> * Ihor Radchenko  [2023-02-10 13:48]:
> > Jean Louis  writes:
> > 
> > > If you start adding in Org "fixed" time with UTC offset, that is a new
> > > type of timestamp, as it is not common in world.
> > 
> > It is how ISO8601 defines offsets.
> 
> - did you say you wish to represent time with UTC time zone by using
>   UTC offset?
> 
> - and I said, UTC time is always without offset, and if any is
>   represented then it must be +00
> 
> - and now you say that ISO8601 defines offsets... sorry, you are
>   confusing me and readers.

It is not about "the offset OF UTC". It is about "the offset
RELATIVE TO UTC".

Sorry for raising my voice :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [POLL] Proposed syntax for timestamps with time zone info

2023-02-06 Thread tomas
On Mon, Feb 06, 2023 at 04:34:15PM +0100, Marcin Borkowski wrote:
> Out of curiosity: in what time zone you were when you sent this???
> 
> 
> On 2023-10-29, at 02:04, Jean Louis  wrote:
> 
> > * to...@tuxteam.de  [2023-02-01 12:22]:

Sorry. I've lost the thread's thread. Are you asking Jean Louis
or me?

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: POSIX TS spec reverses the meaning of TZ offset compared to ISO

2023-02-02 Thread tomas
On Thu, Feb 02, 2023 at 08:45:51AM +0100, Heinz Tuechler wrote:
> Max Nikulin wrote/hat geschrieben on/am 02.02.2023 04:22:
> > On 02/02/2023 04:57, Heinz Tuechler wrote:
> > > My impression is that many of non experts like me don't
> > > know in which time zone they are living.
> > 
> > For you own time zone: Open Development tools in a browser ([F12]),
> > switch to console, type
> > 
> >  new Intl.DateTimeFormat().resolvedOptions().timeZone
> > 
> 
> Thank you, Max.
> It seems to me that this shows the time zone I selected at set up of the
> computer, in my case Europe/Berlin. Using package lutz in R with correct
> coordinates I see Europe/Vienna, based on open street map.
> Days ago I did not even know that Berlin and Vienna are in different
> time zones.

Vienna is special :)

But no: there's no /usr/share/zoneinfo/Europe/Vienna. I think what you
are seeing is just a trick to improve "User Experience".

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: POSIX TS spec reverses the meaning of TZ offset compared to ISO (was: [POLL] Proposed syntax for timestamps with time zone info

2023-02-01 Thread tomas
On Wed, Feb 01, 2023 at 10:57:47PM +0100, Heinz Tuechler wrote:
> to...@tuxteam.de wrote/hat geschrieben on/am 01.02.2023 14:51:

[...]

> > This is unfortunate indeed. I'd tend to pick one and not to allow
> > both, out of fear of counfusion. And if I had to pick one, I'd pick
> > ISO [...]

> Same for me, I usually see ISO offset. Further, I am used to exchange
> time designations (CET, EST, PDT,...) instead of [continent/city]
> timezone names [...]

Note that they mean subtly different things: CET is "Central European
Time", which has a fixed offset of one hour. Europe/Berlin rather means
"whatever offset is valid at this time" (which, as we have seen, is
ambiguous some of the time and faulty at the other end).

You want the second if you want to schedule a regular meeting in your
city at the local bar. You want the first in a log file.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: POSIX TS spec reverses the meaning of TZ offset compared to ISO (was: [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and

2023-02-01 Thread tomas
On Wed, Feb 01, 2023 at 01:26:36PM +, Ihor Radchenko wrote:
> [ adding Org ML back to CC ]
> 
> Christian Moe  writes:
> 
> >> Note, however, that because we are conforming to POSIX TZ, @UTC+2 is two
> >> hours _behind_ the Greenwich.
> >
> > Ouch.
> 
> This is probably something we need to discuss further.
> 
> Dear All,
> 
> There is potential confusion coming from the different interpretations
> of the time zone offsets used in ISO8601 and POSIX TZ specs:

This is unfortunate indeed. I'd tend to pick one and not to allow
both, out of fear of counfusion. And if I had to pick one, I'd pick
ISO, which I've seen more often in the wild. But this might quite
well be some sort of bias.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda)

2023-02-01 Thread tomas
On Wed, Feb 01, 2023 at 12:48:12PM +, Ihor Radchenko wrote:
> Greg Minshall  writes:
> 
> >> 2022-11-12 12:00 @Asia/Singapore # tzdb syntax
> >
> > aesthetically, allowing a space after the "@" sign might be nice.  i
> > don't know what that would do to the parsing/BNF/whatever.
> 
> [2022-11-12 12:00 @Asia/Singapore] vs. [2022-11-12 12:00 @ Asia/Singapore]
> 
> Either way is possible.
> I am in favour of my variant though :)

Same with me. I read @ as a sigil [1]

Cheers

[1] https://en.wikipedia.org/wiki/Sigil_(computer_programming)
-- 
t


signature.asc
Description: PGP signature


Re: [POLL] Proposed syntax for timestamps with time zone info

2023-02-01 Thread tomas
On Wed, Feb 01, 2023 at 10:06:15AM +0100, Stefan Nobis wrote:
>  writes:
> 
> > 2023-03-23 02:30 @Europe/Berlin refers to /two/ points in time, thus
> > it /is/ ambiguous.
> 
> As far as I understand the definitions, the point in time "2023-03-23
> 02:30 @Europe/Berlin" is clearly defined as 2023-03-23 02:30 UTC+0100.
> 
> A bit more problematic would be "2023-03-26 02:30 @Europe/Berlin".

[...]

This has already been cleared in the thread: I got the year the
wrong way around.

> The real problem would be e.g. "2023-10-29 02:30 @Europe/Berlin". This
> point in time really exist twice, there is 02A:30 (02:30 UTC+0200) and
> 02B:30 (02:30 UTC+0100) in this night of switching back from DST to
> normal time!
> 
> So, in general, only using the time zone name may indeed lead to
> ambiguous interpretations of timestamps.

...which stems from the fact that the very concept of "time zone"
is somewhat ambiguous, too. Some time zone designations carry the
fact of whether they are supposed to be summer times or not with
them (as with CET/CEST), some not (as above). The time zone database
is only known for a limited time into future and may change with
political vagaries. Yadda, yadda.

If you really want to have fun with this (and this thread hasn't
satisfied your thirst ;-) see [1].

Cheers

[1] https://en.wikipedia.org/wiki/British_Summer_Time#Early_history
-- 
t


signature.asc
Description: PGP signature


Re: [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda)

2023-01-31 Thread tomas
On Tue, Jan 31, 2023 at 11:12:00PM +0300, Jean Louis wrote:
> * Ihor Radchenko  [2023-01-31 16:46]:
> > Specifying just @Europe/Berlin is ambiguous around the daylight savings
> > transition.
> 
> Sorry, I cannot see practical example why is it ambiguous. Unless
> programmer does not take all information in account, it is not
> ambigous. People on this planet agree on time zones in advance, so
> there are few changes that people cannot plan in advance.

(snipped the huge CC list)

Either I understand you wrong, or you don't know what you are
talking about. 2023-03-23 02:30 @Europe/Berlin refers to /two/
points in time, thus it /is/ ambiguous. If you use disambiguating
"time zones" (MEZ vs MESZ in this case) you can resolve that.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [OT] email opens (was: Link from orgmode file to E-Mail (using kmail or notmuch))

2023-01-28 Thread tomas
On Sat, Jan 28, 2023 at 03:08:17PM +0100, Gregor Zattler wrote:

[...]

> The data used in the second link actually comes from
> litmus.com, they do such statistics on a regular basis.  For
> the first link I cannot tell, but the numbers are very
> similar to the litmus blog post on April 2021.
> 
> > Those are by majority all web software clients.
> 
> Yes, because what they are measuring is "email opens" via
> web pixels and such tracking technologies [...]

They do *what*?

> So while this data somehow shows the sad state of affairs,

I'd venture it shows their incompetence. But that seems to
be a honourable way to make money these days.

Thanks for expanding my horizon...

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Org html conversion with XyJax

2023-01-27 Thread tomas
On Fri, Jan 27, 2023 at 09:41:59PM +0100, Rudolf Adamkovič wrote:
> Partha Pratim Ghosh  writes:
> 
> > #-*- mode: org -*-
> 
> FYI: You do not need this line if the file has an '.org' extension.

*and* if your auto-mode-alist happens to be the right one. And if
someone else hasn't given other name to the file. And...

FWIW, I put that in always: I don't like metadata embedded in a
file name (it reminds me fatally of MS-DOS ;-)

[...]

Thanks for your other suggestions!

[Not the OP, but learning]

Cheers
-- 
t


signature.asc
Description: PGP signature


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: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda

2023-01-14 Thread tomas
On Sun, Jan 15, 2023 at 06:43:19AM +1100, Tim Cross wrote:
> Max Nikulin  writes:
> 
> > On 14/01/2023 20:08, Jean Louis wrote:
> >> * Max Nikulin [2023-01-14 10:14]:
> >>> Let's assume <2023-01-15 Sun 09:00 +1>
> >>>
> >>> It may be suitable for timestamps in the past, but future is more tricky.
> >>> There is no problem if you are going to watch Lunar eclipse. However if 
> >>> your
> >>> plan is to attend a local event there is a chance that you will arrive at
> >>> wrong time. Sometimes offset of timezones is changed and it may happen
> >>> between the moment when you added a scheduled time and the moment of the
> >>> event.
> >> Can't follow you.
> >> with "+1" I would say it is time zone.
> >> Basic point is that users shall learn to express themselves by using
> >> time zone.
> >
> > "+1" is not a timezone, it is current offset shared by several timezones. 
> > You can not
> > assure that time offset at a particular location would not change due to new
> > administrative rules.
> >
> > E.g. Europe/Berlin is a timezone, but, strictly speaking, is still
> > underspecified. Sometimes timezones are split into smaller parts.
> 
> Yes, this is a problem. We really want a symbolic TZ
> specification and we would need 'smarts' i the timestamp generation code
> that is able to handle potential offset changes due to daylight savings
> transition etc. Even then, the transition time can change between when
> the timestamp is set for and when it actually occurs.

Having wrangled that (outside Emacs) for a while, I politely disagree.

If it's the past we are talking about, the offset is most of the time
the right thing (we know best at timestamp creation time). When it's
the future /and/ we are talking about local time, then the symbolic
time zone makes more sense (e.g. we meet in Lviv next Monday at 3pm,
whatever 3pm is in that timezone).

I think we need (optionally) both. Well knowing that some dates with
some symbolic time zones are ambiguous.

For a log file (past times), for example, I would insist in having the
offset (actually I'd try to talk people into having UTC, but have failed
at times with that).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda

2023-01-14 Thread tomas
On Sat, Jan 14, 2023 at 05:06:31PM +, Ihor Radchenko wrote:
> to...@tuxteam.de writes:
> 
> >> ... Having an
> >> ability to specify time zones manually will already cater needs for a
> >> number of users.
> >
> > Definitely. But the time stamp (with time zone) in itself doesn't
> > carry enough context to actually decide that [...]

> This is basically what we have now - conform to "current" system time
> zone. We are not going to remove this timestamp style. Just add an
> ability to explicitly specify the timestamps if needed.

IMO that totally makes sense. Most people just use time naively and
aren't around at half-past-three in the night when things happen :)

> > When you have appointments with people in totally diverse time zones,
> > perhaps dates tend to be more fixed wrt UTC.
> 
> AFAIK, people don't usually bother. As long as you can map from specific
> time zone (applying the currently active summer clock time changes) to
> something like seconds from epoch, you can always calculate back to you
> preferred time zone. Look at https://www.emacswiki.org/emacs/Usergroups.
> They say, for example, "Europe/Berlin", which may be either CET or CEST.
> 
> In any case, selection of time zone for user timestamps is not something
> we need to worry about in Org code. Users are to decide. Org might
> assist, but I do not see anything meaningful we can do to help with DST.

What I can imagine being useful (besides allowing timestamps to carry
that extra info) is the possibility to set defaults, perhaps at the
file (even, who knows, at the heading) level. A special attribute
seems pretty adequate, if I'm not missing some monster.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda

2023-01-14 Thread tomas
On Sat, Jan 14, 2023 at 03:05:22PM +, Ihor Radchenko wrote:
>  writes:
> 
> > Now there's still enough work for the applications to do: presentation,
> > parsing, disambiguation, if necessary asking the user for help. Someone
> > mentioned PostgreSQL -- this is a nice example of what can be done beyond
> > the (comparatively!) boring details of time zone management :-)
> 
> Do I understand correctly that PostgreSQL insists on using timestamps
> with time zone info in favour or ordinary timestamps? Exactly to avoid
> issues with the same timestamp pointing to a different real time from
> epoch depending on the current OS time zone setting?

It doesn't insist: it offers both data types, but the docs are very clear
on what they prefer.

> Thinking more about this, I can see how it can be important for
> clocking, and similar auto-recorded information. Users may be surprised
> to record clocking on some task yesterday just to find the clocking data
> in future upon travelling from Singapore to San Fran.
> 
> So, when implementing time zones, we may need to take care about adding
> the time zone info when auto-inserting timestamps.
> 
> In addition, we may provide some mechanism to set the time zone for:
> 1. Individual files
> 2. For all files, including possible time zone transitions over time.
> 
> What I mean by (2) is when the user travels from, say, Australia to USA,
> it could be possible to say: Use Australia/Seattle up to certain time
> and then use USA/Austin.
> 
> However, the above considerations are just nice-to-haves and should not
> be a blocker to a more generic time zone support in Org. Having an
> ability to specify time zones manually will already cater needs for a
> number of users.

Definitely. But the time stamp (with time zone) in itself doesn't
carry enough context to actually decide that. It's even not that
easy to wrap one's head around dates that "travel" (the easiest
example would be perhaps: "9:00 show up at work" -- when DST takes
effect, it's still 9:00 whatever the local time is). When you
have appointments with people in totally diverse time zones, perhaps
dates tend to be more fixed wrt UTC.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda

2023-01-14 Thread tomas
On Sat, Jan 14, 2023 at 02:38:05PM +, Ihor Radchenko wrote:

[...]

> > Or to put it in another way - currently, it is well understood where org
> > timestamps fall down. However, once you add TZ and provide the
> > expectation TZ data will be respected correctly, all bets are off.
> 
> I think I need to clarify.
> Emacs currently relies on glibc time zone support on Linux.
> I am not sure if glibc is 100% accurate, but it should be good enough.
> At least, there is no way we can do better ourselves.

TBH, this is the only way which makes sense. The OS keeps the Olson
database up to date and all applications rely on that. Anything else
would be madness.

Now there's still enough work for the applications to do: presentation,
parsing, disambiguation, if necessary asking the user for help. Someone
mentioned PostgreSQL -- this is a nice example of what can be done beyond
the (comparatively!) boring details of time zone management :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda

2023-01-13 Thread tomas
On Sat, Jan 14, 2023 at 12:51:31AM -0500, Tom Gillespie wrote:
> Without wading too far into this at the moment,
> timezones are an extremely tricky problem with
> a whole bunch of design considerations. I am
> reproducing the heading comment from laundry's
> timestamp.rkt in its entirety here. Best!
> Tom
> 
> https://github.com/tgbugs/laundry/blob/master/laundry/grammar/timestamp.rkt

[...]

> ; are two cases, one where the location is clear, "napoleon on [1812-01-01]"
> ; and the other where it is not, the issue is that a single date refers

Where location also includes time, sometimes (think DSTs). IMO, a timezone
is nice for added context, but meaningless without a concrete offset wrt
some agreed upon base (UTC, here on Earth, for example). Unless you use
clearly different shorthands (e.g. CST for Central Standard Time [1]
and CDT for Central Daylight Time).

The nice cherry on top of that is that this context info is sometimes
relevant and sometimes not. A regular appointment ("brush teeth") may
want to be seen relative to the current time zone (so it "moves" when
I travel from Berlin to New York), another ("Jitsi meeting with my
colleagues in Delhi, Dar-Es-Salam and Denpasar") might not.

I warmly recommend the Wikipedia page [2] on that topic.

An interesting problem :)

Cheers

[1] Eh. Nevermind that it also can mean Cuba Standard Time or China
   Standard Time.
[2] https://en.wikipedia.org/wiki/Time_zone

-- 
t


signature.asc
Description: PGP signature


Re: copying text from links makes it with a starting [[

2023-01-12 Thread tomas
On Thu, Jan 12, 2023 at 08:42:54AM +0100, Luca Ferrari wrote:
> On Tue, Dec 27, 2022 at 2:26 PM Ihor Radchenko  wrote:
> >
> > Luca Ferrari  writes:
> > Could you please provide more details about what is happening?
> > What exactly do you do to copy the link?
> > See https://orgmode.org/manual/Feedback.html#Feedback
> >
> 
> Imagine I've this org fragment:
> 
> Link: [[https://foo.com]]
> 
> where the link is displayed without brackets, in org mode.
> I place the point at the beginning of the first visibile character,
> hence the 'h', and the C-space M-e M-w and then go to another
> application and paste the content of the clipboard.
> I've seen that sometimes the link is copied as text, so both beginning
> and ending brackets are there, but with long links the ending brackets
> are not there, but it could be they I remove them accidentally.
> I would like to copy only the visible part, but I guess there's no
> solution unless I do something manually or configure a web package to
> open the link into another application.

Perhaps what's needed is to teach M-e (org-forward-sentence) to handle
this.

The challenge still is that you don't quite know whether the link
"consumer" wants to have the wrapping [[...]] or not, since the
consumer isn't known at "copy" time.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: LaTeX export for Org Mode Documents written in Indic Languages

2023-01-07 Thread tomas
On Sat, Jan 07, 2023 at 12:41:39PM +0530, Krishna Jani wrote:
> 
> Hello,
> 
> I have never had to write in languages other than English but an
> assignment just came up to transcribe the Indian Penal Code in
> simple and understandable Hindi. I have an Org file with some of my
> transcriptions (because of Emacs's awesome language support) but I am
> unable to org-export these files to pdf. I suppose I must install some
> latex packages, but I have not been able to find any documentation for
> the same. I dont really know latex, I mainly just use it for Org pdf
> export. 
> 
> Has anyone had a similar experience, or has a clue to this problem. Is
> there some documentation relating to languages that I can read

There are some approaches described here:

  
https://tex.stackexchange.com/questions/199773/how-to-type-hindi-words-in-latex

Since your input will be most probably already UTF-8 encoding, I
guess the most promising avenue these days is to go with LuaLaTeX.
It should work as a drop-in replacement for LaTeX "classic" and
should be included in your favourite TeX distribution.

I don't know off-the-bat what to do to make it work with Org
(I'm sure there are folks around here who do :), I'd first
export to LaTeX and fiddle with the preamble until I know what
to do.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [BUG] Org agenda misbehaves in a side window [9.5 (9.5-g0a86ad @ /home/zellerin/.emacs.d/elpa/org-9.5/)]

2023-01-06 Thread Tomas Zellerin
Ihor Radchenko  writes:

>> The reason seems that org-agenda-get-restriction-and-command calls
>> delete-other-window; however, this is not something user observes and
>> expects as effect of those commands.
>
> Sure, but what can we do in order to both fix this and also not break
> the existing behaviour?

The simplest solution seems to bind (ignore-window-parameters t) inside
the save-window-excursion in `org-agenda-get-restriction-and-command`,
see below. But I do not know what all can be broken, or whether
something cleaner is possible.

Best regards,

Tomas

--- /tmp/org-agenda.orig2023-01-06 19:43:03.528884719 +0100
+++ /tmp/org-agenda.el  2023-01-06 19:41:23.493330904 +0100
@@ -3112,13 +3112,14 @@
   c entry key type match prefixes rmheader header-end custom1 desc
   line lines left right n n1)
   (save-window-excursion
-   (delete-other-windows)
-   (org-switch-to-buffer-other-window " *Agenda Commands*")
-   (erase-buffer)
-   (insert (eval-when-compile
- (let ((header
-(copy-sequence
- "Press key for an agenda command:
+(let ((ignore-window-parameters t))
+  (delete-other-windows)
+  (org-switch-to-buffer-other-window " *Agenda Commands*")
+  (erase-buffer)
+  (insert (eval-when-compile
+(let ((header
+   (copy-sequence
+"Press key for an agenda command:
 <   Buffer, subtree/region restriction
 a   Agenda for current week or day  >   Remove restriction
 t   List of all TODO entriese   Export agenda views
@@ -3128,14 +3129,14 @@
 ?   Find :FLAGGED: entries  C   Configure custom agenda commands
 *   Toggle sticky agenda views  #   List stuck projects (!=configure)
 "))
-   (start 0))
-   (while (string-match
-   "\\(^\\|   \\|(\\)\\(\\S-\\)\\( \\|=\\)"
-   header start)
- (setq start (match-end 0))
- (add-text-properties (match-beginning 2) (match-end 2)
-  '(face bold) header))
-   header)))
+  (start 0))
+  (while (string-match
+  "\\(^\\|   \\|(\\)\\(\\S-\\)\\( \\|=\\)"
+  header start)
+(setq start (match-end 0))
+(add-text-properties (match-beginning 2) (match-end 2)
+ '(face bold) header))
+  header
(setq header-end (point-marker))
(while t
  (setq custom1 custom)



Re: [MAINTENANCE] Org orphanage?

2023-01-06 Thread tomas
On Fri, Jan 06, 2023 at 04:51:01PM +, Ihor Radchenko wrote:

[...]

> It is a good shelter, but I was hoping to promote Sourcehut and
> discourage people using Github to report issues in favour of Org mailing
> list.

<3

Thanks
-- 


signature.asc
Description: PGP signature


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

2023-01-06 Thread tomas
On Fri, Jan 06, 2023 at 04:20:29PM +, Ihor Radchenko wrote:
> Ihor Radchenko  writes:
> 
> > Marc Nieper-Wißkirchen  writes:
> > ...
> 
> May someone forward my last email to Marc?
> For some reason, his mail server classifies my emails as spam and
> rejects them.

Just tried. Happens for me too.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [BUG] Package keyval Error: margins undefined. [9.6 (release_9.6-61-g63e073f @ /home/data1/protected/Programming/Software/emacs/lisp/org/)]

2023-01-06 Thread tomas
On Thu, Jan 05, 2023 at 11:30:46PM +0300, Jean Louis wrote:
> 
> 
> 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.
> 
> 
> Can't generate PDF file, though it worked just before days.
> 
> ERROR: Package keyval Error: margins undefined.
> 
> --- TeX said ---
> 
> See the keyval package documentation for explanation.
> Type  H   for immediate help.
>  ...  
>   
> l.1005 \ProcessOptionsKV[p]{Gm}

I think people here need to see the TeX code: this is most
definitely a (La)TeX error.

Cheers
-- 
t


signature.asc
Description: PGP signature


[BUG] Org agenda misbehaves in a side window [9.5 (9.5-g0a86ad @ /home/zellerin/.emacs.d/elpa/org-9.5/)]

2023-01-05 Thread Tomas Zellerin


When Agenda buffer is in a side window, several actions fail with
"Cannot make side window the only window".

Example:

emacs -Q
in *scratch*, (setq display-buffer-alist '(("\\*Org Agenda\\*"
display-buffer-in-side-window)))
M-x org-agenda t to display Todo agenda
in org-agenda buffer, another M-x org-agenda is observed fails with error above,
expected is display the menu to select agenda command

Other failing commands are for example changes of todo state in agenda
buffer.

The reason seems that org-agenda-get-restriction-and-command calls
delete-other-window; however, this is not something user observes and
expects as effect of those commands.

Observed on Org 9.6 as well.

Emacs  : GNU Emacs 29.0.60 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 
3.24.35, cairo version 1.17.6)
 of 2022-12-22
Package: Org mode version 9.5 (9.5-g0a86ad @ 
/home/zellerin/.emacs.d/elpa/org-9.5/)



Re: How to disable completely org-persist

2022-12-30 Thread tomas
On Sat, Dec 31, 2022 at 02:29:43AM +0100, Angelo Graziosi wrote:
> 
> > Il 30/12/2022 18:42 Colin Baxter ha scritto:
> > 
> >  
> > >>>>> Angelo Graziosi writes:
> > 
> > > tomas wrote:
> > >> there is now a defvar `org-element-cache-persistent'
> > 
> > > Ah! didn't knew that..
> > 
> > > Setting
> > 
> > > (setq org-element-cache-persistent nil)
> > 
> > > seems to work..
> > 
> > Indeed, although I'm not yet convinced that org-persist directories wont
> > eventually start showing up in /tmp!
> 
> I fear that sooner or later it will reappear somewhere.. 

Hm. I'm sure people are accepting patches?

Having persistence "centralised" in an org-persist facility
should make it easier for you (or me) to control what happens.

Otherwise, each exporter might be creating files everywhere.

Perhaps it would make sense to state the goals in more
detail. I can see many "aspects":

 - "I don't want my ~/.emacs.d/ littered beyond my explicit
   control"
 - "I don't have (nor want to have) XDG directories"
 - "I don't want things in /tmp" [1]
 - "I don't want my Emacs's session state to spill to
   persistent media"

What is it what you (or me, or anyone) wants to achieve?

Cheers

[1] Currently I see two directories in /tmp made by my emacs
   session: some `babel-...', which seems to be made at Org mode
   load (before any babel things are invoked), and `emacs1000'
   (I start Emacs as a server, so that's where the socket goes)
   
-- 
t


signature.asc
Description: PGP signature


Re: How to disable completely org-persist

2022-12-30 Thread tomas
On Fri, Dec 30, 2022 at 01:35:39PM +, Ihor Radchenko wrote:
>  writes:
> 
> > AFAIK there is now a defvar `org-element-cache-persistent'. Maybe it
> > works for you?
> 
> The variable has been there since the beginning.

But you made me aware of it, and thanks for it :)

> Now, org-persist is just more careful not to create the directory when
> nothing needs to be stored there.

Understood.

Cheers & may the new year...
-- 
t


signature.asc
Description: PGP signature


Re: How to disable completely org-persist

2022-12-30 Thread tomas
On Fri, Dec 30, 2022 at 01:11:12PM +0100, Angelo Graziosi wrote:
> > Il 05/12/2022 18:58 Colin Baxter ha scritto:
> > 
> >  
> > > Angelo Graziosi writes:
> > 
> > > Colin Baxter wrote:
> > >> I too would like a means to disable org-persist.
> > 
> > > On emacs-devel there was this suggestion:
> > 
> > > https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg00125.html
> > 
> > It appears to work, after removing a couple of surplus brackets from the
> > end of the last line.
> 
> After the last Emacs master build, the what suggested there, i.e.
> 
> ;; As suggested here:
> ;; https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg00125.html
> (setq org-persist-disable-when-emacs-Q t)
> 
> (defun tv/advice--org-persist (old-fn &rest args)
>   (let (user-init-file)
> (apply old-fn args)))
> 
> (advice-add 'org-persist-write :around #'tv/advice--org-persist)
> (advice-add 'org-persist-read :around #'tv/advice--org-persist)
> (advice-add 'org-persist-gc :around #'tv/advice--org-persist)
> 
> does not work any more: that directory is recreated even with that cod in the 
> init.el
> 
> Someone knows how to avoid that?

AFAIK there is now a defvar `org-element-cache-persistent'. Maybe it
works for you?

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Is the cascading logic of outlines a feature, or a design bug?

2022-12-25 Thread tomas
On Mon, Dec 26, 2022 at 06:47:37AM +, a...@bitrot.link wrote:

> Likewise, is the inability to close an org-mode outline section without
> starting a new section really a feature? [...] Or is
> the restriction really just a bug with seniority, and the difficulty of
> fixing it (or the compatibility headaches caused by fixing it) would
> outweigh the benefits?

I guess the answer depends on your perspective. Try to reformulate
your question in another way, perhaps then it leads to something.

I must admit I've missed the possibility for Org to continue a
section after a deeper level one from time to time. I've resorted
to "local conventions" (e.g. a headline with "-" as a title).

But all in all, that's what Org's document model is, and you won't
change it because it's (sometimes) more convenient to you. What
you might try is to find enough people to agree in a common way
to work around it, if necessary.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: org-persist files in /tmp

2022-12-25 Thread tomas
On Sun, Dec 25, 2022 at 09:30:00AM +, Ihor Radchenko wrote:
>  writes:
> 
> >> Another idea is to avoid caching of parse result for small files.
> >
> > I haven't been following along very closely, but seeing the
> > involved complexities, I'd appreciate a knob to disable caching
> > altogether.
> 
> org-element-cache-persistent

Thanks, Ihor. You made me a Christmas present *<:-)~

> > My usage of Org hasn't triggered any slowdowns which would be
> > worth all that complexity (and yes, my biggest Org file so-far
> > is 36k lines, and my box isn't the fastest around).
> 
> The main reason we cannot disable org-persist is _not_ Org AST cache.
> The reason is mostly caching some downloaded files.

I see. That latency weighs significantly more, yes.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: org-persist files in /tmp

2022-12-23 Thread tomas
On Fri, Dec 23, 2022 at 09:12:52PM +0700, Max Nikulin wrote:

[...]

> If you demonstrate that e.g., when working with encrypted files, their
> sensitive content leaks to the cache then it will raise the severity of the
> issue. Of course, the always appreciated option is to provide a patch that
> consistently makes org-persist optional.

Understood that hint, and you are, of course, right :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: org-persist files in /tmp

2022-12-22 Thread tomas
On Thu, Dec 22, 2022 at 11:07:52PM +0700, Max Nikulin wrote:
> On 22/12/2022 22:45, Tim Cross wrote:
> > Could some of the issues people are concerned about regarding use of
> > /tmp be avoided if instead the temporary files were put into ~/.cache?

[...]

> Another idea is to avoid caching of parse result for small files.

I haven't been following along very closely, but seeing the
involved complexities, I'd appreciate a knob to disable caching
altogether.

My usage of Org hasn't triggered any slowdowns which would be
worth all that complexity (and yes, my biggest Org file so-far
is 36k lines, and my box isn't the fastest around).

But, of course, it's your call :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [PATCH] ob-core: add org-confirm-babel-evaluate-cell custom variable

2022-12-15 Thread tomas
On Thu, Dec 15, 2022 at 09:18:14AM +, Ihor Radchenko wrote:
> Tom Gillespie  writes:

[...]

> I am generally skeptical about our ability to provide universal way to
> judge if a given sexp is safe or not. It should be left to the user.

This might live in the middle of some thicket deep in the intersection
of Undecidability Plains and Ill-Definedness Swamps. Crocodiles don't
dare near there and nobody knows whether there are Dragons.

Or something :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Syntax question: What is BORDER in 4.17. Text Markup?

2022-12-07 Thread tomas
On Wed, Dec 07, 2022 at 11:29:29AM +0100, Jens Lechtenboerger wrote:
> On 2022-12-07, Timothy wrote:

[...]

> > This seems like an improvement to me, implemented in 56338725e61 :)
> 
> Many thanks, Timothy!

Seconded :)
-- 
t


signature.asc
Description: PGP signature


Re: Syntax question: What is BORDER in 4.17. Text Markup?

2022-12-06 Thread tomas
On Tue, Dec 06, 2022 at 07:28:20PM +0100, Jens Lechtenboerger wrote:
> Hi there,
> 
> the syntax for Text Markup such as *bold* at [1] specifies
> PRE MARKER CONTENTS MARKER POST with
> CONTENTS as BORDER BODY BORDER and
> BORDER as “Any non-whitespace character.”
> 
> What is the role of BORDER here?  Does it really exist?
> 
> What is BORDER if CONTENTS should be a single character, e.g., in
> the two strings “*x*” and “~*~”?  Are single characters forbidden?

Yes, this seems a bit unfortunate. The BORDER char may be identical
to the BODY. So *f* and *ff* are both valid markups.

Perhaps it'd be clearer to forget about the BORDER, only talk about
BODY and say that BODY is not empty and doesn't start or end with
a whitespace character.

Cheers

> [1] https://orgmode.org/worg/org-syntax.html#Emphasis_Markers

-- 
t


signature.asc
Description: PGP signature


Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el

2022-12-05 Thread tomas
On Mon, Dec 05, 2022 at 07:54:25PM -0800, David Masterson wrote:

[...]

> Question: which end of load-path is "front" if you look at load-path via
> describe-variable?  It's been far too long since my days of Elisp
> hacking.

This goes "left to right" when looking at it on a conventional
display. The first hit "wins". My load path looks like this
(well, a part of it, I don't want to bore everyone ;-)

   ( "~/.emacs.d/lisp"
 "/home/tomas/.emacs.d/elpa/geiser-0.10/"
 "/home/tomas/.emacs.d/elpa/geiser-0.10"
 "/home/tomas/.emacs.d/elpa/markdown-mode-2.1" 
 ...
 "/usr/local/share/emacs/29.0.50/lisp/emacs-lisp"
 "/usr/local/share/emacs/29.0.50/lisp/cedet"
 ... )

meaning that Emacs first looks in my personal directories, then
in the system local ones (I have a "locally" installed Emacs
from the distribution's POV).

The distribution's directories would go even later, were there
any.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Multiple versions of Org in load-path problem

2022-12-05 Thread tomas
On Mon, Dec 05, 2022 at 06:50:33PM -0800, David Masterson wrote:
> I'm using Debian v11.5 on my Chromebook.  I have used 'apt install' to
> load the pre-built version of Emacs 27.1.  I've just found out that it
> installs a pre-built version of Org-9.3 in /usr/share/emacs/27.1/lisp.
> That directory is early in the load-path, so it appears to be loaded out
> of startup.el(?).  Everything seems to be working fine in my setup of
> Emacs and Org.

Hm. I run a self-compiled Emacs, so I can't check at the moment;
take this with a grain of salt.

That said for a distro putting the distro-provided places earlier
in the load-path than the local- or user-provided ones seems wrong;
admins/users have no chance to override them, no?

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: How to disable completely org-persist

2022-12-02 Thread tomas
On Sat, Dec 03, 2022 at 01:19:47AM +0100, Angelo Graziosi wrote:
> I have already posted this to emacs-devel people (see 
> https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg00045.html).
> 
> After a recent Emacs build from master I find `org-persist` directory in my 
> `.emacs.d` folder. It brings no benefit but only garbage in `.emacs.d`. So 
> how can I disable the creation of that folder?

Now, now... "garbage" seems unnecessarily loaded, But...

> You should not enable this by default and let people that finds it really 
> useful to enable it in its own init.el.

...I won't quibble about the default, but I'd like to have a way
to disable it, too.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: S-RET not incrementing table cell with emacs -nw

2022-12-01 Thread tomas
On Thu, Dec 01, 2022 at 04:50:48PM +0100, Loris Bennett wrote:
> Hi,
> 
> If I run emacs or emacsclient with the option -nw or -t, the chord S-RET
> in a table cell does not create a new cell below with the incremented
> value.  It just creates a new empty cell.  When running Emacs with a
> GUI, the incrementation works.
> 
> Is this a known problem?  If so, is there a solution?

Most terminals don't even know what a S-RET is (i.e. they don't have
a code sequence to pass it to the application). Actually, most terms
just pass 0x0a, i.e. "linefeed".

So Emacs has no chance to "see" that you meant S-RET.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Docstrings and literate programming (good practices?)

2022-11-04 Thread tomas
On Fri, Nov 04, 2022 at 12:13:30AM -0700, Samuel Wales wrote:
> my dry sensibilities say don't write ht same thing in the manual that
> is well written in the docstring.  idk the issues however, other than
> that once you do it in two places murphy's law says they will get out
> of sync.

Absolutely. I can well imagine docstrings going into a reference.

> but surely an extractor could look for an interactive spec and things
> like htat could subset the functions and text.

My complaints were not so much about the extractors themselves as
about the kind of docs that tend to be made with them.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Docstrings and literate programming (good practices?)

2022-11-04 Thread tomas
On Fri, Nov 04, 2022 at 07:39:04AM +0100, Marcin Borkowski wrote:
> 
> On 2022-11-04, at 06:45, to...@tuxteam.de wrote:

[...]

> > Ah. Javadoc and their descendants. I tend to call that "illiterate
> > programming"...
> 
> I spat my tea. :-)  Thanks, that's a nice one!

Sorry to hear that ;-P

> Though this _may_ work in some cases.  For example, imagine you divide
> your package into two files – one with user-facing commands and another
> one with internal functions.  If you order the former one carefully, the
> "extract docstrings" might actually work as a documentation.

Yes, of course it's just a tool; but that kind of tool all too often
seduces people to switch to auto-pilot.

How many Doxygen docs have I had which tell me that function so-and-
so takes an int as third argument? I can see that by inspecting the
source! As a bonus, I don't get that much optical fluff and don't
have to go to the browser to look at it.

> Still, a "normal" documentation seems a better (even if more
> time-consuming) options.

Yes, it takes work.

> Also, such docstring-based documentation is still better than none.

That depends on how much work goes into the docstring. This:

  /* add 2 to x */
  x += 2;

is the typical quality you get when you're writing the docs while
waist-deep in the code. If you want good docs, you have to take a
step back and try to put yourself into the mind of someone else
(i.e. "forget" for a moment all the implicit knowledge you have
about that code you've been intimate with for weeks, perhaps for
years). That's not easy :)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Docstrings and literate programming (good practices?)

2022-11-03 Thread tomas
On Thu, Nov 03, 2022 at 08:03:05PM -0700, Samuel Wales wrote:
> i wonder if emacs or org has what you might call semi-literate or
> etaretil docstring functions?
> 
> for example, you have a body of non-literate elisp code, and you have
> a manual.  it could be redundant to describe commands and what they do
> and their options, if the docstrings are good.
> 
> why not include the docstrings of all commands in some nice format in
> the .org manual via some mechanism?

Ah. Javadoc and their descendants. I tend to call that "illiterate
programming"...

> would that be a good practice?  seems useful abstractly.

... but I might be biased. I tend to detest its results. Especially
composed with languages having compulsive type declarations.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Init.el need just for org-mode?

2022-11-02 Thread tomas
On Wed, Nov 02, 2022 at 09:15:04PM +0100, Renato Pontefice wrote:
> are You telling that you put more .el files on .emacs.d folder, each one 
> contain some customization of emacs (or org-mode?)
> This is interesting for me.

No. By default, Emacs just loads ~/.emacs.d/init.el /or/ ~/.emacs.

Everything else can be arranged from there. For example, to split
out the custom.el file (where customize writes its stuff), I have
those two lines in my ~/.emacs.d/init.el:

  (setq custom-file "~/.emacs.d/custom.el")
  (load custom-file)

Then, I have a subdirectory of ~/.emacs.d (concretely: ~/.emacs.d/lisp)
where I keep all my local little things I make myself. To be able to
easily load those without always naming the full path, I have in my
~/.emacs.d/init.el:

  (add-to-list 'load-path "~/.emacs.d/lisp")

And so on.

Still I propose you start with an empty init file. Once you find a
thing you /want/ your Emacs to do always at start, you can start
populating your ~/.emacs or ~/.emacs.d/init.el (each approach has
some up- and downsides, but that's not so important: you'll find
out and you'll be able to switch easily).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Init.el need just for org-mode?

2022-11-02 Thread tomas
On Wed, Nov 02, 2022 at 06:45:36PM +0100, Renato Pontefice wrote:
> Maybe I’m not so skilled to emacs. I’ve found org-mode that do things that I 
> find useful. I speak about init.el because I think this is the place where I 
> can set some things to do with org-mode, i.e. Can I set deadline to view in 
> emacs without org-mode?I’m simply looking for a good PIM that I can customize 
> with a simple text file…

It's all the same. Emacs looks for an ~/.emacs and for ~/.emacs.d/init.el
They are just two alternatives with slightly different flavour, but the
same function. (But take into account that I have no clue how/where those
things live under Windows).

I'd propose to start with an empty ~/.emacs (or ~/.emacs.d/init.el) and
only put things in there when you are convinced that you need them. Otherwise
you'll never know for sure what they are doing.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Init.el need just for org-mode?

2022-11-02 Thread tomas
On Wed, Nov 02, 2022 at 01:36:00PM -0400, Jude DaShiell wrote:
> .emacs could be used for orgmode as well as init.el.  I have all my
> orgmode stuff in my .emacs.
> What I don't yet know are any advantages of using init.el as opposed to
> .emacs.

I switched (long ago) from .emacs to init.el. The reason was just
having one top-level directory (.emacs.d) in my home directory
where all "the other local emacs-y stuff" goes.

I also separated custom.el out, to give customize an own file to
chew on: it's happier this way :-)

(I have lots of other things in .emacs.d, neatly packaged in different
little boxes -- oops, there they are, again ;-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions)

2022-10-30 Thread tomas
On Sun, Oct 30, 2022 at 07:09:30AM +, Ihor Radchenko wrote:
> to...@tuxteam.de writes:
> 
> >> If you need it, feel free to open a separate feature request for extra
> >> :results options in ob-shell. Possibly providing more details how you
> >> envision this header argument to work.
> >
> > I'll mull over it. Perhaps I come up with some (patch) proposal.
> 
> Thinking more about it in the context of the current feature request,
> displaying the stderr buffer unconditionally may be undesired when the
> script already does 2>&1 or, potentially, uses imaginary :results stderr
> header argument.

Definitely. It's not for everyone.

> >> > And thanks for your incredible work on Org. Do you ever sleep?

[...]

> I use Org mode and Org agenda to manage the maintenance 😀

Still genuinely impressed.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions)

2022-10-29 Thread tomas
On Sun, Oct 30, 2022 at 03:31:32AM +, Ihor Radchenko wrote:
> to...@tuxteam.de writes:
> 
> >> What you are describing would better fit into a new :results option.
> >
> > Oh, I missed the popup part. Sounds useful for yet another profile,
> > yes.
> 
> If you need it, feel free to open a separate feature request for extra
> :results options in ob-shell. Possibly providing more details how you
> envision this header argument to work.

I'll mull over it. Perhaps I come up with some (patch) proposal.

> > And thanks for your incredible work on Org. Do you ever sleep?
> 
> Remember that we may have radically different time zones. What appears
> to be nightly emails may not necessarily be sent at night. 

I'm aware of that. My awe is more directed at your bandwidth than at
your timings.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Init.el

2022-10-29 Thread tomas
On Sat, Oct 29, 2022 at 09:08:08PM +0200, Renato Pontefice wrote:
> I’m sorry, but I’m in a big big confusion…I regreat but I’m unable to correct 
> the prob the is originated to my init.el and the conclusion is that I cannot 
> use emac.
> I ask if you can correct my init.el (that I post)

OK, below is your file, each line preceded by >, as is usual
in quoting mails. My comments are mixed in-between, I hope
this is readable for you:

> ;; -ss*- mode: elisp -*-
> 
> 
> ;;--setta il formato della data diversamente --
> ;;(setq-default org-display-custom-times t)
> (setq org-time-stamp-custom-formats '("<%a %d %m %Y>" . "<%a %d %m %Y 
> %H:%M>"))
> 
> ;;- comandi per gestire la grandezza della finestraprincipale di emacs 
> -
> (setq initial-frame-alist
>(append '((width . 200) (height . 400) (top 45) (left 45) ())
>initial-frame-alist))
> 
> ;;---(add-to-list 'default-frame-alist '(height . 24))
> (add-to-list 'default-frame-alist '(width . 80)) 
> 
> ;; fà partire in AGENDA la settimana dal giorno 1---
> (setq calendar-week-start-day 1)
> 
> ;;---settaggi carattere e dimensione di default del carattere--
> (set-face-attribute 'default nil :font "Andale Mono" :height 160 )
> 
> ;; Disable the splash screen (to enable it agin, replace the t with 0)
> (setq inhibit-splash-screen t)
> 
> ;; Enable transient mark mode
> (transient-mark-mode 1)
> 
> ;;Org mode configuration
> Enable Org mode

This "Enable Org mode" has to be preceded by a semicolon,
like so:

  ;; Enable Org mode

(we had this one already)

> (require 'org)

This one is actually unnecessary, because it is done again a couple
of lines below. But it should be harmless.

> 
> ;; Make Org mode work with files ending in .org
> (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
> The above is the default in recent emacsen

This one should be commented out, like the "Enable..." above:

  ;; The above is...

> (require 'org)
> (setq org-log-done t)
> 
> ;; set maximum indentation for description lists
> (setq org-list-description-max-indent 5)
> 
> ;; prevent demoting heading also shifting text inside sections
> (setq org-adapt-indentation nil)
> 
> ;; determina le sequenze di stato al TODO
> (setq org-todo-keywords
>  '((sequence "TODO" "IN-PROGRESS" "WAITING" "DONE")))
> 
> ;;-- file utilizzati  per TODO list in Agenda
> (setq org-agenda-files '( "~/org/agenda/"   
> ;;  "~/org/agenda/amorc.org "
> ;;  "~/org/agenda/amorc.org "
> ;; "~/org/agenda/renato.org "
>  ))
> ;; mappa alcuni tasti per ottenere le parentesi graffe e quadre
> (global-set-key "\M-(" (lambda () (interactive) (insert "{")))
> (global-set-key "\M-)" (lambda () (interactive) (insert "}")))
> (global-set-key "\M-7" (lambda () (interactive) (insert "#")))
> (global-set-key "\M-8" (lambda () (interactive) (insert "[")))
> (global-set-key "\M-9" (lambda () (interactive) (insert "]")))
> 
> (global-set-key "\M-9" (lambda () (interactive) (insert "]")))
> 
> ;;---Aggiunge il TIMESTAMP quando chiudo uno statemet TODO
> (setq org-log-done 'time)
> 
> ;;fa aggiungere una nota di testo quando si chiude un TODO
> (setq org-log-done 'note)
> 
> ;;--setta dei tasti comodi da utilizzare in emacs
> (global-set-key (kbd "C-c l") #'org-store-link)
> (global-set-key (kbd "C-c a") #'org-agenda)
> (global-set-key (kbd "C-c c") #'org-capture)
> 
> ;;--- azioni applicate ai TODO
> (setq org-todo-keywords
>  '((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED")))
> (custom-set-variables

The above should be commented out, since the rest of the expression
is commented out, too. Otherwise you get unbalanced parentheses.
Change the above line to this:

  ;; (custom-set-variables

>  ;;custom-set-variables was added by Custom.
>  ;;If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> ;; '(package-selected-packages '(org-contacts frame-tabs ebdb)))
> ::(custom-set-faces
> ;;  custom-set-faces was added by Custom.
> ;; If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> ;;)
> ;;-apre emacs-org mode in modalità Agenda
> (org-agenda-list)
> (delete-other-windows)

With these changes the file parses successfully in "my" Emacs.

Hope that helps

-- 
tomás


signature.asc
Description: PGP signature


Re: Position 972

2022-10-29 Thread tomas
On Sat, Oct 29, 2022 at 06:16:30PM +, Juan Manuel Macías wrote:

[...]

> Renato, adding to what Tomas and Bruno have explained to you very well,
> you have another case in the init that you sent me by mail. Notice the
> third line here:

Oh, I get it that Juan Manuel has received one copy of the init.el.

Then I take back my last mail :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Position 972

2022-10-29 Thread tomas
On Sat, Oct 29, 2022 at 06:29:33PM +, Juan Manuel Macías wrote:
> Renato Pontefice writes:
> 
> > Symbol's value as variable is void: ‘org
> 
> It's 'org not ‘org. Notice the difference between the quotes[1]. (Did you
> modify that part? It was correct before).

Perhaps it was Google (through gmail) who modified it. They do that kind
of things. We don't know.

@Renato: it seems your init.el is badly mangled. Please, go through it
and look for pieces of private information. If there are any, remove
them and post the rest for us to see (this has been suggested a couple
of times). That will be a lot quicker than to chase every single bug
in the dark.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Position 972

2022-10-29 Thread tomas
On Sat, Oct 29, 2022 at 06:29:28PM +0200, Renato Pontefice wrote:
> Bruno,
> With the common you told me I reach che 972 /M-g c 972) and I found this:
> 
> ;;Org mode configuration
>  Enable Org mode
> (require ‘org)
> 
> Could be this the error?
> 
> Now I’ve erased the two ;; save init.el and restart emacs, but now I obtain:

No, no: you have to put (at least one) ; in front of "Enable".

Thing is: a semicolon marks a comment (so Emacs doesn't try to read
it as a program), and this line "Enable Org mode" is meant as a
comment. The mark is missing.

The whole thing should look like this:

;;Org mode configuration
;; Enable Org mode
(require ‘org)

(actually it doesn't matter how many ; are in front of Enable, but
two would correspond to the convention).

Cheers
-- 
tomás


signature.asc
Description: PGP signature


Re: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions)

2022-10-29 Thread tomas
On Sat, Oct 29, 2022 at 09:09:04AM +, Ihor Radchenko wrote:
> to...@tuxteam.de writes:
> 
> > As I hinted at, I also wanted to have the exit code documented [...]

> Note that what we are discussing here is different from your
> description. A popup window accumulating stderr is displayed upon code
> evaluation. stderr does not go into results.
> 
> What you are describing would better fit into a new :results option.

Oh, I missed the popup part. Sounds useful for yet another profile,
yes.

Thanks and sorry for the noise.

And thanks for your incredible work on Org. Do you ever sleep?

In awe
-- 
tomás


signature.asc
Description: PGP signature


Re: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions)

2022-10-29 Thread tomas
On Fri, Oct 28, 2022 at 11:43:39PM -0700, Samuel Wales wrote:
> long ago i made the contents of my shell blocks look like this:
> 
> {
>   code
> } 2>&1
> :

As I hinted at, I also wanted to have the exit code documented. So
my setup was a bit more involved than this. Plus, I didn't want all
that code scaffolding to show up in the typeset results (my audience
had enough to digest as it was), so I hid all that in the prologue/
epilogue.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [FR] Display stderr contents after executing shell blocks (even when stdout :results output is requested) (was: Org 9.6-pre and Bash sessions)

2022-10-28 Thread tomas
On Sat, Oct 29, 2022 at 04:05:19AM +, Ihor Radchenko wrote:
> Rudolf Adamkovič  writes:
> 
> > Ihor Radchenko  writes:
> >
> >> I do not think that it make sense to display that buffer when the code
> >> finishes successfully. I can see this kind of behaviour
> >> breaking/spamming automated scripts or export---code working in the
> >> past may throw error output into unsuspecting users.
> >
> > But the exit code has nothing to do with the standard error.

[...]

> > For example, I use a program for work that uploads data to a certain
> > 3rd-party server.  It exits with a zero code but also shows extremely
> > important notices on error output.  As an "unsuspecting user", if I used
> > Babel to run the program, I would end up in a trouble.

[...]

> Dear All,
> 
> As explained in the above quote, it may be reasonable to display stderr
> in the shell (and possibly other) src blocks upon execution.
> 
> + Stderr may contain important information even if the code block
>   succeeds
> - Displaying stderr will raise *Error* buffer, which may or may not be
>   expected or desired.
> 
> What do you think?

My take as an Org user is that this makes a lot of sense. I don't know
whether there is an elegant way to accomodate all the use cases in
an elegant way, but to provide a concrete example where I'd have found
it handy...

While preparing a handout for an introduction to shell programming
(at a very basic level), I wanted to embed little examples with
their results. Org rocks at this kind of task.

But in this case it's important to show everything the students are
going to see. One could argue that the error part is even the most
important.

So what I needed was not only the stderr (optionally somehow separated
from stdout -- optionally as someone would see it in some terminal
session), but also all the above even when the exit code was nonzero.

Ideally, a display of that exit code, too.

I ended up massaging prologue and epilogue, which worked nicely,
but sadly is language dependent for a set of concepts which are,
one could argue, independent of the language [1].

So yes, I would be thrilled by such a possibility.

Cheers

[1] These are OS conventions. So also a language of sorts, but at
another level.

-- 
tomás


signature.asc
Description: PGP signature


Re: Error opening an .org file

2022-10-27 Thread tomas
On Thu, Oct 27, 2022 at 05:11:32PM +0200, Renato Pontefice wrote:
> When I try to open a simple file in emacs, I receive this error
> 
> Warning (initialization): An error occurred while loading 
> ‘/Users/renatopontefice/.emacs.d/init.el’:
> 
> Invalid read syntax: ), 1, 0

I don't understand: this error complains about 'init.el', does
not happen at start, but much later, when you try to open an
.org file?

> To ensure normal operation, you should investigate and remove the
> cause of the error in your initialization file.  Start Emacs with
> the ‘--debug-init’ option to view a complete error backtrace. Disable showing 
> Disable logging

Have you tried starting Emacs with that option? What happens
then?

> So the prob is on my init.el file. What error it could be? 

We can only guess. Given our lack of information, our guesses
will be almost certainly wrong :-)

So give us a chance:

 - try starting Emacs with --debug-on-init, an possibly report
   results here
 - try bisecting the file: remove parts of it (always taking
   care of the syntax), see in which "half" the error occurs
 - post your init.el here (BE CAREFUL: please, double-check
   that it doesn't contain sensitive information: passwords,
   personal information, things your employer could consider
   to be trade secrets, that kind of stuff).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: bug#58774: 29.0.50; [WISH]: Let us make EWW browse WWW Org files correctly

2022-10-26 Thread tomas
On Wed, Oct 26, 2022 at 11:16:15PM +0200, Dr. Arne Babenhauserheide wrote:

[...]

> > That is not business of web server, HTTP or browser. Those are
> > delivery, retrieval and presentation tools
> 
> Yet there is so such separation between eww and org-mode.
  

I think this was a typo for "no".

> If you want that separation, you have to open the org-file in a second
> Emacs process.
> 
> If you don’t want that separation, you have to add other precautions.

Agree fully.

And to those saying "...but you do M-x package install, too": it is
much easier to trust a couple of sources (ELPA, the Debian archives,
what have you) than to trust the whole of the Internet (or, to put
it in less confrontative terms, some random web site).

Yes, those few sources can (and ocassionaly do!) go rogue. But trust
is like that.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: GPL violation related to Org by priprietary app (was: Best android app)

2022-10-25 Thread tomas
On Wed, Oct 26, 2022 at 12:12:46AM +1100, Tim Cross wrote:

[...]

> Even if it was violated, this is not something the maintainers are
> empowered to act on anyway [...]

This depends perhaps on what one understands by "act on". If that
means "go to court" you are, of course, right. If that means just
"make aware FSF legal of a possible violation", then the question
here boils just down to "do we have enough confidence to justify
annoying FSF legal with this?

> Also, based on my limited legal experience and past dealings with
> trademarks, copyright and licenses, I don't think there has been either
> a GPL license violation or a trade mark violation.  However, if someone
> believes differently, they should refer the matter to the FSF legal
> office.

Exactly.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Break lines in Query replace. Help.

2022-10-08 Thread tomas
On Sat, Oct 08, 2022 at 01:19:28PM +0200, Ypo wrote:
> I want to make a "query replace", where
> 
> " - " should be substituted by
> 
> "breakline - "
> 
> 
> How do I insert in a query replace a breakline?
> 
> "\\ - " seems to work only for LaTeX export.
> 
> "^J - " writes down ^J literally, and doesn't work as a break line.

It's C-Q C-J (aka ^Q^J). The CTRL-Q "quotes" the next char (handy also
for other control characters -- see also 7.1 "Inserting Text" in the
fine manual).

Cheers
-- 
t
> 
> 
> Best regards
> 


signature.asc
Description: PGP signature


Re: Apology [was: Re: Org HTML export accessibility (was: org exported pdf files))

2022-09-29 Thread tomas
On Fri, Sep 30, 2022 at 07:05:40AM +1000, Tim Cross wrote:
> 
> Dear all,
> 
> I think I owe everyone an apology [...]

> For those interested and because it might help with understanding in
> this area, I thought I'd outline the actual cause of my frustration [...]

No, I for one are grateful for the chance to understand your
perspective. Lacking your experience, I'm dependent on the
likes of you to get an idea on perspectives I've no experience
with.

So thanks!

Cheers
-- 
tomás 


signature.asc
Description: PGP signature


Re: per-file (or, really, per buffer) allowing/disallowing code block execution

2022-09-08 Thread tomas
On Thu, Sep 08, 2022 at 12:34:25PM +, Fedja Beader wrote:
> Hello Richard, Ihor and Steven,
> 
> I'm aware that file-local variables exist, but it seems that
> all documentation for them put them *into the file*, which is not secure for 
> files downloaded from the internet. What is to stop a malicious file from 
> setting an "yes, execute me automatically" variable?

While loading the file, only "safe variables" are set without
warning (actually it's a bit more complex: specific variable-
value pairs can be marked as "safe".

See e.g. "12.12 File Local Variables" in the elisp manual.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Org Publish HTML and PDF With GPG Files

2022-09-05 Thread tomas
On Mon, Sep 05, 2022 at 09:08:13PM -0700, David Masterson wrote:
> l...@tosk.in writes:
> 
> > Ihor Radchenko yanta...@gmail.com writes:
> >> 
> >> > David Masterson dsmaster...@gmail.com writes:
> >> > 
> >> > > Does org-publish have options for files with org-crypt entries?
> >> > 
> >> > We do not have an explicit option, but you can add org-decrypt-entries
> >> > to your org-export-before-processing-hook.
> >> 
> >> Thanks
> 
> > Is there a specific way of setting this in the config?
> > I tried adding `(add-hook 'org-export-before-processing-hook
> > #'org-decrypt-entries)` to my init.el, but publishing fails with the
> > error "run-hook-with-args: Wrong number of arguments: (0 . 0), 1"
> 
> Been awhile -- what's the purpose of the '#' character?

Its nickname is "sharp-quote" (actually the whole #' thingy is called
like that). As ' is just a shorthand for 'quote' (i.e. 'foo is a
shorthand for (quote foo), #' is a shorthand for 'function, i.e.
#'foo stands for (function foo), meaning "the function the symbol
foo refers to".

Being Emacs Lisp, you could just have said 'foo, but this has quite
a few downsides, one of them being that you blindside your compiler
(And your human readers).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: org-time-stamp-custom-formats with out the name of the day of the week

2022-09-03 Thread tomas
On Fri, Sep 02, 2022 at 09:33:40PM +0800, Ihor Radchenko wrote:
> Uwe Brauer  writes:
> 
> > I see, the question simply is this:
> >
> > How can I achieve that org-time-stamp inserts the date *without* the day
> > name?!
> 
> This cannot currently be customized. However, you can change
> org-time-stamp-formats constant. Removing the %a should be safe.

FWIW, I have this in an (eval-after-load 'org ...)

  (setq org-time-stamp-formats
 '("<%Y-%m-%d>" ."<%Y-%m-%d %H:%M>"))

since years (> 5) and haven't observed any side effects. But then
I don't meet every nook and cranny of org (I bow in awe to those
who meet half of them :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [PATCH] Add new entity \-- serving as markup separator/escape symbol

2022-07-28 Thread tomas
On Thu, Jul 28, 2022 at 09:17:32PM +0800, Ihor Radchenko wrote:
> Ihor Radchenko  writes:
> 
> > I am attaching a tentative patch that will make Org export remove
> > zero-width spaces when those spaces actually separate the object
> > boundaries.
> >
> > Any objections?
> 
> Given the raised objections, zero-width space does not appear to be a
> useful escape symbol because it has its valid uses as a standalone space
> symbol.
> 
> The raised objections can be solved using some kind of intricate
> heuristics, but I do not feel like it is a good direction to go. The
> code will be too complex and fragile.
> 
> Therefore, I am proposing a different approach for shielding
> fontification: introducing a special entity.
> 
> The new entity is \--, which is a valid boundary between emphasis
> markup. It will be removed during export (replaced by "").

[...]

I like that approach very much. I'm impressed, really.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Links to javascript-based websites from orgmode.org: Paypal and Github

2022-07-07 Thread tomas
On Thu, Jul 07, 2022 at 11:33:39PM -0400, Richard Stallman wrote:
> [[[ 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. ]]]
> 
>   > "Note: To be PCI compliant, you must load Stripe.js directly from
>   > https://js.stripe.com. You cannot include it in a bundle or host
>   > it yourself. This package wraps the global Stripe function
>   > provided by the Stripe.js script as an ES module."
> 
> That is hard for me to understand, since I don't know what "PCI
> compliant" means (or who is expected to comply with "PCI" or why).

PCI probably refers to "Payment Card Industry" [1]: they set some
standards people processing payments better follow or else.

It's one of those cases where private industry gets to write things
which amount to law. Much worse than traditional law because there
is no democratic oversight to it.

Typically they tend (by accident or by design) to be hostile to
free software (the above is a good example of how that happens:
they attach some magic property to having "loaded Stripe.js from
[some specific URL]" thus hampering the copy, enhancement or
distribution; you're only allowed to study (unless they serve
obfuscated Javascript: I don't feel like looking).

> Also, what is a "ES module" and what are the implications of that?

That might be an "EcmaScript module" [2], given the context.

> I wonder if users could run the free version of that JS code
> while talking with Stripe.

It's kind of free. If you modify it you stop being compliant,
thus being allowed to use it.

Cheers

[1] https://en.wikipedia.org/wiki/Payment_Card_Industry_Data_Security_Standard
[2] https://flaviocopes.com/es-modules/

-- 
t


signature.asc
Description: PGP signature


Re: [more absurd]

2022-07-04 Thread tomas
On Mon, Jul 04, 2022 at 09:42:01AM +0200, Uwe Brauer wrote:

[...]

> That is the first time I remember that on this list, questions of the
> foundation of mathematics are discussed 😉

Such things happen :)

> Back to the point, maybe I am too conservative, but I would include 0
> within the natural numbers,

If you really were, you wouldn't. Peano himself didn't ;-)

> and the example I started with, needs to
> cover that case (student marks range between 0 to 10 both included), so
> sorting should work (for me) in that case.

See? I went to school in Spain, so I know about that 0..10 scale.
But then I went to school in Germany, so I also know about the
6..1 scale. Go figure :)

> I don't see, so far any benefit for not considering 0 in that sorting
> process.

But your concrete problem isn't a sorting process at all, just a
conversion process: empty space gets translated to zero. As someone
else found out in this thread.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [more absurd]

2022-07-04 Thread tomas
On Mon, Jul 04, 2022 at 08:46:11AM +0200, Martin Steffen wrote:

[...]

> In some sense that's defendable (that what could call natural numbers is
> a cultural question or historical, like looking at what Peano did nor
> did not define).
> 
> On the other hand, one normally does not just deals with the numbers as
> such, one does something with it (like comparing them or calculating
> with them) [...]

Yes, since Uwe mentioned Peano, that's why I pointed out that
Peano doesn't care (you have to get to algebra, i.e. "up" in
the conventional foundational ladder) for 0 to have a special
role.

About the cultural thing... you seem to be a zero-counter (as
I am, too): there, too, I think that "our" position isn't in
any way "better" -- some theorems look better this way, some
that way; some inductions are easier to start at 1, some at
0.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: [more absurd]

2022-07-03 Thread tomas
On Mon, Jul 04, 2022 at 07:10:27AM +0200, Uwe Brauer wrote:

[...]

> That really su... (My use case only concerned numbers from 0-10).
> 
> So it boils down to the question: why isn't 0 considered as natural numbers, 
> as, according to the Peano axioms, it is?

I don't know whether you're serious or making fun (Poe's Law and
all that), but actually, Peano's axioms couldn't care less: as
far as they are concerned, natural numbers could well start at
23 or something.

Actually it seems to be some kind of "cultural question" whether
mathematicians start counting at 0 or at 1; my observation is
that they tend to agree across one faculty at one university.
I know positively one that tends to count from 1 (HU Berlin),
another that counts from 0 (Freiburg), both in Germany.

Something for mathematical ethnologists (do those exist?) to mull
over.

I once asked a maths prof and he said foundational folks (set
theorists, math logicians -- that's the typical environment
where you'd tend to stumble upon Peano) tend to favour starting
at 0.

Historically, Peano himself seems to have been a one-counter:

  "Peano's original formulation of the axioms used 1 instead
  of 0 as the "first" natural number,[6] while the axioms in
  Formulario mathematico include zero."  as quoted in [1].

Cheers

[1] https://en.wikipedia.org/wiki/Peano_axioms
-- 
t


signature.asc
Description: PGP signature


Re: [more absurd]

2022-07-03 Thread tomas
On Sun, Jul 03, 2022 at 10:24:34PM +0200, Uwe Brauer wrote:
> >>> "BB" == Bruno Barbier  writes:
> 
> > Uwe Brauer  writes:
> >> 
> >> I am confused what is 02 supposed to mean?
> 
> > That's a leading 0 digit, that can be ignored.
> 
> >(string-to-number "02") => 2
> 
> > Alphabetical sorting will see the "0" though and sorts differently.
> 
> But 02 seems to me a wired mathematical notation to say the least. I
> wouldn't use it for sure.

Think bigger: 1024 would sort alphabetically /before/ 22. Do you
really want this?

Cheers
--  
t


signature.asc
Description: PGP signature


Re: Org and Hyperbole

2022-06-26 Thread tomas
On Sat, Jun 25, 2022 at 11:37:55PM -0700, Siva Swaminathan wrote:
> Hello,

> [...] I feel that some of the
> questions raised here about Hyperbole sound akin to the story of five
> blind men feeling the elephant [...]

The nice thing about that kind of situation is that it only can improve
by adding in a sixth blind man ;-)

Thank you from someone "too swamped right now to try to tackle another
whole peradigm, but still enormously curious about this thing".

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Help with my first elisp

2022-05-25 Thread tomas
On Wed, May 25, 2022 at 08:35:19AM +0200, Orm Finnendahl wrote:
> Hi,
> 
> Am Dienstag, den 24. Mai 2022 um 19:30:40 Uhr (+0200) schrieb Kepa Diez:
> > (defun focusJump ()
> >   (interactive)
> >   (if (equal posicion 1)
> >     (focusPointInter)
> >   (if (equal posicion 2)
> >   (focusPointEnd)
> >     (if  (equal posicion 3)
> >     (focusPointStart)
> 
> maybe you want to cleanup a bit:
> 
> (defun focusJump (posicion)
>   (interactive "nPosicion: ")
>   (case posicion
> (1 (focusPointInter))
> (2 (focusPointEnd))
> (3 (focusPointStart
> 
> BTW: As lisp doesn't distinguish case, it is common practice in lisp
> to seperate words in symbols with dashes like 'focus-jump,
> 'focus-pont-inter, 'focus-point-start, etc.

Just to avoid confusion: Emacs Lisp does distinguish case. Traditional
Lisp doesn't. I know you know, but people could misunderstand the above.

The rest stands: in Emacs Lisp it's customary to write variable and
function names with dashes, in good ol' Lisp tradition.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Fwd: Help with my first elisp

2022-05-24 Thread tomas
On Tue, May 24, 2022 at 07:32:31PM +0200, Ypo wrote:

[...]

> Thanks, Tomas. It seems the "if" part works, now I can use my elisp just
> with the spacebar :-)

Glad it worked :)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Help with my first elisp

2022-05-23 Thread tomas
On Mon, May 23, 2022 at 09:46:09AM -0700, Greg Minshall wrote:
> Ypo,
> 
> > (defun salto ()
> >   (interactive)
> >   (if posicion 1

You are comparing the value of posicion to 1?

Then it should probably be "(if (= posicion 1) ...)" or
"(if (equal posicion 1) ...)" or something like that.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: how to transpose a table but not deleting the horizontal lines

2022-05-10 Thread tomas
On Tue, May 10, 2022 at 08:49:15AM +0200, Uwe Brauer wrote:
> 
> Hi 
> 
> >From the docstring of 
> org-table-transpose-table-at-point is
> Transpose Org table at point and eliminate hlines.
> 
> Does anybody know about a, maybe, 3rd party packages that transpose the
> table but leaves the horizontal lines intact?

Hm. They'd convert to vertical lines, then?

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: About babel and header arguments

2022-04-10 Thread tomas
On Sun, Apr 10, 2022 at 04:00:31PM +0100, Neil Jerram wrote:
> Hi Henrik,
> 
> On Sun, 10 Apr 2022 at 10:56, Henrik Frisk  wrote:
> >
> > Hi,
> >
> > I'm not a skilled (scheme) programmer so maybe there is something obvious 
> > I'm missing here. In the first example the header argument y is interpreted 
> > as I would expect it, but in the second it isn't:
> >
> > #+begin_src scheme :var y=10 :results value
> >   (+ 10 y)
> > #+end_src
> >
> > #+RESULTS:
> > : 10
> 
> I'm surprised by this one - shouldn't we expect the result 20 ?

Wait a second... where is this `+' coming from?

*Oh* you mean the first one, I see now. I just skimmed over it and didn't
notice. Unfortunately, "my" geiser seems broken at the moment and I can't
double-check it. But you are right, it should be 20.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: About babel and header arguments

2022-04-10 Thread tomas
On Sun, Apr 10, 2022 at 11:53:51AM +0200, Henrik Frisk wrote:
> Hi,
> 
> I'm not a skilled (scheme) programmer so maybe there is something obvious
> I'm missing here. In the first example the header argument y is interpreted
> as I would expect it, but in the second it isn't:

Hm. You are expecting (12 10)?

> #+begin_src scheme :var y=10 :results value
>   (+ 10 y)
> #+end_src
> 
> #+RESULTS:
> : 10
> 
> but not this:
> 
> #+begin_src scheme :var y=10 :results output
>   ((lambda (x) (display x)) '(12 y))
> #+end_src

The quote extends to the whole (parenthesized) expression, i.e.
the y is quoted too, in there, so it's the symbol y, so that
output is correct:

> #+RESULTS:
> : (12 y)

(That's Scheme, not Babel doing it). I don't know where you
want to go to, but perhaps try:

  (list 12 y)

instead: this would make a list of whatever 12 evaluates to (this
would be 12) and y evaluates to (this would be 10).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Second Ctl in keychord not detected

2022-01-19 Thread tomas
On Wed, Jan 19, 2022 at 01:08:10PM +0100, Loris Bennett wrote:
> Hi,
> 
> This is not really an Org question but an Emacs or possibly tmux
> problem.  However, the problem manifests itself in an Org context.

I guess this is tmux. It behaves more or less like an oldskool terminal,
where C- is transferred as the ASCII code with bit 7 masked out.
This would mean only C-@ (mapped to ASCII 0, which might have its own...
interesting issues) through a few chars after CTRL-Z do make sense in
this context.

This "protocol" can't even express things like CTRL-. or CTRL-, -- that
luxury is reserved to more GUI-ish environments :-)

(NOTE: just a guess, I haven't direct experience with tmux).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: block folding - should this work?

2021-12-24 Thread tomas
On Fri, Dec 24, 2021 at 04:21:58PM -0500, Robert Nikander wrote:
> I started reading about “blocks" in the manual. I wanted a chunk of text that 
> I could hide, so I tried this:
> 
> * Test
> Some text
> #+BEGIN 
> Hide this
> #+END
> 
> Hitting TAB on the BEGIN line does nothing. But if I add a blank line before 
> it, then hitting TAB hides and shows the block. Is that a bug? Or am I doing 
> it wrong? Seems like it should work without the blank line.
> 
> * Test
> Some text
> 
> #+BEGIN 
> Hide this
> #+END
> 
> M-x org-version => 9.5.1.

Ah. You have to decide on a concrete /kind/ of block.
So try:

  #+begin_example
  This is a small example
  with two lines
  #+end_example

(BTW. I seem to remember that Org prefers to spell those things in lower
case these days, as in my example).

There are some block kinds which Org "knows about" and treats specially,
like _example, _quote, _center, _src and so on.

Cheers
-- 
t


signature.asc
Description: PGP signature


  1   2   3   >