Reminder and Update

Back on March 2, I posted that org2blog was suddenly not working. I
was certain that it was something my host provider was doing but that
turned out to (probably) not be right.

In order to push posts to WordPress, org2blog uses XML-RPC to talk
to the WordPress server at the Irreal site. Any attempt to access the
server through XML-RPC returned a 400 (Bad Request) error. I was
pretty sure that the hosting provider was blocking XML-RPC for some
reason but they swore they weren’t. I threw together a bit of Python
to make a test post using XML-RPC and that did work so my provider
was provisionally off the hook. In the meantime, my provider got
acquired and the new owners are blocking XML-RPC so now I have to
argue with them about not doing that.

I’ve been able to continue posting by converting the Org mode source
for a post to HTML and manually pasting it into the WordPress editor.
That’s a pain but it does get the job done except that the formatting
of the posts is wonky. In the last two or three days, I’ve received
email from a couple of readers complaining about line break tags in the
posts. It turns out that the line breaks are what makes the formatting
look bad. It’s annoying enough that they make the posts look funny in a
browser but, as you can imagine, it causes real headaches for those
trying to read Irreal on a small screen such as a mobile device.

I checked the HTML that gets generated when I convert from the Org
mode source and it looks OK. It’s also OK when I display it locally
(without going through WordPress) so apparently WordPress is adding
the breaks when it displays the post. I don’t know why this happens
and I can’t find any solution in the documentation. If you know a
workaround for this please leave a comment.

So the TL;DR in all of this is that yes, I know about the line breaks,
and no, I’m not inserting them just to be perverse. In fact, I’m not
inserting them at all: WordPress is. I am trying to resolve these
problems and hope I can get things back to normal soon. In the
meantime, thanks for your patience and I’m sorry about the lousy
formatting.

Posted in Blogging | Tagged | Leave a comment

Emacs 26.1 RC-1

I just installed Emacs 26.1 RC-1 and am using it as my production
Emacs. Well, actually I installed it last night but I wrote this last
night so, “I just installed it” as I’m writing this. It’s astounding
how easy compiling and installing Emacs from source on macOS has
become. At one time it was finicky and a pain but the last several
releases have been really easy, even on macOS.

If you’re a macOS user and want to install the 26.1 release candidate
to try it out, here is the magic spell:

configure --with-ns CFLAGS="-g3 -O2 -I /usr/local/include/libxml2"
make
make install
make install-info
sudo cp -R nextstep/Emacs.app/ /Applications/

That’s all there is to it. Perry Metzger says you probably don’t need
the --with-ns in the call to configure but it still works and it’s
easier to keep using it than to experiment. You should probably rename
your current Emacs to Emacs-25.3.app or whatever is appropriate for
your setup before you install the new binary.

So far, the only thing I’ve done with it is write this post but it
does seem to be a bit snappier than the 25.3 version I was using
before. If I have any problems, I can always launch my backed up 25.3
version but everyone I’ve talked to says 26.1 has been rock solid for
some time.

If you can, give it try. That way we’ll have a plenty of eyeballs looking
for any problems before the official release. If I find any glitches,
I’ll let you know in addition to filing a bug report.

Posted in General | Tagged | Leave a comment

Mike Zamansky

Regular readers know that I’m a big fan of Mike Zamansky and his Using
Emacs Series
of videos. If you’ve watched those videos carefully or
follow his blog, you know he’s a professor at Hunter College’s School
of Education where he specializes in programs to train current and
prospective high school teachers in Computer Science.

Zamansky was a high school teacher himself for 25 years before moving
to Hunter and helped establish the Stuyvestant HS CS program. One of
his long term goals has been to establish CS as an independent (from
the Math department) program and to provide a way for teachers to
become certified in CS.

His efforts recently came to fruition with New York’s new
certification program in CS for K-12 teachers. Crain’s New York
Business
has a nice article on Zamansky and his work on behalf of the
new program. It’s an interesting look at the man behind one of
Emacs’ most extensive and popular series of videos.

