From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: compile buffer: hide/collapse displayed file paths? Date: Sat, 29 Jun 2013 14:36:12 +0200 Message-ID: <874nch9jr7.fsf@zigzag.favinet> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1372509241 11056 80.91.229.3 (29 Jun 2013 12:34:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Jun 2013 12:34:01 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Grant Edwards Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 29 14:34:02 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UsuLp-0000QG-JW for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Jun 2013 14:34:01 +0200 Original-Received: from localhost ([::1]:55706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsuLp-0000SY-5z for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Jun 2013 08:34:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsuLd-0000SC-MG for help-gnu-emacs@gnu.org; Sat, 29 Jun 2013 08:33:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsuLc-0001NQ-Pq for help-gnu-emacs@gnu.org; Sat, 29 Jun 2013 08:33:49 -0400 Original-Received: from smtp206.alice.it ([82.57.200.102]:38594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsuLc-0001NB-GB for help-gnu-emacs@gnu.org; Sat, 29 Jun 2013 08:33:48 -0400 Original-Received: from zigzag.favinet (79.51.69.230) by smtp206.alice.it (8.6.060.15) id 51CD43F000800D04; Sat, 29 Jun 2013 14:33:47 +0200 Original-Received: from ttn by zigzag.favinet with local (Exim 4.72) (envelope-from ) id 1UsuO6-0000Gs-9L; Sat, 29 Jun 2013 14:36:22 +0200 In-Reply-To: (Grant Edwards's message of "Fri, 28 Jun 2013 23:05:16 +0000 (UTC)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.102 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91849 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain () Grant Edwards () Fri, 28 Jun 2013 23:05:16 +0000 (UTC) Is there any way to collapse/hide the file paths being shown in the compiler buffer window so that I can see the compiler error/warning messages without all the keyboard gymanstics? I use ovab.el, attached, on occasion. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=ovab.el Content-Transfer-Encoding: quoted-printable ;;; ovab.el ;;; ;;; Copyright (C) 2007, 2008 Thien-Thi Nguyen ;;; ;;; This file is part of ttn's personal elisp library, released under ;;; the terms of the GNU General Public License as published by the ;;; Free Software Foundation; either version 3, or (at your option) any ;;; later version. There is NO WARRANTY. See file COPYING for details. ;;; ;;; Description: Overl{a}y abbreviate default-directory and other things. (require 'cl) (defvar ovab-alist t "Specification for command `ovab'. If a non-cons ELEM, it is taken as the list (ELEM). Each non-cons ELEM in the list is taken as the pair (ELEM . \"\"). If ELEM is `t' it is taken as the pair (CWD . \"\"), where CWD is the value of `(expand-file-name default-directory)'. If ELEM is not a string, it is taken as the pair (STR . \"\"), where STR is the value of `(format \"%S\" ELEM)'. Otherwise each ELEM should be a pair of strings (FULL . ABBREV).") ;;;###autoload (defun ovab (&optional clear) "Overl{a}y abbreviate the current buffer according to `ovab-alist'. Sort the pairs of strings (FULL . ABBREV) by the length of FULL in decreasing order, and create an overlay for each FULL found in the buffer with `display' property the associated ABBREV. Prefix arg means to remove all `ovab'-created overlays, instead. All operations respect narrowing." (interactive "P") (remove-overlays nil nil 'ovab t) (unless clear (let* ((alist (if (consp ovab-alist) ovab-alist (list ovab-alist))) (normal (mapcar (lambda (elem) (if (consp elem) elem (cons (cond ((stringp elem) elem) ((eq t elem) (expand-file-name default-directory)) (t (format "%S" elem))) ""))) alist)) (changes (sort normal (lambda (a b) (> (length (car a)) (length (car b))))))) (overlay-recenter (point-max)) (save-excursion (dolist (change changes) (goto-char (point-min)) (while (search-forward (car change) nil t) (let* ((beg (match-beginning 0)) (end (match-end 0)) (cur (delete-if-not (lambda (ov) (overlay-get ov 'ovab)) (overlays-in beg end))) (ov (unless cur (make-overlay beg end)))) (when ov (overlay-put ov 'ovab t) (overlay-put ov 'display (cdr change)))))))))) (provide 'ovab) ;;; ovab.el ends here --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable After the compilation is finished, i manually type =E2=80=98M-x ovab RET=E2= =80=99. It's only on occasion because sometimes ignorance is bliss! :-D "Test failures? What tests? Errors? What errors? Compilation? What compiler? I just type code and =E2=80=98C-x C-s=E2=80=99, isn't that = enough?!" =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlHO1L8ACgkQZwMiJEyAdQKbSACdGWEHwA2bEYeAwPPAwZE1BLhj ksQAoLopQTCJQZE3VRRDS5nbDxxER8bg =F1r+ -----END PGP SIGNATURE----- --==-=-=--