NAME monk.el --- Multimedia Object Navigator Kluge (or whatever) SYNOPSIS M-x monk RET : Meet MonK. Filename or RET Asked. M-x monk RET RET : Read tracks from CD audio. M-x monk RET file|dir RET : Read a file or directory. M-x monk . RET : Read current directory. M-0 M-x monk RET : Open up an empty MonK buffer. M-x monk-open-new RET : Equivalent to M-0 M-x monk RET. M-x monk-other-window RET : `other-win' version of M-x monk RET. M-x monk-other-frame RET : `other-frame version of M-x monk RET. [menu-bar tools monk] : (maybe) Equivalent to M-x monk RET M-m, M-C-m (in dired) : Open or add tracks from file/dir to *monk* (requires some extra setup) DESCRIPTION MonK generates `track' objects out of multimedia files (or device) in *monk* buffer, and play them. The track data is stored as a text-property, so it can be copied and pasted even to ordinary buffers, and can be played with M-x monk-play-this-track RET. In this text-property implementation, undo (C-/ etc.) works completely for *monk* buffer: the deleted track can fully be restored out of the undo history. While playing a track, MonK displays relevant info such as track timing etc. on mode-line. The MonK's mode-line acts as a metaphor of time scale of the playing track, and can be clicked or dragged by mouse (some extra setup might be required). Multiple *monk* buffers supported, but only a player can run in each buffer. Multiple players can run simultaneously in different buffers if the devices used by the players do not conflict (eg. one is ripping mp3 and the other is playing via /dev/dsp). Curretly supported `multimedia' objects are: * CD audio * mp3 audio * mpeg video * midi * OggVorbis audio * WAV audio mp3 audio: Played through mpg123(1) by default. mp321(1) can also be used as mp3 player, and may be better. mp321(1) requires some setup described in the section below. Id3 info can be edited via id3tool(1). m3u playlist file supported -- any supported object can be listed. CD audio tracks: playing and ripping available, but ripping is not fully supported yet officially -- just a ripper script generation supported. Other type of track can be inserted among CD audio tracks, but CD audio tracks are always inserted in a new *monk* buffer. mpeg video: Played through plaympeg(1) from smpeg-0.4.x. The `mpg' track supports jumping (shuttle search) to desired track timing, and looping desired range, but the loop is not so accurate since the loop-end timing is not determined by a commad line option to plaympeg but emulated by elisp timer. There is no tool other than MonK, which can loop desired part of mpeg video. midi: Played by timidity (http://www.goice.co.jp/member/mo/timidity/), or playmidi(1). Can't jump, loop, or shuttle search on midi tracks. If timidity.el included in timidity archive is installed, M-RET passes a midi track to timidity.el, and in this case jump, playing back and forth is possible via timidity.el. OggVorbis: Played via ogg123(1). Loop is done by elisp emulation as in case of mpeg video. WAV: Played via sox(1). Loop is available. REQUIREMENT Tools below are required to play MonK tracks: Player Command Versions the authour used -------------- ------------------------- cdda2wav(1) from cdrecord-1.09, 1.10, or cdrtools-2.0 mpg123(1) mpg123-0.59r, mpg321-0.2.10 id3tool(1) id3tool-1.1f plaympeg(1) smpeg-0.4.3 ogg123(1) ogg123-1.0beta4, ogg123-1.0rc1, ogg123-1.0rc3 sox(1) sox-12.16, sox-12.17, sox-12.17.{1,3,4} playmidi(1) 2.4 timidity(1) 2.11.3 The command lines to test these tools should be something like: $ cdda2wav -N -e -v -t1 -o0 -d0 $ cdda2wav -gNJ -v34 (cdda2wav from cdrecord-1.x) $ cdda2wav -gNJ -v toc (cdda2wav from cdrtools-2.0) $ mpg123 -v music.mp3 $ mpg321 -v music.mp3 $ id3tool music.mp3 $ plaympeg cinema.mpg $ playmidi midifile.midi $ timidity midifile.midi $ sox -V wave.wav -t ossdsp /dev/dsp $ ogg123 -v music.ogg Absolutely old cpu's, such as 486DX, are not for MonK, and perhaps old non-MMX pentium around 120MHz is not good enough. As for cdda2wav(1), MonK supports cdda2wav from cdrecord-1.09, 1.10, and beta version cdrtools-1.11a24 (of slackware-8.1). To use cdda2wav(1) from cdrtools-2.0 (or beta versions perhaps after cdrtools-1.11a24), you have to modify variable `monk-cdda2wav-query-command' as: (setq monk-cdda2wav-query-command "cdda2wav -gNJ -v toc") in ~/.emacs(.el). Optionally, xmcd(1x), perl(1), aumix(1), cdparanoia(1), sh(1) etc. are required to access cddb database, to control volume etc. cddbcmd(1x) from xmcd-2.6.tar.gz is required to access cddb server to generate names for cdaudio tracks, but cddbcmd(1x) is deprecated in the later versions of xmcd. If there's difficulty to get xmcd including cddbcmd(1x), consult MonK web page, where you may find some workaround. For CD audio, cdda2wav(1) sends audio data to /dev/dsp (or other equivalent device supported by cdda2wav(1)). Most of the analog amp and wiring in PC / CDROM hardware are so poor that they can't be used to listen to music. "cdda2wav -e" works good for most of SCSI CDROM drives even if they are 4X speed (perhaps 4X is the lowest threshold), but some ATAPI drives may not work well for cdda2wav(1). See BUGS, TUNING section below. Written and tested mostly on seemingly emacs-20.7/21.x, and runs also on seemingly mule-2.3 (emacs-19.28/19.34) without any moronic add-on elisp libraries. Authour's OS is linux. The emacs should be built with floating point support or monk.el won't load up. Perhaps all the facilities may not be available, or won't work at all in xemacs, which the authour hasn't been used for years. The authour does not guarantee that MonK would run on an emacs you have. Further, the emacs mentioned above may have nothing to do with any existing emacs. I do believe that all the codes in MonK are from the scratch, and do not conflict with any other's goddamn `license's. The people anxious more about the license than code itself should not use MonK. INSTALL ... Under your ~/: make; make eldir=~/elisp/21.2 bindir=~/bin install System wide (you should be root perhaps): make; make eldir=/usr/local/share/emacs/site-lisp \ bindir=/usr/local/bin install Default $(eldir) and $(bindir) are defined in Makefile as: eldir= $(HOME)/elisp bindir= $(HOME)/bin The "make install" also installs some scripts for accessing cddb database etc., in $(bindir), and does "mkdir $(HOME)/monk-cddb/ -p". To install config file sample for "monk-cddb" script (out of "monk-cddb.sample"), do make install-rc SETUP The Minimum setup (just to use M-x monk RET) in ~/.emacs(.el): (autoload 'monk "monk" nil t) Or optionally, various extra setups are possible. Some mouse/key bindings are not enabled in the simplest setup above. Eg., here is the authour's own configuration actually in ~/.emacs(.el): ;; The `autoload's for various commands (autoload 'monk "monk" nil t) (autoload 'monk-open-new "monk" nil t) (autoload 'monk-other-window "monk" nil t) (autoload 'monk-other-frame "monk" nil t) ;; If your cdda2wav(1) is new one (e.g. from cdrtools-2.0), ;; you must change `monk-cdda2wav-query-command' value: ;; (setq monk-cdda2wav-query-command "cdda2wav -gNJ -v toc") ;; If you need volume control (setq monk-volume-command "aumix") ;; Mouse bindings some more (to HipHop on the mode-line) (add-hook 'monk-load-hook 'monk-use-extra-mouse) ;; Enable M-m (monk-dired-do-monk), and ;; M-C-m (monk-dired-do-monk-find-file) in dired ;; See also "Howto use monk-dired keyboard commands" section ;; in monk.el. (autoload 'monk-dired-bind-extra-keys "monk" nil t) (add-hook 'dired-load-hook 'monk-dired-bind-extra-keys) ;; dired *must* be loaded *after* this. ;; I prefer this for M-m (monk-dired-do-monk) command in `dired' (setq monk-dired-monk-command 'monk-other-window) ;; If you want to use remote cddb server to display track titles ;; when cdda2wav can't generate the track/album titles. ;; See monk-cddb script for detail. (setq monk-use-cddb-server t) ;; To check CD media is in the drive (requires cdparanoia(1)) (setq monk-dont-care-no-CD nil) ;; In order to make the track timer work for MIDI track (setq monk-midi-probe-command "timidity") ;; If menu-bar entry is required from the start (let ((fmenu (or (lookup-key global-map [menu-bar tools]) (lookup-key global-map [menu-bar file])))) (define-key-after fmenu [monk] ;; '("MonK" . monk) ;; This is the same setup in monk.el '("MonK" . monk-open-new) ;; monks may like this 'calendar) (x-popup-menu nil fmenu)) ;; To advance to next MonK buffer by "n" or "p" (setq monk-repeat-buffers t) ;; Use `face' display for current playing track (setq monk-use-face t) ;; Some examples of faces on emacs running as X client ;; (All of these may not available on your emacs): ;; ;; ;; (setq monk-current-track-X-face-prop 'RoyalBlue) ;; (progn ;; (load "cus-edit") ;; ;; (setq monk-current-track-X-face-prop 'custom-invalid-face) ;; (setq monk-current-track-X-face-prop 'custom-set-face) ;; ) ;; You can open mp3, ogg, wav etc. by ordinary emacs command ;; such as C-x C-f, C-x 4 f, f or o (in dired) etc. ;; Even invoking emacs as "emacs ~/mp3/music.mp3" is possible. (require 'monk-fn-handler) ;; This loads up monk. M-x customize RET will never be supported. KEYBOARD USAGE Keys -, 0 - 9, SPC, RET, n, p, f, b, C-k, C-y, C-d, C-/ (C-_, C-x u) etc. all work as you expect. Just play around. C-k, C-y, C-d etc. work by track unit. Copying track is done by w. The keys above do not modify or destroy the relevant multimedia files. C-o opens a new file or directory, and generates a track for it. C-u for C-o temporally toggles the value of `monk-find-file-recursively'. C-c C-o, C-c o, or C-c O opens a new *monk* buffer. Key l is for loop, and M-l for clearing loop. On hitting l while a track is playing, "From where" and "Duration" is asked. These timings can be specified as "3:02", "24", or "750f" (in "mm:ss", second, or `frames') format. Currently, if no track is played l may not work correctly. Mouse version of l is [mode-line C-drag-mouse-2] (see below). L loops the current whole track. C-M-l loops tracks in a region (the tracks in the marked region are played repeatedly). Loop data is cleared automatically by starting a(ny) track, eg. by RET, [mouse-2] etc., or M-l (monk-loop-clear). Keys f, b, and l for jumping and looping do not work for tracks corresponding to a certain type of multimedia object (currently they do not work for midi tracks). Try also C-c C-i, C-c C-e, C-c C-d, d, etc. With these commands you can access to the properties of the current track. With C-c C-e you can edit current `track' property through a buffer with monk-prop-edit-mode. In monk-prop-edit-mode, M-C-i (monk-complete-prop) can be used to complete track property and id3 `Genre' keyword. C-c C-c copies the edited data back into the track in *monk* buffer. The id3 data of an mp3 track can be edited in monk-prop-edit-mode buffer, but the C-c C-c does not save id3 data onto the mp3 file. You should hit C-c I (monk-write-id3-info) explicitly to save them. C-c I (available also in *monk* buffer) is the ONLY dangerous command which modify (or may destroy) the relevant file. C-c C-i is a `read-only' version of C-c C-e. d opens a dired buffer, and jumps to the file corresponding to the current track if it is associated with a file. The relevant file can be copied, moved, deleted etc. via dired. In MonK, no file deletion facility will be provided. C-c C-s generates a playlist ready to save. C-c C-c rebuilds tracks (eg., for incomming mp3 data). C-u C-c C-c removes broken (eg. the relevant mp3 file does not exist anymore) tracks as well. If numeric argument for C-c C-c is smaller than 1, it just removes broken tracks. C-c C-x is equivalent to C-0 C-c C-c (just removes broken tracks). C-u C-c C-x is equivalent to C-u C-c C-c. Tracks can be sorted with commands (not bound to keys): M-x monk-sort-tracks-by-name RET M-x monk-sort-tracks-by-frames RET M-x monk-sort-tracks-by-time RET M-x monk-sort-tracks-by-type RET which accept arg as reverse-sorting flag. Marking/unmarking tracks, and a few operations on the marked tracks are available: m (monk-mark-track) u (monk-unmark-track) t (monk-toggle-mark) M, A (monk-mark-all-tracks) U (monk-unmark-all-tracks) T (monk-toggle-all-marks) M-m, %m (monk-mark-track-regex) M-u (monk-unmark-track-regex) K (monk-kill-marked-tracks) D (monk-remove-marked-tracks) W (monk-copy-marked-tracks) M-L (monk-loop-marked-tracks) Keys v or V swells up or down playing volume if aumix(1) is available. This facility requires the extra setup in SETUP section above. In `dired' buffer, keyboard commands M-m (monk-dired-do-monk) M-C-m (monk-dired-do-monk-find-file) are available if you've done `autoload' and `add-hook' setup for function `monk-dired-bind-extra-keys' in SETUP section above. M-x monk-generate-ripper-script RET generates ripper script for CD audio tracks. Interactive version of MonK-the-ripper will be available soon. For cdaudio track only. ESC G, M-G, M-S-g (monk-goto-track-integer) moves cursor to the track having a track-number property equal to the numeric argument. Total playing time or size of files relevant to MonK tracks can be calculated by: M-x monk-calc-total-time-buffer RET M-x monk-calc-total-time-marked RET M-x monk-calc-total-file-size-buffer RET M-x monk-calc-total-file-size-marked RET These commands might be useful when you are downloading *monk* buffer into analog recorder (or copy files into MO via dired). You may want to set variable `monk-repeat' (defaults t) to nil, and `monk-proc-track-interval'(defaults nil) to 1 or 2 (seconds) on such recordings. C-h m, C-h b, C-h k etc. will help you for further details of the commands. MOUSE USAGE Clicking mouse-2 (or dobule-mouse-1) on a track works as you expect. The mouse-2 commands are also bound under [mode-line] prefix, which means that you can click/drag mode-line with mouse button 2, if included (add-hook 'monk-load-hook 'monk-use-extra-mouse) in your .emacs. In this setup, the mode line represents a metaphor of track's time scale, and click/drag/control-drag of mouse-2 do some navigation on the track. [mode-line mouse-2] makes the playing position jump, and [mode-line drag-mouse-2] does shuttle search. And, you can be a DJ with [mode-line C-drag-mouse-2]. MonK's major-mode-menu is available in [menu-bar], [C-down-mouse-3], or [mode-line down-mouse-3] at (MonK) spot in emacs-21 instead of the silly minor-mode menu. [C-mouse-4] or [C-mouse-5] swells up or down playing volume if aumix(1) is available (requires the extra setup in SETUP section above). From version 7.10, some mouse commands to mark, cut, or paste are added: drag-mouse-1 (monk-mouse-sweep-region) : toggles mark of swept track. double-mouse-3 (monk-kill-marked-tracks) M-mouse-2 (monk-mouse-yank-track) SUPPORTING MODES M-x monk-watch-directory-mode RET turns on/off a minor mode of the same name in *monk* buffer. "DirWatch" will appear in the mode-line after "MonK". If monk-watch-directory-mode is turned on, the default-directory of the *monk* buffer is watched. If a new file readable by MonK is appeared in the directory, MonK loads it as a track, and already existing tracks are rebuilt if the relevant file is updated since the last watch. The mode is conceived to watch ~/mp3/incoming or ~/ripped/ARTIST. The adding-new-file facility can be turned off by setq'ing monk-watch-directory-add-new-file (defaults t) to nil. The value can be toggled or set (via universal or numeric argument) by M-x monk-toggle-watch-directory-add-new-file RET The watch interval can be controlled by a variable monk-watch-directory-interval which defaults 6 (second). Something weird may happen if monk-watch-directory-mode is enabled while a track is playing. In *monk* buffer, revert-buffer-function is set to monk-revert-buffer-function, which is almost compatible to C-c C-c (monk-rebuild-all-tracks) in effect, but rebuilds only tracks updated in the file system. If your emacs has auto-revert-mode, you can use the mode as well instead of monk-watch-directory-mode, but monk-watch-directory-mode works more reliably. Further, monk-revert-buffer-function does not see monk-watch-directory-add-new-file. M-x monk-edit RET in *monk* buffer switches the majour mode into monk-edit-mode, whose key binding is almost the same as that of text-mode except C-c C-c (monk-edit-quit) to return to monk-mode. The monk-edit-mode was conceived to edit the buffer contents when there was no such commands like C-d, C-k etc. and may not be so useful. FINDING MULTIMEDIA FILES monk-fn-handler.el enables emacs to play multimedia files `found' by ordinary emacs commands: C-x C-f (find-file) C-x 4 f (find-file-other-window) C-x 5 f (find-file-other-frame) f (dired-find-file in dired-mode) F (dired-do-find-marked-files in dired-mode) o (find-file-other-window in dired-mode) C-o (dired-display-file in dired-mode) etc. A MonK buffer is set up for each `found' file(s), and automatically played. Even $ emacs ~/mp3/SweetJane.mp3 is possible. Variable `monk-file-handler-auto-start' defaults t in monk-fn-handler.el. This variable shoulde be setq to nil to turn off the auto-start feature. DRAG'N'DROP Drag and Drop from dired buffer is possible without any extra setup in .emacs if dired-dd has been installed. [drag-mouse-2] drops file(s)/directory(s) as tracks, and [C-drag-mouse-2] adds them without removing existing tracks. To drag'n'drop, you should have installed dired-dd package (http://www.asahi-net.or.jp/~pi9s-nnb/dired-dd-home.html). Dired-dd does not work on xemacs. Drag and Drop between two *monk* buffers, or dragging track within a *monk* buffers is not implemented yet. TUNING, BUGS CDDA2WAV(1) In monk.el's default setup, your cdda2wav(1) must run with -e option to play CD audio to send data directly to dsp device. Try $ cdda2wav -N -e -v -t1 -o0 -d0 $ cdda2wav -gNJv34 # your cdda2wav must support -g option before you execute MonK. If your cdda2wav does not work with the command line above, MonK will fail too. For the command line above, You may have to setup environment variable CDDA_DEVICE: export CDDA_DEVICE="0,2,0" # or "/dev/scd0", "/dev/hdb" etc. in your ~/.profile, or setup elisp variable monk-cdda2wav-device correctly. The value of $CDDA_DEVICE is propagated to monk-cdda2wav-device automatically. Some ATAPI cdrom drives are not reliable in linux (both with ide-cd driver, and SCSI emulation). The ATAPI cdrom device should be accessed by DMA mode (eg. /usr/sbin/hdparm -c 1 -d 1 /dev/hdb). Or, you may try (all these examples are tested on linux): (setq monk-post-filter "sox -t .wav - -t ossdsp /dev/dsp") or further (setq monk-player-command "c2w2cdp") (setq monk-post-filter "sox -t .wav - -t ossdsp /dev/dsp") Or `bag' from timidity-tools may work for monk-post-filter: (setq monk-post-filter "bag -t 6M | sox -t .wav - -t ossdsp /dev/dsp") The script "c2w2cdp" should be included in MonK. "c2w2cdp" requires cdparanoia(1). See also REQUIREMENT section above for cdda2wav. MPG123(1) / MPG321(1) mpg123(1) is not always reliable too, and MonK may fail to fire up mpg123 on advancing to next track. On such (or similar) troubles, try to increase the value of variable monk-wait-proc-to-die which defaults 0.1 (second), and may be too short for some hardwares. Due to data probing softwares (mostly mpg123), reading directory may be stopped at unexpected timing, weird (spurious ?) messages may be observed in *Message* buffer. For this problem, MonK has variables named `monk-XXX-readin-wait' whose XXX should be read as the track type name. In case of mp3, monk-mp3-readin-wait is the variable which defaults 0.05 (second). Try increasing it if such troubles are encountered. mpg123 segfaults, seemingly due to wrong id3 info added to mp3 file by some encoder/ripper. If "Probe failed for file xxx" message is appeared in *Message* buffer, try to remove the id3 info (by id3tool / xmms). Further, mpg123 is not so robust as xmms or mpg321(1) for mp3 files with lot of errors, and sometimes you may have to decode the mp3 with xmms "disk writer" output plugin (or mpg321(1) might do), and re-encode the .wav file. mpg123(1) can't report correct track timing "mm:ss" of mp3 files encoded by variable bitrate, and in that case, MonK can't display correct info such as track time, nor jump to desired location. No remedy for this problem except re-encoding the mp3 file to fixed bitrate. Now an mpg123 equivalent `mpg321' is available at http://mpg321.sourceforge.net/. It is very well written to emulate mpg123, and it (v0.2.10) seems to be far better than the original. mpg321 seems to be more bulletproof (on data errors) than mpg123, to be able to display correct track timings even for variable bitrated files. To use mpg321, include (setq monk-mp3-probe-command "mpg321" monk-mp3-probe-options '("-t" "-v" "-n0") ; option order is very significant. monk-mp3-player-command "mpg321" monk-mp3-player-command-options nil monk-mp3-readin-wait 0 ;; In mpg321-0.2.10, and 0.3.0 (from cvs on 10/10/2002), -n option ;; handling is not correct. Must make loop by elisp emulation. ;; monk-emulate-loop-track-type '(mpg mid ogg) ;; default monk-emulate-loop-track-type '(mpg mid ogg mp3) ;; emulated loop ;; monk-mp3-player-duration-opt "-n%d" ;; default monk-mp3-player-duration-opt nil ;; emulated loop ) in your ~/.emacs(.el) instead of mpg123. The first four settings above are mandatory for mpg321: As for mpg321, the order of options "-t" and "-v" in `monk-mp3-probe-options' is very significant, and "-k0" MUST not be included here. As mentioned in the code comment above, current behaviour of mpg321 with "-n" option is not compatible to that of mpg123, so that loop must be created by elisp emulation with the setting above, or apply this patch to mpg321's options.c to make "-n" option compatible to that of mpg123: ==cut== --- options.c.Org Mon Jul 15 12:33:04 2002 +++ options.c Sat Nov 16 11:45:24 2002 @@ -118,7 +118,8 @@ case 'U': case 'd': case 'h': case 'f': case 'b': case 'p': break; case 'n': - options.maxframes = atol(optarg); + /* Rough fix, to make compatible to mpg123 Sat Nov 16 11:41:36 2002, s.n.*/ + options.maxframes = atol(optarg) + options.seek; break; case 'r': break; ==cut== With this patch, you can comment out the above lines designated as `emulated loop'. CAVEAT: In case of MonK, a method to (sym)link mpg321 -> mpg123, and to leave the default setup for mpg123 would not work at all. Above settings are absolutely required. You might have to give '--disable-mpg123-symlink' to `configure' script on compiling mpg321. CDDBCMD(1x) See REQUIREMENT section above, or MonK web page. CODING SYSTEM SETUP If you don't have to deal with file names or id3 data in the coding system that does not match your default language environment settings (see menu-bar entry ..., if such thing is available in your emacs) this section can be skipped. This section is only applied to `Mule' (Multilingual Environment) enabled emacs. Normally in those emacses, latin-1 (e.g.) language environment can be enabled by a menu-bar operation: the id3 info's, or filenames in corresponding the environment can be read, displayed. But you will be encountered with lots of filenames and id3 info described in various encoding different from your Mule setting. MonK has rough coding system fiddling kluge to deal with mp3 files with those file names or id3 info: Variables monk-coding-system, and monk-file-name-coding-system. Eg., if you are JPOP freak and receiving SJIS encoded mp3 filenames and id3 info, but your language environment is 'latin-1 (or even 'japanese, which defaults iso-2022-jp encoding), you may want to set these variables such as: (setq monk-coding-system 'sjis monk-file-name-coding-system 'sjis) ; emacs-20.x, 21.x (setq monk-coding-system *sjis* monk-file-name-coding-system *sjis*) ; mule-2.3 (emacs-19.xx) Or you can use these interactive commands to modify the two variables: M-x monk-set-coding-system RET M-x monk-set-file-name-coding-system RET The values of monk-coding-system, and monk-file-name-coding-system are copied respectively to default-process-coding-system and file-name-coding-system (and to pathname-coding-sytem). See also docstring of the two variables for further details. Normally only setting monk-coding-system is good enough if they should be set to the same value, since monk-coding-system value is copied to monk-file-name-coding-system if monk-file-name-coding-system is left being nil. However, the monk-coding-system, and monk-file-name-coding-system may not be useful for all the situations, and sometimes it may be easier to leave them being nil (their default) and setup system's default-process-coding-system and file-name-coding-system (or pathname-coding-sytem) by hand. Eg., monk-coding-system and monk-file-name-coding-system can't change the behaviour of other elisp package such as dired/dired-dd. So, if you want to drag and drop files and dirs with SJIS filename via dired-dd, it is inevitable to setup system's default-process-coding-system and file-name-coding-system: As for SJIS encoded mp3 file names and id3 info, emacs-20.7 should be setup: (setq file-name-coding-system 'sjis) (setq process-coding-system-alist '(("mpg123" sjis . sjis))) In emacs-19 (mule-2.3), (rumoured): (setq pathname-coding-sytem *sjis*) (setq default-process-coding-system '(*autoconv* . *sjis*unix)) `pathname-coding-sytem' is not available unless the mule is configured with "--mcpath" option. Authour has no such mule, and did not tested the feature at all. So, all the mules may not be able to deal with mp3 files came from SJIS world. M-x monk-describe-coding-system RET reports briefly the values of the relevant coding system variables. Even with all the setups on coding-system, if a multimedia file should be played through non-nil 'post-filter property, a file with a filename including a certain SJIS character can't be played, because emacs should invoke the player command via shell (normally specified by variable `shell-file-name') to create a pipe, and some SJIS character contains a shell meta-character. What a damaged coding system it is. If 'post-filter property for the track is nil (this is the default), you don't worry about the limitation. DOCUMENTATION M-x apropos RET ^monk RET pops up summary of MonK variables and functions. The summary works as hyper text if you are lucky enough (it might depend on emacs version). No `info' crap will be provided forever for this package. C-h m (describe-mode) or C-h b (describe-bindings) in *monk* buffer can be used to the entry point to the hyper text. Othewise print the source and read it. a#g#f#edca#g#f#edca#g#f#edca#g#f#edca#g#f#edca#g#f#edca#g#f#edca#g#f#edc For bleeding hearts, Fri Jan 19 13:41:59 2001 Wed Feb 7 01:11:39 2001 Mon Feb 26 12:53:05 2001 Wed Apr 25 19:15:22 2001 Mon Sep 3 02:31:52 2001 Thu Feb 21 14:27:44 2002 Thu Oct 10 14:08:47 2002 Tue Nov 19 12:45:11 2002 Mon Nov 25 14:05:48 2002 s.n. local variables: mode: indented-text end: