Posts

  • Projectile 2.1

    Projectile had a pretty quiet year since the massive amount of work that lead to the release of Projectile 2.0 early last year. These days Projectile is both quite mature and feature-full, so there wasn’t really any burning need to add anything new. Still, there’s always some room for improvement. Enter the recently released Projectile 2.1.

    The focus in Projectile 2.1 was bug-fixes and small improvements here and there. There’s no few functionality worth highlighting, other than the addition of basic integration with vterm (projectile-run-vterm). You can read all about the changes in the release notes.

    Most likely in the future the focus is going to remain on polishing the existing functionality (e.g. bug-fixes, performance improvements) as opposed to adding more features. There are plenty of open issues and help from anyone would be most welcome!

    There’s also a lot of work to be done on the documentation side. After launching https://docs.projectile.mx the content there has stayed mostly the same and there’s certainly a lot of ground to cover. At the very least I want to add some animated gifs to the manual this year, so it’s easier for people to understand how to use certain commands.

    That’s all I have for you today. I hope you’ll enjoy the latest Projectile. Until next time!

    P.S. You can now support my work on Projectile via GitHub Sponsors.

  • Still Here

    I haven’t had much time for Emacs Redux lately, but I wanted everyone to know that I plan (hope) to go back to writing here at some point. I still love Emacs just as much as always, and my backlog of topics for blog posts keeps growing. I’m still maintaining all of my Emacs open-source projects, although probably not as well as I’ve been doing so in the past. I’m still convinced that:

    • Emacs is Magic
    • Emacs is Power
    • Emacs is Fun
    • Emacs is Forever

    Lately most of my blogging has been happening over at Emacs Redux’s sibling blog Meta Redux. Recently I wrote there a few articles that I would have normally published here, if it weren’t for the Meta Advent blogging challenge I participated in. I assume that most of the Emacs Redux readers don’t follow Meta Redux, so I’ll list those articles here:

    I hope you’ll find them enjoyable and useful! Until next time!

  • Adding a Bit of Holiday Spirit to Emacs

    Christmas is here! Is your Emacs ready for it?

    Emacs is famous for having a major mode for any and every occasion, but does this hold true for Christmas? I was shocked to find out this morning that there’s no christmas-mode or christmas-tree-mode! Still, I did manage to figure out a way to optimize my Emacs for the holiday season, at least for the people living in countries where the holidays happen to be during the winter.

    If you’re feeling cold and you need some extra warmth in your life Emacs can certainly help with that! Enter emacs-fireplace. It’s a major mode that turns your Emacs into… a cozy fireplace.

    emacs-fireplace.gif

    So, just enable the mode with M-x fireplace and bask in the warmth and glory of Emacs. Using the mode is super simple (consider pressing C-* to enable smoke) and I guess you’ll be able to figure out the details by yourselves.

    Merry Christmas! Merry Mxmas! Until next time!

  • Spell Checking Comments

    I’m notorious for all the typos I make.1 Thankfully Emacs features an awesome built-in mode named flyspell to help poor typists like me. Flyspell highlights misspelled words as you type (a.k.a. on the fly) and has useful keybindings to quickly fix them.

    Most people typically enable flyspell only for major modes derived from text-mode (e.g. markdown-mode, adoc-mode), but it can really help programmers as well by pointing out typos they make in comments. All you need to do is enable flyspell-prog-mode. I typically enable it for all programming modes2 like this:

    (add-hook 'prog-mode-hook #'flyspell-prog-mode)
    

    Now you’ll get instant feedback when you make some typo in a comment. To fix a word just press C-c $ (M-x flyspell-correct-word-before-point), while your cursor is behind it.3

    flyspell_prog_mode.gif

    That’s all I have for you today! Keep fixing those nasty typos!

    1. Especially in blog posts. 

    2. At least the well-behaved ones that derive from prog-mode that is. 

    3. There are many other ways to correct misspelled words with flyspell, but we’ll ignore them for now for the sake of simplicity. 

  • Dealing with Jekyll Post URLs

    A while ago I wrote about migrating Emacs Redux from Octopress to Jekyll. While I’m really happy with Jekyll overall, there has always been one thing that frustrated me a bit - namely linking to other posts. The syntax for this is the following:

    
    {% post_url name-of-post %}
    
    

    I know this probably doesn’t seem like a problem, but posts in Jekyll are usually prefixed with a timestamp (e.g. 2019-05-21-some-post ) which makes it really hard to get the name right without consulting the list of posts first. Luckily for us it’s trivial to write an Emacs command that helps with this.

    
    (defun jekyll-insert-post-url ()
      (interactive)
      (let* ((files (remove "." (mapcar #'file-name-sans-extension (directory-files "."))))
             (selected-file (completing-read "Select article: " files nil t)))
        (insert (format "{%% post_url %s %%}" selected-file))))
    
    

    Here’s how this command looks like in action:

    jekyll_post_url.gif

    I don’t know you, but I’m totally loving this. You can easily extend the core idea for all sorts of similar tasks that require transforming a bit the files in the current directory. Here’s a similar helper for dealing with image URLs:

    (defun jekyll-insert-image-url ()
      (interactive)
      (let* ((files (directory-files "../assets/images"))
             (selected-file (completing-read "Select image: " files nil t)))
        (insert (format "![%s](/assets/images/%s)" selected-file selected-file))))
    

    Let’s see this in action:

    jekyll_image_url.gif

    That’s all I have for you today! Meta-X forever!

Subscribe via RSS | View Older Posts