Recent Changes

Updates since 2022-12-05 19:33 UTC

1 | 3 | 7 | 30 | 90 days
List latest change per page only Include minor changes
List later changes RSS RSS with pages RSS with pages and diff

2024-04-15

  • 17:23 UTC (new) 2024-04-15 Improving recenter-top-bottom and reposition-window . . . . mbork If one can be a fan of an Emacs command, then I am a huge fan of recenter-top-bottom (C-l) and reposition-window (C-M-l). I use them all the time to see the context of what I’m editing at the moment. However, they are not always that useful. They are rather crude – recenter-top-bottom only has three “settings”, as the name suggests, and reposition-window has only two (it either puts the first line of a function, or the first line of a comment preceding the function at the top). As I mentioned a few weeks ago, I sometimes work with rather long functions – and sometimes I am in the second of two shorter ones, but I want to see the first one, too. Also, I don’t only edit code – I edit prose, too, where paragraph play the role of functions, and Org files, where there are even other structural elements – headlines, tables and source blocks in addition to paragraphs, for example. I decided to write a variation on the theme of reposition-window, which – instead of putting the first line of the function I’m in at the top, it tries to put the first line of a “section” I’m in at the top.

2024-04-08

  • 06:30 UTC (new) 2024-04-08 Even more Magit tips . . . . mbork Almost five years ago I wrote a short post with some Magit tips. Well, why not write some more? Magit is slowly but constantly evolving, and recently I discovered something very useful I didn’t even know existed.

2024-04-01

  • 06:14 UTC (new) 2024-03-31 Easter 2024 . . . . mbork Christ has risen from the dead! And so shall we all. I wish you the best for Easter! And of course, as the tradition dictates, I will pray a decade of Rosary for all readers (of both of my blogs). Happy Easter, rejoice!

2024-03-18

  • 16:52 UTC (new) 2024-03-18 Follow mode . . . . mbork It is a fairly common opinion that a function should not be larger than your screen. The reality, though, is often different. And even if your functions are shorter, you may want to see more than one at a time. The problem is that our screen are usually not that high. (My laptop gives me 66 lines of text with normal font settings.) You can have an external monitor rotated vertically (I have that at work to see as much of the logs of the application I’m working on as possible), but Emacs gives us another solution – the Follow mode.
  • 16:51 UTC (new) 2024-03-16 Follow mode . . . . mbork Deleted 2024-03-16_Follow_mode
  • 16:43 UTC (new) 2024-03-16 Follow mode . . . . mbork It is a fairly common opinion that a function should not be larger than your screen. The reality, though, is often different. And even if your functions are shorter, you may want to see more than one at a time. The problem is that our screen are usually not that high. (My laptop gives me 66 lines of text with normal font settings.) You can have an external monitor rotated vertically (I have that at work to see as much of the logs of the application I’m working on), but Emacs gives us another solution – the Follow mode.

2024-03-11

  • 05:35 UTC (new) 2024-03-11 More psql tricks . . . . mbork As I mentioned many times, I am a PostgreSQL fan. I wrote several times about psql, the default PostgreSQL terminal client. A few days ago I gave a short talk in my company about the virtues of psql, and in preparation for that I looked at its manual (again). As is often the case, I discovered a few hidden gems I didn’t know about.

2024-03-02

  • 05:09 UTC (new) 2024-03-02 Some tips about Emacs keyboard macros . . . . mbork Some time ago I had to create some rather repetitive code. These days I often use multiple cursors for such things, but for some reasons this time I decided to go the traditional route and use the built-in keyboard macros. Here’s the catch, though. When you want to use keyboard macros and insert an (incremented) number for every occurrence, you can type f3 (kmacro-start-macro-or-insert-counter) while recording the macro. What I needed, though, was to insert that number twice for every execution of the macro.

2024-02-28

2024-02-27

