[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ktexteditor-devel
Subject:    Re: [PATCH] Teach katepart to understand emacs' "-*- coding: ... -*-"
From:       Joseph Wenninger <jowenn () kde ! org>
Date:       2008-08-29 6:57:51
Message-ID: 200808290857.51172.jowenn () kde ! org
[Download RAW message or body]

Hi !

This should be added to KDE 4 (with a corrected if statement). I wouldn't 
count it as a bugfix though, so I'm against adding it to KDE 3.

Are there limitations, where emacs looks for that line? Python uses the same 
way to define the  enoding of source files, but accepts it only in the first 
or the second source line, otherwise it is ignored. If emacs has the same 
limitations, that should be taken into account

To support more of the relativly popular editors, I'd suggest to add vim 
encoding detection too, it looks something like
# vim: set fileencoding=<encoding name> :
(see http://www.python.org/dev/peps/pep-0263/)

Joseph

On Thursday 28 August 2008 20:28:47 Christoph Cullmann wrote:
> On Thursday 28 August 2008 20:04:15 Dominik Haumann wrote:
> > On Thursday 28 August 2008, Vladimir V. Perepelitsa wrote:
> > >  void KateDocument::readVariableLine( QString t, bool
> > > onlyViewAndRenderer ) {
> > >    // simple check first, no regex
> > >    // no kate inside, no vars, simple...
> > > -  if (t.find("kate") < 0)
> > > +  if (t.find("kate") + t.find("-*-") < 0)
> > >      return;
> >
> > -1 + 0 = -1 < 0 -> does not always work ;)
> >
> > I leave it to cullmann to decide.
>
> I have no real problems for this to go in KDE 4.x, if KDE 3.x is open for
> such extensions is other thing. Perhaps ask on core-devel if ok, have no
> objections.
_______________________________________________
KTextEditor-Devel mailing list
KTextEditor-Devel@kde.org
https://mail.kde.org/mailman/listinfo/ktexteditor-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic