Go To The Logical Begin And End Of A Buffer’s Content

The only time that I call beginning-of-buffer is when I want to visit the file header, which isn’t very often. The rest of the time I only want to go up to where the code begins, or at least close to it. That is the logical beginning of the buffer. Another example is going to the beginning of a magit-status invoked buffer: I’ve never use the first first 3 lines of it. The logical start of it is the Untracked file listing. The Beginend package moves your cursor to the the logical beginning of the buffer content. It also implements a logical end-of-buffer. It might not sound like much, but it bumps up your user experience by more than a few notches: it makes the modes do what many of us are thinking and that is the ultimate feel good experience. Here is an example:

Demonstration Follows

Blogging With Emacs🐃 From Org2Blog🦄 to WordPress

Blogging from Org2Blog to WordPress just works and that is just about all there is to it. All of the markup works. Even MathJax works:

Brad told me that this is the most beautiful equation in mathematics:

Euler’s Formula: \(e^{ \pm i\theta } = \cos \theta \pm i\sin \theta\)

Thank you Brad.

https://raw.githubusercontent.com/grettke/wisdomandwonder/master/post/2019-02-01-01.org is this post itself 😄😮.

Start using it https://github.com/org2blog/org2blog!

HELP: Yet Another Literate Emacs Configuration!

HELP is the culmination of everything that I’ve learned about literate programming (LP) in Org-Mode—written with the intent to share it with others in total and complete respect and consideration of you and the value of your time. No platitude here: time is precious.

With that in mind here is a breakdown of the sections you might be interested in (and should ignore):

Continue reading “HELP: Yet Another Literate Emacs Configuration!”

bash: update_terminal_cwd: command not found resolution

When you run Bash under shell in Emacs on macOS then update_terminal_cwd is never defined and after every command you get the error message bash: update_terminal_cwd: command not found making the shell unusable.

The simplest solution is to define update_terminal_cwd when it isn’t defined.

Here is the code:

if [ -z “$(type -t update_terminal_cwd)” ] || [ “$(type -t update_terminal_cwd)” != “function” ]; then
update_terminal_cwd() {
true
}
fi

MathJax Support In Org2Blog

Use MathJax with Org2Blog.

Thank you Jon for showing how to set this up in this post and this post and this post.

The only addition is that these instructions uses a more actively maintained plugin.

  • Test it out using these (and more) examples
    • The word LaTeX in Math Mode (notice the italics)
      • \(\LaTeX\)
    • The word LaTeX in Text Mode (notice the lack of italics)
      • \(\mathrm{\LaTeX}\)
    • Inline
      • \(\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}\)
    • Equation
      • \[\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}\]