Function: denote-retrieve-filename-identifier

denote-retrieve-filename-identifier is a byte-compiled function defined in denote.el.

Signature

(denote-retrieve-filename-identifier FILE)

Documentation

Extract identifier from FILE name, if present, else return nil.

To create a new one from a date, refer to the function referred by denote-get-identifier-function.

Source Code

;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
;;;; Front matter or content retrieval functions

(defun denote-retrieve-filename-identifier (file)
  "Extract identifier from FILE name, if present, else return nil.

To create a new one from a date, refer to the function referred by
`denote-get-identifier-function'."
  (let ((filename (file-name-nondirectory file)))
    (cond ((string-match (concat "\\`" denote-date-identifier-regexp) filename)
           (match-string-no-properties 0 filename))
          ((string-match denote-identifier-regexp filename)
           (match-string-no-properties 1 filename)))))