Posts tagged "Org_Mode":
Adding Local Variables
I am setting up my blog withorg-static-blog which requires me to define a number of variables. The best way to do this is using .dir-locals.el.
Not knowing how to code in elisp I tried to do this by hand with disasterous results.
I next turned to our new friends Gemini, CoPilot and ChatGPT. This was better, but by no means perfect.
I went back to the Internet and did some searches. Yay! There's a command to add variables to the .dir-locals.el file. It keeps track of all the parenthesies. You invoke it with
m-x add-direct-local-variable
I think you need a file called ~.dir-locals.el in the directory already. You certainly need to be in that directory before executing the command.
You can shorten this variable to add-v. Be aware that you need to cursor up once to get the right command. Press return.
The command is in three parts.
- The mode. The response here is
nil. This is generic and applies to all modes. - The variable name. Again, press return.
- Its value. If it is a string, enclose the string in double quotes
". Press return a final time.
Repetition of these steps will build the .dir-locals.el file.
A final note: You will be prompted when you open your first file in this directory if you want to use these local variables. y would seem the best response since you have gone to all the trouble to set it up.
Computer Archeology
I am reconstituting this blog with posts that date back twenty years. It's a daunting task but also amusing, boring, delightful and surprising all at the same time.
Today I found an outline of an ebook I started to write on orgmode.
I don't have all the files for it, but I want to find what I have and relearn how to use this powerful mode again. The best I can do is have a tag page for it!.I may need to update the files as I will definitely get a chance to find out how well I described what to do.
Using Checkboxes in Orgmode
I wrote about [[https://rillonline.github.io/posts/2019/08/28/recurring-tasks-in-orgmode/p][Recurring Tasks in Orgmode] previously. Once I had this to-do working properly, I went onto the next task. I wanted to list my ideas for articles and bigger writing projects. In my opinion, I did not need to set this all up as a big list of to-dos. That certainly becomes overwhelming to me.I might just stop writing altogether because the ideas keep coming but the time and patience to write them may not be available at the moment. I do want to be sure I have a stash of ideas to choose from when I am able to sit down and write out a complete article.
I created a file name "ideas.org". I inserted three headings:
* Writing Ideas Big and Small ** Blog Ideas [/] ** Bigger WRiting Projects [/]
You may have noticed that at the end of the second level headings there are two square brackets "[]" enclosing a slash "/". More on this later.
1. Organizing the list
At first I thought I would just write a list like this:
- smart quotess and other typography - less than shortcuts in orgmode - Braile pack at public museum - photo op with Nick - a walk in the park with Nick - using org capture - Using checkboxes in org
Then I thought about using checkboxes so I could check them off as I went. Now this section of the file looks like this:
- [ ] smart quotess and other typography - [ ] less than shortcuts in orgmode - [ ] Braile pack at public museum - [ ] photo op with Nick - [ ] a walk in the park with Nick - [ ] using org capture - [ ] Using checkboxes in org
Who knows, you might even see some of these articles in the future!
2. Why Use Checkboxes?
Why use checkboxes? After all, I could simply delete the item from the file once I published it.
It's a good point. I decided to try this methodology just to see how I liked it and for two other reasons:
- It would let me know how I was doing at keeping up with my ideas.
- It would let me know if I needed to be thinking more about writing opportunities.
It seems to me that a writer is stuck here: Coming up with ideas and getting them written.
3. Using the Checkboxes
To check off an item, press "c-c c-c" on that line. Then you have:
:- [X] Using checkboxes in org
Here's what the heading now looks like:
** Blog Ideas [1/7]
If I turn the "/" (slash) into a percent sign (%) it looks like this:
:** Blog Ideas [14%]
If I feel ambitious, I can delete these lines or I can sort them so that all the unchecked boxes are together.
4. Sorting Lines
- Highlight the list
Type "m-x sort-lines". All the checked off items will be gathered together at the end of the list. The items appear in alphabetical order.
- [ ] Braile pack at public museum - [ ] a walk in the park with Nick - [ ] less than shortcuts in orgmode - [ ] photo op with Nick - [ ] smart quotess and other typography - [ ] using org capture - [X] Using checkboxes in org
This list now is in a different order than the way I originally wrote it down. I can read through it until I come to an item with a checkbox. I know there are no more new items.
If I want to sort in reverse order, I type: "c-u m-x sort-lines". Here is what I now have:
- [X] Using checkboxes in org - [ ] using org capture - [ ] smart quotess and other typography - [ ] photo op with Nick - [ ] less than shortcuts in orgmode - [ ] a walk in the park with Nick - [ ] Braile pack at public museum
I don't think I will use this ordering unless I need a confidence boost. I would have to go past everything I've already done.
Reference: checkboxes