Frage

Now dired writes the last access date/time in the following format:

Jun 20 14:22

How to make it write:

20.06.2012 14:22
War es hilfreich?

Lösung

one of these options:

1 you can set the appropriate variables.

 (setq ls-lisp-format-time-list  '("%d.%m.%Y %H:%M" "%d.%m.%Y %H:%M")
      ls-lisp-use-localized-time-format t)

enter image description here

explanation: The ls-lisp-format-time-list is a list of two format strings, which work as they do with the format-time-string function. There are two, because by default emacs is set up to display "recent" files with a higher-resolution timestamp than "older" files, where the recent vs older threshold is 6 months (I think). The first is the format used for recent files; the latter is for older files.

I never liked the default behavior; I just want the files to be displayed the same way. So I set the list to use the same time format for newer and older files.

2 You can redefine the function ls-lisp-format-time.

For example, if I do this:

(defun ls-lisp-format-time (file-attr time-index now)
  "################")

Then dired looks like this:

enter image description here

The original definition of the function is in ls-lisp.el.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top