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

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

Re: syntax coloring os not working!!!!!


From: Bijan Soleymani
Subject: Re: syntax coloring os not working!!!!!
Date: 02 Jan 2003 03:08:41 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

unni krishnan <gnu_talk@yahoo.co.in> writes:

> >
> > hello,
> >
> > i am a new user (student) of emacs.how can i
> > do syntax coloring in emacs?
> >
> >It's simply, just type:
> >M-x global-font-lock-mode
> >If you don't have the Meta key (alt should be equal to Meta), you can
> >type ESC-x global-font-lock-mode
> >To make permanent this configuration, you must edit the .emacs file and
> >insert the following line
> >(global-font-lock-mode 1)
> 
>  
> 
> hi,
> 
> syntax coloring is not working.
What version of emacs are you using?
Are you using it in X or the console (emacs only supports colors on
text only terminals since version 21)? 

> thanks for response. i am using a linux 7.2
There is no such thing. Linux is the kernel, the current bleeding edge
is around 2.5.36. You must be using a distribution of Linux and some
other free software, possibly Red Hat, Mandrake or Slackware.
 
> i have typed the command
> 
>  M-x global-font-lock-mode
> 
> but the result is
> 
> "global font lock mode disabled"
That would indicate that it was already enabled, and that you disabled
it. What happens if you run M-x global-font-lock-mode again?

What are you using highlighting for? If you open a text file (.txt)
there (obviously) won't be any highlighting by default. What happens
if you open a C source file (.c)?

Finally emacs comes with excellent online documentation. Please take
the time to familiarize yourself with it.

Choose read the emacs manual from the help submenu.

C-h i
will get you into info which should have documentation for many of the
programs on your computer. Move the cursor down to emacs and then
press enter.
Only a few commands are enough to use info:
'Enter' follows a link'
'u' moves up to a higher level. 
'l' goes back to the last place you were at.

That should be enough to get started.

