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

Re: saving a buffer without images

In [emacs-w3m : No.12603]
	On Thu, 08 Sep 2016 00:31:36 -0400, Boruch Baum <boruch_baum@xxxxxxx> wrote:
> OK. How's this?:

> (defcustom w3m-save-buffer-html-only nil
>   "Save images along with a web-page, or just html.
> (defun w3m-save-buffer (name &optional no-images)
>   "Save the current w3m buffer.

Excellent!  I've installed these improvements and the code that
handles w3m-save-buffer-html-only.  Thanks.

>> (defadvice w3m-save-buffer (around switch-no-image-flag

> I wouldn't do it that way, but you certainly know the codebase better.
> My reason is that I understood defadvice to be a tool to use by person
> B to alter person A's function without redefining it, thus keeping the
> function's orignal code for other users or other purposes. If that's
> correct, then it's not the tool for you, since you are the developer
> who is updating your own function. I suspect that it's also much less
> efficient, if that ever is an issue.

Why I offered that advice was that simply I didn't want to remove
the history manipulating part. So, I don't care about it any more.