all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13122: save-excursion not saving point
@ 2012-12-08  6:20 Jyothis V
  2012-12-08 11:21 ` martin rudalics
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jyothis V @ 2012-12-08  6:20 UTC (permalink / raw)
  To: 13122

[-- Attachment #1: Type: text/plain, Size: 1823 bytes --]

Hi,

I wrote the following version of transpose-chars which is supposed to
always transform the last two chars without moving the point.
(defun gosmacs-tranpose-chars (n)
  (interactive "p")
  (save-excursion
    (forward-char (- n))
    (transpose-chars 1)))

The trouble is, even though I have used save-excursion, the point does
move 2 characters backwards when n=1! For other values of n, this seems to
be working fine.

Regards,
Jyothis V

In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.2)
 of 2012-11-18 on eric
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
Configured using:
 `configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib'
 '--localstatedir=/var' '--with-x-toolkit=gtk3' '--with-xft'
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
 --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2'
 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro''

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: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  diff-auto-refine-mode: t
  global-auto-complete-mode: t
  auto-complete-mode: t
  icomplete-mode: t
  ido-everywhere: t
  shell-dirtrack-mode: t
  which-function-mode: t
  cua-mode: t
  display-time-mode: t
  electric-pair-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

[-- Attachment #2: Type: text/html, Size: 2140 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-05-04  8:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-08  6:20 bug#13122: save-excursion not saving point Jyothis V
2012-12-08 11:21 ` martin rudalics
2012-12-21  5:43   ` Chong Yidong
2013-01-07 12:32 ` bug#13122: sort-regexp-fields also seems to not save point Alexander Kjeldaas
2019-04-26 19:53 ` bug#13122: save-excursion not saving point Tino Calancha
2019-04-27  6:57   ` Eli Zaretskii
2019-04-27  7:44     ` Tino Calancha
2019-04-27  9:59       ` Andreas Schwab
2019-05-04  8:39         ` Tino Calancha

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.