Bijan
>From help-gnu-emacs-bounces@gnu.org  Thu Jan  2 05:30:08 2003
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail
From: john@nospam.demon.co.uk (John McCabe)
Newsgroups: gnu.emacs.help
Date: Thu, 02 Jan 2003 10:27:18 GMT
Lines: 21
Message-ID: <3e141376.5047718@news.demon.co.uk>
References: <340bc066.0212231244.27873fe@posting.google.com>
NNTP-Posting-Host: pipehawk.demon.co.uk
X-Trace: news.demon.co.uk 1041503178 24515 158.152.226.81 (2 Jan 2003 10:26:18
        GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Thu, 2 Jan 2003 10:26:18 +0000 (UTC)
X-Newsreader: Forte Free Agent 1.21/32.243
Xref: shelby.stanford.edu gnu.emacs.help:108654
To: help-gnu-emacs@gnu.org
Subject: Re: mouse button number two doesn't work
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: Thu, 02 Jan 2003 10:30:08 -0000

On 23 Dec 2002 12:44:22 -0800, lng2@spray.se (Lars Gustafsson) wrote:

>I have a Logitech mouse with a wheel. I have configured it to function
>as the backward key on my Internet browser. Always when I use the
>Emacs manual or when I open a directory and want to choose a file to
>open I have to use the return key to make my choice. How do I make
>mouse button No. 2 work so I don't have to use the return key all the
>time.
> 
>Thankful for answers, Lars

What operating system are you running on? If MS Windows, your mouse
driver may have an advanced tab where you can turn off wheel support
for specific programs. If you turn off wheel support for Emacs, that
may work (Emacs contains its own wheel support so the wheel should
still work as a wheel!).

Best Regards
John McCabe

To reply by email replace 'nospam' with 'assen'
>From help-gnu-emacs-bounces@gnu.org  Thu Jan  2 06:20:10 2003
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!news.uchicago.edu!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!pd9e1e88b.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: Thu, 02 Jan 2003 12:18:05 +0100
Organization: University of Dortmund, Germany
Lines: 17
Message-ID: <84of6zreaa.fsf@lucy.cs.uni-dortmund.de>
References: <mailman.6.1041492833.28484.help-gnu-emacs@gnu.org>
NNTP-Posting-Host: pd9e1e88b.dip.t-dialin.net (217.225.232.139)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: fu-berlin.de 1041506297 9982036 217.225.232.139 (16 [73968])
User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50
 (i686-pc-linux-gnu)
Cancel-Lock: sha1:Vh8WIIzpmwDQ3iV/zlrVrA6NSlA=
Xref: shelby.stanford.edu gnu.emacs.help:108655
To: help-gnu-emacs@gnu.org
Subject: Re: syntax coloring os not working!!!!!
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: Thu, 02 Jan 2003 11:20:10 -0000

unni krishnan <gnu_talk@yahoo.co.in> writes:

> syntax coloring is not working.
> thanks for response. i am using a linux 7.2
>
> i have typed the command
>
>  M-x global-font-lock-mode
>
> but the result is
>
> "global font lock mode disabled"

This means that global font lock mode was enabled before you used the
command.  The command toggles the mode.
-- 
Ambibibentists unite!
>From help-gnu-emacs-bounces@gnu.org  Thu Jan  2 08:15:22 2003
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!newsfeed.esat.net!lnewspeer00.lnd.ops.eu.uu.net!bnewspeer00.bru.ops.eu.uu.net!emea.uu.net!cs.uu.nl!not-for-mail
From: Piet van Oostrum <piet@cs.uu.nl>
Newsgroups: gnu.emacs.help
Date: 02 Jan 2003 14:06:52 +0100
Organization: Dept of Computer Science, Utrecht University, The Netherlands
Lines: 13
Sender: piet@nono.cs.uu.nl
Message-ID: <wzel7v7lar.fsf@nono.cs.uu.nl>
References: <atqe8i$ogn$1@geraldo.cc.utexas.edu> <m17kdo39rb.fsf@twcny.rr.com>
NNTP-Posting-Host: sunshine.cs.uu.nl
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: samos.cs.uu.nl 1041512788 4546 131.211.80.33 (2 Jan 2003 13:06:28
        GMT)
X-Complaints-To: news@cs.uu.nl
NNTP-Posting-Date: 2 Jan 2003 13:06:28 GMT
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50
Xref: shelby.stanford.edu gnu.emacs.help:108656
To: help-gnu-emacs@gnu.org
Subject: Re: emacs on Mac OS X problem
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: Thu, 02 Jan 2003 13:15:22 -0000

> Avi Purkayastha <avijit@tacc.utexas.edu> writes:
> I downloaded and installed GNU emacs v21.3.50 binary(not the terminal
> emacs that comes with OS X) and have been succesful except for one
> MAJOR problem. I can copy-and-paste out of an emacs window into a
> terminal or file, but not the other way around. So the cmd-c and cmd-v
> commands yield nothing into an emacs window. Any solutions?

In emacs you paste with C-y (control-Y). I have no problem pasting into
emacs from Terminal or other applications.
-- 
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum@hccnet.nl
>From help-gnu-emacs-bounces@gnu.org  Thu Jan  2 08:40:19 2003
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!fu-berlin.de!server1.netnews.ja.net!news.york.ac.uk!not-for-mail
From: Kester Clegg <kester@cs.york.ac.uk>
Newsgroups: gnu.emacs.help
Date: 02 Jan 2003 13:37:57 +0000
Organization: Rolls Royce UTC, Dept. of Computer Science, University of York,
        UK
Lines: 13
Sender: kc11@york.ac.uk
Message-ID: <yqr1y3vn03u.fsf@cs.york.ac.uk>
NNTP-Posting-Host: pc310.cs.york.ac.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: pump1.york.ac.uk 1041514675 2510 144.32.40.101 (2 Jan 2003 13:37:55
        GMT)
X-Complaints-To: abuse@york.ac.uk
NNTP-Posting-Date: 2 Jan 2003 13:37:55 GMT
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1
Xref: shelby.stanford.edu gnu.emacs.help:108657
To: help-gnu-emacs@gnu.org
Subject: spacebar completion (warning - off topic)
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: Thu, 02 Jan 2003 13:40:19 -0000


One thing I love in the minibuffer window is spacebar completion as an
alternative to tab completion.  I use bash as my shell and it has most
of the simple emacs key bindings for CL editing, except it insists on
using tab as the completion key.  Does anyone know how I can get it use
the spacebar like emacs does?

-- 
************************************************************************
Kester Clegg                            Dept. of Computer Science,
Research Assistant (UTC)                University of York, 
Tel (01904) 43 27 49                    email: kester at cs.york.ac.uk
************************************************************************
>From help-gnu-emacs-bounces@gnu.org  Thu Jan  2 08:55:24 2003
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.stealth.net!news.stealth.net!nntp5.savvis.net!uunet!dfw.uu.net!ash.uu.net!spool0900.news.uu.net!reader0900.news.uu.net!not-for-mail
Newsgroups: gnu.emacs.help
References: <yqr1y3vn03u.fsf@cs.york.ac.uk>
From: David Klein <dklein@bloombergREMOVETHISPART.com>
Date: 02 Jan 2003 15:54:43 +0200
Message-ID: <m0ptrfk670.fsf@bloombergREMOVETHISPART.com>
X-Newsreader: Gnus v5.7/Emacs 20.7
Lines: 24
NNTP-Posting-Host: 199.172.169.15
X-Trace: 1041515683 reader0.ash.ops.us.uu.net 15209 199.172.169.15
Xref: shelby.stanford.edu gnu.emacs.help:108658
To: help-gnu-emacs@gnu.org
Subject: Re: spacebar completion (warning - off topic)
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: Thu, 02 Jan 2003 13:55:24 -0000

Kester Clegg <kester@cs.york.ac.uk> writes:

> One thing I love in the minibuffer window is spacebar completion as an
> alternative to tab completion.  I use bash as my shell and it has most
> of the simple emacs key bindings for CL editing, except it insists on
> using tab as the completion key.  Does anyone know how I can get it use
> the spacebar like emacs does?
> 
As they say: "Be careful what you wish for, you might get it."

Are you sure you really want this? In emacs, one typically is entering
one "entity" at a time. When more than one entity is needed, you are
given seperate prompts. Because of this, the mini-buffer almost never
needs to have a space in it, so the spacebar can be used for
completion. Even in emacs this is often turned off though, e.g. with
`compile' and `grep' where the minibuffer can contain spaces. Can you
imagine the misery of trying to type

for x in *.f; do echo $x; done

if every time you hit the spacebar a whole set of completions came up?

-- 
Use of tools distinguishes Man from Beast. And UNIX users from WINDOZE lusers.
>From help-gnu-emacs-bounces@gnu.org  Thu Jan  2 09:25:32 2003
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.nacamar.de!fu-berlin.de!uni-berlin.de!as6-6-4.k.s.bonet.SE!not-for-mail
From: Karl Eklund <kekn@medelklassen.com>
Newsgroups: gnu.emacs.help
Date: 02 Jan 2003 15:21:54 +0100
Lines: 11
Sender: ke@tralfamadore
Message-ID: <87of6zpr7h.fsf@medelklassen.com>
References: <3E13C3EC.2F565BF1@no.spam>
NNTP-Posting-Host: as6-6-4.k.s.bonet.se (217.215.95.167)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: fu-berlin.de 1041517315 11692384 217.215.95.167 (16 [157486])
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
Xref: shelby.stanford.edu gnu.emacs.help:108659
To: help-gnu-emacs@gnu.org
Subject: Re: pasting with middle-button
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: Thu, 02 Jan 2003 14:25:32 -0000

Charles Herman <spam@no.spam> writes:

> I am using Emacs 21.2 on Win 2000.  I want to be able to paste text
> using the middle button of the mouse.  I have a Logitech 3-button mouse
> which I can set so that the middle button behaves like a middle button.
> 
> But the middle button does not paste in Emacs, is there a line I need in
> my .emacs file to force this behaviour?

Have you set the behaviour of the middle mouse button in control panel
- mouse to "Middle button"?
>From help-gnu-emacs-bounces@gnu.org  Thu Jan  2 09:55:46 2003
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!151.189.0.75.MISMATCH!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!server1.netnews.ja.net!news.york.ac.uk!not-for-mail
From: Kester Clegg <kester@cs.york.ac.uk>
Newsgroups: gnu.emacs.help
Date: 02 Jan 2003 14:54:22 +0000
Organization: Rolls Royce UTC, Dept. of Computer Science, University of York,
        UK
Lines: 23
Sender: kc11@york.ac.uk
Message-ID: <yqrvg17li01.fsf@cs.york.ac.uk>
References: <yqr1y3vn03u.fsf@cs.york.ac.uk>
        <m0ptrfk670.fsf@bloombergREMOVETHISPART.com>
NNTP-Posting-Host: pc310.cs.york.ac.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: pump1.york.ac.uk 1041519260 4012 144.32.40.101 (2 Jan 2003 14:54:20
        GMT)
X-Complaints-To: abuse@york.ac.uk
NNTP-Posting-Date: 2 Jan 2003 14:54:20 GMT
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1
Xref: shelby.stanford.edu gnu.emacs.help:108660
To: help-gnu-emacs@gnu.org
Subject: Re: spacebar completion (warning - off topic)
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: Thu, 02 Jan 2003 14:55:46 -0000

David Klein <dklein@bloombergREMOVETHISPART.com> writes:

> Because of this, the mini-buffer almost never needs to have a space in
> it, so the spacebar can be used for completion. Even in emacs this is
> often turned off though, e.g. with `compile' and `grep' where the
> minibuffer can contain spaces. Can you imagine the misery of trying to
> type
> 
> for x in *.f; do echo $x; done
> 
> if every time you hit the spacebar a whole set of completions came up?

Yes, you are right.  Though in truth I rarely type the above, it would
be a PITA the once-in-6-months I did need to!  I forgot emacs might be
applying its completion rules more selectively than I imagined.  :-)


