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

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

[elpa] externals/denote e84dec73e9 1/4: BREAKING: rename denote-org.el t


From: ELPA Syncer
Subject: [elpa] externals/denote e84dec73e9 1/4: BREAKING: rename denote-org.el to denote-org-extras.el
Date: Sat, 20 Jan 2024 03:58:01 -0500 (EST)

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

    BREAKING: rename denote-org.el to denote-org-extras.el
    
    The new name better describes the role of this file.
---
 README.org                            | 26 +++++++++++------------
 denote-org.el => denote-org-extras.el | 40 +++++++++++++++++------------------
 2 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/README.org b/README.org
index 2e9b6fce97..086350a417 100644
--- a/README.org
+++ b/README.org
@@ -1817,8 +1817,8 @@ command ~org-store-link~ only stores links to the Denote 
file (using
 its identifier), but not to the given heading. This is what Denote was
 doing in versions prior to =3.0.0=.
 
-Note that the optional extension =denote-org.el= defines the command
-~denote-org-link-to-heading~, which always links to a file+heading
+Note that the optional extension =denote-org-extras.el= defines the command
+~denote-org-extras-link-to-heading~, which always links to a file+heading
 regardless of the aforementioned user option 
([[#h:fc1ad245-ec08-41be-8d1e-7153d99daf02][Insert link to an Org file with a 
further pointer to a heading]]).
 
 [ This feature only works in Org mode files, as other file types do
@@ -1834,17 +1834,17 @@ regardless of the aforementioned user option 
([[#h:fc1ad245-ec08-41be-8d1e-7153d
 
 [ Part of {{{development-version}}}. ]
 
-#+findex: denote-org-link-to-heading
-As part of the optional =denote-org.el= extension, the command
-~denote-org-link-to-heading~ prompts for a link to an Org file and
-then asks for a heading therein, using minibuffer completion. Once the
-user provides input at the two prompts, the command inserts a link at
-point which has the following pattern: 
=[[denote:IDENTIFIER::#ORG-HEADING-CUSTOM-ID]][File title::Heading text]]=.
+#+findex: denote-org-extras-link-to-heading
+As part of the optional =denote-org-extras.el= extension, the command
+~denote-org-extras-link-to-heading~ prompts for a link to an Org file
+and then asks for a heading therein, using minibuffer completion. Once
+the user provides input at the two prompts, the command inserts a link
+at point which has the following pattern: 
=[[denote:IDENTIFIER::#ORG-HEADING-CUSTOM-ID]][File title::Heading text]]=.
 
 Because only Org files can have links to individual headings, the
-command ~denote-org-link-to-heading~ prompts only for Org files (i.e.
-files which include the =.org= extension). Remember that Denote works
-with many file types ([[#h:4e9c7512-84dc-4dfb-9fa9-e15d51178e5d][The 
file-naming scheme]]).
+command ~denote-org-extras-link-to-heading~ prompts only for Org files
+(i.e. files which include the =.org= extension). Remember that Denote
+works with many file types ([[#h:4e9c7512-84dc-4dfb-9fa9-e15d51178e5d][The 
file-naming scheme]]).
 
 This feature is similar to the concept of the user option 
~denote-org-store-link-to-heading~
 ([[#h:d99de1fb-b1b7-4a74-8667-575636a4d6a4][The 
~denote-org-store-link-to-heading~ user option]]). It is, however,
@@ -1852,8 +1852,8 @@ interactive and differs in the directionality of the 
action. With that
 user option, the command ~org-store-link~ will generate a =CUSTOM_ID=
 for the current heading (or capture the value of one as-is), giving
 the user the option to then call ~org-insert-link~ wherever they see
-fit. By contrast, the command ~denote-org-link-to-heading~ prompts for
-a file, then a heading, and inserts the link at point.
+fit. By contrast, the command ~denote-org-extras-link-to-heading~
+prompts for a file, then a heading, and inserts the link at point.
 
 ** Insert links matching a regexp
 :PROPERTIES:
diff --git a/denote-org.el b/denote-org-extras.el
similarity index 74%
rename from denote-org.el
rename to denote-org-extras.el
index 0f4a6d4fb5..9e29c70fb2 100644
--- a/denote-org.el
+++ b/denote-org-extras.el
@@ -1,4 +1,4 @@
-;;; denote-org.el --- Denote extensions for Org mode -*- lexical-binding: t -*-
+;;; denote-org-extras.el --- Denote extensions for Org mode -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2024  Free Software Foundation, Inc.
 
@@ -32,7 +32,7 @@
 
 ;;;; Link to file and heading
 
-(defun denote-org--get-outline (file)
+(defun denote-org-extras--get-outline (file)
   "Return `outline-regexp' headings and line numbers of FILE."
   (with-current-buffer (find-file-noselect file)
     (let ((outline-regexp (format "^\\(?:%s\\)" (or (bound-and-true-p 
outline-regexp) "[*\^L]+")))
@@ -57,16 +57,16 @@
           (nreverse candidates)
         (user-error "No outline")))))
 
-(defun denote-org--outline-prompt (&optional file)
-  "Prompt for outline among headings retrieved by `denote-org--get-outline'.
+(defun denote-org-extras--outline-prompt (&optional file)
+  "Prompt for outline among headings retrieved by 
`denote-org-extras--get-outline'.
 With optional FILE use the outline of it, otherwise use that of
 the current file."
   (completing-read
    "Go to outline: "
-   (denote--completion-table-no-sort 'imenu (denote-org--get-outline (or file 
buffer-file-name)))
+   (denote--completion-table-no-sort 'imenu (denote-org-extras--get-outline 
(or file buffer-file-name)))
    nil :require-match))
 
-(defun denote-org--get-heading-and-id-from-line (line file)
+(defun denote-org-extras--get-heading-and-id-from-line (line file)
   "Return heading text and CUSTOM_ID from the given LINE in FILE."
   (with-current-buffer (find-file-noselect file)
     (save-excursion
@@ -74,7 +74,7 @@ the current file."
       (forward-line line)
       (cons (denote-link-ol-get-heading) (denote-link-ol-get-id)))))
 
-(defun denote-org-format-link-with-heading (file heading-id description)
+(defun denote-org-extras-format-link-with-heading (file heading-id description)
   "Prepare link to FILE with HEADING-ID using DESCRIPTION.
 
 FILE-TYPE and ID-ONLY are used to get the format of the link.
@@ -84,14 +84,14 @@ See the `:link' property of `denote-file-types'."
           heading-id
           description))
 
-(defun denote-org-format-link-get-description (file heading-text)
+(defun denote-org-extras-format-link-get-description (file heading-text)
   "Return link description for FILE with HEADING-TEXT at the end."
   (format "%s::%s"
           (denote--retrieve-title-or-filename file 'org)
           heading-text))
 
 ;;;###autoload
-(defun denote-org-link-to-heading ()
+(defun denote-org-extras-link-to-heading ()
   "Link to file and then specify a heading to extend the link to.
 
 The resulting link has the following pattern:
@@ -103,23 +103,23 @@ limit the list of possible files to those which include 
the .org
 file extension (remember that Denote works with many file types,
 per the user option `denote-file-type').
 
-The user option `denote-org-store-link-to-heading' determined
-whether the `org-store-link' function can save a link to the
-current heading.  Such links look the same as those of this
-command, though the functionality defined herein is independent
-of it.
+The user option `denote-org-extras-store-link-to-heading'
+determined whether the `org-store-link' function can save a link
+to the current heading.  Such links look the same as those of
+this command, though the functionality defined herein is
+independent of it.
 
 To only link to a file, use the `denote-link' command."
   (declare (interactive-only t))
   (interactive)
   (when-let ((file (denote-file-prompt ".*\\.org"))
-             (heading (denote-org--outline-prompt file))
+             (heading (denote-org-extras--outline-prompt file))
              (line (string-to-number (car (split-string heading "\t"))))
-             (heading-data (denote-org--get-heading-and-id-from-line line 
file))
+             (heading-data (denote-org-extras--get-heading-and-id-from-line 
line file))
              (heading-text (car heading-data))
              (heading-id (cdr heading-data))
-             (description (denote-org-format-link-get-description file 
heading-text)))
-    (insert (denote-org-format-link-with-heading file heading-id 
description))))
+             (description (denote-org-extras-format-link-get-description file 
heading-text)))
+    (insert (denote-org-extras-format-link-with-heading file heading-id 
description))))
 
-(provide 'denote-org)
-;;; denote-org.el ends here
+(provide 'denote-org-extras)
+;;; denote-org-extras.el ends here



reply via email to

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