No video

Efficient Text Selection with Emacs Key Bindings - Emacs Essentials #3

  Рет қаралды 13,655

System Crafters

System Crafters

Күн бұрын

Пікірлер: 33
@Lea_D.
@Lea_D. 3 жыл бұрын
Another very useful thing is that emacs also has a ring for remembering the last whatever number or things you have cut or copied with C-w and M-w. So when you use C-y to yank (paste), you get the most recent chunk of text, but then you can keep pressing M-y to cycle through all the other recent chunks of text in the ring.
@shubhampawar7921
@shubhampawar7921 3 жыл бұрын
Your videos have really convinced me to switch to emacs. Once my exams are over, I'll go all evil mode. More on the lisp series though 👍
@aehjr1
@aehjr1 3 жыл бұрын
From the Emacs manual: "Each time you set a mark, this is recorded in the global mark ring in addition to the current buffer’s own mark ring, if you have switched buffers since the previous mark setting. Hence, the global mark ring records a sequence of buffers that you have been in, and, for each buffer, a place where you set the mark. The length of the global mark ring is controlled by global-mark-ring-max, and is 16 by default." The key phrase, I believe, is "if you have switched buffers since the previous mark setting." So, setting a mark in buffer A will set in global-mark-ring, switching to buffer B and setting mark will also record in global-mark-ring, but setting a second mark in buffer B will NOT set the second mark in the global-mark-ring as you haven't switched buffers. (It will of course, record the mark in the buffer B mark-ring. I wish you had mentioned registers in this video though, as they can be more useful than marks, IMO. Basically the same as Vim's named registers, they can store text, position, rectangles, numbers, etc. It can be complicated, but if you know you want to temporarily store 2-5 positions in a file and jump between them, registers are more direct than the mark-ring as you don't have to cycle thru them. More than 2-5 though is a little cumbersome.
@robertkirby4590
@robertkirby4590 2 жыл бұрын
Excellent comment! I recently spotted registers in the manual and was wondering if they are widely used, as they seem like a great idea. In addition to what you wrote, registers struck me as a way of imitating vim tabs, since you can save window arrangements to a registers and flick between them easily.
@Gglsucksbigballz
@Gglsucksbigballz 3 жыл бұрын
You do a stellar job of shepherding N00bs like me towards useable interactions with Emacs. Thanks!
@theears995
@theears995 Жыл бұрын
Please keep making these videos - they’re SO helpful for an Emacs noob like me!
@Celdorsc2
@Celdorsc2 2 жыл бұрын
Thanks for the video. I usually prefer to read then watch but you explain so many things, which are note straight forward. BTW, while querying for the mark ring, I came across an another useful feature called "registers". It's also very useful because I can store a position, a number, a region etc. Particularly, if I store a position in a buffer using "C-x r SPC ", where key is a,b, or r, I can come jump to such position (including jumping to a buffer) by pressing "C-x r j ". It's even better! When a buffer with the stored position was associated with a file, the file was closed, and I claim the stored position, Emacs is going to ask to re-visit the file meaning it will re-open a file and jump to the position. AMAZING!!!
@abarocio80
@abarocio80 3 жыл бұрын
In emacs, the page break mark is ^L (binary), as I understand. It is used in info pages and other documents. To mark page, you need to have that byte in the file, otherwise it will continue to the end of the file, and to the start of the file.
@LorenzoMella
@LorenzoMella 3 жыл бұрын
Which you can also visualise as actual horizontal lines with page-break-line-mode (or similar name). I don’t remember if it is distributed with vanilla Emacs, but it definitely exists.
@highamnj
@highamnj 3 жыл бұрын
Very clear explanations.
@SystemCrafters
@SystemCrafters 3 жыл бұрын
Thank you Nick!
@mbarton98
@mbarton98 3 жыл бұрын
I like how you did not mention transient mark mode, which is on by default since Emacs 23. I always found it confusing and questioned if I should change the default. I appreciate just the simple approach to how to use the mark ring with the default settings. I like this for a quick getting back to where I was and use bookmarks for specific positions I use on a regular basis such as dired buffers, org clock table, cheat sheet, etc.
@SystemCrafters
@SystemCrafters 3 жыл бұрын
Thanks! Yeah, I left out both rectangle selections and transient mark mode because I didn't want to complicate things. Bookmarks are definitely good for more persistent storage of locations, I'll be covering that at some point in this series!
@hmelman
@hmelman 3 жыл бұрын
The sexp and defun command work in more than just emacs lisp buffers. Most programming modes (and some others) define what those represent. mark-defun usually marks a function or method any programming language and mark-sexp usually an expression. Also C-M-SPC is also mark-sexp.
@SystemCrafters
@SystemCrafters 3 жыл бұрын
Thanks for the tip Howard!
@hmelman
@hmelman 3 жыл бұрын
@@SystemCrafters I should have said I thought this video was great. Really good pace, lots of content, and very clear. I can understand leaving out transient-mark-mode for simplicity, but since it's on by default I think it probably deserves at least a quick mention, even as a "see also" or "we'll cover in the future". Also worth a quick "see also" mention is the third party package expand-region which provides one command and if you repeatedly invoke it, expands the region to the next larger unit (customizable). E.g., invoking it once marks a word, and second time expands that to an sexp then to a defun, etc. It can be easier since it's just one key binding to remember.
@robertkirby4590
@robertkirby4590 2 жыл бұрын
Your idea of C-space as an evil mode leader key is really intriguing to me. I wonder if there are any trade-offs I should bear in mind? I'm currently a Vim user but looking to hop across to emacs, and I use space as the leader key in Vim. I'm using vanilla Emacs for now without Evil to make sure I understand what's going on. I'm concerned that I might miss useful functionality in Emacs if I shoe horn in a Vim way of doing things.
@azegaspa6918
@azegaspa6918 3 жыл бұрын
Oh hi, Mark Isnt this "The Room" reference? :D
@SystemCrafters
@SystemCrafters 3 жыл бұрын
Yeah :)
@karusster
@karusster 3 жыл бұрын
The global mark ring can hold multiple marks for buffers but if you create two in sequence in the same buffer the second one will replace the first, I believe.
@SystemCrafters
@SystemCrafters 3 жыл бұрын
Thanks for clarifying that! That makes sense, actually, I just got the wrong impression about it when I was testing it originally.
@novimartyn
@novimartyn 3 жыл бұрын
"Oh hi, Mark" xD
@SystemCrafters
@SystemCrafters 3 жыл бұрын
You are the first to get that reference so far ;)
@AndersJackson
@AndersJackson 3 жыл бұрын
^L mark a new page. Isn't C-x C-SPC just changing files, and then you use C-u C-SPC for going among the local mark ring. C-x C-x exchange place of cursor and mark.
@juliuskiesian
@juliuskiesian 2 жыл бұрын
How do you jump forward in the mark ring?
@auntiecarol
@auntiecarol 3 жыл бұрын
You asked for things to potentially cover for newcomers: Perhaps buffer/file/window switching and the packages that can help with that (dark hole, I know). (while I'm here; your 09:-ish PST livestream timing is awesome for folk in the EU and IND. Please be aware, though, that for the next few weeks you are bang in the middle of the IPL [the cricketing term, not the mainframe booting process 😄]. Check your visit stats and see if it has any effect)
@SystemCrafters
@SystemCrafters 3 жыл бұрын
lol, I'm glad you told me! I'll keep an eye out for it
@richardfrangie3518
@richardfrangie3518 2 жыл бұрын
I've seen the three videos in this playlist and didn't see you explain this type of command "C-u 7 command" or the equivalent "M 7 command", why didn't you explain it? It's not used much? Which playlist can I go on after this? thanks...
@mgorn
@mgorn 2 жыл бұрын
Hi. New to this channel. Did you do more episodes in this series? Cheers.
@haiteng61
@haiteng61 3 жыл бұрын
Question: how do you unhide org emphasis markers when put cursor on it?
@SystemCrafters
@SystemCrafters 3 жыл бұрын
Check out the package called org-appear
@haiteng61
@haiteng61 3 жыл бұрын
@@SystemCrafters works like a charm!
@philtoa334
@philtoa334 3 жыл бұрын
thx.
straight.el: Advanced Emacs Package Management
42:48
System Crafters
Рет қаралды 13 М.
Emacs: mark and register basics
35:34
Protesilaos Stavrou
Рет қаралды 6 М.
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 13 МЛН
Nurse's Mission: Bringing Joy to Young Lives #shorts
00:17
Fabiosa Stories
Рет қаралды 3,1 МЛН
Joker can't swim!#joker #shorts
00:46
Untitled Joker
Рет қаралды 40 МЛН
Declutter Your Buffer Lists in Emacs with Perspective.el
28:31
System Crafters
Рет қаралды 16 М.
9 Techniques to Boost Your Git Workflow with Magit
56:39
System Crafters
Рет қаралды 19 М.
Doom Emacs or Spacemacs?  Use both with Chemacs2!
25:37
System Crafters
Рет қаралды 17 М.
The Text Editor Tier List (Open Source Editors ONLY!)
23:19
DistroTube
Рет қаралды 86 М.
Getting Started with Org Roam - Build a Second Brain in Emacs
34:19
System Crafters
Рет қаралды 145 М.
My Haskell Setup
12:17
Tsoding
Рет қаралды 52 М.
Interview with an Emacs Enthusiast in 2023 [Colorized]
8:50
Programmers are also human
Рет қаралды 1,2 МЛН
Emacs: file and Dired basics
1:02:38
Protesilaos Stavrou
Рет қаралды 13 М.
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 13 МЛН