2024-02-26

  • 17:48 UTC (new) 2024-02-26 A simple trick with URL parsing in plain text emails . . . . mbork Today I only have a very short tip I thought up a few days ago. If you sometimes send URL via emails (like me), and you absolutely hate HTML emails (like me), there is a common and annoying problem. If the URL you send is the last thing in a sentence, and you want to be correct and end that sentence with a period (or other punctuation), a lot of email clients will treat that punctuation as part of the URL, and of course such “modified” URL won’t work for the recipient. I usually solved that by putting a space between the URL and the period – not 100% correct, but I could live with that. A few days ago it occurred to me that there is another, slightly hackish way to solve my issue. From now on I’m using a hash instead of a space. Assuming that the website I link to doesn’t have any element with the id~ of a period (or any other weird thing like an exclamation mark, of a period followed by a closing parenthesis etc.), the punctuation will be ignored by the browser, but I won’t need to put any space before the end-sentence period. You’re welcome!

2024-02-17

  • 16:30 UTC (new) 2024-02-17 Opening external drives in Dired . . . . mbork I use external drives pretty often – for backups, for moving files between machines, and for storing mp4 files, for example. I’ve been using UDisks for quite some time now. It automounts an external drive under the /run/media/$USER/VolumeName directory (where VolumeName is different for each drive, of course). I also use Dired as my main file manager. As most Emacsers know, it’s far from shiny, but it’s incredibly powerful, especially combined with some other Emacs features. One problem I have is that when I insert a drive into one of the USB ports, I’d like to be able to open it in Dired.
  • 16:29 UTC (diff) Comments on 2024-02-12 Finding Bible quotes . . . . mbork Ha, that's *very* interesting, thanks! I'm wondering if it's documented anywhere...

2024-02-12

  • 10:16 UTC (new) Comments on 2024-02-12 Finding Bible quotes . . . . jeski I played a bit with the Millenium Bible site and it seems that you are able to achieve something similar using their otworz.php API: . . .
  • 05:39 UTC (new) 2024-02-12 Finding Bible quotes . . . . mbork I often have the need to find some particular quote of the Bible – either I am reading some religious text or I want to link to some passage on my blog. What I miss is the ability to quickly see the relevant passage, open it in a browser and create an Org mode link to it.

2024-02-05

  • 05:45 UTC (new) 2023-02-05 From the kill ring to a register revisited . . . . mbork Two weeks ago I wrote about my little command to move the topmost (or some other) kill ring entry to a register. It turned out that this particular post – which I thought was rather niche – spurred more interest than apparently more useful posts I have. Go figure.

2024-01-26

2024-01-22

  • 04:18 UTC (new) 2024-01-22 From the kill ring to a register . . . . mbork I am probably one of the five or six people on this planet who use Emacs registers. I mostly use them for text insertion (especially when I need to insert some boilerplate – and especially more than one piece of it – several times, but it’s not general enough to be put into Yasnippet), but I sometimes store window configurations in them, and I might have used them for other purposes once or twice. Sometimes, though, I kill some text to yank it elsewhere and only then realize that I’ll need to kill/yank some other fragments, too. Using the kill ring to do this one time is fine (with M-y or with browse-kill-ring); using it more times is rather inconvenient. Hence I decided to write a little command to copy the text from the kill ring to a specified register. And here it is.

2024-01-08

2023-12-25

  • 21:26 UTC (new) 2023-12-25 Merry Christmas 2023 . . . . mbork As usual at this time of year, let me wish all of you Merry Christmas! And also as usual, I promise to say a decade of the Holy Rosary for everyone reading my blog.

2023-12-11

  • 17:05 UTC (new) 2023-12-11 Replacing TeX control words behind the point . . . . mbork Two weeks ago, a friend from Polish TeX Users’ Group mailing list asked about an Emacs tool to replace control sequences with their Unicode counterparts. I also have this need from time to time, and I usually go with the TeX input method. He is not satisfied with it, though, because it replaces too much for him – for instance, he doesn’t want a_1 to get translated to a₁. He remembered some utility (written by another Polish TeX user) which replaces a TeX sequence with a Unicode equivalent, but only on demand. Since that one seems to be lost in the depths of time, he was left without a solution.

2023-11-27

  • 08:33 UTC (new) 2023-11-27 Clocking in to parent entries . . . . mbork Like many, many Emacs users these days, I’m a heavy user of Org mode. In fact, both of my blogs are written in Org. And while this very blog usually has fairly short entries, my other blog has much longer posts, divided into subsections. This creates a minor problem for me. I track time I spend on writing, but I don’t want to track time spent on individual sections of a blog post. In other words, even if I am in some lower-level heading, when I clock in, I want Org to clock in in the parent heading. Emacs being Emacs, I figured there must be a way to make that happen automatically.

