From: Dominic Mitchell <dom@ppe.happygiraffe.net>
Subject: save-excursion doesn't restore point
Date: Tue, 24 Jan 2006 17:12:33 +0000 (GMT) [thread overview]
Message-ID: <20060124171233.1670DBACC@happygiraffe.net> (raw)
This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.
In GNU Emacs 21.3.1 (i386--freebsd, X toolkit, Xaw3d scroll bars)
of 2005-12-09 on ppe.happygiraffe.net
configured using `configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include --prefix=/usr/local i386--freebsd'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
locale-coding-system: nil
default-enable-multibyte-characters: t
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
I have this bit of code in my .emacs file:
(defun perltidy ()
"Run perltidy on the current region or buffer."
(interactive)
(save-excursion
(unless mark-active (mark-defun))
(shell-command-on-region (point) (mark) "perltidy -q" nil t)))
If I run it from inside a Perl function (in cperl-mode), then the
point ends up _above_ the Perl function, instead of remembering where
it was.
I would guess that this is because save-excursion uses markers, and
those markers then get invalidated by shell-command-on-region. But
it's still a little weird. Is this a bug?
Thanks,
-Dom
Recent input:
ESC ? a b u g RET ESC x r e p o r t TAB RET
Recent messages:
Loading easy-mmode...done
Loading /usr/local/libexec/emacs/21.3/i386--freebsd/fns-21.3.1.el (source)...done
Loading executable...done
Loading haskell-site-file...done
For information about the GNU Project and its goals, type C-h C-p.
Loading view...done
Loading apropos...done
Type C-x 1 to remove help window. C-M-v to scroll the help.
Loading emacsbug...done
next reply other threads:[~2006-01-24 17:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-24 17:12 Dominic Mitchell [this message]
2006-01-26 2:47 ` save-excursion doesn't restore point Richard M. Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060124171233.1670DBACC@happygiraffe.net \
--to=dom@ppe.happygiraffe.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.