all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* a couple of novice questions
@ 2003-12-12 16:31 Mitch Edelman
  2003-12-12 17:22 ` Pascal Bourguignon
  2003-12-14 12:25 ` Brad Collins
  0 siblings, 2 replies; 6+ messages in thread
From: Mitch Edelman @ 2003-12-12 16:31 UTC (permalink / raw)



apologies for newbie question - using Xemacs (for windows)how does one 
display the line number of the file currently being edited?

Secondly, how does one find a matching opening brace, paren, etc?

Finally, in editing a document where it's reasonable for "<" to
be unpaired (as in javascript code inside an html document), how
does one find the opening prace, paren, etc.

Thanks in advance,

Mitch Edelman

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: a couple of novice questions
  2003-12-12 16:31 a couple of novice questions Mitch Edelman
@ 2003-12-12 17:22 ` Pascal Bourguignon
  2003-12-12 19:02   ` Peter Lee
  2003-12-14 12:25 ` Brad Collins
  1 sibling, 1 reply; 6+ messages in thread
From: Pascal Bourguignon @ 2003-12-12 17:22 UTC (permalink / raw)


edelman@umbc.edu (Mitch Edelman) writes:

> apologies for newbie question - using Xemacs (for windows)how does one 
> display the line number of the file currently being edited?

M-x line-number-mode RET
 
> Secondly, how does one find a matching opening brace, paren, etc?

It's  automatic. When  you  close a  paren,  the cursor  moves to  the
matching  opening paren.   Or, if  you double-click  on one  paren, it
selects all  its contents and  the matching paren  too. Or if  you use
backward-sexp or forward-sexp (C-c , or C-c .), it moves over matching
paren.
 
> Finally, in editing a document where it's reasonable for "<" to
> be unpaired (as in javascript code inside an html document), how
> does one find the opening prace, paren, etc.

I don't  think modes can be  defined locally.  In these  cases, I just
change the major mode.  It may help to use narrow-region and widen.
 

-- 
__Pascal_Bourguignon__                              .  *   * . * .* .
http://www.informatimago.com/                        .   *   .   .*
There is no worse tyranny than to force             * .  . /\  ()  . *
a man to pay for what he does not                    . .  / .\   . * .
want merely because you think it                    .*.  / *  \  . .
would be good for him. -- Robert Heinlein             . /*   o \     .
http://www.theadvocates.org/                        *   '''||'''   .
SCO Spam-magnet: postmaster@sco.com                 ******************

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: a couple of novice questions
  2003-12-12 17:22 ` Pascal Bourguignon
@ 2003-12-12 19:02   ` Peter Lee
  2003-12-14 12:51     ` Oliver Scholz
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Lee @ 2003-12-12 19:02 UTC (permalink / raw)


>>>> Pascal Bourguignon writes:

    >> Secondly, how does one find a matching opening brace, paren,
    >> etc?

    Pascal> It's automatic. When you close a paren, the cursor moves
    Pascal> to the matching opening paren.  Or, if you double-click on
    Pascal> one paren, it selects all its contents and the matching
    Pascal> paren too. Or if you use backward-sexp or forward-sexp
    Pascal> (C-c , or C-c .), it moves over matching paren.
 
I use C-M-p (backward-list) and C-M-n (forward-list).

,----[ C-h f backward-list RET ]
| backward-list is an interactive compiled Lisp function in `emacs-lisp/lisp'.
| It is bound to C-M-p.
| (backward-list &optional ARG)
| 
| Move backward across one balanced group of parentheses.
| With ARG, do it that many times.
| Negative arg -N means move forward across N groups of parentheses.
| 
`----

Also you can look at:

,----[ C-h v blink-matching-paren RET ]
| blink-matching-paren's value is t
| 
| *Non-nil means show matching open-paren when close-paren is inserted.
| 
| You can customize this variable.
| 
| Defined in `simple'.
`----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: a couple of novice questions
  2003-12-12 16:31 a couple of novice questions Mitch Edelman
  2003-12-12 17:22 ` Pascal Bourguignon
@ 2003-12-14 12:25 ` Brad Collins
  1 sibling, 0 replies; 6+ messages in thread
From: Brad Collins @ 2003-12-14 12:25 UTC (permalink / raw)


edelman@umbc.edu (Mitch Edelman) writes:


> Secondly, how does one find a matching opening brace, paren, etc?
>

Try this in your .emacs

;; Blink the parent character
(defun start-flashparen()
  (progn
    (require `flash-paren)
    (flash-paren-mode 1)))

b/


--
Brad Collins
Chenla Labs
Bangkok, Thailand

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: a couple of novice questions
  2003-12-12 19:02   ` Peter Lee
@ 2003-12-14 12:51     ` Oliver Scholz
  2003-12-15  8:44       ` Klaus Berndl
  0 siblings, 1 reply; 6+ messages in thread
From: Oliver Scholz @ 2003-12-14 12:51 UTC (permalink / raw)


Peter Lee <pete_lee@swbell.net> writes:

>>>>> Pascal Bourguignon writes:
>
>     >> Secondly, how does one find a matching opening brace, paren,
>     >> etc?
>
>     Pascal> It's automatic. When you close a paren, the cursor moves
>     Pascal> to the matching opening paren.  Or, if you double-click on
>     Pascal> one paren, it selects all its contents and the matching
>     Pascal> paren too. Or if you use backward-sexp or forward-sexp
>     Pascal> (C-c , or C-c .), it moves over matching paren.
>  
> I use C-M-p (backward-list) and C-M-n (forward-list).
[...]

I use M-x show-paren-mode.  This highlights the paren at point and
its opening/closing counterpart, if any.

    Oliver
-- 
24 Frimaire an 212 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: a couple of novice questions
  2003-12-14 12:51     ` Oliver Scholz
@ 2003-12-15  8:44       ` Klaus Berndl
  0 siblings, 0 replies; 6+ messages in thread
From: Klaus Berndl @ 2003-12-15  8:44 UTC (permalink / raw)


On Sun, 14 Dec 2003, Oliver Scholz wrote:



>  Peter Lee <pete_lee@swbell.net> writes:
>  
> >>>>> Pascal Bourguignon writes:
> >
> >     >> Secondly, how does one find a matching opening brace, paren,
> >     >> etc?
> >
> >     Pascal> It's automatic. When you close a paren, the cursor moves
> >     Pascal> to the matching opening paren.  Or, if you double-click on
> >     Pascal> one paren, it selects all its contents and the matching
> >     Pascal> paren too. Or if you use backward-sexp or forward-sexp
> >     Pascal> (C-c , or C-c .), it moves over matching paren.
> >  
> > I use C-M-p (backward-list) and C-M-n (forward-list).
>  [...]
>  
>  I use M-x show-paren-mode.  This highlights the paren at point and
>  its opening/closing counterpart, if any.

Or you can use the more sophisticated mic-paren.el which you can download from
http://www.emacswiki.org/elisp/index.html ....

Klaus

>  
>      Oliver

-- 
Klaus Berndl			mailto: klaus.berndl@sdm.de
sd&m AG				http://www.sdm.de
software design & management	
Carl-Wery-Str. 42, 81739 Muenchen, Germany
Tel +49 89 63812-392, Fax -220

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-12-15  8:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-12 16:31 a couple of novice questions Mitch Edelman
2003-12-12 17:22 ` Pascal Bourguignon
2003-12-12 19:02   ` Peter Lee
2003-12-14 12:51     ` Oliver Scholz
2003-12-15  8:44       ` Klaus Berndl
2003-12-14 12:25 ` Brad Collins

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.