File: tips_and_tricks.html

package info (click to toggle)
tup 0.8-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,076 kB
  • sloc: ansic: 256,651; sh: 19,101; perl: 184; python: 67; lisp: 63; makefile: 56
file content (33 lines) | stat: -rw-r--r-- 1,876 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<h2>tup-mode for emacs</h2>
<a href="https://github.com/ejmr/tup-mode">Tup Mode</a> is a major mode for Emacs made for editing Tupfiles. It provides syntax highlighting for Tupfiles, and has key bindings for the most commonly used tup commands.
<p>Created by Eric James Michael Ritz.</p>

<h2>emacs compile command</h2>
<p>The following horrible snippet seems to work for tup, while still
being compatible with make. It can be put in an .emacs (place the cursor at the end and press C-x C-e to evaluate it without leaving emacs (Usually: M = Alt, C = Ctrl))</p>

<pre class="code">(setq compilation-directory-matcher
  '("\\(?:\\(?:Entering\\|Leavin\\(g\\)\\) directory
`\\(.+\\)'$\\)\\|\\(?:[^]^[]*\\][[:space:]]*\\(\\(?:[[:alnum:]]*/\\)+\\)\\)\\|\\(?:^\\(\\[\\)\\)"
(2 . 1) (3 . 9) (4 . 4)))
</pre>

<p>To try it out type:</p>

<pre class="code">M-x compile [enter] cd /top/level/of/project/with/errors/ ; tup [enter]
</pre>

<p>And for handling colors in emacs:</p>
<pre class="code">(require 'ansi-color)
(defun colorize-compilation-buffer ()
  (toggle-read-only)
  (ansi-color-apply-on-region (point-min) (point-max))
  (toggle-read-only))
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
</pre>
<p>Sent in by Sigurd Meldgaard.</p>

<h2>fuse and gvfs</h2>
<p>Tup uses a temporary fuse filesystem to watch the files accessed by sub-programs. The GNOME virtual filesystem, gvfs, may see this filesystem and attempt to access it to display an icon on the desktop. If you want to remove this icon, you may try disabling this feature by setting the following Nautilus property:</p>
<pre><span class="prompt">$</span> gconftool-2 --type bool --set /apps/nautilus/desktop/volumes_visible 'false'</pre>
<p>This will disable all "mounted folders". Unfortunately this is all-or-nothing solution. You'll not see any mounted folders (including ones from /media).</p>