* Clickable '-- ' with signatures menu @ 2007-08-03 11:13 Michal Nazarewicz 2007-08-03 15:28 ` Slackrat ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Michal Nazarewicz @ 2007-08-03 11:13 UTC (permalink / raw) To: info-gnus-english Hello, I've recently came up with an idea of making the signature separator clickable in such a way that after clicking it (or pressing enter when cursor is on it) a menu would pop-up with a list of signatures. Then I can choose one signature and the current one would be replaced with the one I've chosen. Another thing would be making a "From:" header clickable in similar manner -- this time I could choose one of preset From headers. Surly it is possible do to this but I have no idea how to achieve such behaviour. Any hints or code? -- Best regards, _ _ .o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michal "mina86" Nazarewicz (o o) ooo +--<mina86*tlen.pl>---<jid:mina86*chrome.pl>--ooO--(_)--Ooo-- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Clickable '-- ' with signatures menu 2007-08-03 11:13 Clickable '-- ' with signatures menu Michal Nazarewicz @ 2007-08-03 15:28 ` Slackrat 2007-08-04 0:09 ` Michal Nazarewicz 2007-08-03 15:32 ` Reiner Steib 2007-08-03 15:33 ` Slackrat 2 siblings, 1 reply; 7+ messages in thread From: Slackrat @ 2007-08-03 15:28 UTC (permalink / raw) To: info-gnus-english Michal Nazarewicz <mina86@tlen.pl> writes: > Hello, > > I've recently came up with an idea of making the signature separator > clickable in such a way that after clicking it (or pressing enter when > cursor is on it) a menu would pop-up with a list of signatures. Then > I can choose one signature and the current one would be replaced with > the one I've chosen. > > Another thing would be making a "From:" header clickable in similar > manner -- this time I could choose one of preset From headers. > > Surly it is possible do to this but I have no idea how to achieve such > behaviour. Any hints or code? > > -- > Best regards, _ _ > .o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o > ..o | Computer Science, Michal "mina86" Nazarewicz (o o) > ooo +--<mina86*tlen.pl>---<jid:mina86*chrome.pl>--ooO--(_)--Ooo-- Have you tried "randomsig.el" ?? ;; see .emacs for complete randomsig.el ;; #################################### ;; TO MAKE IT WORK, put the following lines into your ~/.gnus: (require 'randomsig) (define-key message-mode-map (kbd "C-c s") 'randomsig-replace-sig) (define-key message-mode-map (kbd "C-c S") 'randomsig-select-sig) (require 'gnus-sum) ; probably required for `gnus-summary-save-map' (define-key gnus-summary-save-map "-" 'gnus/randomsig-summary-read-sig) (setq randomsig-dir "/home/inconnu/.signature/random-signature") (setq randomsig-files '( "001" "002" "003" "004" "005" "006" "007" "008" "009" "010" "011" "012" "013" "014" "015" "016" "017" "018" "019" "020" "021" "022" "023" "024" "025" "026" "027" "028" "029" "030" "031" "032" "033" "034" "035" "036" "037" "038" "039" "040" "041" "042" "043" "044" "045" "046" "047" "048" "049" "050" "051" "052" "053" "054" "055" "056" "057" "058" "059" "060" "061" "062" "063" "064" "065" "066" "067" "068" "069" "070" "071" "072" "073" "074" "075" "076" "077" "078" "079" "080" "081" "082" "083" "084" "085" "086" "087" "088" "089" "090" "091" "092" "093" "094" "095" "096" "097" "098" "099" "100" ) ) ;; or (setq randomsig-files (randomsig-search-sigfiles)) ;; or (setq randomsig-files 'randomsig-search-sigfiles) (setq message-signature 'randomsig-signature) ;; This will also define the shortcut `C-c s' in message-mode to ;; change the signature, `C-c S' in message-mode to interactively ;; select the signature to replace the current signature, and `O -' in ;; gnus-summary-mode to read the signature from the selected mail. ;; `randomsig-files' must be a list of existing files, an existing ;; file, or a function returning a list of existing files. If these ;; don't have absolute paths, they are located in `randomsig-dir'. ;; File format: Each file must contain at least one signature. ;; Signatures are separated with `randomsig-delimiter-pattern'. If ;; there is only one signature in the file, the delimiter can be ;; omitted, so real .signature-files can be used. ;; `randomsig-delimiter' is used when inserting new signatures with ;; `randomsig-message-read-sig' into the signature file. So ;; `randomsig-delimiter' should match `randomsig-delimiter-pattern'. ;; `randomsig-static-string' is put in front of every random signature ;; if non-`nil'. ;; The *-read-sig functions read the signature of a message, or use ;; the marked text, and write it to a signature-file, for which the ;; name is asked. If the file does not exist, it will be generated. ;; When called with any prefix, the signatures will be offered to edit ;; before saving. ;; if `randomsig-replace-sig' is called with any prefix, it will ask ;; for a file to get the signature from. ;; `randomsig-select-sig' will offer a list of signatures to select ;; from in an extra buffer. n will jump to the next signature, p to ;; the previous, RET will insert the selected signature, q will exit ;; the selection buffer without replacing the current signature, R ;; will reload the signature-files, and e will open a buffer for ;; editing the signature at the point. When called with any prefix, it ;; will ask for a file to get the signatures from ;; `randomsig-search-sigfiles' will search for regular files in ;; `randomsig-dir', which do not match `randomsig-search-unwanted'. A ;; subdirectory of `randomsig-dir' can be given as optional argument. ;; Completion will only work for files in `randomsig-files', though ;; others files can be used, too -- SlackRat - No 4Q to Reply ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Clickable '-- ' with signatures menu 2007-08-03 15:28 ` Slackrat @ 2007-08-04 0:09 ` Michal Nazarewicz 2007-08-04 0:17 ` Michal Nazarewicz 0 siblings, 1 reply; 7+ messages in thread From: Michal Nazarewicz @ 2007-08-04 0:09 UTC (permalink / raw) To: info-gnus-english > Michal Nazarewicz <mina86@tlen.pl> writes: >> I've recently came up with an idea of making the signature separator >> clickable in such a way that after clicking it (or pressing enter when >> cursor is on it) a menu would pop-up with a list of signatures. Then >> I can choose one signature and the current one would be replaced with >> the one I've chosen. Slackrat <s4Qlackrat@azurservers.com> writes: > Have you tried "randomsig.el" ?? > > ;; see .emacs for complete randomsig.el > ;; #################################### > > ;; TO MAKE IT WORK, put the following lines into your ~/.gnus: > > (require 'randomsig) > (define-key message-mode-map (kbd "C-c s") 'randomsig-replace-sig) > (define-key message-mode-map (kbd "C-c S") 'randomsig-select-sig) > (require 'gnus-sum) ; probably required for `gnus-summary-save-map' > (define-key gnus-summary-save-map "-" 'gnus/randomsig-summary-read-sig) > (setq randomsig-dir "/home/inconnu/.signature/random-signature") > (setq randomsig-files '( > "001" "002" "003" "004" "005" "006" "007" "008" "009" "010" "011" > "012" "013" "014" "015" "016" "017" "018" "019" "020" [...] > ) > ) It works nice even though I'd prefer assigning each signature a name so that when selecting a signature a menu would pop-up or I'd be prompted for name in minibuffer. -- Best regards, _ _ .o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michal "mina86" Nazarewicz (o o) ooo +--<mina86*tlen.pl>---<jid:mina86*chrome.pl>--ooO--(_)--Ooo-- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Clickable '-- ' with signatures menu 2007-08-04 0:09 ` Michal Nazarewicz @ 2007-08-04 0:17 ` Michal Nazarewicz 0 siblings, 0 replies; 7+ messages in thread From: Michal Nazarewicz @ 2007-08-04 0:17 UTC (permalink / raw) To: info-gnus-english >> Michal Nazarewicz <mina86@tlen.pl> writes: >>> I've recently came up with an idea of making the signature separator >>> clickable in such a way that after clicking it (or pressing enter when >>> cursor is on it) a menu would pop-up with a list of signatures. Then >>> I can choose one signature and the current one would be replaced with >>> the one I've chosen. > Slackrat <s4Qlackrat@azurservers.com> writes: >> Have you tried "randomsig.el" ?? Michal Nazarewicz <mina86@tlen.pl> writes: > It works nice even though I'd prefer assigning each signature > a name so that when selecting a signature a menu would pop-up or I'd be > prompted for name in minibuffer. So it's enough to give a prefix argument to randomsig-replace-sig to be prompted for file name. :) -- Best regards, _ _ .o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michal "mina86" Nazarewicz (o o) ooo +--<mina86*tlen.pl>---<jid:mina86*chrome.pl>--ooO--(_)--Ooo-- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Clickable '-- ' with signatures menu 2007-08-03 11:13 Clickable '-- ' with signatures menu Michal Nazarewicz 2007-08-03 15:28 ` Slackrat @ 2007-08-03 15:32 ` Reiner Steib 2007-08-03 15:33 ` Slackrat 2 siblings, 0 replies; 7+ messages in thread From: Reiner Steib @ 2007-08-03 15:32 UTC (permalink / raw) To: Michal Nazarewicz, ding; +Cc: info-gnus-english [ Cc-ing ding ] On Fri, Aug 03 2007, Michal Nazarewicz wrote: > I've recently came up with an idea of making the signature separator > clickable in such a way that after clicking it (or pressing enter when > cursor is on it) a menu would pop-up with a list of signatures. Then > I can choose one signature and the current one would be replaced with > the one I've chosen. > > Another thing would be making a "From:" header clickable in similar > manner -- this time I could choose one of preset From headers. > > Surly it is possible do to this but I have no idea how to achieve such > behaviour. Any hints or code? I'm not aware of such code. But it would be a nice feature. Anyone? ;-) BTW, your User-Agent "Gnus/0.7" header is bogus. Please fix it or better use one of the predefined variants. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Clickable '-- ' with signatures menu 2007-08-03 11:13 Clickable '-- ' with signatures menu Michal Nazarewicz 2007-08-03 15:28 ` Slackrat 2007-08-03 15:32 ` Reiner Steib @ 2007-08-03 15:33 ` Slackrat 2007-08-03 23:58 ` Michal Nazarewicz 2 siblings, 1 reply; 7+ messages in thread From: Slackrat @ 2007-08-03 15:33 UTC (permalink / raw) To: info-gnus-english Michal Nazarewicz <mina86@tlen.pl> writes: > Hello, > > I've recently came up with an idea of making the signature separator > clickable in such a way that after clicking it (or pressing enter when > cursor is on it) a menu would pop-up with a list of signatures. Then > I can choose one signature and the current one would be replaced with > the one I've chosen. > > Another thing would be making a "From:" header clickable in similar > manner -- this time I could choose one of preset From headers. > > Surly it is possible do to this but I have no idea how to achieve such > behaviour. Any hints or code? No need to make them clickable You can customize as follows in .gnus ;; ################## ;; POSTING HEADERS ## ;; ################## ;; ;; Set some default email and news headers (setq message-default-mail-headers "Fcc: ~/Mail/outbox") (setq message-default-news-headers "Fcc: ~/News/sent.news.archive") (setq message-required-mail-headers (nconc message-required-mail-headers (list '(Face . (lambda () (gnus-face-from-file "~/.signature/facesmtp.jpg")))))) (setq message-required-news-headers (nconc message-required-news-headers (list '(Face . (lambda () (gnus-face-from-file "~/.signature/facenntp.jpg")))))) (setq gnus-posting-styles '((".*" (name mail-user-name) ("X-Guarantee" "This email is certified to have been free of UCE and any other Malicious, Harmful or Annoying Content when originally posted by <user>@azurservers.com - Azurservers posts SPF records and do not condone SPAM type emails") (signature-file "~/.signature/bill") ("X-Homepage" "http://azurservers.com") ("X-Operating-System" "Slackware GNU/Linux") ("X-AuthNo" "Registered as AZSV bghkd8332277") (organization "Not very much!")) ;; USENET ;;======= ("rec*" (signature-file "~/.signature/davey") (name "Davey Crockett") (address "d4Qaveycrockett@azurservers.com") ("Fcc" "~/Mail/sent-rec") ) ("gnu.emacs*" (signature-file "~/.signature/slackrat") (name "Slackrat") (address "s4Qlackrat@azurservers.com") ("Fcc" "~/Mail/sent-gnu")) ;; MAILING LISTS ;;============== ("tlug" ("To" "tlug@ss.org") (signature-file "~/.signature/slackrat") (name "SlackRat") (address "slackrat4Q@azurservers.com") ("Fcc" "~/Mail/sent-tlug") ) ;; INDIVIDUALS ;;============ ("sublet-nicola" ("To" "Nicola Nunu <bought@hotmail.it>") (signature-file "~/.signature/bill") (name "Bill Henderson") (address "billhenderson@azurservers.com") ("Fcc" "~/Mail/sent-sublet-nicola") ("Bcc" "inconnu@azurservers.com") ) ("tanya" ("To" "Tanya Kim Henderson <tanyah@ualberta.ca>") (signature-file "~/.signature/dad") (name "Bill Henderson") (address "billhenderson@azurservers.com") ("Fcc" "~/Mail/sent-tanya") ("Bcc" "inconnu@azurservers.com") ) ("gaukroger" ("To" "Kath et John <john.gaukroger@virgin.net>") (signature-file "~/.signature/bill") (name "Bill Henderson") (address "billhenderson@azurservers.com") ("Fcc" "~/Mail/sent-gaukroger") ("Bcc" "inconnu@azurservers.com") ) )) -- Slackrat - The US spends Seven times the Total Amount spent on Social Services on What it Euphemistically calls "National Defense" In reality, much of this Staggering Amount is expended on Illegal Wars of Agression, Colonization and Contracts which Directly benefit Bush's Friends and Political Cronies. http://nationalpriorities.org/index.php?option=com_content&task=view&id=213&Itemid=107 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Clickable '-- ' with signatures menu 2007-08-03 15:33 ` Slackrat @ 2007-08-03 23:58 ` Michal Nazarewicz 0 siblings, 0 replies; 7+ messages in thread From: Michal Nazarewicz @ 2007-08-03 23:58 UTC (permalink / raw) To: info-gnus-english Slackrat <s4Qlackrat@azurservers.com> writes: > Michal Nazarewicz <mina86@tlen.pl> writes: > >> Hello, >> >> I've recently came up with an idea of making the signature separator >> clickable in such a way that after clicking it (or pressing enter when >> cursor is on it) a menu would pop-up with a list of signatures. Then >> I can choose one signature and the current one would be replaced with >> the one I've chosen. >> >> Another thing would be making a "From:" header clickable in similar >> manner -- this time I could choose one of preset From headers. >> >> Surly it is possible do to this but I have no idea how to achieve such >> behaviour. Any hints or code? > > No need to make them clickable > > You can customize as follows in .gnus [...] > (setq gnus-posting-styles > '((".*" > (name mail-user-name) [...] > (signature-file "~/.signature/bill") > ("X-Homepage" "http://azurservers.com") > ("X-Operating-System" "Slackware GNU/Linux") > ("X-AuthNo" "Registered as AZSV bghkd8332277") > (organization "Not very much!")) > > ;; USENET > ;;======= > > ("rec*" > (signature-file "~/.signature/davey") > (name "Davey Crockett") > (address "d4Qaveycrockett@azurservers.com") > ("Fcc" "~/Mail/sent-rec") > ) [...and so one...] Yes, I'm aware of it but still in some cases I would like to be able to quickly change a signature. For instance, all my mail.* groups are set with a signature in Polish but occasionally (like twice a year) I write mail in English and here I would like to change signature to English version quickly. I'll investigate randomsig.el you've proposed in parallel reply, maybe that will solve my problems. -- Best regards, _ _ .o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michal "mina86" Nazarewicz (o o) ooo +--<mina86*tlen.pl>---<jid:mina86*chrome.pl>--ooO--(_)--Ooo-- ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-08-04 0:17 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-08-03 11:13 Clickable '-- ' with signatures menu Michal Nazarewicz 2007-08-03 15:28 ` Slackrat 2007-08-04 0:09 ` Michal Nazarewicz 2007-08-04 0:17 ` Michal Nazarewicz 2007-08-03 15:32 ` Reiner Steib 2007-08-03 15:33 ` Slackrat 2007-08-03 23:58 ` Michal Nazarewicz
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).