From rsridar50@dataone.in Wed Sep 2 03:10:43 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 2 Sep 2009 10:10:43 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: *** X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=3.1 required=4.0 tests=FOURLA,RCVD_IN_SBLXBL, RCVD_IN_SBLXBL_CBL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n82AAepY013705 for ; Wed, 2 Sep 2009 03:10:42 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MimnY-0001B9-Bx for bug-gnu-emacs@gnu.org; Wed, 02 Sep 2009 06:10:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MimnT-0001AR-IF for bug-gnu-emacs@gnu.org; Wed, 02 Sep 2009 06:10:39 -0400 Received: from [199.232.76.173] (port=50499 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MimnT-0001AO-D8 for bug-gnu-emacs@gnu.org; Wed, 02 Sep 2009 06:10:35 -0400 Received: from bglbbmr1-a-fixed.dataone.in ([218.248.240.59]:56339 helo=bglbbmr1.dataone.in) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MimnR-0005p4-OU for bug-gnu-emacs@gnu.org; Wed, 02 Sep 2009 06:10:35 -0400 Disposition-notification-to: rsridar50@dataone.in Received: from conversion-daemon.bglbbmr1.dataone.in by bglbbmr1.dataone.in (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0KPC00M018LLY100@bglbbmr1.dataone.in> (original mail from rsridar50@dataone.in) for bug-gnu-emacs@gnu.org; Wed, 02 Sep 2009 15:40:14 +0530 (IST) Received: from [192.168.1.2] ([59.92.2.245]) by bglbbmr1.dataone.in (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0KPC00J8C9KW6CH0@bglbbmr1.dataone.in> for bug-gnu-emacs@gnu.org; Wed, 02 Sep 2009 15:40:11 +0530 (IST) Date: Wed, 02 Sep 2009 15:33:05 +0530 From: RSridhar Subject: 23.1; save-excursion and goto-char fail Sender: rsridar50@dataone.in To: bug-gnu-emacs@gnu.org Message-id: <1251885785.3373.3.camel@www.x-shriman.com> MIME-version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-type: text/plain Content-transfer-encoding: 7BIT X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 1. I have a lisp code which saves file buffer and does some manipulation on the file in shell. subsequently it is reverted. However I have tried save-excursion before saving file which did not restore the file position on reverting. So I tr ied setq point to some var and after reverting restore point with goto-char. Thi s also did not ork in restoring previous position although (point) function did return the correct value from the goto-char function in lisp. 2. The file manipulated contains utf-8 chars. Every now and then octal values di splay as language text but most of the time only octal utf-8 chars are displayed . Also the devanaagari font that is displayed incorrectly when it is displayed.. . The (itrans) short i is to be to the left of the consonant but gets associated with the right consonant. 3. re-search-forward function fails regular expression with octal code In GNU Emacs 23.1.1 (i386-redhat-linux-gnu, GTK+ Version 2.16.5) of 2009-08-26 on x86-2.fedora.phx.redhat.com Windowing system distributor `The X.Org Foundation', version 11.0.10602000 configured using `configure '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i586-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i586-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables'' Important settings: value of $LC_ALL: C 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: @im=ibus locale-coding-system: nil default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: show-paren-mode: t cua-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: Recent messages: Loading /usr/share/emacs/site-lisp/site-start.d/focus-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/nxml-init.el (source)... Loading /usr/share/emacs/site-lisp/nxml-mode/rng-auto.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/nxml-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/po-mode-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el (source)...done Loading cua-base...done Loading paren...done For information about GNU Emacs and the GNU system, type C-h C-a. -- RSridhar From rgm@gnu.org Wed Sep 2 16:35:02 2009 Received: (at control) by emacsbugs.donarmstrong.com; 2 Sep 2009 23:35:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.2 required=4.0 tests=AWL,ONEWORD autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n82NZ1Pr016941 for ; Wed, 2 Sep 2009 16:35:02 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MizLu-0003oR-S9; Wed, 02 Sep 2009 19:34:58 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19103.290.742312.708692@fencepost.gnu.org> Date: Wed, 2 Sep 2009 19:34:58 -0400 From: Glenn Morris To: control Subject: control merge 4312 4313 4314 reassign 4311 spam reassign 4315 spam reassign 4316 spam reassign 4317 spam reassign 4319 spam reassign 4322 notemacs From rsridar50@dataone.in Fri Sep 4 10:38:33 2009 Received: (at 4313) by emacsbugs.donarmstrong.com; 4 Sep 2009 17:38:33 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: *** X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=3.4 required=4.0 tests=AWL,BOUNDARYID,HAS_BUG_NUMBER, HTML_NBSP,MULTALT,RCVD_IN_SBLXBL,RCVD_IN_SBLXBL_CBL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from ndabbmr1.dataone.in (ndabbmr1-a-fixed.dataone.in [218.248.240.99]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n84HcVFT025664 for <4313@emacsbugs.donarmstrong.com>; Fri, 4 Sep 2009 10:38:33 -0700 Disposition-notification-to: rsridar50@dataone.in Received: from conversion-daemon.ndabbmr1.dataone.in by ndabbmr1.dataone.in (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0KPG00801JDOLN00@ndabbmr1.dataone.in> (original mail from rsridar50@dataone.in) for 4313@emacsbugs.donarmstrong.com; Fri, 04 Sep 2009 23:08:20 +0530 (IST) Received: from [192.168.1.2] ([59.92.26.6]) by ndabbmr1.dataone.in (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0KPG00GP8JNHEQJ0@ndabbmr1.dataone.in>; Fri, 04 Sep 2009 23:08:19 +0530 (IST) Date: Fri, 04 Sep 2009 23:08:20 +0530 From: RSridhar Subject: Re: bug#4312: 23.1; save-excursion and goto-char fail In-reply-to: To: Andreas Schwab Cc: 4313@debbugs.gnu.org Message-id: <1252085900.3362.11.camel@www.x-shriman.com> MIME-version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-type: multipart/alternative; boundary="Boundary_(ID_RB70uf5QmageHVYJx8OYGg)" References: <1251885785.3373.3.camel@www.x-shriman.com> --Boundary_(ID_RB70uf5QmageHVYJx8OYGg) Content-type: text/plain Content-transfer-encoding: 7BIT hi .. This code I have been using for long and worked well in previous version. i.e, Emacs 22..... and since I loaded Fedora 11 and from their repository emacs 23.1 many of my lisp codes malfunction. The loaded file contains utf-8 codes of devanagari ( indian root language). The simplest code that failed (defun temay() "Temporary script to xltn itrans files and revert buffer" (interactive) (setq pos (point)) ;;or (save excursion) ;;(message "point set %d" pos) (save-restriction (widen) (save-buffer) (setq localvar ( concat "xltn -f " (buffer-file-name))) (shell-command localvar) (revert-buffer nil t nil)) ;;(message "point set %d" pos) ;;(message "point returned %d" (goto-char pos)) (goto-char pos) ) -- RSridhar On Thu, 2009-09-03 at 18:33 +0200, Andreas Schwab wrote: > Stefan Monnier writes: > > >> 1. I have a lisp code which saves file buffer and does some > >> manipulation on the file in shell. subsequently it is reverted. > >> However I have tried save-excursion before saving file which did not > >> restore the file position on reverting. > > > > save-excursion uses markers to remember the position. But markers only > > keep track of positions by keeping track of insertions/deletions and > > adjusting the position accordingly. When the changes happen outside > > Emacs, this doesn't work too well, because Emacs sees your revert-buffer > > as just one big delete&insert. > > insert-file-contents tries to keep markers if possible, but that only > works if the marker points into the unchanged head or tail of the > replaced contents. > > Andreas. > --Boundary_(ID_RB70uf5QmageHVYJx8OYGg) Content-type: text/html; charset=utf-8 Content-transfer-encoding: 7BIT hi ..
This code I have been using for long and worked well in previous version.
i.e, Emacs 22.....
and since I loaded Fedora 11 and from their repository  emacs 23.1
many of my lisp codes malfunction.

The loaded file contains utf-8 codes of devanagari ( indian root language).
The simplest code that failed
(defun temay()
   "Temporary script to xltn itrans files and revert buffer"
   (interactive)
   (setq pos (point))
;;or (save excursion)
   ;;(message "point set %d" pos)
   (save-restriction
     (widen)
     (save-buffer)
     (setq localvar ( concat "xltn -f " (buffer-file-name)))
     (shell-command localvar)
     (revert-buffer nil t nil))
   ;;(message "point set %d" pos)
   ;;(message "point returned %d" (goto-char pos))
   (goto-char pos)
)

--
RSridhar <rsridar50@dataone.in>


On Thu, 2009-09-03 at 18:33 +0200, Andreas Schwab wrote:
Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> 1. I have a lisp code which saves file buffer and does some
>> manipulation on the file in shell.  subsequently it is reverted.
>> However I have tried save-excursion before saving file which did not
>> restore the file position on reverting.
>
> save-excursion uses markers to remember the position.  But markers only
> keep track of positions by keeping track of insertions/deletions and
> adjusting the position accordingly.  When the changes happen outside
> Emacs, this doesn't work too well, because Emacs sees your revert-buffer
> as just one big delete&insert.

insert-file-contents tries to keep markers if possible, but that only
works if the marker points into the unchanged head or tail of the
replaced contents.

Andreas.

--Boundary_(ID_RB70uf5QmageHVYJx8OYGg)-- From cyd@stupidchicken.com Sat Sep 12 18:50:16 2009 Received: (at control) by emacsbugs.donarmstrong.com; 13 Sep 2009 01:50:17 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.6 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8D1oFvN001075 for ; Sat, 12 Sep 2009 18:50:16 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 8950057E259; Sat, 12 Sep 2009 21:51:41 -0400 (EDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: close 4312 Date: Sat, 12 Sep 2009 21:51:41 -0400 Message-ID: <87ws43boia.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii close 4312 thanks From unknown Mon Aug 18 14:15:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 21 Oct 2009 14:24:11 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator