all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* file metadata
@ 2024-10-11 22:22 Christopher Howard
  2024-10-12  0:58 ` [External] : " Drew Adams
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Christopher Howard @ 2024-10-11 22:22 UTC (permalink / raw)
  To: Help Gnu Emacs Mailing List

Hi, I have a bunch of files in various project that have non-descriptive names, but I don't want to change the file names, nor the file contents. It would be nice if there was some way I could display my own description of the file next to the the file listing, say in dired. Do we have any kind of extension, ideally with dired integration, that provides some of kind of file metadata system, or interacts with a third party metadata system?

-- 
📛 Christopher Howard
🚀 gemini://gem.librehacker.com
🌐 http://gem.librehacker.com

בראשית ברא אלהים את השמים ואת הארץ



^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [External] : file metadata
  2024-10-11 22:22 file metadata Christopher Howard
@ 2024-10-12  0:58 ` Drew Adams
  2024-10-16 19:59   ` bookmark+: legacy key syntax in Emacs 30? Christopher Howard
  2024-10-12  7:16 ` file metadata Dan Hitt
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Drew Adams @ 2024-10-12  0:58 UTC (permalink / raw)
  To: Christopher Howard, Help Gnu Emacs Mailing List

> Hi, I have a bunch of files in various project that have non-descriptive
> names, but I don't want to change the file names, nor the file contents.
> It would be nice if there was some way I could display my own
> description of the file next to the the file listing, say in dired. Do
> we have any kind of extension, ideally with dired integration, that
> provides some of kind of file metadata system, or interacts with a third
> party metadata system?

One approach is to bookmark a file and use a bookmark's annotation to record the metadata.

If you use Bookmark+ then:

You can also use tags, instead of or in addition to an annotation.

You can also use an autofile bookmark, which has the same name as the file.  This is just a wrapper around a file or directory: a way to attach meta information (such as tags or an annotation) to it.  But you can use an autofile bookmark much as you would use a file or directory.

See:

* Annotations: https://www.emacswiki.org/emacs/BookmarkPlus#BookmarkAnnotations

* Tags:
https://www.emacswiki.org/emacs/BookmarkPlus#BookmarkTags

* Autofiles:
https://www.emacswiki.org/emacs/BookmarkPlus#AutofileBookmarks

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: file metadata
  2024-10-11 22:22 file metadata Christopher Howard
  2024-10-12  0:58 ` [External] : " Drew Adams
@ 2024-10-12  7:16 ` Dan Hitt
  2024-10-14 14:47   ` Christopher Howard
  2024-10-13 22:54 ` Jean Louis
  2024-10-14 22:15 ` James Thomas
  3 siblings, 1 reply; 13+ messages in thread
From: Dan Hitt @ 2024-10-12  7:16 UTC (permalink / raw)
  To: Christopher Howard; +Cc: Help Gnu Emacs Mailing List

That's a really good question.

You didn't mention your underlying OS or filesystem, although i guess we'd
want emacs to work with whatever metadata system is present.

Do you already have some extra metadata assigned (say with an attribute
called 'description') through (e.g.) ext4?

dan

On Fri, Oct 11, 2024 at 3:23 PM Christopher Howard <
christopher@librehacker.com> wrote:

> Hi, I have a bunch of files in various project that have non-descriptive
> names, but I don't want to change the file names, nor the file contents. It
> would be nice if there was some way I could display my own description of
> the file next to the the file listing, say in dired. Do we have any kind of
> extension, ideally with dired integration, that provides some of kind of
> file metadata system, or interacts with a third party metadata system?
>
> --
> 📛 Christopher Howard
> 🚀 gemini://gem.librehacker.com
> 🌐 http://gem.librehacker.com
>
> בראשית ברא אלהים את השמים ואת הארץ
>
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: file metadata
  2024-10-11 22:22 file metadata Christopher Howard
  2024-10-12  0:58 ` [External] : " Drew Adams
  2024-10-12  7:16 ` file metadata Dan Hitt
@ 2024-10-13 22:54 ` Jean Louis
  2024-10-14 22:15 ` James Thomas
  3 siblings, 0 replies; 13+ messages in thread
From: Jean Louis @ 2024-10-13 22:54 UTC (permalink / raw)
  To: Christopher Howard; +Cc: Help Gnu Emacs Mailing List

* Christopher Howard <christopher@librehacker.com> [2024-10-12 01:24]:
> Hi, I have a bunch of files in various project that have non-descriptive names, but I don't want to change the file names, nor the file contents. It would be nice if there was some way I could display my own description of the file next to the the file listing, say in dired. Do we have any kind of extension, ideally with dired integration, that provides some of kind of file metadata system, or interacts with a third party metadata system?

Oh yes, I do that all the time, that is my main thing. I have too many documents, too many legal entities, employees, reports, and it is not possible to work with the file system only.

System is fully functional, though it requires personal guidance and patience to be installed. Once installed, it works fine, it would fully satisfy your needs.


RCD Notes & Hyperscope for GNU Emacs, The Dynamic Knowledge Repository:
https://gnu.support/gnu-emacs/rcd-notes-for-gnu-emacs/index.html

RCD Notes for GNU Emacs is Dynamic Knowledge Repository designed as envisioned by Doug Engelbart. Backed up by PostgreSQL relational database, RCD Notes provides features such as people management also known as CRM or Customer Relationship Management, ERP or Enterprise Resource Planning, WRS or Website Revision System and Hyperscope Dynamic Knowledge Repository. It uses any kind of Emacs major modes and any kind of lightweight markup languages for editing and writing of any of elementary objects.

Here is small video demonstration:

https://gnu.support/images/2024/10/2024-10-14/2024-10-14-01:48:10.ogv

It has tags, tag types, each tag can have tags, different language,
related person, rank, system is actually extensible on the go, it has
85 different rather fixed properties for each elementary object, plus
unlimited properties, with unlimited property types, types, subtypes,
all extensible and customizable by user. It's fantastic, it is also
good money maker system for me.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

✡️🛡️ Proudly standing with Israel, a nation rooted in history and culture. Let's condemn hatred and promote understanding.

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: file metadata
  2024-10-12  7:16 ` file metadata Dan Hitt