-- 
************************************************************************
Kester Clegg                            Dept. of Computer Science,
Research Assistant (UTC)                University of York, 
Tel (01904) 43 27 49                    email: kester at cs.york.ac.uk
************************************************************************
>From help-gnu-emacs-bounces@gnu.org  Thu Jan  2 14:30:44 2003
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!news.uchicago.edu!newsfeed.cs.wisc.edu!nnxp1.twtelecom.net!news.stealth.net!news.stealth.net!wesley.videotron.net!weber.videotron.net.POSTED!not-for-mail
Sender: bijan@hurd.crasseux.com
Newsgroups: gnu.emacs.help
References: <yqr1y3vn03u.fsf@cs.york.ac.uk>
From: Bijan Soleymani <bijan@psq.com>
Message-ID: <8765t7z6uc.fsf@hurd.crasseux.com>
Lines: 14
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: 02 Jan 2003 14:31:39 -0500
NNTP-Posting-Host: 24.203.44.117
X-Complaints-To: abuse@videotron.ca
X-Trace: weber.videotron.net 1041535657 24.203.44.117 (Thu, 02 Jan 2003
        14:27:37 EST)
NNTP-Posting-Date: Thu, 02 Jan 2003 14:27:37 EST
Xref: shelby.stanford.edu gnu.emacs.help:108661
To: help-gnu-emacs@gnu.org
Subject: Re: spacebar completion (warning - off topic)
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: Thu, 02 Jan 2003 19:30:44 -0000

