I am on gnu emacs 26.3 linux mint 20.1 and since my last OS update I cannot attach multiple files via dired using the key-binding C-c RET C-a. The message buffer indicates that C-c <return> C-a is undefined. Strangely, the supposedly equivalent C-c C-m C-a does work. Is there any way to debug what is happening? To be clear, I have a message and dired buffers open, I mark some files on dired, and hit C-c RET C-a, but the files do not get attached to the message buffer.

  • C-m is the same as RET, but it is not necessarily the same as <return>. A guess is that C-h k followed by your hitting the Return key shows you <return>. You may have to explicitly add a key binding for that <return> function key in the given mode map.
    – Drew
    Commented Jan 22, 2021 at 23:16
  • If you discover that the problem is in fact a difference between <return> and RET (aka C-m), then consider changing your question title to speak of <return> or "the Return key", and not of RET.
    – Drew
    Commented Jan 22, 2021 at 23:17
  • Output from C-h k + Return key is: RET (translated from <return>) runs the command dired-find-file (found in dired-mode-map), which is an interactive compiled Lisp function in ‘dired.el’. It is bound to RET, e..f, <menu-bar> <immediate> <find-file>.
    – Ajned
    Commented Jan 23, 2021 at 8:46
  • which means that RET and <return> are the same right?
    – Ajned
    Commented Jan 23, 2021 at 8:50
  • They're not the same (logical) key. What it means is that Emacs sees function key <return> when you hit the Return physical key, but since <return> has no key binding Emacs translates to RET and uses the binding for RET. Perhaps (dunno) such translation doesn't happen when RET is used as a prefix key, as in your example: C-c RET C-a. Perhaps (dunno) you need to add a specific binding for that, and define C-c <return> as a prefix key.
    – Drew
    Commented Jan 23, 2021 at 17:08

1 Answer 1


Well...this solution works. The question still lingers though, over why this happened in the first place. Thank you @Drew

(global-set-key (kbd "C-c <return> C-a") 'gnus-dired-attach)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.