Re: tab pressing doesn't bring up anything
On Thu, Dec 20, 2012 at 09:55:25PM +0800, Woody Wu wrote: On Thu, Dec 20, 2012 at 09:29:25PM +0800, Woody Wu wrote: On Wed, Dec 19, 2012 at 01:52:48PM +1100, Cameron Simpson wrote: On 18Dec2012 16:51, Jeremy Kitchen kitc...@kitchen.io wrote: | On Wed, Dec 19, 2012 at 08:23:12AM +0800, Woody Wu wrote: | I defined serveral aliases in .mail_aliase via the 'a' commmand. And, I | checked I had |set alias_file=~/.mail_aliases # where I keep my aliases | in my .muttrc. | | are you also sourcing this file in your .muttrc? You need to source it | as well. Just to make it clear, alias_file only specifies where mutt writes new alias definitions. Mutt doesn't automatically consult that file, hence the need to source it as a separate operation. Cheers, Is the 'sourcing' means the same thing as that in bash script? I write '. ~/.mail_aliases' in the .muttrc, but mutt said it's an syntax error. sorry for the stupid asking, I found out its 'source ~/.mail_aliases'. Please forget this question. On the hand, I found my .muttrc has some default alias definitions like what you guy said. For example: alias mutt-users Mutt User List mutt-users@mutt.org I tried to use this alias by pressing tab after I inputted words 'mutt-users' after the 'To:' header in mutt. But I still got nothing. Is there something to do with my message editor? Here it is vim. This still doesn't work. I tried to remove my vimrc file and all the locally installed plugins. I still cannot use the tab :( What's wrong with my system? By the default the completion is done with C-t(that is ctrl+t). Try with that or check the help for the specific key if there is any. -- Nikola
Re: tab pressing doesn't bring up anything
On Fri, Dec 21, 2012 at 08:45:49AM +1100, Cameron Simpson wrote: If someone knows how to write vim : commands to make vim do TAB completion, I can probably write a short script to read a mutt alias file (or any filter with mutt alias commands in it) and emit vim commands to match, to go in a vimrc file somewhere. That might get to alias expansion inside vim. There is a mutt script that provides omnicompletion of mutt aliases: http://www.vim.org/scripts/script.php?script_id=2533 Hope it helps. -- Eduardo Alvarez Stercus, Stercus, Stercus, moriturus sum -- Rincewind The Wizzard pgpoFanmfdAoC.pgp Description: PGP signature
Re: tab pressing doesn't bring up anything
On Wed, Dec 19, 2012 at 01:52:48PM +1100, Cameron Simpson wrote: On 18Dec2012 16:51, Jeremy Kitchen kitc...@kitchen.io wrote: | On Wed, Dec 19, 2012 at 08:23:12AM +0800, Woody Wu wrote: | I defined serveral aliases in .mail_aliase via the 'a' commmand. And, I | checked I had |set alias_file=~/.mail_aliases # where I keep my aliases | in my .muttrc. | | are you also sourcing this file in your .muttrc? You need to source it | as well. Just to make it clear, alias_file only specifies where mutt writes new alias definitions. Mutt doesn't automatically consult that file, hence the need to source it as a separate operation. Cheers, Is the 'sourcing' means the same thing as that in bash script? I write '. ~/.mail_aliases' in the .muttrc, but mutt said it's an syntax error. On the hand, I found my .muttrc has some default alias definitions like what you guy said. For example: alias mutt-users Mutt User List mutt-users@mutt.org I tried to use this alias by pressing tab after I inputted words 'mutt-users' after the 'To:' header in mutt. But I still got nothing. Is there something to do with my message editor? Here it is vim. Thanks. -- woody I can't go back to yesterday - because I was a different person then.
Re: tab pressing doesn't bring up anything
On Thu, Dec 20, 2012 at 09:29:25PM +0800, Woody Wu wrote: On Wed, Dec 19, 2012 at 01:52:48PM +1100, Cameron Simpson wrote: On 18Dec2012 16:51, Jeremy Kitchen kitc...@kitchen.io wrote: | On Wed, Dec 19, 2012 at 08:23:12AM +0800, Woody Wu wrote: | I defined serveral aliases in .mail_aliase via the 'a' commmand. And, I | checked I had |set alias_file=~/.mail_aliases# where I keep my aliases | in my .muttrc. | | are you also sourcing this file in your .muttrc? You need to source it | as well. Just to make it clear, alias_file only specifies where mutt writes new alias definitions. Mutt doesn't automatically consult that file, hence the need to source it as a separate operation. Cheers, Is the 'sourcing' means the same thing as that in bash script? I write '. ~/.mail_aliases' in the .muttrc, but mutt said it's an syntax error. sorry for the stupid asking, I found out its 'source ~/.mail_aliases'. Please forget this question. On the hand, I found my .muttrc has some default alias definitions like what you guy said. For example: alias mutt-users Mutt User List mutt-users@mutt.org I tried to use this alias by pressing tab after I inputted words 'mutt-users' after the 'To:' header in mutt. But I still got nothing. Is there something to do with my message editor? Here it is vim. This still doesn't work. I tried to remove my vimrc file and all the locally installed plugins. I still cannot use the tab :( What's wrong with my system? Thanks. -- woody I can't go back to yesterday - because I was a different person then. -- woody I can't go back to yesterday - because I was a different person then.
Re: tab pressing doesn't bring up anything
On Thu, December 20, 2012 14:55, Woody Wu wrote: On Thu, Dec 20, 2012 at 09:29:25PM +0800, Woody Wu wrote: On the hand, I found my .muttrc has some default alias definitions like what you guy said. For example: alias mutt-users Mutt User List mutt-users@mutt.org I tried to use this alias by pressing tab after I inputted words 'mutt-users' after the 'To:' header in mutt. But I still got nothing. Is there something to do with my message editor? Here it is vim. This still doesn't work. I tried to remove my vimrc file and all the locally installed plugins. I still cannot use the tab :( What's wrong with my system? Well, by default, vim does nothing about mutt, aliases or your .muttrc. So you have to configure Vim to complete aliases when writing mails. This might be of help for you, if you use Vim for writing mails: http://www.256bit.org/~chrisbra/cms/vim_as_e-mail_editor.html regards, Christian
Re: tab pressing doesn't bring up anything
On 20Dec2012 21:55, Woody Wu narkewo...@gmail.com wrote: | On Thu, Dec 20, 2012 at 09:29:25PM +0800, Woody Wu wrote: | Is the 'sourcing' means the same thing as that in bash script? I write | '. ~/.mail_aliases' in the .muttrc, but mutt said it's an syntax error. | | sorry for the stupid asking, I found out its 'source ~/.mail_aliases'. | Please forget this question. It is nice to see someone spelling source as . in the shell. Too many people use the new fangled long word:-) | On the hand, I found my .muttrc has some default alias definitions like | what you guy said. For example: | | alias mutt-users Mutt User List mutt-users@mutt.org | | I tried to use this alias by pressing tab after I inputted words | 'mutt-users' after the 'To:' header in mutt. But I still got nothing. | Is there something to do with my message editor? Here it is vim. | | This still doesn't work. I tried to remove my vimrc file and all the | locally installed plugins. I still cannot use the tab :( What's wrong | with my system? As Christian said, vim itself is not aware of mutt stuff (unless you tell it; I do not know how, myself). The tab completion for aliases probably only works in the message setup. It sounds like you have: set autoedit=yes set edit_headers=yes so that mutt drops you straight into the whole message to edit. That is how I work also. When you quit the editor, but before typing y to send the message, you are in a mode showing TO and CC and Subject and attachments etc. At that point to can type t to edit the TO line or c to edit the CC line and so forth. I think the TAB completion for aliases will word then, editing those fields. So: - exit editor - type t to edit to To: header - type TAB to complete - having no alias it will enter the alias menu for you to select an alias; if you type the start of an alias it will complete, or enter to menu if ambiguous - after editing the header, type e to return to editing the message If someone knows how to write vim : commands to make vim do TAB completion, I can probably write a short script to read a mutt alias file (or any filter with mutt alias commands in it) and emit vim commands to match, to go in a vimrc file somewhere. That might get to alias expansion inside vim. Cheers, -- Cameron Simpson c...@zip.com.au I made this letter longer than usual because I lack the time to make it shorter.- Pascal
Re: tab pressing doesn't bring up anything
On Fri, Dec 21, 2012 at 08:45:49AM +1100, Cameron Simpson wrote: On 20Dec2012 21:55, Woody Wu narkewo...@gmail.com wrote: | On Thu, Dec 20, 2012 at 09:29:25PM +0800, Woody Wu wrote: | Is the 'sourcing' means the same thing as that in bash script? I write | '. ~/.mail_aliases' in the .muttrc, but mutt said it's an syntax error. | | sorry for the stupid asking, I found out its 'source ~/.mail_aliases'. | Please forget this question. It is nice to see someone spelling source as . in the shell. Too many people use the new fangled long word:-) | On the hand, I found my .muttrc has some default alias definitions like | what you guy said. For example: | | alias mutt-users Mutt User List mutt-users@mutt.org | | I tried to use this alias by pressing tab after I inputted words | 'mutt-users' after the 'To:' header in mutt. But I still got nothing. | Is there something to do with my message editor? Here it is vim. | | This still doesn't work. I tried to remove my vimrc file and all the | locally installed plugins. I still cannot use the tab :( What's wrong | with my system? As Christian said, vim itself is not aware of mutt stuff (unless you tell it; I do not know how, myself). The tab completion for aliases probably only works in the message setup. It sounds like you have: set autoedit=yes set edit_headers=yes so that mutt drops you straight into the whole message to edit. That is how I work also. When you quit the editor, but before typing y to send the message, you are in a mode showing TO and CC and Subject and attachments etc. At that point to can type t to edit the TO line or c to edit the CC line and so forth. I think the TAB completion for aliases will word then, editing those fields. So: - exit editor - type t to edit to To: header - type TAB to complete - having no alias it will enter the alias menu for you to select an alias; if you type the start of an alias it will complete, or enter to menu if ambiguous - after editing the header, type e to return to editing the message Now I understand the way to go, and it works! Many thanks Cameron. If you still have time, here is another question :) Instead of editing the .mail_aliase file by hand, does mutt support this by somehow automatically add an aliase to me when I is viewing a new message? I guess there should be a way but realy cannt find it in the mutt user guide. If someone knows how to write vim : commands to make vim do TAB completion, I can probably write a short script to read a mutt alias file (or any filter with mutt alias commands in it) and emit vim commands to match, to go in a vimrc file somewhere. That might get to alias expansion inside vim. I belive there is a vim plug that can do word completion when you press tab in a, for example, c langue file. I don't remember the name of the plugin and also not sure it can be modified to let it query mutt aliases. Cheers, -- Cameron Simpson c...@zip.com.au I made this letter longer than usual because I lack the time to make it shorter.- Pascal -- woody I can't go back to yesterday - because I was a different person then.
Re: tab pressing doesn't bring up anything
On Wed, Dec 19, 2012 at 08:23:12AM +0800, Woody Wu wrote: I defined serveral aliases in .mail_aliase via the 'a' commmand. And, I checked I had set alias_file=~/.mail_aliases # where I keep my aliases in my .muttrc. But when I press the tab key after the TO field when I composing a new messsage in mutt, nothing comes up. Is there anything wrong? I run mutt in Kconsole (Linux). Mutt version is 1.5.2. You need to add: source ~/.mail_aliases to your ~/.muttrc. See http://www.mutt.org/doc/devel/manual.html#alias-file
Re: tab pressing doesn't bring up anything
On Wed, Dec 19, 2012 at 08:23:12AM +0800, Woody Wu wrote: Hi, list I defined serveral aliases in .mail_aliase via the 'a' commmand. And, I checked I had set alias_file=~/.mail_aliases # where I keep my aliases in my .muttrc. are you also sourcing this file in your .muttrc? You need to source it as well. -Jeremy pgpeDhvBVv92G.pgp Description: PGP signature
Re: tab pressing doesn't bring up anything
On 18Dec2012 16:51, Jeremy Kitchen kitc...@kitchen.io wrote: | On Wed, Dec 19, 2012 at 08:23:12AM +0800, Woody Wu wrote: | I defined serveral aliases in .mail_aliase via the 'a' commmand. And, I | checked I had |set alias_file=~/.mail_aliases# where I keep my aliases | in my .muttrc. | | are you also sourcing this file in your .muttrc? You need to source it | as well. Just to make it clear, alias_file only specifies where mutt writes new alias definitions. Mutt doesn't automatically consult that file, hence the need to source it as a separate operation. Cheers, -- Cameron Simpson c...@zip.com.au It must be public fact, because I'm not the only one who knows about it. - Stefan A. Werner iczer-1!s...@uunet.uu.net