* i would like to select one mail address at prompt when i hit `m' key in keyboard... @ 2020-11-15 2:46 Byung-Hee HWANG 2020-11-16 10:43 ` Solved problem (Was: Re: i would like to select one mail address at prompt when i hit `m' key in keyboard...) 황병희 ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Byung-Hee HWANG @ 2020-11-15 2:46 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] 11+ messages in thread
* Solved problem (Was: Re: i would like to select one mail address at prompt when i hit `m' key in keyboard...) 2020-11-15 2:46 i would like to select one mail address at prompt when i hit `m' key in keyboard Byung-Hee HWANG @ 2020-11-16 10:43 ` 황병희 2020-11-16 15:41 ` i would like to select one mail address at prompt when i hit `m' key in keyboard Alberto Luaces 2020-11-16 16:06 ` Eric S Fraga 2 siblings, 0 replies; 11+ messages in thread From: 황병희 @ 2020-11-16 10:43 UTC (permalink / raw) To: The Gnus Thanks!!! Sincerely, Byung-Hee -- ^고맙습니다 _和合團結_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: i would like to select one mail address at prompt when i hit `m' key in keyboard... 2020-11-15 2:46 i would like to select one mail address at prompt when i hit `m' key in keyboard Byung-Hee HWANG 2020-11-16 10:43 ` Solved problem (Was: Re: i would like to select one mail address at prompt when i hit `m' key in keyboard...) 황병희 @ 2020-11-16 15:41 ` Alberto Luaces 2020-11-17 3:00 ` 황병희 2020-11-16 16:06 ` Eric S Fraga 2 siblings, 1 reply; 11+ messages in thread From: Alberto Luaces @ 2020-11-16 15:41 UTC (permalink / raw) To: ding Byung-Hee HWANG writes: [...] > > (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.. Hi, I guess you don't want a hook here, but to bind a keypress to your function inside the hook. Something along the lines of: (add-hook 'message-mode-hook '(local-set-key (kbd "M-m") '(lambda () (if (y-or-n-p "at home?") (progn (setHome)) (progn (setWork)))))) I have binded to M-m instead of just "m", otherwise you couldn't type the letter "m" in a message. -- Alberto ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: i would like to select one mail address at prompt when i hit `m' key in keyboard... 2020-11-16 15:41 ` i would like to select one mail address at prompt when i hit `m' key in keyboard Alberto Luaces @ 2020-11-17 3:00 ` 황병희 0 siblings, 0 replies; 11+ messages in thread From: 황병희 @ 2020-11-17 3:00 UTC (permalink / raw) To: ding Alberto Luaces <aluaces@udc.es> writes: > Byung-Hee HWANG writes: > > [...] > >> >> (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.. > > Hi, I guess you don't want a hook here, but to bind a keypress to your > function inside the hook. Something along the lines of: > > (add-hook 'message-mode-hook > '(local-set-key (kbd "M-m") '(lambda () > (if (y-or-n-p "at home?") > (progn (setHome)) > (progn (setWork)))))) > > I have binded to M-m instead of just "m", otherwise you couldn't type > the letter "m" in a message. Thanks Alberto, i will study about local-set-key, thanks again^^^ Sincerely, Byung-Hee -- ^고맙습니다 _地平天成_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: i would like to select one mail address at prompt when i hit `m' key in keyboard... 2020-11-15 2:46 i would like to select one mail address at prompt when i hit `m' key in keyboard Byung-Hee HWANG 2020-11-16 10:43 ` Solved problem (Was: Re: i would like to select one mail address at prompt when i hit `m' key in keyboard...) 황병희 2020-11-16 15:41 ` i would like to select one mail address at prompt when i hit `m' key in keyboard Alberto Luaces @ 2020-11-16 16:06 ` Eric S Fraga 2020-11-17 2:08 ` 황병희 2020-11-30 23:31 ` David Rogers 2 siblings, 2 replies; 11+ messages in thread From: Eric S Fraga @ 2020-11-16 16:06 UTC (permalink / raw) To: ding Byung-Hee, I use gnus posting styles for this and gnus-alias-use-identity to switch identities. Not quite what you wanted, as it's not tied to the m key but is instead something you do once you are in the message buffer, but it does work well. -- Eric S Fraga via Emacs 28.0.50 & org 9.4 on Debian bullseye/sid ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: i would like to select one mail address at prompt when i hit `m' key in keyboard... 2020-11-16 16:06 ` Eric S Fraga @ 2020-11-17 2:08 ` 황병희 2020-11-17 2:52 ` Bob Newell 2020-11-30 23:31 ` David Rogers 1 sibling, 1 reply; 11+ messages in thread From: 황병희 @ 2020-11-17 2:08 UTC (permalink / raw) To: ding Eric S Fraga <e.fraga@ucl.ac.uk> writes: > Byung-Hee, > > I use gnus posting styles for this and gnus-alias-use-identity to switch > identities. Not quite what you wanted, as it's not tied to the m key > but is instead something you do once you are in the message buffer, but > it does work well. Hmm.. interesting about gnus-alias-use-identity. I will study it gnus-alias-use-identity. Because i love the word "identity". Sincerely, Byung-Hee -- ^고맙습니다 _地平天成_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: i would like to select one mail address at prompt when i hit `m' key in keyboard... 2020-11-17 2:08 ` 황병희 @ 2020-11-17 2:52 ` Bob Newell 2020-11-17 3:09 ` 황병희 2020-11-17 7:14 ` Vegard Vesterheim 0 siblings, 2 replies; 11+ messages in thread From: Bob Newell @ 2020-11-17 2:52 UTC (permalink / raw) To: ding gnus-alias-use-identity takes a little setting up (not too much though) but is much more flexible. I probably have 20 contexts set up and in the end it makes switching among them very easy. For instance, sometimes I want to be a clueless AOL user, sometimes I want to be an alum of my undergrad university, and sometimes I even just want to be myself. Take the time to set up gnus-alias-identity list to suit your needs and wishes, and when you're comfortable with that go to the next level with gnus-alias-identity-rules, which allows for some automated identity selection. For instance certain "friends" always get mail from my netzero identity; if someone writes to a deprecated address they weill get a reply from my preferred identity. -- Bob Newell Honolulu, Hawai`i - Via GNU/Linux/Emacs/Gnus/BBDB ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: i would like to select one mail address at prompt when i hit `m' key in keyboard... 2020-11-17 2:52 ` Bob Newell @ 2020-11-17 3:09 ` 황병희 2020-11-17 7:14 ` Vegard Vesterheim 1 sibling, 0 replies; 11+ messages in thread From: 황병희 @ 2020-11-17 3:09 UTC (permalink / raw) To: ding Bob Newell <bobnewell@bobnewell.net> writes: > gnus-alias-use-identity takes a little setting up (not too > much though) but is much more flexible. I probably have 20 > contexts set up and in the end it makes switching among them > very easy. For instance, sometimes I want to be a clueless AOL > user, sometimes I want to be an alum of my undergrad > university, and sometimes I even just want to be myself. > > Take the time to set up gnus-alias-identity list to suit your > needs and wishes, and when you're comfortable with that go to > the next level with gnus-alias-identity-rules, which allows for > some automated identity selection. For instance certain > "friends" always get mail from my netzero identity; if someone > writes to a deprecated address they weill get a reply from my > preferred identity. Thanks Bob, your story is my story thanks again ^^^ Sincerely, Byung-Hee -- ^고맙습니다 _地平天成_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: i would like to select one mail address at prompt when i hit `m' key in keyboard... 2020-11-17 2:52 ` Bob Newell 2020-11-17 3:09 ` 황병희 @ 2020-11-17 7:14 ` Vegard Vesterheim 2020-11-17 16:34 ` Bob Newell 1 sibling, 1 reply; 11+ messages in thread From: Vegard Vesterheim @ 2020-11-17 7:14 UTC (permalink / raw) To: Bob Newell; +Cc: ding On Mon, 16 Nov 2020 16:52:12 -1000 Bob Newell <bobnewell@bobnewell.net> wrote: > Take the time to set up gnus-alias-identity list to suit your > needs and wishes, and when you're comfortable with that go to > the next level with gnus-alias-identity-rules, which allows for > some automated identity selection. For instance certain > "friends" always get mail from my netzero identity; if someone > writes to a deprecated address they weill get a reply from my > preferred identity. Additionally, here is a function to cycle through the gnus-alias identities: https://github.com/vv3/gnus-alias/commit/986f3a1732362357162a8450a2250069baf02dce This can be bound to a key for quick access. -- Vennlig hilsen/Best regards Vegard Vesterheim Senior Software engineer +47 48 11 98 98 vegard.vesterheim@uninett.no ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: i would like to select one mail address at prompt when i hit `m' key in keyboard... 2020-11-17 7:14 ` Vegard Vesterheim @ 2020-11-17 16:34 ` Bob Newell 0 siblings, 0 replies; 11+ messages in thread From: Bob Newell @ 2020-11-17 16:34 UTC (permalink / raw) To: ding Vegard Vesterheim <vegard.vesterheim@uninett.no> writes: > > Additionally, here is a function to cycle through the gnus-alias > identities: > > https://github.com/vv3/gnus-alias/commit/986f3a1732362357162a8450a2250069baf02dce > > This can be bound to a key for quick access. I didn't know about this one, that's a great feature. gnus-alias-identity also works well with helm, so there are plenty of options and once set up, very good ease of use. -- Bob Newell Honolulu, Hawai`i - Via GNU/Linux/Emacs/Gnus/BBDB ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: i would like to select one mail address at prompt when i hit `m' key in keyboard... 2020-11-16 16:06 ` Eric S Fraga 2020-11-17 2:08 ` 황병희 @ 2020-11-30 23:31 ` David Rogers 1 sibling, 0 replies; 11+ messages in thread From: David Rogers @ 2020-11-30 23:31 UTC (permalink / raw) To: Eric S Fraga; +Cc: ding Eric S Fraga <e.fraga@ucl.ac.uk> writes: > Byung-Hee, > > I use gnus posting styles for this and gnus-alias-use-identity > to switch > identities. Not quite what you wanted, as it's not tied to the > m key > but is instead something you do once you are in the message > buffer, but > it does work well. I decided to try gnus-alias-use-identity based on this recommendation, and I have it in place and functioning. But I’m running into a small but irritating problem that seems likely to be related. I’ve set From to be my address and done the other default settings, nothing interesting there as far as I know, plus I’ve added a Gcc header that points to the Sent Mail on my IMAP server. (That same Gcc header has been working fine in the past, and in fact it is still working.) But now, every time I send an email, I see a message complaining that the function "nnnil-request-create-group" doesn’t exist, and the status line claims that the message is still unsent. However, in every case the message HAS been sent, including showing up correctly in the Sent Mail on the server. If I delete the buffer containing the so-called unsent message, then all the expected copies are already in the right place. I don’t know where the request for nnnil-request-create-group is coming from, and I don’t know how to discover that. My guess is that I have some outdated and/or incorrect setting that conflicts with gnus-alias-use-identity - does anyone here have experience or suggestions? Do I need to de-duplicate settings that are currently duplicated between posting styles and gnus-alias-use-identity? Or will overlapping settings just be harmlessly re-applied? -- David Rogers ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-12-01 0:41 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-11-15 2:46 i would like to select one mail address at prompt when i hit `m' key in keyboard Byung-Hee HWANG 2020-11-16 10:43 ` Solved problem (Was: Re: i would like to select one mail address at prompt when i hit `m' key in keyboard...) 황병희 2020-11-16 15:41 ` i would like to select one mail address at prompt when i hit `m' key in keyboard Alberto Luaces 2020-11-17 3:00 ` 황병희 2020-11-16 16:06 ` Eric S Fraga 2020-11-17 2:08 ` 황병희 2020-11-17 2:52 ` Bob Newell 2020-11-17 3:09 ` 황병희 2020-11-17 7:14 ` Vegard Vesterheim 2020-11-17 16:34 ` Bob Newell 2020-11-30 23:31 ` David Rogers
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).