Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2831034imm; Sun, 17 Jun 2018 05:23:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL2y/nlb4iUWBsy1dGnRUvOd64x+zFCUganH+lb4Vszadh4l8JnHGi9cM2bjrmdMdFu3dnc X-Received: by 2002:a63:6185:: with SMTP id v127-v6mr7557149pgb.301.1529238212506; Sun, 17 Jun 2018 05:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529238212; cv=none; d=google.com; s=arc-20160816; b=pXb1if7k7l6dUEwebDMLB/8IKOwHjSfsLQbe9fr0561z1LwIteNMB+Jkxjq092afMh R2ObK4a2j6jOXa3reQboPHhmPAtPQoeGuUh0ZHKKqW46ghpejHgL83zsBd2P4nV3eQB2 8SYHH7+1qVvU5T30qskxcWtowTq9jur9kioONgoR8kV8UkD/ZYETTLxzINY+78QU2mcv 04tZryyZb2gZpQZrd6pf/h+j8KPFnVXbUGrC67MX8MD4rgcQpAPuflv8rXuvEHJgmktm 3Gx+l+0KWm8QPl6B8vGO34RlGZhLmzkUbXixI/9lGidLfbCSa8Qw0C8PVRcqxkcoF4HM XIdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=8jVdz5jPpv9Uqio/j3/8R21sIFKLHcp5kS9Y0DRfJts=; b=Y/g8yKi8BLRZJgDNgArgVMUORHciXDKk0fZfy8eIpk6hoSDV4w9ayau3P38XtanNXd 0teJtshnY2inG4vbxI6J3ZM5x+GUULx+529bV7ve4hJtofAYT3Hl3HZeRksbwnWI/zw/ gzChm5Qw/FivZkz+t+iqi2UX63rJakuc61wEvy8ya+7KXBMgo7LXw7jIPt8zlXz1MUvG 4x3qn/Cbgccb16odnMhx7yppn4dWsVgJV7P9YuUzjOMvFUmIsh6mGdFgao2Aj9hDydE7 X9asyPVeGoomc9xthAt+jQOeK2ioAuXCQkeAxtEVDBZJOE3n9oUeMlWq2dYRFyd9ALqB EGxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gouders.net header.s=gnet header.b=ABa4CvmQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2-v6si10215009pgt.611.2018.06.17.05.23.16; Sun, 17 Jun 2018 05:23:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gouders.net header.s=gnet header.b=ABa4CvmQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936761AbeFQMWv (ORCPT + 99 others); Sun, 17 Jun 2018 08:22:51 -0400 Received: from services.gouders.net ([141.101.32.176]:34912 "EHLO services.gouders.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933343AbeFQMWt (ORCPT ); Sun, 17 Jun 2018 08:22:49 -0400 Received: from lena.gouders.net (ipservice-047-071-023-039.pools.arcor-ip.net [47.71.23.39]) (authenticated bits=0) by services.gouders.net (8.14.8/8.14.8) with ESMTP id w5HCFcFg006472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sun, 17 Jun 2018 14:15:49 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gouders.net; s=gnet; t=1529237750; bh=UdIEEo4CPb3Qp/y/fVZU5FcZOTYlw1d7e7SDyda2bts=; h=From:To:Cc:Subject:Date; b=ABa4CvmQk0nh+UEMRBlXetK9d+U3F0zKPkv5PXcoi9rnhNoyOiSWUj74jeG0vKYDY rSdagBnoHbSzBrPizmvCt/HVGwpcyuVuRl+GvcyTvjWM7hkn/RlfVb+K3NRdxKNN7h qfGkGqy5b0g6ALu5fQuU1UE9Xa9h48X8crjzw+Ek= From: Dirk Gouders To: Masahiro Yamada , Randy Dunlap , Linux Kbuild mailing list , Linux Kernel Mailing List , Segher Boessenkool , Sam Ravnborg Cc: Dirk Gouders Subject: [RFC v7 0/1] mconf: global i-search in menu prompts Date: Sun, 17 Jun 2018 14:15:33 +0200 Message-Id: <20180617121534.4809-1-dirk@gouders.net> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, I reworked this RFC and checked it against submitting-patches.rst so the quality should have raised. In that document, I read that permission of the person should be asked for before adding a Suggested-by. So, apologies go to Sam. I removed that line from the commit message and am now asking for your permission to add it. Most noticeable changes are that the exact starting position before doing i-search is now remebered and i-search stays on the current item if a character was added and the new string also matches this item. Also, compiler warnings were eliminated and A_UNDERLINE was replaced with A_STANDOUT to mark active menu items when the focus is on the buttons, because I tested mconf on a tty where underlines were not visible. For a complete list of changes see below. Dirk Changes in v7: * make menu_isearch() return void * Suggested-by removed, ask for Sam's permission * Rework i-search instructions text * Remember exact starting position in menu * Stay on menu item if it matches pattern with a character added * Fix print_autowrap for short texts * Focus on buttons: use A_STANDOUT for current menu item * Fix compiler warnings * Don't exclude comments in searches * ESC also clears search string * Remove the last parameter of print_isearch and use focus_on_buttons instead * Document changes to print_autowrap and conf() in commit message * Rework comments in the code * Rework commit message, add a motivation part * Free serialized menu array on exit Changes in v6: * The modification of the function print_autowrap() was reworked and is no longer a separate function. * The i-search navigation was completely reworked and now works on the whole menu tree. * Hotkeys are back, because they do not interfere that much with this version of i-search navigation. Changes in v5: * More thoroughly tested code * Hotkey navigation concept completely dropped * Printable characters except special ones form the search string * Focus-sensitive help text above menu * DEL erases search string * Matching string is highlighted in selected menu item * README help text adjusted Changes in v4: * Prototype: consequent i-search navigation concept Changes in v3: * Use current git tree to make the patch apply. * Eliminate debugging output to stderr. Changes in v2: * Additionally to CTRL-s, \ can be used to start isearch. * Raw mode is off by default an can be enabled by an environment variable MENUCONFIG_RAW_MODE. * I also added a variable for toggling raw mode but did not implement anything else. * The isearch indicator is now displayed as soon as isearch is started. * Any key except \, CTRL-s, alphanumeric characters and space terminates isearch and -- except ESC ESC -- is further processed, e.g. ENTER terminates isearch and is then used to navigate into a submenu. * Problems with mismatches and matches above the current position were fixed. Dirk Gouders (1): mconf: global i-search in menu prompts scripts/kconfig/lxdialog/checklist.c | 2 +- scripts/kconfig/lxdialog/dialog.h | 3 +- scripts/kconfig/lxdialog/inputbox.c | 2 +- scripts/kconfig/lxdialog/menubox.c | 181 +++++++++++++++++++++--- scripts/kconfig/lxdialog/util.c | 45 +++++- scripts/kconfig/lxdialog/yesno.c | 2 +- scripts/kconfig/mconf.c | 202 +++++++++++++++++++++++++-- 7 files changed, 398 insertions(+), 39 deletions(-) -- 2.17.1