Seemingly inconsistent whitespace ownership

2023-08-10 Thread Tom Alexander
The org-mode documentation states: "With the exception of list items, blank 
lines belong to the preceding element with the narrowest possible scope. For 
example, if at the end of a section we have a paragraph and a blank line, that 
blank line is considered part of the paragraph."

https://orgmode.org/worg/org-syntax.html#org9bc833d

So I created a test org-mode document with exactly that scenario described:
```
foo bar.




* Lorem
baz




* Ipsum
alpha




beta
```

and then I ran a M-x eval-expression (message "%s" (pp-to-string 
(org-element-parse-buffer))) to see the parse tree. I'll paste the output at 
the end because its a wall of text, but analyzing it:

The zeroth section has :begin at 1 and :end at 14, which is expected.

Its only child is a paragraph which has a :begin at 1 and :end at 10, which 
only includes the line break at the end of "foo bar." but this is exactly the 
scenario described in the documentation (a paragraph at the end of a section) 
so I would expect the paragraph to end at 14, not 10.

The "Lorem" section is repeating the test to prove this isn't behavior unique 
to the zeroth section. It behaved the same, so there is no need to go over it.

The "Ipsum" section is where I put two separate paragraphs with a bunch of 
blank lines in between. This time the "alpha" paragraph goes all the way to 
character 48 which means it includes ALL of the blank lines between "alpha" and 
"beta".

So the "Ipsum" section proves that ":begin" to ":end" is supposed to contain 
the trailing blank lines of an element.

I am using org-mode version: Org mode version 9.6.6 (release_9.6.6 @ 
/usr/share/emacs/29.1/lisp/org/)

And finally, that parse tree I mentioned:

```
(org-data
 (:begin 1 :contents-begin 1 :contents-end 53 :end 53 :robust-begin 3 
:robust-end 51 :post-blank 0 :post-affiliated 1 :path nil :mode org-data 
:CATEGORY nil :granularity nil)
 (section
  (:begin 1 :end 14 :contents-begin 1 :contents-end 10 :robust-begin 1 
:robust-end 8 :post-blank 4 :post-affiliated 1 :mode first-section :granularity 
nil :parent #0)
  (paragraph
   (:begin 1 :end 10 :contents-begin 1 :contents-end 10 :post-blank 0 
:post-affiliated 1 :mode top-comment :granularity nil :parent #1)
   #("foo bar.\n" 0 9
 (:parent #2
 (headline
  (:raw-value "Lorem" :begin 14 :end 30 :pre-blank 0 :contents-begin 22 
:contents-end 26 :robust-begin nil :robust-end nil :level 1 :priority nil :tags 
nil :todo-keyword nil :todo-type nil :post-blank 4 :footnote-section-p nil 
:archivedp nil :commentedp nil :post-affiliated 14 :title
  (#("Lorem" 0 5
 (:parent #1)))
  :mode nil :granularity nil :parent #0)
  (section
   (:begin 22 :end 30 :contents-begin 22 :contents-end 26 :robust-begin 22 
:robust-end 24 :post-blank 4 :post-affiliated 22 :mode section :granularity nil 
:parent #1)
   (paragraph
(:begin 22 :end 26 :contents-begin 22 :contents-end 26 :post-blank 0 
:post-affiliated 22 :mode planning :granularity nil :parent #2)
#("baz\n" 0 4
  (:parent #3)
 (headline
  (:raw-value "Ipsum" :begin 30 :end 53 :pre-blank 0 :contents-begin 38 
:contents-end 53 :robust-begin 40 :robust-end 51 :level 1 :priority nil :tags 
nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil 
:archivedp nil :commentedp nil :post-affiliated 30 :title
  (#("Ipsum" 0 5
 (:parent #1)))
  :mode nil :granularity nil :parent #0)
  (section
   (:begin 38 :end 53 :contents-begin 38 :contents-end 53 :robust-begin 38 
:robust-end 51 :post-blank 0 :post-affiliated 38 :mode section :granularity nil 
:parent #1)
   (paragraph
(:begin 38 :end 48 :contents-begin 38 :contents-end 44 :post-blank 4 
:post-affiliated 38 :mode planning :granularity nil :parent #2)
#("alpha\n" 0 6
  (:parent #3)))
   (paragraph
(:begin 48 :end 53 :contents-begin 48 :contents-end 53 :post-blank 0 
:post-affiliated 48 :mode nil :granularity nil :parent #2)
#("beta\n" 0 5
  (:parent #3))
```

--
Tom Alexander




Concerning previews of LaTeX snippets

2023-08-10 Thread Divya

Whenever I try to do `C-x C-c C-l`, I get the following error:

`org-compile-file: File "/tmp/orgtexEMteNn.svg" wasn't produced Please
adjust 'dvisvgm' part of 'org-preview-latex-process-alist'`

And following this, I have tried to tweak the value of the variable, but
nothing seems to be working.

Any thoughts on how to proceed, and what is the best way to have smooth
LaTeX previews in Emacs Org? I have heard from Karthik and others that
fast previews are going to come, I don't know when but I would be one
among many to be waiting for this. Till then, if anything is viable I'd
be glad.


Re: Passing table to Ruby session

2023-08-10 Thread Mike Gauland

On 10/08/23 21:11, Ihor Radchenko wrote:

Mike Gauland  writes:


