Rocco Rutte:
authorpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Fri, 29 Apr 2005 12:26:53 +0000 (12:26 +0000)
committerpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Fri, 29 Apr 2005 12:26:53 +0000 (12:26 +0000)
- update option names in contrib/* (partially fixes bug #3866; more to come)
- (temporarily) add update-config.pl to samples (partially fixes bug #3866; more to come)

git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@280 e385b8ad-14ed-0310-8656-cc95a2468c6d

contrib/Makefile.in
contrib/Pine.rc
contrib/grml-muttng
contrib/sample.muttngrc
contrib/sample.muttrc
contrib/sample.muttrc-tlr
contrib/update-config.pl [new file with mode: 0755]

index 86fba61..9f79a09 100644 (file)
@@ -23,7 +23,7 @@ subdir = contrib
 SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp5.rc pgp6.rc Tin.rc \
        sample.muttrc  sample.mailcap sample.muttrc-tlr \
        colors.default colors.linux smime.rc \
-       ca-bundle.crt smime_keys_test.pl grml-muttng
+       ca-bundle.crt smime_keys_test.pl grml-muttng update-config.pl
 
 DISTFILES = Makefile.in language.txt language50.txt  \
        patch.slang-1.2.2.keypad.1      \
index f16ffbf..2b09b28 100644 (file)
@@ -41,4 +41,4 @@ set folder=~/mail
 set record=+sent-mail
 set nosave_name
 set postponed=~/postponed-msgs
-set hdr_format="%Z %3C %{%b %d} %-19.19L (%5c) %s"
+set index_format="%Z %3C %{%b %d} %-19.19L (%5c) %s"
index 997827d..15b804c 100755 (executable)
@@ -80,7 +80,7 @@ $IMAPDATA
     set reply_regexp="^((aw|antw.?|antwort|re|r e|r?f|sv):[ \t]*)*"
 
 # Format Options
-    set forw_format="(forw) %s"
+    set forward_format="(forw) %s"
     set index_format="%4C %Z %[!%y%m%d] %-17.17F (%3l) %s"
     set pager_format="%S [%C/%T] %n (%l) %s"
     set status_format="%v: %f (%s) [%M/%m] [N=%n,*=%t,new=%b]"
@@ -119,7 +119,7 @@ $IMAPDATA
 # sidebar stuff:
   set sidebar_visible="no"
   set sidebar_width=25
-  set shorten_hierarchy
+  set sidebar_shorten_hierarchy
   color sidebar_new yellow default
 
 # keybindings:
index da2a695..eda5cab 100644 (file)
@@ -603,7 +603,7 @@ save-hook .                                           +archiv/save-`date +%Y-%m`
 
 
 # Send-Hooks. No PGP-autosign for all messages.
-send-hook . "unset pgp_autosign"
+send-hook . "unset crypt_autosign"
 
 # Define an atriibution-line an a from-header which use, 
 # when send a message to this mailinglist.
@@ -612,11 +612,11 @@ send-hook ^mailingliste@.*invalid\\.foo$ \
 
 # PGP-autoencrypt and set a new attribution-line for this recipient.
 send-hook ^gerd.geppert@(bar|foobar|invalid)\\.tld \
-      'set pgp_autoencrypt attribution="Hallo %v,\n\n* Du schriebst:\n" ; my_hdr From: "Andreas Kneib" <akneib@inval.id>'
+      'set crypt_autoencrypt attribution="Hallo %v,\n\n* Du schriebst:\n" ; my_hdr From: "Andreas Kneib" <akneib@inval.id>'
 
 # PGP-autosign and set a new attribution-line for this recipient.
 send-hook ^.*@foobar.invalid \
-      'set pgp_autosign attribution="Hallo %v,\n\n* Du schriebst:\n"'
+      'set crypt_autosign attribution="Hallo %v,\n\n* Du schriebst:\n"'
 
 
 # Send-hook for newsgroups. "!~t." means: Messages with no To:-header.
index f2799a8..d561050 100644 (file)
@@ -40,15 +40,15 @@ set edit_headers            # let me edit the message header when composing
 #set forward_decode            # weed and MIME decode forwaded messages
 #set forward_format="[%a: %s]" # subject to use when forwarding messages
 #set forward_quote             # quote the header and body of forward msgs
-#set hdr_format="%4C %Z %{%m/%d} [%2N] %-15.15F (%4c) %s"
-set hdr_format="%4C %Z %{%m/%d} %-15.15F (%4c) %s" # format of the index
+#set index_format="%4C %Z %{%m/%d} [%2N] %-15.15F (%4c) %s"
+set index_format="%4C %Z %{%m/%d} %-15.15F (%4c) %s" # format of the index
 #set hdrs                      # include `my_hdr' lines in outgoing messages
 #set header                    # include message header when replying
 set help                       # show the help lines
 #set history=20                        # number of lines of history to remember
 #set hostname="mutt.org"       # my DNS domain
 set include                    # always include messages when replying
-#set indent_string="> "                # how to quote replied text
+#set indent_stringing="> "             # how to quote replied text
 #set locale="C"                        # locale to use for printing time
 #set mailcap_path="~/.mailcap:/usr/local/share/mailcap"
 set nomark_old                 # i don't care about whether a message is old
@@ -65,7 +65,7 @@ set pager_index_lines=6               # how many index lines to show in the pager
 #set pager_stop                        # don't move to the next message on next-page
 #set pgp_strict_enc            # use Q-P encoding when needed for PGP
 set postponed=+postponed       # mailbox to store postponed messages in
-#set post_indent_string='---end quoted text---'
+#set post_indent_stringing='---end quoted text---'
 #set print=ask-yes             # ask me if I really want to print messages
 set print_command=/bin/false   # how to print things (I like to save trees)
 set noprompt_after     # ask me for a command after the external pager exits
@@ -105,7 +105,7 @@ set tilde                   # virtual lines to pad blank lines in the pager
 set nouse_domain               # don't qualify local addresses with $domain
 #set use_from                  # always generate the `From:' header field
 set use_mailcap=yes            # always use a mailcap entry when found
-set pgp_verify_sig=no          # don't automatically verify message signatures
+set crypt_verify_sig=no                # don't automatically verify message signatures
 #set visual=vim                        # editor invoked by ~v in the builtin editor
 #set nowait_key                        # prompt when a pipe returns normal status
 set write_inc=25               # show progress while writing mailboxes
@@ -253,7 +253,7 @@ save-hook ^judge +diplomacy
 # <command> is executed when opening a mailbox matching <pattern>
 
 #folder-hook . 'set sort=date-sent'
-#folder-hook mutt 'set hdr_format="%4C %Z %02m/%02N %-20.20F (%4l) %s"'
+#folder-hook mutt 'set index_format="%4C %Z %02m/%02N %-20.20F (%4l) %s"'
 #folder-hook =mutt my_hdr Revolution: \#9 # real comment
 
 #folder-hook . 'set reply_regexp="^re:[ \t]*"'
index 4e2959a..3e7e8e3 100644 (file)
@@ -185,7 +185,7 @@ set   confirmcreate                 # Ask me about creating new files
 unset confirmappend                    # Don't ask me about appending to files
 set   delete=yes                       # Don't ask me whether or not I meant to delete messages
 set   display_filter="tr '\240\204\223\226' ' \"\"-'" # fix some funny characters
-set   edit_hdrs                                # I want to edit the headers.
+set   edit_headers                             # I want to edit the headers.
 set   editor="/usr/bin/jed %s -f 'flower_mode();'"     
                                        # Invoke jed with mail_mode.  This may
                                        # or may not work for you.
@@ -201,20 +201,20 @@ set   include=yes                 # Always include a copy when replying.
 set   mark_old                         # Distinguish between seen (but unread) and new messages
 set   mbox=+mbox                       # The (unused) mbox file.
 unset metoo                            # Remove me from CC headers.
-set   mime_fwd=ask-no                  # Ask me whether or not to create a MIME-encapsulated forward
+set   mime_forward=ask-no                      # Ask me whether or not to create a MIME-encapsulated forward
 set   move=no                          # Don't use mbox
 set   pager_stop                       # Don't fall through to the next message in the pager
 set   pager_index_lines=0              # The pager index is ugly.
-set   pgp_replyencrypt                 # Encrypt when replying to encrypted messages.
-set   pgp_replysignencrypted           # Sign when replying to encrypted messages.
+set   crypt_replyencrypt                       # Encrypt when replying to encrypted messages.
+set   crypt_replysignencrypted         # Sign when replying to encrypted messages.
 set   pgp_show_unusable="no"           # Don't display unusable keys.
 set   pgp_sort_keys="keyid"            # Sort keys by key ID
-set   pgp_replysign                    # Sign when replying to signed messages.
+set   crypt_replysign                  # Sign when replying to signed messages.
 set   pgp_timeout=3600                 # Forget the PGP passphrase after an hour.
 set   pipe_decode                      # Decode messages I pipe to commands, typically to patch(1).
 set   postponed=~/.mutt/postponed      # Where to put postponed messages
 set   print=ask-no                     # Don't waste paper
-set   print_cmd="enscript -Email -2 -r -G"     # Two columns, landscape, fancy header.
+set   print_command="enscript -Email -2 -r -G" # Two columns, landscape, fancy header.
 set   print_split=yes                  # Invoke enscript once per message
 set   quit=yes                         # Don't ask me whether or not I want to quit.
 set   quote_regexp="^ *[a-zA-Z]*[>|][>:|]*"    # Recognize quotes in the pager.
@@ -247,7 +247,7 @@ set   query_command="lbdbq %s"              # Use the Little Brother's Database with the ext
 set   sendmail_wait=-1                 # Put sendmail (i.e., postfix) to the background.
 set   encode_from                      # "From " in the beginning of a line triggers quoted-printable
 set   nowait_key                       # Return immediately from external programs
-set   forw_format="[fwd] %s (from: %a)"        # A different subject for forwarded messages
+set   forward_format="[fwd] %s (from: %a)"     # A different subject for forwarded messages
 set   nobeep                           # Shut up. ;-)
 set   reply_regexp="^((re([\\[0-9\\]+])*|aw):[ \t]*)+[ \t]*"   # A regular expression to detect replies
 set   header                           # Include the message header when replying.
diff --git a/contrib/update-config.pl b/contrib/update-config.pl
new file mode 100755 (executable)
index 0000000..78fe774
--- /dev/null
@@ -0,0 +1,53 @@
+#!/usr/bin/perl -w
+
+# purpose:
+# update var names for mutt-ng
+# update:
+# grep ', DT_SYN' init.h | awk -F , '{print $1 $4}' | sed -e 's/[{UL]//g' -e 's/"  "/" => "/g'
+
+use strict;
+
+my %opts = (
+  " edit_hdrs"                   => " edit_headers",
+  " forw_decode"                 => " forward_decode",
+  " forw_format"                 => " forward_format",
+  " forw_quote"                  => " forward_quote",
+  " hdr_format"                  => " index_format",
+  " indent_str"                  => " indent_string",
+  " mime_fwd"                    => " mime_forward",
+  " msg_format"                  => " message_format",
+  " pgp_autosign"                => " crypt_autosign",
+  " pgp_autoencrypt"             => " crypt_autoencrypt",
+  " pgp_replyencrypt"            => " crypt_replyencrypt",
+  " pgp_replysign"               => " crypt_replysign",
+  " pgp_replysignencrypted"      => " crypt_replysignencrypted",
+  " pgp_verify_sig"              => " crypt_verify_sig",
+  " pgp_create_traditional"      => " pgp_autoinline",
+  " pgp_auto_traditional"        => " pgp_replyinline",
+  " forw_decrypt"                => " forward_decrypt",
+  " smime_sign_as"               => " smime_default_key",
+  " post_indent_str"             => " post_indent_string",
+  " print_cmd"                   => " print_command",
+  " shorten_hierarchy"           => " sidebar_shorten_hierarchy"
+);
+
+if (@ARGV == 0) {
+  die "Usage: $0 <conffiles>\n";
+}
+
+foreach my $f (@ARGV) {
+  if (open (INPUT, "<" . $f)) {
+    my @l = ();
+    while (<INPUT>) {
+      foreach my $v (keys %opts) {
+        $_ =~ s/($v)/$opts{$1}/;
+      }
+      push (@l, $_);
+    }
+    close (INPUT);
+    if (open (OUTPUT, ">" . $f)) {
+      print OUTPUT @l;
+      close (OUTPUT);
+    }
+  }
+}