@ 2024-10-14 14:47   ` Christopher Howard
  0 siblings, 0 replies; 13+ messages in thread
From: Christopher Howard @ 2024-10-14 14:47 UTC (permalink / raw)
  To: Dan Hitt; +Cc: Help Gnu Emacs Mailing List

Dan Hitt <dan.hitt@gmail.com> writes:

> You didn't mention your underlying OS or filesystem, although i guess we'd
> want emacs to work with whatever metadata system is present.
>

I am using ext4, and Emacs 30.0.91 (build 12, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-10-09. I am running Guix System x86_64.

> Do you already have some extra metadata assigned (say with an attribute
> called 'description') through (e.g.) ext4?
>

I do not, but I am opened minded regarding this.

-- 
Christopher Howard



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: file metadata
  2024-10-11 22:22 file metadata Christopher Howard
                   ` (2 preceding siblings ...)
  2024-10-13 22:54 ` Jean Louis
@ 2024-10-14 22:15 ` James Thomas
  2024-10-15 22:48   ` James Thomas
  3 siblings, 1 reply; 13+ messages in thread
From: James Thomas @ 2024-10-14 22:15 UTC (permalink / raw)
  To: Christopher Howard; +Cc: Help Gnu Emacs Mailing List

Christopher Howard wrote:

> Hi, I have a bunch of files in various project that have
> non-descriptive names, but I don't want to change the file names, nor
> the file contents. It would be nice if there was some way I could
> display my own description of the file next to the the file listing,
> say in dired. Do we have any kind of extension, ideally with dired
> integration, that provides some of kind of file metadata system, or
> interacts with a third party metadata system?

I had a system where I used:

(let ((backup-directory-alist '(("." . "~/denote"))))
  (make-backup-file-name-1 (expand-file-name
  (file-name-with-extension filename "org"))))

...to automatically check for a corresponding denote file with metadata.

Regards,
James



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: file metadata
       [not found] <mailman.80.1728955562.19238.help-gnu-emacs@gnu.org>
@ 2024-10-15 11:16 ` gfp
  2024-10-15 20:20   ` Jean Louis
  0 siblings, 1 reply; 13+ messages in thread
From: gfp @ 2024-10-15 11:16 UTC (permalink / raw)
  To: help-gnu-emacs


[-- Attachment #1.1.1: Type: text/plain, Size: 2963 bytes --]

Hi Jean,

thanks for sharing.

> System is fully functional, though it requires personal guidance and patience to be installed. Once installed, it works fine, it would fully satisfy your needs.

How can I install RCD Notes & Hyperscope?

Gottfried


Message: 5
Date: Mon, 14 Oct 2024 01:54:39 +0300
From: Jean Louis <bugs@gnu.support>
To: Christopher Howard <christopher@librehacker.com>
Cc: Help Gnu Emacs Mailing List <help-gnu-emacs@gnu.org>
Subject: Re: file metadata
Message-ID: <ZwxPrwPMkpdFqGsk@lco2>
Content-Type: text/plain; charset=utf-8

* Christopher Howard <christopher@librehacker.com> [2024-10-12 01:24]:
 > Hi, I have a bunch of files in various project that have 
non-descriptive names, but I don't want to change the file names, nor 
the file contents. It would be nice if there was some way I could 
display my own description of the file next to the the file listing, say 
in dired. Do we have any kind of extension, ideally with dired 
integration, that provides some of kind of file metadata system, or 
interacts with a third party metadata system?

Oh yes, I do that all the time, that is my main thing. I have too many 
documents, too many legal entities, employees, reports, and it is not 
possible to work with the file system only.

System is fully functional, though it requires personal guidance and 
patience to be installed. Once installed, it works fine, it would fully 
satisfy your needs.


RCD Notes & Hyperscope for GNU Emacs, The Dynamic Knowledge Repository:
https://gnu.support/gnu-emacs/rcd-notes-for-gnu-emacs/index.html

RCD Notes for GNU Emacs is Dynamic Knowledge Repository designed as 
envisioned by Doug Engelbart. Backed up by PostgreSQL relational 
database, RCD Notes provides features such as people management also 
known as CRM or Customer Relationship Management, ERP or Enterprise 
Resource Planning, WRS or Website Revision System and Hyperscope Dynamic 
Knowledge Repository. It uses any kind of Emacs major modes and any kind 
of lightweight markup languages for editing and writing of any of 
elementary objects.

Here is small video demonstration:

https://gnu.support/images/2024/10/2024-10-14/2024-10-14-01:48:10.ogv

It has tags, tag types, each tag can have tags, different language,
related person, rank, system is actually extensible on the go, it has
85 different rather fixed properties for each elementary object, plus
unlimited properties, with unlimited property types, types, subtypes,
all extensible and customizable by user. It's fantastic, it is also
good money maker system for me.
-- 
Mit freundlichen Grüßen

G. Preihs

()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2451 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: file metadata
  2024-10-15 11:16 ` gfp