Posted in General | Tagged , | Leave a comment

Elisp Slime Nav

A few months ago, I stumbled across elisp-slime-nav and decided to try
it out. For some reason—lost to the mists of time—I didn’t write about
it at then. That’s too bad because it’s a really useful package
that anyone who writes, or even reads, Elisp should be using.

What it does is take one of the navigation functions from the SLIME
package for Common Lisp and port it to work with Emacs Lisp. Typing
Meta+. will
take you to the definition of the symbol at point. The current point
position is pushed on a stack so typing Meta+,
will return you to where you were.

This functionality is really handy when you’re reading some unfamiliar
Elisp and need to quickly check out a definition or follow the flow of
a program. I use it all the time when I’m reading some unfamiliar part
of the Emacs source. In addition, you can bring up a buffer with the
documentation for the symbol of point by typing
Ctrl+c Ctrl+d d or Ctrl+c Ctrl+d Ctrl+d.

I didn’t realize until I started gathering material for this post that
elisp-slime-nav was written by Steve Purcell. As most of you know,
Purcell is the founder/maintainer of MELPA as well as the author of
many other useful packages. Elisp-slime-nav is one more reason to
grant him Hero of the Emacs Community status.

Posted in General | Tagged , | Leave a comment

Facebook and Products

If you’re still on Facebook, this is for you.

Posted in General | Tagged | Leave a comment

Magit Interface Walkthrough

Jonas Bernoulli, the maintainer of Magit, has a nice post entitled A
walk through the Magit interface
. It discusses the most-used Magit
features and how to access them through Magit’s interface. All that
information is in the documentation, of course, but if slogging
through the whole manual is too daunting, Bernoulli’s post is just the
thing to get you started.

Actually, using Magit is pretty intuitive and the popup menus help you
along if you get stuck. Still, there are some general procedures that
aren’t obvious from the menus. For example, pressing
Return on a commit in the status buffer
(or a log) will bring up the entire commit. Similarly, you can display
a diff in most contexts by typing dd.

I really like the section on committing parts of a file. Most people
know you can commit a diff hunk but Magit makes it much easier than
raw Git. Magit also allows you to commit part of a hunk so you can
have a very granular commit if you need it. Check out the post for the
details.

Magit, along with Org mode, is generally considered one of the killer
apps for Emacs. This post will give you an idea of why that’s true for
Magit.

Posted in General | Tagged , | Leave a comment

Zamansky 47: Magit

Mike Zamansky has added another great video to his Using Emacs Series.
This time it’s about Magit. Regular watchers of his videos have been
agitating for some time for Zamansky to do a video on Magit but he
resisted on the grounds that there were already lots of good resources
for Magit and that he didn’t know it that well. His demurral
notwithstanding, the video is likely to be useful to anyone who isn’t
already an expert Magit user.

One the parts I liked the best was his demonstration of using Magit
with GitHub. I hadn’t seen that covered anywhere else so it was nice
to see it in action. As you’d expect, it’s simple—simpler than you
probably expect. Once the GitHub and local repositories are linked,
you can work in either and just push or pull the changes as with any
other set of repositories.

The video covers most of the everyday features of Magit. The only
exception is dealing with merge conflicts, which Zamansky was hesitant
to cover because he doesn’t use those functions very often. Of course,
as Zamansky says at the beginning, there are lots of videos on Magit
that do cover these things.

The video is 18 minutes 42 seconds long so you’ll probably have to
schedule some time.

Posted in General | Tagged , | Leave a comment

Adding an ‘s’ to Marked Text

Jay Bosamiya has an excellent tip for adding an ‘s’, or some other
character, to the end of text that has some Org mode emphasis markup
added.

This comes up all the time for me and I usually end up fashioning the
HTML or \(\mathrm{\LaTeX}\) markup by hand. It’s nice to have an easy
solution.

Posted in General | Tagged , | Leave a comment

