Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6356873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:03:17+00:00 2026-05-24T23:03:17+00:00

I am writing a function that uses the minibuffer and requires a somewhat different

  • 0

I am writing a function that uses the minibuffer and requires a somewhat different style of completion that might require deleting some characters. For example:

ar<tab> -> artist:
artist:ba<tab> -> artist:'Johann Sebastian Bach' 
artist:'Johann Sebastian Bach'<tab> -> artist:'Bela Bartók'
artist:'Bela Bartók' and album:<tab> 
etc...

I’ve already written the completion function, that generates a list of possible strings for the current input, yet I cannot use it with completing-read and completion-table-dynamic, because only the alternatives that do not require deletion are displayed. In this case, only the first step, from ar to artist.

To do the job, I’m considering using the lower-level (read-from-minibuffer) with a custom keymap to do the completion and display the alternatives. Is there a simpler solution? If not, which functions are there to handle displayed and cycling through the Completions buffer?

Thanks!


EDIT: In the end, I rolled my own. Here is the code, if anybody’s interested.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:03:18+00:00Added an answer on May 24, 2026 at 11:03 pm

    Yes, Icicles should give you what you want, IIUC.

    I’m not sure how you’re handling things like ‘artist’ and ‘album’, but there are a few ways Icicles could help.

    1. You can match parts of a completion candidate in any order. So if ‘foo’ and ‘bar’ are parts of the same candidate, then you can match any candidates that have both, in either order. This is “progressive completion”: you can keep adding patterns to narrow the choices. Patterns are ANDed. You can also subtract candidates that match a pattern.

    2. You can have candidates that are “multi-completions”. These are composed of parts, separated by a configurable string. You can match against any or all parts. So, for example, a candidate might be an album name plus artist names.

    3. If you also use Bookmark+ then you can tag files, a la delicious.com tagging. You need not visit files to tag them. Tags are generally strings (including newlines if you want), but they can also have associated Lisp values. Here, you might have a file for each album and tag albums with descriptions and various artists. Then you can complete to find a given album file by matching parts of its name and/or artists.

    For all Icicles completion, you can use progressive completion and complementing (#1). For each part of a progression you can use substring or regexp matching (or even fuzzy matching of various sorts).

    Some links that might help:

    • http://www.emacswiki.org/emacs/Icicles_-_Progressive_Completion

    • http://www.emacswiki.org/emacs/Icicles_-_Multi-Completions

    • http://www.emacswiki.org/emacs/Icicles_-_Bookmark_Enhancements — see, for example, command `icicle-find-file-tagged’

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing some code that uses some unmanaged calls into user32 functions such as
I am having some difficulty writing a function that will search through a directory
I'm writing a logging class that uses a templatized operator<< function. I'm specializing the
I am writing a function called annotate that uses match-lambda -- often with recursive
Library liba defines a certain function f. When writing a C program that uses
I'm writing an application with Qt that uses QTextBrowser to display some locally-stored HTML.
I'm writing a google chrome extension that uses chrome.pageCapture.saveAsMHTML(object details, function callback) function callback
I am writing a function in Java for an Android application that uses a
I'm writing a member function that uses a member variable pointer as an iterator.
I'm writing a function that fishes out the src from the first image tag

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.