October 19, 2024

ToolsTools

Why Emacs and Not BBEdit and TaskPaper

A reader asked. “You seemed happy with the combination of TaskPaper and BBEdit. Why the switch to Emacs?” This is my attempt to answer that question.

BBEdit and TaskPaper are Great

There was no good reason to stop using BBEdit or TaskPaper. I did not move from them because they were deficient in any way. I was curious about Emacs and got a push to try it out again from pprevosemacs-writing-studio Emacs configuration for authors who research, write and publish articles, books and websites..

There was some residual angst from my previous failed attempts to switch to Emacs. It made sense to give it another shot. The following makes me happy with the switch to Emacs.

One program

I don’t have to switch between TaskPaper and BBEdit all day to keep writing. Outlines in TaskPaper and the rest in BBEdit. Emacs with org-mode handles everything.

Org-mode Is Life-Changing

You can manage your life in org-mode. My life is simple, I am taking baby-steps into letting Emacs and org-mode manage my schedule and tasks.

It has a capture system which is helpful. You can pause in the middle of any document and invoke the capture system to add stuff to particular regions of a predetermined set of files. It is an absolute essential part of the org-mode workflow.

Besides the task management function, org-mode lets you write. I love outlines and I am drawn to that feature of org-mode. It has no problem managing large files and lets me move easily between sections of large documents. I can see why people are enthralled by org-mode. You can do everything through the keyboard. I don’t find myself reaching for the trackpad. (BTW, this same feature is a part of markdown-mode in Emacs.)

Barely scratching the surface of org-mode and it is adding joy to my life.

Markdown-mode

I was comfortable writing Markdown in BBEdit. It required the help of a mix of Keyboard Maestro macros, Services, some AppleScripts, and some text-expansion snippets. It worked. Sublime Text has a Markdown-package which is great. The Markdown package in Emacs is fantastic. It makes writing Markdown in Emacs painless. There is a manual which is written by Jason R. Blevins, the creator of the Markdown package. Extensive support for keyboard commands is a feature of the package and it makes writing Markdown a breeze. I write Markdown for the blog and Emacs is doing well in that task. I have switched to org-mode for everything else.

Caveats

Emacs is hard. There is much to learn. It is not only a question of opening a buffer and writing in it. That is the easy part. Almost all the actions you do on a regular basis can have keyboard commands associated with it. Remembering them all takes time. I am getting familiar with it but it is a slog.

The ability to access any command through M-x (⌥x), makes the act of living in Emacs easier. It is like the Sublime Text or VSCode command pallette. Gives you access to all the commands with the keyboard commands next to it. Helps you learn them.

Taking things slowly. There are a bunch of commands which I get to use regularly, I know those at this stage. Steadily increasing the tool-set of keyboard commands in my muscle-memory. This is going to take a while, but I am not in a hurry.

The part which is harder is to realize that Emacs can do almost everything you want it to do. It has been under continuous use for the last 40 odd years. Whatever you want to do, someone in the past has wanted to do that exact thing and they have written a little package or a little code to make Emacs do just that. You have to find that relevant resource. That involves searching on the Net and also reading through other people’s configuration files looking for the salve to ease that itch. All of this takes time.

I have started reading a book on lisp. I am not a programmer. It is a journey.

Prot on Switching to Emacs was categorical. You can’t be an “Emacs tourist.” This is not a program where you use the product over a weekend and you know everything about it. Not that kind of beast at all. “It requires commitment,” he says. No shit.

Taking Prot’s advice, I am committing to it completely. I am ditching my old workflows and creating new ones. Emacs requires immersion and that is the only way I am going to get comfortable in it. I see 20-year-veterans learning new things about it. This is a journey of a lifetime. I just wish that I had started earlier. Can’t go back in time. I am accepting the fact that I am coming to it late. But I will use it, to the best of my ability, for hopefully, the rest of my life.

macosxguru at the gmail thingie.

Thanks: Photo by Pixabay: https://www.pexels.com/photo/set-of-tool-wrench-162553/

emacs bbedit taskpaper
October 5, 2024

BicycleBicycle

Links of Note 2024-10-05

macosxguru at the gmail thingie.

Thanks: to Photo by taha balta

fonts icons markdown
September 26, 2024

Trek to the mountainTrek to the mountain

Part Five of My Battles with Emacs

Still climbing this mountain.

The result: Stubbornness and joy.