@ 2024-10-15 20:20   ` Jean Louis
  0 siblings, 0 replies; 13+ messages in thread
From: Jean Louis @ 2024-10-15 20:20 UTC (permalink / raw)
  To: gfp; +Cc: help-gnu-emacs

With my persönliches Guidance.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

✡️🛡️ Proudly standing with Israel, a nation rooted in history and culture. Let's condemn hatred and promote understanding.

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: file metadata
  2024-10-14 22:15 ` James Thomas
@ 2024-10-15 22:48   ` James Thomas
  2024-10-15 23:32     ` James Thomas
  0 siblings, 1 reply; 13+ messages in thread
From: James Thomas @ 2024-10-15 22:48 UTC (permalink / raw)
  To: Christopher Howard; +Cc: Help Gnu Emacs Mailing List

James Thomas wrote:

> Christopher Howard wrote:
>
>> Hi, I have a bunch of files in various project that have
>> non-descriptive names, but I don't want to change the file names, nor
>> the file contents. It would be nice if there was some way I could
>> display my own description of the file next to the the file listing,
>> say in dired. Do we have any kind of extension, ideally with dired
>> integration, that provides some of kind of file metadata system, or
>> interacts with a third party metadata system?
>
> I had a system where I used:
>
> (let ((backup-directory-alist '(("." . "~/denote"))))
>   (make-backup-file-name-1 (expand-file-name
>   (file-name-with-extension filename "org"))))
>
> ...to automatically check for a corresponding denote file with metadata.

Wth, I decided to write it again. Sharing if useful for Denote users:

--8<---------------cut here---------------start------------->8---
;; Metadata for files

(defun denote-metadata (file)
  (interactive
   (list (read-file-name "Metadata for file: ")))
  (find-file
   (let* ((backup-directory-alist `(("." . ,(denote-directory))))
	  (name (make-backup-file-name-1
		 (expand-file-name file))))
     (expand-file-name
      (concat
       (denote-get-identifier) "--"
       (file-name-nondirectory name) ".org")
      (file-name-directory name))))))

(defun my/dired-mark-files-with-metadata nil
  (interactive)
  (save-excursion
    (let* ((backup-directory-alist '(("." . "/")))
	   (d (file-relative-name
	       (make-backup-file-name-1
		(expand-file-name default-directory))
	       "/"))
	   temp
	   (hits 0))
      (mapcar
       (lambda (f)
	 (goto-char (point-min))
	 (when
	     (search-forward-regexp
	      (format
	       "\\s %s[*@]?$"
	       (file-name-sans-extension
		(string-remove-prefix
		 d
		 (string-trim-left
		  f (concat denote-id-regexp "--")))))
	      nil t)
	   (setq hits (1+ hits))
	   (dired-mark 1)))
       (directory-files
	(denote-directory) nil
	(concat "\\`" denote-id-regexp "--" d)))
      (message "%d files with metadata marked" hits))))
--8<---------------cut here---------------end--------------->8---

--



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: file metadata
  2024-10-15 22:48   ` James Thomas
@ 2024-10-15 23:32     ` James Thomas
  2024-10-15 23:36       ` James Thomas
  0 siblings, 1 reply; 13+ messages in thread
From: James Thomas @ 2024-10-15 23:32 UTC (permalink / raw)
  To: Christopher Howard; +Cc: Help Gnu Emacs Mailing List

James Thomas wrote:

> James Thomas wrote:
>
>> Christopher Howard wrote:
>>
>>> Hi, I have a bunch of files in various project that have
>>> non-descriptive names, but I don't want to change the file names, nor
>>> the file contents. It would be nice if there was some way I could
>>> display my own description of the file next to the the file listing,
>>> say in dired. Do we have any kind of extension, ideally with dired
>>> integration, that provides some of kind of file metadata system, or
>>> interacts with a third party metadata system?
>>
>> I had a system where I used:
>>
>> (let ((backup-directory-alist '(("." . "~/denote"))))
>>   (make-backup-file-name-1 (expand-file-name
>>   (file-name-with-extension filename "org"))))
>>
>> ...to automatically check for a corresponding denote file with metadata.
>
> Wth, I decided to write it again. Sharing if useful for Denote users:

Updated version that accounts for 'keywords' (_after_ the original file
extension):

--8<---------------cut here---------------start------------->8---
;; Metadata for files

(defun denote-metadata (file)
  (interactive
   (list (read-file-name "Metadata for file: ")))
  (find-file
   (let* ((backup-directory-alist `(("." . ,(denote-directory))))
	  (name (make-backup-file-name-1
		 (expand-file-name file))))
     (expand-file-name
      (concat
       (denote-get-identifier) "--"
       (file-name-nondirectory name) ".org")
      (file-name-directory name))))))

