From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id vHHEA6sz/WC1BAEAgWs5BA (envelope-from ) for ; Sun, 25 Jul 2021 11:49:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aAJ5Oqoz/WAxFgAAB5/wlQ (envelope-from ) for ; Sun, 25 Jul 2021 09:49:30 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 47D927097 for ; Sun, 25 Jul 2021 11:49:30 +0200 (CEST) Received: from localhost ([::1]:56884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7alE-0000Gp-3l for larch@yhetil.org; Sun, 25 Jul 2021 05:49:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7ake-0000Gh-EK for emacs-orgmode@gnu.org; Sun, 25 Jul 2021 05:48:52 -0400 Received: from mail-oln040092074020.outbound.protection.outlook.com ([40.92.74.20]:20258 helo=EUR04-DB3-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 1m7akc-000243-3f for emacs-orgmode@gnu.org; Sun, 25 Jul 2021 05:48:52 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lEp91lBheSG9wjV4z9dIwTEZswuWSp0bw/biVQ7Ldp7aDV4ZvpSOHa3KUrn/2RIoNc/o0iCXZ0UzZgzuB3H1UC7tdOf6EgldjNLqDuzWlyIKzlQdOOXA+L0sn85EDGTtNEepPEfCtHw7Jp2+e7iNRSFNXCa34cQ0h9VG1zdCMNul71nVataW6Rv9AH0IaAmd3ytpDSKhBs3zOBkeCcK/jPtifYU8zuIpzoHucfgiZOW3SxhHAs+XYDkZO8HsF22TxXVZEdN5mSAF4Y1jMcDQkzgsk4X+xTvLT9ZN0bUo17l7BrOYUJ+dYDHF56UUuExUYxoMmLkKdgovAD8J6B7VRw== 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=sPLqbYQPFuGXselqJtpLRY6Yl9Lb37IR2OJ4aWu+Oxk=; b=RXBTkZEdnZPMpI3FUzeeYoO4t/2SjbIjdvNU7brtX/FEW3urHTxjJ4qOKzpuum2eKCpSoqAaRrucfLDVYoJJ4AGI0NUXgFxCcESu0PBjwwlXAOp/iE5gGOD8zY2RjMSIsJUA/bqFjQNHsj1rpL8I92jlf6NDKZA7p4JXpMtJ7Tprdq4CBTPVqNqjo0tG9pvyMA7JdADIMON+V8Ogyqv4nBkGzOltfL7Y6bjXJbCMHG2GQP7WMVHj7SdrluhDp39HjfcjIM2sipC0pS2XOp0dsu2LLEjIor7C2nwHP+Vs4WvpGPs0FCzZEnRozO3cA4JRgxh63/itu9Rlj+Eva/gDWA== 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=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sPLqbYQPFuGXselqJtpLRY6Yl9Lb37IR2OJ4aWu+Oxk=; b=q6gzup/azye0a7/sOhX0lP4OEpNa7u34gNyMOtNsNWYZTgXD2mtVTg6rsE/xf6EJ3jUbyyH5gN9id8WjKVnuZTD03hNIlERwvpOixLx04A6LjGGkxeColfUpUubELso4/U95zifEAMLOltYPsQ2rYPqF5mAODjZjA24+RD84os1mlEkYJKxqNR/+t8E0a4QQAwn6NFB16oE4AaGFtL2UQbJgmxOZVPAyuLJPIB2VCzk9vOcipXcaXCFoSKmVeTtcBXBA/wwTgJEULzpTUAoCZpqGfDt4VUTqQhHY7lDzfC4aO6oHMxqt2OPW3cICmktIAAu+q16Pvneb7NnqaLAnwQ== Received: from DB3EUR04FT033.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::4f) by DB3EUR04HT166.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::371) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.24; Sun, 25 Jul 2021 09:48:47 +0000 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:7e0c::42) by DB3EUR04FT033.mail.protection.outlook.com (2a01:111:e400:7e0c::78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.24 via Frontend Transport; Sun, 25 Jul 2021 09:48:47 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:80C400ECBACEC505B95BE851A7BC8BC3E271CFC074911FF1C797E002FFFDA032; UpperCasedChecksum:D3326081AD0F030DE793CA607DD719DED0E91249BDF2E9E432AE43D4C3592B10; SizeAsReceived:7608; Count:46 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::e47b:760e:fa35:f28b]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::e47b:760e:fa35:f28b%7]) with mapi id 15.20.4352.031; Sun, 25 Jul 2021 09:48:47 +0000 From: Arthur Miller To: Tim Cross Subject: Re: Helo for defun/macro arguments list in minibuffer when in org-babel src blocks? References: <871r7ngrzt.fsf@gmail.com> <874kciivu6.fsf@gmail.com> Date: Sun, 25 Jul 2021 11:48:46 +0200 In-Reply-To: <874kciivu6.fsf@gmail.com> (Tim Cross's message of "Sun, 25 Jul 2021 19:03:55 +1000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain X-TMN: [OmVackAtxT4YsPW2dNxxGX8Ve4OqbYBY] X-ClientProxiedBy: AM5PR0502CA0006.eurprd05.prod.outlook.com (2603:10a6:203:91::16) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87r1fmn2pt.fsf@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pascal.homepc (81.232.177.30) by AM5PR0502CA0006.eurprd05.prod.outlook.com (2603:10a6:203:91::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.25 via Frontend Transport; Sun, 25 Jul 2021 09:48:46 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 3a8ac0ae-03b8-443c-95aa-08d94f5165d4 X-MS-TrafficTypeDiagnostic: DB3EUR04HT166: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Or17P+URxnQM2jn3QwewUNUrTq8yVJ57oH7pTH/uyXX6v7i+A/L4YFBz+qGV2bxuYaQpxF1gbhK+n1Ah7GS2OtG7amdKuNYquOn/FdwtJznQGabQKVCYj7iD9YzbWi1DXByiYylFhJMC2uZiumNFAWpXMGJAKs4KdrauGKvVvfsbaOt6Y3GzX0cj5mHT7AvtLh29SMbYYNW/QEDdEwXzpVFcDx2mNVuX7PTAez68kBsRzp56Q/wvzpJNzbcpmOwkBDtnmQ2Ju2Wun628CsY/yQA+aXHVzNgFmi3Nek1+FTgn8TDZNEjRuA7UAj8/Sr/cOOIYgCESsGVMW/g7KQkzeH2pQ9qJPh2WpKz9zvW9Bhc7JzQ42oNUBsys+1pEE2GnzH6Js0j2pEoKfbogCIJQdUMbKKpkFfdLM0VTxwmGtvlnAYrS80atOW67ddmjoYl/EOsa9Sug1IHge6tDylVnI2kpw/FNuWlONDe2DS5YoFs= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BtDpxGOLyuIIwV9B6ZSEHu5shrNnnqZbFsggIpkPb7vAcxx9lfMkWmSWN1KcAmNbn594CLqJ+UkEw3xzQsZmTN3MUtkTgte3WhKXVNI66IWzDOd5dqVcFDcCiwGRIZgkQaTBU8HCqc3M7SU3/mQcFw== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a8ac0ae-03b8-443c-95aa-08d94f5165d4 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2021 09:48:47.2317 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB3EUR04FT033.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3EUR04HT166 Received-SPF: pass client-ip=40.92.74.20; envelope-from=arthur.miller@live.com; helo=EUR04-DB3-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627206570; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=sPLqbYQPFuGXselqJtpLRY6Yl9Lb37IR2OJ4aWu+Oxk=; b=gsgNxgxLqT8bKx39Qr/EhPa0F9oZmfVN6LBuR2ixHx+uJjkWWdxnZc4B7HKvhyoiz1BClU aOWasPvePddltwAVnL3mfr8jlI5kEyyLaSUMMrE8PtKHw1/NItoE7+WkSMa1Oilw4F3RT/ B6yYntb4yde1NwDIiPKnKP7uK/hvyNc+6MxRDeBdTuTkK/y1JADiUr5WqbPU/AQQDhaQLX D70bRpKjg5YjaRoqTWWRPbmaJcZo6zOgXhr7BrxHvMbRw4DGqYLffXrnDHoUm23g+g3qXp Gq5p+eOhlxy80ZnG5XuMjQGqBDvLsxrgWIfyLyZw3yF2QxmfZeRnuygCbd0khw== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1627206570; a=rsa-sha256; cv=pass; b=Dp0oNzcCewKErz8JRJZYjyH2Wp1PZQpDLM4489Wm8BitOD4gPHcfnC+HucG9lb02pBVnOr j61On515EF7xZqospWa44CJQM8OGhuKCyHJ0GyXMD5tb5QGsD93bCuRt1rwVuftuDizZdW ObUZIjcDUaJAR7rWs+0549NHVkp1Wy48dimYQYj65DGkvxmtvSTe6es6ALCWDs0elFS3z2 QnNujCrBzveGLzUQbQf+3qmdyA6gYM9URvjShv0Ds+UNJHRwvYd4gJ8mzQK2FN6c4SwyoL pzTdnO7052jgz3VOioqyKV013GD38Lft+EiZtttLVIoJ8gBe9NN2U/Puenbsjg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b="q6gzup/a"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b="q6gzup/a"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=live.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 47D927097 X-Spam-Score: -2.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: UXlZmYNqrq44 Tim Cross writes: > Arthur Miller writes: > >> Tim Cross writes: >> >>> Hi, >>> >>> when you are editing source blocks are you using org-edit-special, normally >>> bound to C-c ') or are you just editing the source blocks directly within the >>> org buffer? >> No I don't narrow. > > Note that org-edit-special isn't really narrowing. Rather, it opens a > new buffer (there are options to control how it does this i.e. replace > org buffer, split to open in new buffer, open in new frame etc) which puts the source block > into the native mode for the language being edited. For example, if > your editing an emacs-lisp block, the edit special buffer will be in > emacs-lisp-mode and will have all the facilities you would normally have > when opening an emacs lisp file. > > What it sounds like you want to do is just have all the (for example) > emacs-lisp mode and associated minor modes activated when your cursor is > within a source block within the org buffer. This is extremely difficult > to. Part of the problem is that modes like emacs-lisp-mode are designed > to operate on buffers. Yes indeed. I am quite aware of difficulties involved. I did myself a small [[https://github.com/amno1/dired-auto-readme][hack to dired mode to "auto show" readme files]], and got into all those problems there. That one major mode per buffer is starting to be a limitation. What we really would need is a major mode per region, or some other mean to be able to combine modes. Maybe something like a "primary mode" which would be what Emacs opens into when a file is loaded, i.e. 'org-mode' in this example and secondary modes, which would be other major modes loaded, and somehow activated per region or I don't know. But that is a day-dreaming :). It would require rebuilding entire machinery. > There are some 'special' packages, like mmm-mode > which try to support this type of functionality, but to be honest, I've > never found them very good and they often have significant performance > problems. Yes I know. I tried with mmm-mode, didn't really work well for me. > Of course, this is emacs and you can probably get something mostly > working, but it will take considerable effort and may well have > performance hits as well as other unexpected side effects. I think your > definitely 'swimming against the flow' and suspect that in the end, you Haha, definitely :-). But that is the story of my entire life ;-). Yes, in this case, that is correct. What I am doing here is bending entire org-mode to do something it is not supposed to do. If you are interested you can take a look at [[https://github.com/amno1/.emacs.d/blob/main/init.org][my little app on my github]]: Look at "org hacks" under generator heading. > will spend far more time trying to maintain your hacks rather than > actually focusing on the work you want to get done. I originally went down a That is what is hapening, but I started this as a hobby project as well as a learning experience. I really suck at both Emacs internals and elisp, so I need something like this as a learning project. > Anyway, good luck. Thanks, and thank you for the tips and feedback.