While trying to edit an awk file with emacs 28.2 its not self-inserting all charcaters, but trying to evaluate certain keystrokes! For example if I press 3
emacs sees C-u 3-
! Pressing a
causes it to query me for Cscope Initial Directory
! Clearly some mode has been enabled that I didn't ask for and don't want!
Looking at modes (C-h m
) I see:
Enabled minor modes: Abbrev Auto-Composition Auto-Compression
Auto-Encryption Blink-Cursor Column-Number Cscope
Display-Fill-Column-Indicator Electric-Indent Engine File-Name-Shadow
Font-Lock Global-Auto-Revert Global-Edit-Server-Edit Global-Eldoc
Global-Font-Lock Global-Undo-Tree Hs Indent-Tabs Line-Number
Mac-Mouse-Wheel Menu-Bar Override-Global Ruler Shell-Dirtrack
Show-Paren Tooltip Transient-Mark Undo-Tree Which-Function Winner
(Information about these minor modes follows the major mode info.)
AWK//l mode defined in ‘cc-mode.el’:
Major mode for editing AWK code.
To submit a problem report, enter ‘M-x c-submit-bug-report’ from an
‘awk-mode’ buffer. This automatically sets up a mail buffer with version
information already added. You just need to add a description of the
problem, including a reproducible test case, and send the message.
But what enabled AWK//l
mode? It's not in auto-mode-alist!
For the moment my workaround is to use find-file-literally
.
M-x c-submit-bug-report
is also failing - possibly I need to update org-mode - TBC.
c-submit-bug-report
? As forautto-mode-alist
, it has an entry forawk
that invokedawk-mode
: why it shows up asAWK//l
on the mode line I cannot guess, but I'm pretty sure it's the same mode. BTW, that's a major mode. OTOH, you probably don't need all the minor modes that are enabled. Start withM-x cscope-mode
which should toggle it off (check withC-h m
again) and restorea
to sanity. I'm not sure who would be responsible for the3
insanity. If worse comes to worst, turn them all off one by one and see which one is the culprit. – NickD Jun 17 '23 at 00:24awk-mode
that does crazy things with the keys: when I openfoo.awk
it is inawk-mode
(which showsAWK//l
on the modeline), but both3
anda
are inserted into the buffer. It has to be one of the minor modes that are enabled on that buffer. – NickD Jun 17 '23 at 00:31cscope-mode
interactive function. UsingM-x cscope-minor-mode
says that it turns that off but the digit keys are still assigned, as reported byC-h k 3
: "3 runs the command digit-argument (found in cscope-list-entry-keymap)". I recall updating https://github.com/dkogan/xcscope.el recently, I shall take a look at that. – alls0rts Jul 04 '23 at 05:41