help-emacs-windows
[Top][All Lists]
Advanced

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

Re: [h-e-w] transient-mark-mode


From: David Vanderschel
Subject: Re: [h-e-w] transient-mark-mode
Date: 25 Jan 2002 14:33:56 -0600

On Friday, January 25, "Scott Goldstein" <address@hidden> wrote:
>I'm trying out transient-mark-mode because I want to
>be able to highlight text with the keyboard.

>One annoyance though, is the inability to set the
>mark and then return to it using C-X C-x.  I would
>like to be able to save a location in the buffer,
>look around someplace else for a while, and then
>return to the saved spot.

>Is there any built in way to do this using transient
>mark mode?

Check out the variable mark-even-if-inactive.  If the
highlighting annoys you, you can deactivate the mark
with C-g.

To stay completely away from side-effects related to
the mark ring for this sort of simple "remember where
I was" problem, I introduced the following
straightforward code in my .emacs long ago:

(defvar dv-saved-pos 0          "Simple saved place")
(make-variable-buffer-local     'dv-saved-pos)
(defun dv-mark ()               "Note position in buffer"
  (interactive)
  (setq dv-saved-pos (point-marker)))
(global-set-key "\C-cm" 'dv-mark)
(defun dv-find ()               "Return to noted position in buffer"
  (interactive)
  (goto-char dv-saved-pos))
(global-set-key "\C-cf" 'dv-find)

Regards,
  David V.




reply via email to

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