emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote f35ef05cb4 1/2: REMOVE support for 'id:' hyperli


From: ELPA Syncer
Subject: [elpa] externals/denote f35ef05cb4 1/2: REMOVE support for 'id:' hyperlink types
Date: Sun, 3 Jul 2022 14:57:27 -0400 (EDT)

branch: externals/denote
commit f35ef05cb451f265213c3aafc1e62c425b1ff043
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    REMOVE support for 'id:' hyperlink types
    
    The original idea was to support the 'org-id' library on the premise
    that it makes Denote a good Emacs citizen.  However, discussions on the
    mailing list[0] and the GitHub mirror[1] have made it clear to me that
    'org-id' is not consistent with Denote's emphasis on simplicity.
    
    To support the way 'org-id' works, we will eventually have to develop
    some caching mechanism, just how the org-roam package does it.  This is
    because the variable 'org-id-extra-files' needs to be kept up-to-date
    whenever an operation on a file is performed.  At scale, this sort of
    monitoring requires specialised software.  Such a mechanism is outside
    the scope of Denote---if you need a db, use org-roam which is already
    great.
    
    [0] 
<https://lists.sr.ht/~protesilaos/denote/%3C8735fk4y1w.fsf%40hallac.net%3E#%3C877d4un73c.fsf@protesilaos.com%3E>
    
    [1] <https://github.com/protesilaos/denote/issues/29>
    
    Quote of what I wrote on the GitHub mirror issue 29:
    
            [ggjp] This is what I was implying.  That we are, in fact,
            providing an option that is not viable long-term, but keeping
            the option for expert users who will be able to handle this.
            And we should warn about this clearly in the doc of that option.
    
        [protesilaos] What you write here @ggjp and what @shrysr explained
        tells me that those expert users will need to be real experts.  To
        put it concretely, I am an experienced Emacs user with no
        programming background, who has written several Emacs
        packages (including the modus-themes which are built into Emacs),
        but I have zero knowledge of using a db or of handling things with
        python and the like.  So if I opt in to 'denote-link-use-org-id' I
        will eventually run into problems that my non-existent skills will
        prevent me from solving.  At that point, I will just use org-roam
        which already handles this use-case in a competent way (and has a
        massive community to rely on in case I need further support).
    
        If each package needs to write its own optimisations and maintain
        its own cache, to me this shows that 'org-id' is not good enough for
        the time being: more work needs to be done in org.git to provide a
        universal solution.
    
        I wanted to support 'org-id' by default on the premise that Denote
        must be a good Emacs citizen which interoperates with the rest of
        the wider ecosystem.  But if 'org-id' leaves something to be
        desired, then that goal is not worth pursuing: we add complexity to
        our code, offer an option that we cannot genuinely/adequately
        support, and make usage of it contingent on reading the docs and
        having a high level of expertise.
    
        I think being a good Emacs citizen is a laudable principle.  In this
        case, the right thing to do is to recommend the use of org-roam
        instead of trying to accommodate 'org-id'.  As such, I have now
        changed my mind and think we should remove what we previously added.
    
        For some context here: the reason I never used org-roam is
        because (i) it is Org-specific whereas I write notes in different
        file types and (ii) I did not want to ever rely on a db or
        equivalent dependency.
    
        
<https://github.com/protesilaos/denote/issues/29#issuecomment-1173036924>
---
 README.org         | 226 ++++++++---------------------------------------------
 denote-link.el     |  99 ++++++-----------------
 denote-retrieve.el |   2 +-
 denote.el          |  14 +---
 4 files changed, 63 insertions(+), 278 deletions(-)

diff --git a/README.org b/README.org
index 4c2cff5681..c47cf9d0bd 100644
--- a/README.org
+++ b/README.org
@@ -423,28 +423,22 @@ want to lift that restriction once everything works as 
intended.
 
 Notes have their own "front matter".  This is a block of data at the top
 of the file, with no empty lines between the entries, which is
