all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Daiki Ueno <ueno@unixuser.org>
Cc: 7252@debbugs.gnu.org
Subject: bug#7252: hexl-revert-buffer
Date: Wed, 20 Oct 2010 12:18:53 -0400	[thread overview]
Message-ID: <jwveibkg7rp.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m3mxq9jtja.fsf-ueno@unixuser.org> (Daiki Ueno's message of "Wed,  20 Oct 2010 14:57:13 +0900")

> If I open a ZIP file with M-x hexl-find-file and then M-x revert-buffer,
> I see hexified file list generated by arc-mode, instead of raw ZIP data.

> This behavior is surprising for me and it is cumbersome to do M-x
> kill-buffer and M-x hexl-find-file each time.

> How about adding M-x hexl-revert-buffer?

No, we should tweak revert-buffer-function instead.

> +  (if (eq major-mode 'hexl-mode)

Use derived-mode-p rather than looking at major-mode.

> +      (let ((coding-system-for-read 'no-conversion))
> +	(revert-buffer nil nil t)
> +	(setq major-mode 'fundamental-mode)

Why is this setq needed (IOW please add a comment explaining why it's
needed).


        Stefan





  reply	other threads:[~2010-10-20 16:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20  5:57 bug#7252: hexl-revert-buffer Daiki Ueno
2010-10-20 16:18 ` Stefan Monnier [this message]
2010-10-21  2:00   ` Daiki Ueno
2010-10-21  2:20     ` Stefan Monnier
2010-10-21  2:42       ` Daiki Ueno
2010-10-21 17:53         ` Stefan Monnier
2010-10-22  1:15           ` Daiki Ueno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwveibkg7rp.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=7252@debbugs.gnu.org \
    --cc=ueno@unixuser.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.