* Implementing something like codenavigation in slickedit
@ 2007-09-18 14:46 TheLonelyStar
2007-09-18 15:20 ` dhruva
2007-09-18 15:24 ` Davis Herring
0 siblings, 2 replies; 3+ messages in thread
From: TheLonelyStar @ 2007-09-18 14:46 UTC (permalink / raw)
To: Emacs-devel
Hello,
I saw this:
http://www.slickedit.com/demo/high/CodeNavigation/CodeNavigation.html
and thought: I need something like this!
My Idea: By some keystroke, the current position is remembered. By some
other keystroke the position gets restored. Like this:
(defun codenav-remember-pos ()
"Remember the current position"
(setq codenav-buffer (current-buffer))
(setq codenav-position (point)))
(defun codenav-restore-pos ()
"Restore the position"
(switch-to-buffer codenav-buffer)
(goto-char codenav-position))
Problem: If I am editing the same buffer as the stored position, it is not
restored correct because the "point" has changed.
Have got an Idea on how to do this?
Thanks
Nathan
PS: If something like this already exits (I have found none), I also would
be interested.
--
View this message in context: http://www.nabble.com/Implementing-something-like-codenavigation-in-slickedit-tf4474840.html#a12758666
Sent from the Emacs - Dev mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Implementing something like codenavigation in slickedit
2007-09-18 14:46 Implementing something like codenavigation in slickedit TheLonelyStar
@ 2007-09-18 15:20 ` dhruva
2007-09-18 15:24 ` Davis Herring
1 sibling, 0 replies; 3+ messages in thread
From: dhruva @ 2007-09-18 15:20 UTC (permalink / raw)
To: TheLonelyStar; +Cc: Emacs-devel
Hi,
On 9/18/07, TheLonelyStar <nabble@lonely-star.org> wrote:
> Problem: If I am editing the same buffer as the stored position, it is not
> restored correct because the "point" has changed.
> Have got an Idea on how to do this?
Try point-to-register and register-to-point
-dky
--
Dhruva Krishnamurthy
Contents reflect my personal views only!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Implementing something like codenavigation in slickedit
2007-09-18 14:46 Implementing something like codenavigation in slickedit TheLonelyStar
2007-09-18 15:20 ` dhruva
@ 2007-09-18 15:24 ` Davis Herring
1 sibling, 0 replies; 3+ messages in thread
From: Davis Herring @ 2007-09-18 15:24 UTC (permalink / raw)
To: TheLonelyStar; +Cc: emacs-devel
> My Idea: By some keystroke, the current position is remembered. By some
> other keystroke the position gets restored. Like this:
See the "bookmark" library, as well as just C-u C-@ (which is what I
usually use).
> Problem: If I am editing the same buffer as the stored position, it is not
> restored correct because the "point" has changed.
> Have got an Idea on how to do this?
What you would need to make it work (if it weren't already implemented in
various ways) is a "marker" (see the Emacs Lisp manual).
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-18 15:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-18 14:46 Implementing something like codenavigation in slickedit TheLonelyStar
2007-09-18 15:20 ` dhruva
2007-09-18 15:24 ` Davis Herring
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).