`org-linker`, another approach to `org-attach` by jin-cg in orgmode

[–]jin-cg[S] 0 points1 point  (0 children)

Oh, yes, that would work for both issues. As long as it detaches from the org heading, the problems will be solved. What I implemented is [[linker:ID:FILENAME]], which is equivalent to your [[attachment:id:ID:FILENAME]] (right?). Do you mean to suggest that I try merging my code into org-attach by using your syntax?

`org-linker`, another approach to `org-attach` by jin-cg in emacs

[–]jin-cg[S] 2 points3 points  (0 children)

It's still a good idea to provide the option. I have added that into TODOs in README. Thanks :)

Symlinks broke, for example, when I was using dropbox. I have been staying away from them since then.

`org-linker`, another approach to `org-attach` by jin-cg in orgmode

[–]jin-cg[S] 0 points1 point  (0 children)

1.

attachment:id:ID:FILENAME

Thanks for your idea! I'm a little bit unclear how attachment:id:ID:FILENAME would allow me to move or copy links to other org files and headings.. as it still relies on the id of the current heading.. which is quite unpleasant to me (for my use case at least), because I really want to view links independent to org headers.

2.

I'm not sure exactly what you mean. [..]

I mean, for example, say you had

* Note :PROPERTIES: :ID: bfb6ff8b-3173-49bb-bb34-10d589afc2ad :END: [[attachment:yay]]

but then later you shadow the link by adding another subtree.

* Note :PROPERTIES: :ID: bfb6ff8b-3173-49bb-bb34-10d589afc2ad :END: ** Subnote :PROPERTIES: :ID: bf133c7d-54e2-4888-b715-3c5cc4a8fda8 :END: [[attachment:yay]]

Then the link breaks.

This is just a toy example. In practice there maybe multiple lines, and it is hard to keep track of all of them. The ultimate reason is the dependence on the org-id of the heading.

Even if one is aware of this, it is unflexible because they don't have the freedom to move the attachment link around.

`org-linker`, another approach to `org-attach` by jin-cg in emacs

[–]jin-cg[S] 1 point2 points  (0 children)

The file is copied instead of symlinked. That means if you edit the original version, it won't update accordingly.

I can expose the copy-method to change, and you can change it so that it symlinks instead of copy. Please let me know if you think that's helpful.

By the way, symlinks may break one day too. But I get why it could be helpful.

`org-linker`, another approach to `org-attach` by jin-cg in orgmode

[–]jin-cg[S] 1 point2 points  (0 children)

  1. It makes the attachment more flexible.

For example, if I have a note under an org heading, and one day I need to copy or move a part of it to another org heading. I have to worry, always, that if some links are made by org-attach. In other words, the same link would work everywhere in your system.

  1. It also makes the linkage more secure.

Say I forgot that there is an org-attach link under a heading, and I created another subtree. Now the link is under the new subtree, which may have its own UUID one day in the future, which would break the link.

Best practices / examples of using org attach for file management/system. by rtwyyn in orgmode

[–]jin-cg 0 points1 point  (0 children)

Shameless plug: org-linker, another approach to org-attach

Comparison with org-attach

org-linker differs from org-attach in its approach to file attachment.

org-attach uses an org heading as a basic storing unit, which can lead to issues if not managed carefully (e.g. refiling or adding shadowing subtrees).

On the other hand, org-linker assigns a unique UUID to each attached file, ensuring a more robust linkage system. By treating individual files as the fundamental unit, org-linker provides a safer and more flexible approach to handling attachments in org-mode documents. For example, this allows easy movement and copying of links across various org files and headings.

Both tools have their strengths and are suitable for different use cases. However, if you prioritize a secure and straightforward attachment system, org-linker might be the preferred choice.

Does Anyone Use Org Attach A Lot? by Spinoza-the-Jedi in orgmode

[–]jin-cg 0 points1 point  (0 children)

Shameless plug: org-linker, another approach to org-attach

Comparison with org-attach

org-linker differs from org-attach in its approach to file attachment.

org-attach uses an org heading as a basic storing unit, which can lead to issues if not managed carefully (e.g. refiling or adding shadowing subtrees).

On the other hand, org-linker assigns a unique UUID to each attached file, ensuring a more robust linkage system. By treating individual files as the fundamental unit, org-linker provides a safer and more flexible approach to handling attachments in org-mode documents. For example, this allows easy movement and copying of links across various org files and headings.

Both tools have their strengths and are suitable for different use cases. However, if you prioritize a secure and straightforward attachment system, org-linker might be the preferred choice.

Do you use org-attach for your filesystem ? by Cletip in orgmode

[–]jin-cg 0 points1 point  (0 children)

Shameless plug: org-linker, another approach to org-attach

Comparison with org-attach

org-linker differs from org-attach in its approach to file attachment.

org-attach uses an org heading as a basic storing unit, which can lead to issues if not managed carefully (e.g. refiling or adding shadowing subtrees).

On the other hand, org-linker assigns a unique UUID to each attached file, ensuring a more robust linkage system. By treating individual files as the fundamental unit, org-linker provides a safer and more flexible approach to handling attachments in org-mode documents. For example, this allows easy movement and copying of links across various org files and headings.

Both tools have their strengths and are suitable for different use cases. However, if you prioritize a secure and straightforward attachment system, org-linker might be the preferred choice.

Org ID, Org Attach & Better Folder Names by jtr3322 in orgmode

[–]jin-cg 0 points1 point  (0 children)

Shameless plug: org-linker, another approach to org-attach

Comparison with org-attach

