Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links for README.org + increase timeout for load_sync #782

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

massix
Copy link
Contributor

@massix massix commented Jul 24, 2024

Hello, this branch contains two commits:

  1. the first one fixes the links on the top of the README.org file, creating custom_ids for all the needed headlines and using the file: notation for other files in the repository, thus making it easier to navigate the file while in Neovim;

  2. the second one increments the timeout of the promise for the load_sync method of OrgFiles to 15 seconds. I know it might sound a lot, but on very slow devices (for example my Android phone, where I use orgmode and org-roam a lot) loading my > 100 files takes slightly more than 5 seconds, and sometimes it fails and I am therefore forced to :Lazy reload over and over again, until the caching of the OS is good and it loads in less than 5 seconds. I thought about having this timeout configurable or dynamic depending on the platform, but I am not sure the effort is worth. In the end, on PC you should not even see the difference.. tell me if you want me to do things differently, I'll be more than happy to modify the code!

Edit: I am not sure why the luarocks step is failing, there might be an issue with the dependencies? I don't think it is related to my changes though!

In nvim-orgmode, you can point to a headline either by using the star
syntax (* HEADLINE) or by using a custom-id in the properties drawer of
the headline, and then refer to it using the hash syntax (#custom-id).

This commit adds custom_ids for all the headlines referred to into the
README.org file and fixes relative links to other files in the
repository.
Copy link
Member

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

You can set up the suggested numbers so they are aligned with the cronjob setup.

lua/orgmode/init.lua Outdated Show resolved Hide resolved
On slow devices (for example Android smartphones using Termux), loading
a lot of org files takes more than 5 seconds, which will make the
default timeout for the promise to expire, leaving the plugin in a
semi-loaded state where some functionalities may not work, forcing the
user to reload the plugin multiple times hoping that the system has
something already cached and it will take less than 5 seconds.
Copy link
Member

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kristijanhusak kristijanhusak merged commit ab24c84 into nvim-orgmode:master Jul 24, 2024
5 of 6 checks passed
SlayerOfTheBad pushed a commit to SlayerOfTheBad/orgmode that referenced this pull request Aug 16, 2024
* docs(README): add custom_ids and fix relative links

In nvim-orgmode, you can point to a headline either by using the star
syntax (* HEADLINE) or by using a custom-id in the properties drawer of
the headline, and then refer to it using the hash syntax (#custom-id).

This commit adds custom_ids for all the headlines referred to into the
README.org file and fixes relative links to other files in the
repository.

* fix(init): increment the default timeout to 15 seconds

On slow devices (for example Android smartphones using Termux), loading
a lot of org files takes more than 5 seconds, which will make the
default timeout for the promise to expire, leaving the plugin in a
semi-loaded state where some functionalities may not work, forcing the
user to reload the plugin multiple times hoping that the system has
something already cached and it will take less than 5 seconds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants