Re: [PATCH] Re: New source block results option for attaching file to node

2022-06-13 Thread Ryan Scott
Strange. I'll figure out a better setup for running the tests and get to
the bottom of that.
Thanks for the help.

On Tue, Jun 14, 2022, 00:10 Ihor Radchenko  wrote:

> Ryan Scott  writes:
>
> > Ah sorry about that. I'm on a windows laptop and didn't have make, so was
> > testing interactively and they were passing.
> > I cleaned that up and remove the f-* usage and verified under Ubuntu (on
> > WSL) that the new tests are passing. I was getting some failures with
> > unrelated tests, but also get those in master as well.
>
> I am still getting test failures using Emacs 28.
> All the tests are passing on main.
>
> Example backtrace:
>
> file-name-directory(nil)
>   org-babel-result-to-file("/tmp/test.txt" nil attachment)
>   org-babel-insert-result("/tmp/test.txt" ("replace" "value" "file" "g
>   org-babel-execute-src-block()
>   (progn (org-mode) (let ((point (string-match "" inside-text))
>   (unwind-protect (progn (org-mode) (let ((point (string-match "   (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
>   (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current
>   (let ((inside-text (if (stringp "\n#+begin_src shell :results
>   (let ((lexical-binding nil)) (let ((inside-text (if (stringp "\n   (lambda nil (let ((lexical-binding nil)) (let ((inside-text (if (str
>   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
>   ert-run-test(#s(ert-test :name test-ob/result-graphics-link-type-hea
>   ert-run-or-rerun-test(#s(ert--stats :selector "test-ob" :tests ... :
>   ert-run-tests("test-ob" #f(compiled-function (event-type  event
>   ert-run-tests-batch("test-ob")
>   ert-run-tests-batch-and-exit("test-ob")
>   (let ((org-id-track-globally t) (org-test-selector (if org-test-sele
>   org-test-run-batch-tests("test-ob")
>   command-line-1(("--eval" "(setq vc-handled-backends nil org-startup-
>   command-line()
>   normal-top-level()
> Test test-ob/result-graphics-link-type-header-argument condition:
> (wrong-type-argument stringp nil)
>FAILED  129/140  test-ob/result-graphics-link-type-header-argument
> (0.006189 sec)
>
> Best,
> Ihor
>


Old user needs help

2022-06-13 Thread Peter Gragert
Hallo, and thanks for reading.
I am an old user of emacs (since foregoing century) meanwhile  80 year and
5 month old.
Using W11 on an HP laptop
I downloaded emacs (got it in my private Download directory and extracted
the zip THERE)
made a desktop link to run runemacs
And works nicely
using org mode for a lot of different tasks  (as I did already long ago)
Came across orgmode.org   but that info I can not get to work .

For example I got not as years ago an  .emacs  at c:/ as was done years ago
by installing emacs

For example I have a juni2022.org file and would like that that org-file is
opened automatically on a click on the emacs desktop short-cut icon.
(years ago something in init.el (load-file "..." )if  I remember correctly

So understanding orgmode.com I need, so it looks like, that I have first to
adjust my emacs installation. I appreciate any help.
Thanks Peter Gragert


[BUG] Ignoring link syntax inside of src blocks [9.5.4 (9.5.4-ged6f8d)]

2022-06-13 Thread Gomez, Daniel
Hi all,

The link syntax [[link]] is parsed as an org-link inside of a source block, as 
shown in the code below:

#+begin_src emacs-lisp
[[2]]
#+end_src

This if fine in the example above, but consider a language like python. The 
link syntax is also valid python syntax:

#+begin_src python
x = np.array([[2]])
#+end_src

If I now toggle link display with org-toggle-link-display, then my python code 
is still valid, but reads as if it'd be wrong (as illustrated here):

#+begin_src python
x = np.array(2)  # the [[]] appear hidden.
#+end_src

How could I tell org-mode to not parse links inside of org src-blocks?

Emacs  : GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin19.6.0, NS 
appkit-1894.70 Version 10.15.7 (Build 19H1922))
 of 2022-06-10
Package: Org mode version 9.5.4 (9.5.4-ged6f8d)


Regards,

Daniel
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
 .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 


[BUG] Ignoring link syntax inside of src blocks [9.5.4 (9.5.4-ged6f8d @ /Users/dangom/.emacs.d.vanilla/straight/build/org/)]

2022-06-13 Thread Gomez, Daniel
Hi all,

The link syntax [[link]] is parsed as an org-link inside of a source block, as 
shown in the code below:

#+begin_src emacs-lisp
[[2]]
#+end_src

This if fine in the example above, but consider a language like python. The 
link syntax is also valid python syntax:

#+begin_src python
x = np.array([[2]])
#+end_src

If I now toggle link display with org-toggle-link-display, then my python code 
is still valid, but reads as if it'd be wrong (as illustrated here):

#+begin_src python
x = np.array(2)  # the [[]] appear hidden.
#+end_src

How could I tell org-mode to not parse links inside of org src-blocks?

Emacs  : GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin19.6.0, NS 
appkit-1894.70 Version 10.15.7 (Build 19H1922))
 of 2022-06-10
Package: Org mode version 9.5.4 (9.5.4-ged6f8d)


Regards,

Daniel
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
 .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 




Indenting a blank definition list item leaves point at beginning of line

2022-06-13 Thread JD Smith
Org 9.5.4 (point at `X’):

- foo :: bar X [M-Ret]
- X :: [M-right]

leaves point at beginning of line:

- foo :: bar
X  - :: 

If you add content first, point stays put.

Re: Org default is Left-to-right

2022-06-13 Thread Ihor Radchenko
Ihor Radchenko  writes:

> I tried to create a large file in Persian, but I cannot see any
> difference in performance when bidi-paragraph-direction is nil or
> 'left-to-right. However, I was able to see a difference using the
> attached file when moving through an artificially created very long line
> in the second heading. In my testing, setting bidi-paragraph-direction
> to nil *improves* the performance.

I tried to get additional feedback from other right-to-left language
users, but no luck
(https://old.reddit.com/r/orgmode/comments/v9nouy/help_org_with_righttoleft_language_defaults/)

The Emacs devs reply was that 'right-to-left global setting is preferred
for such users while nil being preferred setting for other users and it
should not be something Org decides.

Hence, I just applied a patch removing Org setting
bidi-paragraph-direction to main (0cdbc63a0).

Best,
Ihor



Re: [BUG] incorrect cached element under native-comp [9.5.4 (9.5.4-ga8b322 @ /Users/jabrahms/.emacs.d/straight/build/org/)]

2022-06-13 Thread Ihor Radchenko
"Justin Abrahms"  writes:

> I've recently upgraded to emacs 29 w/ native-comp support. I'm
> consistently getting this error when I load emacs.org and it stops
> parsing my document, which is a bit painful. Hopefully this bug report
> helps.
>
> My full emacs.org: 
> https://gist.github.com/justinabrahms/7fc5bfcc292ca6fba7d10ec2958bae57
>
> Error I see in *Warnings*: 
>
> Warning (org-element-cache): org-element--cache: (ivy-alt-done) Cached 
> element is incorrect in emacs.org. (Cache tic up to date: "yes") Resetting.

Thanks for reporting!

Do I understand correctly that you observe the error when you are trying
to jump to a candidate from swiper buffer?

Could you please set org-element--cache-self-verify to 'backtrace,
org-element--cache-self-verify-frequency to 1.0, try to trigger the
error; and then post the full backtrace?

Best,
Ihor



Re: [BUG] Info JS does not work [9.5.3 (release_9.5.3-467-g2bd34e @ /Users/salutis/src/org-mode/lisp/)]

2022-06-13 Thread Ihor Radchenko
Bastien  writes:

> Bastien  writes:
>
>> There is such a SourceHut project: https://sr.ht/~bzg/orgmode/
>
> The sr.ht project is now on https://sr.ht/~bzg/org/ and lists all
> relevant repositories, including a mirror of the official org-mode
> repository at https://git.sr.ht/~bzg/org-mode.

Great! Will it be linked at orgmode.org? Org contribute page is lacking
links to all the repositories (which someone already complained about).
Addition link at the frontpage might also make sense.

Best,
Ihor



Re: [BUG] org-copy-subtree in a file with local variables marks buffer as modified [9.5.3 (release_9.5.3-6-gef41f3 @ /home/ignacio/repos/emacs/lisp/org/)]

2022-06-13 Thread Ihor Radchenko
Ignacio Casso  writes:

> I've written a patch proposal. It deals with buffer-modified-p and undo
> history, but not the other two points you mention. I have tested it and
> it works, but I had never dealt before with `buffer-undo-list' so maybe
> there are some cases that I have not considered and for which this patch
> could be problematic. Let me know what you think:

Thanks!

> -   (delete-and-extract-region (point) (point-max)))
> +   (undo-boundary)

> +   (setq buffer-undo-list
> + (seq-drop-while 'identity buffer-undo-list)))

This looks fragile and can be disasterous when buffer-undo-list is
large.

Maybe just use with-silent-modifications or some ideas from there (for
example, wrapping modifications inside let-bound (buffer-undo-list t))?
We should not inhibit modification hooks though. Otherwise, it will mess
up with caching code.

Best,
Ihor



Re: org-crypt ?

2022-06-13 Thread Ihor Radchenko
David Masterson  writes:

>> You just need to set org-crypt-key to your key name.
>>
>
> As well as setup GnuPG properly...  ;-)

I remeber using https://wiki.gentoo.org/wiki/GnuPG as a reference.

Best,
Ihor



Re: [PATCH] Re: New source block results option for attaching file to node

2022-06-13 Thread Ihor Radchenko
Ryan Scott  writes:

> Ah sorry about that. I'm on a windows laptop and didn't have make, so was
> testing interactively and they were passing.
> I cleaned that up and remove the f-* usage and verified under Ubuntu (on
> WSL) that the new tests are passing. I was getting some failures with
> unrelated tests, but also get those in master as well.

I am still getting test failures using Emacs 28.
All the tests are passing on main.

Example backtrace:

file-name-directory(nil)
  org-babel-result-to-file("/tmp/test.txt" nil attachment)
  org-babel-insert-result("/tmp/test.txt" ("replace" "value" "file" "g
  org-babel-execute-src-block()
  (progn (org-mode) (let ((point (string-match "" inside-text))
  (unwind-protect (progn (org-mode) (let ((point (string-match "#+begin_src shell :results
  (let ((lexical-binding nil)) (let ((inside-text (if (stringp "\n

Re: [BUG] org-capture autoload bug? [9.5.2 (9.5.2-gfbff08 @ /home/ignacio/.emacs.d/elpa/org-9.5.2/)]

2022-06-13 Thread Ihor Radchenko
Ignacio Casso  writes:

>> LGTM! Unless others have objections, I am inclined to merge the patch
>> fully. But please add changlog entries to the commit message.
>
> Done. I attach the patch with the new commit message.

Thanks! Some more comments.

> Subject: [PATCH] use `set-default-toplevel-value' in `defcustom' setters
   ^Use

> * lisp/ob-lilypond.el (org-babel-lilypond-commands): use
   ^Use
> `set-default-toplevel-value' instead of `set' or `set-default' in
> `defcustom' :set argument.
> * lisp/ob-shell.el (org-babel-shell-names): Ditto.

Please don't use ditto. (what does it even mean?)

> This commit fixes a bug that occurred when using an autoload function
> inside a let-binding for a custom variable when the feature defining
> both the function and the custom variable had not been loaded yet.

It would be helpful to reference the relevant ML discussions.

Best,
Ihor



Re: [Patch] ob-tangle.el: New value 'ascii' for the header argument ':comments'

2022-06-13 Thread Ihor Radchenko
Juan Manuel Macías  writes:

> My first approach was actually to define some options for
> org-babel-process-comment. But I noticed that a header with properties,
> for example:
> ...
>
> I think the culprit is the '(match-end 0)' in
> org-babel-tangle-single-block:
>
> ...
>(org-back-to-heading t) ; Sets match data
>(match-end 0)) ;; <=
>(error (point-min)))

I think that the existing code can be improved. Relying on the
undocumented behavior of (org-back-to-heading) is not ideal. Not to
mention code blocks before first headline.

It would be great if you rewrite the existing code to suite both the
defaults and the proposed behavior.

Best,
Ihor



Re: [PATCH] Fix caption format for custom latex src block

2022-06-13 Thread Ihor Radchenko
Matt Huszagh  writes:

> This patch fixes an issue in which captions for custom listing
> environments are not converted correctly. To illustrate the issue,
> take the following MWE.

Thanks!

> -(?c . ,caption)
> +(?c . ,(org-export-data (org-export-get-caption 
> src-block)
> +   info))

I think that it will be better if you use
org-latex--caption/label-string instead. It will take care about short
captions as well.

Best,
Ihor



Re: [BUG] worg-setup.org is outdated

2022-06-13 Thread Ihor Radchenko
Tim Cross  writes:

>> At an occation, FYI another two interesting ideas I noted a while back:
>> https://staticman.net/
>> https://isso-comments.de/docs/
>
> Will certainly have a look. However, I'm a little wary about adding
> comment support. Problem is, once you add comment support, you need to
> then monitor the comments for inappropriate content and spam.

The first link says that it is aiming to redirect comments to patches.
If we can somehow connect it to Org ML (or sourcehut ML -> Org ML), it
will effectively redirect comments from the website to Org ML without
breaking our usual workflows.

Best,
Ihor



Re: [BUG] worg-setup.org is outdated

2022-06-13 Thread Tim Cross


Ihor Radchenko  writes:

> Tim Cross  writes:
>
>>> Also, you may find https://github.com/oyvindstegard/ox-tagfilter-js
>>> useful.
>>>
>>
>> Thanks, I will check it out. 
>
> At an occation, FYI another two interesting ideas I noted a while back:
> https://staticman.net/
> https://isso-comments.de/docs/
>
> (that is: comment support for WORG)
>

Will certainly have a look. However, I'm a little wary about adding
comment support. Problem is, once you add comment support, you need to
then monitor the comments for inappropriate content and spam. On some
levels, I'd rather people comment here on the list so that its in one
place. The other side of the coin is that it would be great if people
could add comments, particularly to update information relating to
examples etc. People are often more willing to leave a comment than
provide a patch. 





Re: [BUG] worg-setup.org is outdated

2022-06-13 Thread Ihor Radchenko
Tim Cross  writes:

>> Also, you may find https://github.com/oyvindstegard/ox-tagfilter-js
>> useful.
>>
>
> Thanks, I will check it out. 

At an occation, FYI another two interesting ideas I noted a while back:
https://staticman.net/
https://isso-comments.de/docs/

(that is: comment support for WORG)

Best,
Ihor



Re: [BUG] worg-setup.org is outdated

2022-06-13 Thread Tim Cross


Ihor Radchenko  writes:

>>
>> The thing about a static web site is that it needs good navigation to
>> make it useable and easy to explore (which I think is critical with
>> something like worg). To achieve that, there needs to be some
>> 'knowledge' about the pages and their relationship to each other - it
>> isn't quite as simple as just having a lot of static pages on a server. 
>
> Agree. WORG navigation is not ideal (to say the least).
> Note that we can leverage index functionality of ox-publish. See
> https://orgmode.org/manual/Site-map.html#Site-map
> and
> https://orgmode.org/manual/Generating-an-index.html
>

Yes, just started looking at that to see what I could leverage off. 

> Also, you may find https://github.com/oyvindstegard/ox-tagfilter-js
> useful.
>

Thanks, I will check it out. 

My general feeling is that I may be able to make matters better and as
long as I stick to core functionality as much as possible, am unlikely
to make it significantly worse!

>> First step is to get a working local copy so that I have something to
>> work with. AFter that and a bit of exploring, I should have a better
>> understanding and idea how to go forward. 
>
> Last time I tried to achive this, I had to tweak the css paths a bit,
> edited paths in publish scirpt, and got everything working locally.
> (without running server)
>

Yes, pretty much what I expected. Luckily, I already have a server setup
which I use for other development work, so that isn't an issue. Have
noticed some things which look like they will need tweaking (I also hope
to document some of this and where possible isolate things so that
others can clone and run easier as well - might help with contributions
and probably won't hurt. 



Re: [BUG] Ignoring link syntax inside of src blocks [9.5.4 (9.5.4-ged6f8d)]

2022-06-13 Thread Ihor Radchenko
"Gomez, Daniel"  writes:

> The link syntax [[link]] is parsed as an org-link inside of a source block, 
> as shown in the code below:
>
> #+begin_src emacs-lisp
> [[2]]
> #+end_src

WIP. See https://orgmode.org/list/87ee7c9quk.fsf@localhost

Best,
Ihor



Re: [BUG] worg-setup.org is outdated

2022-06-13 Thread Ihor Radchenko
Tim Cross  writes:

>> I suspect that the real reason is lack of experience with CSS and JS.
>> Also, we don't really want a high entry barrier for contributors (but
>> then, again, we haven't had many contributors to WORG html side over the
>> years anyway, AFAIK).
>
> I actually think a basic framework, such as Bulma or Tailwind, would
> lower the barrier. CSS is possibly the most challenging part of doing
> decent web pages - especially if you want responsive pages which work
> well on large and small screens and with respect to accessibility. 
> 
> These frameworks are easy to learn - far easier than learning CSS.
> Anyone who knows CSS will have no problem using them and anyone who
> doesn't will find using the framework much easier than having to learn
> 'raw' CSS, which has some pretty narly dark corners which take
> considerable effort to master. 

Then, it sounds like a good path forward.

>> AFAIK, worg is very simple. We just rely on ox-html to produce output
>> and then publish a static website. That's it.
>>
>
> The thing about a static web site is that it needs good navigation to
> make it useable and easy to explore (which I think is critical with
> something like worg). To achieve that, there needs to be some
> 'knowledge' about the pages and their relationship to each other - it
> isn't quite as simple as just having a lot of static pages on a server. 

Agree. WORG navigation is not ideal (to say the least).
Note that we can leverage index functionality of ox-publish. See
https://orgmode.org/manual/Site-map.html#Site-map
and
https://orgmode.org/manual/Generating-an-index.html

Also, you may find https://github.com/oyvindstegard/ox-tagfilter-js
useful.

> First step is to get a working local copy so that I have something to
> work with. AFter that and a bit of exploring, I should have a better
> understanding and idea how to go forward. 

Last time I tried to achive this, I had to tweak the css paths a bit,
edited paths in publish scirpt, and got everything working locally.
(without running server)

Best,
Ihor




Re: [BUG] worg-setup.org is outdated

2022-06-13 Thread Tim Cross


Ihor Radchenko  writes:

> Tim Cross  writes:
>
>> Just a couple of questions regarding all of this (really just
>> background and to anyone who may have the knowledge, not just Bastien)
>>
>> Is there any reason we don't use a CSS framework, like bulma or
>> tailwind to manage the CSS? I know that using JS can be an issue, but
>> what about a CSS only framework with an MIT license? This would make it
>> *much* easier to have a site which is both responsive and looks good on
>> different sized displays, is accessibility compliant, works well across
>> different browsers and is easier to maintain while still avoiding
>> inclusion of JS (Ironically, I know JS a lot better than CSS!). 
>
> I suspect that the real reason is lack of experience with CSS and JS.
> Also, we don't really want a high entry barrier for contributors (but
> then, again, we haven't had many contributors to WORG html side over the
> years anyway, AFAIK).

I actually think a basic framework, such as Bulma or Tailwind, would
lower the barrier. CSS is possibly the most challenging part of doing
decent web pages - especially if you want responsive pages which work
well on large and small screens and with respect to accessibility. 

>
> Note that JS is not strictly disallowed (e.g. see
> https://orgmode.org/worg/code/org-info-js/). It's just that we have an
> FSF requirement to have a website viewable from non-JS browsers.
> However, even this requirement may not be enforced given sufficient
> justification. Only the main orgmode.org website must follow FSF
> guidelines strictly (https://git.sr.ht/~bzg/orgweb). WORG
> (https://git.sr.ht/~bzg/worg) is more lax. It may be a good idea to use
> something GPL-compatible though.
>

I don't plan to use JS. THis site doesn't need JS support. More
importantly, while older CSS frameworks, such as bootstrap, relied on JS
as part of the framework, due to advances in CSS, more modern CSS
frameworks like Bulma and Tailwind are able to achieve similar
functionality just using CSS. 

These frameworks are easy to learn - far easier than learning CSS.
Anyone who knows CSS will have no problem using them and anyone who
doesn't will find using the framework much easier than having to learn
'raw' CSS, which has some pretty narly dark corners which take
considerable effort to master. 

>> Finally, Bastien and others who may have worked on worg previously, if
>> yuou have any notes or points which you think it would help for me to
>> know, please feel free to send them through directly. While I've done a
>> bit of HTML and CSS in the past, I've only ever used org mode for very
>> simple/minor HTML output and usually for my own personal consumption.
>> I've never taken advantage of the publishing side of org. 
>
> AFAIK, worg is very simple. We just rely on ox-html to produce output
> and then publish a static website. That's it.
>

The thing about a static web site is that it needs good navigation to
make it useable and easy to explore (which I think is critical with
something like worg). To achieve that, there needs to be some
'knowledge' about the pages and their relationship to each other - it
isn't quite as simple as just having a lot of static pages on a server. 

First step is to get a working local copy so that I have something to
work with. AFter that and a bit of exploring, I should have a better
understanding and idea how to go forward. 




Re: [BUG] worg-setup.org is outdated

2022-06-13 Thread Ihor Radchenko
Tim Cross  writes:

> Just a couple of questions regarding all of this (really just
> background and to anyone who may have the knowledge, not just Bastien)
>
> Is there any reason we don't use a CSS framework, like bulma or
> tailwind to manage the CSS? I know that using JS can be an issue, but
> what about a CSS only framework with an MIT license? This would make it
> *much* easier to have a site which is both responsive and looks good on
> different sized displays, is accessibility compliant, works well across
> different browsers and is easier to maintain while still avoiding
> inclusion of JS (Ironically, I know JS a lot better than CSS!). 

I suspect that the real reason is lack of experience with CSS and JS.
Also, we don't really want a high entry barrier for contributors (but
then, again, we haven't had many contributors to WORG html side over the
years anyway, AFAIK).

Note that JS is not strictly disallowed (e.g. see
https://orgmode.org/worg/code/org-info-js/). It's just that we have an
FSF requirement to have a website viewable from non-JS browsers.
However, even this requirement may not be enforced given sufficient
justification. Only the main orgmode.org website must follow FSF
guidelines strictly (https://git.sr.ht/~bzg/orgweb). WORG
(https://git.sr.ht/~bzg/worg) is more lax. It may be a good idea to use
something GPL-compatible though.

> Finally, Bastien and others who may have worked on worg previously, if
> yuou have any notes or points which you think it would help for me to
> know, please feel free to send them through directly. While I've done a
> bit of HTML and CSS in the past, I've only ever used org mode for very
> simple/minor HTML output and usually for my own personal consumption.
> I've never taken advantage of the publishing side of org. 

AFAIK, worg is very simple. We just rely on ox-html to produce output
and then publish a static website. That's it.

Best,
Ihor



Re: Org mode and Emacs (was: Convert README.org to plain text README while installing package)

2022-06-13 Thread Ihor Radchenko
I am CCing Org ML from now signifying that this branch of the thread is
directly relevent to Org mode and might be of interest for other Org
contributors.

Richard Stallman  writes:

>   > So, now we have our manual written in Org mode and we never had reasons
>   > to come back to texi.
>
> I suspect that it doesn't fully follow the markup conventions
> for GNU manuals.  That's because we designed Texinfo to have markup commands
> to make all the proper semantic distinctions.  If the manual source
> is written in a language which doesn't have the full gamut of markup
> distinctions, there is no way to do the markup correctly.
>
> It would be useful for someone who understands these conventions
> to check the Org manual and see.

Yes, it would certainly help!
The work on manual has been done a long time ago and we also extended
our texinfo exported to suit the manual at that time. Assumingly, just
enough to handle the Org manual use-cases.

Note that we have doc/Documentation_Standards.org explaining some of the
conventions.

Here is a possibly relevant note inside it:

 - Only two of the standard Texinfo indexes are used; those for
   concepts and keys.  This has some implications:

   + The preference is to document commands by key rather than by name

   + Texinfo commands such as @var and @defoption are not used.  The
 preference for this type of thing is that the user browses the
 customize groups.  If you want or need to refer to, say, a
 variable then document it as "the variable
 @code{org-startup-folded}"
 
   + Entries in the concept index are normally all lower case unless
 some other rule dictates otherwise.

Without knowing texinfo, the above paragraphs do not make a whole lot of
sense for me. So, if someone points out any omissions, it would be
helpful for future Org contributors.

> I don't think the slowness of processing nowadays is the crucial issue
> here.  Computers are much faster now than in the 1990s.  It used
> to take a long time for TeX to process the Emacs Lisp Reference Manual.
> Now it is perhaps 10 times as fast.

Generally, there is no way Org export to .info gets any faster than
texinfo. Org is only able to export to other text formats: org->texi;
org->tex; org->html; etc. Convertion to more low-level formats is left
to the external tools like texinfo and pdflatex.

As for reports on the slow performance, they are still useful as long as
they reveal some bottlenecks in Org exporter. Org is being used to
export large documents and whole websites. Hence, improving performance
in this area is generally helpful, even if it is not strictly a critical
blocking issue.

What I want to say is: do not expect Org export to be faster than native
binary tools, but do not hesitate to report performance issues either.

Best,
Ihor



Re: [BUG] worg-setup.org is outdated

2022-06-13 Thread Tim Cross


Bastien Guerry  writes:

> Hi Ihor,
>
> Ihor Radchenko  writes:
>
>> Sorry. worg-setup.org is outdated. Bastien, could you update it?
>
> Done, thanks for the heads up.

Thanks Bastien, that will help!

Just a couple of questions regarding all of this (really just
background and to anyone who may have the knowledge, not just Bastien)

Is there any reason we don't use a CSS framework, like bulma or
tailwind to manage the CSS? I know that using JS can be an issue, but
what about a CSS only framework with an MIT license? This would make it
*much* easier to have a site which is both responsive and looks good on
different sized displays, is accessibility compliant, works well across
different browsers and is easier to maintain while still avoiding
inclusion of JS (Ironically, I know JS a lot better than CSS!). 

I'm going to see if I can get a local copy of worg running so that I
have an environment to work with. However, one thing which occurs to me
is that it might be quite nice if we also had a dev site in addition to
the prod site. It should be possible to setujp something with CI such
that you could deploy to a 'dev' url on orgmode.org rather than the
production one. This would make testing of patches etc much easier. It
would also mean I could do the work I'm looking at, deploy to dev site,
ask for feedback on the list, review and later deploy to prod site
without affecting the prod site until we are ready. To do this, it would
be necessary to have Bastien (or someone with the necessary access)
assistance to modify server configurations (like web server config). 

Finally, Bastien and others who may have worked on worg previously, if
yuou have any notes or points which you think it would help for me to
know, please feel free to send them through directly. While I've done a
bit of HTML and CSS in the past, I've only ever used org mode for very
simple/minor HTML output and usually for my own personal consumption.
I've never taken advantage of the publishing side of org. 



Re: [BUG] Ignoring link syntax inside of src blocks [9.5.4 (9.5.4-ged6f8d)]

2022-06-13 Thread Gomez, Daniel
Hi all,

The link syntax [[link]] is parsed as an org-link inside of a source block, as 
shown in the code below:

#+begin_src emacs-lisp
[[2]]
#+end_src

This if fine in the example above, but consider a language like python. The 
link syntax is also valid python syntax:

#+begin_src python
x = np.array([[2]])
#+end_src

If I now toggle link display with org-toggle-link-display, then my python code 
is still valid, but reads as if it'd be wrong (as illustrated here):

#+begin_src python
x = np.array(2)  # the [[]] appear hidden.
#+end_src

How could I tell org-mode to not parse links inside of org src-blocks?

Emacs  : GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin19.6.0, NS 
appkit-1894.70 Version 10.15.7 (Build 19H1922))
 of 2022-06-10
Package: Org mode version 9.5.4 (9.5.4-ged6f8d)


Regards,

Daniel
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
 .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 


Re: Org Agenda Error

2022-06-13 Thread Bhavin Gandhi
On Sun, 12 Jun 2022 at 23:16, Bhavin Gandhi  wrote:
> 1. emacs -Q
> 2. Create test.org with following content
>
> * TODO Repeating entry
> SCHEDULED: <2022-05-01 Mon ++2d>
>
> 3. C-c C-t on the entry, shows the above error. And shifts the scheduled
>date correctly.

When this error appears, the log note entry about state change is not
added. I found this issue for the first time when I saw the state
change log notes were missing.

If I do C-c C-t again on the same entry, we get the note.
- State "DONE"   from "TODO"   [2022-06-13 Mon 22:48]

This is missing when we hit the error mentioned in the first mail.



Re: [BUG] worg-setup.org is outdated

2022-06-13 Thread Bastien Guerry
Hi Ihor,

Ihor Radchenko  writes:

> Sorry. worg-setup.org is outdated. Bastien, could you update it?

Done, thanks for the heads up.

-- 
 Bastien



Re: [BUG] worg-setup.org is outdated

2022-06-13 Thread Bastien Guerry
Hi Tim,

Tim Cross  writes:

> A 'refresh' of the look probably isn't a bad thing. However, getting it
> right and consistent is likely non-trivial. Not sure if my css skills
> are up to it, but willing to have a look at it anyway. 

Thanks in advance for looking into this!

-- 
 Bastien



Re: idea for capture anywhere in x

2022-06-13 Thread Michal Politowski
Dnia Mon, 13 Jun 2022 17:04:46 +0700, Max Nikulin napisał(a):
> On 13/06/2022 16:10, Michal Politowski wrote:
> > 
> > $ xclip -selection clipboard -o -t text/x-moz-url-priv
> > https://orgmode.org/
> 
> Thank you for the trick.
> 
> Have you ever tried to set drag-n-drop handler for org buffers to invoke
> e.g. `org-store-link'? I mean dragging a link or URL from the address bar
> from a browser to an emacs window. I am curious how much information is
> available in such case.

No, I haven't. Sorry.

-- 
Michał Politowski
Talking has been known to lead to communication if practiced carelessly.



orgtables should taking into account empty cells when adding

2022-06-13 Thread Uwe Brauer
Hi

Consider please
#+begin_src emacs-lisp :results silent :exports none
| Name  | Theory | Matlab | Exercises | Result |
|---+++---+|
| User1 |  5 |  2 | 1 | 8  |
| User2 ||  2 | 1 | NP |
| User3 |  4 |  1 |   | NP |
,#+TBLFM: $5=if(typeof(vsum($2..$4)) == 12 , string("NP"),vsum($2..$4)); E f-1
#+end_src

Each cell in a row that is empty results in the string NP, so far so good.
Now I want to achieve the same but only if cells in the second column are 
empty. So I thought 

#+begin_src emacs-lisp :results silent :exports none
| Name  | Theory | Matlab | Exercises | Result |
|---+++--+---|
| User1 |  5 |  2 |1 | 8 |
| User2 ||  2 |1 |NP |
| User3 |  4 |  1 |0 | 5 |
#+TBLFM: $5=if("$2" == "nan", string("NP"),vsum($2..$4)); E f-1
#+end_src

That looks ok, however when say a cell in the third column is empty, the 
problem starts
because it results in 
#+begin_src emacs-lisp :results silent :exports none
| Name  | Theory | Matlab | Exercises | Result |
|---+++---+|
| User1 |  5 |  2 | 1 |  8 |
| User2 ||  2 | 1 | NP |
| User3 |  4 |  1 |   |nan |
,#+TBLFM: $5=if("$2" == "nan", string("NP"),vsum($2..$4)); E f-1
#+end_src

Any idea how to solve this problem (I don't know how to have several ifs in 
such expression)

regards

Uwe Brauer 

   




[BUG] Mention #+PRINT_BIBLIOGRAPHY in the Org manual

2022-06-13 Thread Rudolf Adamkovič
Hello there!

I wonder why the Org manual at

https://orgmode.org/manual/Citation-handling.html

does not mention the #+PRINT_BIBLIOGRAPHY keyword.

It all makes no sense without printing the bibliography, right?

(Not sure, hence the question mark.)

Rudy
-- 
"Thinking is a momentary dismissal of irrelevancies."
-- Richard Buckminster Fuller, 1969

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



Re: [Patch] ob-tangle.el: New value 'ascii' for the header argument ':comments'

2022-06-13 Thread Juan Manuel Macías
Hi, Rudolph,

Rudolf Adamkovič writes:

> Oh, I see.  Thank you for the explanation.  I can see myself using such
> new tangle comments all the time!  But then, I use UTF-8 and not the
> standard 7-bit ASCII for my Org documents.  Hence, I would want to see
> ':comments plain' or ':comments plain-text' instead.

What you comment makes sense, because `ascii' can lead to confusion. I
chose the term `ascii' because the backend used to convert the text is
called `ascii', although if I evaluate something like

(org-export-string-as "αβγδ" 'ascii t)

the result is utf8.

I think it might be a good idea to use `plain' for the value name, as
you say, instead of `ascii'...

Best regards,

Juan Manuel 



Re: idea for capture anywhere in x

2022-06-13 Thread Max Nikulin

On 13/06/2022 16:10, Michal Politowski wrote:


$ xclip -selection clipboard -o -t text/x-moz-url-priv
https://orgmode.org/


Thank you for the trick.

Have you ever tried to set drag-n-drop handler for org buffers to invoke 
e.g. `org-store-link'? I mean dragging a link or URL from the address 
bar from a browser to an emacs window. I am curious how much information 
is available in such case.





[PATCH] org.el (org-format-latex-header): put DEFAULT-PACKAGES before PACKAGES

2022-06-13 Thread Sébastien Miquel

Hi,

The attached patch puts DEFAULT-PACKAGES before PACKAGES in 
org-format-latex-header, as per org-latex-packages-alist's and 
org-latex-classes' documentations.


Regards,

--
Sébastien Miquel
From 983e35f19371e3ea85ed28bd46f36ea5a52a3950 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= 
Date: Mon, 13 Jun 2022 11:04:34 +0200
Subject: [PATCH] org.el (org-format-latex-header): put DEFAULT-PACKAGES before
 PACKAGES

* lisp/org.el (org-format-latex-header): put DEFAULT-PACKAGES before
PACKAGES, as per org-latex-packages-alist's documentation.
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 95dff27ad..0acfa4846 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3248,8 +3248,8 @@ images at the same place."
 
 (defcustom org-format-latex-header "\\documentclass{article}
 \\usepackage[usenames]{color}
-\[PACKAGES]
 \[DEFAULT-PACKAGES]
+\[PACKAGES]
 \\pagestyle{empty} % do not remove
 % The settings below are copied from fullpage.sty
 \\setlength{\\textwidth}{\\paperwidth}
-- 
2.36.1



Re: idea for capture anywhere in x

2022-06-13 Thread Michal Politowski
Dnia Thu,  9 Jun 2022 19:35:52 -0700, Samuel Wales napisał(a):
[...]
> otoh, if there is such a thing as "a cli command that will ask firefox
> for its current url" then it is possible.

Not exactly this (and what is current with many windows and tabs?), but it 
seems that when Firefox
owns a selection, you can ask it not only for the text but also for the URL:

$ xclip -selection clipboard -o -t text/plain
A GNU Emacs major mode for keeping notes, authoring documents,
computational notebooks, literate programming, maintaining to-do lists,
planning projects, and more \u2014 in a fast and effective plain text
system.

$ xclip -selection clipboard -o -t text/x-moz-url-priv
https://orgmode.org/

$ xclip -selection clipboard -o -t TARGETS
TIMESTAMP
TARGETS
MULTIPLE
SAVE_TARGETS
text/html
text/_moz_htmlcontext
text/_moz_htmlinfo
UTF8_STRING
COMPOUND_TEXT
TEXT
STRING
text/plain;charset=utf-8
text/plain
text/x-moz-url-priv

-- 
Michał Politowski
Talking has been known to lead to communication if practiced carelessly.



Re: [Patch] ob-tangle.el: New value 'ascii' for the header argument ':comments'

2022-06-13 Thread Rudolf Adamkovič
Juan Manuel Macías  writes:

> but in this way:
>
> 
> ;; Variables
> ;; ==
> ;; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
> ;; hendrerit tempor tellus. Donec pretium posuere tellus.
> 

Hello again, Juan!

Oh, I see.  Thank you for the explanation.  I can see myself using such
new tangle comments all the time!  But then, I use UTF-8 and not the
standard 7-bit ASCII for my Org documents.  Hence, I would want to see
':comments plain' or ':comments plain-text' instead.

Rudy
-- 
"Genius is 1% inspiration and 99% perspiration."
-- Thomas Alva Edison, 1932

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



Re: idea for capture anywhere in x

2022-06-13 Thread Max Nikulin

On 10/06/2022 09:35, Samuel Wales wrote:

with the org capture firefox extension broken, i recalled this old
thread, thinking it might be a fix,  and i think i understand the
issue.  so i thought i would summarize here in this one post.


Samuel, have you managed to fix org-protocol setup? From other messages 
I am almost sure that the issue is not with the firefox add-on.


Anyway in this thread people suggested to use `org-capture' directly, so 
it may be a workaround for a while


emacsclient --eval '(org-capture nil "c")'

You can add such command to your fluxbox menu. I have the following 
template:


 ("c" "Clipboard" entry
  (file "")
  "* %?%(org-get-x-clipboard 'CLIPBOARD)
" :empty-lines 1)

I do not remember why "%c" and "%x" substitutions did not work for me, 
perhaps too old org system package. 'PRIMARY should be even more convenient.



otoh, if there is such a thing as "a cli command that will ask firefox
for its current url" then it is possible.


It was you who found https://github.com/bitspook/spookfox I never tried 
it, but I do not see any way to fetch something from firefox besides 
this kind of extensions (KDE plasma integration or 
https://github.com/osnr/TabFS).


You can copy URL to clipboard, just select text and obtain both PRIMARY 
and CLIPBOARD from an org-capture template.


An idea for any application accordingly to the subject. It is possible 
to obtain window title, something like


 xdotool getactivewindow getwindowname

(untested), or more low level

xprop -id "$(
xprop -root -f _NET_ACTIVE_WINDOW 0x '=$0' _NET_ACTIVE_WINDOW |
cut -f 2- -d =
)" -f _NET_WM_NAME 8s '=$0' _NET_WM_NAME |
cut -f 2- -d =

Finally a bonus for those who read mails till the end of the message. I 
have figured out how to get org markup from selection in firefox, 
libreoffice writer, etc. Unsure if such approach has some security 
issues, I never tried to evaluate to which degree pandoc is safe. It can 
be called from emacs to insert output into the current buffer or "| 
xclip -in" may be appended to replace selection buffer. More accurate 
script can check

"xclip -out -target TARGETS" for presence of "text/html" string

#!/bin/bash
set -o pipefail
selection=primary
xclip -selection "$selection" -out -target text/html 2>/dev/null |
 pandoc --from=html --to=org - ||
 xclip -selection "$selection" -out




Re: [BUG] worg-setup.org is outdated (was: [accessibility] worg obscures text)

2022-06-13 Thread Timothy
Hi Tim,

Tim Cross  writes:

> A ’refresh’ of the look probably isn’t a bad thing. However, getting it
> right and consistent is likely non-trivial. Not sure if my css skills
> are up to it, but willing to have a look at it anyway.

A complete revamp of worg is something I’ve chatted to someone about, with ideas
of making the network of page links visible and able to be used for navigation.

Unfortunately, this chat was ~a year ago and has stalled, thank to the eternal
issue of: too many projects, not enough time.

If anybody has a spare cloning pod, that would be really handy .

All the best,
Timothy