beorg update

Share this post

beorg news - November 2022

beorg.substack.com

beorg news - November 2022

News, plans and how to get organized using beorg

Matthew Kennard
Nov 7, 2022
1
Share this post

beorg news - November 2022

beorg.substack.com

šŸ’Ø A quick update

A few months have somehow passed since the last newsletter. I’ve been very busy with client work recently and unfortunately had little time to make massive progress with new beorg features. There have been a few newsletters where mention has been made of the ā€˜database’ in beorg. I have recently been working on writing a translator for the beorg search syntax into SQL queries. Once this is up and running I’m expecting a big speed boost to the Agenda and Tasks tab.

šŸ§‘ā€šŸŽ“ Tiny tip corner

  • Use the Save + button when creating lots of items. This works especially well with templates - here I have a template to log what food I’ve eaten, and tap Save + for each item until finished:

  • Tap the ? button when in the Agenda/Tasks search field to see a reference to the search syntax:

To quickly select multiple tasks hold down two fingers close together and swipe down the task list:

Thanks for reading beorg update! Subscribe for free to receive new posts and support my work.

šŸ“ Customizing the text editing toolbar

The text editor in beorg, used for both notes and editing entire files, has a handy toolbar shown above the keyboard:

The buttons can be changed with a bit of beorg magic šŸŖ„. This magic can be yours to control with an init.org file and a little bit of Scheme coding.

I’m going to create a new toolbar which has buttons to:

  • Move the cursor to the start of the text

  • Move to the end of the text

  • Show a list of phrases that beorg can insert

When working with this level of beorg customization you are best off editing the init.org file on your computer (or using an external keyboard with your iPhone/iPad.) If you don’t have an init.org file already create one by:

  1. Select the Files tab in beorg

  2. Tap the + button top left on the screen

  3. Type init and then tap Create File (don’t add the .org)

  4. Long press the newly created file and choose Open With Text Editor…

Let’s start with creating a toolbar with just one button to jump to the top of the file. Add the following to your init.org:

* Toolbar
#+begin_src scheme
(set! editor-toolbar-items '(("icon-up" (goto-char 1)))
#+end_src

In case you aren’t familiar with customizing beorg like this here is a breakdown of what you can see above:

  1. The * Toolbar is just a headline, used to help organize the file

  2. #+begin_src scheme tells beorg there is some Scheme code to follow

  3. (set! editor-toolbar-items is an instruction to set the value of the variable editor-toolbar-items

  4. '( is the start of a list of items

  5. ("icon-up" (goto-char 0)) is the toolbar item, with an icon named icon-up and the code (goto-char 0) telling the editor to put the cursor at the very start of the text being edited.

  6. There is a ) to end the list of toolbar items

  7. Finally the #+end_src tells beorg we have finished wi,th our block of code

Adding a button to go to the end of the text is slightly trickier, but not much:

(set! editor-toolbar-items '(("icon-up" (goto-char 1))
                             ("icon-down" (goto-char (point-max))))

Here the 0 is replaced with a call to the function point-max which returns the last position in the text being edited.

The list of phrases button is a little more complex still. First a new function needs to be created to show an action-sheet with the phrases in:

(define (show-phrases) (sheet '(("My Name" (insert "Matthew Kennard"))
                                ("beorg website" (insert "https://beorg.app"))
                                ("Favorite color" (insert "blue")))))

Just like the list of toolbar items this one provides a list to the sheet function. Each item in the list specifies the text to display in the action-sheet, and then a command to run when selected. Here all the commands just insert some text where the cursor is.

Adding this to the toolbar results in the following complete init.org:

* Toolbar
#+begin_src scheme
(define (show-phrases) (sheet '(("My Name" (insert "Matthew Kennard"))
                                ("beorg website" (insert "https://beorg.app"))
                                ("Favorite color" (insert "blue")))))
(set! editor-toolbar-items '(("icon-up" (goto-char 1))
                             ("icon-down" (goto-char (point-max)))
                             ("icon-star" (show-phrases))))
#+end_src

Here’s how the toolbar looks:

If you would like to personalize your text editing toolbar in beorg check out the following useful links:

  • Names of the editor toolbar icons you can use - if you don’t see an icon you like you can use an emoji or other text

  • An introduction to beorg Scripting

TIP: If you have smart quotes turned on, you’ll probably want to turn them off when editing your init.org.

šŸ‘‹ Thanks for reading

If you want to help support future beorg development there are several ways you can help:

šŸŖ„ Take out a subscription to beorg Premium or purchase beorg extensions (depending on whether you prefer subscriptions or one-off purchases)

ā¤ļø Use the tip buttons at the bottom of the Settings tab

šŸ‘‹ Mention beorg to others on social media, or write a blog post about how beorg is useful to you

Thanks for reading beorg update! Subscribe for free to receive new posts and support my work.

Share this post

beorg news - November 2022

beorg.substack.com
Comments
TopNew

No posts

Ready for more?

Ā© 2023 Apps On The Move Limited
Privacy āˆ™ Terms āˆ™ Collection notice
Start WritingGet the app
SubstackĀ is the home for great writing