Titus Müller <[email protected]> writes:

> You also have a very long title, in my music collection, EMMS cut all
> titles short to exactly 30 characters until this afternoon (as well in
> the tag editor, shown as info-title, as well as in the playlists), and
> Umlaut ä was shown as Slash 344, Umlaut ö as Slash 366, Umlaut ü as
> Slash 374.
>
> I tried a little and read again in your very good EMMS manual. Then I
> found the reason. I thought it must have to do with data import, so I
> double-checked that and found out I was missing the line
>
> (require 'emms-info-mp3info)
>
> Also, I changed my line 
>
> (setq emms-info-functions '(emms-info-native emms-info-mp3info))
>
> to what you have in the manual
>
> (add-to-list 'emms-info-functions 'emms-info-mp3info)
>
> To see wether the files are imported better now, I needed to empty the
> database. And I couldn't find a command to do so (emms-cache-reset did
> something else), so I went into the emms-directory and deleted the
> file with a strange name. Now the database was gone, and I could
> import the music files anew, and there they are: all Umlaut letters
> correct, the titles long and not cut anymore.
>
> So my "bugs" where just caused by stupidity on my side, I think.
>
> I'm embarrassed. I'm very sorry I stole your time.

Actually, not at all a waste of time. What you are doing is
valuable.

What is suggested to be the case above is that emms-info-native and
emms-info-mp3info are handling your files differently.

Here is a bit of detail which may help you zero in on these issues. This
may be of use to other people wanting to debug similar issues, so don't
worry if this isn't what you are looking to get into because others may
find it useful.

The function `emms-cache-reset' does two things. First it resets the
in-memory cache, which is a hash-table stored in the variable
`emms-cache-db'. Second, it writes that hash-table to disk. Typically to
the file ~/.emacs.d/emms/cache. Thus, it "synchronizes" between the
in-memory cache (works quickly while Emacs is running) and the on-disk
cache (slower, but persists between Emacs sessions.)

If you only delete the file ~/.emacs.d/emms/cache and do not restart
Emacs, then the in-memory hash-table `emms-cache-db' will remain intact
until a function is called to syncronize between the two.

To check if the culprit of bad info is a specific info-method, I would
do the following:

0. Learn enough about Emacs Lisp to evaluate variables and how `setq'
works. The Emacs info manual has a lot of useful information in the
chapter titled: "28.9 Evaluating Emacs Lisp Expressions".

1. Invoke emms-cache-reset. Alternatively, shut Emacs down, delete
~/.emacs.d/emms/cache, and restart Emacs. You can check that the cache
is indeed empty by evaluating the variable `emms-cache-db'.

If it's empty it will evaluate to something like: "#s(hash-table size 65
test string-hash rehash-size 1.5 rehash-threshold 0.8125 data ())". If
it's full it will evaluate to something big and full of track names and
info.

Now you have a clean and empty cache. You now have a clean-slate to test
things from.

2. Set the variable `emms-info-functions' to the info method you want to
test. For instance, if you have the exiftool binary installed on your
system, then evaluate: (setq emms-info-functions '(emms-info-exiftool))

You can then check that you've set the exiftool backend to be your
chosen backend by evaluating the variable emms-info-functions. If you
did the above correctly, it will evaluate to "(emms-info-exiftool)".

You could use the exact same technique to set the native backend as the
info backend of choice; just replace "exiftool" with "native" above.

3. Invoke `emms-add-directory-tree' or similar. This will cause the
cache to populate. You can check that it did by evaluating the variable
`emms-cache-db', as above.

4. Have a look at the results in the playlist and/or browser.

5. Rinse and repeat until you figure out which info methods are working
and which do not. Definitely report those which aren't working!

Hope this is of some help. If anyone sees that I've made mistakes in the
above or have additional helpful tips, then please chime in.


> ----- Ursprüngliche Nachricht vom 18.12.2023 -----
>> Titus Müller <[email protected]> writes:
>>
>>> (2) Since I am German, some MP3s have Umlaut-Letters in their
>>> title. "Nun ruhen alle Wälder" is shown in the playlist and the
>>> browser with a slash followed by the number 344 instead of the ä Laut,
>>> and in the tag editor it is correct in the name-field, but broken
>>> (344) in the info-title field.
>>
>> I have a lot of similar tracks. For example, the following displays
>> correctly for me in the playlist, tag editor, and browser:
>>
>>     Johann Sebastian Bach - Cantata, BWV 211 "Schweigt stille, plaudert
>>     nicht": V. Rezitativo (Schlendrian, Liesgen): "Wenn du mir nicht den
>>     Coffee läßt" - Secular Cantatas, BWV 211 & 212: Schweigt stille,
>>     plaudert nicht (Kaffee-Kantate) / Mehr hahn en neue Oberkeet
>>     (Bauernkantate)
>>
>> There may be something else going on outside of Emms here.
>

-- 
   "Cut your own wood and it will warm you twice"

Reply via email to