Emacs example

Hey Dmitry. I think I tried Emacs back in the mid 90’s. I don’t even remember why, but I have it on my mind that I didn’t enjoy the experience. Like a lingering bad taste in my mouth, which makes no sense since I don’t remember why.

For the sake of getting all of this done through less work. I would be willing to give it a try again.

  1. Can you give me a quick tutorial on how to accomplish what I mentioned in my post describing my workflow? Workflow
  2. Can you run Ruby Scripts from Emacs? Does this method allows for user input? Can you provide with a tutorial or instructions?

I think I know what are you talking about, but today’s implementations of Emacs are way better and sleeker than those back in 90’s. Therefore is Emacs my editor of choice since 2000 and I everything I write in plain text (most of the time I write plain text, and I write a lot) I do in Emacs.

Full documentation for the TaskPaper mode is avaliable on GitHub. In README.md in “Multi-Document Support and Agenda View” section I describe how you can use the Agenda view.

Note: Though query syntax described here is a valid subset of search syntax implemented in TaskPaper app v3, the search behavior is slightly different. TaskPaper mode does not support item path syntax together with slice and set operations in search queries relying on tag inheritance instead. This behavior may change in future releases.

So the TaskPaper mode can assist you manly in first step of your workflow: Creating an Agenda view as flat list of items satisfying your search query and sorted in a provided sort order. Then you can save it and run your other script as usual.

The Agenda view can be configured to run not only on current document, but may consider all TaskPaper files in given directories.

I hope it will help you. I recommend to read the README.md first. If you will have any questions, just ask.

1 Like

Okay, this was my experience. I opened a terminal and typed emacs. It started and I though… “Nice, this is installed already”.

I started to look at the tutorial and accidentally pressed a wrong combo and it sent me to who knows where inside the app. I couldn’t close the program. I typed emacs tutorial on google. Quickly looked at the documentation. I couldn’t find how to close emacs. I killed the terminal and decided that this wasn’t going to work for me.

Again, thank you for all the work done in emacs. I am sure it will be useful to a lot of people. I remember that @pslobo was a Linux guy and was drifting away from TaskPaper because he was using Linux a lot.

For historical reasons all modern macOS implementations come with an old terminal-only version of Emacs. So, forget it. Go to https://emacsformacosx.com and download a new up-to-date version with native macOS GUI support. Put it in the App folder as usual and start. Now you have a modern Emacs with icons, buttons, and menus and are ready to go.

You may start with this beginner tutorial: http://ergoemacs.org/emacs/emacs.html.

Then you can download the TaskPaper mode and install it as described in README. If you’ll have trouble installing it, just ask.

After that you can use the TaskPaper mode. README describes it in full details, but the (somewhat unusual) Emacs terminology can make it a little bit problematic for beginners.

For querying a collection of TaskPaper files, TaskPaper mode includes a powerful agenda mode. In this mode items from different TaskPaper files can be collected based on search queries and displayed in an organized way in a special agenda view, which can be further searched, inspected, and saved as a new TaskPaper document.

The screenshot below shows the main TaskPaper document (top part of the window) and the Agenda view showing all items with @pubdate <=[d] 1990 as a flat list (bottom part):

Items in the agenda view are linked back to the TaskPaper file where they originate. You are not allowed to edit the agenda buffer itself, but commands are provided to show and jump to the original item location. See the “Multi-Document Support and Agenda View” section in README for more details.

Now you can save the agenda view and convert it to whatever you want using your scripts.

I hope you’ll find it helpfull. If you have questions or troubles to install or use it, just ask.