Fandom

Sawfish

No more Control-l

773pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Browse all patches

Author Edit

Teika kazura

Synopsis Edit

This patch removes Control-l (printed ^L in less, emacs, etc) in source files. The affected files are:

  • C-sources
  • lisp files
  • OPTIONS, TODO
  • po/sawfish-xgettext
  • scripts/sawfish-menu.jl
  • themes/Crux/theme.jl, themes/smaker/theme.jl

COPYING and themes/mxflat/GPL are omitted.

No other files contain them. (Of course excluding images and sounds.)

Pros Edit

  • Control-l annoys patch submitters.
  • Developpers who don't know what this Control-l is remain puzzled during their work.

I fall into both of these categories :).

What is control-l? Edit

Theory later. As far as I learned, it acts in practice as the 'page-delimiter' in emacs, so that you can jump forward/backward to ^L with C-x ] / [.

The shortcoming is that you have to maintain the location manually in order to keep each page size moderate. Such method, and the idea of embedding control codes directly into the source seem quite outdated.

Control-l is defined as 'form feed' and called 'FF', and if I remember correctly, it was used as the actual page delimiter for printers in pre-historic era. In regex, it is '\f'.

See

$ man 4 console_codes

in Linux, for example, for further info.

Patch testing Edit

  1. Copy/paste the patch listed below into some file, eg. TEST.diff.
  2. If you don't have sawfish sources yet, have one, as described get it from GIT repo.
  3. Go into the directory where sawfish sources reside, eg. cd sawfish
  4. Test if the patch applies cleanly with this command:
    patch -p1 --ignore-whitespace --dry-run < TEST.diff
    in case of problems try also: -p0 or -p2
  5. If it applies cleanly, then remove the --dry-run from above command and run it again, otherwise ask on the mailing list.
  6. Compile sawfish: ./autogen.sh && make
  7. Install it for testing, but it depends on your linux distribution.
    1. It is always better to install sawfish as your distribution package, but it is different for each distribution.
    2. So you may try make install, which will install sawifish in /usr/local/share/sawfish/ (if you have write access). But then make sure that you run the correct version and delete it from that directory afterwards, to avoid any conflicts.
  8. Se also

PS: edit this template if you feel that those instructions can be improved.

Patch Edit

Because it is 61k, I don't show it here. It is available at http://images2.wikia.nocookie.net/sawfish/images//b/be/Patch-no-more-control-l.jl

Sorry that it has extension 'jl'. It is actually a patch, but I had to specify an extension to upload the file.

It is hosted at the page File:Patch-no-more-control-l.jl

I have confirmed that the patch is correct, by seeing

cat patch | grep -v -e "^---" | grep -e "^-" | grep -v -P -e "-\f"

print none, so the only effect is the deletion of ^L + \n.

Community's reasons for inclusion or rejection Edit

When voting anonymously please write your name, so that it can be associated with your posts on the mailing list. If you are logged in you can sign yourself by typing four tilda characters: ~~~~.

  • Please vote with: Yes vote: yes., No vote: no., Try vote: let's try in experimental., Wtf vote: pondering. or Suspend wait for next release.
  • Wtf vote: pondering. you replace all ^L with an empty line, so there are now holes with two empty lines in the code, you should correct your patch. Flashrider [Christopher Bratusek] 06:32, 2 November 2008 (UTC)
    • OK, I updated the patch fulfilling your advice. Thanks. - Teika kazura 06:58, 4 November 2008 (UTC)

Also on Fandom

Random Wiki