~protesilaos/denote

7 4

How I have been using the :missing-only attribute

Stephen R. Kifer <srk@kigra.com>
Details
Message ID
<1db2104e-70bd-47f9-a7ed-b8d4bb370a7f@app.fastmail.com>
DKIM signature
missing
Download raw message
Protesilaos,

First thanks for a great package.  I've been using denote every day for the past year to manage my collection of information and ideas.  Still evolving and adapting how best use it and adapt it my workflow and needs.

One, recent change, though has disrupted how I have been using Denote.  I'm referring specifically to removing the ":missing-only" attribute for dynamic blocks.  Let me explain how I've using it to advocate for bringing it back or helping me to figure out a different way to achieve a similar effect.

As a part of my information strategy I have been making use of metanotes.  Though ideally my metanotes are highly organized, they do not begin that way.  Using the ":missing-only" provides me with a workflow to gradually evolve and develop the metanote.  For example:  I have a 'Philosophy' metanote.  Whenever I create a philosophy related Denote file I tag it with the keyword 'philosophy'.  In the Philosophy metanote I then have section like so:

* Unsorted Philosophy Fabric

#+BEGIN: denote-links :regexp "=fabric.*_philosophy" :missing-only t
#+END:

This collects any philosophy notes that I have made, that I have not yet moved into a more structured part of the metanote.  For example, I have an Ethics section in the metanote.  As I periodically review the metanote, I move any new notes on ethics into the Ethics section and further organize it from there.  By using the ":missing-only" attribute on a 'unsorted' dynamic block, I am able to quickly see what new notes I have created that have not yet been organized into the overall metanote structure.

Is there a way to bring it back or is there a way to hook into the dynmaic block filter architecture that allows me add some custom code to get that capability back?  I am not very skilled at elisp though I have done some small code snippets and am willing to a try at it.

Sincerely,
Stephen R. Kifer
srk@kigra.com

Re: How I have been using the :missing-only attribute

Details
Message ID
<87le9rzw9c.fsf@prevos.net>
In-Reply-To
<1db2104e-70bd-47f9-a7ed-b8d4bb370a7f@app.fastmail.com> (view parent)
DKIM signature
missing
Download raw message
Hi Stephen, I also used the :missing-only option a bit in pretty 
much the same way you did.

Prot, you previously mentioned that you got false positives. Not 
sure what method you used previously. I wrote a function that 
lists all static links in an Org file. I am unsure how dynamic 
blocks work, but surely this function can be plumbed into the 
denote-org-dblock--files function to exclude these matches from 
consideration.

