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

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

Re: save-excursion doesn't always work


From: David Kastrup
Subject: Re: save-excursion doesn't always work
Date: 15 Dec 2002 11:37:28 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

ittay@qlusters.com (Ittay Freiman) writes:

> 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,

Wrong.  A lot changes in the buffer.  Place some text property on the
space in question: it will be gone afterwards.  AUCTeX in the process
of filling deletes sequences of spaces completely, then reinserts a
single one.  Whether you were before or in or after such a deleted
space before the operation. you'll end up on the same side of the
reinserted space afterwards.

> 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)

You can't, for the above reason.  AUCTeX's filling modes would have to
be rewritten so that instead of deleting all spaces and reinserting
one space, AUCTeX would delete all spaces except one.

I think Emacs' default filling by now does something like that.  If
you volunteer in trying to port the relevant portions, I will check
them into the AUCTeX code base: the current behavior is a nuisance
for other reasons as well.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
>From help-gnu-emacs-bounces@gnu.org  Sun Dec 15 09:00:14 2002
Sender: tcross@tiger.rapttech.com.au
Newsgroups: gnu.emacs.help
References: <20021214215819181-0600@news.earthlink.net>
From: Tim X <timx@spamto.devnul.com>
Date: 16 Dec 2002 01:08:36 +1100
Message-ID: <87znr7qsrf.fsf@tiger.rapttech.com.au>
Lines: 32
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
NNTP-Posting-Host: ppp761.nsw.padsl.internode.on.net
X-Trace: duster.adelaide.on.net 1039960533 ppp761.nsw.padsl.internode.on.net
        (16 Dec 2002 00:25:33 +1050)
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!enews.sgi.com!news.xtra.co.nz!news.mel.connect.com.au!news.ade.connect.com.au!duster.adelaide.on.net!not-for-mail
Xref: shelby.stanford.edu gnu.emacs.help:108145
To: help-gnu-emacs@gnu.org
Subject: Re: inserting quotes (") and slashes (/) ?
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: timx@spamto.devnul.com
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 14:00:14 -0000

Josh DuBois <duboisj@codeweavers.com> writes:

> Hi - 
> 
>    I've used emacs for years and this seems like a newbie question, but 
> I can't figure it out or find it in an FAQ: inserting quote characters, 
> and also the forward-slash, in emacs, seems to trigger a 'compose 
> character' behavior or something.  When I hit '/' I get, at the bottom 
> of my screen:
> 
> /[ /234=AEO\aceo]
> 
> ..if I type one of the characters above then some weird control 
> sequence is inserted, otherwise I get the slash character I want.  Same 
> thing happens for the " character.  

Sounds like your buffer is in some strange input codeing system - check
the docs on coding system and possibly an aprops with coding-system
might find something?
 
> It seems to only happen in LaTeX mode, and then only sometimes.  I can't 
> figure out when or why, and / & " say they're mapped to self-insert-
> command and tex-insert-quote, respectively, neither of which should do 
> what I'm seeing, AFAICT.  I'm running 23.5 on Mac OS X (from a terminal).
>
23.5? Is the mac version numbering different or is this 21.3?

-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!
>From help-gnu-emacs-bounces@gnu.org  Sun Dec 15 09:45:17 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!teaser.fr!newsfeed.stueberl.de!fu-berlin.de!uni-berlin.de!p50876b28.dip.t-dialin.NET!not-for-mail
From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=)
Newsgroups: gnu.emacs.help
Date: Sun, 15 Dec 2002 15:42:53 +0100
Organization: University of Dortmund, Germany
Lines: 15
Message-ID: <84adj7mjgy.fsf@lucy.cs.uni-dortmund.de>
References: <mailman.222.1039928821.19936.help-gnu-emacs@gnu.org>
NNTP-Posting-Host: p50876b28.dip.t-dialin.net (80.135.107.40)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: fu-berlin.de 1039963374 38252538 80.135.107.40 (16 [73968])
User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2.93
 (i686-pc-linux-gnu)
Cancel-Lock: sha1:RKX2kCd/ooobJRvSEC0PPImMkuA=
Xref: shelby.stanford.edu gnu.emacs.help:108146
To: help-gnu-emacs@gnu.org
Subject: Re: Incremental Search with marked text
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 14:45:17 -0000

"Andrew C. Suttles" <suttlesa@zianet.com> writes:

> If I mark a word by double clicking (yuck) the mouse, I can do an
> incremental search for the word by using c-s m-y.  This 'yanks' the marked
> word into the minibuffer as the target for the isearch.  However, when I
> use m-@ to "mark word" and then try the same thing (c-s m-y) I get the
> previously marked word and not the current one.  

You need to do M-w after marking the word with the keyboard.

The node in the info file is called "The Mark and the Region", I
think.  After C-h i d m Emacs RET you can type i to search in the
index, then enter "region".
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)
>From p.galbraith@globetrotter.net Sun Dec 15 10:38:56 2002
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
        id 18Naqu-0004fj-00
        for help-gnu-emacs@gnu.org; Sun, 15 Dec 2002 10:38:48 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
        id 18Naqd-0004IV-00
        for help-gnu-emacs@gnu.org; Sun, 15 Dec 2002 10:38:33 -0500
Received: from adsl-66.110.138-170.globetrotter.net ([66.110.138.170]
        helo=mixed.dyndns.org)
        by monty-python.gnu.org with esmtp (Exim 4.10.13)       id 
18NaqO-0003yB-00
        for help-gnu-emacs@gnu.org; Sun, 15 Dec 2002 10:38:16 -0500
Received: from mixed.dyndns.org (localhost [127.0.0.1])
        by mixed.dyndns.org (Postfix) with ESMTP
        id 6C86B42A6D; Sun, 15 Dec 2002 10:38:15 -0500 (EST)
To: help-gnu-emacs@gnu.org
Organization: mh-e crew - mh-e.sourceforge.net
X-Mailer: MH-E 7.0+cvs; nmh 1.0.4+dev; Emacs 21.2
X-Face: "#bYm%*(4JuXAkouMxaLz|M2dbXUFnQ"IRX)zpsiM"(B}`#|_b548$VB}5L&VIck1F#FNc'
        rsASk0?-/gFp2qzM>0]`Jc}Qd<8[l)N7{8%qMN~{|DS.ME.$
Date: Sun, 15 Dec 2002 10:38:15 -0500
From: Peter S Galbraith <p.galbraith@globetrotter.net>
Message-Id: <20021215153815.6C86B42A6D@mixed.dyndns.org>
Subject: Customize a checklist
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 15:38:57 -0000

Hi all,

I'd like to customize a list which would contain certain symbols or
strings from certain possibilities.  The aim is to setup which buttons
appear in a toolbar through a checklist, such as

    [*] inc
    [*] MIME save
    ...
    [*] preferences
    [*] help
 
I haven't found a way to do this in customize.
Did I miss something?

Any implementation ideas or suggestions?

Thanks,
-- 
Peter S. Galbraith, MH-E developer  <p.galbraith@globetrotter.net>
GPG key 1024/D2A913A1 - 97CE 866F F579 96EE  6E68 8170 35FF 799E
6623'rd GNU/Linux user at the Counter - http://counter.li.org/



reply via email to

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