-automatically generated at the creation of a new note. The front matter
+automatically generated at the creation of a new note.  The front matter
 includes the title and keywords (aka "tags" or "filetags", depending on
 the file type) which the user specified at the relevant prompt, as well
-as the date and unique identifier which are derived automatically.
+as the date and unique identifier, which are derived automatically.
 
-This is how it looks for Org mode (~denote-file-type~ is nil):
+This is how it looks for Org mode (when ~denote-file-type~ is nil):
 
 #+begin_src org
-:PROPERTIES:
-:ID:          20220630T160934
-:END:
 ,#+title:      This is a sample note
 ,#+date:       [2022-06-30 Thu 16:09]
 ,#+filetags:   denote  testing
+.#+identifier: 20220630T160934
 #+end_src
 
-Org notes use a =PROPERTIES= drawer at the top of the file for maximum
-compatibility with the Org ecosystem, particularly for linking to notes
-and exporting them ([[#h:fc913d54-26c8-4c41-be86-999839e8ad31][Linking 
notes]]).
-
-For Markdown with YAML, the front matter looks like this
-(~denote-file-type~ has the =markdown-yaml= value):
+For Markdown with YAML (~denote-file-type~ has the =markdown-yaml=
+value), the front matter looks like this:
 
 #+begin_src md
 ---
@@ -455,8 +449,8 @@ identifier: "20220630T160958"
 ---
 #+end_src
 
-For Markdown with TOML, it looks like this (~denote-file-type~ has the
-=markdown-toml= value):
+For Markdown with TOML (~denote-file-type~ has the =markdown-toml=
+value), it is:
 
 #+begin_src md
 +++
@@ -467,8 +461,8 @@ identifier = "20220630T161013"
 +++
 #+end_src
 
-And for plain text, we have the following (~denote-file-type~ has the
-=text= value):
+And for plain text (~denote-file-type~ has the =text= value), we have
+the following:
 
 #+begin_example
 title:      This is a sample note
@@ -498,144 +492,20 @@ in the doc string of ~format-time-string~..
 [ DEV NOTE: ~denote-date-format~ supersedes the now obsolete
   ~denote-front-matter-date-format~ as part of {{{development-version}}} ]
 
