Recent Changes

Updates since 2024-07-28 18:19 UTC up to 2024-08-27 18:19 UTC

1 | 3 | 7 | 30 | 90 days
List all changes Include rollbacks Include minor changes
List later changes RSS RSS with pages RSS with pages and diff

2024-08-26

  • 16:24 UTC (new) (history) 2024-08-26 Deleting table rows based on data from other tables . . . . mbork Today I have a short tip about PostgreSQL. Some time ago I needed to delete from a table all rows satisfying a certain condition involving another table. It turns out that it is not possible to use join in a delete statement – but there is a way around it (in fact, even two).

2024-08-19

2024-08-12

  • 08:47 UTC (new) (history) 2024-08-12 How to require confirmation before launching an Emacs command . . . . mbork Some Emacs commands are potentially destructive (like kill-emacs, which exits Emacs) and may require some kind of confirmation. The usual way of confirming that this is really what I want to do is y-or-n-p (and a few more functions from its family) and yes-or-no-p. Sometimes, however, there is a command which does not invoke y-or-n-p or any similar function, but for some reason I want it to ask for confirmation. An example is mu4e-compose-reply (bound to R in Mu4e) – I usually want mu4e-compose-wide-reply (bound to W), aka “reply to all”. I thought about advising mu4e-compose-reply, but then it occurred to me that Emacs already has a feature which ensures that I won’t invoke some command by accident: disabled commands.

2024-08-05

  • 11:37 UTC (new) (history) 2024-08-05 Case-insensitive where in clause . . . . mbork Sometimes you need to compare strings case-insensitively. Assume that you want to find a user with an email bob@builder.com in your database, but you don’t know if he didn’t type his email in upper case (BOB@BUILDER.COM), or maybe capitalized (Bob@Builder.com), etc. [...] Now assume that you want to find the ids of all people with emails bob@builder.com, pat@postman.com and sam@fireman.com, still case-insensitively. There is no where in ilike operator in PostgreSQL, so what do we do?

2024-07-29

  • 19:30 UTC (new) (history) 2024-07-27 How to make Emacs not scroll from the current position . . . . mbork Emacs – like most or all other editors – scrolls the buffer when the point moves out of the “visible portion” of text. This is of course exactly what you want – 99% of the time. Sometimes, however, I precisely set things up so that a particular set of lines is visible, and I really don’t want to accidentally mess it up (for example with isearch). I went through the Emacs manual to see if there is some mode or something to do that, and it seems that there’s not. (Though there are quite a few ways to customize scrolling, see the relevant chapters of the manual.) Being me, I decided to code it myself.

More...

Filters