all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* help with erc function
@ 2008-02-29 19:58 someusernamehere
  2008-02-29 22:46 ` Bastien
       [not found] ` <mailman.8114.1204325198.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: someusernamehere @ 2008-02-29 19:58 UTC (permalink / raw)
  To: help-gnu-emacs

I have a function in a file that calls to erc-default-target for get
the current channel, if I evaluate the function *on* the channel all
works fine, but if I call it interactively (M-x function) the function
fails, because the erc-default-target return `nil' , what about this?
there is a way for fix that?

thanks


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: help with erc function
  2008-02-29 19:58 help with erc function someusernamehere
@ 2008-02-29 22:46 ` Bastien
       [not found] ` <mailman.8114.1204325198.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Bastien @ 2008-02-29 22:46 UTC (permalink / raw)
  To: help-gnu-emacs

someusernamehere <someusernamehere@gmail.com> writes:

> I have a function in a file that calls to erc-default-target for get
> the current channel, if I evaluate the function *on* the channel all
> works fine, but if I call it interactively (M-x function) the function
> fails, because the erc-default-target return `nil' , what about this?
> there is a way for fix that?

Can you show some code?

-- 
Bastien




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: help with erc function
       [not found] ` <mailman.8114.1204325198.18990.help-gnu-emacs@gnu.org>
@ 2008-03-01  0:10   ` someusernamehere
  2008-03-01 14:06     ` Bastien
       [not found]     ` <mailman.8127.1204380426.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: someusernamehere @ 2008-03-01  0:10 UTC (permalink / raw)
  To: help-gnu-emacs

On Feb 29, 4:46 pm, Bastien <b...@altern.org> wrote:

> Can you show some code?


sure, take a look:


(defun kick (nick)
  (let* ((chan (erc-default-target)))
         (erc-send-command (format "kick %s %s %s" chan nick "go
away"))))


thanks.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: help with erc function
  2008-03-01  0:10   ` someusernamehere
@ 2008-03-01 14:06     ` Bastien
       [not found]     ` <mailman.8127.1204380426.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Bastien @ 2008-03-01 14:06 UTC (permalink / raw)
  To: someusernamehere; +Cc: help-gnu-emacs

someusernamehere <someusernamehere@gmail.com> writes:

> On Feb 29, 4:46 pm, Bastien <b...@altern.org> wrote:
>
>> Can you show some code?
>
>
> sure, take a look:
>
> (defun kick (nick)
>   (let* ((chan (erc-default-target)))
>          (erc-send-command (format "kick %s %s %s" chan nick "go
> away"))))

Well - maybe you can temporarilly switch to the relevant ERC buffer so
that (erc-default-target) returns the channel you want to use?  

-- 
Bastien




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: help with erc function
       [not found]     ` <mailman.8127.1204380426.18990.help-gnu-emacs@gnu.org>
@ 2008-03-01 15:51       ` someusernamehere
  2008-03-01 17:23         ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: someusernamehere @ 2008-03-01 15:51 UTC (permalink / raw)
  To: help-gnu-emacs

Bastien escreveu:

> > (defun kick (nick)
> >   (let* ((chan (erc-default-target)))
> >          (erc-send-command (format "kick %s %s %s" chan nick "go
> > away"))))
>
> Well - maybe you can temporarilly switch to the relevant ERC buffer so
> that (erc-default-target) returns the channel you want to use?


yeah, but how to switch to the buffer what I want?, so I have joined
e.g. 4 channels, how to tell to erc switch to proper buffer,
automaticaly of course?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: help with erc function
  2008-03-01 15:51       ` someusernamehere
@ 2008-03-01 17:23         ` Bastien
  0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2008-03-01 17:23 UTC (permalink / raw)
  To: help-gnu-emacs

someusernamehere <someusernamehere@gmail.com> writes:

> Bastien escreveu:
>
>> > (defun kick (nick)
>> >   (let* ((chan (erc-default-target)))
>> >          (erc-send-command (format "kick %s %s %s" chan nick "go
>> > away"))))
>>
>> Well - maybe you can temporarilly switch to the relevant ERC buffer so
>> that (erc-default-target) returns the channel you want to use?
>
>
> yeah, but how to switch to the buffer what I want?, so I have joined
> e.g. 4 channels, how to tell to erc switch to proper buffer,
> automaticaly of course?

Have a look at `erc-buffer-list' and `erc-iswitchb' variables.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-03-01 17:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-29 19:58 help with erc function someusernamehere
2008-02-29 22:46 ` Bastien
     [not found] ` <mailman.8114.1204325198.18990.help-gnu-emacs@gnu.org>
2008-03-01  0:10   ` someusernamehere
2008-03-01 14:06     ` Bastien
     [not found]     ` <mailman.8127.1204380426.18990.help-gnu-emacs@gnu.org>
2008-03-01 15:51       ` someusernamehere
2008-03-01 17:23         ` Bastien

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.