GNU logs - #24095, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#24095: 25.1; Insufficient documentation of minibuffer-related variables
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 28 Jul 2016 15:01:02 +0000
Resent-Message-ID: <handler.24095.B.146971805412282 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 24095
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 24095 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.146971805412282
          (code B ref -1); Thu, 28 Jul 2016 15:01:02 +0000
Received: (at submit) by debbugs.gnu.org; 28 Jul 2016 15:00:54 +0000
Received: from localhost ([127.0.0.1]:49388 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bSmnt-0003C1-Is
	for submit <at> debbugs.gnu.org; Thu, 28 Jul 2016 11:00:53 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54949)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1bSmns-0003Bl-8a
 for submit <at> debbugs.gnu.org; Thu, 28 Jul 2016 11:00:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1bSmnl-0005ND-Im
 for submit <at> debbugs.gnu.org; Thu, 28 Jul 2016 11:00:47 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:33911)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1bSmnl-0005Mw-FO
 for submit <at> debbugs.gnu.org; Thu, 28 Jul 2016 11:00:45 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45902)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1bSmni-0004OT-MA
 for bug-gnu-emacs@HIDDEN; Thu, 28 Jul 2016 11:00:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1bSmnc-0005LS-N5
 for bug-gnu-emacs@HIDDEN; Thu, 28 Jul 2016 11:00:41 -0400
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45851)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1bSmnc-0005LA-Is
 for bug-gnu-emacs@HIDDEN; Thu, 28 Jul 2016 11:00:36 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4000
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>) id 1bSmnb-0004Dx-Pc
 for bug-gnu-emacs@HIDDEN; Thu, 28 Jul 2016 11:00:36 -0400
Date: Thu, 28 Jul 2016 18:00:29 +0300
Message-Id: <83shutrenm.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -6.3 (------)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.3 (------)


This is a call for people who know their ways around the internals of
completion to please improve the documentation of the related
functions and variables.  I find their current doc strings inadequate,
and their documentation in the ELisp manual simply doesn't exist.

