all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* RE: [External] : file metadata
  2024-10-11 22:22 Christopher Howard
@ 2024-10-12  0:58 ` Drew Adams
  0 siblings, 0 replies; 5+ 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] 5+ messages in thread

* Re: [External] : file metadata
@ 2024-10-15 19:44 Christopher Howard
  2024-10-15 21:14 ` Drew Adams
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Howard @ 2024-10-15 19:44 UTC (permalink / raw)
  To: Drew Adams; +Cc: Help Gnu Emacs Mailing List

Bookmark+ seems like just what I need. However, it appears to be broken in Emacs 30, and I switched to 30 pre-test a month or so ago. The same errors do not appear when I run it in Emacs 29. This is using the latest commit from https://github.com/emacsmirror/bookmark-plus.

When I first try to load it (through a require) a get this error:

``` bt
Debugger entered--Lisp error: (error "Key sequence r K starts with non-prefix key r")
  define-key((keymap #^[nil nil keymap #^^[3 0 pop-global-mark nil list-buffers t list-directory eval-last-sexp helm-find-files nil nil indent-rigidly dired-jump kmacro-keymap downcase-region (keymap (108 . set-language-environment) (99 . universal-coding-system-argument) (28 . set-input-method) (88 . set-next-selection-coding-system) (120 . set-selection-coding-system) (112 . set-buffer-process-coding-system) (107 . set-keyboard-coding-system) (116 . set-terminal-coding-system) (70 . set-file-name-coding-system) (114 . revert-buffer-with-coding-system) (102 . set-buffer-file-coding-system)) set-goal-column delete-blank-lines mark-page read-only-mode find-file-read-only save-buffer transpose-lines upcase-region find-alternate-file write-file exchange-point-and-mark nil suspend-frame (keymap (67108912 . global-text-scale-adjust) (67108909 . global-text-scale-adjust) (67108925 . global-text-scale-adjust) (67108907 . global-text-scale-adjust) (58 . repeat-complex-command) (27 . repeat-complex-command)) nil nil nil nil rectangle-mark-mode nil nil server-edit set-selective-display nil nil expand-abbrev kmacro-start-macro kmacro-end-macro calc-dispatch balance-windows nil shrink-window-if-larger-than-buffer set-fill-prefix nil delete-window ...] #^^[1 0 #^^[2 0 #^^[3 0 pop-global-mark nil list-buffers t list-directory eval-last-sexp helm-find-files nil nil indent-rigidly dired-jump kmacro-keymap downcase-region (keymap (108 . set-language-environment) (99 . universal-coding-system-argument) (28 . set-input-method) (88 . set-next-selection-coding-system) (120 . set-selection-coding-system) (112 . set-buffer-process-coding-system) (107 . set-keyboard-coding-system) (116 . set-terminal-coding-system) (70 . set-file-name-coding-system) (114 . revert-buffer-with-coding-system) (102 . set-buffer-file-coding-system)) set-goal-column delete-blank-lines mark-page read-only-mode find-file-read-only save-buffer transpose-lines upcase-region find-alternate-file write-file exchange-point-and-mark nil suspend-frame (keymap (67108912 . global-text-scale-adjust) (67108909 . global-text-scale-adjust) (67108925 . global-text-scale-adjust) (67108907 . global-text-scale-adjust) (58 . repeat-complex-command) (27 . repeat-complex-command)) nil nil nil nil rectangle-mark-mode nil nil server-edit set-selective-display nil nil expand-abbrev kmacro-start-macro kmacro-end-macro calc-dispatch balance-windows nil shrink-window-if-larger-than-buffer set-fill-prefix nil delete-window ...] nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil ...] (67108912 . text-scale-adjust) (67108925 . text-scale-adjust) (67108909 . text-scale-adjust) (67108907 . text-scale-adjust) (67108923 . comment-line) (67108896 . pop-global-mark) (C-left . previous-buffer) (left . previous-buffer) (C-right . next-buffer) (right . next-buffer)) "rK" bmkp-set-desktop-bookmark)
  eval-buffer(#<buffer  *load*-696379> nil "/home/christopher/Repos/emacsmirror/bookmark-plus/bookmark+-key.el" nil t)  ; Reading at buffer position 9485
  load-with-code-conversion("/home/christopher/Repos/emacsmirror/bookmark-plus/bookmark+-key.el" "/home/christopher/Repos/emacsmirror/bookmark-plus/bookmark+-key.el" nil t)
  require(bookmark+-key)
  eval-buffer(#<buffer  *load*-617642> nil "/home/christopher/Repos/emacsmirror/bookmark-plus/bookmark+.el" nil t)  ; Reading at buffer position 10133
  load-with-code-conversion("/home/christopher/Repos/emacsmirror/bookmark-plus/bookmark+.el" "/home/christopher/Repos/emacsmirror/bookmark-plus/bookmark+.el" nil t)
  require(bookmark+)
  eval-buffer(#<buffer  *load*> nil "/home/christopher/.emacs.d/init.el" nil t)  ; Reading at buffer position 50593
  load-with-code-conversion("/home/christopher/.emacs.d/init.el" "/home/christopher/.emacs.d/init.el" t t)
  load("/home/christopher/.emacs.d/init" noerror nomessage)
  #f(compiled-function () #<bytecode 0x86b8921748fbf10>)()
  startup--load-user-init-file(#f(compiled-function () #<bytecode -0x1a06b9bc692f9c80>) #f(compiled-function () #<bytecode 0x731968ef8c7b19b>) t)
  command-line()
  normal-top-level()
```

If I (c)ontinue, and then try C-x j, I get this error:

``` bt
Debugger entered--Lisp error: (wrong-type-argument commandp bmkp-jump-map)
  call-interactively(bmkp-jump-map nil nil)
  command-execute(bmkp-jump-map)
```

-- 
Christopher Howard



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

* RE: [External] : file metadata
  2024-10-15 19:44 [External] : file metadata Christopher Howard
@ 2024-10-15 21:14 ` Drew Adams
  0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2024-10-15 21:14 UTC (permalink / raw)
  To: Christopher Howard; +Cc: Help Gnu Emacs Mailing List

> Bookmark+ seems like just what I need. However, it appears to be broken
> in Emacs 30, and I switched to 30 pre-test a month or so ago. The same
> errors do not appear when I run it in Emacs 29. This is using the latest
> commit from
> https://urldefense.com/v3/__https://github.com/emacsmirror/bookmark-
> plus__;!!ACWV5N9M2RV99hQ!M-
> 3CrV160p4kWvbEN27pGBLIT8ojzosDsDStwA5U6qiaqym41IEHS7Z06Uo8fLX_XVIkKBU9Ex
> eu8TW_-ix8bSez8w$ 

That mirror says the Bookmark+ code there is at least
8 months old.  (Dunno who mirrors the code there.)

The latest updates to Bookmark+ are from 2024-09-16 -
a month ago.  Download the files from Emacs Wiki, to
be sure to get the latest versions.

See this note in bookmark+-mac.el, which is a file of
Lisp macros:

;;    ****** NOTE ******
;;
;;      WHENEVER you update Bookmark+ (i.e., download new versions of
;;      Bookmark+ source files), I recommend that you do the
;;      following:
;;
;;      1. Delete ALL existing BYTE-COMPILED Bookmark+ files
;;         (bookmark+*.elc).
;;      2. Load Bookmark+ (`load-library' or `require').
;;      3. Byte-compile the source files.
;;
;;      In particular, ALWAYS LOAD `bookmark+-mac.el' (not
;;      `bookmark+-mac.elc') BEFORE YOU BYTE-COMPILE new versions of
;;      the files, in case there have been any changes to Lisp macros
;;      (in `bookmark+-mac.el').
;;
;;      (This is standard procedure for Lisp: code that depends on
;;      macros needs to be byte-compiled anew after loading the
;;      updated macros.)
;;
;;    ******************

However, I can't speak to compatibility with Emacs 30
dev versions - I don't have an Emacs 30 version, and I
have no idea what they might have changed that causes
backward incompatibility.  (Keep in mind that 30 isn't
released yet - you're living on the bleeding edge.)

Maybe someone here who's familiar with Emacs 30 can
advise us about the errors you see.

But first try with the latest Bookmark+ files (from
Emacs Wiki), paying attention to the above Note, and
starting with `emacs -Q' (no init file), to avoid
interactions with other things you might have in your
init file.  It's best to try with only the source
files (*.el) first - no byte-compiled files (*.elc),
for debugging purposes.

The error occurs when loading file bookmark+-key.el.
Presumably, one of the `define-key's in that file is
what Emacs 30 chokes on.

You might try manually loading the files in turn, in
the order you see in bookmark+.el.  But load a _copy_
of bookmark+-key.el, which you can bisect, to narrow
the debugging search.  You can add the sexp `(debug)',
moving it to, in effect bisect and enter the debugger
wherever you like.  In the debugger, use `d' to step
or `c' to take big steps.

Sorry for the trouble.  Let me know, if you learn
something I should know about, to prepare for Emacs
30 compatibility.

Getting the files from Emacs Wiki, etc.:

https://www.emacswiki.org/emacs/BookmarkPlus#Libraries

Thx - Drew

> When I first try to load it (through a require) a get this error:
> 
> ``` bt
> Debugger entered--Lisp error: (error "Key sequence r K starts with non-
> prefix key r")
...
>   require(bookmark+-key)
...
>   require(bookmark+)
...
>   load("/home/christopher/.emacs.d/init" noerror nomessage)
...
>   command-line()
>   normal-top-level()
>
> If I (c)ontinue, and then try C-x j, I get this error:
> 
> bt
> Debugger entered--Lisp error: (wrong-type-argument commandp bmkp-jump-
> map)
>   call-interactively(bmkp-jump-map nil nil)
>   command-execute(bmkp-jump-map)
> 
> Christopher Howard



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

* Re: [External] : file metadata
@ 2024-10-16 15:58 Christopher Howard
  2024-10-16 20:22 ` Drew Adams
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Howard @ 2024-10-16 15:58 UTC (permalink / raw)
  To: Drew Adams; +Cc: Help Gnu Emacs Mailing List

May I ask, hopefully with sounding antagonistic, why you prefer to maintain your library on EmacsWiki rather than a git repository some where?

In the Guix distribution packaging is it is very easy to pull a library from a git repository, as well as automatically check for updates, whereas there is not tooling to scan a wiki page and try to figure what are the correct files and whether the library has changed recently. I'm sure this is why the Guix emacs-bookmark-plus package depends on the out-of-date GitHub mirror. I think the wiki itself is a git repository, but even if one wanted to download the whole wiki, the library files are not sequestered into some distinct directory where they are easy for the tooling to deal with.

You could of course say that people are free to mirror the files themselves if they want to, but that brings us back to where we are now — a mirror that has not been kept up-to-date.

-- 
Christopher Howard



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

* RE: [External] : file metadata
  2024-10-16 15:58 Christopher Howard
@ 2024-10-16 20:22 ` Drew Adams
  0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2024-10-16 20:22 UTC (permalink / raw)
  To: Christopher Howard; +Cc: Help Gnu Emacs Mailing List

> why you prefer to maintain your library on EmacsWiki
> rather than a git repository some where?

Old-school, lazy; easier for me.  (But I don't maintain
it there; I publish it there.)

> people are free to mirror the files themselves if they
> want to, but that brings us back to where we are now
> — a mirror that has not been kept up-to-date.

"Up-to-date" has different meanings.  The Emacs-Wiki
mirror is updated periodically (not by me).  It has no
need to check what might have changed in any given file.
"Periodically", regardless of the chosen period, is
different from whenever this or that file might get
updated on the wiki.

If you want the latest of my files, download them
from the wiki.  No one _needs_ to get the latest
versions.  But if someone wants help debugging
something I suggest to start with the latest.

HTH.

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

end of thread, other threads:[~2024-10-16 20:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-15 19:44 [External] : file metadata Christopher Howard
2024-10-15 21:14 ` Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2024-10-16 15:58 Christopher Howard
2024-10-16 20:22 ` Drew Adams
2024-10-11 22:22 Christopher Howard
2024-10-12  0:58 ` [External] : " Drew Adams

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.