<div dir="ltr">Here's some code I got from Jennifer Paykin at UPenn to use Agda mode standalone (via control-\) which is similar:<div><br></div><div><div><font face="monospace, monospace">(condition-case nil</font></div><div><font face="monospace, monospace"> (progn</font></div><div><font face="monospace, monospace"> (load-file</font></div><div><font face="monospace, monospace"> (let ((coding-system-for-read 'utf-8))</font></div><div><font face="monospace, monospace"> (expand-file-name "agda-input.el"</font></div><div><font face="monospace, monospace"> (file-name-directory</font></div><div><font face="monospace, monospace"> (shell-command-to-string "agda-mode locate")))))</font></div><div><font face="monospace, monospace"> </font></div><div><font face="monospace, monospace"> (setq agda-input-user-translations '(("N" . ("ℕ"))))</font></div><div><font face="monospace, monospace"> </font></div><div><font face="monospace, monospace"> (agda-input-setup)</font></div><div><font face="monospace, monospace"> (set-input-method "Agda"))</font></div><div><font face="monospace, monospace"> </font></div><div><font face="monospace, monospace"> (error</font></div><div><font face="monospace, monospace"> (message "Could not load the Agda input method.")))</font></div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 26, 2018 at 2:43 AM, Sandro Stucki <span dir="ltr"><<a href="mailto:sandro.stucki@gmail.com" target="_blank">sandro.stucki@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> Is there a way to make agda-input available without loading the Agda itself.<br>
<br>
</span>The input method is in a separate file "agda-input", so I guess it can<br>
be used standalone in principle. Of course, you still need to tell<br>
emacs how to find the file. So you could include something like this<br>
in your .emacs file:<br>
<br>
(add-to-list 'load-path "<path-to-Agda-installation>/<wbr>emacs-mode/")<br>
(require 'agda-input nil t)<br>
<br>
But that's a bit brittle, so it's probably better to just load<br>
agda-mode the usual way:<br>
<br>
(load-file (let ((coding-system-for-read 'utf-8))<br>
(shell-command-to-string "agda-mode locate")))<br>
(require 'agda-input nil t)<br>
<br>
If you just want unicode support you could also use the "TeX" input<br>
method (though personally, I prefer the Agda input method).<br>
<br>
Cheers<br>
<span class="HOEnZb"><font color="#888888">/Sandro<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Thu, Apr 26, 2018 at 10:39 AM, Frederik Hanghøj Iversen<br>
<<a href="mailto:fhi.1990@gmail.com">fhi.1990@gmail.com</a>> wrote:<br>
> Is there a way to make agda-input available without loading the Agda itself.<br>
><br>
> I feel that the input mode is so generally useful that it ought to be<br>
> stand-alone.<br>
><br>
> On Thu, Apr 26, 2018 at 10:32 AM, Nils Anders Danielsson <<a href="mailto:nad@cse.gu.se">nad@cse.gu.se</a>><br>
> wrote:<br>
>><br>
>> On 2018-04-26 10:28, Frederik Hanghøj Iversen wrote:<br>
>>><br>
>>> I'd like to use the input method that agda-mode ships with in other<br>
>>> major-modes. If I do `M-x set-input-method` Agda does not appear<br>
>>> anywhere on the list. Only after I engage `M-x agda2-mode` (and then<br>
>>> change back again) does it appear on the list.<br>
>>><br>
>>> Can anyone more emacs-savvy than me explain why this is the case?<br>
>><br>
>><br>
>> The Agda mode is typically not loaded when Emacs is started, but when an<br>
>> Agda file is opened, see agda2.el for implementation details.<br>
>><br>
>> --<br>
>> /NAD<br>
><br>
><br>
><br>
><br>
> --<br>
> Regards<br>
> Frederik Hanghøj Iversen<br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> ______________________________<wbr>_________________<br>
> Agda mailing list<br>
> <a href="mailto:Agda@lists.chalmers.se">Agda@lists.chalmers.se</a><br>
> <a href="https://lists.chalmers.se/mailman/listinfo/agda" rel="noreferrer" target="_blank">https://lists.chalmers.se/<wbr>mailman/listinfo/agda</a><br>
><br>
______________________________<wbr>_________________<br>
Agda mailing list<br>
<a href="mailto:Agda@lists.chalmers.se">Agda@lists.chalmers.se</a><br>
<a href="https://lists.chalmers.se/mailman/listinfo/agda" rel="noreferrer" target="_blank">https://lists.chalmers.se/<wbr>mailman/listinfo/agda</a><br>
</div></div></blockquote></div><br></div>