Gnus development mailing list
 help / color / mirror / Atom feed
* elisp question with multiple smtp gnus
@ 2020-11-15  2:48 Byung-Hee HWANG
  2020-11-16 10:49 ` 황병희
  0 siblings, 1 reply; 4+ messages in thread
From: Byung-Hee HWANG @ 2020-11-15  2:48 UTC (permalink / raw)
  To: The Gnus

Hellow!

i am beginner at elisp. as far as i write-up below code.
===> references: emacs wiki [multiple smtp gnus]

#+begin_src emacs lisp
(setq user-full-name "Byung-Hee HWANG")
(setq sendmail-program "/usr/sbin/ssmtp")

(defun setHome ()
  (interactive)
  (message "from home -- soyeomul@doraji.xyz")
  (setq user-mail-address "soyeomul@doraji.xyz")
  (setq message-sendmail-extra-arguments '("-C" "/etc/ssmtp/ssmtp-yw.conf")))

(defun setWork ()
  (interactive)
  (message "from work -- soyeomul@gmail.com")
  (setq user-mail-address "soyeomul@gmail.com")
  (setq message-sendmail-extra-arguments '("-C" "/etc/ssmtp/ssmtp-gmail.conf")))

(add-hook 'message-mode-hook
	  '(lambda ()
	     (if (y-or-n-p "at home?")
		 (progn (setHome))
	       (progn (setWork)))))
#+end_src

at then, question...

how can i enable the above rule only when i hit `m' key?

i try to google and emacs manual etc... but failed..

Sincerely, Gnus fan Byung-Hee

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//


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

* Re: elisp question with multiple smtp gnus
  2020-11-15  2:48 elisp question with multiple smtp gnus Byung-Hee HWANG
@ 2020-11-16 10:49 ` 황병희
  2020-11-16 14:05   ` 황병희
  0 siblings, 1 reply; 4+ messages in thread
From: 황병희 @ 2020-11-16 10:49 UTC (permalink / raw)
  To: The Gnus

Byung-Hee HWANG <soyeomul@doraji.xyz> writes:

> Hellow!
>
> i am beginner at elisp. as far as i write-up below code.
> ===> references: emacs wiki [multiple smtp gnus]
>
> #+begin_src emacs lisp
> (setq user-full-name "Byung-Hee HWANG")
> (setq sendmail-program "/usr/sbin/ssmtp")
>
> (defun setHome ()
>   (interactive)
>   (message "from home -- soyeomul@doraji.xyz")
>   (setq user-mail-address "soyeomul@doraji.xyz")
>   (setq message-sendmail-extra-arguments '("-C" "/etc/ssmtp/ssmtp-yw.conf")))
>
> (defun setWork ()
>   (interactive)
>   (message "from work -- soyeomul@gmail.com")
>   (setq user-mail-address "soyeomul@gmail.com")
>   (setq message-sendmail-extra-arguments '("-C" "/etc/ssmtp/ssmtp-gmail.conf")))
>
> (add-hook 'message-mode-hook
> 	  '(lambda ()
> 	     (if (y-or-n-p "at home?")
> 		 (progn (setHome))
> 	       (progn (setWork)))))
> #+end_src
>
> at then, question...
>
> how can i enable the above rule only when i hit `m' key?
>
> i try to google and emacs manual etc... but failed..
>
> Sincerely, Gnus fan Byung-Hee

After all i did make up with my approch:
https://gitlab.com/soyeomul/Gnus/-/raw/74ff79a7685d3e12dd49249bd6228b82b4c7061f/gnus-first-try.el

So solved problem, thanks^^^

Sincerely, Gnus fan Byung-Hee

-- 
^고맙습니다 _和合團結_ 감사합니다_^))//


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

* Re: elisp question with multiple smtp gnus
  2020-11-16 10:49 ` 황병희
@ 2020-11-16 14:05   ` 황병희
  2020-11-17 10:19     ` 황병희
  0 siblings, 1 reply; 4+ messages in thread
From: 황병희 @ 2020-11-16 14:05 UTC (permalink / raw)
  To: The Gnus

황병희 <soyeomul@doraji.xyz> writes:

> Byung-Hee HWANG <soyeomul@doraji.xyz> writes:
>
>> Hellow!
>>
>> i am beginner at elisp. as far as i write-up below code.
>> ===> references: emacs wiki [multiple smtp gnus]
>>
>> #+begin_src emacs lisp
>> (setq user-full-name "Byung-Hee HWANG")
>> (setq sendmail-program "/usr/sbin/ssmtp")
>>
>> (defun setHome ()
>>   (interactive)
>>   (message "from home -- soyeomul@doraji.xyz")
>>   (setq user-mail-address "soyeomul@doraji.xyz")
>>   (setq message-sendmail-extra-arguments '("-C" "/etc/ssmtp/ssmtp-yw.conf")))
>>
>> (defun setWork ()
>>   (interactive)
>>   (message "from work -- soyeomul@gmail.com")
>>   (setq user-mail-address "soyeomul@gmail.com")
>>   (setq message-sendmail-extra-arguments '("-C" "/etc/ssmtp/ssmtp-gmail.conf")))
>>
>> (add-hook 'message-mode-hook
>> 	  '(lambda ()
>> 	     (if (y-or-n-p "at home?")
>> 		 (progn (setHome))
>> 	       (progn (setWork)))))
>> #+end_src
>>
>> at then, question...
>>
>> how can i enable the above rule only when i hit `m' key?
>>
>> i try to google and emacs manual etc... but failed..
>>
>> Sincerely, Gnus fan Byung-Hee
>
> After all i did make up with my approch:
> https://gitlab.com/soyeomul/Gnus/-/raw/74ff79a7685d3e12dd49249bd6228b82b4c7061f/gnus-first-try.el

UPDATING:
https://gitlab.com/soyeomul/Gnus/-/blob/31f9d6c1473effffa0fdb52dc64f1e14df681b54/gnus-first-try.el

Sincerely, Gnus fan Byung-Hee

-- 
^고맙습니다 _和合團結_ 감사합니다_^))//


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

* Re: elisp question with multiple smtp gnus
  2020-11-16 14:05   ` 황병희
@ 2020-11-17 10:19     ` 황병희
  0 siblings, 0 replies; 4+ messages in thread
From: 황병희 @ 2020-11-17 10:19 UTC (permalink / raw)
  To: The Gnus

황병희 <soyeomul@doraji.xyz> writes:

> 황병희 <soyeomul@doraji.xyz> writes:
>
>> Byung-Hee HWANG <soyeomul@doraji.xyz> writes:
>>
>>> Hellow!
>>>
>>> i am beginner at elisp. as far as i write-up below code.
>>> ===> references: emacs wiki [multiple smtp gnus]
>>>
>>> #+begin_src emacs lisp
>>> (setq user-full-name "Byung-Hee HWANG")
>>> (setq sendmail-program "/usr/sbin/ssmtp")
>>>
>>> (defun setHome ()
>>>   (interactive)
>>>   (message "from home -- soyeomul@doraji.xyz")
>>>   (setq user-mail-address "soyeomul@doraji.xyz")
>>>   (setq message-sendmail-extra-arguments '("-C" "/etc/ssmtp/ssmtp-yw.conf")))
>>>
>>> (defun setWork ()
>>>   (interactive)
>>>   (message "from work -- soyeomul@gmail.com")
>>>   (setq user-mail-address "soyeomul@gmail.com")
>>>   (setq message-sendmail-extra-arguments '("-C" "/etc/ssmtp/ssmtp-gmail.conf")))
>>>
>>> (add-hook 'message-mode-hook
>>> 	  '(lambda ()
>>> 	     (if (y-or-n-p "at home?")
>>> 		 (progn (setHome))
>>> 	       (progn (setWork)))))
>>> #+end_src
>>>
>>> at then, question...
>>>
>>> how can i enable the above rule only when i hit `m' key?
>>>
>>> i try to google and emacs manual etc... but failed..
>>>
>>> Sincerely, Gnus fan Byung-Hee
>>
>> After all i did make up with my approch:
>> https://gitlab.com/soyeomul/Gnus/-/raw/74ff79a7685d3e12dd49249bd6228b82b4c7061f/gnus-first-try.el
>
> UPDATING:
> https://gitlab.com/soyeomul/Gnus/-/blob/31f9d6c1473effffa0fdb52dc64f1e14df681b54/gnus-first-try.el

This is real final code:
https://gitlab.com/soyeomul/Gnus/-/blob/a3ab649e1b4aa438059a6f6e4fd1f0860ac4b69b/gnus-first-try.el

So i am happy now, thanks for Gnus hackers~

Sincerely, Gnus fan Byung-Hee

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//


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

end of thread, other threads:[~2020-11-17 10:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-15  2:48 elisp question with multiple smtp gnus Byung-Hee HWANG
2020-11-16 10:49 ` 황병희
2020-11-16 14:05   ` 황병희
2020-11-17 10:19     ` 황병희

Gnus development mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/ding

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 ding ding/ http://inbox.vuxu.org/ding \
		ding@inbox.vuxu.org
	public-inbox-index ding

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.emacs.gnus.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git