0

Is it possible the extend the minibuffer message for save-buffer to instead print something like

Wrote /home/per/Work/justd/fs.d (L lines, T tokens, C chars)

If so what hook/string should I modify

Nordlöw
  • 11,838
  • 10
  • 52
  • 99

1 Answers1

1

I think you have to live with the message "Wrote ..." since this can come from several different handlers and there it is hard-coded. But you can add your own message afterwards:

(add-hook 'after-save-hook (lambda ()
               (message "Saved buffer %s. (%d lines)"
                 (buffer-file-name)
                 (count-lines (point-min) (point-max)))))
Tobias
  • 5,038
  • 1
  • 18
  • 39