Function: denote-get-file-extension-sans-encryption

denote-get-file-extension-sans-encryption is a byte-compiled function defined in denote.el.

Signature

(denote-get-file-extension-sans-encryption FILE)

Documentation

Return extension of FILE with dot included and without the encryption part.

Build on top of denote-get-file-extension though always return something like .org even if the actual file extension is
.org.gpg.

Source Code

;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defun denote-get-file-extension-sans-encryption (file)
  "Return extension of FILE with dot included and without the encryption part.
Build on top of `denote-get-file-extension' though always return
something like .org even if the actual file extension is
.org.gpg."
  (let ((extension (denote-get-file-extension file)))
    (if (string-match (regexp-opt denote-encryption-file-extensions) extension)
        (substring extension 0 (match-beginning 0))
      extension)))