Just to follow up on my problem sending a table to ruby. It doesn't'
seem to be an org problem, but with inf-ruby.
...
As long as the code to set the variable is under 4k, it works. When it's
longer than that,  process-send-region sends it in pieces, and inf-ruby
is apparently prematurely interpreting the incomplete code.

I'll take this up elsewhere, though if anyone here has suggestions for
me, or wants further updates, let me know.

4k sounds like a known quirk with pty connection type in Emacs
processes. It may have this 4k limitation at least on some systems.

If you posted a bug report elsewhere, may you please share the link to
that report?

I've reported it to the inf-ruby project: 
https://github.com/nonsequitur/inf-ruby/issues/172


I wasn't aware that Emacs would insert EOF in a stream, but that doesn't 
seem to be the problem (if it is even occurring here).


I've found that both irb and pry will exit if I type ^D at the start of 
a line, but anywhere else it seems to be ignored.






Re: [accessibility] worg obscures text (Re: [PATCH] ob-sqlite: Use a transient in-memory database by default)

2023-08-10 Thread Samuel Wales
yikes yes re columns.

[my fill-column is 60.  on a 32 inch.  and i cannot even do ediff side
by side with that, to my displeasure.]

[i hope to find a low-[preferably-1-nit]-minimum-brightness
flicker-free monitor someplace, and i /think/ oleds, which /might/
partly satisfy that, can come standardly in 42 inches, which /might/
allow side by side ediff at 60 finally.]


On 8/10/23, Max Nikulin  wrote:
> On 05/08/2023 10:22, Samuel Wales wrote:
>> [i.e. agree that the manuals and standard toc at top imo do a good job
>> for accessibility.]
>
> Notice that Org manual is exported through ox-texinfo, not by ox-html
> directly. So somebody should confirm that default ox-html table of
> contents is suitable for various worg pages: short and long ones.
>
> Personally I do not like CSS of the manuals (Org and Emacs) because it
> allows ~190 characters per line. For regular paragraphs it is
> recommended to have lines 60-70 characters long. Code blocks may be wider.
>
>
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



Re: [patch] Fix inner smart quotes in French

2023-08-10 Thread Juan Manuel Macías
Bastien writes:

> Yes, this is also what the French national printing press ("Imprimerie
> nationale"), which is quite authoritative in this matter, recommends.
>
> Note that the Full recommendation of the Imprimerie nationale is to
> repeat second-level quotation marks at the beginning and of each line
> when the text spans over several lines, like this:
>
>   Then X reported : « This is what Y said : « Here is
>   « a quotation with a paragraph spaning over several
>   « lines, with each line starting with a quotation mark
>   « until the end of the quotation. » 
>
> (The unique » at the end is intentional, the rule is to not repeat.)

I've been looking at the babel-french documentation (LaTeX)
(http://mirrors.ctan.org/macros/latex/contrib/babel-contrib/french/frenchb.pdf),
which claims to be based on "Lexique des règles typographiques en usage
à l’Imprimerie Nationale, troisième édition (1994)"; p. 3 is about
quotation marks and the different options:

-
with all engines: the inner quotation is surrounded by double quotes
(“texte”) unless option InnerGuillSingle=true, then a) the inner
quotation is printed as ‹ texte › and b) if the inner quotation spreads
over more than one paragraph, every paragraph included in the inner
quotation starts with a ‹ or a › or nothing, depending on option
EveryParGuill=open (default) or =close or =none.

with LuaTeX based engines, it is possible to add a French opening or
closing guillemet (« or ») at the beginning of every line of the inner
quotation using option EveryLineGuill=open or =close; note that with any
of these options, the inner quotation is surrounded by French guillemets
(« and ») regardless option InnerGuillSingle; the default is
EveryLineGuill=none so that \frquote{} behaves as with non-LuaTeX
engines.
-

I have tried this example with quotes per line:

https://i.imgur.com/od4HwUs.png

In any case (apart from LaTeX), it is clear that I was wrong when I said
that the inner quotes that my patch 'corrects' were 'incorrect'. What I
don't know is why babel-french defaults to the « “inner” » style. Is it
the most used currently in France? If the « « inner » » style is more
canonical, I don't mind having my patch 'fix' reverted.

-- 
Juan Manuel Macías 

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com




Re: Or probably just fix the org-ctags hook functions?

2023-08-10 Thread Nick Dokos
Jens Schmidt  writes:

> On 2023-08-08  10:48, Ihor Radchenko wrote:
>
> ...
> Probably the problem is not the side-effects done by loading
> =org-ctags=, but rather that these hook function from =org-ctags= try
> to do their job when the environment is not really ready for them,
> i.e. when there is no known tag file around.
> ...

I disagree: the changes are done behind my back in an (almost)
invisible manner and leave me surprised and mystified. Even if there
was a TAGS file around, having links behave differently from one
moment to the next, when the only thing I did in-between was ask for
help on a completely unrelated Org mode function, is a nasty surprise.

-- 
Nick




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

2023-08-10 Thread Nick Dokos
Max Nikulin  writes:

> On 08/08/2023 20:29, Bastien Guerry wrote:
>> The definition of a new function is not a side-effect
>> that affects Emacs editing behavior, so Babel and export libs are
>> OK.
>
> Function definition is not side effect when load library is
> requested. However it is a side effect of hitting TAB in Emacs help
> prompt. Completion of a variable or a function should not modify Org
> behavior. Loading of a file is not explicitly requested by the user in
> this case.
>
> I would disregard however function definitions, however changes in key
> bindings and recognized plain text links may be surprising to users
> who just tries to read help.
>
>

