emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: best way to display alternate view of file


From: Eli Zaretskii
Subject: Re: best way to display alternate view of file
Date: Wed, 19 Apr 2017 17:49:09 +0300

> From: Aurélien Aptel <address@hidden>
> Date: Wed, 19 Apr 2017 15:45:08 +0200
> 
> I would like to use the regular mechanism (add a cons to the auto-load
> list for .pcap files) but I don't actually want to display the raw
> file, I want to use my function to show an "alternate" view of the
> file.
> 
> What's the idiomatic way to do a mode like this in Elisp?

I don't understand the nature of your difficulty.  The mode function
can do anything with the buffer; Emacs won't display the buffer until
the mode function does its thing and exits.  So if your mode function
produces an alternate view of the file, the raw view will never be
seen.

If the problem is that you want to produce the alternate view in
another buffer, you could use buffer-swap-text, like Rmail and Tar
mode do.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]