From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CLN8Jwom/WAu8QAAgWs5BA (envelope-from ) for ; Sun, 25 Jul 2021 10:51:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WC9+Igom/WAXPAAAbx9fmQ (envelope-from ) for ; Sun, 25 Jul 2021 08:51:22 +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 7C0613AD4 for ; Sun, 25 Jul 2021 10:51:21 +0200 (CEST) Received: from localhost ([::1]:34162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7Zqx-0007D4-0Q for larch@yhetil.org; Sun, 25 Jul 2021 04:51:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7ZqJ-0007Cw-7a for emacs-orgmode@gnu.org; Sun, 25 Jul 2021 04:50:39 -0400 Received: from mail-vi1eur06olkn2032.outbound.protection.outlook.com ([40.92.17.32]:27488 helo=EUR06-VI1-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 1m7ZqG-0002gB-S5 for emacs-orgmode@gnu.org; Sun, 25 Jul 2021 04:50:38 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QWLIG14SQFCj7I1xtbKfSLKd4otYfk+ZAHRY2khnS/+uFfhisLY9XIE5iEnyyfqx3AAwK76vJ8X+sMld9R84ZFNeGgiGfqwU1NE8JyEIWHuukcBiJkgWNpGftA1lKscEq4X9c871e2Jw7wYHkzLQqkXAhfz2KUuHipqWYvqOIY4yezslA1O7ryNCaUd3gy/rShjLGXMEuczwW7jcPrAlVCOCafM3LzIuKHm7V3rnkEYKqNhEKMY5MnabjK+ajNHfm8oH4nISza0DyZWfu0kh8JIAqxfXMmKIHouoU9tJ75rzg21AuIfj0kZ58yCEhsGX5jvua+siEOJ3oDq0kU1J0Q== 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=EColU7XRPww3NlTIGWjE05b4MNcjhT19ObB+ac8WrCI=; b=HmelsHlfNacStxd2VnS16DrK1aA+asDjVHkeqTwY681GtdmiYpZtCx9W86EQbxXVW6ebrqUiFlqt4EkDwJgIA7vxxEmTxWZWUntl9x2TgILE0Z5Q6OVEf94jihocOk/aOalQLEIUl4ehX6N3eYIbtDkadHM4eqKvReE38uiowYH74X4DDcjePdQgl42Bz/kUSbmAeWoAjEH6fscxRVpZz3+wGYEcsyL70A6TwCdSMt3NZP01XTup67igqXiAL/XkH9qEjM4YxcYPxZP73s1fqyc2xSTlQzeHGoew+vg/nRjGTY8wpNwBHtV320CbHPRd0Gq7MvtC1Cc96s/Hb4Ltyw== 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=EColU7XRPww3NlTIGWjE05b4MNcjhT19ObB+ac8WrCI=; b=LftLpRhD/gQUKxyLT6JE+zJCgwUlMOGJY6kspRty+Ck4Y4svvF77r2bDqG4Mhjx2XxZ5E31xaPi56lbqmKy6TDghcKyjG9sJjNpm/iTU6MPlZTYy2VG04fHJpO9SSoTqjgSgKpRGJbLPz9OVT40/GjcE8eUf0A5A41a9TAAKrl87JNlUmi7tW3nY7N21+ItD/+X59Bs9HaNcnDZmqbg9JpoxmXwyNtpcIal7FCh5znNBooTJB1zKZFeFBzbbD062QAhY4Du+4HwKetbyhyhgVVD542fkhypn1Mb4fijHygGmuZB3LNSWzXDsrCGBcWlxp90WsFYqmKkxVANpRZ1QKw== Received: from AM7EUR06FT045.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::4a) by AM7EUR06HT182.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::503) 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 08:50:31 +0000 Received: from DB9PR09MB4986.eurprd09.prod.outlook.com (2a01:111:e400:fc36::53) by AM7EUR06FT045.mail.protection.outlook.com (2a01:111:e400:fc36::383) 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 08:50:31 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:44BD5F3676925B828644FCA68F897A23CE1D25B6AA478BC124D1D31146D96631; UpperCasedChecksum:A03DD762922BB1B58DB3420993C6B676377DF86D238E430C65D5C3D2FF01C3D9; SizeAsReceived:7498; Count:46 Received: from DB9PR09MB4986.eurprd09.prod.outlook.com ([fe80::717d:18d1:6fab:6021]) by DB9PR09MB4986.eurprd09.prod.outlook.com ([fe80::717d:18d1:6fab:6021%4]) with mapi id 15.20.4352.030; Sun, 25 Jul 2021 08:50:31 +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> Date: Sun, 25 Jul 2021 10:50:30 +0200 In-Reply-To: <871r7ngrzt.fsf@gmail.com> (Tim Cross's message of "Sun, 25 Jul 2021 10:05:05 +1000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain X-TMN: [JayLXsejHPT2u9QK2xfxmDe/PIsknWMW] X-ClientProxiedBy: AM5PR0701CA0056.eurprd07.prod.outlook.com (2603:10a6:203:2::18) To DB9PR09MB4986.eurprd09.prod.outlook.com (2603:10a6:10:2a9::19) X-Microsoft-Original-Message-ID: <87zguan5ex.fsf@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pascal.homepc (81.232.177.30) by AM5PR0701CA0056.eurprd07.prod.outlook.com (2603:10a6:203:2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.9 via Frontend Transport; Sun, 25 Jul 2021 08:50:30 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: c5b730f4-2eab-40db-f942-08d94f494210 X-MS-TrafficTypeDiagnostic: AM7EUR06HT182: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FJJG2tWS3666yTtuluJL6kSFiQG3vwCAdveWVFms6vQdIzu4K4+uNpM4XBIhYDsEyxHPptI5vm8bWB/D6eRBq9wPZLfwL8DGckmnETL+0/FAROCy0fcKX6RXFHllUQH6j+qg+CStJvxQqqipaUVvMA7ZNfIF3fsigF9dJID8FxyM7/eK/pOjLr71J2fmrNMqfEvBAB07Nv8yuXN/aS5fYjjN8IPzM6fX3GFA50Sx4hzNZCjnvJT+cFweERY/VH6U2UdNtJPeO8uqirRAQRR/x+uTsYUll27ZXx0ya7cRbYHRHxCwVAPZ7RPCilrwq1Qjw8lqDbnSLdrFwWBnWW5Fq6WkoXJKlvD5YuD48cRae+qkZ3QKVL13QFcVFq/UK6V0bmnX2MircbbKZhKUMGxvQayBcsHVlFxc+7D4Oi9y0sJ7YsvsS+blZvG4V8Vli1oKaIFtzyolSrTTXPq86oCYDNGl1hsM50p2oxFjCRr4a7U= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MGJPk8axtUBiDiV/7Pk5UM7zOaZ2uc87GDcWX7ST4vtTn02pteKFMsIaFTot8wsRTkWFT9fM9lFCjFud9HWaNnSiKS0eDy4v5XkXIdYOgSSIa0ZdNQFOLVehk3lMSCCwAtj4++glkwG0bGYkaXYmHQ== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: c5b730f4-2eab-40db-f942-08d94f494210 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2021 08:50:31.2835 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT045.eop-eur06.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: AM7EUR06HT182 Received-SPF: pass client-ip=40.92.17.32; envelope-from=arthur.miller@live.com; helo=EUR06-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 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, URI_DOTEDU=1.348 autolearn=no 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=1627203082; 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=EColU7XRPww3NlTIGWjE05b4MNcjhT19ObB+ac8WrCI=; b=rSoSt8cxG4DEnkenLeoti6rG34xMHWvO2cp1vw+Egjroiz/XzZw11zedMBhkVsCfCDHS9e wCpFvQVMP4jPL49RBppUoc6/Dq7JZeFEknOt7l9P2ikC1lBUTSAifLxGmTVT2RvmDG4tPM KAxU2z7iPBGN/I4+wUbSRk8qBAliEp4JObv51qnKmXM7tDFKuwV/lVE1+WeBh2gETWt8Jh Gv3aP+KwmJJ5bCimzH3aHDqSbjeLet+KGmboUjBwdnkSPzxeL6ASWSSSWbUdudl+2scOCJ 6IF8urqBrVfU3x1KW3JT95mpM3iPqwSFrn16G32AbvLybFE9MzTCn8N0ZVFnew== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1627203082; a=rsa-sha256; cv=pass; b=IYcHlPFIDjONZgwukeiFs11cYLyB9jd91b6pqGl+mZyeEzDn76LTmKbA7ipIgcQ1onTXa9 kkpjiEDGnGdnLURsI8A9Mzv6+nB9ZW7RhtxX43jnV4fK+A1OmMATPgFp/WvVVqRhCDF9GY eFcnhCu5yi3v+9X6+8rWuNs29dbXCaAa/6PLWXdfro/x4Fu071EOujCE3S+g/OeTNLGgXP 0G+Lho5EoXfoB5Y9xLSoJwE2j/zvlYuOR0Er/jwoif7O6p25sMMhMf7qcIn+49EouYyl3d 3gXYIQYKxSSRwUotDJoJVKNL4Bjwgq1vw8fBKV+jnxpAbCUiTC+9b3qqnBbirA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b=LftLpRhD; 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: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b=LftLpRhD; 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: 7C0613AD4 X-Spam-Score: -3.12 X-Migadu-Scanner: scn1.migadu.com X-TUID: TsPglPqvkiWD 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. > The functionality you are referring to sounds like eldoc minor mode. Yes it is, I was just looking at elisp-mode.el, and saw the eldoc support. I tried to defadvice around with that scimax spoof function from J.K's article, but I don't really get it to work. > If you open a dedicated buffer to edit a file in the same language as your > source blocks, do you see the behaviour you want. For example, open a file > called test.el and edit some Emacs lisp. If you don't see the behaviour your > after, you need to configure emacs-lisp-mode to load eldoc mode. Try typing M-x > eldoc-mode and see if you then get the behaviour your after. If you do, > then read up on eldoc-mode and how to enable it. > Using org-edit-special ensures this occurs when necessary. > Editing the source blocks directly does not. I know, I would kind of like to skip to narrow back and forth. I understand I maybe stretching it a bit, but kind-a cool if it could work directly in src blocks without narrowing. > The environment you get with a dedicated buffer and that you get with > org-edit-special should be roughly the same. So the trick is to get things > working how you like them using a dedicated *.el buffer and then use > org-edit-special whenever you need to edit source blocks. There is also another > good reason to use org-edit-special - there are some situations where org needs > to add some special escaping characters in source blocks to enable things to be > parsed correctly. Indeed. I had to introduce some macros because of <>[] chars being parsed wrongly so syntax highlight and identation in src blocks get screwed. I think I asked for helped about it. J.K. posted his answer in SX, but I couldn't get that to work, so I just wrote few simple macros that fixed at least syntax and indenting. Lispy is also really badly screwed in org-buffer directly, at least for me cursor jumps all over the place. Anyway, after trying the "scimax-hack" (if I can call it so), which works so fine with keymaps, I thought it might work with eldoc and company too. I am just not sure which things to hook into that spoof function. (advice-add 'eldoc-mode :around 'scimax-spoof-mode) That one let me enabke eldoc-mode which otherwise does not want to run in org mode (for me at least). However I still don't see the defun signature in echo area. I tried to hook via those two below: (advice-add 'elisp-completion-at-point :around 'scimax-spoof-mode) (advice-add 'elisp-eldoc-documentation-function :around 'scimax-spoof-mode) but still nothing in echo area :). Anyway, thanks for any help! > Arthur Miller writes: > >> I have been doing quite some programming with elisp in org mode, and one >> thing I am missing is this help that Emacs shows in minibuffer for >> functions and macros. You can see the example in the attached image. I >> am not sure what I have to enable (or disable? :)) to get it to work in >> babel src blocks? Or is it even possible? >> >> Some few days ago I stumbled on a blog post by J. Kitchin about enabling >> orignal mode maps in src block: >> >> >> >> That was another thing I was missing, and that one work really well. >> Thank yuu John! >> >> Can that hack be used to enable this help to pup up in minibuffer as >> well. I am not familiar what causes that lookup, but I see it happends >> even when Emacs is started with -Q option, so it is something built-in >> and enabled by default, probably in elisp-mode itself. >> >> Last thing I miss is company doing it's thing. I can complete by >> pressing TAB, but I would still like it to happen automatically. Is it >> just me being noob and not enabling something, or is it bit more >> coplicated than so? >> >> Sorry for the long writing, but basically what I ask is, can we get more >> of usualy elisp stuff hanpening in babel src blocks? >> > > > Regards, > > Tim > > -- > *Tim Cross* > > /For gor sake stop laughing, this is serious!/