unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re:writing new speedbar-modes
       [not found] <mailman.923156.1354970579.854.help-gnu-emacs@gnu.org>
@ 2012-12-08 13:34 ` damien.thiriet77
  2012-12-08 13:52 ` extended regexp damien.thiriet77
       [not found] ` <mailman.14869.1354974731.855.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 4+ messages in thread
From: damien.thiriet77 @ 2012-12-08 13:34 UTC (permalink / raw)
  To: help-gnu-emacs

I remember reading on an emacs-blog something about the sauron mode that might interest you. Have a look at its code (but I am not sure this is a speedbar however)…

Damien Thiriet


> 
> On Sat, Dec 8, 2012 at 4:04 AM, Eli Zaretskii  wrote:
> >> Date: Fri, 7 Dec 2012 21:09:19 -0500
> >> From: Matt Price 
> >>
> >> I need towrite a new major mode for speedbar (for the Scrivener
> >> project I've described elsewhere on this list), but it looks a little
> >> harder than I can handle on my own. Has anyone out there done this
> >> already, or can you point me to an example that might be relatively
> >> easy to follow? I'd really appreciate it!
> >
> > Forgive me for asking the obvious, but did you read the "Extending"
> > chapter of the Speedbar manual? That manual comes with Emacs.
> >
> > If the above chapter doesn't give you enough information, please
> > consider submitting a documentation bug report.
> >
> I did read it, but I don't understand big parts of it. I can file a
> bug I guess, but what might help me would be to see a real example of
> a major mode, after which I can start editing the work of a competent
> coder...
> 
> I will go ahead and file a bug, though.
> 
> thanks,
> matt
> 
> 
> 
> ------------------------------
> 
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-gnu-emacs
> 
> 
> End of help-gnu-emacs Digest, Vol 121, Issue 16
> ***********************************************
> 

Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net



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

* extended regexp
       [not found] <mailman.923156.1354970579.854.help-gnu-emacs@gnu.org>
  2012-12-08 13:34 ` Re:writing new speedbar-modes damien.thiriet77
@ 2012-12-08 13:52 ` damien.thiriet77
       [not found] ` <mailman.14869.1354974731.855.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 4+ messages in thread
From: damien.thiriet77 @ 2012-12-08 13:52 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,


I have been recently doing a lot of regexp with grep, sed and emacs and I think differences between regexp syntax of those programs are a bit confusing (I am using GNU sed, GNU grep and GNU emacs). Extended regexp somehow unify these syntaxes, and I would link to know if there is a way to implement them in emacs regexp search and replace. I would like to do so for another reason: I have quite often to escape ( and { in my regexp, which is quite tedious. Of course, I suppose the default behaviour of ( in regexp is connected with lisp syntax, but I mostly use search-replace in texts with few (). I made a research in both emacs info manual and emacs wiki and couldn’t find anything on it. As far as I remember, vim has got such extended regexp-like functions.

If there is no extended-regexp functions nor mode avalaible, I may send a feature request for it (the idea would be to have a regexp variable for usual or extended search and replace). However, do you think someone else might be interested by such a behaviour? 


Damien Thiriet




Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net



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

* Re: extended regexp
       [not found] ` <mailman.14869.1354974731.855.help-gnu-emacs@gnu.org>
@ 2012-12-10 15:05   ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2012-12-10 15:05 UTC (permalink / raw)
  To: help-gnu-emacs

> If there is no extended-regexp functions nor mode avalaible, I may
> send a feature request for it (the idea would be to have a regexp variable
> for usual or extended search and replace).  However, do you think someone
> else might be interested by such a behaviour?

We'd be happy to use a cleaner regexp syntax, but doing it without
breaking backward compatibility is tricky, unless you go the
`rx' route.  E.g. provide a new function/macro (call it `re') which
converts between your new syntax and the old one.


        Stefan


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

* Re: extended regexp
       [not found] <mailman.191.1355158842.18015.help-gnu-emacs@gnu.org>
@ 2012-12-11  5:23 ` Jon Oddie
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Oddie @ 2012-12-11  5:23 UTC (permalink / raw)
  To: help-gnu-emacs


>> If there is no extended-regexp functions nor mode avalaible, I may
>> send a feature request for it (the idea would be to have a regexp variable
>> for usual or extended search and replace).  However, do you think someone
>> else might be interested by such a behaviour?
> 
> We'd be happy to use a cleaner regexp syntax, but doing it without
> breaking backward compatibility is tricky, unless you go the
> `rx' route.  E.g. provide a new function/macro (call it `re') which
> converts between your new syntax and the old one.
> 

FWIW, I started work on something like this a while back, called
`pcre2el'[1]. It is a bit misnamed, since the majority of PCRE is too
difficult to support by simple translation to Emacs native regexes,
but it does cover the simple cases.  It also converts the string forms
to `rx' syntax, and extends the RE-Builder to handle these
conversions, so you can use C-c TAB to switch transparently between
PCRE-like, Emacs and rx syntax.



    Jon

[1] https://github.com/joddie/pcre2el




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

end of thread, other threads:[~2012-12-11  5:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.923156.1354970579.854.help-gnu-emacs@gnu.org>
2012-12-08 13:34 ` Re:writing new speedbar-modes damien.thiriet77
2012-12-08 13:52 ` extended regexp damien.thiriet77
     [not found] ` <mailman.14869.1354974731.855.help-gnu-emacs@gnu.org>
2012-12-10 15:05   ` Stefan Monnier
     [not found] <mailman.191.1355158842.18015.help-gnu-emacs@gnu.org>
2012-12-11  5:23 ` Jon Oddie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).