[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: simple requirement, so simple don't know how to search

From: Tassilo Horn
Subject: Re: simple requirement, so simple don't know how to search
Date: Thu, 28 Jan 2010 15:36:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

Richard Riley <address@hidden> writes:


>> I have a huge codebase and I I visit various files. There are certain points 
>> which I would like "the feature I"m looking for" to remember when I press a 
>> key.   
>> So that I can cycle through them back and forth. This is quite basic so I am 
>> hoping
>> this will already be there.  Someone just tell me that this feature is 
>> there.      
> You might like bm, I have :

You can also put a mark at the various interesting positions in a file
(C-SPC, or C-SPC C-SPC to set the mark but deactivate the region
highlighting), and then use C-u C-SPC to cycle through all marks in that

If set-mark-command-repeat-pop is non-nil, after an intial C-u C-SPC,
any following C-SPC will cycle.  That's very convenient.

,----[ C-h k C-SPC ]
| C-SPC runs the command set-mark-command, which is an interactive compiled Lisp
| function in `simple.el'.
| It is bound to C-@, C-SPC.
| (set-mark-command ARG)
| Set the mark where point is, or jump to the mark.
| Setting the mark also alters the region, which is the text
| between point and mark; this is the closest equivalent in
| Emacs to what some editors call the "selection".
| With no prefix argument, set the mark at point, and push the
| old mark position on local mark ring.  Also push the old mark on
| global mark ring, if the previous mark was set in another buffer.
| When Transient Mark Mode is off, immediately repeating this
| command activates `transient-mark-mode' temporarily.
| With prefix argument (e.g., C-u C-@), jump to the mark, and set the mark from
| position popped off the local mark ring (this does not affect the global
| mark ring).  Use C-x C-@ to jump to a mark popped off the global
| mark ring (see `pop-global-mark').
| If `set-mark-command-repeat-pop' is non-nil, repeating
| the C-@ command with no prefix argument pops the next position
| off the local (or global) mark ring and jumps there.
| With C-u C-u as prefix
| argument, unconditionally set mark where point is, even if
| `set-mark-command-repeat-pop' is non-nil.
| Novice Emacs Lisp programmers often try to use the mark for the wrong
| purposes.  See the documentation of `set-mark' for more information.

Of course, that won't switch to other files.  But emacs has bookmarks,
too.  See

,----[ (info "(emacs)Bookmarks") ]
| "Bookmarks" are somewhat like registers in that they record positions
| you can jump to.  Unlike registers, they have long names, and they
| persist automatically from one Emacs session to the next.  The
| prototypical use of bookmarks is to record "where you were reading" in
| various files.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]