Here's a case in point.  This is a fragment from dired-diff:

  (interactive
   (let* (...
     ...
     (list
      (minibuffer-with-setup-hook
	  (lambda ()
	    (set (make-local-variable 'minibuffer-default-add-function) nil)
	    (setq minibuffer-default defaults))
	(read-file-name
	 (format "Diff %s with%s: " current
		 (if default (format " (default %s)" default) ""))
	 target-dir default t))

Suppose you want to figure out what does the minibuffer-setup-hook try
to accomplish.  Here's the doc string of the 2 variables it uses:

minibuffer-default-add-function:

  Function run by ‘goto-history-element’ before consuming default values.
  This is useful to dynamically add more elements to the list of default values
  when ‘goto-history-element’ reaches the end of this list.
  Before calling this function ‘goto-history-element’ sets the variable
  ‘minibuffer-default-add-done’ to t, so it will call this function only
  once.  In special cases, when this function needs to be called more
  than once, it can set ‘minibuffer-default-add-done’ to nil explicitly,
  overriding the setting of this variable to t in ‘goto-history-element’.

minibuffer-default:

  The current default value or list of default values in the minibuffer.
  The functions ‘read-from-minibuffer’ and ‘completing-read’ bind
  this variable locally.

If you can glean from these doc string (a) what is the significance of
minibuffer-default-add-function being nil, and (b) how the list in
minibuffer-default is used by the completion functions (so you could
decide, for example, what to put there), you are much smarter than I
am.  (The ELisp manual doesn't mention these variables at all.)

Other functions/variables that IMO should be considered for
documentation in the manual:

 minibuffer-avoid-prompt, minibuffer-history-case-insensitive-variables,
 minibuffer-default-add-completions

TIA




In GNU Emacs 25.1.1 (i686-pc-mingw32)
 of 2016-07-24 built on HOME-C4E4A596F7
Windowing system distributor 'Microsoft Corp.', version 5.1.2600
Configured using:
 'configure --prefix=/d/usr --enable-checking=yes,glyphs
 --with-wide-int --with-modules 'CFLAGS=-O2 -gdwarf-4 -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS MODULES

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1255

Major mode: RMAIL

Minor modes in effect:
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  desktop-save-mode: t
  save-place-mode: t
  show-paren-mode: t
  display-time-mode: t
  tooltip-mode: t
  global-eldoc-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
  temp-buffer-resize-mode: t
  buffer-read-only: t
  line-number-mode: t

Recent messages:
Auto-saving...done
next-line: End of buffer
Mark set
Sending...
Added to d:/usr/eli/rmail/SENT.MAIL
Sending email 
Sending email done
Sending...done
Showing message 2141...done
Modification-flag cleared

Load-path shadows:
d:/usr/share/emacs/site-lisp/soap-inspect hides d:/usr/share/emacs/25.1/lisp/net/soap-inspect
d:/usr/share/emacs/site-lisp/soap-client hides d:/usr/share/emacs/25.1/lisp/net/soap-client

Features:
(shadow emacsbug tar-mode pulse etags shell grep compile misearch
multi-isearch shr-color color url-util url-parse url-vars shr seq dom
browse-url eieio-opt speedbar sb-image ezimage dframe thingatpt
dabbrev rfc2104 network-stream nsm starttls tls gnutls mail-extr
smtpmail auth-source mailalias sendmail rmailout conf-mode arc-mode
archive-mode org-element org-rmail org-mhe org-irc org-info org-gnus
org-docview doc-view subr-x jka-compr image-mode org-bibtex bibtex
org-bbdb org-w3m org advice org-macro org-footnote org-pcomplete
pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint
comint ansi-color ob-core ob-eval org-compat org-macs org-loaddefs
find-func cal-menu calendar cal-loaddefs bat-mode make-mode
vc-dispatcher vc-svn parse-time generic vc-cvs vc-bzr bug-reference
add-log info vc-git diff-mode noutline outline easy-mmode flyspell qp
rmailsum rmailmm message dired-x dired format-spec rfc822 mml mml-sec
password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode
mailabbrev gmm-utils mailheader mail-parse rfc2231 rmail rfc2047
rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils desktop
frameset server filecache mairix cus-edit cus-start cus-load wid-edit
saveplace midnight ispell derived generic-x cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs paren
xref cl-seq project ring eieio byte-opt bytecomp byte-compile cl-extra
help-mode easymenu cconv eieio-core cl-macs gv cl-loaddefs pcase
cl-lib battery time time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
disp-table w32-win w32-vars term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame 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 charscript case-table
epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded
nadvice loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote w32notify w32 multi-tty
make-network-process emacs)

Memory information:
((conses 16 2191512 214963)
 (symbols 56 42474 0)
 (miscs 48 4368 4900)
 (strings 16 119103 35184)
 (string-bytes 1 3269321)
 (vectors 16 43592)
 (vector-slots 8 1676003 227839)
 (floats 8 540 910)
 (intervals 40 413698 11919)
 (buffers 856 230))




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Eli Zaretskii <eliz@HIDDEN>
Subject: bug#24095: Acknowledgement (25.1; Insufficient documentation of
 minibuffer-related variables)
Message-ID: <handler.24095.B.146971805412282.ack <at> debbugs.gnu.org>
References: <83shutrenm.fsf@HIDDEN>
X-Gnu-PR-Message: ack 24095
X-Gnu-PR-Package: emacs
Reply-To: 24095 <at> debbugs.gnu.org
Date: Thu, 28 Jul 2016 15:01:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 24095 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
24095: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D24095
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#24095: 25.1; Insufficient documentation of minibuffer-related variables
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 28 Jul 2016 16:11:02 +0000
Resent-Message-ID: <handler.24095.B24095.146972223818843 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 24095
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>, 24095 <at> debbugs.gnu.org
Received: via spool by 24095-submit <at> debbugs.gnu.org id=B24095.146972223818843
          (code B ref 24095); Thu, 28 Jul 2016 16:11:02 +0000
Received: (at 24095) by debbugs.gnu.org; 28 Jul 2016 16:10:38 +0000
Received: from localhost ([127.0.0.1]:49461 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bSntO-0004tr-2y
	for submit <at> debbugs.gnu.org; Thu, 28 Jul 2016 12:10:38 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:37980)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1bSntM-0004td-Og
 for 24095 <at> debbugs.gnu.org; Thu, 28 Jul 2016 12:10:37 -0400
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 u6SGATPe003048
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Thu, 28 Jul 2016 16:10:30 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u6SGATWM017064
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Thu, 28 Jul 2016 16:10:29 GMT
Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20])
 by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u6SGAQQP018107;
 Thu, 28 Jul 2016 16:10:26 GMT
MIME-Version: 1.0
Message-ID: <a2d8618c-e245-41b1-8b98-f983448de2b5@default>
Date: Thu, 28 Jul 2016 09:10:25 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
References: <83shutrenm.fsf@HIDDEN>
In-Reply-To: <83shutrenm.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6744.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -3.6 (---)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.6 (---)

+1 to everything Eli said.  I think (but am not sure) that these
variables were added by Stefan.  Perhaps he can explain them.
If not, hopefully someone else can.

Here is some of what I understand about these things, in case it
helps:

For `minibuffer-default': I believe that its value auguments
whatever default value (or list of default values) is provided
directly to the function reading from the minibuffer (e.g.
`read-from-minibuffer').

For `minibuffer-default-add-function': I believe that its value
is a function of no args that returns a list of default values
that overrides `minibuffer-default'.

So, for example, if the value of `minibuffer-default-add-function'
is  `minibuffer-default-add-dired-shell-commands' then the result
of invoking that function is to return a list of default values
that includes those from `minibuffer-default' but adds also some
shell commands from mailcap.

For `minibuffer-default-add-completions': It is the default value
of variable `minibuffer-default-add-function'.  I belive that it
adds the list of all possible completions of empty input ("") for
`completing-read' to the list of default values, so that you can
treat completions as default values (e.g. cycle using `M-n').

For example, `read-extended-command' (used by `M-x'), using
`minibuffer-with-setup-hook', sets `minibuffer-default-add-function'
to a function that picks up a command name at point (if there is
one).  This means that that command name gets added (by
`minibuffer-default-add-completions', which is the value of
`minibuffer-default-add-function') to the list of default values.
And this means that if you use `M-x' with point on a command name
then that command name is inserted in the minibuffer.

For `minibuffer-avoid-prompt': It seems that it tries to make
point-motion commands not put point in the prompt area.  So,
for example, `C-a' will not move point into the prompt area
(but `C-b' will).

For `minibuffer-history-case-insensitive-variables': This seems
to be a list of history variables for which history-list matching
ignores case.  The doc string seems pretty clear in this case,
except perhaps that it should say that the matching involved is
matching against elements of the current history list.  The rest
of the doc string makes this clear, by mentioning
`(next|previous)-history-element', which do just that: match
against the history list.

HTH.  And I hope that someone more knowledgable corrects any
misunderstandings on my part, and improves the doc as Eli
requested.





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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