Open Source Tools

I prefer open source software but I’m not an absolutist. I no longer
have much interest in patching my OS, for example, so I feel
comfortable using macOS because the eco-system—or walled garden, if
you prefer—allows me to integrate my tools and workflow across my
various devices easily.

I do insist on one principal, however: I never commit my data to
proprietary software and especially not software that runs as a
service on someone else’s computer. As I’ve said before, if Apple were
to go out of business tomorrow, it would take me less than a day to
move everything over to Linux and be back up and running with no
loss of data. Mostly I do that by keeping my data as plain text except
for things like PDFs, music, and pictures where there are open source
applications to deal with them.

What I don’t understand are people who are willing to commit their
only copy of important data to things like Google Docs1. Some of these
people are writers and others who literally commit their livelihood to
the vicissitudes of Google’s plan-of-the-day for world domination.
Just when you have a comfortable workflow established, the service
provider decides to end-of-life an important cog in that workflow.

It gets worse though. Companies like Google have shown themselves to
be unreliable custodians of your data. Even if you’re willing to pay
the privacy costs for those “free” services, why would you risk having
your data held captive because the provider of that service doesn’t
like your data?

Think that’s an exaggeration or won’t happen? Consider the case of
Dennis Cooper, an artist, who lost 14 years of writing, research, and
pictures when Google decided it didn’t like his blog on Blogger and
deleted his account. That included Gmail and his contact list.

More recently, several users have had their Google Docs accounts
frozen
because Google decided, mistakenly it turns out, that they
contained disagreeable material. Again, these were professional
writers who had their work product sequestered because Google thought
they might be guilty of BadThink™.

You can say, and rightfully so, that these people were stupid and got
what they deserved but it’s astounding how often I see presumably
technically competent folks blithely admitting—or even boasting—that
they use Google Docs or some other similar service to hold their
important data. Please don’t do that. There are plenty of other
great solutions available that don’t put your data at risk.

Footnotes:

1

I’m using Google as an example of a provider of the type of
dangerous services I’m talking about but they are far from the only ones.

Posted in General | Tagged , | Leave a comment

Niklaus Wirth and Compiler Construction

Many years ago, I did a stint as a compiler writer. I don’t do that
anymore but I’ve continued practicing what I learned by implementing
several little languages for various tasks. Mostly, I’ve leveraged
lex and yacc for those chores but my first little languages were
implemented using the simpler recursive descent technique for
parsing. Yacc is more powerful in the sense that it can parse LR(1)
languages in addition to the more restrictive LL(1) languages but
many or even most languages are LL(1) and certainly any reasonable
little language will be.

I mention all this because Hanspeter Mössenböck’s paper Compiler
Construction—The Art of Niklaus Wirth
popped up in my RSS feed. Most
readers are probably familiar with Wirth as the designer (and
implementer) of Pascal and Modula{23} but he implemented many
compilers and is an expert on language and compiler design. The paper
is a retrospective on Wirth’s philosophy of language and compiler
design.

One of the things that popped out as me was his belief that compilers
should be simple, reliable, and fast and that he preferred that over
the heavy complexity that aggressive optimization brings. Ironically,
according to the paper Wirth’s compilers generated code that was
nearly as fast and those that did heavy optimization. He achieved that
by focusing on generating good code to begin with rather than
generating bad code and letting the optimizer fix things up.

He also preferred parsing with recursive descent because he felt it
forced the language designer to keep the language approachable and
simple. He believed that C would have been a better language if
Ritchie had restricted its grammar to LL(1) because it would have
avoided some of the syntactically dubious constructs that made their
way into the language.

If you have any interest in (computer) language translation—even if
only for little languages or DSLs—the paper is worth a few minutes of
your time. Also, Wirth’s book Compiler Contruction is available as a
PDF in many places such as here. The book expands on some of topics
that Mössenböck discusses in the paper.

Posted in General | Tagged | Leave a comment