unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: 7291@debbugs.gnu.org
Subject: bug#7291: 24.0.50; `non-essential' is incomprehensible
Date: Wed, 27 Oct 2010 15:30:30 -0700	[thread overview]
Message-ID: <9499566E643B466092A98013C6826011@us.oracle.com> (raw)

Variable `non-essential' was introduced in Emacs 24.
 
The name is bad - doesn't say anything.  Non-essential wrt what?
 
The doc is bad:
 
"Whether the currently executing code is performing an essential task.
This variable should be non-nil only when running code which should not
disturb the user.  E.g. it can be used to prevent Tramp from prompting the
user for a password when we are simply scanning a set of files in the
background or displaying possible completions before the user even asked
for it."
 
So does nil mean the code is performing an essential task?  Or does
non-nil mean that?  What's an "essential task"?  A task that should
disturb the user (because it is important) or a task that should not
disturb the user?
 
What does "code which should not disturb the user" even mean?  Sounds
like this var should almost always be non-nil.  But in fact it is almost
always nil.  So does that mean that almost all Emacs code SHOULD disturb
the user?  Is the doc backwards maybe?  If not, then maybe the variable
is named backwards: should it be `essential'?
 
I cannot understand this.  What does it really mean?
 
Grepping the source code shows that this varis used only in
`tramp-completion-mode-p' (so why isn't it called
`tramp-non-essential...'?).  If this is non-nil, that predicate returns
non-nil, which indicates what?  It supposedly indicates "whether method
/ user name / host name completion is active".
 
Huh?  How is anyone supposed to understand this?
 
So let's look at where this is bound to non-nil...  In icomplete.el,
during `icomplete-completions'.  No comment in the code.  No clue as to
why this code should be considered "non-essential" for Tramp.  Why would
icompleting necessarily indicate that "method / user name / host name
completion is active" (whatever that might mean)?
 
The only other place this is bound is in ido.el.  Same questions apply.
 
Please clean this up.  It's incomprehensible.  Presumably, this variable
needs to be known to users who write Lisp code.  If it is needed in
`icomplete-completions' and for ido file-name completion then why
wouldn't it also be needed in user code that does something similar (for
some unknown meaning of "similar").
 
There are lots of 3rd-party libraries that define completion code.  Why
wouldn't they need to do something similar to what icomplete and ido do?
How would a Lisp library writer know whether to do anything or what to
do?
 
If this variable is this important and global (no `tramp-' prefix) then
it should be documented in the Elisp manual.
 
 
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-10-25 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
 






             reply	other threads:[~2010-10-27 22:30 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 22:30 Drew Adams [this message]
2010-10-28  0:52 ` bug#7291: 24.0.50; `non-essential' is incomprehensible Stefan Monnier
2010-10-28 16:22   ` Drew Adams
2010-10-28 17:14     ` Stefan Monnier
2010-10-28 18:43       ` Michael Albinus
2010-10-28 18:51       ` Drew Adams
2010-10-28 20:12         ` Stefan Monnier
2010-10-28 21:58           ` Drew Adams
2010-10-29 16:20             ` Stefan Monnier
2010-10-29 16:47               ` Drew Adams
2010-10-29 17:36                 ` Stefan Monnier
2010-10-29  8:36           ` Andreas Schwab
2010-10-29 16:03             ` Stefan Monnier
2010-10-29 16:21               ` Andreas Schwab
2010-10-29 18:29               ` Eli Zaretskii
2010-10-29 23:00                 ` Andy Moreton
2010-10-30  6:52                   ` Eli Zaretskii
2010-10-30 16:16                     ` Drew Adams
2010-10-30 17:53                       ` Michael Albinus
2010-10-30 20:05                         ` Drew Adams
2010-10-29 18:56           ` Alan Mackenzie
2010-10-28 17:33 ` James Cloos
2010-10-28 18:53   ` Drew Adams
2011-07-14 14:35   ` Lars Magne Ingebrigtsen
2010-10-31  2:34 ` MON KEY

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=9499566E643B466092A98013C6826011@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=7291@debbugs.gnu.org \
    /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).