Re: [Libreoffice] [SCRIPT, EASYHACK] add-modelines, a script to add modelines to source files

2010-10-13 Thread Sebastian Spaeth
On 2010-10-12, some...@boldandbusted.com wrote:
 Sweet! Glad I could help. A couple questions:

Well, it isn't checked in yet :-). And I am not one with commit access
(neither do I plan to get it).
 
 * What shell environment were you running the script under which gave
 you the -z option sadness?

/bin/sh is a symlink to /bin/dash under debian/ubuntu.

 * Did you commit my original unchanged version to git, then commit your
 changes, or only commit the version with your changes (awk removal,
 etc.) and not the original I posted? (I'd like to know that my original
 version, warts and all, was committed for posterity. :) )

If you look at the gist link, you'll see 2 revisions. The first is your
original v0.7 as you posted, the second one is the version that I used
in the end. I thought gist.github would automatically show the diffs,
but it seems it doesn't.

Just one note, I did not commit your script to any libO repository (I
don't have the rights, nor would I know where this should go). I just
posted it to the gist thingie to allow others to access the version I
used (and spot the flaws that I am sure to have introduced ;-) ).

 * Yah, sorry about the extra spaces. I actually meant to remove that. I
 had that in so I could be sure that I wasn't damaging other data.

No problem,

 * If you see that set -o posix thing again, just remove it to run
 under /bin/sh. The set -o posix actually makes Bash behave like
 /bin/sh. I didn't know that /bin/sh would barf on it, so I'll consider
 this command a debugging command.

As I said, /bin/sh is dash really, and I know it isn't as complete as
bash (which is the whole meaning of the thing).

Sebastian
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [SCRIPT, EASYHACK] add-modelines, a script to add modelines to source files

2010-10-12 Thread Sebastian Spaeth
On 2010-10-11, some...@boldandbusted.com wrote:
 However, the script as I last sent it (version 0.7) works to cover the
 original EasyHack spec.

I ran v07 on the various git repos and attached the resulting git
patches at https://bugs.freedesktop.org/show_bug.cgi?id=30794

Please someone (I assigned to Kendy as per IRC discussion, so that would
be him :-)) apply these patches.

The script is fine, but my /bin/sh did not like set -o posix so I made
it run as /bin/bash. Also the -z option would not add new modelines but
really only overwrite existing ones spewing out lots of mv... file not
found errors which puzzled me a lot.

Otherwise it's an excellent piece of work :-). Please apply before the
patches get old :).

Sebastian
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [SCRIPT, EASYHACK] add-modelines, a script to add modelines to source files

2010-10-12 Thread Sebastian Spaeth
 I ran v07 on the various git repos and attached the resulting git
 patches at https://bugs.freedesktop.org/show_bug.cgi?id=30794

Uploaded the slightly modified form which I used to create v2 of the
modeline patches:
https://gist.github.com/61/a3a6199b21189a0d19f32843f35934fc53699d05

As per Kendy's request it does not introduce a newline after the emacs
modeline and it only inserts an empty line before the vim modeline if
there had been none before.

I did it probably in the most clumsily way (as a result doing away with
the awk usage, awk always gives me the creeps :-)), anyway I wanted to
share my version of add-modelines.

Sebastian
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [SCRIPT, EASYHACK] add-modelines, a script to add modelines to source files

2010-10-12 Thread someone
On Tue, 12 Oct 2010 12:37 +0200, Sebastian Spaeth
sebast...@sspaeth.de wrote:
 On 2010-10-11, some...@boldandbusted.com wrote:
  However, the script as I last sent it (version 0.7) works to cover the
  original EasyHack spec.
 
 I ran v07 on the various git repos and attached the resulting git
 patches at https://bugs.freedesktop.org/show_bug.cgi?id=30794
 
 Please someone (I assigned to Kendy as per IRC discussion, so that would
 be him :-)) apply these patches.
 
 The script is fine, but my /bin/sh did not like set -o posix so I made
 it run as /bin/bash. Also the -z option would not add new modelines but
 really only overwrite existing ones spewing out lots of mv... file not
 found errors which puzzled me a lot.
 
 Otherwise it's an excellent piece of work :-). Please apply before the
 patches get old :).
 
 Sebastian
 

Hi Sebastian,

Sweet! Glad I could help. A couple questions:

* What shell environment were you running the script under which gave
you the -z option sadness?
* Did you commit my original unchanged version to git, then commit your
changes, or only commit the version with your changes (awk removal,
etc.) and not the original I posted? (I'd like to know that my original
version, warts and all, was committed for posterity. :) )
* Yah, sorry about the extra spaces. I actually meant to remove that. I
had that in so I could be sure that I wasn't damaging other data.
* If you see that set -o posix thing again, just remove it to run
under /bin/sh. The set -o posix actually makes Bash behave like
/bin/sh. I didn't know that /bin/sh would barf on it, so I'll consider
this command a debugging command.

Cheers,

Jesse Adelman
San Francisco, CA
Bold and Busted LLC
http://www.boldandbusted.com/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [SCRIPT, EASYHACK] add-modelines, a script to add modelines to source files

2010-10-11 Thread Caolán McNamara
On Mon, 2010-10-11 at 01:30 -0600, Tor Lillqvist wrote:
  as well. It was the vim one at the bottom I was interested in. I don't
  think (though I'm open to correction) that emacs reads mode lines unless
  they are the start of the file, so those lines don't do anything.
 
 See 
 http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables
 
 There are two different ways to specify local variables to be used in a 
 buffer visiting a file:

Aha, what it boils down to, right, is that the emacs mode lines in that
sw/source/filter/ww8/ww8atr.cxx and friends won't be used by emacs
seeing as its neither pattern.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [SCRIPT, EASYHACK] add-modelines, a script to add modelines to source files

2010-10-11 Thread Thorsten Behrens
Caolán McNamara wrote:
 Aha, what it boils down to, right, is that the emacs mode lines in that
 sw/source/filter/ww8/ww8atr.cxx and friends won't be used by emacs
 seeing as its neither pattern.
 
So let's remove them - added to the list of EasyHack topics.

Cheers,

-- Thorsten


pgp8jCrt0GLq1.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice