Function: denote--component-has-value-p

denote--component-has-value-p is a byte-compiled function defined in denote.el.

Signature

(denote--component-has-value-p COMPONENT VALUE)

Documentation

Return non-nil if COMPONENT has a non-nil/non-empty VALUE.

COMPONENT can be one of title, keywords, signature, date, identifier.

VALUE is the corresponding value to test.

This function returns nil given an empty string title, signature or identifier. It also returns nil given a nil date or nil keywords.

Source Code

;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defun denote--component-has-value-p (component value)
  "Return non-nil if COMPONENT has a non-nil/non-empty VALUE.

COMPONENT can be one of `title', `keywords', `signature', `date',
`identifier'.

VALUE is the corresponding value to test.

This function returns nil given an empty string title, signature or
identifier.  It also returns nil given a nil date or nil keywords."
  (pcase component
    ('title (not (string-empty-p value)))
    ('keywords (not (null value)))
    ('signature (not (string-empty-p (denote-sluggify-and-apply-rules 'signature value))))
    ('date (not (null value)))
    ('identifier (not (string-empty-p value)))))