GNU bug report logs - #6788
Documentation: `delete-region' should explicity mention its parameters.

Previous Next

Package: emacs;

Reported by: MON KEY <monkey <at> sandpframing.com>

Date: Tue, 3 Aug 2010 19:11:01 UTC

Severity: minor

Tags: fixed

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6788 in the body.
You can then email your comments to 6788 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6788; Package emacs. (Tue, 03 Aug 2010 19:11:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to MON KEY <monkey <at> sandpframing.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 03 Aug 2010 19:11:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: MON KEY <monkey <at> sandpframing.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Documentation: `delete-region' should explicity mention its 
	parameters.
Date: Tue, 3 Aug 2010 15:10:55 -0400
Documentation: `delete-region' should explicitly mention its parameters.

,----  (documentation 'delete-region)
|
| Delete the text between point and mark.
|
| When called from a program, expects two arguments,
| positions (integers or markers) specifying the stretch to be deleted.
|
`----

`delete-region' can be called-interactively and exists on the menu-bar:

(where-is 'delete-region t)
=> <menu-bar> <edit> <clear> (delete-region)

But doesn't have a default global key-binding (at least w/ Emacs 23.2).

While it is reasonable that the docs indicate the _command_ will:

 "Delete the text between point and mark."

The docstring should also explicitly mention the parameters elsewhere
as delete region can be called programmatically (and probably more
often so than from user input).  The following portion:

 "When called from a program, expects two arguments, positions
  (integers or markers) specifying the stretch to be deleted."

Would be better stated as:

 "When called from a program, the arguments START and END are buffer
  positions (integers or markers) specifying a region to delete."

Additionally, to the extent with which this function is presented as a
user command i.e. as indicated by it's accessibility from the menu-bar
and by the docstring's opening phraseology; I would propose that some
indication be given that the delete-region _command_ does not alter
the kill-ring in a like manner as the `kill-region' command by stating:

 "Delete the text between point and mark.
  This command deletes buffer text without modifying the kill ring."

Providing such an indication would be in keeping with the current
docstring of `kill-region's second sentence:

 "Kill ("cut") text between point and mark.
 This deletes the text from the buffer and saves it in the kill ring."

--
/s_P\




Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 14 Jul 2011 13:42:01 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.1, send any further explanations to 6788 <at> debbugs.gnu.org and MON KEY <monkey <at> sandpframing.com> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 14 Jul 2011 13:42:01 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6788; Package emacs. (Thu, 14 Jul 2011 14:03:06 GMT) Full text and rfc822 format available.

Message #12 received at 6788 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: MON KEY <monkey <at> sandpframing.com>
Cc: 6788 <at> debbugs.gnu.org
Subject: Re: Documentation: `delete-region' should explicity mention its
	parameters.
Date: Thu, 14 Jul 2011 15:41:20 +0200
MON KEY <monkey <at> sandpframing.com> writes:

> While it is reasonable that the docs indicate the _command_ will:
>
>  "Delete the text between point and mark."
>
> The docstring should also explicitly mention the parameters elsewhere
> as delete region can be called programmatically (and probably more
> often so than from user input).  The following portion:
>
>  "When called from a program, expects two arguments, positions
>   (integers or markers) specifying the stretch to be deleted."

I've now clarified the doc string in Emacs 24.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 12 Aug 2011 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.