all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#4936: 23.1.50; Position jumps when saving RCS-versioned files
@ 2009-11-16  9:55 Torsten Bronger
  2009-11-16 14:29 ` Dan Nicolaescu
  2009-11-16 14:42 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Torsten Bronger @ 2009-11-16  9:55 UTC (permalink / raw)
  To: emacs-pretest-bug


Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug.  If you can, give
a recipe starting from `emacs -Q':

When saving a file which is under version control with RCS (no RCS
directory, but I didn't test with an RCS dir), the position jumps to the
beginning of the file.


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/local/share/emacs/23.1.50/etc/DEBUG.


In GNU Emacs 23.1.50.2 (x86_64-unknown-linux-gnu)
 of 2009-11-14 on wilson
Windowing system distributor `The X.Org Foundation', version 11.0.10604000
configured using `configure  '--prefix=/usr/local/' '--mandir=/usr/local/share/man/' '--infodir=/usr/local/share/info/' '--with-x-toolkit=no' '--with-xpm' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' '--with-x''

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

Major mode: Python

Minor modes in effect:
  diff-auto-refine-mode: t
  global-auto-revert-mode: t
  savehist-mode: t
  display-time-mode: t
  desktop-save-mode: t
  mouse-wheel-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
C-x k M-x s e t - d <return> m o n o s p a c e - 1 
4 <return> <help-echo> <help-echo> <down> <down> M-> 
s <backspace> <backspace> <backspace> C-x C-s M-x e 
m a c s - r e p o <tab> <tab> <tab> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> r e 
p o <tab> r <tab> b u <tab> <return>

Recent messages:
Loading todo-mode...done
Wrote /home/bronger/.emacs.desktop.lock
Desktop: 133 buffers restored.
For information about GNU Emacs and the GNU system, type C-h C-a.
gnuplot-mode 0.6.0 (gnuplot 4.3) -- report bugs with "M-x gnuplot-bug-report"
Mark set
Saving file /tmp/reference.py...
Wrote /tmp/reference.py
call-interactively: Text is read-only
Making completion list...

Load-path shadows:
None found.

Features:
(shadow mail-extr emacsbug help-mode view todo-mode time-stamp
notes-index-mode reftex-vcr reftex-dcr reftex reftex-vars font-latex
bytecomp byte-compile latex tex-style tex parse-time vc-cvs gnuplot-gui
gnuplot info-look info css-mode sgml-mode smerge-mode diff-mode vc-bzr
noutline outline notes-mode notes-aux vc-rcs disp-table python-21 python
sym-comp message sendmail ecomplete rfc822 mml mml-sec password-cache
mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045
qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util
mail-prsvr gmm-utils mailheader canlock sha1 hex-util hashcash
mail-utils refdb-output-mode derived refdb-mode easy-mmode server w3m
browse-url doc-view jka-compr image-mode dired w3m-hist w3m-fb w3m-ems
wid-edit w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util rst compile
comint ring rs-windows-1252 edmacro kmacro browse-kill-ring advice
help-fns advice-preload mmm-mode mmm-univ mmm-class mmm-region mmm-auto
mmm-vars mmm-utils mmm-compat cl cl-19 bbdb-autoloads bbdb timezone
notes-variables notes-emacs cal-china lunar solar cal-dst cal-bahai
cal-islam cal-hebrew holidays hol-loaddefs appt diary-lib diary-loaddefs
regexp-opt cal-menu easymenu calendar cal-loaddefs w3-auto autorevert
tex-site savehist time desktop delsel cus-start cus-load tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces
cus-face text-properties overlay md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process x
multi-tty emacs)

-- 
Torsten Bronger, aquisgrana, europa vetus            ICQ 264-296-646





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

* bug#4936: 23.1.50; Position jumps when saving RCS-versioned files
  2009-11-16  9:55 bug#4936: 23.1.50; Position jumps when saving RCS-versioned files Torsten Bronger
@ 2009-11-16 14:29 ` Dan Nicolaescu
  2009-11-16 15:29   ` Stefan Monnier
  2009-11-16 14:42 ` Stefan Monnier
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Nicolaescu @ 2009-11-16 14:29 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 4936, Torsten Bronger

Stefan,

This looks like it's due to your 2009-11-13 change to
`vc-rcs-consult-headers'.

It replaced:
-     (save-excursion
-      (set-buffer (get-file-buffer file))

with:
+      (with-current-buffer (get-file-buffer file)
+        (goto-char (point-min))

So when `file' is in the current buffer the position is not restored.






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

* bug#4936: 23.1.50; Position jumps when saving RCS-versioned files
  2009-11-16  9:55 bug#4936: 23.1.50; Position jumps when saving RCS-versioned files Torsten Bronger
  2009-11-16 14:29 ` Dan Nicolaescu
@ 2009-11-16 14:42 ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2009-11-16 14:42 UTC (permalink / raw)
  To: Torsten Bronger; +Cc: 4936

merge 4936 4933
thanks

> When saving a file which is under version control with RCS (no RCS
> directory, but I didn't test with an RCS dir), the position jumps to the
> beginning of the file.

I believe I've just fixed this bug with the patch below,


        Stefan


--- vc-rcs.el.~1.97.~	2009-11-15 23:34:56.000000000 -0500
+++ vc-rcs.el	2009-11-16 09:38:57.000000000 -0500
@@ -1056,6 +1056,7 @@
    ((not (get-file-buffer file)) nil)
    ((let (status version locking-user)
       (with-current-buffer (get-file-buffer file)
+        (save-excursion
         (goto-char (point-min))
         (cond
          ;; search for $Id or $Header
@@ -1112,7 +1113,7 @@
             (setq status 'rev)))
          ;; else: nothing found
          ;; -------------------
-         (t nil)))
+           (t nil))))
      (if status (vc-file-setprop file 'vc-working-revision version))
      (and (eq status 'rev-and-lock)
 	  (vc-file-setprop file 'vc-state






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

* bug#4936: 23.1.50; Position jumps when saving RCS-versioned files
  2009-11-16 14:29 ` Dan Nicolaescu
@ 2009-11-16 15:29   ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2009-11-16 15:29 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 4936, Torsten Bronger

> This looks like it's due to your 2009-11-13 change to
> `vc-rcs-consult-headers'.

That's one way to look at it.

> It replaced:
> -     (save-excursion
> -      (set-buffer (get-file-buffer file))

> with:
> +      (with-current-buffer (get-file-buffer file)
> +        (goto-char (point-min))

> So when `file' is in the current buffer the position is not restored.

You mean "so point is never preserved, not even when file is in the
current-buffer, as was accidentally the case before"?


        Stefan






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

end of thread, other threads:[~2009-11-16 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-16  9:55 bug#4936: 23.1.50; Position jumps when saving RCS-versioned files Torsten Bronger
2009-11-16 14:29 ` Dan Nicolaescu
2009-11-16 15:29   ` Stefan Monnier
2009-11-16 14:42 ` Stefan Monnier

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.