That was very informative. In addition to the five tips, I learned about repeat-complex-command (bound to C-x ESC ESC) from this video, which is very useful. Thanks.
10:34 Regular expression searching is done with C-M-s. Tip: if you want to search for entire words, try putting “\b” at the start and end. For example, to search for the identifier “i” in a program, you can avoid matching “i” in the middles of other names with “\bi\b”.
7:24 “C-h a” and enter “sort” to bring up a summary description of all commands with “sort” in their name, instead of trying to guess just based on their names.
For an elisp REPL, there is also ielm built-in for a more convenient experience than the interactive-lisp-mode buffer(s), very useful for bottom up coding.
14:55 If you are testing out Elisp functions in a file, you can directly evaluate them by positioning the cursor just after the closing parenthesis, then typing “C-x C-e”.
S-expressions making your head spin? C-x * q can evaluate normal infix maths notation, and inserts its result into the buffer with a universal argument
Nice examples, thank you ! Especially love rgrep & the like... One other would be dabbrev-expand (and bind it to Tab) : ultra useful generalized completion (should be mandatory in Word imho !)
One of the things I love most about this is learning from everyone here. dabbrev-expand is something I didn't use before and it seems very helpful! By default it is bound to M-/. Thanks for your feedback!
That is the source code for an upcoming volume on The Crusades in Europe. That specific file is a list of cities for a regional map in the region of the Baltic Sea. Here is a link for reference: www.pen-and-sword.co.uk/Warfare-in-the-Age-of-Crusades-Hardback/p/24051
The shortest one is mode-line-other-buffer..How to come back immediately to the previous buffer Example ibuffer..select a buffer...do anything you want....mode-line-other-buffer..go back immediately to ibuffer ;; Back to previous buffer (global-set-key (kbd "") 'mode-line-other-buffer) f12 again to go back to the buffer selected first. There is winner mode also for windows history. I am using ag in place of regrep.
I noticed a .devcontainer directory in your project. How are you using devcontainers with Emacs? Do you use the devcontainer CLI to start the container and use emacs outside of the container? Is your repo cloned to local disk or in the container? If in the container, how does Emacs get at it? I’m just starting to try and figure this out now. I like the idea of devcontainers, and they work well with VScode, but I’m a grey beard and prefer Emacs?
The two best ways I have found are to edit the files locally and then provide a build script to build via docker locally (build.sh) or to launch your container in the cloud and then use ssh or tramp to connect to it. Both methods work fairly well and both have some drawbacks as compared to vscode, which is why I typically also run vscode simultaneously with emacs. A third option which requires a little more setup but also works pretty successfully in a modern environment is to launch a container in a remote cloud instance and then start emacs from within the container using an X11 (ssh -X) tunnel. This would let you use the full power of emacs including interactive debugging, compilation and code editing within the remote container instance.
Yeah! Personally love this one and use it multiple times per editing session. You might even notice me using it in this video, but viewers of this video might also want to learn basic navigation < - > C-SPC before learning one more hot key. I think the *case against* emacs is hotkey soup. People want an understanding of how to build up control from basic chords.
Yes I regretted not mentioning this M-| (meta-pipe) is the hotkey for M-x shell-command-on-region or M-x s-c-o-r. Helpfully, my version of Emacs suggests this keystroke alternation if you actually go to the trouble of typing shell-command-on-region. On the other hand, someone who never encountered this sequence should learn the full command name!
That was very informative. In addition to the five tips, I learned about repeat-complex-command (bound to C-x ESC ESC) from this video, which is very useful. Thanks.
Ditto!
this was a great discovery for me as well.
Same!
10:34 Regular expression searching is done with C-M-s. Tip: if you want to search for entire words, try putting “\b” at the start and end. For example, to search for the identifier “i” in a program, you can avoid matching “i” in the middles of other names with “\bi\b”.
Or isearch-forward-{word,symbol}
See M-s C-h
7:24 “C-h a” and enter “sort” to bring up a summary description of all commands with “sort” in their name, instead of trying to guess just based on their names.
For an elisp REPL, there is also ielm built-in for a more convenient experience than the interactive-lisp-mode buffer(s), very useful for bottom up coding.
Very helpful!
14:55 If you are testing out Elisp functions in a file, you can directly evaluate them by positioning the cursor just after the closing parenthesis, then typing “C-x C-e”.
Or you can just use M-x eval-buffer
@@sofiaknyazeva M-x eval buffer for the whole buffer | C-x C-e for a single lisp expressions.
S-expressions making your head spin? C-x * q can evaluate normal infix maths notation, and inserts its result into the buffer with a universal argument
yeah its a good tip! Like I said in the video, learning lisp will ultimately let you fly further faster though!
Nice examples, thank you ! Especially love rgrep & the like...
One other would be dabbrev-expand (and bind it to Tab) : ultra useful generalized completion (should be mandatory in Word imho !)
One of the things I love most about this is learning from everyone here. dabbrev-expand is something I didn't use before and it seems very helpful! By default it is bound to M-/. Thanks for your feedback!
Nice tips, keep making these videos.
Nice video, thanks for the tips! In your list of cities, I saw my small hometown Landskrona in Sweden 😊 made me curious what that data was for!
That is the source code for an upcoming volume on The Crusades in Europe. That specific file is a list of cities for a regional map in the region of the Baltic Sea. Here is a link for reference: www.pen-and-sword.co.uk/Warfare-in-the-Age-of-Crusades-Hardback/p/24051
@@johnacairns wow, how cool! 🙌 Thanks for sharing!
C-x ESC ESC
Nice! Didn't know about that one.
The shortest one is mode-line-other-buffer..How to come back immediately to the previous buffer
Example
ibuffer..select a buffer...do anything you want....mode-line-other-buffer..go back immediately to ibuffer
;; Back to previous buffer
(global-set-key (kbd "") 'mode-line-other-buffer)
f12 again to go back to the buffer selected first.
There is winner mode also for windows history.
I am using ag in place of regrep.
I noticed a .devcontainer directory in your project. How are you using devcontainers with Emacs? Do you use the devcontainer CLI to start the container and use emacs outside of the container? Is your repo cloned to local disk or in the container? If in the container, how does Emacs get at it? I’m just starting to try and figure this out now. I like the idea of devcontainers, and they work well with VScode, but I’m a grey beard and prefer Emacs?
The two best ways I have found are to edit the files locally and then provide a build script to build via docker locally (build.sh) or to launch your container in the cloud and then use ssh or tramp to connect to it. Both methods work fairly well and both have some drawbacks as compared to vscode, which is why I typically also run vscode simultaneously with emacs.
A third option which requires a little more setup but also works pretty successfully in a modern environment is to launch a container in a remote cloud instance and then start emacs from within the container using an X11 (ssh -X) tunnel. This would let you use the full power of emacs including interactive debugging, compilation and code editing within the remote container instance.
where are these boomers at 😭
graa M-< C-SPC M-> so inefficient
mark-whole-buffer C-x h
Yeah! Personally love this one and use it multiple times per editing session. You might even notice me using it in this video, but viewers of this video might also want to learn basic navigation < - > C-SPC before learning one more hot key. I think the *case against* emacs is hotkey soup. People want an understanding of how to build up control from basic chords.
graa! good to know
Use external programs to filter the buffer contents inline with C-x h C-u M-|
...or :%! in Vim ;)
Yes I regretted not mentioning this M-| (meta-pipe) is the hotkey for M-x shell-command-on-region or M-x s-c-o-r. Helpfully, my version of Emacs suggests this keystroke alternation if you actually go to the trouble of typing shell-command-on-region. On the other hand, someone who never encountered this sequence should learn the full command name!