help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

save-excursion doesn't always work


From: Ittay Freiman
Subject: save-excursion doesn't always work
Date: 14 Dec 2002 21:38:17 -0800

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
>From eliz@is.elta.co.il Sun Dec 15 01:14:39 2002
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
        id 18NS2w-0000rf-00
        for help-gnu-emacs@gnu.org; Sun, 15 Dec 2002 01:14:38 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
        id 18NS2n-0000Lg-00
        for help-gnu-emacs@gnu.org; Sun, 15 Dec 2002 01:14:35 -0500
Received: from is.elta.co.il ([199.203.121.2])
        by monty-python.gnu.org with esmtp (Exim 4.10.13)
        id 18NS2k-0008TW-00
        for help-gnu-emacs@gnu.org; Sun, 15 Dec 2002 01:14:27 -0500
Received: from is (is [199.203.121.2])
        by is.elta.co.il (8.9.3/8.8.8) with SMTP id IAA22703
        for <help-gnu-emacs@gnu.org>; Sun, 15 Dec 2002 08:14:17 +0200 (IST)
Date: Sun, 15 Dec 2002 08:14:17 +0200 (IST)
From: Eli Zaretskii <eliz@is.elta.co.il>
X-Sender: eliz@is
To: help-gnu-emacs@gnu.org
In-Reply-To: <s3adj8i1mf.fsf@cmm.kakpryg.net.cmm>
Message-ID: <Pine.SUN.3.91.1021215081001.22353F@is>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: Re: getting Mule, Unicode & X selection to play together
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 15 Dec 2002 06:14:41 -0000


On Sun, 15 Dec 2002, Michael Livshin wrote:

> so the day had come and I decided to explore the wonderful world of
> Emacs 21 and Mule, what with all the nice Debian packaging of them out
> there.
> 
> so I installed Emacs 21 and mule-ucs (it seemed like a good idea, or
> was it?)

It's not necessarily a good idea to bring Mule-UCS into this equation.  In 
any case, you will be much better off using the CVS version of Emacs 
where several related bugs were fixed lately.

> now, if I select a chunk of cyrillic text in Mozilla and paste it into
> Emacs, I do indeed get the same-looking text.  however, the char codes
> are different from whatever Emacs itself chooses for the same entities
> if I type them into it (which is just weird, but no biggie), and (as a
> consequence, probably) the pasted text is shown in a different font
> (which is butt ugly).

I suspect that Emacs converts the pasted text into Unicode codepoints, 
and that your Unicode font is ugly.  What does "C-u C-x =" tell about the 
cyrillic characters you paste this way?

> so basically I'd like Emacs to somehow recognize the cyrillic
> characters in the X selection it receives, and to convert them into
> the codes it itself uses for the same characters.

The problem is, Emacs 21 uses two different codepoints for Cyrillic 
characters: one based on ISO-8859-5, the other based on Unicode.  
Conversion between them is not supported in stock Emacs distributions, 
AFAIK you need either add-on packages (such as ucs-tables you can find
on gnu.emacs.sources) or the latest development code from CVS.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]