unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* viewing log files (mainly _^H)
@ 2003-12-04  6:15 Sergei Pokrovsky
  2003-12-04  8:45 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Sergei Pokrovsky @ 2003-12-04  6:15 UTC (permalink / raw)


Some shell log files I have to view contain underlined output
(_^HA etc).  I suppose there should be a viewing mode for such output
(in man, shell etc; but is it available as a separate function?).

TIA
-- 
Sergei

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: viewing log files (mainly _^H)
  2003-12-04  6:15 viewing log files (mainly _^H) Sergei Pokrovsky
@ 2003-12-04  8:45 ` Eli Zaretskii
       [not found] ` <mailman.1025.1070531138.399.help-gnu-emacs@gnu.org>
  2003-12-04 19:17 ` Stefan Monnier
  2 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2003-12-04  8:45 UTC (permalink / raw)


> From: Sergei Pokrovsky <pok@none.nowhere.invalid>
> Newsgroups: gnu.emacs.help
> Date: Thu, 04 Dec 2003 12:15:46 +0600
> 
> Some shell log files I have to view contain underlined output
> (_^HA etc).  I suppose there should be a viewing mode for such output
> (in man, shell etc; but is it available as a separate function?).

Try "M-x Man-fontify-manpage RET".  (There's also a similar function
woman-man-buffer in woman.el that you may wish to try.)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: viewing log files (mainly _^H)
       [not found] ` <mailman.1025.1070531138.399.help-gnu-emacs@gnu.org>
@ 2003-12-04  9:18   ` Sergei Pokrovsky
  2003-12-04 15:41     ` Eli Zaretskii
       [not found]     ` <mailman.1050.1070556275.399.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Sergei Pokrovsky @ 2003-12-04  9:18 UTC (permalink / raw)


>>>>> "EZ" == Eli Zaretskii <eliz@elta.co.il> writes:

  EZ> Man-fontify-manpage RET". 

Yes, it does what I need.  Thank you, Eli.

The only problem is that it modifies the buffer; but I can do with it.
In fact, I expected something like "font-lock" -- but may be it is not
adequate for the task.

  EZ> (There's also a similar function woman-man-buffer in woman.el
  EZ> that you may wish to try.)

Maybe later.

-- 
Sergei

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: viewing log files (mainly _^H)
  2003-12-04  9:18   ` Sergei Pokrovsky
@ 2003-12-04 15:41     ` Eli Zaretskii
       [not found]     ` <mailman.1050.1070556275.399.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2003-12-04 15:41 UTC (permalink / raw)


> From: Sergei Pokrovsky <pok@none.nowhere.invalid>
> Newsgroups: gnu.emacs.help
> Date: Thu, 04 Dec 2003 15:18:31 +0600
> 
> The only problem is that it modifies the buffer; but I can do with it.

"M-~" should take care of that, as you probably know already ;-)

> In fact, I expected something like "font-lock"

You could try hi-lock-mode (and define ^H.*^H as a pattern to
highlight with "M-x highlight-regexp"), but that would leave those
ugly ^H characters visible.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: viewing log files (mainly _^H)
       [not found]     ` <mailman.1050.1070556275.399.help-gnu-emacs@gnu.org>
@ 2003-12-04 17:09       ` Kevin Rodgers
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2003-12-04 17:09 UTC (permalink / raw)


Eli Zaretskii wrote:

> You could try hi-lock-mode (and define ^H.*^H as a pattern to
> highlight with "M-x highlight-regexp"), but that would leave those
> ugly ^H characters visible.

What if you hid them using the display table?


(or buffer-display-table
     ;; Don't let disp-table.el overwrite standard-display-table:
     (let ((standard-display-table standard-display-table))
       (setq buffer-display-table (make-display-table))))
;; Make ^H invisible:
(aset buffer-display-table ?\^H [])

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: viewing log files (mainly _^H)
  2003-12-04  6:15 viewing log files (mainly _^H) Sergei Pokrovsky
  2003-12-04  8:45 ` Eli Zaretskii
       [not found] ` <mailman.1025.1070531138.399.help-gnu-emacs@gnu.org>
@ 2003-12-04 19:17 ` Stefan Monnier
  2 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2003-12-04 19:17 UTC (permalink / raw)


> Some shell log files I have to view contain underlined output
> (_^HA etc).  I suppose there should be a viewing mode for such output
> (in man, shell etc; but is it available as a separate function?).

You said you wanted a font-lock thingy ?
How about...

    (defvar foo-font-lock-keywords
      '(("\\(_\b\\)\\(.\\)" (1 '(face nil invisible t)) (2 'underline))
        ("\\(\\(.\\)\b\\)\\(\\2\\)" (1 '(face nil invisible t)) (3 'bold))))
    (define-derived-mode foo-mode fundamental-mode "Foo" "Foo viewing mode"
      (set (make-local-variable 'font-lock-defaults)
           '(foo-font-lock-keywords)))


-- Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-12-04 19:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-04  6:15 viewing log files (mainly _^H) Sergei Pokrovsky
2003-12-04  8:45 ` Eli Zaretskii
     [not found] ` <mailman.1025.1070531138.399.help-gnu-emacs@gnu.org>
2003-12-04  9:18   ` Sergei Pokrovsky
2003-12-04 15:41     ` Eli Zaretskii
     [not found]     ` <mailman.1050.1070556275.399.help-gnu-emacs@gnu.org>
2003-12-04 17:09       ` Kevin Rodgers
2003-12-04 19:17 ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).