(defun denote-org-dblock--extract-static-links ()
  "List all Denote links outside a dynamic block."
  (let ((link-ids '()))
    (org-element-map (org-element-parse-buffer) 'paragraph
      (lambda (element)
        (unless (eq (org-element-type (org-element-property 
        :parent element)) 'dynamic-block) 
          (let ((text (org-element-interpret-data element)))
            (when (string-match denote-org-link-in-context-regexp 
            text)
              (let ((start 0))
                (while (string-match denote-id-regexp text start)
                  (push (match-string 0 text) link-ids)
                  (setq start (match-end 0))))))))
      nil nil 'dynamic-block)
    (mapcar #'denote-directory-files (reverse link-ids))))

Regards

-- 
Dr Peter Prevos
---------------
peterprevos.com

Re: How I have been using the :missing-only attribute

Details
Message ID
<87il4t70z3.fsf@protesilaos.com>
In-Reply-To
<1db2104e-70bd-47f9-a7ed-b8d4bb370a7f@app.fastmail.com> (view parent)
DKIM signature
missing
Download raw message
Good day Stephen,

> From: "Stephen R. Kifer" <srk@kigra.com>
> Date: Sun, 17 Dec 2023 09:07:42 -0500
>
> Protesilaos,
>
> First thanks for a great package. 

You are welcome!

> I've been using denote every day for the past year to manage my
> collection of information and ideas. Still evolving and adapting how
> best use it and adapt it my workflow and needs.

Very well! I am happy to learn from your experiences and tweak things accordingly.

> One, recent change, though has disrupted how I have been using Denote.
> I'm referring specifically to removing the ":missing-only" attribute
> for dynamic blocks. Let me explain how I've using it to advocate for
> bringing it back or helping me to figure out a different way to
> achieve a similar effect.

Sorry about that! My intent was to remove a feature that I found
problematic. The longer-term plan was to reimplement it as an exclusive
feature of the denote-org-dblock.el (before, there was a part in
denote.el). I could not do this for the current stable version, as I do
not know how long it will take to make it work. So I published the
version without it and will work on it in the near future.

> As a part of my information strategy I have been making use of
> metanotes. Though ideally my metanotes are highly organized, they do
> not begin that way. Using the ":missing-only" provides me with a
> workflow to gradually evolve and develop the metanote. For example: I
> have a 'Philosophy' metanote. Whenever I create a philosophy related
> Denote file I tag it with the keyword 'philosophy'. In the Philosophy
> metanote I then have section like so:

This is good to know. Thanks! Did you ever use the function
'denote-add-missing-links' outside the context of Org dynamic blocks?
This is where I encountered undesired behaviour.

> [... 6 lines elided]

>  By using the ":missing-only" attribute on a 'unsorted' dynamic block,
>  I am able to quickly see what new notes I have created that have not
>  yet been organized into the overall metanote structure.

Yes, this is a nice use-case.

> Is there a way to bring it back or is there a way to hook into the
> dynmaic block filter architecture that allows me add some custom code
> to get that capability back? I am not very skilled at elisp though I
> have done some small code snippets and am willing to a try at it.

There is a way and I am willing to do this. Though I want it to be
focused on the Org dynamic blocks feature. As such, I am interested to
elicit more feedback from you or others.

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

-- 
Protesilaos Stavrou
https://protesilaos.com

Re: How I have been using the :missing-only attribute

Details
Message ID
<87frzx70tj.fsf@protesilaos.com>
In-Reply-To
<87le9rzw9c.fsf@prevos.net> (view parent)
DKIM signature
missing
Download raw message
Hello Peter,

> From: Peter Prevos <peter@prevos.net>
> Date: Mon, 18 Dec 2023 20:32:49 +1100
>
> Hi Stephen, I also used the :missing-only option a bit in pretty 
> much the same way you did.

Also check the reply I just sent to Stephen. In short, I want to bring
it back, though exclusively for Org dynamic blocks. The denote.el
function for 'denote-add-missing-links' will not come back.

> Prot, you previously mentioned that you got false positives.

Indeed. This was with the basic command 'denote-add-missing-links'.

> Not sure what method you used previously.

I can't remember anymore, though somebody told me that David Wilson also
encountered the problem during a live stream.

> I wrote a function that lists all static links in an Org file. I am
> unsure how dynamic blocks work, but surely this function can be
> plumbed into the denote-org-dblock--files function to exclude these
> matches from consideration.

> [... 19 lines elided]

Thanks! We will figure out the technicalities. Do you think my intent to
remove the feature from denote.el but keep it in denote-org-dblock.el is
the right course of action? If not, what do you think we should do?

All the best,
Prot

-- 
Protesilaos Stavrou
https://protesilaos.com

Re: How I have been using the :missing-only attribute

Stephen R. Kifer <srk@kigra.com>
Details
Message ID
<caae603d-f843-4ee4-8ec3-82d57edbd062@app.fastmail.com>
In-Reply-To
<87il4t70z3.fsf@protesilaos.com> (view parent)
DKIM signature
missing
Download raw message
Thanks for the response!  In answer to your question:

On Wed, Dec 20, 2023, at 2:05 AM, Protesilaos Stavrou wrote:
> > As a part of my information strategy I have been making use of
> > metanotes. Though ideally my metanotes are highly organized, they do
> > not begin that way. Using the ":missing-only" provides me with a
> > workflow to gradually evolve and develop the metanote. For example: I
> > have a 'Philosophy' metanote. Whenever I create a philosophy related
> > Denote file I tag it with the keyword 'philosophy'. In the Philosophy
> > metanote I then have section like so:
> 
> This is good to know. Thanks! Did you ever use the function
> 'denote-add-missing-links' outside the context of Org dynamic blocks?
> This is where I encountered undesired behaviour.
> 

I have never used the 'denote-add-missing-links' function outside of Org dynamic blocks.  So far that has been the only place it made sense to me.

Stephen
srk@kigra.com

Re: How I have been using the :missing-only attribute

Details
Message ID
<F873F4F5-DE7A-4DBE-AE51-A8D0D7F90F76@gmail.com>
In-Reply-To
<caae603d-f843-4ee4-8ec3-82d57edbd062@app.fastmail.com> (view parent)
DKIM signature
missing
Download raw message
Hi all

I too use the :missing-only feature regularly for the dynamic
blocks (which is why I contributed it in the first place). I’m
looking for a way to bring it back. Is there any progress on
this issue? I’d be glad to contribute where I can.

Cheers
Elias

> On 23 Dec 2023, at 15:56, Stephen R. Kifer <srk@kigra.com> wrote:
> 
> Thanks for the response!  In answer to your question:
> 
> On Wed, Dec 20, 2023, at 2:05 AM, Protesilaos Stavrou wrote:
>>> As a part of my information strategy I have been making use of
>>> metanotes. Though ideally my metanotes are highly organized, they do
>>> not begin that way. Using the ":missing-only" provides me with a
>>> workflow to gradually evolve and develop the metanote. For example: I
>>> have a 'Philosophy' metanote. Whenever I create a philosophy related
>>> Denote file I tag it with the keyword 'philosophy'. In the Philosophy
>>> metanote I then have section like so:
>> 
>> This is good to know. Thanks! Did you ever use the function
>> 'denote-add-missing-links' outside the context of Org dynamic blocks?
>> This is where I encountered undesired behaviour.
>> 
> 
> I have never used the 'denote-add-missing-links' function outside of Org dynamic blocks.  So far that has been the only place it made sense to me.
> 
> Stephen
> srk@kigra.com

Re: How I have been using the :missing-only attribute

Details
Message ID
<87zfxjhoru.fsf@protesilaos.com>
In-Reply-To
<F873F4F5-DE7A-4DBE-AE51-A8D0D7F90F76@gmail.com> (view parent)
DKIM signature
missing
Download raw message
> From: Elias S <elias.storms@gmail.com>
> Date: Fri,  5 Jan 2024 13:16:55 +0100
>
> Hi all

Hello Elias and everyone,

Happy New Year!

> I too use the :missing-only feature regularly for the dynamic
> blocks (which is why I contributed it in the first place). I’m
> looking for a way to bring it back. Is there any progress on
> this issue? I’d be glad to contribute where I can.

Yes, the plan is to work on it. I want to bring the feature back
exclusively for the denote-org-dblock.el (unless there is a good
use-case for the 'denote-add-missing-links' function in denote.el---in
which case, please let me know).

But I cannot work on it right now because my left arm is still in pain
and I have been avoiding most of the typing. I hope to be back in action
in the coming days. There are more things I want to work on as well.

More to follow!

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

-- 
Protesilaos Stavrou
https://protesilaos.com

Re: How I have been using the :missing-only attribute

Details
Message ID
<87v87cr9fr.fsf@protesilaos.com>
In-Reply-To
<87zfxjhoru.fsf@protesilaos.com> (view parent)
DKIM signature
pass
Download raw message
Hello again everyone!

> From: Protesilaos Stavrou <info@protesilaos.com>
> Date: Fri,  5 Jan 2024 15:51:17 +0200

> [... 10 lines elided]

>> I too use the :missing-only feature regularly for the dynamic
>> blocks (which is why I contributed it in the first place). I’m
>> looking for a way to bring it back. Is there any progress on
>> this issue? I’d be glad to contribute where I can.
>
> Yes, the plan is to work on it. I want to bring the feature back
> exclusively for the denote-org-dblock.el (unless there is a good
> use-case for the 'denote-add-missing-links' function in denote.el---in
> which case, please let me know).
>
> But I cannot work on it right now because my left arm is still in pain
> and I have been avoiding most of the typing. I hope to be back in action
> in the coming days. There are more things I want to work on as well.
>
> More to follow!

I implemented this in commit 91f0208. The functionality is available in
the form of a new 'denote-missing-links' dynamic block. Use the command
'denote-org-extras-dblock-insert-missing-links' to insert it.

Please let me know what you think.

All the best,
Prot

P.S. I am phasing out SourceHut:
<https://protesilaos.com/codelog/2024-01-27-sourcehut-no-more/>.
Development continues on GitHub with GitLab as a mirror.

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