~protesilaos/denote

1

Support ANY FILE TYPE with 'denote-file-types'

Details
Message ID
<87a65deryt.fsf@protesilaos.com>
DKIM signature
missing
Download raw message
Good day folks,

The variable 'denote-file-types' controls how Denote performs all its
file-type-aware operations (e.g. what is the front matter that Org must
use and how are its links formatted).

[ Do not confuse this with the user option 'denote-file-type'. ]

Today I made lots of changes to expand 'denote-file-types'.  The gist is
that we now have the means to support any file type.  Granted, only
advanced users will want to leverage this facility, at least for the
time being, though I feel we are now realising the full potential of
Denote to be a file-type-agnostic system for taking notes.

[ We can always support a new file type for all users, if there is
  a good reason for it. ]

There should be no change for end-users.  What worked before will
continue to behave the same way.  This is just for those who need a
bespoke setup.

The manual has been updated accordingly.  Specifically, the section
titled "For developers or advanced users":
<https://protesilaos.com/emacs/denote#h:c916d8c5-540a-409f-b780-6ccbd90e088e>.

The latest major commit in this series:

    commit 570d9ac0bde3923961e69200614094e2b7bc482e
    Author: Protesilaos Stavrou <info@protesilaos.com>
    Date:   Sun Oct 30 08:12:20 2022 +0200

        Make all links contingent on denote-file-types

        This consolidates all link formatting and link extraction/recognition
        in the variable 'denote-file-types'.  We now have the ability to
        control centrally how file types will behave for all linking commands
        and their ancillary functions.

        With this and other changes from earlier today (see excerpt of Git log
        further below), the 'denote-file-types' provides the means to extend
        Denote to support ANY FILE TYPE: how it produces its front matter, the
        way to retrieve front matter values, the pattern to format keywords,
        link format+extraction/ecognition, et cetera.  The doc string of
        'denote-file-types' covers all the technicalities.

        This is an advanced feature of Denote.  It is only intended for
        experienced users.

        A relevant request for such a feature can be found in issue 86 on the
        GitHub mirror: <https://github.com/protesilaos/denote/issues/86>.

        I believe I have tested everything, though we have plenty of time
        ahead of us to test things before the release of version 1.2.0 of
        Denote (tentative target is the end of November).

        * * *

        Relevant commits:

        *  2afd07d 2022-10-30 07:03:58 +0200 Protesilaos Stavrou: Make public all variables for link in context
        *  a553003 2022-10-30 06:50:27 +0200 Protesilaos Stavrou: Make link format variables public
        *  9957eaa 2022-10-30 06:39:04 +0200 Protesilaos Stavrou: Clarify denote-link--format-markdown doc string
        *  4c7bfe2 2022-10-30 06:34:53 +0200 Protesilaos Stavrou: Make date format functions public
        *  dec6367 2022-10-30 06:20:38 +0200 Protesilaos Stavrou: Make denote-file-types read a :date-function
        *  a93d9f2 2022-10-30 06:22:30 +0200 Protesilaos Stavrou: Clarify denote-file-type doc string
        *  14f6919 2022-10-30 05:46:23 +0200 Protesilaos Stavrou: Refine denote-file-types documentation
        *  a214901 2022-10-30 05:44:23 +0200 Protesilaos Stavrou: Refine how denote-file-type-prompt gets candidates

     README.org |   8 +++++
     denote.el  | 117 ++++++++++++++++++++++++++++++++++++++++---------------------
     2 files changed, 86 insertions(+), 39 deletions(-)

All the best,
Protesilaos (or simply "Prot")

-- 
Protesilaos Stavrou
https://protesilaos.com
Details
Message ID
<87sfj5xq6y.fsf@protesilaos.com>
In-Reply-To
<87a65deryt.fsf@protesilaos.com> (view parent)
DKIM signature
missing
Download raw message
I wrote a tutorial about this.  Posting it here for completeness:
<https://protesilaos.com/codelog/2022-10-30-demo-denote-custom-file-type/>.

Will eventually include something along those lines in the manual.

-- 
Protesilaos Stavrou
https://protesilaos.com
Reply to thread Export thread (mbox)