* simple requirement, so simple don't know how to search @ 2010-01-28 12:39 Maindoor 2010-01-28 12:50 ` Mario Domenech Goulart 2010-01-28 13:22 ` Richard Riley 0 siblings, 2 replies; 24+ messages in thread From: Maindoor @ 2010-01-28 12:39 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 364 bytes --] Hi, 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. Regards, Maindoor. [-- Attachment #2: Type: text/html, Size: 500 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-01-28 12:39 simple requirement, so simple don't know how to search Maindoor @ 2010-01-28 12:50 ` Mario Domenech Goulart 2010-02-01 5:47 ` Maindoor 2010-01-28 13:22 ` Richard Riley 1 sibling, 1 reply; 24+ messages in thread From: Mario Domenech Goulart @ 2010-01-28 12:50 UTC (permalink / raw) To: Maindoor; +Cc: help-gnu-emacs Hi On Thu, 28 Jan 2010 04:39:53 -0800 (PST) Maindoor <sanjeevfiles@yahoo.com> wrote: > 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. Maybe you are looking for Emacs registers: http://www.gnu.org/software/emacs/manual/html_node/emacs/RegPos.html#RegPos Best wishes. Mario ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-01-28 12:50 ` Mario Domenech Goulart @ 2010-02-01 5:47 ` Maindoor 2010-02-01 15:22 ` Drew Adams 0 siblings, 1 reply; 24+ messages in thread From: Maindoor @ 2010-02-01 5:47 UTC (permalink / raw) To: Mario Domenech Goulart; +Cc: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 1394 bytes --] Hi, Thanks for the info, but registers limit the marked entries and I will not be able to cycle through them. So that is out of the question. After looking around I found thing-cmds.el . The description looks good but I need to try it out. I'm looking for something like: press F2 -> put the current position where cursor is in a list with limit of 20 entries. press F3 -> go forward in the list. press F4 -> go backward in the list. Regards, Maindoor. --- On Thu, 1/28/10, Mario Domenech Goulart <mario.goulart@gmail.com> wrote: From: Mario Domenech Goulart <mario.goulart@gmail.com> Subject: Re: simple requirement, so simple don't know how to search To: "Maindoor" <sanjeevfiles@yahoo.com> Cc: help-gnu-emacs@gnu.org Date: Thursday, January 28, 2010, 6:20 PM Hi On Thu, 28 Jan 2010 04:39:53 -0800 (PST) Maindoor <sanjeevfiles@yahoo.com> wrote: > 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. Maybe you are looking for Emacs registers: http://www.gnu.org/software/emacs/manual/html_node/emacs/RegPos.html#RegPos Best wishes. Mario [-- Attachment #2: Type: text/html, Size: 2084 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* RE: simple requirement, so simple don't know how to search 2010-02-01 5:47 ` Maindoor @ 2010-02-01 15:22 ` Drew Adams 2010-02-02 8:35 ` Maindoor 0 siblings, 1 reply; 24+ messages in thread From: Drew Adams @ 2010-02-01 15:22 UTC (permalink / raw) To: 'Maindoor', 'Mario Domenech Goulart'; +Cc: help-gnu-emacs Thanks for the info, but registers limit the marked entries and I will not be able to cycle through them. So that is out of the question. After looking around I found thing-cmds.el . The description looks good but I need to try it out. I'm looking for something like: press F2 -> put the current position where cursor is in a list with limit of 20 entries. press F3 -> go forward in the list. press F4 -> go backward in the list. I wrote thing-cmds.el. Dunno if it will help you here - it's not clear to me what you really want to do. I thought previously that what you wanted was essentially bookmarks. Now you say you just want to move through a list, that is, move forward a sexp (list element) at a time. For that you can use `C-M-f', `C-M-b', and so on. What you mean by your description of F2 is also unclear to me. People's replies to you have been all over the map, which is an indication that maybe your requirement isn't well specified. ;-) Most replies take the need to be to bounce around among predefined positions. Hence people have suggested marks (and global marks), registers, and bookmarks, all of which let you do that. ^ permalink raw reply [flat|nested] 24+ messages in thread
* RE: simple requirement, so simple don't know how to search 2010-02-01 15:22 ` Drew Adams @ 2010-02-02 8:35 ` Maindoor 2010-02-02 12:24 ` Richard Riley ` (2 more replies) 0 siblings, 3 replies; 24+ messages in thread From: Maindoor @ 2010-02-02 8:35 UTC (permalink / raw) To: 'Mario Domenech Goulart', Drew Adams; +Cc: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 2727 bytes --] Sorry, I'll be more verbose on my requirements this time. and looking at your contributions to emacswiki, I can safely assume that such a thing does not exist if you don't know the answer. When browsing file1.c i come to 400th line in function fnA(). I want to remember this particular line. so I press F2. Then I goto file2.c, look and I don't want to do anything. Then I go to file3.c, and visit line 50 in fnB(). I want to remember this, so I press F2. and so on. Now I want to browse through the marked places so I press F3 and F4 to go back and forth in the list that I marked. The list now contains two entries 400th line in FnA() and 50 the line in FnB(). I can also limit the total number of entries in the list say to 20 or 50. So at most I will be able to remember 20 or 50 places after which the oldest entries will be overwritten. Now registers and bookmarks will have tags associated with them and I don't want to use tags. I just want to browse through the remembered entries. Will things-cmd.el serve the purpose ? or is there some other utility ? Thanks for taking the time to reply. Maindoor. --- On Mon, 2/1/10, Drew Adams <drew.adams@oracle.com> wrote: From: Drew Adams <drew.adams@oracle.com> Subject: RE: simple requirement, so simple don't know how to search To: "'Maindoor'" <sanjeevfiles@yahoo.com>, "'Mario Domenech Goulart'" <mario.goulart@gmail.com> Cc: help-gnu-emacs@gnu.org Date: Monday, February 1, 2010, 8:52 PM Thanks for the info, but registers limit the marked entries and I will not be able to cycle through them. So that is out of the question. After looking around I found thing-cmds.el . The description looks good but I need to try it out. I'm looking for something like: press F2 -> put the current position where cursor is in a list with limit of 20 entries. press F3 -> go forward in the list. press F4 -> go backward in the list. I wrote thing-cmds.el. Dunno if it will help you here - it's not clear to me what you really want to do. I thought previously that what you wanted was essentially bookmarks. Now you say you just want to move through a list, that is, move forward a sexp (list element) at a time. For that you can use `C-M-f', `C-M-b', and so on. What you mean by your description of F2 is also unclear to me. People's replies to you have been all over the map, which is an indication that maybe your requirement isn't well specified. ;-) Most replies take the need to be to bounce around among predefined positions. Hence people have suggested marks (and global marks), registers, and bookmarks, all of which let you do that. [-- Attachment #2: Type: text/html, Size: 3333 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-02-02 8:35 ` Maindoor @ 2010-02-02 12:24 ` Richard Riley 2010-02-02 15:50 ` Drew Adams [not found] ` <mailman.589.1265113565.14305.help-gnu-emacs@gnu.org> 2 siblings, 0 replies; 24+ messages in thread From: Richard Riley @ 2010-02-02 12:24 UTC (permalink / raw) To: help-gnu-emacs Maindoor <sanjeevfiles@yahoo.com> writes: > When browsing file1.c i come to 400th line in function fnA(). I want to remember > this particular line. so I press F2. Then I goto file2.c, look and I don't want to do anything. Then I go to file3.c, and visit line 50 in > fnB(). I want to remember this, so I press F2. and so on. > Now I want to browse through the marked places so I press F3 and F4 to go back > and forth in the list that I marked. The list now contains two entries 400th line in > FnA() and 50 the line in FnB(). > I can also limit the total number of entries in the list say to 20 or 50. So at most I will > be able to remember 20 or 50 places after which the oldest entries will be > overwritten. > Now registers and bookmarks will have tags associated with them and I don't > want to use tags. I just want to browse through the remembered entries. > > Will things-cmd.el serve the purpose ? or is there some other utility > ? I am pretty sure that *almost* exactly what you want is what I posted before. Find bm-toggle. ,---- | (autoload 'bm-toggle "bm" "Toggle bookmark in current buffer." t) | (autoload 'bm-next "bm" "Goto bookmark." t) | (autoload 'bm-previous "bm" "Goto previous bookmark." t) | (global-set-key (kbd "<f8>") 'bm-next) | (global-set-key (kbd "<M-f8>") 'bm-previous) | (global-set-key (kbd "<C-f8>") 'bm-toggle) `---- I dont think there is a 20 or 50 maximum however. ^ permalink raw reply [flat|nested] 24+ messages in thread
* RE: simple requirement, so simple don't know how to search 2010-02-02 8:35 ` Maindoor 2010-02-02 12:24 ` Richard Riley @ 2010-02-02 15:50 ` Drew Adams 2010-02-03 4:50 ` Maindoor [not found] ` <mailman.589.1265113565.14305.help-gnu-emacs@gnu.org> 2 siblings, 1 reply; 24+ messages in thread From: Drew Adams @ 2010-02-02 15:50 UTC (permalink / raw) To: 'Maindoor', 'Mario Domenech Goulart'; +Cc: help-gnu-emacs > Sorry, I'll be more verbose on my requirements this time. and looking at your > contributions to emacswiki, I can safely assume that such a thing does not exist > if you don't know the answer. Bad assumption - I'm not as knowledgable as you suppose. And it's not about being verbose. It's about making clear what you're looking for. Current session only? Multiple buffers? Multiple positions per buffer? Visual markings? Named positions? The possibilities depend on the answers. > When browsing file1.c i come to 400th line in function fnA(). I want to remember > this particular line. so I press F2. Then I goto file2.c, look and I don't > want to do anything. Then I go to file3.c, and visit line 50 in fnB(). I want > to remember this, so I press F2. and so on. > Now I want to browse through the marked places so I press F3 and F4 to go back > and forth in the list that I marked. The list now contains two entries 400th line in > FnA() and 50 the line in FnB(). > I can also limit the total number of entries in the list say to 20 or 50. > So at most I will be able to remember 20 or 50 places after which the oldest > entries will be overwritten. > Now registers and bookmarks will have tags associated with them and I don't > want to use tags. I just want to browse through the remembered entries. > > Will things-cmd.el serve the purpose ? or is there some other utility ? No. thing-cmds.el is for selecting things (text). You want to record positions and then move among them. So based on what you just said, it seems: You want to be able to (quickly - single key) set a "marker" (placeholder) of sorts at a location, without needing to provide a name (what you called a "tag"), and later, in the same session, return to that marker from anywhere else. Even a one-character name (as for a register) is too much bother. You don't need persistence (cross-session "markers"), and you don't need named "markers". You don't need to record very many such places. You don't need more than one such "marker" per buffer (based on your example). Richard R. gave you one possibility: library bm.el offers visible, unnamed marks that you can cycle through. Another possibility is to use ordinary global marks - see node `Global Mark Ring' in the Emacs manual. If you do need multiple "markers" in the same buffer, then use local marks - see node `Mark Ring' in the manual. You can cycle among the marks in either ring. Using the mark rings, you cannot easily see the possible destinations, and it can take a moment to see where you've arrived (cursor location) after you move to a mark. Library bm.el helps with that by making marked positions visible. If you use Icicles, then you can trip around among local and global marks more flexibly, and you can also see easily where you've arrived (cross-hairs). You can cycle among marks, but you can also move directly to any mark you want. See http://www.emacswiki.org/emacs/Icicles_-_Tripping (commands `icicle-goto-marker' and `icicle-goto-global-marker'). This direct access is possible because, though you don't name the marks, you can refer to the text (lines) they are in to distinguish them. The text around each mark is an Icicles completion candidate. When you cycle among candidates, you can simultaneously move to their locations. You can cycle through them all to get to one you want (which is OK if there are few), or you can type a bit of text to narrow the candidates down, then cycle or type some more, etc. Or you can just pick candidates from the *Completions* buffer with the mouse. If you decide you do want persistent "markers", but you still don't want to name them, you can use Icicles together with Bookmark+ to get what you want. The same key is used for setting a (book)mark and jumping to (any number of) bookmarks. With `-' as prefix arg, you jump. With `0' or any other digit, you set (mark). Or bind your own keys. When you define a bookmark this way, it is named automatically, without any interaction. The name is taken from the position's context: the buffer name plus some text from the line (or the region, if active). You can use Icicles to trip around among candidate bookmarks the same way as among Emacs marks. HTH. ^ permalink raw reply [flat|nested] 24+ messages in thread
* RE: simple requirement, so simple don't know how to search 2010-02-02 15:50 ` Drew Adams @ 2010-02-03 4:50 ` Maindoor 0 siblings, 0 replies; 24+ messages in thread From: Maindoor @ 2010-02-03 4:50 UTC (permalink / raw) To: 'Mario Domenech Goulart', Drew Adams; +Cc: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 4950 bytes --] Drew, Thank you for the explanation. Richard's mail to this thread earlier was something that I would be interested in. But it has a major feature flaw. Buffer local bookmarks ? It would be great if it were global. Another user wanted global scope too. Maindoor. --- On Tue, 2/2/10, Drew Adams <drew.adams@oracle.com> wrote: From: Drew Adams <drew.adams@oracle.com> Subject: RE: simple requirement, so simple don't know how to search To: "'Maindoor'" <sanjeevfiles@yahoo.com>, "'Mario Domenech Goulart'" <mario.goulart@gmail.com> Cc: help-gnu-emacs@gnu.org Date: Tuesday, February 2, 2010, 9:20 PM > Sorry, I'll be more verbose on my requirements this time. and looking at your > contributions to emacswiki, I can safely assume that such a thing does not exist > if you don't know the answer. Bad assumption - I'm not as knowledgable as you suppose. And it's not about being verbose. It's about making clear what you're looking for. Current session only? Multiple buffers? Multiple positions per buffer? Visual markings? Named positions? The possibilities depend on the answers. > When browsing file1.c i come to 400th line in function fnA(). I want to remember > this particular line. so I press F2. Then I goto file2.c, look and I don't > want to do anything. Then I go to file3.c, and visit line 50 in fnB(). I want > to remember this, so I press F2. and so on. > Now I want to browse through the marked places so I press F3 and F4 to go back > and forth in the list that I marked. The list now contains two entries 400th line in > FnA() and 50 the line in FnB(). > I can also limit the total number of entries in the list say to 20 or 50. > So at most I will be able to remember 20 or 50 places after which the oldest > entries will be overwritten. > Now registers and bookmarks will have tags associated with them and I don't > want to use tags. I just want to browse through the remembered entries. > > Will things-cmd.el serve the purpose ? or is there some other utility ? No. thing-cmds.el is for selecting things (text). You want to record positions and then move among them. So based on what you just said, it seems: You want to be able to (quickly - single key) set a "marker" (placeholder) of sorts at a location, without needing to provide a name (what you called a "tag"), and later, in the same session, return to that marker from anywhere else. Even a one-character name (as for a register) is too much bother. You don't need persistence (cross-session "markers"), and you don't need named "markers". You don't need to record very many such places. You don't need more than one such "marker" per buffer (based on your example). Richard R. gave you one possibility: library bm.el offers visible, unnamed marks that you can cycle through. Another possibility is to use ordinary global marks - see node `Global Mark Ring' in the Emacs manual. If you do need multiple "markers" in the same buffer, then use local marks - see node `Mark Ring' in the manual. You can cycle among the marks in either ring. Using the mark rings, you cannot easily see the possible destinations, and it can take a moment to see where you've arrived (cursor location) after you move to a mark. Library bm.el helps with that by making marked positions visible. If you use Icicles, then you can trip around among local and global marks more flexibly, and you can also see easily where you've arrived (cross-hairs). You can cycle among marks, but you can also move directly to any mark you want. See http://www.emacswiki.org/emacs/Icicles_-_Tripping (commands `icicle-goto-marker' and `icicle-goto-global-marker'). This direct access is possible because, though you don't name the marks, you can refer to the text (lines) they are in to distinguish them. The text around each mark is an Icicles completion candidate. When you cycle among candidates, you can simultaneously move to their locations. You can cycle through them all to get to one you want (which is OK if there are few), or you can type a bit of text to narrow the candidates down, then cycle or type some more, etc. Or you can just pick candidates from the *Completions* buffer with the mouse. If you decide you do want persistent "markers", but you still don't want to name them, you can use Icicles together with Bookmark+ to get what you want. The same key is used for setting a (book)mark and jumping to (any number of) bookmarks. With `-' as prefix arg, you jump. With `0' or any other digit, you set (mark). Or bind your own keys. When you define a bookmark this way, it is named automatically, without any interaction. The name is taken from the position's context: the buffer name plus some text from the line (or the region, if active). You can use Icicles to trip around among candidate bookmarks the same way as among Emacs marks. HTH. [-- Attachment #2: Type: text/html, Size: 5627 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
[parent not found: <mailman.589.1265113565.14305.help-gnu-emacs@gnu.org>]
* Re: simple requirement, so simple don't know how to search [not found] ` <mailman.589.1265113565.14305.help-gnu-emacs@gnu.org> @ 2010-02-02 19:07 ` rustom 2010-02-02 20:36 ` Richard Riley 0 siblings, 1 reply; 24+ messages in thread From: rustom @ 2010-02-02 19:07 UTC (permalink / raw) To: help-gnu-emacs On Feb 2, 5:24 pm, Richard Riley <rileyrg...@gmail.com> wrote: > I am pretty sure that *almost* exactly what you want is what I posted before. Thanks Richard: I tried bm and it looks good. If I open a file with existing bookmarks it works but could not figure out how to jump to bookmarks in different files. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-02-02 19:07 ` rustom @ 2010-02-02 20:36 ` Richard Riley 2010-02-03 4:50 ` Maindoor 0 siblings, 1 reply; 24+ messages in thread From: Richard Riley @ 2010-02-02 20:36 UTC (permalink / raw) To: help-gnu-emacs rustom <rustompmody@gmail.com> writes: > On Feb 2, 5:24 pm, Richard Riley <rileyrg...@gmail.com> wrote: >> I am pretty sure that *almost* exactly what you want is what I posted before. > > Thanks Richard: I tried bm and it looks good. > If I open a file with existing bookmarks it works but could not figure > out how to jump to bookmarks in different files. > bind a key to bm-show-all as a slight improvement. Not exactly as you wanted (and a strange default I must say - it had been a while since using it) after all - I was slightly mistaken and remembered it as moving buffers too. -- Google Talk : rileyrgdev@googlemail.com http://www.google.com/talk ASCII ribbon campaign ( ) - against HTML email X & vCards / \ ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-02-02 20:36 ` Richard Riley @ 2010-02-03 4:50 ` Maindoor 2010-02-03 7:32 ` Drew Adams ` (2 more replies) 0 siblings, 3 replies; 24+ messages in thread From: Maindoor @ 2010-02-03 4:50 UTC (permalink / raw) To: help-gnu-emacs, Richard Riley [-- Attachment #1: Type: text/plain, Size: 1380 bytes --] Exactly. It is a weird default. If it were global, that would be it. It would have been perfect. I am a newbie to lisp. Drew, If I may request, If you can hack it up a little bit, it would be great. Perhaps concat the list as in bm-show-all and then do a bm-next on it, instead of a getting the list from the local buffer. Maindoor. --- On Wed, 2/3/10, Richard Riley <rileyrgdev@gmail.com> wrote: From: Richard Riley <rileyrgdev@gmail.com> Subject: Re: simple requirement, so simple don't know how to search To: help-gnu-emacs@gnu.org Date: Wednesday, February 3, 2010, 2:06 AM rustom <rustompmody@gmail.com> writes: > On Feb 2, 5:24 pm, Richard Riley <rileyrg...@gmail.com> wrote: >> I am pretty sure that *almost* exactly what you want is what I posted before. > > Thanks Richard: I tried bm and it looks good. > If I open a file with existing bookmarks it works but could not figure > out how to jump to bookmarks in different files. > bind a key to bm-show-all as a slight improvement. Not exactly as you wanted (and a strange default I must say - it had been a while since using it) after all - I was slightly mistaken and remembered it as moving buffers too. -- Google Talk : rileyrgdev@googlemail.com http://www.google.com/talk ASCII ribbon campaign ( ) - against HTML email X & vCards / \ [-- Attachment #2: Type: text/html, Size: 2173 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* RE: simple requirement, so simple don't know how to search 2010-02-03 4:50 ` Maindoor @ 2010-02-03 7:32 ` Drew Adams 2010-02-03 7:47 ` Richard Riley [not found] ` <mailman.636.1265183360.14305.help-gnu-emacs@gnu.org> 2 siblings, 0 replies; 24+ messages in thread From: Drew Adams @ 2010-02-03 7:32 UTC (permalink / raw) To: 'Maindoor', help-gnu-emacs, 'Richard Riley' > Exactly. It is a weird default. If it were global, that would be it. > It would have been perfect. I am a newbie to lisp. > > Drew, If I may request, If you can hack it up a little bit, it would be great. > Perhaps concat the list as in bm-show-all and then do a bm-next on it, > instead of a getting the list from the local buffer. Hm, did you mean Richard? He's the one you were replying to here, not me. And I'm not the maintainer of bm.el. I already mentioned two different ways that you _can_ have global, visible markers/bookmarks: (1) Icicles and (2) bookmarks. If you want to use bm bookmarks instead, then don't complain that they don't really do what you want. ;-) ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-02-03 4:50 ` Maindoor 2010-02-03 7:32 ` Drew Adams @ 2010-02-03 7:47 ` Richard Riley [not found] ` <mailman.636.1265183360.14305.help-gnu-emacs@gnu.org> 2 siblings, 0 replies; 24+ messages in thread From: Richard Riley @ 2010-02-03 7:47 UTC (permalink / raw) To: help-gnu-emacs Maindoor <sanjeevfiles@yahoo.com> writes: > Exactly. It is a weird default. If it were global, that would be it. It would have been > perfect. I am a newbie to lisp. > Drew, If I may request, If you can hack it up a little bit, it would be great. > Perhaps concat the list as in bm-show-all and then do a bm-next on it, > instead of a getting the list from the local buffer. > > Maindoor. Use bm-show-all and "space" to see the buffer associated with the bookmark under point. I had a brief look and, well, its way beyond my elisp - its some heady mixture of overlays for current buffer bookmarks and man made strings with text properties for global lists. I might try later but don't hold your breath ;) If you dont now how to bind a key to that command, look at the code I originally posted. > > --- On Wed, 2/3/10, Richard Riley <rileyrgdev@gmail.com> wrote: > > From: Richard Riley <rileyrgdev@gmail.com> > Subject: Re: simple requirement, so simple don't know how to search > To: help-gnu-emacs@gnu.org > Date: Wednesday, February 3, 2010, 2:06 AM > > rustom <rustompmody@gmail.com> writes: > > > On Feb 2, 5:24 pm, Richard Riley <rileyrg...@gmail.com> wrote: > >> I am pretty sure that *almost* exactly what you want is what I posted before. > > > > Thanks Richard: I tried bm and it looks good. > > If I open a file with existing bookmarks it works but could not figure > > out how to jump to bookmarks in different files. > > > > bind a key to bm-show-all as a slight improvement. > > Not exactly as you wanted (and a strange default I must say - it had > been a while since using it) after all - I was slightly mistaken and > remembered it as moving buffers too. ^ permalink raw reply [flat|nested] 24+ messages in thread
[parent not found: <mailman.636.1265183360.14305.help-gnu-emacs@gnu.org>]
* Re: simple requirement, so simple don't know how to search [not found] ` <mailman.636.1265183360.14305.help-gnu-emacs@gnu.org> @ 2010-02-03 16:57 ` rustom 2010-02-03 17:58 ` Richard Riley 0 siblings, 1 reply; 24+ messages in thread From: rustom @ 2010-02-03 16:57 UTC (permalink / raw) To: help-gnu-emacs On Feb 3, 12:47 pm, Richard Riley <rileyrg...@gmail.com> wrote: > Maindoor <sanjeevfi...@yahoo.com> writes: > > Exactly. It is a weird default. If it were global, that would be it. It would have been > > perfect. I am a newbie to lisp. > > Drew, If I may request, If you can hack it up a little bit, it would be great. > > Perhaps concat the list as in bm-show-all and then do a bm-next on it, > > instead of a getting the list from the local buffer. > > > Maindoor. > > Use bm-show-all and "space" to see the buffer associated with the > bookmark under point. I had a brief look and, well, its way beyond my > elisp - its some heady mixture of overlays for current buffer bookmarks > and man made strings with text properties for global lists. I might try > later but don't hold your breath ;) bm-show-all with emacs straight after startup (no open files/buffers) says "No bookmarks defined" If I then open a file where I had previously put a bookmark and do bm- show-all -- it shows only that file's bookmarks, not the bookmarks in other files. So it appears that bm does not know of a bookmark unless you somehow go to a bookmark and say Hello :-) Would you classify this as a working bookmark system? My bm setup attempt is as under: (setq bm-restore-repository-on-load t) (require 'bm) (add-hook 'after-init-hook 'bm-repository-load) ;; Restoring bookmarks when on file find. (add-hook 'find-file-hooks 'bm-buffer-restore) ;; Saving bookmark data on killing a buffer (add-hook 'kill-buffer-hook 'bm-buffer-save) ;; Saving the repository to file when on exit. ;; kill-buffer-hook is not called when emacs is killed, so we ;; must save all bookmarks first. (add-hook 'kill-emacs-hook '(lambda nil (bm-buffer-save-all) (bm-repository-save))) ;; Update bookmark repository when saving the file. (add-hook 'after-save-hook 'bm-buffer-save) ;; Restore bookmarks when buffer is reverted. (add-hook 'after-revert-hook 'bm-buffer-restore) (autoload 'bm-toggle "bm" "Toggle bookmark in current buffer." t) (autoload 'bm-next "bm" "Goto bookmark." t) (autoload 'bm-previous "bm" "Goto previous bookmark." t) (global-set-key (kbd "<f8>") 'bm-next) (global-set-key (kbd "<M-f8>") 'bm-previous) (global-set-key (kbd "<C-f8>") 'bm-toggle) (setq-default bm-buffer-persistence t) ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-02-03 16:57 ` rustom @ 2010-02-03 17:58 ` Richard Riley 2010-02-04 6:03 ` Maindoor 0 siblings, 1 reply; 24+ messages in thread From: Richard Riley @ 2010-02-03 17:58 UTC (permalink / raw) To: help-gnu-emacs rustom <rustompmody@gmail.com> writes: > On Feb 3, 12:47 pm, Richard Riley <rileyrg...@gmail.com> wrote: >> Maindoor <sanjeevfi...@yahoo.com> writes: >> > Exactly. It is a weird default. If it were global, that would be it. It would have been >> > perfect. I am a newbie to lisp. >> > Drew, If I may request, If you can hack it up a little bit, it would be great. >> > Perhaps concat the list as in bm-show-all and then do a bm-next on it, >> > instead of a getting the list from the local buffer. >> >> > Maindoor. >> >> Use bm-show-all and "space" to see the buffer associated with the >> bookmark under point. I had a brief look and, well, its way beyond my >> elisp - its some heady mixture of overlays for current buffer bookmarks >> and man made strings with text properties for global lists. I might try >> later but don't hold your breath ;) > > bm-show-all with emacs straight after startup (no open files/buffers) > says > "No bookmarks defined" As I would expect. I didn't try or suggest the persistent part of it so can not really add anything. > > If I then open a file where I had previously put a bookmark and do bm- > show-all -- it shows only that file's bookmarks, not the bookmarks in > other files. It shows all bookmarks in all buffers in the current session. BTW, only bookmarks set with the bm interface. The code loops on all open buffers. > So it appears that bm does not know of a bookmark unless you somehow > go to a bookmark and say Hello :-) > > Would you classify this as a working bookmark system? Well, yes. As it does work in the scenario previously discussed. I cant comment on your attempts at using persistence as I haven't tried it myself. > > My bm setup attempt is as under: > > (setq bm-restore-repository-on-load t) > (require 'bm) > (add-hook 'after-init-hook 'bm-repository-load) > > ;; Restoring bookmarks when on file find. > (add-hook 'find-file-hooks 'bm-buffer-restore) > > ;; Saving bookmark data on killing a buffer > (add-hook 'kill-buffer-hook 'bm-buffer-save) > > ;; Saving the repository to file when on exit. > ;; kill-buffer-hook is not called when emacs is killed, so we > ;; must save all bookmarks first. > (add-hook 'kill-emacs-hook '(lambda nil > (bm-buffer-save-all) > (bm-repository-save))) > > ;; Update bookmark repository when saving the file. > (add-hook 'after-save-hook 'bm-buffer-save) > > ;; Restore bookmarks when buffer is reverted. > (add-hook 'after-revert-hook 'bm-buffer-restore) > > (autoload 'bm-toggle "bm" "Toggle bookmark in current buffer." t) > (autoload 'bm-next "bm" "Goto bookmark." t) > (autoload 'bm-previous "bm" "Goto previous bookmark." t) > (global-set-key (kbd "<f8>") 'bm-next) > (global-set-key (kbd "<M-f8>") 'bm-previous) > (global-set-key (kbd "<C-f8>") 'bm-toggle) > (setq-default bm-buffer-persistence t) > -- Google Talk : rileyrgdev@googlemail.com http://www.google.com/talk ASCII ribbon campaign ( ) - against HTML email X & vCards / \ ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-02-03 17:58 ` Richard Riley @ 2010-02-04 6:03 ` Maindoor 0 siblings, 0 replies; 24+ messages in thread From: Maindoor @ 2010-02-04 6:03 UTC (permalink / raw) To: help-gnu-emacs, Richard Riley [-- Attachment #1: Type: text/plain, Size: 3521 bytes --] Found exactly what I was looking for: bookmarknav . Give it a try. Maindoor. --- On Wed, 2/3/10, Richard Riley <rileyrgdev@gmail.com> wrote: From: Richard Riley <rileyrgdev@gmail.com> Subject: Re: simple requirement, so simple don't know how to search To: help-gnu-emacs@gnu.org Date: Wednesday, February 3, 2010, 11:28 PM rustom <rustompmody@gmail.com> writes: > On Feb 3, 12:47 pm, Richard Riley <rileyrg...@gmail.com> wrote: >> Maindoor <sanjeevfi...@yahoo.com> writes: >> > Exactly. It is a weird default. If it were global, that would be it. It would have been >> > perfect. I am a newbie to lisp. >> > Drew, If I may request, If you can hack it up a little bit, it would be great. >> > Perhaps concat the list as in bm-show-all and then do a bm-next on it, >> > instead of a getting the list from the local buffer. >> >> > Maindoor. >> >> Use bm-show-all and "space" to see the buffer associated with the >> bookmark under point. I had a brief look and, well, its way beyond my >> elisp - its some heady mixture of overlays for current buffer bookmarks >> and man made strings with text properties for global lists. I might try >> later but don't hold your breath ;) > > bm-show-all with emacs straight after startup (no open files/buffers) > says > "No bookmarks defined" As I would expect. I didn't try or suggest the persistent part of it so can not really add anything. > > If I then open a file where I had previously put a bookmark and do bm- > show-all -- it shows only that file's bookmarks, not the bookmarks in > other files. It shows all bookmarks in all buffers in the current session. BTW, only bookmarks set with the bm interface. The code loops on all open buffers. > So it appears that bm does not know of a bookmark unless you somehow > go to a bookmark and say Hello :-) > > Would you classify this as a working bookmark system? Well, yes. As it does work in the scenario previously discussed. I cant comment on your attempts at using persistence as I haven't tried it myself. > > My bm setup attempt is as under: > > (setq bm-restore-repository-on-load t) > (require 'bm) > (add-hook 'after-init-hook 'bm-repository-load) > > ;; Restoring bookmarks when on file find. > (add-hook 'find-file-hooks 'bm-buffer-restore) > > ;; Saving bookmark data on killing a buffer > (add-hook 'kill-buffer-hook 'bm-buffer-save) > > ;; Saving the repository to file when on exit. > ;; kill-buffer-hook is not called when emacs is killed, so we > ;; must save all bookmarks first. > (add-hook 'kill-emacs-hook '(lambda nil > (bm-buffer-save-all) > (bm-repository-save))) > > ;; Update bookmark repository when saving the file. > (add-hook 'after-save-hook 'bm-buffer-save) > > ;; Restore bookmarks when buffer is reverted. > (add-hook 'after-revert-hook 'bm-buffer-restore) > > (autoload 'bm-toggle "bm" "Toggle bookmark in current buffer." t) > (autoload 'bm-next "bm" "Goto bookmark." t) > (autoload 'bm-previous "bm" "Goto previous bookmark." t) > (global-set-key (kbd "<f8>") 'bm-next) > (global-set-key (kbd "<M-f8>") 'bm-previous) > (global-set-key (kbd "<C-f8>") 'bm-toggle) > (setq-default bm-buffer-persistence t) > -- Google Talk : rileyrgdev@googlemail.com http://www.google.com/talk ASCII ribbon campaign ( ) - against HTML email X & vCards / \ [-- Attachment #2: Type: text/html, Size: 5271 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-01-28 12:39 simple requirement, so simple don't know how to search Maindoor 2010-01-28 12:50 ` Mario Domenech Goulart @ 2010-01-28 13:22 ` Richard Riley 2010-01-28 14:36 ` Tassilo Horn 1 sibling, 1 reply; 24+ messages in thread From: Richard Riley @ 2010-01-28 13:22 UTC (permalink / raw) To: help-gnu-emacs Maindoor <sanjeevfiles@yahoo.com> writes: > Hi, > 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. > > Regards, > Maindoor. > You might like bm, I have : ,---- | (autoload 'bm-toggle "bm" "Toggle bookmark in current buffer." t) | (autoload 'bm-next "bm" "Goto bookmark." t) | (autoload 'bm-previous "bm" "Goto previous bookmark." t) | (global-set-key (kbd "<f8>") 'bm-next) | (global-set-key (kbd "<M-f8>") 'bm-previous) | (global-set-key (kbd "<C-f8>") 'bm-toggle) | (setq-default bm-buffer-persistence t) `---- http://www.nongnu.org/bm/ The cycle feature is great. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-01-28 13:22 ` Richard Riley @ 2010-01-28 14:36 ` Tassilo Horn 2010-01-28 17:36 ` Richard Riley 0 siblings, 1 reply; 24+ messages in thread From: Tassilo Horn @ 2010-01-28 14:36 UTC (permalink / raw) To: help-gnu-emacs Richard Riley <rileyrgdev@gmail.com> writes: Hi! >> 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 : > > http://www.nongnu.org/bm/ 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 buffer. 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. `---- Bye, Tassilo ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-01-28 14:36 ` Tassilo Horn @ 2010-01-28 17:36 ` Richard Riley 2010-01-29 7:56 ` Tassilo Horn 2010-01-29 8:14 ` Thierry Volpiatto 0 siblings, 2 replies; 24+ messages in thread From: Richard Riley @ 2010-01-28 17:36 UTC (permalink / raw) To: help-gnu-emacs Tassilo Horn <tassilo@member.fsf.org> writes: > > 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. > `---- > If using bookmarks do consider the excellent bookmark+ extensions. It makes bookmarks work with most fancy files such as info pages, web pages in w3m and so forth, in addition you can tag and group bookmarks - recommended. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-01-28 17:36 ` Richard Riley @ 2010-01-29 7:56 ` Tassilo Horn 2010-01-30 9:19 ` tomas 2010-01-29 8:14 ` Thierry Volpiatto 1 sibling, 1 reply; 24+ messages in thread From: Tassilo Horn @ 2010-01-29 7:56 UTC (permalink / raw) To: help-gnu-emacs Richard Riley <rileyrgdev@gmail.com> writes: >> ,----[ (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. >> `---- >> > > If using bookmarks do consider the excellent bookmark+ extensions. It > makes bookmarks work with most fancy files such as info pages, web > pages in w3m and so forth, in addition you can tag and group bookmarks > - recommended. I don't really need bookmarks. Either I use links in org-files or I use marks. Bye, Tassilo ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-01-29 7:56 ` Tassilo Horn @ 2010-01-30 9:19 ` tomas 0 siblings, 0 replies; 24+ messages in thread From: tomas @ 2010-01-30 9:19 UTC (permalink / raw) To: Tassilo Horn; +Cc: help-gnu-emacs -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Jan 29, 2010 at 08:56:28AM +0100, Tassilo Horn wrote: > Richard Riley <rileyrgdev@gmail.com> writes: > > >> ,----[ (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. > >> `---- > >> > > > > If using bookmarks do consider the excellent bookmark+ extensions. It > > makes bookmarks work with most fancy files such as info pages, web > > pages in w3m and so forth, in addition you can tag and group bookmarks > > - recommended. > > I don't really need bookmarks. Either I use links in org-files or I use > marks. To each her own, I suppose. I do use both: links in org-files (they are great!) for longer lasting things (I keep a kind of worklog and refer to relevant web pages, places in the source of my project, etc). OTOH, for shorter things, I do use bookmarks quite a lot, especially with short names (like "1", "2", etc). C-x r m 3 and then later C-x r b 3 is just incredibly convenient. Regards - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFLY/miBcgs9XrR2kYRAhM/AJ9ykb0bzB+di+ft1eSlxQiUwkhBgACfU2Pl f/F5dX4Cq3vUCTEk5WMhV0s= =4HHD -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: simple requirement, so simple don't know how to search 2010-01-28 17:36 ` Richard Riley 2010-01-29 7:56 ` Tassilo Horn @ 2010-01-29 8:14 ` Thierry Volpiatto 1 sibling, 0 replies; 24+ messages in thread From: Thierry Volpiatto @ 2010-01-29 8:14 UTC (permalink / raw) To: help-gnu-emacs Richard Riley <rileyrgdev@gmail.com> writes: > Tassilo Horn <tassilo@member.fsf.org> writes: > >> >> 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. >> `---- >> > > If using bookmarks do consider the excellent bookmark+ extensions. It > makes bookmarks work with most fancy files such as info pages, web pages in > w3m and so forth, in addition you can tag and group bookmarks - > recommended. Note: In addition of that, you will find in bookmark-extensions.el full support for Firefox and Delicious bookmarks, even bookmarking a web page from Firefox in Emacs bookmarks is possible. -- Thierry Volpiatto ^ permalink raw reply [flat|nested] 24+ messages in thread
[parent not found: <mailman.680.1265263392.14305.help-gnu-emacs@gnu.org>]
* Re: simple requirement, so simple don't know how to search [not found] <mailman.680.1265263392.14305.help-gnu-emacs@gnu.org> @ 2010-02-05 10:03 ` rustom 0 siblings, 0 replies; 24+ messages in thread From: rustom @ 2010-02-05 10:03 UTC (permalink / raw) To: help-gnu-emacs On Feb 4, 11:03 am, Maindoor <sanjeevfi...@yahoo.com> wrote: > Found exactly what I was looking for: bookmarknav . Give it a try. > > Maindoor. loading bookmarknav into emacs23 gives me Wrong type argument: arrayp, (meta \.) ^ permalink raw reply [flat|nested] 24+ messages in thread
[parent not found: <mailman.354.1264682403.14305.help-gnu-emacs@gnu.org>]
* Re: simple requirement, so simple don't know how to search [not found] <mailman.354.1264682403.14305.help-gnu-emacs@gnu.org> @ 2010-02-18 9:27 ` Stefan Kamphausen 0 siblings, 0 replies; 24+ messages in thread From: Stefan Kamphausen @ 2010-02-18 9:27 UTC (permalink / raw) To: help-gnu-emacs Hi, Maindoor <sanjeevfiles@yahoo.com> writes: > Hi, > 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. give mtorus a try. I wrote that ages ago for just the requirement you describe here. http://www.skamphausen.de/cgi-bin/ska/mtorus You create markers on-the-fly and store them on a ring, then you cycle through that ring. If you have a new topic you create a new ring where you can put another group of markers. Then you can cycle rings, too. I always find it hard to explain, you will have to try it out. Cheers, Stefan -- Stefan Kamphausen --- http://www.skamphausen.de a blessed +42 regexp of confusion (weapon in hand) You hit. The format string crumbles and turns to dust. ^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2010-02-18 9:27 UTC | newest] Thread overview: 24+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-01-28 12:39 simple requirement, so simple don't know how to search Maindoor 2010-01-28 12:50 ` Mario Domenech Goulart 2010-02-01 5:47 ` Maindoor 2010-02-01 15:22 ` Drew Adams 2010-02-02 8:35 ` Maindoor 2010-02-02 12:24 ` Richard Riley 2010-02-02 15:50 ` Drew Adams 2010-02-03 4:50 ` Maindoor [not found] ` <mailman.589.1265113565.14305.help-gnu-emacs@gnu.org> 2010-02-02 19:07 ` rustom 2010-02-02 20:36 ` Richard Riley 2010-02-03 4:50 ` Maindoor 2010-02-03 7:32 ` Drew Adams 2010-02-03 7:47 ` Richard Riley [not found] ` <mailman.636.1265183360.14305.help-gnu-emacs@gnu.org> 2010-02-03 16:57 ` rustom 2010-02-03 17:58 ` Richard Riley 2010-02-04 6:03 ` Maindoor 2010-01-28 13:22 ` Richard Riley 2010-01-28 14:36 ` Tassilo Horn 2010-01-28 17:36 ` Richard Riley 2010-01-29 7:56 ` Tassilo Horn 2010-01-30 9:19 ` tomas 2010-01-29 8:14 ` Thierry Volpiatto [not found] <mailman.680.1265263392.14305.help-gnu-emacs@gnu.org> 2010-02-05 10:03 ` rustom [not found] <mailman.354.1264682403.14305.help-gnu-emacs@gnu.org> 2010-02-18 9:27 ` Stefan Kamphausen
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).