(defun my/dired-mark-files-with-metadata nil
  (interactive)
  (save-excursion
    (let* ((backup-directory-alist '(("." . "/")))
	   (d (file-relative-name
	       (make-backup-file-name-1
		(expand-file-name default-directory))
	       "/"))
	   temp
	   (hits 0))
      (mapcar
       (lambda (f)
	 (goto-char (point-min))
	 (when
	     (search-forward-regexp
	      (format
	       "\\s %s[*@]?$"
	       (string-remove-suffix
		(if (setq temp (denote-retrieve-filename-keywords f))
		  (concat "__" temp) "")
		(file-name-sans-extension
		 (string-remove-prefix
		  d
		  (string-trim-left
		   f (concat denote-id-regexp "--"))))))
	      nil t)
	   (setq hits (1+ hits))
	   (dired-mark 1)))
       (directory-files
	(denote-directory) nil
	(concat "\\`" denote-id-regexp "--" d)))
      (message "%d files with metadata marked" hits))))
--8<---------------cut here---------------end--------------->8---

--



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: file metadata
  2024-10-15 23:32     ` James Thomas
@ 2024-10-15 23:36       ` James Thomas
  0 siblings, 0 replies; 13+ messages in thread
From: James Thomas @ 2024-10-15 23:36 UTC (permalink / raw)
  To: Christopher Howard; +Cc: Help Gnu Emacs Mailing List

James Thomas wrote:

> James Thomas wrote:
>
>> James Thomas wrote:
>>
>>> Christopher Howard wrote:
>>>
>>>> Hi, I have a bunch of files in various project that have
>>>> non-descriptive names, but I don't want to change the file names, nor
>>>> the file contents. It would be nice if there was some way I could
>>>> display my own description of the file next to the the file listing,
>>>> say in dired. Do we have any kind of extension, ideally with dired
>>>> integration, that provides some of kind of file metadata system, or
>>>> interacts with a third party metadata system?
>>>
>>> I had a system where I used:
>>>
>>> (let ((backup-directory-alist '(("." . "~/denote"))))
>>>   (make-backup-file-name-1 (expand-file-name
>>>   (file-name-with-extension filename "org"))))
>>>
>>> ...to automatically check for a corresponding denote file with metadata.
>>
>> Wth, I decided to write it again. Sharing if useful for Denote users:
>
> Updated version that accounts for 'keywords' (_after_ the original file
> extension):

Never mind that: breaks the first function.

(I'll see myself out now)

--



^ permalink raw reply	[flat|nested] 13+ messages in thread

* bookmark+: legacy key syntax in Emacs 30?
  2024-10-12  0:58 ` [External] : " Drew Adams
@ 2024-10-16 19:59   ` Christopher Howard
  2024-10-17  7:34     ` Robert Pluim
  0 siblings, 1 reply; 13+ messages in thread
From: Christopher Howard @ 2024-10-16 19:59 UTC (permalink / raw)
  To: Drew Adams; +Cc: Emacs Devel Mailing List

I downloaded the latest files from the wiki but am still getting the same error when I require 'bookmark+.

I do not know much about keymaps at this point, but the offending line is in bookmark+-key.el:

``` elisp
(define-key ctl-x-map "rK" 'bmkp-set-desktop-bookmark)        ; `C-x r K' (also `C-x x K', `C-x x c K')
```

I see in the Emacs 30 documentation at least that define-key is considered now a legacy function, and `keymap-set' is recommended instead. Perhaps something broke in define-key from 29->30, so that it no longer recognizes correctly the legacy string syntax?

I'm CC'ing emacs-devel in hopes that an SME will weigh in on this.

-- 
Christopher Howard



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bookmark+: legacy key syntax in Emacs 30?
  2024-10-16 19:59   ` bookmark+: legacy key syntax in Emacs 30? Christopher Howard
@ 2024-10-17  7:34     ` Robert Pluim
  0 siblings, 0 replies; 13+ messages in thread
From: Robert Pluim @ 2024-10-17  7:34 UTC (permalink / raw)
  To: Christopher Howard; +Cc: Drew Adams, Emacs Devel Mailing List

>>>>> On Wed, 16 Oct 2024 11:59:27 -0800, Christopher Howard <christopher@librehacker.com> said:

    Christopher> I downloaded the latest files from the wiki but am still getting the same error when I require 'bookmark+.
    Christopher> I do not know much about keymaps at this point, but the offending line is in bookmark+-key.el:

    Christopher> ``` elisp
    Christopher> (define-key ctl-x-map "rK" 'bmkp-set-desktop-bookmark)        ; `C-x r K' (also `C-x x K', `C-x x c K')
    Christopher> ```

    Christopher> I see in the Emacs 30 documentation at least that define-key is
    Christopher> considered now a legacy function, and `keymap-set' is recommended
    Christopher> instead. Perhaps something broke in define-key from 29->30, so that it
    Christopher> no longer recognizes correctly the legacy string syntax?

Thatʼs possible, but in this case I canʼt reproduce your error. That
syntax is perfectly legal, and will remain so.

    Christopher> I'm CC'ing emacs-devel in hopes that an SME will weigh in on this.

Does this happen when you byte-compile the bookmark+ files? Or only
when you use the .el files?


Robert
-- 



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-10-17  7:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-11 22:22 file metadata Christopher Howard
2024-10-12  0:58 ` [External] : " Drew Adams
2024-10-16 19:59   ` bookmark+: legacy key syntax in Emacs 30? Christopher Howard
2024-10-17  7:34     ` Robert Pluim
2024-10-12  7:16 ` file metadata Dan Hitt
2024-10-14 14:47   ` Christopher Howard
2024-10-13 22:54 ` Jean Louis
2024-10-14 22:15 ` James Thomas
2024-10-15 22:48   ` James Thomas
2024-10-15 23:32     ` James Thomas
2024-10-15 23:36       ` James Thomas
     [not found] <mailman.80.1728955562.19238.help-gnu-emacs@gnu.org>
2024-10-15 11:16 ` gfp
2024-10-15 20:20   ` Jean Louis

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.