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.
@shubhampawar79213 жыл бұрын
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 👍
@aehjr13 жыл бұрын
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.
@robertkirby45902 жыл бұрын
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.
@Gglsucksbigballz3 жыл бұрын
You do a stellar job of shepherding N00bs like me towards useable interactions with Emacs. Thanks!
@theears995 Жыл бұрын
Please keep making these videos - they’re SO helpful for an Emacs noob like me!
@Celdorsc22 жыл бұрын
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!!!
@abarocio803 жыл бұрын
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.
@LorenzoMella3 жыл бұрын
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.
@highamnj3 жыл бұрын
Very clear explanations.
@SystemCrafters3 жыл бұрын
Thank you Nick!
@mbarton983 жыл бұрын
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.
@SystemCrafters3 жыл бұрын
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!
@hmelman3 жыл бұрын
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.
@SystemCrafters3 жыл бұрын
Thanks for the tip Howard!
@hmelman3 жыл бұрын
@@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.
@robertkirby45902 жыл бұрын
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.
@azegaspa69183 жыл бұрын
Oh hi, Mark Isnt this "The Room" reference? :D
@SystemCrafters3 жыл бұрын
Yeah :)
@karusster3 жыл бұрын
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.
@SystemCrafters3 жыл бұрын
Thanks for clarifying that! That makes sense, actually, I just got the wrong impression about it when I was testing it originally.
@novimartyn3 жыл бұрын
"Oh hi, Mark" xD
@SystemCrafters3 жыл бұрын
You are the first to get that reference so far ;)
@AndersJackson3 жыл бұрын
^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.
@juliuskiesian2 жыл бұрын
How do you jump forward in the mark ring?
@auntiecarol3 жыл бұрын
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)
@SystemCrafters3 жыл бұрын
lol, I'm glad you told me! I'll keep an eye out for it
@richardfrangie35182 жыл бұрын
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...
@mgorn2 жыл бұрын
Hi. New to this channel. Did you do more episodes in this series? Cheers.
@haiteng613 жыл бұрын
Question: how do you unhide org emphasis markers when put cursor on it?