all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: samer <samer@samertm.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 18950@debbugs.gnu.org
Subject: bug#18950: [PATCH] 24.4.51; Wrong type argument: stringp on completing an asterisk in eshell with pcomplete-cycle-completions disabled
Date: Wed, 14 Jan 2015 20:12:48 -0800	[thread overview]
Message-ID: <4fd05af1b84870c40eae10fa421aa17c@samertm.com> (raw)
In-Reply-To: <86wq7ai5cz.fsf@yandex.ru>

Hi,

The function pcomplete-parse-arguments wasn't completing the input when
pcomplete-cycle-completions was nil, and so pcomplete would pass control
to one of eshell's completion functions, which would blow up when given
a list by pcomplete-arg (which is strange, because it's valid for
pcomplete-arg to return a list). But there is no reason for
pcomplete-parse-arguments to care about whether the user wants to cycle
completions, as only really matters in pcomplete-stub. The following
patch fixes the bug by making pcomplete-parse-arguments not care about
the value of pcomplete-cycle-completions.

Best,
Samer

Changes from HEAD~1 to working tree
2 files changed, 6 insertions(+), 2 deletions(-)
  lisp/ChangeLog    |    5 +++++
  lisp/pcomplete.el |    3 +--

	Modified   lisp/ChangeLog
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f413526..c904e03 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-15  Samer Masterson  <samer@samertm.com>
+
+	* pcomplete.el (pcomplete-parse-arguments): Parse arguments
+	regardless of pcomplete-cycle-completions's value. (bug#18950)
+
  2015-01-04  Dmitry Gutov  <dgutov@yandex.ru>

  	Add mouse interaction to xref.
	Modified   lisp/pcomplete.el
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index 17327ea..7bcf2c1 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -755,8 +755,7 @@ this is `comint-dynamic-complete-functions'."
  	    pcomplete-index 0
  	    pcomplete-stub (pcomplete-arg 'last))
        (let ((begin (pcomplete-begin 'last)))
-	(if (and pcomplete-cycle-completions
-		 (listp pcomplete-stub) ;??
+	(if (and (listp pcomplete-stub) ;??
  		 (not pcomplete-expand-only-p))
  	    (let* ((completions pcomplete-stub) ;??
  		   (common-stub (car completions))






  reply	other threads:[~2015-01-15  4:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05  5:27 bug#18950: 24.4.51; Wrong type argument: stringp on completing an asterisk in eshell with pcomplete-cycle-completions disabled Dmitry Gutov
2015-01-15  4:12 ` samer [this message]
2015-01-15 15:06   ` bug#18950: [PATCH] " Stefan Monnier
2015-01-16  2:36     ` Dmitry Gutov

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4fd05af1b84870c40eae10fa421aa17c@samertm.com \
    --to=samer@samertm.com \
    --cc=18950@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.