Re: Fwd: Re: Typo in info pages

2022-08-19 Thread edgar

On 2022-08-19 05:39, Ihor Radchenko wrote:

Support Org development at https://liberapay.com/org-mode,


This is great! You should add cryptocurrencies there :) .

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: C-c $ missing?

2022-08-19 Thread Mark Barton


> On Aug 18, 2022, at 11:39 PM, Summer Emacs  wrote:
> 
> TY! That's exactly what I was hoping for. And thank you to Ihor and Matt
> as well for pointing me in the right direction. I was just reading up on
> C-c $ with C-h k when you replied so thank you to all of you for helping
> out. Noted everything down for future reference. 🙃

You are welcome. You may eventually want to read about Speed Keys in Org mode 
that is enabled with the org-use-speed-commands variable. That enables you to 
just press "a" when at the beginning of a headline to archive that subtree. I 
use speed keys daily to clock-in to a task and to refile a task into one of my 
project subtrees.

Re: org-plot/gnuplot

2022-08-19 Thread Roger Mason
Hello Ihor,

Ihor Radchenko  writes:

> You need to have "gnuplot" Emacs package installed to be able to use
> org-plot and ob-gnuplot.

I had checked those were installed before posting.  What I had not
checked (duh) was that gnuplot would start and run.  There was a simple
linkage problem preventing that.  Now fixed.

Thanks,
Roger



Re: C-c $ missing?

2022-08-19 Thread Summer Emacs


Mark Barton @ 2022-08-19 03:02 :

> [... 8 lines elided]

> You are welcome. You may eventually want to read about Speed Keys in Org mode 
> that is enabled with the org-use-speed-commands
> variable. That enables you to just press "a" when at the beginning of a 
> headline to archive that subtree. I use speed keys daily to
> clock-in to a task and to refile a task into one of my project subtrees.

tysvm! 🙃 I had no idea that existed and I will be reading about it
pretty soon. I just pulled up some web pages about it and will read them
this evening.

--
Summer,
Sent from MU4E in Emacs,
Because I'm becoming a NEWBIE at this!



Re: Suspected bug: '#+STARTUP: indent' messes up inlinetasks' tag alignment

2022-08-19 Thread Alain . Cochard
Ihor Radchenko writes on Sat 13 Aug 2022 14:33:

 > Can you try the attached patch?

The problem is solved if I use emacs 28.1 (thanks a lot), but not for
emacs 27.2...

Emacs 27.2 is the native emacs for the Fedora 34 GNU/Linux
distribution I use.  I was able to install emacs 28.1 from source, but
I couldn't have my MUA (vm) work properly with it, so it would be
great if you could find a fix valid for emacs 27.2 too!

PS: I have had only a very limited and ancient experience with
patches, so it was not immediate for me to try your patch.  While
working on it, I noticed that the section of the manual

   * Feedback:: Bug reports, ideas, patches, etc.

does not even contain the word 'patch'.  So I was thinking it might be
a good idea to say a few words in that section about what patches are
and how to apply them.


-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 106]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France | [ slot available for rent ]




Re: [PATCH v2] ol-info: Define :insert-description function

2022-08-19 Thread Max Nikulin

On 19/08/2022 11:28, Ihor Radchenko wrote:

Max Nikulin writes:


+(defun org-info--link-file-node (path)
+  "Extract file name and node from info link PATH.
+
+Return cons consisting of file name and node name or \"Top\" if node
+part is not specified. Components may be separated by \":\" or by \"#\"."


It looks like the docstring does not match what the function actually
returns.


It returns a cons, doesn't it? Is it confusing that separator for 
components is related to the argument?



+  (if (not path)
+  '("dir" . "Top")


"dir" is not a file. Also, it is not very clear what "dir" is referring
to. Maybe you can add a comment pointing to `org-info-other-documents'?


Try M-x info RET when you do not have *info* buffer and you get "(dir) 
Top" node. It is the directory of info files. If you run "info" without 
argument in shell you will get the same.



+(string-match "\\`\\([^#:]*\\)\\(?:[#:]:?\\(.*\\)\\)?\\'" path)
+(let* ((node (match-string 2 path))
+   ;; `string-trim' modifies match


Here and is several other places, including docstrings, please make sure
that the sentences end with "." and are separated with "  ".


It was supposed to be a brief phrase rather than complete sentence.


+  (cons
+   ;; Fallback to "org" is an arbirtrary choice
+   ;; and added because "(dir)filename" does not work as "filename".


Should this be documented? Or at least mentioned that the behaviour is
undefined. And if it is undefined you should not test it in the tests.


The purpose of test is to check that it does not signal some obscure 
error. I am unsure how to handle corner cases, so I am open to 
suggestions. Some considerations
- `org-info--link-file-node' may return nil when link path is incomplete 
or some value that may help to avoid error handling code paths in callers.
-  does not look like a valid link but it may be handled like 
shell "info" command without argument, so I chose "(dir)" node. Elisp 
(info) without arguments however may display existing buffer.

-  certainly should be handled as (info "(dir)")
-  is invalid. Maybe (info "elisp") should be used instead.
-  I am unsure in my choice to open (info "(org) Tables"). 
Maybe it is better to treat it as "(dir) Tables" and so as "(dir) Top" 
node since "(dir) Top" is quite reasonable for  with empty path.


Thanks for the review.




Re: Show a warning/message when loading Org modules requiring external packages (was: :session for Julia in org babel?)

2022-08-19 Thread Christopher M. Miles

Ihor Radchenko  writes:

> "Christopher M. Miles"  writes:
>
>> I found ~org-load-modules-maybe~ load modules from ~org-modules~, it's a
>> list of ob-* or ol-* elisp modules. Not Julia modules. I searched
>> ~org-load-modules-maybe~ function invocation code in org-mode source
>> code, have not relative examples. Don't know how to use
>> ~org-load-modules-maybe~ to detect whether Julia modules exist and raise
>> helpful warning message.
>
> That was what I was actually referring to. ob-julia also requires two
> Elisp packages: julia-mode and ESS
> (https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-julia.html)

Oh, I misunderstand your meaning.

> Now I see that you were referring to the actual Julia packages. Those
> may be caught by Julia session code (org-babel-prep-session:julia) and
> then a warning may be displayed.

Yes, that's what I mean. Well, if ob-julia session can display warning.
That's fine. I have not realized that scene.

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


Re: [FEATURE REQUEST] statistics of repeated tasks

2022-08-19 Thread Abhisek Panigrahi
1. How and where it should be displayed?
It can be displayed alongside the task name e.g.
* TODO My repeated task (DONE=3)...
Here DONE=3 meaning the task has been completed 3 times.
Another way to display is: DONE=3/4, where it means the task is completed 3
times out of 4.
But it is much more complicated because the user can change the repeat
duration.
Another thing is to show the longest streak and last streak count, but
these are also complicated I believe based on the information that is
logged.
2. When it is going to be useful.
It is very motivating to see how many times you have complicated a specific
task. It is much like a streak. People would wanna see their statistics to
put more effort. I strongly believe "The best way to get better at
something is to measure it".

On Tue, Aug 16, 2022 at 9:39 AM Ihor Radchenko  wrote:

> Abhisek Panigrahi  writes:
>
> > I would have worked on the patch, but I don't know elisp or lisp
> language!
>
> Then, you may detail your proposal on how you envision this new
> statistics feature: (1) how and where it should be displayed; (2) when
> it is going to be useful.
>
> Note that I changed the email subject to bring this thread to the
> attention of other Org mailing list members.
>
> If there is sufficient interest, someone else may step up and implement
> the feature.
>
> I will probably add this to my todo-list, but my list is very too long
> already. I currently prioritize bugs and more widely requested features.
>
> --
> Ihor Radchenko,
> Org mode contributor,
> Learn more about Org mode at https://orgmode.org/.
> Support Org development at https://liberapay.com/org-mode,
> or support my work at https://liberapay.com/yantar92
>


table alignment tags in Org export

2022-08-19 Thread Alex Fenton

Hello,

Trying to export a table with alignment tags, e.g.


#+caption: left-, centre- and right aligned columns
|     |       |   |
| a  |    b |    c |
| aa |  |  |

In, for example, HTML or ODT output, the columns are aligned according 
to the tags in the first row.


If exporting to Org (org-org-export-as-org), the tags disappear - i.e. 
the table is as-was, minus the first row.


Is there a way to retain the alignment information when re-exporting to 
Org? - either a function or some setting somewhere


cheers
alex




Re: [off topic] List all non-latin characters in a buffer

2022-08-19 Thread Uwe Brauer
>>> "JMM" == Juan Manuel Macías  writes:
Hi Juan


> Sorry for the offtopic, but I thought this homemade function I wrote
> some time ago for my work might perhaps be useful to some Orgers. When
> executed in a buffer, the `list-non-latin-chars' function opens a window
> displaying a list of all the non (basic) Latin characters present in
> that document. Each item in the list contains the character, its Unicode
> canonical name, and its hexadecimal code. For example:

Very very nice,

Till now I used only a very simple search function

(defun my-search-no-ascii ()
"Simple function to search for no ASCII symbols in a file."
  (interactive)
  (skip-chars-forward "\001-\177"))

That is so much better!


smime.p7s
Description: S/MIME cryptographic signature


[Feature Request] Create an org-md-toplevel-hlevel variable to allow users to set the level of top level headings in markdown export

2022-08-19 Thread Rohit Patnaik
Hello,

I've been exporting several of my org-mode notes to markdown recently, and I've 
been running into an issue where I've had to manually adjust the level of the 
top level headings in my exported notes because the wiki system I'm importing 
the notes to reserves h1 (i.e. #) for page titles, using h2s (i.e. ##) for 
sections within the page itself.

I noticed that ox-html.el has a org-html-toplevel-hlevel variable, which allows 
the user to set the heading level of top-level headings within the exported 
content. Would there be any problems with implementing a similar variable (e.g. 
org-md-toplevel-hlevel) to allow the user to set the heading level of top level 
headings within exported markdown content?

It looks like it would be a small change, and I'd be happy to implement it 
myself, but I thought I'd run it by the list to see if there were any major 
issues that might arise from making this change.

Thanks,
Rohit Patnaik



Re: [PATCH] Documentation and NEWS for ` org-latex-language-alist'

2022-08-19 Thread Ihor Radchenko
Juan Manuel Macías  writes:

> I am attaching a new version of the patch.

Thanks!
Applied onto main via 243ded74b adding one sentence to the =LANGUAGE=
keyword description and changing the ctan links to https.

I have added a short description of what LANGUAGE keyword value is:
"Language code of the primary document language."

> Addendum: Just as I was going to send this email, I saw the other email
> from Maxim in this thread, who says:
>
>> Firefox may block downloading of a file through unencrypted http:
>> protocol if a link is opened from a https: page (HTML version of the
>> Org manual served from orgmode.org this case). The problem with CTAN
>> mirrors is that not all hosts have TLS certificates including their
>> CTAN names.
>
> I can't figure out how to link to the babel documentation in a way other
> than a link to CTAN. If this might be an inconvenience (due to https
> issues), perhaps we could simply put in the documentation something like
> 'see the Babel docs', or referencing the command 'texdoc -M
> babel', which opens the locally installed babel documentation. The
> problem is that not all GNU/Linux distributions include the
> documentation in their versions of TeX live. For example, Arch Linux
> does not include documentation in the official repos and must be
> installed separately via an AUR package.

I went with https. It does open at least in some cases. The problem with
CTAN certificates is not our problem. Users may still search the
relevant documents if the link is dead.

Note that we still have a number of http links in the manual. One may
want to fix them.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: :session for Julia in org babel?

2022-08-19 Thread Ihor Radchenko
"Fraga, Eric"  writes:

> On Tuesday, 16 Aug 2022 at 21:21, Ihor Radchenko wrote:
>> Can you also update [Worg]
>
> I will do so, maybe tomorrow.  I assume that's okay as it's a separate
> repository?  and as I do not have submit access, I'll post a patch here,
> if that's okay?

Sure. You can submit the patch here, and I will apply it.

>> This will set the variable globally. You may want setq-local instead.
>
> I've put the setting into the (let ...) and it seems to work just fine.
> New patch attached.

Thanks!
Applied onto bugfix via 4dff42f6a adding a defvar to pacify the compiler
warnings.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: [BUG] org-insert-heading-respect-content doesn't always insert TODO heading [9.5.4 (release_9.5.4-17-g6e991f @ /usr/local/Cellar/emacs-plus@29/29.0.50/share/emacs/29.0.50/lisp/org/)]

2022-08-19 Thread Ihor Radchenko
Roman Rudakov  writes:

> Steps to reproduce:
> 1. Create an org heading and set state to something but TODO or DONE
> (for example PROGRESS).
> 2. Call the function org-insert-todo-heading-respect-content
> ...
> I noticed that internally this function calls org-insert-todo-heading
> and pass arguments in a wrong order:
>
> Actual function call:
>
> (org-insert-todo-heading force-state '(4))
>
> Should be:
>
> (org-insert-todo-heading '(4)) force-state)

Thanks for reporting and pinpointing the source of the bug!
Fixed on main via a1af06d64.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a1af06d643d662f8c04e7c59d10efc45108a9528

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: [PATCH v3] Show org file title in org-clock clocktable

2022-08-19 Thread Ihor Radchenko
Duy Nguyen  writes:

> Thanks for letting me know. The reason I chose that method is because the
> org-macro-templates are not updated immediately after I change the title
> and save the file. However, I think I found a solution using
> org-macro-initialize-templates and org-macro-templates. Please see the
> attached patch. Hope this is OK, otherwise please let me know how to
> improve.

Thanks for the update!
Applied onto main via 2cc2d8f1f with amendments.
I fixed on double space "  " between sentences, removed autoload cookie
(that function is not used outside org-clock), and altered the docstring
making the first line a single sentence and clarifying about the return
value a bit.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2cc2d8f1f6265d12c92b734931f2e3e417276b05

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: [BUG] Fix for inlinetask visibility cycling causes infinite loop for "degenerate" inlinetasks

2022-08-19 Thread Ihor Radchenko
Anders Johansson  writes:

>> I am unable to reproduce on main and on bugfix.
>> What is your Org version (M-x org-version)?
>
> Sorry I didn’t bother to reproduce with emacs -Q. I stepped through with
> edebug and thought the problem was quite clear that way. I have reproduced
> with Emacs -q (+ loading org from git) now and the problem persists on my
> side, using a sample file consisting of just a heading with one degenerate
> inlinetask below, as posted before:

Thanks for checking again!
I forgot to load org-inlinetask when checking, which is why I did not
observe the problem.

Fixed on main now via a0b8b7303.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a0b8b7303b9683fae4503c57ee8ae191cb89a297

Best,
Ihor