GNU bug report logs - #18478
24.4.50; doc string of `clone-indirect-buffer'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 14 Sep 2014 22:16:01 UTC

Severity: minor

Tags: fixed

Found in version 24.4.50

Fixed in version 25.1

Done: Lars 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 18478 in the body.
You can then email your comments to 18478 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 bug-gnu-emacs <at> gnu.org:
bug#18478; Package emacs. (Sun, 14 Sep 2014 22:16:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 14 Sep 2014 22:16:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; doc string of `clone-indirect-buffer'
Date: Sun, 14 Sep 2014 15:14:43 -0700 (PDT)
.. should say that it returns the indirect buffer created.

In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-08-15 on LEG570
Bzr revision: 117706 rgm <at> gnu.org-20140815043406-p5hbu97cbm7pulcn
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18478; Package emacs. (Wed, 17 Sep 2014 22:50:01 GMT) Full text and rfc822 format available.

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

From: Tom Willemse <tom <at> ryuslash.org>
To: 18478 <at> debbugs.gnu.org
Cc: drew.adams <at> oracle.com
Subject: [Patch] Mention the return value of `clone-indirect-buffer'
Date: Thu, 18 Sep 2014 00:49:18 +0200
[Message part 1 (text/plain, inline)]
Hey,

I hope it's ok that I'm replying to this bug.

I've attached a suggestion for mentioning the return value for
`clone-indirect-buffer'. Please let me know what you think.

[fix-18478.patch (text/x-diff, inline)]
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: tom <at> ryuslash.org-20140917220512-i61eqo2e0ir8dhdl
# target_branch: bzr://bzr.sv.gnu.org/emacs/trunk/
# testament_sha1: 14f39b93edb4937309c738111fb8220fc3776acd
# timestamp: 2014-09-18 00:10:58 +0200
# base_revision_id: eggert <at> cs.ucla.edu-20140917195831-xarn36t9318izhtl
# 
# Begin patch
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2014-09-17 09:17:27 +0000
+++ lisp/ChangeLog	2014-09-17 22:05:12 +0000
@@ -1,3 +1,7 @@
+2014-09-17  Tom Willemse  <tom <at> ryuslash.org>
+
+	* simple.el (clone-indirect-buffer): Mention the return value.
+
 2014-09-17  Reuben Thomas  <rrt <at> sc3d.org>
 
 	* progmodes/js.el: Add interpreter-mode-alist support for various

=== modified file 'lisp/simple.el'
--- lisp/simple.el	2014-08-28 01:59:29 +0000
+++ lisp/simple.el	2014-09-17 22:05:12 +0000
@@ -7577,7 +7577,9 @@
 This is always done when called interactively.
 
 Optional third arg NORECORD non-nil means do not put this buffer at the
-front of the list of recently selected ones."
+front of the list of recently selected ones.
+
+This function returns the newly created indirect buffer."
   (interactive
    (progn
      (if (get major-mode 'no-clone-indirect)

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWRFVfucAAiffgAAwUHP/91oG
BIC////wUAR28NGmxzklac2hJSmmFPFNN6AnpTxI8KNPUaA0DBlBMAEU/SE0bUAAaAABIkCmE0Ta
Kek21Q00aNDTQHqZMMNDQAAAaAAAAAEkUyNAmCMRNMJPU8ojIabINEDW8RUos8613hLcssjmq15g
GkWwhmzUh0Ut7GUCrDrL2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2IA8j1vJZwJSX8SS0AqdooyDSjHLCrnG6Hgd4InZdTG7F8AtGw
IQdtQsae6KELEgOW4IWJIRAGNa7YH/FPMJHSFcYpaW0NGE+F2Ba8+SeZmmU7jJEQkwfbHFdjcmCL
81icl5le5cxGZ4FUv7tR0/18BZCj3LxhGze2SYjTeKnoLuSKcKEgIqr9zg==

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18478; Package emacs. (Wed, 17 Sep 2014 22:56:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Tom Willemse <tom <at> ryuslash.org>, 18478 <at> debbugs.gnu.org
Subject: RE: [Patch] Mention the return value of `clone-indirect-buffer'
Date: Wed, 17 Sep 2014 15:55:14 -0700 (PDT)
> I've attached a suggestion for mentioning the return value for
> `clone-indirect-buffer'. Please let me know what you think.

Looks OK to me.  You can also simplify it to just "Returns...".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18478; Package emacs. (Wed, 17 Sep 2014 23:12:01 GMT) Full text and rfc822 format available.

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

From: Tom Willemse <tom <at> ryuslash.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 18478 <at> debbugs.gnu.org
Subject: Re: [Patch] Mention the return value of `clone-indirect-buffer'
Date: Thu, 18 Sep 2014 01:11:37 +0200
Hey Drew,

Drew Adams <drew.adams <at> oracle.com> writes:

>> I've attached a suggestion for mentioning the return value for
>> `clone-indirect-buffer'. Please let me know what you think.
>
> Looks OK to me.  You can also simplify it to just "Returns...".

Certainly, if that has your preference. I just thought that because it
is a new paragraph and the ones before it talk about the meanings of the
arguments it would be clearer to explicitly state it's about the
function.

I actually would have liked to start the docstring off with "Create and
return ..." as the docstring for `clone-buffer' does, but checkdoc then
started complaining about the line being more than 80 characters long.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18478; Package emacs. (Thu, 18 Sep 2014 01:48:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Tom Willemse <tom <at> ryuslash.org>
Cc: 18478 <at> debbugs.gnu.org
Subject: RE: [Patch] Mention the return value of `clone-indirect-buffer'
Date: Wed, 17 Sep 2014 18:47:01 -0700 (PDT)
> >> I've attached a suggestion for mentioning the return value for
> >> `clone-indirect-buffer'. Please let me know what you think.
> >
> > Looks OK to me.  You can also simplify it to just "Returns...".
> 
> Certainly, if that has your preference.

I have no preference.  And my preference doesn't count for anything.
I just reported the bug.

> I just thought that because it is a new paragraph and the ones
>  before it talk about the meanings of the arguments it would be
> clearer to explicitly state it's about the function.

Yes, but I don't see any chance for confusion there.  It is only
the function return value that matters. And arguments do not
"return".  They are evaluated, of course, and their values are
returned by that evaluation.  But we just speak of their "values".

> I actually would have liked to start the docstring off with "Create
> and return ..." as the docstring for `clone-buffer' does, but checkdoc
> then started complaining about the line being more than 80 characters
> long.

FWIW, I don't put a lot of stock in checkdoc, personally. ;-)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18478; Package emacs. (Thu, 18 Sep 2014 02:41:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 18478 <at> debbugs.gnu.org, Tom Willemse <tom <at> ryuslash.org>
Subject: Re: bug#18478: [Patch] Mention the return value of
 `clone-indirect-buffer'
Date: Wed, 17 Sep 2014 22:40:16 -0400
>> I actually would have liked to start the docstring off with "Create
>> and return ..." as the docstring for `clone-buffer' does, but checkdoc
>> then started complaining about the line being more than 80 characters
>> long.

> FWIW, I don't put a lot of stock in checkdoc, personally. ;-)

Its recommendations shouldn't be heeded blindly, indeed, but the
80-columns limit is something that should really be obeyed
whenever possible.


        Stefan


PS: Thanks Tom.  Your patch looks good, as does the one for
prog-mode-hook.  Hopefully someone else will get to install them before
I do.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18478; Package emacs. (Thu, 18 Sep 2014 04:06:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 18478 <at> debbugs.gnu.org, Tom Willemse <tom <at> ryuslash.org>
Subject: RE: bug#18478: [Patch] Mention the return value of
 `clone-indirect-buffer'
Date: Wed, 17 Sep 2014 21:05:24 -0700 (PDT)
> > FWIW, I don't put a lot of stock in checkdoc, personally. ;-)
> 
> Its recommendations shouldn't be heeded blindly, indeed, but the
> 80-columns limit is something that should really be obeyed
> whenever possible.

Agreed wrt respecting doc-string line-length conventions.

But 80 chars is the absolute limit.  Doc strings should really be 
quite a bit shorter than that.  `emacs-lisp-docstring-fill-column'
defaults to 65, for example.

The actual convention is this (from (elisp) `Documentation Tips'):

 Format the documentation string so that it fits in an Emacs window
 on an 80-column screen.  It is a good idea for most lines to be no
 wider than 60 characters.  The first line should not be wider than
            ^^^^^^^^^^^^^
 67 characters or it will look bad in the output of `apropos'.

 You can fill the text if that looks good.  Emacs Lisp mode fills
 documentation strings to the width specified by
 `emacs-lisp-docstring-fill-column'.  However, you can sometimes
 make a documentation string much more readable by adjusting its
 line breaks with care.  Use blank lines between sections if the
 documentation string is long.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18478; Package emacs. (Sat, 20 Sep 2014 23:52:02 GMT) Full text and rfc822 format available.

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

From: Tom Willemse <tom <at> ryuslash.org>
To: Drew Adams <drew.adams <at> oracle.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 18478 <at> debbugs.gnu.org
Subject: Re: bug#18478: [Patch] Mention the return value of
 `clone-indirect-buffer'
Date: Sun, 21 Sep 2014 01:50:59 +0200
[Message part 1 (text/plain, inline)]
Hey Drew, Stefan,

Thanks for both your responses. I've attached the same patch with the
simplification suggested by Drew. Whomever applies one can pick which
they prefer.

[fix-18478-2.patch (text/x-diff, inline)]
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: tom <at> ryuslash.org-20140920232659-ssj464v1st1f79od
# target_branch: bzr://bzr.sv.gnu.org/emacs/trunk/
# testament_sha1: fffb97df6a9ff5f3ca2f27f89d88d4797e7ab334
# timestamp: 2014-09-21 01:27:28 +0200
# base_revision_id: dgutov <at> yandex.ru-20140919173311-0sqv853yxogkno1j
# 
# Begin patch
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2014-09-19 17:33:11 +0000
+++ lisp/ChangeLog	2014-09-20 23:26:59 +0000
@@ -1,3 +1,7 @@
+2014-09-20  Tom Willemse  <tom <at> ryuslash.org>
+
+	* simple.el (clone-indirect-buffer): Mention the return value.
+
 2014-09-19  Dmitry Gutov  <dgutov <at> yandex.ru>
 
 	* emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate

=== modified file 'lisp/simple.el'
--- lisp/simple.el	2014-08-28 01:59:29 +0000
+++ lisp/simple.el	2014-09-20 23:26:59 +0000
@@ -7577,7 +7577,9 @@
 This is always done when called interactively.
 
 Optional third arg NORECORD non-nil means do not put this buffer at the
-front of the list of recently selected ones."
+front of the list of recently selected ones.
+
+Returns the newly created indirect buffer."
   (interactive
    (progn
      (if (get major-mode 'no-clone-indirect)

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWed9NqYAAi1fgAAwUHP/91oG
FIC////wUAR5XgTm1yhAEEkk0qfo1T9GEYBNMKj9SepmoPUNNAJVGKaaeU9TZT1GmgGgAAAAEoIT
SNHkkZpB6gABo0GgBgNAAANAAAAAAEkhMU2QBIT9TCh6mTaUZBp6noyKYWl7ukttey9ZvW3RoTTq
vjnQRYznqjYshW7Y+ZOp3EFRRduxN0Jbyq16kXVkMMuI3qW/sT2bWPQWI+6B9oRy93UcD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TJwzg
HuOQPZ8Lsg4sEN/C0tWpqmH+BcixaA0mDLFdCAMD6ZTosI6FiI1DuB7BzCo+guC8p0d24imE4JAZ
E1DMZh4cI/IYVqL/i7kinChIc76bUwA=
[Message part 3 (text/plain, inline)]
Cheers,

Tom

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18478; Package emacs. (Sun, 21 Sep 2014 22:11:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Tom Willemse <tom <at> ryuslash.org>
Cc: Drew Adams <drew.adams <at> oracle.com>, 18478 <at> debbugs.gnu.org
Subject: Re: bug#18478: [Patch] Mention the return value of
 `clone-indirect-buffer'
Date: Sun, 21 Sep 2014 18:10:07 -0400
> Thanks for both your responses. I've attached the same patch with the
> simplification suggested by Drew. Whomever applies one can pick which
> they prefer.

Thanks, installed,


        Stefan




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 30 Apr 2016 13:54:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 25.1, send any further explanations to 18478 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 30 Apr 2016 13:54:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 29 May 2016 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 78 days ago.

Previous Next


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