Kester Clegg <kester@cs.york.ac.uk> writes:

> One thing I love in the minibuffer window is spacebar completion as an
> alternative to tab completion.  I use bash as my shell and it has most
> of the simple emacs key bindings for CL editing, except it insists on
> using tab as the completion key.  Does anyone know how I can get it use
> the spacebar like emacs does?
I don't know how emacs uses spacebar for completion, but if you did
that in bash you would be able to type the space in:
emacs file.txt

because it would want to complete emacs to emacsclient or something.

Bijan
>From Jay.Bingham@hp.com Thu Jan 02 19:03:27 2003
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
        id 18UFIW-0004NQ-00
        for help-gnu-emacs@gnu.org; Thu, 02 Jan 2003 19:02:48 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
        id 18UFCs-000392-00
        for help-gnu-emacs@gnu.org; Thu, 02 Jan 2003 18:56:59 -0500
Received: from zcamail05.zca.compaq.com ([161.114.32.105])
        by monty-python.gnu.org with esmtp (Exim 4.10.13)
        id 18UF2M-0001v7-00
        for help-gnu-emacs@gnu.org; Thu, 02 Jan 2003 18:46:06 -0500
Received: from cacexg12.americas.cpqcorp.net (cacexg12.americas.cpqcorp.net
        [16.105.250.119])
        by zcamail05.zca.compaq.com (Postfix) with ESMTP id 8382D951
        for <help-gnu-emacs@gnu.org>; Thu,  2 Jan 2003 15:46:00 -0800 (PST)
