Table of contents

Steinmetzmehl - Qualität die ankotzt

Es gilt als das beste Mehl der Welt. Jetzt gibt es die Produkte von Steinmetz unter der Marke „Unsere Heimat – echt & gut“. Ein einzigartiges Verarbeitungsverfahren macht aus regionalem Getreide ein echtes Premium-Mehl.

schreibt Edeka auf seiner Webseite.

Ich hatte dieses Mehl schonmal da und es nicht weiter verwendet. An den Grund konnte ich mich nicht mehr erinnern. Nun hat es meine Frau wieder gekauft (ich hatte 550 auf den Zettel geschrieben). Heute - am Sonntag - wollte ich mein Livieto Madre füttern und plötzlich fiel mir wieder auf, weswegen ich dieses Mehl nicht mehr haben wollte:

Es enthält Spelzen!

Nun habe ich ja gelernt, dass der deutsche Standard 550 ein Mahlgrad ist. Mahlgrad in Form von "Alle Körner haben ungefähr die gleiche Grösse". Das hat der Müllerei Steinmetz in 120 Jahren wohl noch nie jemand gesagt. Auf jeden Fall scheint die "Erfindung" des Herrn Steinmetz nichts zu taugen, wenn da nach dem Sieben noch Spelzen im Mehl sind.

Streng genommen wäre das ja sogar Betrug. Denn wenn Vollkornmehl in der Tüte ist, muss man es auch draufschreiben. Tat man bei Edeka/Steinmetz aber nicht. Tja. Faulheit? Unwissenheit? Inkompetenz? Oder einfach nur ein paar Dilettanten bei der Arbeit? Man weiss es nicht.

Vielleicht finde ich ja mal die Muße im Edeka den Marktleiter darauf anzusprechen, viel bringen wird das aber wohl nichts.

2018-10-28 - Ich hab mal eine kleine Handvoll ausgesiebt:

2018-10-28 - da sind sie, die Spelzen, gar nicht mal so wenige:

2018-10-28 - Qualität, die ankotzt:

2018-10-28 - 550 steht drauf, ist aber nicht drin:

↷ 28.10.2018 🠶 #kochen

EU-DSGVO @daemon.de

Lutz Donnerhacke hat sehr gut beschrieben, wie man als Privatblogger mit der neuen EU Datenschutzverordnung umgehen muss. Ich habe mir meine Seite also äquivalent genauer angeschaut und festgestellt, dass ich - wie im Impressum bereits beschrieben - keine IP-Adressen speichere und Email-Adressen optional sind und diese wiederum auch NUR wenn man kommentieren möchte.

Da ich in letzter Zeit aber ohnehin kaum noch zum Posten komme und schon seit langer Zeit keine Kommentare mehr gepostet worden sind (Spammer wurden recht wirksam von meinen Abwehrmaßnahmen ferngehalten, falls jemand den Django Code haben möchte: einfach bei mir melden) - habe ich beschlossen, dass ich das Feature auch einfach ausschalten kann.

Gesagt, getan. Kommentare sind ab sofort abgeschaltet, vorhandene Kommentare und die Daten der Kommentierer habe ich alle gelöscht. Zack und aus. Somit speichere ich überhaupt keine personenbezogenen Daten mehr, die ich gemäß EU-DSGVO dokumentieren müsste.

Meine Datenschutzerklärung im Impressum habe ich entsprechend angepasst.

↷ 24.05.2018 🠶 #server

Emacs lisp: which key was pressed?

Sometime you might want to know which key was pressed last in a lisp function. I came up with this little function for this purpose:

(defun last-key ()
  "Return the last key pressed."
  (car (reverse (append (recent-keys) nil))))

↷ 03.08.2017 🠶 #emacs

autoscratch - solve the *scratch* buffer problem

I use emacs for more than 20 years now. I love it, I am addicted, I can't even do anything productive without it. However, there was one problem left: the *scratch* buffer. This is a non-file buffer, which always exists always in emacs. By default it has emacs-lisp-mode enabled and you can use it to hack short elisp sexps for testing. In fact I use it for exactly this purpose.

But sometimes I hate it as well! I get a phone call and need to take a note quickly, *scratch* is already open, so I use this. But the mode doesn't really fit. So I switch to text-mode and then enter the notes. I did it this way almost since day one of my emacs usage.

A couple of months ago I came up with a "solution", I just create a *text* buffer on startup with text-mode already enabled in my .emacs. But I still need to switch to it everytime I need it. Still too annoying!

So now, here's my final solution, which tries to fix this mess once and for all: autoscratch.

This major mode is really simple. Basically it consits of an alist with instructions on how to automatically switch the *scratch* buffer mode. Enter an "(" and it switches to emacs-lisp-mode, enter "*" and it switches to org-mode, enter some letter a-z, and it switches to text-mode. You get the idea.

It also solves another problem I (and many other users according to google) have: once I set the *scratch* buffer mode to, say, *text-mode* with some text in there, I don't have an elisp *scratch* buffer left anymore. I'd need another one, but how to create a second *scratch* buffer? Obviously you'll need to rename the current text-mode buffer first and then create a new empty buffer. The emacs wiki contains lots of suggestions for this kind of solution.

No more of this! Autoscratch can just "fork" the buffer, if enabled (set autoscratch-fork-after-trigger to t which is the default). Here's how it works: type a "(" into the empty autoscratch-enabled *scratch* buffer. Autoscratch renames this buffer to *emacs-lisp-scratch*, enables emacs-lisp-mode and creates a new *scratch* buffer in the background. So, if you need some *scratch* space, it'll be there for you waiting bravely for input.

Here's the default trigger list telling autoscratch how to switch modes:

'(("[(;]"         . (emacs-lisp-mode))
  ("#"            . (autoscratch-select
                     '(("perl"   . (cperl-mode))
                       ("ruby"   . (ruby-mode))
                       ("python" . (python-mode))
                       ("conf"   . (conf-unix-mode))
                       ("shell"  . (shell-script-mode)))))
  ("[-a-zA-Z0-9]" . (text-mode))
  ("/"            . (c-mode))
  ("*"            . (progn (insert " ") (org-mode)))
  ("."            . (fundamental-mode)))

Now if you configure autoscratch like this:

(require 'autoscratch-mode)
(setq initial-major-mode 'autoscratch-mode)
(setq initial-scratch-message "")
(setq inhibit-startup-screen t)

then emacs will start with an empty *scratch* buffer as always, but with autoscratch mode enabled. Type in a "(" and emacs-lisp-mode will be started, the *scratch* buffer will be renamed and a new *scratch* created in the background. Or, type in a "#" and you'll be asked what to switch (the autoscratch-select function does this). You can configure almost anything here.

Oh, and just in case you need to manually create a new scratch buffer, just execute "M-x autoscratch-buffer".

Update 2018-08-02:

There was an issue with autoscratch in combination with magit, the original scratch buffer has the same problem as well. The buffer did not alter the default-directory variable. It is buffer-local and inherits the contents of the same global variable, if set to something. So, if you have some file open in a buffer and start a new autoscratch buffer from there, default-directory of this buffer will then be set to the directory of the file visited in the buffer which was last active. Now, if you close all files, except the scratch buffer, and start magit-status AND if the directory is inside of a git repo, then magit will open this repo instead of asking you which repo to open.

This is not the behavior I expect from a scratch buffer, so I modified autoscratch-mode to reset the default-directory (if enabled) to $HOME.

Update 2017-07-17:

You can complete this scratch buffer setup with the great persistent-scratch.el mode. Here’s my config for it:

(require ‘persistent-scratch)
(setq persistent-scratch-save-file
(expand-file-name “scratches.el” user-init-dir))
(persistent-scratch-setup-default)

(defun tvd-autoscratch-p () “Return non-nil if the current buffer is a scratch buffer” (string-match “scratch*" (buffer-name)))

(setq persistent-scratch-scratch-buffer-p-function ‘tvd-autoscratch-p)

With this setup, scratch buffers will be saved on exit and restored on startup, so you never loose any cool snippet or note you have in a scratch buffer.

↷ 17.07.2017 🠶 #emacs

csh sensible defaults

On FreeBSD (and possibly others) the csh is the default login shell for root or default users. I always try to avoid it and use bash. However, sometimes it's not possible or dangerous to install bash (inside a jail for example).

So I decided to check if it is possible to configure csh in a way to make it less annoying. I read the docs, tried many different options and here is the result.

That's not much but helps digging around a system using csh. With this config you'll get:

  • completion similar to bash
  • right/lift jumping by words using CTRL-left and CTRL-right
  • CTRL-up goto beginning of line, CTRL-down goto end of line
  • history search using CTRL-R
  • some sensible aliases
  • a meaningful prompt
# sensible defaults for CSH 
alias  h     history 25
alias  j     jobs -l
alias  la    ls -a
alias  lf    ls -FA
alias  ll    ls -lA
alias  l     ls -laF
alias  lt    ls -ltr
alias  md    mkdir -p
alias  ..    cd ..
alias  ...   cd ../..
alias  ....  cd ../../../
alias  vi    nvi
alias  vim   nvi

# A righteous umask
umask 22

# environment config
set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin) setenv EDITOR vi setenv PAGER more setenv BLOCKSIZE K

# if interactive, configure further
if ($?prompt) then # interactive prompt
 
set prompt = "%N@%m:%~ %# “ set promptchars = ”%#"

# history config
 
set history = 5000 set savehist = 5000

# complete case-insensitive
set complete = enhanced # print possible completions if more than 1 match
 
set autolist = ambiguous # enable filename completion
 
set filec # shut up
 
set nobeep # enable redirect protections
 
set noclobber # forbid rm *
 
set rmstar # mail?
 
set mail = (/var/mail/$USER)

# convenience bindkeys, similar to emacs or inputrc
 
# ALT-LEFT
 
bindkey "^[^[[D" backward-word # ALT-RIGHT
 
bindkey "^[^[[C" forward-word # ALT-UP + HOME
 
bindkey "^[^[[A" beginning-of-line # ALT-DOWN + POS1
 
bindkey "^[^[[B" end-of-line # CTRL-R (like bash), then type
 
bindkey "^R" i-search-back # SHIFT-TAB cycles through possible completions, let go if good
 
bindkey "^[[Z" complete-word-fwd endif

↷ 13.07.2017 🠶 #source