Can I set the field seperator(s) for the current buffer in Emacs 23?
Sure -- although, by default, you can only do so globally. To do so, customize the variable
M-x customize-variable RET csv-separators RET) and add the separator characters of your choice to the list. (See
C-h v csv-separators RET/
M-x describe-variable RET csv-separators RET for documentation on the variable, including some caveats worth knowing if you're going to change its value.)
If you really need to apply the change only to a given buffer, you can try making the variable buffer-local by means of
M-: (make-local-variable 'csv-separators) RET), then setting the value for the current buffer directly (e.g.
M-: (setq csv-separators (append '(":") csv-separators))). Be warned, though: I haven't tried this, and don't know whether or not it will work.
This expands on the accepted answer. I would have commented there, but need >50 rep for that. I just found this and the
make-local-variable approach did not work for me. I found the variable
csv-separator-chars and its doc says
Set by customizing ‘csv-separators’ -- do not set directly!
csv-separators worked for me as this also set the
csv-separator-chars which seems to be the one really used when aligning CSVs.