2023-11-13

  • 06:24 UTC (new) 2023-11-13 Coloring CamelCase . . . . mbork Some time ago one of the members of the Emacs mailing list asked about coloring CamelCase identifiers. His idea is to define two faces and have all “even” words in a camel case indentifier colored with one of them, and the “odd” words colored with the other one. The question suggests using some code from Glasses mode, which is a lesser-known Emacs feature which inserts undescores between words in camel case identifiers (and it does it using overlays, so the underscores are not really part of the buffer, they just look like this). My general rule is to avoid camel case whenever I can, but I sometimes use Glasses mode, especially when I have to deal with jsx files, where camel case is the standard. It turns out that Glasses mode already has (almost) what is asked for.

2023-10-30

  • 18:52 UTC (new) 2023-10-30 My plans for 2023 - October update . . . . mbork It’s been another two months since my last update, so here we are again! It’s been a busy two months for me, though some plans still are not brought to the forefront (which is a shame, I know, but I can’t do everything).

2023-10-14

  • 05:04 UTC (new) TODO 2023-10-14 Avoiding repetitions . . . . mbork Deleted TODO_2023-10-14_Avoiding_repetitions
  • 05:03 UTC (new) 2023-10-14 Avoiding repetitions . . . . mbork I write a lot of prose. That does not mean I’m good at it nor very creative – I haven’t written any novels or even short stories. By “prose” I mean writing in a natural language (mostly English nowadays). In fact, most of the writing I’ve done in my life is technical in nature (usually either about technology or about mathematics). And (as you obviously know) I’m also a technology geek and an Emacs user. An immediate thought is: how to make Emacs help me write better?
  • 05:02 UTC (new) TODO 2023-10-14 Avoiding repetitions . . . . mbork I write a lot of prose. That does not mean I’m good at it nor very creative – I haven’t written any novels or even short stories. By “prose” I mean writing in a natural language (mostly English nowadays). In fact, most of the writing I’ve done in my life is technical in nature (usually either about technology or about mathematics). And (as you obviously know) I’m also a technology geek and an Emacs user. An immediate thought is: how to make Emacs help me write better?

2023-09-30

  • 19:17 UTC (new) 2023-09-30 Confirming potentially dangerous actions . . . . mbork A common situation is when I want to do something on my computer with possibly destructive consequences, like deleting a file, truncating a database table etc. One common approach to making sure this won’t happen accidentally is to require the user to press y or even type yes (this is what Emacs does with its y-or-n-p and yes-or-no-p functions). Some time ago I had a similar need in a shell script. I was afraid, however, that even requiring the user to type yes is not enough – it is easy to condition oneself to type a three-letter word without much thinking, after all.

2023-09-18

  • 18:41 UTC (new) 2023-09-18 Making Anki flashcards from subtitles . . . . mbork Those of you who follow my blog know that one of my hobbies is translating subtitles. The main reason I do this is to watch stuff with my daughter, who doesn’t yet speak English fluently. Some time ago it dawned on me that I can use my translations twice. Not only can I watch films and tv series with her, but I can use them to help her learn English.

2023-09-02

  • 11:52 UTC (new) 2023-09-02 Irregular recurring TODOs in Org mode, part I . . . . mbork Some time ago I mentioned a very peculiar type of TODOs I’d like to implement. These are things I’d like to do from time to time, but not necessarily on a regular basis. A canonical example is an inspirational blog post I’d like to reread once in a while. I admit that this idea is inspired by spaced repetition, where things I want to remember are presented to me repeatedly, but with increasing intervals. Here, however, the situation is a bit different.

2023-08-21

  • 17:47 UTC (new) 2023-08-21 My plans for 2023 - August update . . . . mbork Since about two months have passed since the last blog post with my 2023 plans update, it’s time for another one. This time it is going to be a bit shorter, since not a lot of stuff has happened (or rather, a lot did, but it was mostly concentrated on one of the projects, which I think is… good?).

2023-08-05

2023-07-22

2023-07-15

  • 04:26 UTC (new) 2023-07-15 Drawing ASCII art charts in Emacs buffers . . . . mbork Two months ago I wrote about how I track my weight in Emacs. I am still doing it, and dieting works quite well, but I had one problem with my setup: I really wanted to have a graphical representation of my weight data – in other words, a chart. After quickly assessing the existing solutions (the chart.el library included in Emacs and Org Plot, I decided that I need something else. I don’t want to have to run an external program (in this case, gnuplot), and I want to have a simple ASCII art scatter plot (but neither a bar chart nor just an additional column containing a histogram of the values in the table.

2023-07-08

  • 13:20 UTC (new) 2023-07-08 Finding a common prefix of a set of strings . . . . mbork Some time ago I needed a very specific thing. Given two strings, I wanted to find their longest common (initial) substring. For example, given abc and abd, I wanted ab. I thought that Emacs Lisp must have something like this already, and I wasn’t wrong. It turns out there are even two functions which can do that!

2023-07-03

  • 05:24 UTC (new) 2023-07-03 From mp3s to podcasts . . . . mbork Many years ago I used to listen to podcasts a lot. I had my two favorite ones, and they provided me with more than 90 minutes of interesting material to listen every week (and that is not counting several hundred archive episodes!). Recently, I decided to start listening again to interesting people while I commute. This time, though, I want to listen to webinars instead, and I have them in the form of mp3 files. Thing is, how do I get them on my smartphone?

2023-06-26

2023-06-19

2023-06-12

  • 18:08 UTC (new) 2023-06-12 Counting time, backwards . . . . mbork Some time ago I thought that I would like to have a feature Org mode doesn’t seem to have. There are things I would like to do once in a while, but I don’t need a reminder with a hard deadline (like a repeating one) – I’d prefer a gentle nudge. What if I could display a list of things I select, each one with information how long ago I did it last?

2023-06-03

  • 10:31 UTC (new) Comments on 2023-06-03 Org agenda clock check . . . . Anonymous You missed the very important and really helpful overlap check!
  • 05:30 UTC (new) 2023-06-03 Org agenda clock check . . . . mbork Some time ago (well, a long time ago) someone posted an interesting discovery in Org mode agenda: “clockcheck mode”. I stored the link to that message with the intention of blogging about it and forgot about it. I rediscovered it some time ago and decided to take a look.

2023-05-29

2023-05-20

2023-05-13

  • 11:46 UTC (new) 2023-05-13 Dieting with Org mode . . . . mbork Some time ago I started to weigh myself every day. Some people argue that this is a bad idea and you should weigh yourself once per week to avoid worrying about random fluctuations. I disagree – the way not to worry about random fluctuations is to look at moving averages instead, Hacker's Diet-style. Note: I do not necessarily endorse Hacker’s Diet as a whole, but the moving average approach is certainly a good one. For the sake of simplicity, I am going to use simple (unweighted) moving averages over one week. I want to keep my weight data in an Org mode table (obviously).

2023-05-06

  • 08:21 UTC (diff) Comments on 2023-05-06 Juggling playlists in EMMS . . . . mbork Thanks, I had no idea that exists! I'll check it out.
  • 07:59 UTC (new) Comments on 2023-05-06 Juggling playlists in EMMS . . . . Garjola Hi, Very interesting and helpful post. Just one thing: I use the enwc package to manage networks from Emacs. With it, you can get the network id . . .
  • 06:12 UTC (new) 2023-05-06 Juggling playlists in EMMS . . . . mbork It’s been several times now that I described my productivity system here. While I like it a lot, it still has room for improvement. Some time ago I mentioned it to a colleague and shared one frustration I have with it. When I fail to do even one thing on my carefully prepared plan for a day (which happens once in a while, of course), sometimes I lose motivation and skip more subsequent items. This leads to spending less time on things I want to do and more time on procrastination that day. It happens seldom enough not to be a real issue (and it doesn’t mean I fail to do anything – just less than usual or hoped for), but it is a bit frustrating. He suggested a pretty clever (and obvious in hindsight) way to deal with this. His idea is to have a separate music playlist „for work” and train my brain to associate that particular music with focused work. That way I would have another nudge to do particular kind of stuff.

2023-04-29

2023-04-22

  • 19:02 UTC (new) 2023-04-22 Org mode clock table for the last week . . . . mbork Some time ago I mentioned that I started doing “weekly reviews” of what I have done last week and what I am going in the next week. One part of my weekly reviews is checking how much time I spent doing various things last week. Of course, Org mode clock tables are an excellent tool for that. There is one caveat, though. What does “a week” mean? It turns out that it is not obvious at all. The main problem here is the :wstart parameter, telling what day is the first day of the week.

2023-04-15

  • 18:42 UTC (new) 2023-04-15 Downcasing word at point in the whole buffer . . . . mbork Some time ago, one of the members of the Emacs-humanities mailing list mentioned a very specific problem. He wants to be able to replace all occurrences of the word at point with its upercase (or lowercase) variant. This is one of these things that can be solved with a bit of custom Elisp. Being a big fan of writing small (or sometimes not so small) helper functions to make editing easier, I offered to do a bit of coding to accomplish this task, and here it is. Being a teacher, I’d like to provide at least a short explanation, too. (Most of you probably know that I spent quite some time in 2021 doing exactly this – coding Elisp and explaining it – and the result is my book Hacking your way around in Emacs, designed as a “next step” after Robert J. Chassell’s excellent An introduction to programming in Emacs Lisp. Check out Chassell’s book if you are interested in learning Elisp, and then my book if you ant to go further!)

2023-04-13

2023-04-09

  • 04:39 UTC (new) 2023-04-09 Easter 2023 . . . . mbork So, another year has passed since I last wrote about Easter. It would seem that it’s monotonous, but it isn’t – life brings so many unexpected things that I am surprised every day. I am extremely thankful for quite a few things in the last year, but all this pales in comparison to one Event – Christ’s resurrection. If not for that, everything else – every kind person I encountered, every nice surprise I had, every achievement, every pleasure – all that would mean nothing. If there is no resurrection of the dead, then Christ cannot have been raised either, and if Christ has not been raised, then our preaching is without substance, and so is your faith (1 Corinthians 15:14). Good thing is that it’s all true! All that is not to say that last year was without issues. With war going on in neighboring country and plenty of personal problems I can’t say that life is ideal. But it does not negate the fact that I have a lot to be thankful for! Christ has risen, rejoice! And as the tradition goes, be assured that I will offer a decade of Rosary for all my readers here.

2023-04-01

  • 15:54 UTC (new) 2023-04-01 Showing an image between lines in Emacs . . . . mbork I am now coding a bigger thing in Elisp (and I will definitely blog about it when it’s done), but for now let me say something about an issue I encountered along the way. I needed to display an image between the lines (in the literal sense;-)), preferably not interfering with the editing process – so just inserting two newlines and a space with an image display property inbetween was out of the question. (I wanted the user to be able to edit the buffer irrespective of the image display, and actually inserting anything into the buffer would mess with the undo mechanism).

2023-03-25

  • 07:20 UTC (new) 2023-03-25 Using a thesaurus from within Emacs . . . . mbork Now that I started to devote more time to writing, I need a thesaurus more and more often. What I usually did was to go to my browser and use thesaurus.com – but as we all know, leaving Emacs is always a pain. I fired M-x package-list-packages and it turned out that there are several packages to look up synonyms from the comfort of Emacs.

2023-03-20

  • 21:35 UTC (new) 2023-03-20 Manually entering clocking data . . . . mbork As I alluded many times in the past, I use Org mode’s clocking feature almost all the time. However, there are times I don’t. One of such cases is a rare situation when I don’t have access to my computer. Since I started commuting using public transport, I do some reading in a streetcar or bus. When I get to my laptop again, I want to update my clocking data. How to do that?

2023-03-11

  • 08:33 UTC (new) 2023-03-11 Adding my TODOs to agenda . . . . mbork Last month I wrote about my way of managing TODOs. It occurred to me that I could make it even better. Why not add my set of TODOs to look into to my agenda?

2023-03-04

2023-02-27

2023-02-18

  • 08:52 UTC (new) 2023-02-18 My approach to TODOs . . . . mbork Some time ago I described my productivity system. I also mentioned that it is still evolving. One of the aspects where it needed some evolution is handling TODOs – and this is precisely the stuff I am working on right now. Now the main problem I’ve been having for a long time now is that I tend to add a lot of TODOs to my list, which grows much faster than I deal with them. The worst thing here is that when I have so many TODOs lumped together, important and urgent things often get mixed up with unimportant and not urgent ones, etc. So, I devised a way to handle this situation.

2023-02-11

  • 08:37 UTC (new) 2023-02-11 Linear scaling of subtitles timestamps . . . . mbork As I have mentioned here a few times, I spend some time translating subtitles. That’s a prestigious line of work with a long and glorious tradition. However, there are many problems awaiting a bold adventurer who wants to do that. While I really like translating, it is a lot of effort, and sometimes I get the feeling that it’s just nothing but work, work, work, all the time. Well, life is pain. Anyone who says differently is selling something.

2023-02-08

2023-02-07

2023-02-04

  • 09:17 UTC (new) 2023-02-04 My accounting book is finished . . . . mbork As I mentioned in my post about plans for 2023, I spent some time last two weeks on Personal accounting in Ledger, my booklet about, well, personal accounting in Ledger. It is now finished.

2023-02-01

2023-01-31

  • 16:35 UTC (diff) Comments on Strona domowa . . . . mbork Thanks! How about this? https://mbork.pl/?action=rss;days=30;all=0;showedit=0
  • 08:42 UTC (new) Comments on Strona domowa . . . . Anonymous Hi domowa, I'm using elfeed for reading blogs/newsletts, It would be very helpful if your page contains a rss.xml. Why not add one? Thanks . . .

2023-01-30

  • 15:18 UTC (new) 2023-01-30 The benefits of everything being a buffer . . . . mbork For today I only have a very short tip – or maybe let’s call it an anecdote. As all Emacs users probably know, one of the very basic Emacs concepts is the buffer. A few days ago I encountered an (admittedly, not very common) situation when this came in very handy.

2023-01-23

2023-01-14

  • 07:03 UTC (new) 2023-01-14 My plans for 2023 . . . . mbork It is the first time I write a post about my plans for the upcoming year. It’s going to be a writing year!

2023-01-09

  • 06:09 UTC (new) 2023-01-09 TODO stats table . . . . mbork Last week I showed how to compute a summary of all TODO keywords in an Org mode subtree. Today we’ll find out how to insert those data in an easy and readable way in the buffer.

2023-01-05

2023-01-03

2023-01-02

  • 15:41 UTC (new) 2023-01-02 Computing Org mode TODO stats . . . . mbork When I started using Org mode, I followed the very common (and very sound) advice and did not try to learn it all at once. This means that I didn’t use clock tables at all. Well, some time has passed, and I learned that they are actually pretty useful. One obvious application is to get a report for the sake of invoicing, but I also use them to gain knowledge about where I spend how much time. Recently I realized that I miss another, similar feature in Org. Much like having a clock table – which is a summary of time spent on tasks in a file or subtree – I would like to be able to see a report telling me how many tasks I have in a subtree, and how many of them are in various states.

2022-12-25

  • 09:17 UTC (new) 2022-12-25 Merry Christmas 2022 . . . . mbork Merry Christmas to you all! Many people seem to fall in the rut of “Christmas again, and my life is still rubbish – nothing changed, and probably nothing will ever change…”. Folks, this is so wrong! What I think is this: “yet another Christmas” means that God believes that I am capable of change, and is giving me one more chance – again! Thank you, my Lord! That is not to say that I should not try to do my best to be better. In my case this means (among other things) that I’m (finally) starting to do regular weekly reviews, and planning my weeks and (hopefully) quarters and years. But enough of it. This is not a post about my productivity, this is about the joy of Christmas! Our Savior is born, rejoice! (Also, per the tradition, I will offer a decade of rosary for all my readers!)

2022-12-19

  • 07:22 UTC (new) 2022-12-19 A few new things in Emacs 29 . . . . mbork Everybody with an Emacs blogs raves about Emacs 29 these days. Things like Eglot, tree-sitter, SQL support and the like. Well, this is all nice – more than nice, brilliant! – but let’s not forget a few minor advances which are coming with Emacs 29. Let me mention a few things that I especially like.

2022-12-12

  • 10:39 UTC (new) 2022-12-12 Debugging chained operations in Lodash . . . . mbork I use Lodash in some of my projects. One of the nice features of Lodash is the chaining concept. If you have an object (often an array) which you want to transform usign a series of operations like map, filter etc. Now this is great – if it works. But what if it doesn’t and the result is completely unexpected? It would be nice if you were able to see the intermediate results of the chained operations without, so to speak, breaking the chain… It turns out you can!

2022-12-11

2022-12-08

More...

Filters