Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp6225138imm; Sat, 19 May 2018 21:25:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpwzudN9JIVTos8u4FPG4WGNP3LFL5la/H0BAF8gX34a60G5hj+qPdZC0YB2IX3ZJt5K2Go X-Received: by 2002:a63:584:: with SMTP id 126-v6mr685176pgf.272.1526790357121; Sat, 19 May 2018 21:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526790357; cv=none; d=google.com; s=arc-20160816; b=yT6FD+VyGSeUIDy5ZeQbzA95GnEAqE9n3W23txmRARZmHPVUPQ6QfkIjQhdFFmZoUA Y+j6iFhhsqvpVMwtAkn8H5lCTfcDMR8PmKW78y48NUNjucz8i5diPR+y/1VQuoJNmpN7 ZhyczTDgx3yrbF/R/X06y3Edgin9mxs6B39mEMOID3+X4ZBZtgdNwPfrpy/fEiXw94BY g2vw13ns6fF5byRrBuSPDioiE2B3cNtwZ0gxpYQcI0dlvBmMNaMzamb89+wYw6D8riBY KHkqfeaC6tdK3Tt6cyrpIL+bvU3HfpP/KY9ki/xDoaUtkNkSWCh8Oeqd2HED3NEQxEnF bx4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=5JNV8nyxsdudDgjFnNGrsQ3RYENNuIWhsc1Wa1wMves=; b=R2OsvkcB8y6u/1bY4Ttz1pncxgHVyGTrX07Qyvsi05M+N3L/hNddNigaqkDlTE9+jK ZyC+wa1lBYVFiAmD3Hawub9una7vJyVp1/7nMjgORXl73mPIl51MrNjuP+U/OqgnbqxS d8eJ29TXJHImlvCyZFVY4w8COQ2A1QkhfObVFTXsLJi1k/XnZ59ErYjNT50joAyPAPaV Nu0lJzyG3YrvocaBBEPV5mN2iN+LWWrT9qiuKWoZkubtSLH5uhLjcSadHB5EUSbBcOB9 nllCZMCwi25mKJybBC/I6hOgqVixYyAQMtVAU1v0GKoPcKYqBr+C7a7q04x1jwCigsTZ 7vpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZZPmLNKA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t13-v6si11747132pfc.333.2018.05.19.21.25.07; Sat, 19 May 2018 21:25:57 -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=@gmail.com header.s=20161025 header.b=ZZPmLNKA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750932AbeETEY7 (ORCPT + 99 others); Sun, 20 May 2018 00:24:59 -0400 Received: from mail-ot0-f194.google.com ([74.125.82.194]:33734 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800AbeETEY5 (ORCPT ); Sun, 20 May 2018 00:24:57 -0400 Received: by mail-ot0-f194.google.com with SMTP id l22-v6so13462889otj.0; Sat, 19 May 2018 21:24:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5JNV8nyxsdudDgjFnNGrsQ3RYENNuIWhsc1Wa1wMves=; b=ZZPmLNKAHYFUBJHUHQk4rGHRaLvCPpZP2j8RFCNEq0R5UNR8kBg3Ve1SLaBHBC12M5 n4QJD9J9wMexxLKZ1/Bo6sQsc2y2I1YNAtI2P28a8P/wxpwbmEVPgEK3MY1zQnIFWYnW W94dB4wCCD4NYIktnzbpngomzrfjw3Oi/4P1oJztBJyDeFZx7CifyVGtUaixSrShAQfw AHIo9oMyxKAw+DxAbHUJwEWVQDerVamjBSPPQ0EXYmYW8gT7Oz0IzECkKANxIm2pYNpI 6tzpGHDR5uTGtKBo0/p6hBCOX7uRlQXMxl1ixoVd4S7Uq3bdUct5hynGAHwKtHf/T1OF HfzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5JNV8nyxsdudDgjFnNGrsQ3RYENNuIWhsc1Wa1wMves=; b=TCx531UTAiTmyrB8TRYTHBmw5Ryu9UaBUJ2lPQM/R1ehZlrxpkYuhoigwkKsOu0+DV L7Li9k2bNBsagiuNyNC7TuvMnuXh9uKRMYalSpdBqmv1jf52TLZFoh9o7FBWIgHqJn16 /Oez1haZDnkzK0I9Csfl3ndLaVXEKgiRpOf4RJynwu7wJT3I5Xc7E9ofe7JAeIyVuaAe itQUBFcUAc/QzOiiXBAqfJa173SNGPRqwMyKtKItvzaP4nUPpQIp8JopkPupWVQp4l1n Y2+ReDtSK1nWM/hp77Q4mi7LOp/ov0tW0Vg6EmQmVf6GuTptNDDFfHIskfHq82DaWl42 XMhw== X-Gm-Message-State: ALKqPwc9P8ekKN9qeX2+NjT2dUNpQsviOcFzhbevytXH7sUWx/PUDjHj j2JxXXqAPQor7M30kxH2Xql1ZRHxaD4mBaziRat2LA== X-Received: by 2002:a9d:3f0a:: with SMTP id m10-v6mr9836869otc.157.1526790296854; Sat, 19 May 2018 21:24:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:185:0:0:0:0:0 with HTTP; Sat, 19 May 2018 21:24:56 -0700 (PDT) In-Reply-To: <3c56dfdf-d196-da34-35db-42b3675039dd@infradead.org> References: <3d9be2f2-3fbe-411b-8529-0e0847f01346@infradead.org> <3c56dfdf-d196-da34-35db-42b3675039dd@infradead.org> From: Ulf Magnusson Date: Sun, 20 May 2018 06:24:56 +0200 Message-ID: Subject: Re: [ANNOUNCE] Kconfiglib menuconfig implementation To: Randy Dunlap Cc: Linux Kbuild mailing list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 20, 2018 at 5:51 AM, Randy Dunlap wrote: > On 05/19/2018 08:45 PM, Randy Dunlap wrote: >> On 05/08/2018 09:59 AM, Ulf Magnusson wrote: >>> Hello, >>> >>> I've added incremental search for jumping directly to a symbol now. >>> Regular expressions are supported as well. >>> >>> Some screenshots below: >>> >>> https://raw.githubusercontent.com/ulfalizer/Kconfiglib/screenshots/screenshots/ss10.png >>> https://raw.githubusercontent.com/ulfalizer/Kconfiglib/screenshots/screenshots/ss11.png >>> https://raw.githubusercontent.com/ulfalizer/Kconfiglib/screenshots/screenshots/ss13.png >>> >>> The last screenshot shows how things might look after you jump to a >>> symbol. The jumped-to symbol wasn't visible in this case, so show-all >>> mode was turned on automatically. >> >> Hi Ulf, >> >> >> Hm, OK, I used the trick that you supplied a few weeks ago and I have the UI now. >> >> ARCH=x86 SRCARCH=x86 KERNELVERSION=`make kernelversion` \ >> Kconfiglib/menuconfig.py >> >> so yes, a real Makefile target would be nice. :) > > > Enter: / (search) > then: * (Bang) [this was just an unlucky typo on my part] > > Traceback (most recent call last): > File "/home/rdunlap/scripts/menuconfig.py", line 1447, in _jump_to_dialog > for regex in s.split()] > File "/home/rdunlap/scripts/menuconfig.py", line 1447, in > for regex in s.split()] > File "/usr/lib64/python3.4/re.py", line 223, in compile > return _compile(pattern, flags) > File "/usr/lib64/python3.4/re.py", line 294, in _compile > p = sre_compile.compile(pattern, flags) > File "/usr/lib64/python3.4/sre_compile.py", line 568, in compile > p = sre_parse.parse(p, flags) > File "/usr/lib64/python3.4/sre_parse.py", line 780, in parse > p = _parse_sub(source, pattern, 0) > File "/usr/lib64/python3.4/sre_parse.py", line 377, in _parse_sub > itemsappend(_parse(source, state)) > File "/usr/lib64/python3.4/sre_parse.py", line 586, in _parse > raise error("nothing to repeat") > sre_constants.error: nothing to repeat > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "/home/rdunlap/scripts/menuconfig.py", line 2389, in > menuconfig(Kconfig("Kconfig" if len(sys.argv) < 2 else sys.argv[1])) > File "/home/rdunlap/scripts/menuconfig.py", line 340, in menuconfig > print(curses.wrapper(_menuconfig)) > File "/usr/lib64/python3.4/curses/__init__.py", line 94, in wrapper > return func(stdscr, *args, **kwds) > File "/home/rdunlap/scripts/menuconfig.py", line 483, in _menuconfig > _jump_to_dialog() > File "/home/rdunlap/scripts/menuconfig.py", line 1466, in _jump_to_dialog > bad_re = e.msg > AttributeError: 'error' object has no attribute 'msg' > > > > -- > ~Randy Thanks for the report! Invalid regular expressions are detected, but it looks like the 'msg' field of re.error was added in Python 3.5 (you have 3.4). I'll check if the 'msg' field exists and fall back to just printing "Invalid regular expression" otherwise. The 'msg' field just gives a more informative error ("Bad regular expression: nothing to repeat" in this case). Cheers, Ulf