alt-d alt-f etc. stops working in my xterm

Solution 1:

you need

xterm*metaSendsEscape:  true

in your ~/.Xdefaults

xrdb ~/.Xdefaults

Start a new xterm, hopefully that shouldn't have the problem anymore

Solution 2:

add this:

% grep -i escape .Xdefaults 
     xterm*metaSendsEscape: true

(so, tell xterm that your alt key is sending escape)