defaultxr / tag-edit-mode

Emacs major mode for editing file tags (id3, etc)
GNU General Public License v3.0
5 stars 0 forks source link

Unable to Edit Tags via Link #1

Closed WammKD closed 10 months ago

WammKD commented 10 months ago

First, this is an awesome library; I was surprised at how barren the number of libraries for music tags via Emacs was (though that may be, in part, because EMMS has its own inbuilt tagger). Something like this could easily be reused by other libraries and already looks really great.

Not a huge deal but just wanted to point it out so it's on your radar: I usually link to /tmp (soft link) from my home directory and tried opening a file through that (~/tmp/out.mp4). The mode (and, I suspect, ffmpeg) reported it wasn't able to read the tags. Opening the file directly (/tmp/out.mp4) had things working as anticipated.

defaultxr commented 10 months ago

Thanks for the heads up! I think this may have been because of the ~ rather than the symlink. Looks like I was just passing the raw input to ffmpeg/ffprobe rather than expanding ~ into one's $HOME, and ffmpeg probably just doesn't expand ~ on its own (which is understandable since one's shell usually does that).

I pushed a fix (d38afa109c7aea9f3f3a5de54cb8e1df59394380) which I believe should fix this. Let me know if you're still seeing otherwise.

Also, thank you for the kind words! tag-edit-mode definitely has some bugs and a lot of missing features, but I'm happy to hear I'm not the only person who thinks it will be useful. :)

WammKD commented 10 months ago

Absolutely!

So, with the latest changes, I'm now running into a different error; it says something about the function tag-edit-read-file-tags-with-none not existing, regardless the path (~, /tmp, /home/user, etc.).

defaultxr commented 10 months ago

Hmm, that's strange. So the tag-edit--backend variable seems to be getting set to 'none for you, which means tag-edit-mode couldn't find kid3-cli or ffmpeg in your $PATH. It searches using Emacs' built-in executable-find function. I'm going to look into this further soon, but for now I think you can work around it simply by running (setf tag-edit--backend 'ffmpeg). You could put that in your Emacs init.el as well until I fix this, so it re-applies when you start Emacs.

It's particularly strange because neither of the commits I pushed touch the part of the code that searches for those programs.

Anyway, I'll try to look at this soon, and will update this issue if I can figure out what might be causing it not to find them. (It also suggests I should signal an error message if no backend is found, rather than setting that variable to a value that will not work.)

WammKD commented 10 months ago

Mmm, I know what happened. Sorry about this; I'm running Guix and, when I need a package I normally don't use often, I'll install it in a shell and then try whatever I wanted to do.

I forgot, when I was trying to test, so of course Emacs couldn't find ffmpeg. Just retried it (while making sure I'm in a shell that has ffmpeg installed) and it worked perfectly. I was able to open the file via link and update a tag; tried closing the buffer and opening the file through the actual path and my edit came through.

So just user error; looks like it's fixed!

defaultxr commented 10 months ago

Awesome, glad to hear! Sometimes it's easy to miss those sorts of things (I know I've done it plenty myself, haha). Thanks and happy tagging :)