-** Tweaking the front matter
-:PROPERTIES:
-:CUSTOM_ID: h:f69371d5-1843-493d-9ff5-c1ab3b43024e
-:END:
-
-What follows is for advanced users.  When in doubt, only configure
-variables we describe as a "user option": they are declared in the
-source code with the ~defcustom~ keyword.
-
-Denote's code base is designed in a composable way, which lets the user
-make precise interventions to affect the output of the relevant
-commands.  One such case is to configure the front matter, such as by
-changing the order the keys appear in, renaming them, or adding new
-elements.
-
-Some examples are in order, starting with the Org file type.  This is
-what we have in =denote.el=:
-
-#+begin_src emacs-lisp
-(defvar denote-org-front-matter
-  ":PROPERTIES:
-:ID:          %4$s
-:END:
-#+title:      %1$s
-#+date:       %2$s
-#+filetags:   %3$s
-\n"
-  "Org front matter value for `format'.
-The order of the arguments is TITLE, DATE, KEYWORDS, ID.  If you
-are an avdanced user who wants to edit this variable to affect
-how front matter is produced, consider using something like %2$s
-to control where Nth argument is placed.
-
-Make sure to
-
-1. Not use empty lines inside the front matter block.
-
-2. Insert at least one empty line after the front matter block
-and do not use any empty line before it.
-
-These help ensure consistency and might prove useful if we need
-to operate on the front matter as a whole.")
-#+end_src
-
-Notice how we can pass a number to the =%s= specifier for the =:ID:=
-property.  This is what allows us to change the placement of the
-provided arguments.
-
-The default Org mode front matter is formatted as:
-
-#+begin_src org
-:PROPERTIES:
-:ID:          20220610T202537
-:END:
-,#+title:      This is a sample note
-,#+date:       2022-06-10
-,#+filetags:   denote  testing
-#+end_src
-
-If the user does not need =org-id= compatible ID property drawer, they
-can do this instead:
-
-#+begin_src emacs-lisp
-(setq denote-org-front-matter
-      "#+title:     %s
-,#+date:       %s
-,#+filetags:   %s
-,#+identifier: %s
-\n"
-      "Org front matter value for `format'.
-The order of the arguments is TITLE, DATE, KEYWORDS, ID.  If you
-are an avdanced user who wants to edit this variable to affect
-how front matter is produced, consider using something like %2$s
-to control where Nth argument is placed.")
-#+end_src
-
-The output is now formatted thus:
-
-#+begin_src org
-,#+title:      This is a sample note
-,#+date:       2022-06-10
-,#+filetags:   denote  testing
-,#+identifier: 20220610T202537
-#+end_src
-
-For another example, we will use the plain text variant, as it differs a
-bit from the above.  By default it is formatted this way:
-
-#+begin_example
-title:      This is a sample note
-date:       2022-06-10
-tags:       denote  testing
-identifier: 20220610T202232
----------------------------
-#+end_example
-
-The line with the hyphens is the product of the fifth format specifier,
-as documented in ~denote-text-front-matter~.  Its value is stored in
-~denote-text-front-matter-delimiter~.  Say we want to have a delimiter
-both at the top and bottom:
-
-#+begin_src emacs-lisp
-(setq denote-text-front-matter
-      "%5$s
-title:      %1$s
-date:       %2$s
-tags:       %3$s
-identifier: %4$s
-%5$s\n\n")
-#+end_src
-
-Which gives us:
-
-#+begin_example
----------------------------
-title:      This is a sample note
-date:       2022-06-11
-tags:       denote  testing
-identifier: 20220611T093252
----------------------------
-#+end_example
-
-Or we would rather use another character instead of hyphens, such as the
-equals sign:
-
-#+begin_src emacs-lisp
-(setq denote-text-front-matter-delimiter (make-string 27 ?=))
-#+end_src
-
-Remember that this is for advanced users.  If you want to see changes
-done on this front, you are welcome to share your thoughts and/or
-participate in the development of Denote.
-
 * Linking notes
 :PROPERTIES:
 :CUSTOM_ID: h:fc913d54-26c8-4c41-be86-999839e8ad31
 :END:
 
+[ Support for =id:= type notes is REMOVED as part of
+  {{{development-version}}}.  The reason is that to fully support org-id
+  we need to change Denote's scope.  That will never be reconciled with
+  the project's principles.  Users of the =id:= functionality are
+  advised to use org-roam: it has first-class support for it, is a major
+  project, and has a massive community.  My sincere apologies for not
+  foreseeing this and for breaking some user configurations in the
+  process. ]
+
 #+findex: denote-link
 The ~denote-link~ command inserts a link at point to an entry specified
 at the minibuffer prompt.  Links are formatted depending on the file
@@ -643,33 +513,17 @@ type of current note.  In Org and plain text buffers, 
links are
 formatted thus: =[[denote:IDENTIFIER][TITLE]]=.  While in Markdown they
 are expressed as =[TITLE](denote:IDENTIFIER)=.
 
-When ~denote-link~ is called with a prefix argument (=C-u= by default)
+When ~denote-link~ is called with a prefix argument (=C-u= by default),
 it formats links like =[[denote:IDENTIFIER]]=.  The user might prefer
 its simplicity.
 
-#+vindex: denote-link-use-org-id
-When the user option ~denote-link-use-org-id~ is set to non-nil (the
-default is nil), inserted links in Org notes that target other Org notes
-will use the standard =id:= hyperlink type.  The format is
-=[[id:IDENTIFIER][TITLE]]= (the title is omitted if ~denote-link~ is
-called with a prefix argument, as explained above).  When, however, an
-Org note links to a note of another file type (e.g Org to Markdown), the
-link will use our own =denote:= type as there is no standard for this
-case.
-
-# TODO 2022-07-03: Document potential downsides of the 'id:' type and
-# write documentation on what the user must do to ensure that everything
-# works properly.
-
 Inserted links are automatically buttonized and remain active for as
-long as the buffer is available.  In Org this is handled automatically
-as Denote either uses the standard =id:= link type or creates its own
-custom hyperlink: the =denote:= type which works exactly like the
-=file:=.  In Markdown and plain text, Denote handles the buttonization
-of those links.
-
-To buttonize links in existing files while visiting them, the user must
-add this snippet to their setup:
+long as the buffer is available.  In Org this is handled by the major
+mode: the =denote:= hyperlink type works exactly like the standard
+=file:=.  In Markdown and plain text, Denote performs the buttonization
+of those links.  To buttonize links in existing files while visiting
+them, the user must add this snippet to their setup (it already excludes
+Org):
 
 #+findex: denote-link-buttonize-buffer
 #+begin_src emacs-lisp
@@ -712,11 +566,11 @@ effect by setting its value to nil.
 #+vindex: denote-link-backlinks-display-buffer-action
 The placement of the backlinks' buffer is subject to the user option
 ~denote-link-backlinks-display-buffer-action~.  Due to the nature of the
-underlying ~display-buffer~ mechanism, this inevitably is an advanced
-feature.  By default, the backlinks' buffer is displayed below the
-current window.  The doc string of our user option includes a
+underlying ~display-buffer~ mechanism, this inevitably is a relatively
+advanced feature.  By default, the backlinks' buffer is displayed below
+the current window.  The doc string of our user option includes a sample
 configuration that places the buffer in a left side window instead.
-Reproducing it here for your convenience:
+Reproducing it here for the sake of convenience:
 
 #+begin_src emacs-lisp
 (setq denote-link-backlinks-display-buffer-action
@@ -744,17 +598,14 @@ note is excluded from the matching entries (adding a link 
to itself is
 pointless).
 
 When called with a prefix argument (=C-u=) ~denote-link-add-links~ will
-format all links as =[[TYPE:IDENTIFIER]]=, hence a typographic list:
+format all links as =[[denote:IDENTIFIER]]=, hence a typographic list:
 
 #+begin_example
-- [[TYPE:IDENTIFIER-1]]
-- [[TYPE:IDENTIFIER-2]]
-- [[TYPE:IDENTIFIER-3]]
+- [[denote:IDENTIFIER-1]]
+- [[denote:IDENTIFIER-2]]
+- [[denote:IDENTIFIER-3]]
 #+end_example
 
-The =TYPE= is either =denote:= or =id:=, exactly as we explained above
-for the ~denote-link~ command.
-
 Same examples of a regular expression that can be used with this
 command:
 
@@ -959,9 +810,6 @@ purposes.  All you need to do is write functions that ~let~ 
bind the
 You do not need a third command for the Org files, as those would be the
 default used by regular ~denote~.
 
-Given Denote's composable code, you can tweak the output however you
-like, including the contents of the file 
([[#h:f69371d5-1843-493d-9ff5-c1ab3b43024e][Tweaking the front matter]]).
-
 If you do place different types of notes in their own directories, you
 must introduce directory-local variables to keep things working
 seamlessly.  Otherwise you cannot create notes, retrieve backlinks, and
@@ -1468,10 +1316,6 @@ Everything is in place to set up the package.
 (require 'denote-retrieve)
 (require 'denote-link)
 
-;; Set to non-nil if you want links to and from Org notes to use the
-;; standard 'id:' link type instead of 'denote:'.
-(setq denote-link-use-org-id nil)
-
 ;; By default, we fontify backlinks in their bespoke buffer.
 (setq denote-link-fontify-backlinks t)
 
@@ -1635,8 +1479,6 @@ the future and which you might want to help with 
([[#h:1ebe4865-c001-4747-a6f2-0
 This is a non-exhaustive list and you are always welcome to either
 report or work on something else.
 
-- [X] Buttonize =denote:= links in Markdown and plain text, but not Org.
-- [X] Experiment with switch to =id:= link type instead of =denote:=.
 - [ ] Ensure integration between =denote:= links and Embark.
 - [ ] Add command that expands the identifier in links to a full name.
 - [ ] Add command that rewrites full names in links, if they are invalid.
diff --git a/denote-link.el b/denote-link.el
index 6e7874acb0..efc7257f15 100644
--- a/denote-link.el
+++ b/denote-link.el
@@ -31,27 +31,17 @@
 ;; formatted thus: `[[denote:IDENTIFIER][TITLE]]'.  While in Markdown they
 ;; are expressed as `[TITLE](denote:IDENTIFIER)'.
 ;;
-;; When `denote-link' is called with a prefix argument (`C-u' by default)
+;; When `denote-link' is called with a prefix argument (`C-u' by default),
 ;; it formats links like `[[denote:IDENTIFIER]]'.  The user might prefer
 ;; its simplicity.
 ;;
-;; When the user option `denote-link-use-org-id' is set to non-nil (default
-;; is nil), inserted links in Org notes that target other Org notes will
-;; use the standard `id:' type so the format is `[[id:IDENTIFIER][TITLE]]'
-;; (the title is omitted is `denote-link' is called with a prefix argument,
-;; as explained above).  When, however, an Org note links to a note in
-;; another file, the link with use our own `denote:' type as there is no
-;; standard for this case.
-;;
 ;; Inserted links are automatically buttonized and remain active for as
-;; long as the buffer is available.  In Org this is handled automatically
-;; as Denote either uses the standard `id:' link type or creates its own
-;; custom hyperlink: the `denote:' type which works exactly like the
-;; `file:'.  In Markdown and plain text, Denote handles the buttonization
-;; of those links.
-;;
-;; To buttonize links in existing files while visiting them, the user must
-;; add this snippet to their setup:
+;; long as the buffer is available.  In Org this is handled by the major
+;; mode: the `denote:' hyperlink type works exactly like the standard
+;; `file:'.  In Markdown and plain text, Denote performs the buttonization
+;; of those links.  To buttonize links in existing files while visiting
+;; them, the user must add this snippet to their setup (it already excludes
+;; Org):
 ;;
 ;;     (add-hook 'find-file-hook #'denote-link-buttonize-buffer)
 ;;
@@ -61,7 +51,7 @@
 ;; The `denote-link-find-file' is such a command.  It uses minibuffer
 ;; completion to visit a file that is linked to from the current note.
 ;; The candidates have the correct metadata, which is ideal for
-;; integration with other standards-compliant tools (see the manual's
+;; integration with other standards-compliant tools (see manual's
 ;; "Extending Denote").  For instance, a package such as `marginalia'
 ;; will display accurate annotations, while the `embark' package will be
 ;; able to work its magic such as in exporting the list into a filtered
@@ -86,11 +76,11 @@
 ;;
 ;; The placement of the backlinks' buffer is subject to the user option
 ;; `denote-link-backlinks-display-buffer-action'.  Due to the nature of the
-;; underlying `display-buffer' mechanism, this inevitably is an advanced
-;; feature.  By default, the backlinks' buffer is displayed below the
-;; current window.  The doc string of our user option includes a
+;; underlying `display-buffer' mechanism, this inevitably is a relatively
+;; advanced feature.  By default, the backlinks' buffer is displayed below
+;; the current window.  The doc string of our user option includes a sample
 ;; configuration that places the buffer in a left side window instead.
-;; Reproducing it here for your convenience:
+;; Reproducing it here for the sake of convenience:
 ;;
 ;;     (setq denote-link-backlinks-display-buffer-action
 ;;           '((display-buffer-reuse-window
@@ -113,14 +103,11 @@
 ;; pointless).
 ;;
 ;; When called with a prefix argument (`C-u') `denote-link-add-links' will
-;; format all links as `[[TYPE:IDENTIFIER]]', hence a typographic list:
+;; format all links as `[[denote:IDENTIFIER]]', hence a typographic list:
 ;;
-;;     - [[TYPE:IDENTIFIER-1]]
-;;     - [[TYPE:IDENTIFIER-2]]
-;;     - [[TYPE:IDENTIFIER-3]]
-;;
-;; The `TYPE' is either `denote:' or `id:', exactly as we explained above
-;; for the `denote-link' command.
+;;     - [[denote:IDENTIFIER-1]]
+;;     - [[denote:IDENTIFIER-2]]
+;;     - [[denote:IDENTIFIER-3]]
 ;;
 ;; Same examples of a regular expression that can be used with this
 ;; command:
@@ -200,48 +187,20 @@ and/or the documentation string of `display-buffer'."
                alist)
   :group 'denote-link)
 
-;; TODO 2022-07-03: After "ecosystem" elaborate on the responsibility
-;; the user has to ensure things continue to work.
-(defcustom denote-link-use-org-id nil
-  "When non-nil use the ID link type in Org files, if appropriate.
-
-Newly created links from Org notes which target other Org notes
-will use the standard `id:' hyperlink type instead of the custom
-`denote:' type.  If the target's file type is not Org, our own
-`denote:' type is used.
-
-In practical terms, the ID ensures maximum compatibility with
-other tools in the Org ecosystem.
-
-When the value is nil (the default), Denote links rely on the
-custom `denote:' hyperlink type (which should behave the same as
-the standard `file:' link).
-
-Other file types beside Org always use the `denote:' links."
-  :type 'boolean
-  :group 'denote-link)
-;;;###autoload (put 'denote-link-use-org-id 'safe-local-variable 'booleanp)
-
 ;;;; Link to note
 
 ;; Arguments are: FILE-ID FILE-TITLE
 (defconst denote-link--format-org "[[denote:%s][%s]]"
   "Format of Org link to note.")
 
-(defconst denote-link--format-org-with-id "[[id:%s][%s]]"
-  "Format of Org link to note for `denote-link-use-org-id'.")
-
 (defconst denote-link--format-markdown "[%2$s](denote:%1$s)"
   "Format of Markdown link to note.")
 
 (defconst denote-link--format-id-only "[[denote:%s]]"
   "Format of identifier-only link to note.")
 
-(defconst denote-link--format-id-only-with-org-id "[[id:%s]]"
-  "Format of identifier-only link to note with Org id link type.")
-
 (defconst denote-link--regexp-org
-  (concat "\\[\\[" "\\(denote\\|[Ii][Dd]\\):"  "\\(?1:" denote--id-regexp 
"\\)" "]" "\\[.*?]]"))
+  (concat "\\[\\[" "denote:"  "\\(?1:" denote--id-regexp "\\)" "]" "\\[.*?]]"))
 
 (defconst denote-link--regexp-markdown
   (concat "\\[.*?]" "(denote:"  "\\(?1:" denote--id-regexp "\\)" ")"))
@@ -249,28 +208,18 @@ Other file types beside Org always use the `denote:' 
links."
 (defconst denote-link--regexp-plain
   (concat "\\[\\[" "denote:"  "\\(?1:" denote--id-regexp "\\)" "]]"))
 
-(defun denote-link--file-type-format (current-file target-file id-only)
+(defun denote-link--file-type-format (current-file id-only)
   "Return link format based on CURRENT-FILE format.
-Account for TARGET-FILE format when choosing the format.
-
 With non-nil ID-ONLY, use the generic link format without a
 title."
   ;; Includes backup files.  Maybe we can remove them?
-  (let* ((current-file-ext (file-name-extension current-file))
-         (target-file-ext (file-name-extension target-file))
-         (use-org-id (and denote-link-use-org-id (string= target-file-ext 
"org"))))
+  (let ((current-file-ext (file-name-extension current-file)))
     (cond
-     (id-only
-      (if use-org-id
-          denote-link--format-id-only-with-org-id
-        denote-link--format-id-only))
+     (id-only denote-link--format-id-only)
      ((string= current-file-ext "md")
       denote-link--format-markdown)
-     ((string= current-file-ext "txt")
-      denote-link--format-org)    ; Plain text uses [[denote:ID][TITLE]]
-     (t (if use-org-id
-            denote-link--format-org-with-id
-          denote-link--format-org)))))
+     ;; Plain text also uses [[denote:ID][TITLE]]
+     (t denote-link--format-org))))
 
 (defun denote-link--file-type-regexp (file)
   "Return link regexp based on FILE format."
@@ -297,7 +246,7 @@ format is always [[denote:IDENTIFIER]]."
     (insert
      (denote-link--format-link
       target
-      (denote-link--file-type-format (buffer-file-name) target id-only)))
+      (denote-link--file-type-format (buffer-file-name) id-only)))
     (unless (derived-mode-p 'org-mode)
       (make-button beg (point) 'type 'denote-link-button))))
 
@@ -504,7 +453,7 @@ When ID-ONLY is non-nil, use a generic link format.  See
                     denote-link--prepare-links-format
                     (denote-link--format-link
                      file
-                     (denote-link--file-type-format current-file file 
id-only)))))
+                     (denote-link--file-type-format current-file id-only)))))
                 files)
           (sort-lines denote-link-add-links-sort (point-min) (point-max))
           (buffer-string))))
diff --git a/denote-retrieve.el b/denote-retrieve.el
index ec118d7821..bab1f10378 100644
--- a/denote-retrieve.el
+++ b/denote-retrieve.el
@@ -37,7 +37,7 @@
   "Regular expression for title key.")
 
 (defconst denote-retrieve--id-front-matter-key-regexp
-  "^.?.?\\b\\(?:identifier\\|[Ii][Dd]\\)\\s-*[:=]"
+  "^.?.?\\b\\(?:identifier\\)\\s-*[:=]"
   "Regular expression for identifier key.")
 
 (defconst denote-retrieve--date-front-matter-key-regexp
diff --git a/denote.el b/denote.el
index a8d61f4023..e753e76a0b 100644
--- a/denote.el
+++ b/denote.el
@@ -251,8 +251,6 @@ We consider those characters illigal for our purposes.")
         `(metadata (category . ,category))
       (complete-with-action action candidates string pred))))
 
-(defvar org-id-extra-files)
-
 (defun denote-directory ()
   "Return path of variable `denote-directory' as a proper directory."
   (let* ((val (or (buffer-local-value 'denote-directory (current-buffer))
@@ -260,8 +258,6 @@ We consider those characters illigal for our purposes.")
          (path (if (or (eq val 'default-directory) (eq val 'local)) 
default-directory val)))
     (unless (file-directory-p path)
       (make-directory path t))
-    (when (require 'org-id nil :noerror)
-      (setq org-id-extra-files (directory-files-recursively path "\.org$")))
     (file-name-as-directory path)))
 
 (defun denote--extract (regexp str &optional group)
@@ -527,12 +523,10 @@ is specific to this variable: it expect a delimiter such 
as
   "Final delimiter for plain text front matter.")
 
 (defvar denote-org-front-matter
-  ":PROPERTIES:
-:ID:          %4$s
-:END:
-#+title:      %1$s
-#+date:       %2$s
-#+filetags:   %3$s
+  "#+title:      %s
+#+date:       %s
+#+filetags:   %s
+#+identifier: %s
 \n"
   "Org front matter value for `format'.
 The order of the arguments is TITLE, DATE, KEYWORDS, ID.  If you



reply via email to

[Prev in Thread] Current Thread [Next in Thread]