Re: how to change xterm title depending on current mailbox
On Wed, 23 Jan 2002, David T-G wrote: > Sam -- > > ...and then Samuel Padgett said... > % > % darren chamberlain <[EMAIL PROTECTED]> writes: > % > % > In vim: > % > > % > set titleold=My\ Old\ Xterm\ Title > % > > % > and it will restore the xterm's title to that string. > % > % Yes, but I'd like Vim to restore the XTerm title to whatever it > % was before I started Vim. This might be something different each > % time. > > He answered this later, too. Check out > > :help title something like that. Reading the code, I see that it doesn't use the xterm escape sequence for getting that information, but requires that vim is linked with the X libraries. (A little surprising, since they implemented that feature a year or two after I added the escape sequences from dtterm, and I'd assumed they were using those). -- T.E.Dickey <[EMAIL PROTECTED]> http://invisible-island.net ftp://invisible-island.net
Re: how to change xterm title depending on current mailbox
Sam -- ...and then Samuel Padgett said... % % darren chamberlain <[EMAIL PROTECTED]> writes: % % > In vim: % > % > set titleold=My\ Old\ Xterm\ Title % > % > and it will restore the xterm's title to that string. % % Yes, but I'd like Vim to restore the XTerm title to whatever it % was before I started Vim. This might be something different each % time. He answered this later, too. Check out :help title for more. Yay! :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg23619/pgp0.pgp Description: PGP signature
Re: how to change xterm title depending on current mailbox
darren chamberlain <[EMAIL PROTECTED]> writes: > In vim: > > set titleold=My\ Old\ Xterm\ Title > > and it will restore the xterm's title to that string. Yes, but I'd like Vim to restore the XTerm title to whatever it was before I started Vim. This might be something different each time. > -- > I took a speed reading course and read 'War and Peace' in twenty > minutes. It involves Russia. > -- Woody Allen Funny :-)
Re: how to change xterm title depending on current mailbox
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > > since the first bit presumably is doing some sanity checking as well, it > > MIGHT work to take out the 'else if' line entirely, but i don't really > > know. > > > > /* Make sure that the terminal can take the control codes */ > > if (ep == NULL) unset_option (MuttVars[idx].data); > > else if (mutt_strcasecmp (ep, "xterm") != 0) unset_option >(MuttVars[idx].data); > > That did it for me (using wterm and $TERM set to 'rxvt') Weird... did not do anything for meusing rxvt with $TERM set to rxvt... However setting $TERM to xterm did the trick igor - -- Uptime : 41 days, 12:43 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8Tcp6xOY724kDbSARAjslAKCc0jh/mm3QYjClQ13Tu56eEb6/DQCfelr4 qN2H9CkVVDJHBW7Y0+N+UXs= =dO/Y -END PGP SIGNATURE-
Re: how to change xterm title depending on current mailbox
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Dan Boger blurted > > I guess something like this? (I'm not a vim guru though) > > set editor="vim -c 'set tw=72 et;:0;/^$'" My Vim didn't like that but I think I've got it licked now :) Cheers - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8TclXHpvrrTa6L5oRApGiAJ4yuXOSDIGsaNr9APbz8hc43bQaZgCfYyOK bdlAsdToZY3J6DZJaWNtz6g= =80Ux -END PGP SIGNATURE-
Re: how to change xterm title depending on current mailbox
* Will Yardley <[EMAIL PROTECTED]> [020122 19:05]: > since the first bit presumably is doing some sanity checking as well, it > MIGHT work to take out the 'else if' line entirely, but i don't really > know. > > /* Make sure that the terminal can take the control codes */ > if (ep == NULL) unset_option (MuttVars[idx].data); > else if (mutt_strcasecmp (ep, "xterm") != 0) unset_option >(MuttVars[idx].data); That did it for me (using wterm and $TERM set to 'rxvt') mdb -- You have the capacity to learn from mistakes. You'll learn a lot today.
Re: how to change xterm title depending on current mailbox
On Tue, Jan 22, 2002 at 11:18:14AM -0800, Will Yardley wrote: > Nick Wilson wrote: > > > > How might I incorporate a tw command in that? > > This is what I have for mine (nicked it from somewhere else so I don't > > understand all of it but it works :) > > > > set editor="vim -c 'set tw=72 et'" > > i have > set editor="vim +'/^$/+1' -c 'set nohlsearch' +':set textwidth=72' +':set wrap' >+':fixdel' +':set t_kD=' +':set noai' +':set bg=dark' +':syntax on'" > > i actually have some of those in my .vimrc as well, so they're not > really necessary, but you get the point. Another way to do this, to avoid really long 'editor' variables, and so that you can experiment with different settings without having to re-start mutt, is to use autocommands in your .vimrc, e.g., au BufNewFile,BufRead /tmp/mutt-* set expandtab au BufNewFile,BufRead /tmp/mutt-* set formatoptions-=o Note also that you can set several options with one set command, e.g., set tw=72 wrap ai Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Spokane, Washington, USA http://www.spocom.com/users/gjohnson/mutt/ |
Re: how to change xterm title depending on current mailbox
On Tue, Jan 22, 2002 at 07:53:05PM +0100, Nick Wilson wrote: > > set editor="vim -u ~/.mutt/vimrc -c ':0;/^$'" > > Fantastic! > How might I incorporate a tw command in that? I guess something like this? (I'm not a vim guru though) set editor="vim -c 'set tw=72 et;:0;/^$'" -- Dan Boger [EMAIL PROTECTED] msg23590/pgp0.pgp Description: PGP signature
Re: how to change xterm title depending on current mailbox
Nick Wilson wrote: > > How might I incorporate a tw command in that? > This is what I have for mine (nicked it from somewhere else so I don't > understand all of it but it works :) > > set editor="vim -c 'set tw=72 et'" i have set editor="vim +'/^$/+1' -c 'set nohlsearch' +':set textwidth=72' +':set wrap' +':fixdel' +':set t_kD=' +':set noai' +':set bg=dark' +':syntax on'" i actually have some of those in my .vimrc as well, so they're not really necessary, but you get the point. w
Re: how to change xterm title depending on current mailbox
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 22-01-02 at 19:31 * Dan Boger said > I have in my muttrc this line: > > set editor="vim -u ~/.mutt/vimrc -c ':0;/^$'" > > which will tell vim to start after the headers, so I'll be positioned to > trim the quoted text. Fantastic! How might I incorporate a tw command in that? This is what I have for mine (nicked it from somewhere else so I don't understand all of it but it works :) set editor="vim -c 'set tw=72 et'" Mucho grassy arse - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8TbURHpvrrTa6L5oRAvSXAJ9sbhxBcF5WNXd+K8JYjhQe2jdGGACeItFR 31lPnCLt8Ec6DwBndUW6EZc= =uNLE -END PGP SIGNATURE-
Re: how to change xterm title depending on current mailbox
On 2002.01.22, in <[EMAIL PROTECTED]>, "John Buttery" <[EMAIL PROTECTED]> wrote: > > By the way, is there any way to get mutt to start composing _after_ > the quoted text instead of before it when replying? set editor="vi '+$;?^>?;+'" + begin vi initialization commands $ go to end of file ; end of first command ?^>?search backward for line beginning with ">" ; end of second command + move ahead one line -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: how to change xterm title depending on current mailbox
On Tue, Jan 22, 2002 at 11:52:11AM -0600, John Buttery wrote: > By the way, is there any way to get mutt to start composing _after_ > the quoted text instead of before it when replying? it's not for mutt to do, it's your editor :) I have in my muttrc this line: set editor="vim -u ~/.mutt/vimrc -c ':0;/^$'" which will tell vim to start after the headers, so I'll be positioned to trim the quoted text. if you wanted it to start at the end, you could do something like this (assuming you use vim, of course): set editor="vim -c ':%;?^$'" HTH! -- Dan Boger Linux MVP brainbench.com msg23581/pgp0.pgp Description: PGP signature
Re: how to change xterm title depending on current mailbox
Nick Wilson wrote: > > > Is there any folder-hook, to change the xterm-title displaying the name > > of the mailbox i'm changing in? > > Why? Sorry I can't answer, just curious :) why? it's very useful to have information in the title bar when you have lots of windows open. i put lots of stuff up here for my shell prompt as well since i hate having clutter in my actual prompt. w
Re: how to change xterm title depending on current mailbox
Will Yardley wrote: > > i can put the xtitles patch version relative to 1.3.2x up somewhere for > you, or send you the patch via email if you'd like. [disclaimer... i did NOT write this patch] ok here's the patch (it documents itself). i took the one on the mutt site and patched by hand for 1.3.x... seems to work ok for me tho. http://infinitejazz.net/will/geek/mutt.xterm.patch the version that's in the debian package for unstable is: http://infinitejazz.net/will/geek/patch.xterm.alt (should be pretty much the same). there's a little bit of fuzz, but should apply fine to 1.3.26/.27, and should work down to early 1.3.x stuff. the 1.2.5 patch is linked from the mutt site. someone was saying that this bit should be changed, but i'm not a programmer, so maybe someone else can give some feedback. i have $TERM set to xterm so it works, but if you have $TERM set to xterm-xfree86 (or xterm-color) it might not work since the first bit presumably is doing some sanity checking as well, it MIGHT work to take out the 'else if' line entirely, but i don't really know. /* Make sure that the terminal can take the control codes */ if (ep == NULL) unset_option (MuttVars[idx].data); else if (mutt_strcasecmp (ep, "xterm") != 0) unset_option (MuttVars[idx].data); i have this: set xterm_set_titles set xterm_title="--[$USER@%h ]-%v--[%f ]--[%b inc %n/%m here]---(Sorting by %s/%S)%>-" in my .muttrc w
Re: how to change xterm title depending on current mailbox
On Tue, Jan 22, 2002 at 09:48:58AM -0800, Will Yardley wrote: >Christoph Kampe wrote: >> >> Is there any folder-hook, to change the xterm-title displaying the name >> of the mailbox i'm changing in? > >only if you patch mutt. i think the debian package has the patch >already. > >i can put the xtitles patch version relative to 1.3.2x up somewhere for >you, or send you the patch via email if you'd like. > >w I'd love a copy of this patch too, if you don't mind. By the way, is there any way to get mutt to start composing _after_ the quoted text instead of before it when replying? -- John Buttery "The whole aim of practical politics is to keep the populace alarmed -- and thus clamorous to be led to safety -- by menacing it with an endless series of hobgoblins, all of them imaginary." H.L. Mencken (Web page temporarily unavailable) msg23578/pgp0.pgp Description: PGP signature
Re: how to change xterm title depending on current mailbox
Christoph -- ...and then Christoph Kampe said... % % Hello, Hi! % % Please, if its possible, can anyone tell me how to change the % xterm-title depending on the mailbox i'm browsing in? % % history: % Im using vim as my prefered editor in mutt. Everytime i use vim, it % changes the Xterm-Title to the current edited file. When im leaving vim % it changes to "Thanks for using vim" ;-) until next usage of vim. Aha! Check your vimrc (both private and system-wide) to see how it does it and then output the same control chars. % % Is there any folder-hook, to change the xterm-title displaying the name % of the mailbox i'm changing in? I believe you can output ansi codes, but have lost track of the thread. Check the archives to see. % % regards % Christoph % -- HTH & HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg23576/pgp0.pgp Description: PGP signature
Re: how to change xterm title depending on current mailbox
On Tue, Jan 22, 2002 at 06:45:21PM +0100, Christoph Kampe wrote: > Please, if its possible, can anyone tell me how to change the > xterm-title depending on the mailbox i'm browsing in? > > history: > Im using vim as my prefered editor in mutt. Everytime i use vim, it > changes the Xterm-Title to the current edited file. When im leaving vim > it changes to "Thanks for using vim" ;-) until next usage of vim. > > Is there any folder-hook, to change the xterm-title displaying the name > of the mailbox i'm changing in? there's a patch, I believe (well, I know because I'm using it :) - I think it's linked from mutt.org: http://www.robots.ox.ac.uk/~neil/mutt/ I think I had to do some mods to it to patch 1.3.25, but who really knows :) it allows you to add things like this to your muttrc: set xterm_set_titles=yes set xterm_icon='Mutt (%?m?%m&none?%?n?/%n?)' set xterm_title="Mutt %?n?(%n new messages)?" HTH, Dan -- Dan Boger [EMAIL PROTECTED] msg23575/pgp0.pgp Description: PGP signature
Re: how to change xterm title depending on current mailbox
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 22-01-02 at 18:51 * Christoph Kampe said > Is there any folder-hook, to change the xterm-title displaying the name > of the mailbox i'm changing in? Why? Sorry I can't answer, just curious :) - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8TacsHpvrrTa6L5oRAtHwAJ9PthZAQha3raBNSlurPW+VDKtJGACeIVOw 4uRqpdXceGgL4B3oquDQDSM= =idmr -END PGP SIGNATURE-
Re: how to change xterm title depending on current mailbox
Christoph Kampe wrote: > > Is there any folder-hook, to change the xterm-title displaying the name > of the mailbox i'm changing in? only if you patch mutt. i think the debian package has the patch already. i can put the xtitles patch version relative to 1.3.2x up somewhere for you, or send you the patch via email if you'd like. w
how to change xterm title depending on current mailbox
Hello, Please, if its possible, can anyone tell me how to change the xterm-title depending on the mailbox i'm browsing in? history: Im using vim as my prefered editor in mutt. Everytime i use vim, it changes the Xterm-Title to the current edited file. When im leaving vim it changes to "Thanks for using vim" ;-) until next usage of vim. Is there any folder-hook, to change the xterm-title displaying the name of the mailbox i'm changing in? regards Christoph --