reddit / emacs

Question about saving file

Financial-Bet2253 · 2022-11-20 03:53
Normally, I save file with `C-x C-s` and everything is ok. But somehow, I open a python file(maybe there's nothing to do with python file type), when I typed `C-x C-s`, it always asked me: > Really proceed with writing? (yes or no). It's really annoying. Help wanted.
andyjda · 2022-11-20 04:55
When you have a Python file open, do M-x describe-key and then type C-x C-s I suspect you’ll see that the key binding has been redefined and connected to a different function. You should try to find out if this happens in your python mode or somewhere else, and undo it.
Financial-Bet2253 · 2022-11-20 04:57
> C-x C-s runs the command save-buffer (found in global-map), which is an interactive native-compiled Lisp function in ‘files.el’. emmm, strange.
andyjda · 2022-11-20 04:59
When you press C-x C-s, you still get the weird message you mentioned above? Maybe save-buffer has some additional advice functions that trigger the message, does the Help buffer mention that?
funk443 · 2022-11-20 05:11
Maybe a package is causing this?
Alan_Shutko · 2022-11-20 23:17
Do you also see a mention of file-coding-system? Emacs uses that language when the coding-system can’t encode all the characters.
Financial-Bet2253 · 2022-11-21 01:31
I guess you're right