Spring Fall Cleaning

In a comment to my Mathematics in a Blog Post post, Grant Rettke asked what versions of WordPress and org2blog/wp I was using. It turned out I had a pretty old version of org2blog/wp installed so I decided to upgrade. I had been maintaining a cloned version of its repository but I decided to see if I could get it to work from ELPA. I'd tried that before but it pulls in Org mode and there were problems with getting Org to work from ELPA then.

This time both Org and org2blog/wp worked fine when installed with ELPA so I got rid of my private cloned repositories for them. If you had a similar problem with Org and ELPA it appears to be working well now.

While I was cleaning things up, I decided to get rid of old files and subdirectories in my tools and tars directories. For example, I had half a dozen old copies of SBCL hanging around and even though I didn't need the space (my iMac has a terabyte of disk space) I was in a housekeeping frame of mood so out they went. Normally when I do this type of thing, I use eshell to remove the files with

rm -rf ~/tools/sbcl-1.2.1

But then it occurred to me that even though I don't edit any files in the tools directory, there was no reason I couldn't bring it up in a dired buffer and just mark the subdirectories that I wanted to delete. That worked fine, of course, and was much faster than deleting each one by hand. Unless I'm already in a shell and just need to deal with one or two files, dired is faster and easier—even if it's a directory that I don't normally use Emacs with.

Emacs really is a wonderful environment. It is, as I've said many times, as close as we can come to using a Lisp machine. Not everyone, I suppose, wants that but I love it and don't understand why anyone would use anything else.

This entry was posted in General and tagged . Bookmark the permalink.
  • Phil

    The only thing that I find a little annoying when deleting multiple directories in dired is being prompted for confirmation for each one individually. I don't want to disable prompting, but it would be kinda nice if it figured out in advance which ones needed recursive deletion, and prompted once for the lot.

    Does anyone have something like that configured? I guess it would just be a case of layering the initial check+prompt on the front and then, if the user doesn't abort the command, let-binding dired-recursive-deletes to always for the remainder.

    • jcs

      Your comment is extraordinary. That's exactly the way I feel. I don't want to give up the prompting but it's annoying to have to answer 'Y' for every subdirectory. Still, it's way easier than doing it by hand.

      At the end of the day, I don't delete multiple subdirectories often enough to worry about it but if you decide to fix this, I'd be happy.

      • Phil

        I don't know whether you meant 'y' or 'yes', but your reply did cause me to notice the dired-deletion-confirmer variable, which trivially enables quick confirmation if you set it to 'y-or-n-p

        I'd rather keep the default 'yes-or-no-p but with just a single prompt for all dirs; but I think I'm going to go ahead and make this change in the meantime.

        • Phil

          Gah. Posting before testing. That's not what that variable is for. dired-delete-file explicitly uses yes-or-no-p for recursive deletions.

      • Tom

        I think this will solve the problem with subdirs:

        ;; Only ask for each top dir.
        (setq dired-recursive-deletes "top")