unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14173: comint file completion bug
@ 2013-04-10  8:15 Jacob Butcher
  2017-03-25  5:24 ` npostavs
  0 siblings, 1 reply; 2+ messages in thread
From: Jacob Butcher @ 2013-04-10  8:15 UTC (permalink / raw)
  To: 14173

Function comint-quote-filename does not correctly quote "]" characters when
they appear in variable comint-file-name-quote-list.  The function naively
formats each character in the list into a string representation of a character
set by surrounded them with "[" and "]".
When the list consists of characters like " " and "|", that works fine, and
yields character sets like "[ |]". But if the list is:

    (91 93 124 38 60 62 40 41 59 32 36 42 33 34 39 96 35 92)

the resulting character set "[[]|&<>(); $*!\"'`#\\]" is wrong, as it does
not place "]" first, the only location where it is permitted.  (That
restriction is not actually specified in,
http://emacswiki.org/emacs/RegularExpression, which defines character sets
rather poorly, but perhaps that wiki is not your responsibility.)  I
suspect adding "-" to comint-file-name-quote-list except as the first or
last character would yield a similar problem.

I fixed the problem for myself by putting 93 as the first list element.
A more general solution would involve massaging the list in function
comint-file-name-quote-list to put "]" first and "-" last, when present.
I could write that code if you wish.

                                Sincerely,
                                    Jacob Butcher





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

* bug#14173: comint file completion bug
  2013-04-10  8:15 bug#14173: comint file completion bug Jacob Butcher
@ 2017-03-25  5:24 ` npostavs
  0 siblings, 0 replies; 2+ messages in thread
From: npostavs @ 2017-03-25  5:24 UTC (permalink / raw)
  To: Jacob Butcher; +Cc: 14173

tags 14173 fixed
close 14173 24.3
quit

Jacob Butcher <bug-gnu-emacs@nowhen.com> writes:

> Function comint-quote-filename does not correctly quote "]" characters when
> they appear in variable comint-file-name-quote-list.  The function naively
> formats each character in the list into a string representation of a character
> set by surrounded them with "[" and "]".
> When the list consists of characters like " " and "|", that works fine, and
> yields character sets like "[ |]". But if the list is:
>
>     (91 93 124 38 60 62 40 41 59 32 36 42 33 34 39 96 35 92)
>
> the resulting character set "[[]|&<>(); $*!\"'`#\\]" is wrong, as it does
> not place "]" first, the only location where it is permitted.

This was fixed by [1: b4ff4f1fcb].

1: 2012-04-25 14:53:57 -0400 b4ff4f1fcb552dab77d4312f9adb9f290782fa98
  Use completion-table-with-quoting for comint and pcomplete.
* lisp/comint.el [...]
(comint-quote-filename): Use regexp-opt-charset.





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

end of thread, other threads:[~2017-03-25  5:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-10  8:15 bug#14173: comint file completion bug Jacob Butcher
2017-03-25  5:24 ` npostavs

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