A big +1 from me: that's exactly what I was trying to say a few months
ago wrt org-ctags, although I said it badly. Defining functions that
are not used is not much of a problem IMO, but changing behavior behind
the user's back is most definitely a problem. IOW, it's not about
side-effects in general, it's about *specific kinds* of side-effects:
ones that are immediately visible (and confusing) to the user - things
behaving differently from a minute ago even though the only thing the
user did in-between is something as innocuous as asking for help.

One small step forward is to require libraries to have explicit
enable/disable functions[fn:1].  Even if I somehow enable a library by
mistake or misadventure, I should be able to disable it (at least in
the sense described above) without having to restart. Not every
library will need that and it's not even close to a complete solution,
but there is at least the possibility of building something better
(though more complicated) on top of it. If the library could be
organized as a minor mode, it most definitely should be so organized:
enabling/disabling would then be an automatic "requirement satisfied".

I would also recommend that the library *not* call its enable function
in general and leave it to the user to do so explicitly, but that may
be more controversial for "backward compatibility" reasons (with which
I disagree in these particular cases: I view them as bugs that need to
be fixed). And the library should document what changes it unleashes
on the environment (again in the restricted sense discussed above):
changes to "foreign" keymaps/menus/syntax tables/hooks probably
qualify for this kind of documentation, function definitions and
internal-to-the-library changes do not, plus there is probably a swath
of stuff in-between with more ambiguous requirements - all I can say
is start with the obvious things and add as necessary.

[fn:1] E.g. `org-ctags' has `org-ctags-enable' but no `org-ctags-disable', so
my "solution" is to do something like this in my init file:

;;; undo org-ctags obnoxiousness
(with-eval-after-load 'org-ctags (setq org-open-link-functions nil))

It doesn't undo everything but it gets the obnoxious bits out of my
way (at least until *I* decide to call `org-ctags-enable').

My 2-cents/pence/centimes...
-- 
Nick




Re: [SUMMARY] [[bbb:OrgMeetup]] on Wed, Aug 9, 19:00 UTC+3 (was: Interest in an Org video meetup?)

2023-08-10 Thread Carlo Tambuatco
Was unable to attend due to a power outage. Is this going to be a
monthly/semi monthly meetup? Is the next one scheduled already?

On Thu, Aug 10, 2023, 4:13 AM Ihor Radchenko  wrote:

> Ihor Radchenko  writes:
>
> > URL: https://bbb.emacsverse.org/b/iho-h7r-qg8-led
> > Time & Date: <2023-08-09 Wed 19:00-21:00 @+03,Europe/Istanbul>
> > The room will be open half an hour before the official start.
>
> Thanks everyone who participated! We had quite a few people by Emacs
> meetup standards.
>
> Here is a short summary of the main discussion points (those that I
> remember):
>
> - Adham Omran announced his new package for Anki (flash card/spaced
>   repetition) integration:
>   https://github.com/adham-omran/ankifier
>   Efficiently create Anki flashcards from your notes.
>
> - Ilya Cheryshov announced his new package to display agenda time grid
>   as _interactive_ svg image. Looks like the usual Google calendar view,
>   but inside Emacs.
>   https://github.com/ichernyshovvv/org-timeblock/
>   Org mailing list discussion:
> https://list.orgmode.org/87edkc85fl.fsf@localhost/T/#t
>
>   - Similar, but ASCII-only package:
> https://github.com/ml729/calfw-blocks, based on Calfw Emacs calendar
> framework.
>
> - More on visualizing Org statistics:
>   - https://github.com/rksm/clj-org-analyzer/: clocking data visualizer
> using web-frontend. Features heatmap view of clocking time
> per-day. Allows filtering by tags.
>   - https://github.com/Elilif/org-heatmap/: monthly heatmap for habit
> tracking
>   - A bit tangent, but illustrates how to make use of time clocking:
> https://samplesize.one/blog/posts/my_year_in_data/
> - One more article I did not mention during the meetup:
>   https://sqrtminusone.xyz/posts/2023-04-13-emacs/
>
> - [[info:eintr#Top][eintr#Top]] Elisp introduction for non-programmers.
> This is really a
>   well-written manual worth reading if your config is larger than a few
>   lines.
>
> - yantar92's window manager: Awesome WM https://awesomewm.org/
>
> - https://git.sr.ht/~bzg/worg is the source code of Org WIKI (WORG)
>   [ Contributions welcome: a number of articles really need some love
> there ]
>   - We also have some Org internals documented as articles in WORG.
>
> - Meeting report export template (backend):
>   https://github.com/DarkBuffalo/ox-report
>   which reminded me of actual LaTeX template by Tecosaur (Org dev):
> https://github.com/tecosaur/BMC
>
> - New WIP fast LaTeX preview system with instant preview as you type
>   - Demo: https://www.youtube.com/watch?v=n-AfvuV-bYo
>   - Another demo previously posted on the mailing list:
> https://www.youtube.com/watch?v=n-AfvuV-bYo
>   - And the mailing list discussion with more details:
> https://list.orgmode.org/orgmode/87lek2up0w@tec.tecosaur.net/
>
> - =#+begin_src := will give you completion of header arguments
>   - Same for #+ keywords and, sometimes, for their values (like for
> #+TAGS: )
>   - The underlying code is in lisp/org-pcomplete.el
>   - Also, see org-eldoc (part of org-contrib):
> https://git.sr.ht/~bzg/org-contrib/tree/master/item/lisp/org-eldoc.el
>
> - Collaboration using Org mode
>   - Concurrent editing options are not great, unfortunately:
> - https://code.librehq.com/qhong/crdt.el (need Emacs for all sides)
> - https://logseq.com/: similar to notion/obsidian, but supports Org
> syntax
>   - Can use Git, if not real-time. Org is just a plain text.
>   - I also used email workflow using pdf export -> sending email ->
> getting pdf with comments back -> modifying Org source -> ...
>
> - Authoring books/thesis in Org
>   - Adham Omran wrote his thesis in Arabic using Org mode
> - Emacs has built-in right-to-left language support
>   [[info:emacs#Bidirectional Editing][emacs#Bidirectional Editing]]
> - Right-to-left may be mixed with left-to-right (English) in Org
>   export, though some LaTeX-specific tweaking may be needed.
>   - Org offers _some_ help with #+LANGUAGE document keyword
> (see [[info:org#LaTeX specific export settings][org#LaTeX specific
> export settings]])
> - Also, https://list.orgmode.org/orgmode/87h6z7jq4o.fsf@localhost/
> - There was a question about XeLaTeX, but, AFAIK, event normal
>   LaTeX can support Arabic and other Unicode languages with
>   polyglossia package. Although fonts may be tricky to set and a
>   number of people opt-in to LuaTeX/XeLaTeX for smoother
>   experience (the downside is that non-LaTeX may not always be an
>   option in real-life publisher requirements)
> - Examples from Org mailing list on complex typesetting while keeping
> sources in Org mode
>   - https://list.orgmode.org/orgmode/87y1yovcip@posteo.net/
>   - The bi-lingual book I mentioned:
> https://list.orgmode.org/orgmode/87h70tyyiz@posteo.net/
>
> - Adham Omran wrote colemak input method for Arabic (only qwerty-based
>   variant is available by default in Emacs)
>   - I 

Re: [PATCH 1/2] test-ox-html: checkboxes: ascii, html & unicode

2023-08-10 Thread Hraban Luyat
Thank you for the sensible amendments

On 8/10/23 5:36 AM, Ihor Radchenko wrote:
> Hraban Luyat  writes:
>
>> I've added some minor unit tests for checkboxes in ox-html. I was
>> playing around with something I thought was a bug, which turned out to
>> be my project config. Thought I'd share the unit tests anyway, maybe
>> this can help someone down the line create more patches.
> Thanks!
> Applied, onto main, with minor amendments.
> I have updated the commit message to follow our standards and added
> skip-unless checks to make sure that the tests will only run when Emacs
> has libxml support.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=003927a59
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 




Re: [accessibility] worg obscures text (Re: [PATCH] ob-sqlite: Use a transient in-memory database by default)

2023-08-10 Thread Max Nikulin

On 05/08/2023 10:22, Samuel Wales wrote:

[i.e. agree that the manuals and standard toc at top imo do a good job
for accessibility.]


Notice that Org manual is exported through ox-texinfo, not by ox-html 
directly. So somebody should confirm that default ox-html table of 
contents is suitable for various worg pages: short and long ones.


Personally I do not like CSS of the manuals (Org and Emacs) because it 
allows ~190 characters per line. For regular paragraphs it is 
recommended to have lines 60-70 characters long. Code blocks may be wider.






Re: [patch] Fix inner smart quotes in French

2023-08-10 Thread Max Nikulin

On 10/08/2023 21:49, Bastien wrote:

So I'd rather use this:

   Then X reported : « This is what Y said : ”Here is
   a quotation with a paragraph spaning over several
   lines, with each line starting with a quotation mark
   until the end of the quotation."»

WDYT?


I do not mind since I see that it is a conscious decision and this 
particular case does not affect me directly.


In general however I would rely on CLDR data as much as possible to 
limit maintenance to a converter to a format more suitable for elisp and 
perhaps to a small subset of overrides.




Re: [ANM] org-timeblock: Schedule your day visually, using timeblocking technique inside Emacs

2023-08-10 Thread Fraga, Eric
On Thursday, 10 Aug 2023 at 21:17, Ilya Chernyshov wrote:
> You are not the first person getting this type of error on Emacs 30. 

Ah, okay, that's reassuring!

> Currently, I'm not planning to maintain the package for master branch.

Okay, that's fine.  Thank you.

-- 
: Eric S Fraga, with org release_9.6.7-603-g28b6a2 in Emacs 30.0.50


Re: [patch] Fix inner smart quotes in French

2023-08-10 Thread Bastien
Max Nikulin  writes:

> On 04/08/2023 18:09, Bastien wrote:
>> Juan Manuel Macías writes:
>> 
>>> In the meantime, I'm submitting this patch with a fix for second-level
>>> French `smart quotes': the correct quotes should be “” (without spaces,
>>> as in Spanish or Greek) (please, some francophone correct me, if I'm
>>> wrong...).
>> Applied, thanks!
>
> I am not a francophone, I just have tried to look into sources I found
> during discussion on Greek quotes.
>
> https://en.wikipedia.org/wiki/Quotation_mark#French
> says that there are different styles of inner quotes.
>
> I am more worry that Unicode CLDR defines the same character for
> quotes. 

Yes, this is also what the French national printing press ("Imprimerie
nationale"), which is quite authoritative in this matter, recommends.

Note that the Full recommendation of the Imprimerie nationale is to
repeat second-level quotation marks at the beginning and of each line
when the text spans over several lines, like this:

  Then X reported : « This is what Y said : « Here is
  « a quotation with a paragraph spaning over several
  « lines, with each line starting with a quotation mark
  « until the end of the quotation. » 

(The unique » at the end is intentional, the rule is to not repeat.)

I don't have a strong opinion on this.  I find the non-French
(e.g. canadian?) convention more sensible for digital documents (vs
printed ones): I expect repeating the quotation mark at the beginning
of each line is something software don't do.  (Perhaps there is a
LaTeX package doing so, I've not checked.)

So I'd rather use this:

  Then X reported : « This is what Y said : ”Here is
  a quotation with a paragraph spaning over several
  lines, with each line starting with a quotation mark
  until the end of the quotation."»

WDYT?

-- 
 Bastien



Re: [ANM] org-timeblock: Schedule your day visually, using timeblocking technique inside Emacs

2023-08-10 Thread Ilya Chernyshov
"Fraga, Eric"  writes:

> I have tried again and now it installs.  Thank you.  I do get many
> errors when trying to navigate to different dates and/or scroll up/down
> in the current date being viewed.
>
> For instance, I get the following in trying org-timeblock a second time
> in the current Emacs:

You are not the first person getting this type of error on Emacs 30. I
don't have any suggestion for you except suggesting release versions of
Emacs (28 or 29). Currently, I'm not planning to maintain the package for master
branch. If you use straight.el though, you can use develop branch of
it. Maybe it'll fix the error.



Re: [patch] Fix inner smart quotes in French

2023-08-10 Thread Max Nikulin

On 04/08/2023 18:09, Bastien wrote:

Juan Manuel Macías writes:


In the meantime, I'm submitting this patch with a fix for second-level
French `smart quotes': the correct quotes should be “” (without spaces,
as in Spanish or Greek) (please, some francophone correct me, if I'm
wrong...).


Applied, thanks!


I am not a francophone, I just have tried to look into sources I found 
during discussion on Greek quotes.


https://en.wikipedia.org/wiki/Quotation_mark#French
says that there are different styles of inner quotes.

I am more worry that Unicode CLDR defines the same character for quotes. 
However inner quotes varies across languages:


fr.xml: «
fr.xml: »
fr.xml: «
fr.xml: »

fr_CA.xml:  ”
fr_CA.xml:  “
fr_CH.xml:  ‹
fr_CH.xml:  ›

I would prefer to keep consistency with CLDR.




Re: [ANM] org-timeblock: Schedule your day visually, using timeblocking technique inside Emacs

2023-08-10 Thread Fraga, Eric
On Thursday, 10 Aug 2023 at 19:50, Ilya Chernyshov wrote:
> You got this error because in the Package-Requires header of the package
> there were packages without explicitly set versions. Maybe it's a bug, I
> don't know. As far as I know, it's acceptable to not define specific
> version of a dependency. Anyway, I've fixed that issue in the last
> commit. Please, try again.

I have tried again and now it installs.  Thank you.  I do get many
errors when trying to navigate to different dates and/or scroll up/down
in the current date being viewed.

For instance, I get the following in trying org-timeblock a second time
in the current Emacs:

Debugger entered--Lisp error: (wrong-type-argument stringp org-timeblock-order<)
  org-timeblock-redraw-buffers()
  org-timeblock()
  funcall-interactively(org-timeblock)
  command-execute(org-timeblock record)
  execute-extended-command(nil "org-timeblock" nil)
  funcall-interactively(execute-extended-command nil "org-timeblock" nil)
  command-execute(execute-extended-command)

-- 
: Eric S Fraga, with org release_9.6.7-603-g28b6a2 in Emacs 30.0.50


Re: [PATCH] Add tests for ob-haskell (GHCi)

2023-08-10 Thread Ihor Radchenko


A few months have passed since the last activity in this thread.
Bruno, may I know if you are still interested to work on the patch?

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



Re: [ANM] org-timeblock: Schedule your day visually, using timeblocking technique inside Emacs

2023-08-10 Thread Ilya Chernyshov
"Fraga, Eric"  writes:

> Hi,
>
> I'm late to this and I don't have the full thread on my system so
> apologies if this has been asked before.
>
> When I try
>
> M-x package-vc-install RET https://github.com/ichernyshovvv/org-timeblock/
>
> according to the instructions given at the gitlab repository, I get an
> error:
>
> --8<---cut here---start->8---
> Debugger entered--Lisp error: (error "Version must be a string")
>   error("Version must be a string")
>   version-to-list((0))

Hi

You got this error because in the Package-Requires header of the package
there were packages without explicitly set versions. Maybe it's a bug, I
don't know. As far as I know, it's acceptable to not define specific
version of a dependency. Anyway, I've fixed that issue in the last
commit. Please, try again.



Re: [ANM] org-timeblock: Schedule your day visually, using timeblocking technique inside Emacs

2023-08-10 Thread Ilya Chernyshov
"Fraga, Eric"  writes:

> Hi,
>
> I'm late to this and I don't have the full thread on my system so
> apologies if this has been asked before.
>
> When I try
>
> M-x package-vc-install RET https://github.com/ichernyshovvv/org-timeblock/
>
> according to the instructions given at the gitlab repository, I get an
> error:
>
> --8<---cut here---start->8---
> Debugger entered--Lisp error: (error "Version must be a string")
>   error("Version must be a string")
>   version-to-list((0))

Hi

You got this error because in the Package-Requires header of the package
there were packages without explicitly set versions. Maybe it's a bug, I
don't know. As far as I know, it's acceptable to not define specific
version of a dependency. Anyway, I've fixed that issue in the last
commit. Please, try again.



Re: [BUG] WORG example for ob-lilypond is no longer working as described (was: Moving some lisp/ob-*.el files to org-contrib - your advice?)

2023-08-10 Thread Jonathan Gregory

Hi Ihor,

On 08 Aug 2023, Ihor Radchenko wrote:

Jonathan, do you think that your original patch is still what 
you want to get merged?


Yes, the one I sent on 20 Jul 2023. I haven't had any issues with 
it so far.



--
Jonathan



Re: [ANM] org-timeblock: Schedule your day visually, using timeblocking technique inside Emacs

2023-08-10 Thread Fraga, Eric
Hi,

I'm late to this and I don't have the full thread on my system so
apologies if this has been asked before.

When I try

M-x package-vc-install RET https://github.com/ichernyshovvv/org-timeblock/

according to the instructions given at the gitlab repository, I get an
error:

--8<---cut here---start->8---
Debugger entered--Lisp error: (error "Version must be a string")
  error("Version must be a string")
  version-to-list((0))
  package-vc--unpack-1(#s(package-desc :name org-timeblock :version nil 
:summary "No description available." :reqs nil :kind vc :archive nil :dir 
"/home/ucecesf/.emacs.d/elpa,v30/org-timeblock/" :extras nil :signed nil) 
"/home/ucecesf/.emacs.d/elpa,v30/org-timeblock/")
  package-vc--unpack(#s(package-desc :name org-timeblock :version nil :summary 
"No description available." :reqs nil :kind vc :archive nil :dir 
"/home/ucecesf/.emacs.d/elpa,v30/org-timeblock/" :extras nil :signed nil) 
(:vc-backend Git :url "https://github.com/ichernyshovvv/org-timeblock/;) nil)
  package-vc-install("https://github.com/ichernyshovvv/org-timeblock/; nil nil 
org-timeblock)
  funcall-interactively(package-vc-install 
"https://github.com/ichernyshovvv/org-timeblock/; nil nil org-timeblock)
  command-execute(package-vc-install record)
  execute-extended-command(nil "package-vc-install" nil)
  funcall-interactively(execute-extended-command nil "package-vc-install" nil)
  command-execute(execute-extended-command)
--8<---cut here---end--->8---

This may be an issue with Emacs itself or my configuration, as opposed
to org-timeblock, of course.

Any suggestions welcome.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.7-603-g28b6a2 in Emacs 30.0.50


Re: [patch] ox-latex.el: fix blank lines behavior in verse block

2023-08-10 Thread Juan Manuel Macías
Ihor Radchenko writes:

> Well. Technically, we already warn users that the blank lines are
> preserved in the verse blocks:
>
> 12.1 Paragraphs
> ===
> 
> 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.
> 
>To preserve the line breaks, indentation and blank lines in a region,
> but otherwise use normal formatting, you can use this construct, which
> can also be used to format poetry.
> 
>
>  #+BEGIN_VERSE
>   Great clouds overhead
>   Tiny black birds rise and fall
>   Snow covers Emacs
> 
>  ---AlexSchroeder
>  #+END_VERSE
>
> So, I now think that while extra cleanups might be OK for ox-latex, we
> may not want to ignore empty lines universally in all the verse blocks.

hmm, I don't know if phrased like that (as read in the documentation)
it's clear enough that the empty lines before and after the content are
also preserved. I would understand not, but it could also be a habit that
I inherited from LaTeX: I usually leave a blank line between the
#+begin/#+end directives and the content because it makes it easier for
me to read. I don't know if it is a widespread habit among other
users...

Anyway, I don't mind leaving things as they are in the other backends,
but in the case of LaTeX, with my patch modifications, it would be
necessary to remove the blank lines before and after the content.
Otherwise it would produce something like:

\begin{verse}
\\[0pt]
\\[0pt]
\\[0pt]
\\[0pt]
\\[0pt]
  lorem ipsum dolor
\end{verse}

which would return the error "There's no line here to end".

Also, the LaTeX 'verse' environment has its own syntax for vertical
spaces. It is not necessary to put an explicit \vspace just to separate
stanzas.

... In any case, the fact that the verse block can also be used to
literally export line breaks and horizontal/vertical spaces is
interesting. Something occurred to me that I don't know if it's a bit
foolhardy: how about a LaTeX attribute ':literal t'? If used, it would
not export to a verse environment (specialized in poetry) but to normal
text, without environment, but with line breaks and horizontal and
vertical spacing preserved... wdyt?


-- 
Juan Manuel Macías

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com



Re: [SUMMARY] [[bbb:OrgMeetup]] on Wed, Aug 9, 19:00 UTC+3 (was: Interest in an Org video meetup?)

2023-08-10 Thread Adham Omran
> Ihor Radchenko  writes:
>
> You can simply use M-x report-emacs-bug, describe what you have, and ask
> for further directions.
>
> If you want to submit an actual patch, it is a similar procedure. Prots
> recently described all the steps in
> https://protesilaos.com/codelog/2023-08-03-contribute-core-emacs/

Understood, thank you.  I'll check the Prots article too.

--
Adham Omran



Re: [PATCH 2/2] test-ox-html: postamble format

2023-08-10 Thread Ihor Radchenko
Hraban Luyat  writes:

>> Another test for ox-html, this time for postamble options handling. 
>> It's quite tricky, apparently.

Thanks!
Applied, onto main, after adjusting the commit message.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=39ae2eda5

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



Re: [PATCH 1/2] test-ox-html: checkboxes: ascii, html & unicode

2023-08-10 Thread Ihor Radchenko
Hraban Luyat  writes:

> I've added some minor unit tests for checkboxes in ox-html. I was 
> playing around with something I thought was a bug, which turned out to 
> be my project config. Thought I'd share the unit tests anyway, maybe 
> this can help someone down the line create more patches.

Thanks!
Applied, onto main, with minor amendments.
I have updated the commit message to follow our standards and added
skip-unless checks to make sure that the tests will only run when Emacs
has libxml support.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=003927a59

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



Re: [patch] ox-latex.el: fix blank lines behavior in verse block

2023-08-10 Thread Ihor Radchenko
Juan Manuel Macías  writes:

>> Do you mean that people use extra leading/trailing spaces just to get
>> extra vertical space before/after the verse block in _latex_ export?
>
> No, I don't think people use it for that purpose. I meant that if
> someone puts a space before or after the content (which can be usual,
> for clarity):
>
> #+begin_verse
>
> blah...
>
> #+end_verse
>
> that vertical space appears in the export, which shouldn't.

Well. Technically, we already warn users that the blank lines are
preserved in the verse blocks:

12.1 Paragraphs
===

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.

   To preserve the line breaks, indentation and blank lines in a region,
but otherwise use normal formatting, you can use this construct, which
can also be used to format poetry.

 #+BEGIN_VERSE
  Great clouds overhead
  Tiny black birds rise and fall
  Snow covers Emacs

 ---AlexSchroeder
 #+END_VERSE

So, I now think that while extra cleanups might be OK for ox-latex, we
may not want to ignore empty lines universally in all the verse blocks.

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



Re: [SUMMARY] [[bbb:OrgMeetup]] on Wed, Aug 9, 19:00 UTC+3 (was: Interest in an Org video meetup?)

2023-08-10 Thread Ihor Radchenko
Adham Omran  writes:

>> - Adham Omran wrote colemak input method for Arabic (only qwerty-based
>>   variant is available by default in Emacs)
>>   - I suggested submitting it as a patch for Emacs core.
>
> I'll check it out tomorrow, that would be my first patch to the Emacs
> core, any resource suggestions?

You can simply use M-x report-emacs-bug, describe what you have, and ask
for further directions.

If you want to submit an actual patch, it is a similar procedure. Prots
recently described all the steps in
https://protesilaos.com/codelog/2023-08-03-contribute-core-emacs/

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



Re: [SUMMARY] [[bbb:OrgMeetup]] on Wed, Aug 9, 19:00 UTC+3 (was: Interest in an Org video meetup?)

2023-08-10 Thread Adham Omran
Ihor Radchenko  writes:

> Ihor Radchenko  writes:
>
> Thanks everyone who participated! We had quite a few people by Emacs
> meetup standards.

It was very awesome!

> - Adham Omran announced his new package for Anki (flash card/spaced
>   repetition) integration:
>   https://github.com/adham-omran/ankifier 
>   Efficiently create Anki flashcards from your notes.

Thank you, I've been using the ~unstable~ branch for about 8 months now,
so I moved it to the ~master~ branch.  If anyone finds any issue please
open an issue with it!


> - Adham Omran wrote colemak input method for Arabic (only qwerty-based
>   variant is available by default in Emacs)
>   - I suggested submitting it as a patch for Emacs core.

I'll check it out tomorrow, that would be my first patch to the Emacs
core, any resource suggestions?

--
Adham Omran



Re: Passing table to Ruby session

2023-08-10 Thread Ihor Radchenko
Mike Gauland  writes:

> Just to follow up on my problem sending a table to ruby. It doesn't' 
> seem to be an org problem, but with inf-ruby.
> ...
> As long as the code to set the variable is under 4k, it works. When it's 
> longer than that,  process-send-region sends it in pieces, and inf-ruby 
> is apparently prematurely interpreting the incomplete code.
>
> I'll take this up elsewhere, though if anyone here has suggestions for 
> me, or wants further updates, let me know.

4k sounds like a known quirk with pty connection type in Emacs
processes. It may have this 4k limitation at least on some systems.

If you posted a bug report elsewhere, may you please share the link to
that report?

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



Re: Worg: issue with org-tools page

2023-08-10 Thread Ihor Radchenko
Karl Voit  writes:

> I just committed a minimal change to that file which caused the CI
> to re-build the page: https://builds.sr.ht/~bzg/job/975519 which
> ended successfully but still shows an error:
> from the Orgdown file.
> ...
> The issue still persists.

I can finally see this update being published.
There are still some failures to be fixed, but they will now be reported
at https://lists.sr.ht/~bzg/org-build-failures and we should not miss
them.

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



[SUMMARY] [[bbb:OrgMeetup]] on Wed, Aug 9, 19:00 UTC+3 (was: Interest in an Org video meetup?)

2023-08-10 Thread Ihor Radchenko
Ihor Radchenko  writes:

> URL: https://bbb.emacsverse.org/b/iho-h7r-qg8-led
> Time & Date: <2023-08-09 Wed 19:00-21:00 @+03,Europe/Istanbul>
> The room will be open half an hour before the official start.

Thanks everyone who participated! We had quite a few people by Emacs
meetup standards.

Here is a short summary of the main discussion points (those that I
remember):

- Adham Omran announced his new package for Anki (flash card/spaced
  repetition) integration:
  https://github.com/adham-omran/ankifier 
  Efficiently create Anki flashcards from your notes.

- Ilya Cheryshov announced his new package to display agenda time grid
  as _interactive_ svg image. Looks like the usual Google calendar view,
  but inside Emacs.
  https://github.com/ichernyshovvv/org-timeblock/
  Org mailing list discussion: 
https://list.orgmode.org/87edkc85fl.fsf@localhost/T/#t

  - Similar, but ASCII-only package:
https://github.com/ml729/calfw-blocks, based on Calfw Emacs calendar 
framework.

- More on visualizing Org statistics:
  - https://github.com/rksm/clj-org-analyzer/: clocking data visualizer
using web-frontend. Features heatmap view of clocking time
per-day. Allows filtering by tags.
  - https://github.com/Elilif/org-heatmap/: monthly heatmap for habit tracking
  - A bit tangent, but illustrates how to make use of time clocking:
https://samplesize.one/blog/posts/my_year_in_data/
- One more article I did not mention during the meetup:
  https://sqrtminusone.xyz/posts/2023-04-13-emacs/

- [[info:eintr#Top][eintr#Top]] Elisp introduction for non-programmers. This is 
really a
  well-written manual worth reading if your config is larger than a few
  lines.

- yantar92's window manager: Awesome WM https://awesomewm.org/

- https://git.sr.ht/~bzg/worg is the source code of Org WIKI (WORG)
  [ Contributions welcome: a number of articles really need some love there ]
  - We also have some Org internals documented as articles in WORG.

- Meeting report export template (backend):
  https://github.com/DarkBuffalo/ox-report
  which reminded me of actual LaTeX template by Tecosaur (Org dev): 
https://github.com/tecosaur/BMC

- New WIP fast LaTeX preview system with instant preview as you type
  - Demo: https://www.youtube.com/watch?v=n-AfvuV-bYo
  - Another demo previously posted on the mailing list:
https://www.youtube.com/watch?v=n-AfvuV-bYo
  - And the mailing list discussion with more details: 
https://list.orgmode.org/orgmode/87lek2up0w@tec.tecosaur.net/

- =#+begin_src := will give you completion of header arguments
  - Same for #+ keywords and, sometimes, for their values (like for #+TAGS: 
)
  - The underlying code is in lisp/org-pcomplete.el
  - Also, see org-eldoc (part of org-contrib): 
https://git.sr.ht/~bzg/org-contrib/tree/master/item/lisp/org-eldoc.el

- Collaboration using Org mode
  - Concurrent editing options are not great, unfortunately:
- https://code.librehq.com/qhong/crdt.el (need Emacs for all sides)
- https://logseq.com/: similar to notion/obsidian, but supports Org syntax
  - Can use Git, if not real-time. Org is just a plain text.
  - I also used email workflow using pdf export -> sending email ->
getting pdf with comments back -> modifying Org source -> ...

- Authoring books/thesis in Org
  - Adham Omran wrote his thesis in Arabic using Org mode
- Emacs has built-in right-to-left language support
  [[info:emacs#Bidirectional Editing][emacs#Bidirectional Editing]]
- Right-to-left may be mixed with left-to-right (English) in Org
  export, though some LaTeX-specific tweaking may be needed.
  - Org offers _some_ help with #+LANGUAGE document keyword
(see [[info:org#LaTeX specific export settings][org#LaTeX specific 
export settings]])
- Also, https://list.orgmode.org/orgmode/87h6z7jq4o.fsf@localhost/
- There was a question about XeLaTeX, but, AFAIK, event normal
  LaTeX can support Arabic and other Unicode languages with
  polyglossia package. Although fonts may be tricky to set and a
  number of people opt-in to LuaTeX/XeLaTeX for smoother
  experience (the downside is that non-LaTeX may not always be an
  option in real-life publisher requirements)
- Examples from Org mailing list on complex typesetting while keeping 
sources in Org mode
  - https://list.orgmode.org/orgmode/87y1yovcip@posteo.net/
  - The bi-lingual book I mentioned:
https://list.orgmode.org/orgmode/87h70tyyiz@posteo.net/

- Adham Omran wrote colemak input method for Arabic (only qwerty-based
  variant is available by default in Emacs)
  - I suggested submitting it as a patch for Emacs core.

- On the Emacs fringe indicators showing buffer begin/end
  - ↑↓ indicate that there is more text above/below the screen
  - 「」 indicate begin/end of the buffer text within displayed part of the buffer
  - These can be enabled using ~(setq-default indicate-buffer-boundaries 'left)~

- Using ~helm-org-ql~ for searching