<<< Date Index >>>     <<< Thread Index >>>

Re: updated bj.current_shortcut patches for 1.4.1i?



Re: Fernan Aguero in <20040122212451.GB39841@xxxxxxxxxxxxxxxx>
> However, the patches at
> http://home.worldonline.dk/byrial/mutt/patches/ do not work
> with the current mutt. Since the patch is pretty simple I
> tried to edit muttlib.c myself in 1.4.1i to add the changes,
> but this resulted in a compilation error (yes, I'm no C
> programmer). 
> 
> Anyone has updated patches for 1.4.1i or the skills to update
> Byrial's patches?

I'm using the current_shortcut patch with the current mutt version. It
doesn't work very well (under some circumstances it creates "^folders"
im my $HOME) unless you use folder-hooks to "push :set..." settings, but
one you get around this, it's doing its job.

The original patch has to be applied with -p0 and lacks a PATCHES entry,
here's a new one (for -p1):

--- PATCHES     Tue Nov  6 19:59:33 2001
+++ mutt/PATCHES        Tue Nov  6 19:59:42 2001
@@ -1,0 +1 @@
+patch-1.3.23.bj.current_shortcut.1
--- doc/manual.sgml.head~       Tue Oct  9 20:25:29 2001
+++ mutt/doc/manual.sgml.head   Sat Oct 13 07:39:07 2001
@@ -2023,6 +2023,7 @@ path.
 <item>&gt; -- refers to your <ref id="mbox" name="&dollar;mbox"> file
 <item>&lt; -- refers to your <ref id="record" name="&dollar;record"> file
 <item>- or !! -- refers to the file you've last visited
+<item>^ -- refers to the current open mailbox if any
 <item>&tilde; -- refers to your home directory
 <item>= or + -- refers to your <ref id="folder" name="&dollar;folder"> 
directory
 <item>@<em/alias/ -- refers to the <ref id="save-hook" 
--- muttlib.c~  Tue Oct  9 20:25:29 2001
+++ mutt/muttlib.c      Sat Oct 13 07:42:18 2001
@@ -441,7 +441,18 @@ char *_mutt_expand_path (char *s, size_t
        tail = s + 1;
       }
       break;
-      
+
+      case '^':        
+      {
+       if (Context)
+       {
+         strfcpy (p, Context->path, sizeof (p));
+         tail = s + 1;
+         break;
+       }
+      }
+      /* Fall through */
+
       default:
       {
        *p = '\0';


Re: David Yitzchak Cohen in <20040204024109.GB14769@xxxxxxx>
> Why don't you just do something like this instead?
> folder-hook =folder1 fcc-hook =folder1
> folder-hook =folder2 fcc-hook =folder2
> etc.

That's ugly.

> ...so you can just put this in your muttrc:
> source "ls ~/mail | sed 's/(.*)/folder-hook =\1 fcc-hook =\1/'|"

I'm using the following in conjunction with the trash_folder patch:

folder-hook .                   'set trash="=trash/trash"'
folder-hook IN/.                'push ":set trash=\"^.trash\"\n"'

Christoph
-- 
cb@xxxxxxxx | http://www.df7cb.de/

Attachment: signature.asc
Description: Digital signature