Received: from txnexc01.americas.cpqcorp.net ([16.74.7.244]) by
        cacexg12.americas.cpqcorp.net with Microsoft SMTPSVC(5.0.2195.2966);
        Thu, 2 Jan 2003 15:46:00 -0800
X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0
content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
        charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Thu, 2 Jan 2003 17:45:59 -0600
Message-ID: 
<72A87F7160C0994D8C5A36E2FDC227F5042505FE@txnexc01.americas.cpqcorp.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: reprise of Newbie regexp question
Thread-Index: AcKAK9u05Ho3PN24TnibewfdXsPlQQAAtlNADJ9JYkA=
From: "Bingham, Jay" <Jay.Bingham@hp.com>
To: <help-gnu-emacs@gnu.org>
X-OriginalArrivalTime: 02 Jan 2003 23:46:00.0054 (UTC)
        FILETIME=[1A592960:01C2B2B9]
Subject: reprise of Newbie regexp question
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: Fri, 03 Jan 2003 00:03:27 -0000

Back in Oct Paul Cohen <paco@enea.se> wrote:

> Hi
>=20
> I want to do a Emacs regexp search and replace on a HTML file
containing
> patterns like this:
>=20
> <!--Test-->
> ...
> <!--End of Test-->
>=20
> Where "..." denotes a variable number of lines of HTML text.
>=20
> I want to search for all occurrences of the above pattern and then
> remove them from the HTML file!
>=20
> I've tried a number of variants without any success. For example the
> following regexp doesn't work:
>=20
> <!--Test-->\(.*\n\)*<!--End of Test-->

I replied that the only way I knew to do what he wanted to do was write
a function to do the search and replace and I supplied the function.
It turns out that there is a way to do what he was trying to do with a
regexp.

Information found at
http://www.emacswiki.org/cgi-bin/wiki.pl?NonGreedyRegexp explains how to
do this for versions of Emacs prior to 21.1, and also hints that the
solution will not work in 21.1 and later but that the simpler Perl
construct will.

I just checked the Perl construct out in Emacs 21.2 and it works as
intimated.

Here is the regexp for version 21.1 or later that will match the lines
that Paul wanted to remove.

<!--Test-->
\(.*
\)*?[   ]*<!--End of Test-->


(Remember that the new lines must be entered with C-q C-j and that there
is a tab character and a space character inside the square brackets).

The ? that follows the second * makes that sub-expression non-greedy,
meaning it will match the shortest matching string rather than the
longest.  The ? can follow the + special character to modify its
operation as well.

Happy emacsing and a happy new year to all
-_
J_)
C_)ingham
.    HP - NonStop Austin Software & Services - Software Quality
Assurance
.    Austin, TX
. "Language is the apparel in which your thoughts parade in public.
.  Never clothe them in vulgar and shoddy attire."     -Dr. George W.
Crane-





reply via email to

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