unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org, rms@gnu.org, monnier@iro.umontreal.ca
Subject: Re: Emphasize the character to be typed next in *Completions*
Date: Thu, 15 Apr 2004 21:25:36 +0300	[thread overview]
Message-ID: <874qrl6qu7.fsf@mail.jurta.org> (raw)
In-Reply-To: <20040414.121635.129986512.jet@gyve.org> (Masatake YAMATO's message of "Wed, 14 Apr 2004 12:16:35 +0900 (JST)")

Masatake YAMATO <jet@gyve.org> writes:
>> However, looking at these names, it seems to me that maybe they should
>> be changed to `completions-common-part' and
>> `completions-first-difference'.  That says where they are used, which
>> is more useful; whether to use them for emphasis or counteremphasis is
>> then up to the user.  Do you agree?
>
> I completely agree with you. If no objection, I will install the improved
> version in a few days.

I agree that new names are better because they more clearly represent
the essence of these faces.  However, their docstrings should also
suggest their possible use.

BTW, this feature sometimes fails in the *Completions* buffer.

For example, type

    M-x info RET
    g (/usr/share/ TAB

with a sufficiently long directory path and it fails with the following bt:

Debugger entered--Lisp error: (args-out-of-range 4505 4505)
  get-char-property(4505 mouse-face)
  (and (get-char-property element-start (quote mouse-face)) (get-char-property element-common-end (quote mouse-face)))
  (if (and (get-char-property element-start ...) (get-char-property element-common-end ...)) (progn (put-text-property element-start element-common-end ... ...) (put-text-property element-common-end ... ... ...)))
  (when (and (get-char-property element-start ...) (get-char-property element-common-end ...)) (put-text-property element-start element-common-end (quote font-lock-face) (quote completion-de-emphasis)) (put-text-property element-common-end (1+ element-common-end) (quote font-lock-face) (quote completion-emphasis)))
  (while element-start (setq element-common-end (+ element-start common-string-length)) (when (and ... ...) (put-text-property element-start element-common-end ... ...) (put-text-property element-common-end ... ... ...)) (setq element-start (next-single-property-change element-start ...)))
  (let ((common-string-length ...) (element-start ...) element-common-end) (while element-start (setq element-common-end ...) (when ... ... ...) (setq element-start ...)))
  (progn (let (... ... element-common-end) (while element-start ... ... ...)))
  (if completion-base-size (progn (let ... ...)))
  (when completion-base-size (let (... ... element-common-end) (while element-start ... ... ...)))
  (let ((mainbuf ...) (mbuf-contents ...)) (if minibuffer-completing-file-name (with-current-buffer mainbuf ...)) (set-buffer standard-output) (completion-list-mode) (make-local-variable (quote completion-reference-buffer)) (setq completion-reference-buffer mainbuf) (if minibuffer-completing-file-name (setq completion-base-size ...) (save-match-data ...)) (when completion-base-size (let ... ...)) (goto-char (point-min)) (if (display-mouse-p) (insert ...)) (insert (substitute-command-keys "In this buffer, type \\[choose-completion] to select the completion near point.\n\n")))
  (save-excursion (let (... ...) (if minibuffer-completing-file-name ...) (set-buffer standard-output) (completion-list-mode) (make-local-variable ...) (setq completion-reference-buffer mainbuf) (if minibuffer-completing-file-name ... ...) (when completion-base-size ...) (goto-char ...) (if ... ...) (insert ...)))
  completion-setup-function()
  run-hooks(completion-setup-hook)
  minibuffer-complete()
  call-interactively(minibuffer-complete)
  completing-read("Go to node: " Info-read-node-name-1 nil t)
  (let* ((completion-ignore-case t) (Info-read-node-completion-table ...) (nodename ...)) (if (equal nodename "") (or default ...) nodename))
  Info-read-node-name("Go to node: ")
  (list (Info-read-node-name "Go to node: ") current-prefix-arg)
  call-interactively(Info-goto-node)

-- 
Juri Linkov
http://www.jurta.org/emacs/

  reply	other threads:[~2004-04-15 18:25 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040325063231.137606B7A5@imf.math.ku.dk>
2004-03-25 11:32 ` Emphasize the character to be typed next in *Completions* Lars Hansen
2004-03-25 16:03   ` Masatake YAMATO
2004-04-08 16:30     ` Glenn Morris
2004-04-11 18:12       ` Masatake YAMATO
2004-04-13 17:45         ` Richard Stallman
2004-04-14  3:16           ` Masatake YAMATO
2004-04-15 18:25             ` Juri Linkov [this message]
2004-04-16  8:59               ` Masatake YAMATO
     [not found] <20040322053942.03A2467DC4@imf.math.ku.dk>
2004-03-22  9:31 ` Lars Hansen
2004-03-22  9:48   ` Lars Hansen
2004-03-22  9:55   ` Masatake YAMATO
2004-03-22 11:16     ` Lars Hansen
2004-03-22 11:37       ` David Kastrup
2004-03-22 12:02         ` Lars Hansen
2004-03-23  3:04     ` Richard Stallman
2004-03-23 10:43       ` Masatake YAMATO
2004-03-23 15:09         ` Kim F. Storm
2004-03-23 15:07           ` Stefan Monnier
2004-03-24  0:07             ` Kim F. Storm
2004-03-24  2:36               ` Masatake YAMATO
2004-03-24  5:53                 ` Miles Bader
2004-03-24 10:38                 ` Kim F. Storm
2004-03-24  5:34         ` Richard Stallman
2004-03-24 10:44           ` Kim F. Storm
2004-03-23 14:29       ` Robert J. Chassell
2004-03-23 18:38         ` Juri Linkov
2004-03-23 21:27           ` Robert J. Chassell
2004-03-25 21:57             ` Juri Linkov
2004-03-23 17:55       ` Juri Linkov
2004-03-23 22:44         ` David Kastrup
2004-03-25 21:31           ` Juri Linkov
2004-03-25  2:00         ` Richard Stallman
2004-03-25 10:04           ` Kim F. Storm
2004-03-27  5:52             ` Richard Stallman
2004-03-27 22:24               ` Stefan Monnier
2004-03-28  4:25                 ` Richard Stallman
2004-03-28 17:35                   ` Stefan Monnier
2004-03-29 20:56                     ` Richard Stallman
2004-03-29 21:24                       ` Stefan Monnier
2004-03-30  5:58                         ` Eli Zaretskii
2004-03-30 11:14                           ` Juri Linkov
2004-03-31  0:50                         ` Richard Stallman
2004-03-31  1:32                           ` Stefan Monnier
2004-03-31 23:02                             ` Miles Bader
2004-03-21 15:13 Masatake YAMATO
2004-03-22  5:25 ` Richard Stallman
2004-03-22 18:29   ` Tak Ota
2004-03-23  0:14   ` Kim F. Storm

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=874qrl6qu7.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@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).