Emacs is billed as the text editor which you can configure to your needs. It is undoubtedly configurable. I try to add some feature to it and everything goes to hell. It gives you the most cryptic error messages which I don’t understand. I go back to the previous version of the configuration or try some tweak and try it again. Sometimes it works. I dance around like a mad baboon with joy. Most of the time though I delete the section I added or set it to not tangle and leave a note for myself. They bug me. This is the only text editor I have ever tried where I find myself in bed at night contemplating the things I can try to make some addition work. I get up from bed. Go to the computer and try out the new tweak that I hope will work. It doesn’t. I am losing hair. My cat Squirrelly is not happy with me. My sleep habits are suffering. But I keep at it. That is stubbornness on my part.

I am 63 years old. I can still learn new things, I tell myself. I keep plugging away.

Decisions

I am going to violate one of the fundamental maxims of Emacs usage. I am not going to tweak my configuration for a while. There is a lot here and I don’t know most of it. The text editor works and I am going to use it. Try to learn what is already installed and some of the stock features which are available. Get familiar with the basics and then consider tweaking. For instance, I have given up my quest for typewriter scrolling in Emacs. I discovered that C-l brings my cursor and the text surrounding it to the middle of the screen. I will learn to live with that for the time being.

In no particular order, these are the other things I have done:

  • Dumped Denote. I have a file-naming convention which works for me. Not going to change that.
  • Tried out HOWM. Dumped that too. Too fiddly.
  • I am trying out Avy. Irreal recommends it and I wanted to see what that is about.
  • Tried out a package called Hydra. Made a nice little setup for Markdown. General.el does a good job for assigning keyboard commands to often repeated tasks in both Markdown and Org-mode and I don’t need Hydra to duplicate that. It is in the :tangle no zone at this stage. If I run into a compelling reason to come back to it, I might.
  • Wanted something that auto-saved documents when my focus moved away from Emacs. Found this worked:
#+begin_src emacs-lisp
(add-hook 'focus-out-hook (lambda () (interactive) (save-some-buffers t)))
#+end_src
#+begin_src emacs-lisp
(use-package osx-dictionary)
;; Key bindings
(global-set-key (kbd "C-c d") 'osx-dictionary-search-word-at-point)
(global-set-key (kbd "C-c i") 'osx-dictionary-search-input)
#+end_src
  • Sometimes I change my mind. I look at a section I have written and don’t think it fits or is right. I am using Palimpsest to move it to the bottom of the file. It keeps me from deleting sections I have written and gives me the opportunity to reuse it if I change my mind.
#+begin_src emacs-lisp
  (use-package palimpsest)
  (add-hook 'text-mode-hook 'palimpsest-mode)
#+end_src

This is the relevant keybinding: C-c C-r. Sends selected text to bottom of buffer.

  • Using simpleclip to get back the usual macOS keyboard commands for Cut, Copy and Paste. This bypasses the Emacs kill-ring but it is not a problem for me since it is incorporated in the Alfred clipboard I use.

Realizations

  • I used to write exclusively in Markdown. The markdown package for Emacs is fantastic. If I wanted to, I could stick to Markdown and let this package make my life easier. I wouldn’t miss much.
  • I am enjoying writing in Org-mode. I barely scratch the surface of all that it is capable of, but it is fun to write in and the process is virtually pain-free. It is scratching my itch or love for outlines. I love it so far.

Thanks

A reader who is in my age range wrote to me and commented on how he is using Emacs after a brain injury. He is making good progress into incorporating Emacs into his workflow. He provided the impetus to stick to this journey. Thank you.

Sticking closer to stock, finally made emacs click showed me that my frustration is shared. It made it seem less overwhelming to realize that there is light at the other end of the tunnel.

I will keep documenting this journey for a while and see how far I go with it.

Addition: Thanks to Loren for the encouragement.

macosxguru at the gmail thingie.

Thanks also to:

Photo by Sebastian Palomino

emacs
September 3, 2024

Part Four of My Battles with Emacs

ToolsTools

It is not my fault. I blame Jack Baty for this. He goes on and on about how Org-mode has improved his sex life and given him purpose and direction. Okay, maybe he hasn’t quite said that. But he is enamored with it and I am curious to find out what he is on about.

He rates Org-mode better than Markdown:

Org-mode may be the Betamax of text formats, but if you recall, Beta was the better format. VHS won, but not because it was better. Why would I use a lesser format for my notes than Org-mode? “Everyone uses Markdown” is not an answer.

I gave up on Org-mode because of my problems with Emacs. Some problem with my setup made using a largish file an absolute nightmare. Using a combination of TaskPaper and BBEdit was working fine. I was relatively happy. I came across pprevosemacs-writing-studio Emacs configuration for authors who research, write and publish articles, books and websites..

I started reading the book and that got me intrigued enough to go back to Emacs. This was helped considerably by the consistent evangelism of Jack Baty.

Configuring Emacs

I adopted large sections of the Emacs Writing Studio configuration.

Got rid of some of the elements which seemed unnecessary to me. Got rid of elfeed, I don’t want to access my RSS feeds in Emacs. I use Newsblur for my RSS feeds and that works great. Dumped the stuff with LaTeX. I don’t use that. I will add it back if I need it. I made some additional tweaks:

  1. Changed the configuration to an Org-mode file. Needed to write extensive notes to myself on every little bit I added or deleted. Tangling the Org-mode file to an init.el file is relatively painless.
  2. Introduced General.el to the configuration. Makes it easy to add keyboard commands to Emacs to be happy in both Org-mode and Markdown.
  3. Got rid of all the evil-mode stuff from my previous configuration. I am going to concentrate on learning Emacs and not complicate matters by learning both Emacs and VIM.
  4. Added tab-bar-mode. I am used to tabs.
  5. Changed the Writing Studio configuration for org-capture. Adapted the section from Prot’s GNU Emacs configuration.
  6. Changed the Mode line with help from SophieBosio.emacs.d Sophie’s Emacs configuration
  7. Added Corfu and Cape to the completion tools.
  8. Got rid of Modern Org Style and went back to Make org-mode stars a little more super. I am using a bit of code Jack Baty had provided a few years ago to make Org-bullets look pretty.
  9. Added Olivetti-mode to both Markdown and Org files.
  10. Set the recentf limit to (recentf-max-saved-items 1000).
  11. Changed the font configuration to Custom build of Iosevka from Protesilos, for default and fixed-pitch fonts. Using Lexend - Deca for variable-pitch font.
  12. Added auto-package-update to make that function easier.
  13. Added saveplace to be able to get back to the place I last worked on a file.
  14. Added a function to make all my regular files load into Emacs through a keyboard command if I need it.
  15. Added Default window size and tabs>spaces.

There might be some other additions and deletions to and from the Writing Studio configuration.

Other Observations

  • I had a bit of code in my older configuration which tried to replicate typewriter scrolling by putting my cursor at the middle of the window. Something about that code made Emacs unusable for large files. The performance of Emacs has improved considerably with that code absent. I am going to explore other ways of adding this feature to Emacs. But I am taking it easy in the meantime.
  • I am done with tweaking for a while. Emacs configuration is a time-sink. Making the ideal text editor for yourself is a commendable goal but it has a cost I am not willing to pay. A little addition and some inane mistake and your configuration goes to hell. It is a matter of trying to find out what you did wrong. Immense frustration ensues. Not going to encourage this behavior. Going to tweak only when it is absolutely necessary. I want to write and read in Emacs. Not become an Emacs guru.

Things Still to be Done

  • Need to get org-agenda working. It is not at the moment.
  • Find a solution for typewriter scrolling.
  • Explore writing in Org-mode to see what the fuss is.
  • Explore Denote to figure out whether I need that.

Conclusion

Am happy to be able to use Emacs as my text editor. In combination with TaskPaper it is getting a fair amount of use for the last few weeks. I still miss certain things about BBEdit. The project-based workflow with relevant folders in the sidebar is an UI I am used to. Not having that in Emacs is a little disconcerting. Getting more familiar with dired buffers might make that unnecessary.

Still getting comfortable with the keyboard commands in Emacs. Immersion is going to help with that.

Will keep posting updates to this as we go along.

Note

  • Thanks to Photo by Tyler Lastovich
  • Thanks to Peter Prevos for the Emacs Writing Studio
  • Thanks to Protesilaos Stavrou for everything you do for the Emacs community.
  • Thanks to Jack Baty for being insistent.

macosxguru at the gmail thingie.

Addendum

These were the antecedents to this step:

Emacs
July 6, 2024

LovelyLovely

Links of Note 2024-07-06

macosxguru at the gmail thingie.

Note: Thanks to Alena Koval for the picture.

writing organizing