unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54865: 29.0.50; Unclear docstring 'switch-to-buffer'
@ 2022-04-11 22:22 dalanicolai
  2022-04-11 23:52 ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: dalanicolai @ 2022-04-11 22:22 UTC (permalink / raw)
  To: 54865

[-- Attachment #1: Type: text/plain, Size: 5158 bytes --]

The docstring of `switch-to-buffer` states:

"If BUFFER-OR-NAME is a string that does not identify an existing
buffer, create a buffer with that name."

However, this is only true when called interactively. Although the
previous paragraph is about interactive use, to me, it is not clear that
the 'relevant' paragraph is still only about interactive use.
(for example, I assume that the next paragraph about the NORECORD argument
is about general use)

It is no critical bug, but at least I guess it is nice to have it reported.


In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.31,
cairo version 1.17.4)
 of 2022-01-29 built on fedora
Repository revision: 96533c18b7f9d75dce9e6bb534a16ed4ccf44ad1
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora Linux 35 (Workstation Edition)

Configured using:
 'configure --with-modules --with-cairo --with-native-compilation
 --with-json'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM
GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Help

Minor modes in effect:
  marginalia-mode: t
  savehist-mode: t
  vertico-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  recentf-mode: t
  shell-dirtrack-mode: t
  evil-mode: t
  evil-local-mode: t
  windmove-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message yank-media rmc rfc822 mml
mml-sec epa epg rfc6068 epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr shortdoc debug backtrace
find-func imenu cl-print help-fns radix-tree image-mode dired
dired-loaddefs exif mule-util time-date cursor-sensor consult-vertico
consult bookmark pp format-all language-id inheritenv gitter derived
pcase let-alist posframe transient format-spec request autorevert
filenotify mail-utils notifications dbus avy shr-tag-pre-highlight
language-detection shr text-property-search pixel-fill kinsoku puny svg
xml ewoc marginalia savehist orderless vertico evil-surround
evil-nerd-commenter evil-nerd-commenter-operator evil-nerd-commenter-sdk
sgml-mode facemenu dom which-key bind-map recentf tree-widget wid-edit
evil evil-keybindings evil-integration evil-maps evil-commands reveal
flyspell ispell evil-jumps evil-command-window evil-types evil-search
evil-ex shell pcomplete comint ansi-color evil-macros evil-repeat
evil-states evil-core comp comp-cstr warnings rx advice evil-common
windmove thingatpt rect evil-digraphs evil-vars ring edmacro kmacro
undo-tree diff cl-extra help-mode use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
easy-mmode use-package-core finder-inf info package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars
seq gv subr-x byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib
chemacs iso-transl tooltip eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 384898 29104)
 (symbols 48 23623 0)
 (strings 32 128809 5607)
 (string-bytes 1 4615770)
 (vectors 16 228260)
 (vector-slots 8 1475141 114223)
 (floats 8 91020 141)
 (intervals 56 1457 297)
 (buffers 992 16))

[-- Attachment #2: Type: text/html, Size: 5641 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#54865: 29.0.50; Unclear docstring 'switch-to-buffer'
  2022-04-11 22:22 bug#54865: 29.0.50; Unclear docstring 'switch-to-buffer' dalanicolai
@ 2022-04-11 23:52 ` Drew Adams
  2022-04-12 10:23   ` Lars Ingebrigtsen
  2022-04-16  8:33   ` dalanicolai
  0 siblings, 2 replies; 7+ messages in thread
From: Drew Adams @ 2022-04-11 23:52 UTC (permalink / raw)
  To: dalanicolai, 54865@debbugs.gnu.org

> "If BUFFER-OR-NAME is a string that does not identify an
> existing buffer, create a buffer with that name."
>
> However, this is only true when called interactively. 

How so?  Seems to be true when called from Lisp also,
AFAICT.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#54865: 29.0.50; Unclear docstring 'switch-to-buffer'
  2022-04-11 23:52 ` Drew Adams
@ 2022-04-12 10:23   ` Lars Ingebrigtsen
  2022-04-16  8:33   ` dalanicolai
  1 sibling, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2022-04-12 10:23 UTC (permalink / raw)
  To: Drew Adams; +Cc: dalanicolai, 54865@debbugs.gnu.org

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

>> "If BUFFER-OR-NAME is a string that does not identify an
>> existing buffer, create a buffer with that name."
>>
>> However, this is only true when called interactively. 
>
> How so?  Seems to be true when called from Lisp also,
> AFAICT.

Yup.  `M-: (switch-to-buffer "lalalala") RET' behaves as the paragraph
describes, as far as I can tell.

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#54865: 29.0.50; Unclear docstring 'switch-to-buffer'
  2022-04-11 23:52 ` Drew Adams
  2022-04-12 10:23   ` Lars Ingebrigtsen
@ 2022-04-16  8:33   ` dalanicolai
  2022-04-16  9:24     ` Lars Ingebrigtsen
  2022-04-16 15:47     ` Drew Adams
  1 sibling, 2 replies; 7+ messages in thread
From: dalanicolai @ 2022-04-16  8:33 UTC (permalink / raw)
  To: Drew Adams; +Cc: 54865@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

Ah, that is weird. Obviously, I have tested it (although, clearly, not
correctly) before creating the issue.
But indeed I can not reproduce it. I am quite sure that I got some 'non
existing buffer' message when
using `switch-to-buffer` somewhere (don't remember exactly where), and
again, then I remember to have
tested it before creating the issue (testing it, in this case, is of course
much less work than creating the issue).

Well, I don't understand what caused me to draw this conclusion (I hope
that I will encounter it again to
investigate it)

Anyway, sorry for spamming the mailing list, and thank you for checking
it...

On Tue, 12 Apr 2022 at 01:52, Drew Adams <drew.adams@oracle.com> wrote:

> > "If BUFFER-OR-NAME is a string that does not identify an
> > existing buffer, create a buffer with that name."
> >
> > However, this is only true when called interactively.
>
> How so?  Seems to be true when called from Lisp also,
> AFAICT.
>
>

[-- Attachment #2: Type: text/html, Size: 1407 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#54865: 29.0.50; Unclear docstring 'switch-to-buffer'
  2022-04-16  8:33   ` dalanicolai
@ 2022-04-16  9:24     ` Lars Ingebrigtsen
  2022-04-16 15:47     ` Drew Adams
  1 sibling, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2022-04-16  9:24 UTC (permalink / raw)
  To: dalanicolai; +Cc: 54865@debbugs.gnu.org

dalanicolai <dalanicolai@gmail.com> writes:

> Ah, that is weird. Obviously, I have tested it (although, clearly, not
> correctly) before creating the issue.  But indeed I can not reproduce
> it. 

OK; closing this bug report, then.  If you encounter it again, please
reopen or open a new report.

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#54865: 29.0.50; Unclear docstring 'switch-to-buffer'
  2022-04-16  8:33   ` dalanicolai
  2022-04-16  9:24     ` Lars Ingebrigtsen
@ 2022-04-16 15:47     ` Drew Adams
  2022-04-17 20:34       ` dalanicolai
  1 sibling, 1 reply; 7+ messages in thread
From: Drew Adams @ 2022-04-16 15:47 UTC (permalink / raw)
  To: dalanicolai; +Cc: 54865@debbugs.gnu.org

> Anyway, sorry for spamming the mailing list,
> and thank you for checking it...

No problem at all.  And you were not spamming.

IMO, bug reports are generally helpful, even if
in fact there might be no bug.  And they show
a desire to improve Emacs.  Thanks to you for
taking the time to file a bug report.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#54865: 29.0.50; Unclear docstring 'switch-to-buffer'
  2022-04-16 15:47     ` Drew Adams
@ 2022-04-17 20:34       ` dalanicolai
  0 siblings, 0 replies; 7+ messages in thread
From: dalanicolai @ 2022-04-17 20:34 UTC (permalink / raw)
  To: Drew Adams; +Cc: 54865@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 610 bytes --]

Thanks for this response! Of course, I agree with you, but sometimes,
 I am surprised how I come to the conclusion that there must be a bug.
Well, we keep learning... especially with such helpful community :)

On Sat, 16 Apr 2022 at 17:47, Drew Adams <drew.adams@oracle.com> wrote:

> > Anyway, sorry for spamming the mailing list,
> > and thank you for checking it...
>
> No problem at all.  And you were not spamming.
>
> IMO, bug reports are generally helpful, even if
> in fact there might be no bug.  And they show
> a desire to improve Emacs.  Thanks to you for
> taking the time to file a bug report.
>

[-- Attachment #2: Type: text/html, Size: 963 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-04-17 20:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-11 22:22 bug#54865: 29.0.50; Unclear docstring 'switch-to-buffer' dalanicolai
2022-04-11 23:52 ` Drew Adams
2022-04-12 10:23   ` Lars Ingebrigtsen
2022-04-16  8:33   ` dalanicolai
2022-04-16  9:24     ` Lars Ingebrigtsen
2022-04-16 15:47     ` Drew Adams
2022-04-17 20:34       ` dalanicolai

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