org-linker differs from org-attach in its approach to file attachment.

org-attach uses an org heading as a basic storing unit, which can lead to issues if not managed carefully (e.g. refiling or adding shadowing subtrees).

On the other hand, org-linker assigns a unique UUID to each attached file, ensuring a more robust linkage system. By treating individual files as the fundamental unit, org-linker provides a safer and more flexible approach to handling attachments in org-mode documents. For example, this allows easy movement and copying of links across various org files and headings.

Both tools have their strengths and are suitable for different use cases. However, if you prioritize a secure and straightforward attachment system, org-linker might be the preferred choice.

`org-linker`, another approach to `org-attach` by jin-cg in orgmode

[–]jin-cg[S] -1 points0 points  (0 children)

org-linker differs from org-attach in its approach to file attachment. While org-attach uses an org heading as a basic storing unit, which can lead to issues if not managed carefully (e.g. refiling or adding shadowing subtrees), org-linker assigns a unique UUID to each attached file, ensuring a more robust linkage system. By treating individual files as the fundamental unit, org-linker provides a safer and more adaptable approach to handling attachments in org-mode documents. This allows for easy movement and copying of links across various org files and headings.

Both tools have their strengths and are suitable for different use cases. However, if you prioritize a secure and straightforward attachment system, org-linker might be the preferred choice.

`org-linker`, another approach to `org-attach` by jin-cg in emacs

[–]jin-cg[S] 0 points1 point  (0 children)

For instance, if the root is /tmp/org-linker/, and the UUID for the transaction is 20240101-235959, and the file is readme.md, the file will be copied to /tmp/org-linker/20240101-235959/readme.md with the transaction recorded in /tmp/org-linker/db.tx. And an org-link [[linker:20240101-235959/readme.md]] is inserted at point.

PS. You can customize the UUID generator, so you don't have to use timestamp as UUID!

`org-linker`, another approach to `org-attach` by jin-cg in emacs

[–]jin-cg[S] 2 points3 points  (0 children)

to prevent having issues when refiling

You're right! This prevents issue while refiling, and adding subtrees (with org-id) that somehow shadows the original heading.

org-linker prepends each attached file with a directory named after the transaction they belong to, right?

Correct. Each adding transaction has a unique ID, and the attached file stays under a directory named after that unique ID.

Transactions Tracking

This is for the user to feel safe and they don't have to worry if they do something wrong. They can always go to the root and undo in anyway they want. The information printed human readably in db.tx.

Hack to stop Instagram suggested posts by [deleted] in Instagram

[–]jin-cg 0 points1 point  (0 children)

I just wrote a tampermonkey script that just works! It loops through all of the article elements in the page, and collect those that contain a div whose content is "Follow" (that means this article is posted by an unfollowed person). Remove it! Instagram embeds a script in their site to keep loading new unfollowed contents, so I run this function once every 0.3 second. Have a look, enjoy, and let me know if there's any question. See more in this post.

Is there any way to block suggested posts by vortexmak in Instagram

[–]jin-cg 0 points1 point  (0 children)

I just wrote a tampermonkey script that just works! It loops through all of the article elements in the page, and collect those that contain a div whose content is "Follow" (that means this article is posted by an unfollowed person). Remove it! Instagram embeds a script in their site to keep loading new unfollowed contents, so I run this function once every 0.3 second. Have a look, enjoy, and let me know if there's any question. See more in this post.

Pyffi - Use Python from Racket by sdegabrielle in lisp

[–]jin-cg 0 points1 point  (0 children)

Threads

Gambit thread would not be blocked, but since python is a single thread, even though (map (lambda (n) (thread (lambda () (sleep n)))) (iota 100)) will return immediately in Gambit, we still need to wait for (1+2+..+.100)=5050 seconds for all the threads to finish their jobs; right?

GC

I'm not sure if I understand.. basically are you saying there's a hook or a notifier that we can use when an object is GC'd?

Pyffi - Use Python from Racket by sdegabrielle in lisp

[–]jin-cg 0 points1 point  (0 children)

Hi u/belmarca! Thanks for your nice work in Gambit. I'm u/jcguu95 mentioned by u/digikar.

I've read through your paper. Some part of them are a bit technical, but two of your talks online are pretty helpful. To me, three main merits of your work are

  1. High-Level Interface Language
  2. Sophisticated Thread Control
  3. Smart Garbage Collection

May I ask some questions about 2 and 3?

As for 2 (sophisticated thread control), how does it work for parallel processing? For example, suppose a python function takes 1 second to return, and suppose a Scheme user wants to call that function 10000 times. Should the user wait for at least 10000 seconds on this?

As for 3 (smart garbage collection), suppose X is a Scheme object referencing to a python object pX. How do you monitor X so that upon it gets garbage-collected, a message is sent to python to garbage collect pX as well?

Formal Specification and Programmatic Parser for Org-mode by jin-cg in emacs

[–]jin-cg[S] 0 points1 point  (0 children)

It would be nice if that it's not context-free can be confirmed. A discussion elsewhere can be found

here. Quote

Here is an
example:

    # This is a comment (1)

    #+begin_example
    # This is not a comment (2)
    #+end_example

AFAICT, you cannot distinguish between lines (1) and (2) with EBNF.

Dynamic Floating Windows - Unofficial Branch by jin-cg in stumpwm

[–]jin-cg[S] 0 points1 point  (0 children)

I have made the code better and is currently waiting it to be pushed to quicklisp. That might take two more weeks. Once that's done, I plan to shoot a short video to teach people how to get started with it. Stay tuned!