From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: ittay@qlusters.com (Ittay Freiman) Newsgroups: gmane.emacs.help Subject: save-excursion doesn't always work Date: 14 Dec 2002 21:38:17 -0800 Organization: http://groups.google.com/ Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <1a52e3d.0212142138.2f5aed8@posting.google.com> NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1039930843 2180 80.91.224.249 (15 Dec 2002 05:40:43 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 15 Dec 2002 05:40:43 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18NRW4-0000Z2-00 for ; Sun, 15 Dec 2002 06:40:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18NRVy-00085L-00 for gnu-help-gnu-emacs@m.gmane.org; Sun, 15 Dec 2002 00:40:34 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-NNTP-Posting-Host: 62.90.161.92 Original-X-Trace: posting.google.com 1039930697 26728 127.0.0.1 (15 Dec 2002 05:38:17 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 15 Dec 2002 05:38:17 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:108140 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:4669 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4669 hi, i found this behavior while using auctex. to recreate, create a new buffer for a tex document, with auctex as the mode (LaTeX-mode). type in the first line 'this is a test'. go down one line. '(point)' should return 16. now evaluate '(save-excursion (LaTeX-fill-region-as-paragraph 1 16 t))'. nothing actually changes in the buffer, but the cursor jumps to point 15. you can repeat this with the same results. can someone please tell me what is going on? also, if i write a function that uses LaTeX-fill-region-as-paragraph, how can i return the cursor to its original place (i'm currently using markers, however, putting the cursor inside the filled region creates weird behaviors) thanx, ittay