* ERC custom IRC /command
@ 2019-03-15 1:37 Emanuel Berg
2019-03-17 13:55 ` Max Zettlmeißl
0 siblings, 1 reply; 6+ messages in thread
From: Emanuel Berg @ 2019-03-15 1:37 UTC (permalink / raw)
To: erc-discuss; +Cc: help-gnu-emacs
How can I make a custom ERC IRC command,
e.g. /r which is unbound in ERC Version 5.3
(GNU Emacs 24.4.1) - how can I bind that to an
Elisp defun?
TIA
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ERC custom IRC /command
2019-03-15 1:37 ERC custom IRC /command Emanuel Berg
@ 2019-03-17 13:55 ` Max Zettlmeißl
2019-03-17 19:29 ` Emanuel Berg
0 siblings, 1 reply; 6+ messages in thread
From: Max Zettlmeißl @ 2019-03-17 13:55 UTC (permalink / raw)
To: ERC Discussion; +Cc: help-gnu-emacs, Emanuel Berg
On Fri, Mar 15, 2019 at 2:37 AM Emanuel Berg <moasenwood@zoho.eu> wrote:
>
> How can I make a custom ERC IRC command,
>
By defining a function using the "erc-cmd-" prefix,
e.g. using your example command "/r": erc-cmd-R
(defun erc-cmd-R ()
;; If you want to send something to the server you could use
;; erc-send-message or erc-message, depending on what
;; exactly you intend to do.
...
nil)
A look into the ERC manual would have pointed you in the right
direction. The feature is named under [1] and [2] even contains an
example of it's use.
Using a search engine of your choice to search for "emacs erc custom
command" would also have helped you.
[1] https://www.gnu.org/software/emacs/manual/html_node/erc/Special-Features.html
[2] https://www.gnu.org/software/emacs/manual/html_mono/erc.html#Sample-Configuration
[3] https://www.emacswiki.org/emacs/ErcCommands (At the very bottom of
the page.)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ERC custom IRC /command
2019-03-17 13:55 ` Max Zettlmeißl
@ 2019-03-17 19:29 ` Emanuel Berg
2019-03-18 3:10 ` Emanuel Berg
2019-03-18 10:48 ` Max Zettlmeißl
0 siblings, 2 replies; 6+ messages in thread
From: Emanuel Berg @ 2019-03-17 19:29 UTC (permalink / raw)
To: erc-discuss; +Cc: help-gnu-emacs
Max Zettlmeißl wrote:
>> How can I make a custom ERC IRC command
>>
>
> By defining a function using the "erc-cmd-"
> prefix, e.g. using your example command "/r":
> erc-cmd-R
>
> (defun erc-cmd-R ()
> ;; If you want to send something to the server you could use
> ;; erc-send-message or erc-message, depending on what
> ;; exactly you intend to do.
> ...
> nil)
>
> A look into the ERC manual would have pointed
> you in the right direction. The feature is
> named under [1] and [2] even contains an
> example of it's use.
>
> Using a search engine of your choice to
> search for "emacs erc custom command" would
> also have helped you.
>
> [1] https://www.gnu.org/software/emacs/manual/html_node/erc/Special-Features.html
> [2] https://www.gnu.org/software/emacs/manual/html_mono/erc.html#Sample-Configuration
> [3] https://www.emacswiki.org/emacs/ErcCommands (At the very bottom of the page.)
I sense a touch of antagonism/irritation in
your reply, and FTR I did Google it with no
result, but maybe it is just you having a bad
day, or me having one and thus reading in stuff
that isn't there.
But regardless of whatever, in terms of
technology, thanks a lot for an
exemplary answer!
--
underground experts united
http://user.it.uu.se/~embe8573
_______________________________________________
Erc-discuss mailing list
Erc-discuss@gnu.org
https://lists.gnu.org/mailman/listinfo/erc-discuss
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ERC custom IRC /command
2019-03-17 19:29 ` Emanuel Berg
@ 2019-03-18 3:10 ` Emanuel Berg
2019-03-18 10:48 ` Max Zettlmeißl
1 sibling, 0 replies; 6+ messages in thread
From: Emanuel Berg @ 2019-03-18 3:10 UTC (permalink / raw)
To: erc-discuss; +Cc: help-gnu-emacs
(defun erc-cmd-R ()
(let ((last-input (aref (cddr erc-input-ring)
(- (cadr erc-input-ring) 2) )))
(erc-send-input last-input) )
nil)
http://user.it.uu.se/~embe8573/emacs-init/erc-my.el
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ERC custom IRC /command
2019-03-17 19:29 ` Emanuel Berg
2019-03-18 3:10 ` Emanuel Berg
@ 2019-03-18 10:48 ` Max Zettlmeißl
2019-03-18 15:11 ` Emanuel Berg
1 sibling, 1 reply; 6+ messages in thread
From: Max Zettlmeißl @ 2019-03-18 10:48 UTC (permalink / raw)
To: ERC Discussion; +Cc: help-gnu-emacs, Emanuel Berg
On Sun, Mar 17, 2019 at 8:29 PM Emanuel Berg <moasenwood@zoho.eu> wrote:
>
> I sense a touch of antagonism/irritation in
> your reply, and FTR I did Google it with no
> result, but maybe it is just you having a bad
> day, or me having one and thus reading in stuff
> that isn't there.
>
It certainly was not meant that way.
I merely wanted to empower you to find such easily obtainable
information by yourself in the future.
Sadly ERC is documented very badly and if you want to do anything
serious with it you have to take a look into it's source code.
But this particular problem is one which is documented decently,
compared to other parts of ERC.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ERC custom IRC /command
2019-03-18 10:48 ` Max Zettlmeißl
@ 2019-03-18 15:11 ` Emanuel Berg
0 siblings, 0 replies; 6+ messages in thread
From: Emanuel Berg @ 2019-03-18 15:11 UTC (permalink / raw)
To: erc-discuss; +Cc: help-gnu-emacs
Max Zettlmeißl wrote:
>> I sense a touch of antagonism/irritation in
>> your reply, and FTR I did Google it with no
>> result, but maybe it is just you having
>> a bad day, or me having one and thus reading
>> in stuff that isn't there.
>>
>
> It certainly was not meant that way.
>
> I merely wanted to empower you to find such
> easily obtainable information by yourself in
> the future. Sadly ERC is documented very
> badly and if you want to do anything serious
> with it you have to take a look into it's
> source code. But this particular problem is
> one which is documented decently, compared to
> other parts of ERC.
It's all good :)
--
underground experts united
http://user.it.uu.se/~embe8573
_______________________________________________
Erc-discuss mailing list
Erc-discuss@gnu.org
https://lists.gnu.org/mailman/listinfo/erc-discuss
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-03-18 15:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-15 1:37 ERC custom IRC /command Emanuel Berg
2019-03-17 13:55 ` Max Zettlmeißl
2019-03-17 19:29 ` Emanuel Berg
2019-03-18 3:10 ` Emanuel Berg
2019-03-18 10:48 ` Max Zettlmeißl
2019-03-18 15:11 ` Emanuel Berg
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.