* C-c C-, in a terminal? @ 2021-12-28 8:25 Anssi Saari 2021-12-28 11:10 ` Vincent Breton ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Anssi Saari @ 2021-12-28 8:25 UTC (permalink / raw) To: emacs-orgmode Hi all, while it's not an ORG mode question exactly, I have a problem with org-insert-structure-template and it's default shortcut, C-c C-, in terminals. As C-, isn't usually a control character in a terminal, terminals send just the comma if I hit C-,. Some terminals (at least wsltty) do send some kind of control sequence but I don't know if mapping other terminals to do the same (Konsole and urxvt at least) and changing the keys for Emacs makes sense. I'd have to do it for every terminal I ever use. Alternatively, any suggestions for a more terminal friendly key combination for org-insert-structure-template in Emacs? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: C-c C-, in a terminal? 2021-12-28 8:25 C-c C-, in a terminal? Anssi Saari @ 2021-12-28 11:10 ` Vincent Breton 2021-12-28 23:58 ` Tim Cross 2021-12-29 16:48 ` Max Nikulin 2 siblings, 0 replies; 5+ messages in thread From: Vincent Breton @ 2021-12-28 11:10 UTC (permalink / raw) To: emacs-orgmode Hi Anssi Saari, In my opinion, your first section is about org but reading others it seams to be a question about terminals so I think your message is one about setup of terminals or about remote protocols. Your question stay interesting because that means some people use org-mode with terminals and have some troubles with them, another large subject but not a (directly) orgmode subject. For example, I use regularly remote systems and terminals (or intermediary parts) are not very friendly with my IDE... They are very famous (standard) terminals as the VT100 -- on Windows putty software emulate it -- On Linux, some software as vttest can hep you to test the compatibility of your terminals but that interesting subject stay far away of orgmode. You can for example read https://www.emacswiki.org/emacs/EmacsOnTerminal. Here a very simple figure (ok, vulgarisation is not probably the true 8) terminal -> emacs -> orgmode terminal -> ssh (for example) -> emacs -> orgmode Sure if your trouble is about orgmode or between emacs and orgmode your question fullfill this list and my reply too 8). Best regards On 28/12/2021 09:25, Anssi Saari wrote: > Hi all, while it's not an ORG mode question exactly, I have a problem > with org-insert-structure-template and it's default shortcut, C-c C-, in > terminals. > > As C-, isn't usually a control character in a terminal, terminals send > just the comma if I hit C-,. Some terminals (at least wsltty) do send > some kind of control sequence but I don't know if mapping other > terminals to do the same (Konsole and urxvt at least) and changing the > keys for Emacs makes sense. I'd have to do it for every terminal I ever > use. > > Alternatively, any suggestions for a more terminal friendly key > combination for org-insert-structure-template in Emacs? > > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: C-c C-, in a terminal? 2021-12-28 8:25 C-c C-, in a terminal? Anssi Saari 2021-12-28 11:10 ` Vincent Breton @ 2021-12-28 23:58 ` Tim Cross 2021-12-29 6:24 ` Samuel Banya 2021-12-29 16:48 ` Max Nikulin 2 siblings, 1 reply; 5+ messages in thread From: Tim Cross @ 2021-12-28 23:58 UTC (permalink / raw) To: emacs-orgmode Anssi Saari <as@sci.fi> writes: > Hi all, while it's not an ORG mode question exactly, I have a problem > with org-insert-structure-template and it's default shortcut, C-c C-, in > terminals. > > As C-, isn't usually a control character in a terminal, terminals send > just the comma if I hit C-,. Some terminals (at least wsltty) do send > some kind of control sequence but I don't know if mapping other > terminals to do the same (Konsole and urxvt at least) and changing the > keys for Emacs makes sense. I'd have to do it for every terminal I ever > use. > > Alternatively, any suggestions for a more terminal friendly key > combination for org-insert-structure-template in Emacs? It is almost impossible to suggest an alternative key binding because there are just too many variables involved. What you can use will depend on what window manager you use and the key shortcuts it uses (which will 'steal' keys before Emacs get to see them) and on the terminal emulator and the remote access protocol (i.e. ssh, telnet, tmux, screen etc) you use. Then there is differences depending on what Emacs packages you are using and what (if any) key bindings you have already defined and whether they are global or local definitions etc. My suggestion would be to use something like the free-keys (available in melpa) package to identify what key bindings are available when in an org buffer and select one of those. It may also be worthwhile considering using something like hydra. You could define an org specific hydra and associate all your preferred bindings to that hydra. Org can be particularly challenging because it already has some complex key bindings, so avoiding unexpected side effects when adding/changing bindings can be a challenge. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: C-c C-, in a terminal? 2021-12-28 23:58 ` Tim Cross @ 2021-12-29 6:24 ` Samuel Banya 0 siblings, 0 replies; 5+ messages in thread From: Samuel Banya @ 2021-12-29 6:24 UTC (permalink / raw) To: Charles Berry [-- Attachment #1: Type: text/plain, Size: 3417 bytes --] Hey Annsi, Awesome reply, just was lurking in this thread, and wanted to actually provide a link to what you mentioned since it looks like a cool package I might even want to try as well: - https://melpa.org/#/free-keys Reason being is that I actually wanted to explore running Emacs in purely a terminal setup since I actually don't use images that much compared to most people. I know there are benefits to maybe inserting screenshots in notes, or viewing images via 'eww' but I don't really actually need it for my workflow, so running Emacs in 'xterm' or even something as heavy as Cool Retro Term sounds mega fun. Anyway, didn't know about that package above, thanks for mentioning that one! I also agree though that the exact replacement for the default keybinding is a hard topic. I'm not sure if this helps, but I'm including a bunch of links I was able to research on this topic just in case this helps you out: - https://aliquote.org/post/emacs-in-terminal/ - https://x86blog.com/emacs-an-ide-for-the-terminal/ - https://www.quora.com/Whats-the-best-way-to-use-Emacs-as-a-GUI-application-or-running-in-the-terminal?share=1 - https://www.linuxquestions.org/questions/linux-software-2/emacs-in-a-terminal-problems-with-ctrl-815964/ - https://github.com/purcell/exec-path-from-shell Not sure if this totally relates, but since you're trying to use your terminal as an all-in-one, you might even want to check out 'Twin' as well since it can act as a Desktop Environment: - https://github.com/cosmos72/twin Sincerely, Sam On Tue, Dec 28, 2021, at 6:58 PM, Tim Cross wrote: > > Anssi Saari <as@sci.fi> writes: > > > Hi all, while it's not an ORG mode question exactly, I have a problem > > with org-insert-structure-template and it's default shortcut, C-c C-, in > > terminals. > > > > As C-, isn't usually a control character in a terminal, terminals send > > just the comma if I hit C-,. Some terminals (at least wsltty) do send > > some kind of control sequence but I don't know if mapping other > > terminals to do the same (Konsole and urxvt at least) and changing the > > keys for Emacs makes sense. I'd have to do it for every terminal I ever > > use. > > > > Alternatively, any suggestions for a more terminal friendly key > > combination for org-insert-structure-template in Emacs? > > It is almost impossible to suggest an alternative key binding because > there are just too many variables involved. What you can use will depend > on what window manager you use and the key shortcuts it uses (which will > 'steal' keys before Emacs get to see them) and on the terminal emulator > and the remote access protocol (i.e. ssh, telnet, tmux, screen etc) you > use. Then there is differences depending on what Emacs packages you are > using and what (if any) key bindings you have already defined and > whether they are global or local definitions etc. > > My suggestion would be to use something like the free-keys (available in > melpa) package to identify what key bindings are available when in an > org buffer and select one of those. It may also be worthwhile > considering using something like hydra. You could define an org specific > hydra and associate all your preferred bindings to that hydra. Org can > be particularly challenging because it already has some complex key > bindings, so avoiding unexpected side effects when adding/changing > bindings can be a challenge. > > > [-- Attachment #2: Type: text/html, Size: 5055 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: C-c C-, in a terminal? 2021-12-28 8:25 C-c C-, in a terminal? Anssi Saari 2021-12-28 11:10 ` Vincent Breton 2021-12-28 23:58 ` Tim Cross @ 2021-12-29 16:48 ` Max Nikulin 2 siblings, 0 replies; 5+ messages in thread From: Max Nikulin @ 2021-12-29 16:48 UTC (permalink / raw) To: emacs-orgmode On 28/12/2021 15:25, Anssi Saari wrote: > > As C-, isn't usually a control character in a terminal, terminals send > just the comma if I hit C-,. Some terminals (at least wsltty) do send > some kind of control sequence but I don't know if mapping other > terminals to do the same (Konsole and urxvt at least) and changing the > keys for Emacs makes sense. I'd have to do it for every terminal I ever > use. I have never tried recipes that deals with features of modern terminal emulators. > Alternatively, any suggestions for a more terminal friendly key > combination for org-insert-structure-template in Emacs? You may try old method (require 'org-tempo) < s TAB instead. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-29 16:48 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-12-28 8:25 C-c C-, in a terminal? Anssi Saari 2021-12-28 11:10 ` Vincent Breton 2021-12-28 23:58 ` Tim Cross 2021-12-29 6:24 ` Samuel Banya 2021-12-29 16:48 ` Max Nikulin
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).