unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Subject: gnus/html2text.el
Date: Sun, 24 Oct 2004 21:46:46 -0500 (CDT)	[thread overview]
Message-ID: <200410250246.i9P2kku06530@raven.dms.auburn.edu> (raw)

gnus/html2text.el calls `beginning-of-buffer', disguised as
`html2text-buffer-head' at several places _inside a loop_.
`beginning-of-buffer' should usually not be called from Lisp to begin
with, unless one really _wants_ to set the mark, but calling it
inside a loop completely ruins the mark ring (and probably slows
things down a lot too).  It should use (goto-char (point-min)), as
clearly explained in the beginning-of-buffer docstring.

Unfortunately, after grepping around a little bit, it would at first
view seem that such abuse of {beginning,end}-of-buffer and other mark
setting commands is even substantially more widespread than the kind
of abuses of `interactive-p' we have been looking at.  Whether
something is an abuse or not is not always obvious, because
occasionally one _really_ wants to set the mark from Lisp.
In the case of gnus/html2text.el it _is_ obvious, however.

Sincerely,

Luc.

             reply	other threads:[~2004-10-25  2:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-25  2:46 Luc Teirlinck [this message]
2004-10-25 17:18 ` gnus/html2text.el Reiner Steib
2004-10-26  9:04 ` gnus/html2text.el Richard Stallman
2004-10-26 16:43   ` gnus/html2text.el Stefan Monnier
2004-10-26 22:31     ` gnus/html2text.el Kim F. Storm
2004-10-27  1:35       ` gnus/html2text.el Stefan Monnier
2004-10-27  1:43         ` gnus/html2text.el Luc Teirlinck
2004-10-27  3:08           ` gnus/html2text.el Stefan Monnier
2004-10-27  3:24             ` gnus/html2text.el Luc Teirlinck
2004-10-27  3:32               ` gnus/html2text.el Luc Teirlinck
2004-10-27  1:45         ` gnus/html2text.el Miles Bader
2004-10-27 17:35         ` gnus/html2text.el Richard Stallman
2004-10-27  2:43   ` gnus/html2text.el Luc Teirlinck
2004-10-27  3:02   ` gnus/html2text.el Luc Teirlinck

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=200410250246.i9P2kku06530@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    /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 public inbox

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

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).