From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ramesh Nedunchezian Newsgroups: gmane.emacs.bugs Subject: bug#47690: 28.0.50; repeat-mode: Introduce a defmacro for chaining commands ??? Date: Sat, 10 Apr 2021 17:58:58 +0530 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27598"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 To: 47690@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 10 14:30:46 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVClB-00070s-HK for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Apr 2021 14:30:45 +0200 Original-Received: from localhost ([::1]:33930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVClA-0001V2-9I for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Apr 2021 08:30:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVCkU-0001Uq-Rk for bug-gnu-emacs@gnu.org; Sat, 10 Apr 2021 08:30:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40025) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVCkU-0002Rb-IE for bug-gnu-emacs@gnu.org; Sat, 10 Apr 2021 08:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lVCkU-00050L-EK for bug-gnu-emacs@gnu.org; Sat, 10 Apr 2021 08:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ramesh Nedunchezian Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Apr 2021 12:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47690 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161805775619160 (code B ref -1); Sat, 10 Apr 2021 12:30:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Apr 2021 12:29:16 +0000 Original-Received: from localhost ([127.0.0.1]:51571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVCjk-0004yy-1N for submit@debbugs.gnu.org; Sat, 10 Apr 2021 08:29:16 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:35520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVCjh-0004yp-P8 for submit@debbugs.gnu.org; Sat, 10 Apr 2021 08:29:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVCjh-0001Qe-JA for bug-gnu-emacs@gnu.org; Sat, 10 Apr 2021 08:29:13 -0400 Original-Received: from mail-oln040092255081.outbound.protection.outlook.com ([40.92.255.81]:38112 helo=APC01-HK2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVCjf-0001tN-JP for bug-gnu-emacs@gnu.org; Sat, 10 Apr 2021 08:29:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TiSnwq7hsQXZP6LD2vSgS7RAKMkzO/uaPziFJ6D1bk7ORdlmqaCBvpjVmRJq8+yJMyU1Wxu4vEmi2LkWEziZjiGrpJJo5/HUC/koe6qOazQoQd6fIEHDPanENbqOcrzaK0AdcnHVDJHBF/+W6MnIIcXlFiGC0D8GM2rciFeT53MMDXZ2acnEaudK3WOB8Hom4yDnU1jHY76EWI80bx3ScWKzcpLaLwINCxPVxwByDwwFfku/FElGwxJcTeVqBtrs4aq0KV/hF1Fxz6SmrDW44+kS18q+33OlCFBfBw9+STNwOZlrcZuVHdAUSX+E5HXn6YVz3KShmENxD57x4JGmQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VktYXIIR856pBmNnaXyGzfAlBjF9MTC/AG7sHRVRwVI=; b=ZtU0M5WiY05L9QTrLfrQpjgGrnRHnOpa/93YM8lhwfkBhvhRkfSTPl4pUBWCgmRqMamagz44b6iGtXnmbKtOHdy8g6CGHQE96NAT7QjBtv+6Os1XBg1pnfpk6PqBiywINpAIEBCMfh+IgYPV5ZPDsPSz5jhH83O2J8Ct1RRz4ajvvC+r+2Fm0CMoK2GhB6OCFVtcflbBkyCVAqZ6lUOeDez46SwcpThS5VWjo83x1HsVngy6eDSeM5w0Sf8O5F2f8AVcozYHcpJPbHEvEHOO3uYgmwKe3yDh1rhqyR9K8Ts9ZSFwMvHqwLdYBH7p2W8hT4Ocl5gF+OqTw7+soFcy5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VktYXIIR856pBmNnaXyGzfAlBjF9MTC/AG7sHRVRwVI=; b=mJwH7ngTF8dVHNICnxze1/xX0MXwIyMzS9iBbeVc1+coxKlyOGyLg2l0xb1mgRCwajGErKLun4Dmgd39JkaI+W3RYOI17dbljuqpVj87JeSds5tXGOF2XkkwFRRo1qv5o0vU+yDC4Cafw190xQ2M+kanTzosl4l2TbfIFwWac/8TiblB7mrXe7Yr3AKTI9w51M9c5vA5R3j5ypZs96hBhGUcm2t0ZGO22Kw6hxzGJv21+jrHFGQyOflQ6STnPEOd1g24XLsFAnWLimdilvlIU7l4h0EoKFNkex+7iY9IN/TTSfaoFQBJ2sEZTcgsVtkOz12VFZKfTsg5bNZKU4SWyg== Original-Received: from TY2PR0101MB3693.apcprd01.prod.exchangelabs.com (2603:1096:404:800f::16) by TY2PR0101MB3247.apcprd01.prod.exchangelabs.com (2603:1096:404:ed::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.21; Sat, 10 Apr 2021 12:29:02 +0000 Original-Received: from TY2PR0101MB3693.apcprd01.prod.exchangelabs.com ([fe80::4980:4d7f:474b:de2c]) by TY2PR0101MB3693.apcprd01.prod.exchangelabs.com ([fe80::4980:4d7f:474b:de2c%3]) with mapi id 15.20.4020.018; Sat, 10 Apr 2021 12:29:02 +0000 Content-Language: en-US X-TMN: [iJMUT8D8oSRPiwNWYAKOubgToCybTNrTb3xrk83g0buTJM4qEaZXl2cqwCta/fvlleLjODg05kE=] X-ClientProxiedBy: MA1PR01CA0153.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:71::23) To TY2PR0101MB3693.apcprd01.prod.exchangelabs.com (2603:1096:404:800f::16) X-Microsoft-Original-Message-ID: X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from [IPv6:2401:4900:16e4:8f86:92c9:7a70:7a09:28ca] (2401:4900:16e4:8f86:92c9:7a70:7a09:28ca) by MA1PR01CA0153.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:71::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17 via Frontend Transport; Sat, 10 Apr 2021 12:29:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1aab5f5c-a8fe-424f-1652-08d8fc1c393f X-MS-TrafficTypeDiagnostic: TY2PR0101MB3247: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z9SZkowPm4+071eWmehbNMkZ/KAvW79dyxO0jZWX5LSrt0oZ7nb/q1XRWvac8W75AkVkoC2AA9vrMOKzma/y9wHNqPKgpcOgoW+jOsJcwDDskRRh61d5fhbcnTFQIppGa4rBPMH2qRo8Cb2uRKsyHIZvOGi2egkpTiE36befI5t++fbjyMN2I4qVK3COCHxwJhs767qQtKXPLJNBdp3X7tVgowN1a5rMMNfDP7cIxdtKOxcvH1pic3Bbo4OvWed0V2IDjt+/K4DHGKeswUYn4OKrGaEu6U99hAwyz1rgB90+tMkm/5UQmXyGPgTh7CZQDlEhjcpx+InyKYiLSxA4H1e2nXlA4UwjVQ3E+jO4FSuNqNgASb1nNqVOePGgmOe3nmdb1QgUcjlUJ+/onSsv7LHAeB/ZskFU5g0VSXDbPX21IBmyPmCzvw4ZxzNvqf8t X-MS-Exchange-AntiSpam-MessageData: Wbu8rOpsw1Sjd8KcYEGMgbjPuF9hAep9oB1HaLPD5tollzKBcPkRwCPPxlPByZXXFP2kZFdeA0yNJkCQ5fMCtpE+mg9CWyxeCXZHd+dtujRZMO9/d6MJqeOrEtK480a+zrQONyusGKUdAO31sx67Hflityg4Ibj41V4W8hiAQkfM03bwJjntzNVgZDUcYXht2a5bdWYNrSUScVFD9Lf+0Q== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1aab5f5c-a8fe-424f-1652-08d8fc1c393f X-MS-Exchange-CrossTenant-AuthSource: TY2PR0101MB3693.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2021 12:29:02.6388 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR0101MB3247 Received-SPF: pass client-ip=40.92.255.81; envelope-from=rameshnedunchezian@outlook.com; helo=APC01-HK2-obe.outbound.protection.outlook.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203792 Archived-At: Think of this email not as a bug, but as a note ... So, feel free to close it after digesting the contents. Context: When I look at the documentation of many of the MELPA packages, they have long long long lines i.e., one line per-paragraph. It always bothers me when I run across such files. I always hated reaching out to menu to fix the wrap. Now that there is `repeat-mode', I can mindlessly keep pressing a key--F12 in the present case--to cycle through various wraps until I land in the one that is agreeable. ;; Pressing F12 repeatedly is equivalent to cycling through the ;; following 3 radio buttons ;; ;; 1. Wrap at Window Edge ;; 2. Truncate Long Lines ;; 3. Word Wrap (Visual Line Mode) ;; ;; in Menu->Options->Line Wrapping in this Buffer. ;; ;; This is implemented through the all new `repeat-mode' feature. ;; ;; Much like how `C-l' (= `recenter-top-bottom') cycles the cursor ;; though different positions, pressing F12 will take the buffer ;; through different wrap settings. ;; ;; This is what I see in *Messages* buffer when I press F12 ;; repeatedly. ;; ;; Visual-Line mode enabled ;; Visual-Line mode enabled [Repeat with ] ;; Truncate long lines enabled ;; Truncate long lines enabled [Repeat with ] ;; Truncate long lines disabled ;; Truncate long lines disabled [Repeat with ] ;; Visual-Line mode enabled ;; Visual-Line mode enabled [Repeat with ] ;; Note: Instead of wrapping at window edge, a better idea would be to ;; use `visual-fill-mode'. See ;; https://elpa.gnu.org/packages/visual-fill.html. ;; It may be a good idea (?) to provide a macro, say, `chaincmds', ;; which can generate the below code when invoked with ;; ;; (chain-cmds (kbd "") ;; '(menu-bar--visual-line-mode-enable ;; menu-bar--toggle-truncate-long-lines ;; menu-bar--wrap-long-lines-window-edge)) (define-key global-map (kbd "") 'menu-bar--visual-line-mode-enable) (let ((key [f12])) (defvar menu-bar--visual-line-mode-enable--repeat-map (let ((map (make-sparse-keymap))) map)) (define-key menu-bar--visual-line-mode-enable--repeat-map key 'menu-bar--toggle-truncate-long-lines) (put 'menu-bar--visual-line-mode-enable 'repeat-map 'menu-bar--visual-line-mode-enable--repeat-map) (defvar menu-bar--toggle-truncate-long-lines--repeat-map (let ((map (make-sparse-keymap))) map)) (define-key menu-bar--toggle-truncate-long-lines--repeat-map key 'menu-bar--wrap-long-lines-window-edge) (put 'menu-bar--toggle-truncate-long-lines 'repeat-map 'menu-bar--toggle-truncate-long-lines--repeat-map) (defvar menu-bar--wrap-long-lines-window-edge--repeat-map (let ((map (make-sparse-keymap))) map)) (define-key menu-bar--wrap-long-lines-window-edge--repeat-map key 'menu-bar--visual-line-mode-enable) (put 'menu-bar--wrap-long-lines-window-edge 'repeat-map 'menu-bar--wrap-long-lines-window-edge--repeat-map)) -------------------------------- In GNU Emacs 28.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-04-10 built on debian Repository revision: 0db2126d7176b0bd1b13d4b0d1cd958c8cf55714 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12010000 System Description: Debian GNU/Linux bullseye/sid Configured using: 'configure -with-imagemagick --with-json --with-xwidgets' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB