Gnus development mailing list
 help / color / mirror / Atom feed
* rewrite functions
@ 2001-08-15  7:54 Yair Friedman (Jerusalem)
  2001-08-17 17:24 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Yair Friedman (Jerusalem) @ 2001-08-15  7:54 UTC (permalink / raw)


Hi all,

The variable mm-file-name-rewrite-functions is a List of functions used
for rewriting file names of MIME parts.

Currently it works only on the filename part.  However, one might want
to apply some of the functions such as 'upper' on the full path.  On the
other hand, some of the functions such as 'delete-whitespace' are better
not applied on the path.

Should another variable be created?  Any other options?

--
Yair Friedman.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: rewrite functions
  2001-08-15  7:54 rewrite functions Yair Friedman (Jerusalem)
@ 2001-08-17 17:24 ` Lars Magne Ingebrigtsen
  2001-08-19  9:09   ` Yair Friedman (Jerusalem)
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-08-17 17:24 UTC (permalink / raw)


"Yair Friedman (Jerusalem)" <YAIRFR@amdocs.com> writes:

> The variable mm-file-name-rewrite-functions is a List of functions used
> for rewriting file names of MIME parts.
>
> Currently it works only on the filename part.  However, one might want
> to apply some of the functions such as 'upper' on the full path. 

All of the saving functions generally ignore the supplied path -- they
usually refer to local paths on the sender's machine, so they aren't
very useful.  Not ignoring the path is also a security risk -- if
you're reading mail as root, and you get something that's called
"/etc/passwd", the MUA would be doing you a disservice if it gave you
that as the default name to save.

So, I think the current method is fine.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: rewrite functions
  2001-08-17 17:24 ` Lars Magne Ingebrigtsen
@ 2001-08-19  9:09   ` Yair Friedman (Jerusalem)
  2001-08-19 15:48     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Yair Friedman (Jerusalem) @ 2001-08-19  9:09 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> "Yair Friedman (Jerusalem)" <YAIRFR@amdocs.com> writes:
> 
>> The variable mm-file-name-rewrite-functions is a List of functions used
>> for rewriting file names of MIME parts.
>>
>> Currently it works only on the filename part.  However, one might want
>> to apply some of the functions such as 'upper' on the full path. 
> 
> All of the saving functions generally ignore the supplied path -- they
> usually refer to local paths on the sender's machine, so they aren't
> very useful.  Not ignoring the path is also a security risk -- if
> you're reading mail as root, and you get something that's called
> "/etc/passwd", the MUA would be doing you a disservice if it gave you
> that as the default name to save.
> 
> So, I think the current method is fine.

Oh, but I need rewrite functions for the paths Gnus supplies - mostly
for the dumb applications that don't understand the "x:/path/file.ext"
syntax in mm-display-external, and possibly in mm-save-part.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: rewrite functions
  2001-08-19  9:09   ` Yair Friedman (Jerusalem)
@ 2001-08-19 15:48     ` Lars Magne Ingebrigtsen
  2001-08-19 17:18       ` Yair Friedman (Jerusalem)
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-08-19 15:48 UTC (permalink / raw)


"Yair Friedman (Jerusalem)" <YAIRFR@amdocs.com> writes:

> Oh, but I need rewrite functions for the paths Gnus supplies - mostly
> for the dumb applications that don't understand the "x:/path/file.ext"
> syntax in mm-display-external, and possibly in mm-save-part.

Ah, right.  `mm-file-name-rewrite-functions' is only used when saving
files, I think -- not when giving them to external viewers.

In what way would you rewrite "x:/path/file.ext", and wouldn't you
have to rewrite the names differently for different viewer?

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: rewrite functions
  2001-08-19 17:18       ` Yair Friedman (Jerusalem)
@ 2001-08-19 16:24         ` Lars Magne Ingebrigtsen
  2001-08-19 17:39           ` Yair Friedman (Jerusalem)
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-08-19 16:24 UTC (permalink / raw)


"Yair Friedman (Jerusalem)" <YAIRFR@amdocs.com> writes:

> Currently I need to rewrite it to "x:\\path\\file.ext" as some
> applications (excel) don't understand the former syntax.  To achieve
> this, I need to apply convert-standard-filename from w32-fns.el which
> convert the splashes, and replaces forbidden characters with others.

Would you want to do this only for Excel, or do you want to apply this
transformation to all viewers?

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: rewrite functions
  2001-08-19 15:48     ` Lars Magne Ingebrigtsen
@ 2001-08-19 17:18       ` Yair Friedman (Jerusalem)
  2001-08-19 16:24         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Yair Friedman (Jerusalem) @ 2001-08-19 17:18 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> In what way would you rewrite "x:/path/file.ext", and wouldn't you
> have to rewrite the names differently for different viewer?

Currently I need to rewrite it to "x:\\path\\file.ext" as some
applications (excel) don't understand the former syntax.  To achieve
this, I need to apply convert-standard-filename from w32-fns.el which
convert the splashes, and replaces forbidden characters with others.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: rewrite functions
  2001-08-19 16:24         ` Lars Magne Ingebrigtsen
@ 2001-08-19 17:39           ` Yair Friedman (Jerusalem)
  2001-08-19 17:52             ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Yair Friedman (Jerusalem) @ 2001-08-19 17:39 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> "Yair Friedman (Jerusalem)" <YAIRFR@amdocs.com> writes:
> 
>> Currently I need to rewrite it to "x:\\path\\file.ext" as some
>> applications (excel) don't understand the former syntax.  To achieve
>> this, I need to apply convert-standard-filename from w32-fns.el which
>> convert the splashes, and replaces forbidden characters with others.
> 
> Would you want to do this only for Excel, or do you want to apply this
> transformation to all viewers?

I'd like this transformation on all viewers.  This is why
mm-file-name-rewrite-functions looked like a natural candidate in the
first place.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: rewrite functions
  2001-08-19 17:39           ` Yair Friedman (Jerusalem)
@ 2001-08-19 17:52             ` Lars Magne Ingebrigtsen
  2001-08-23 10:55               ` Yair Friedman (Jerusalem)
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-08-19 17:52 UTC (permalink / raw)


"Yair Friedman (Jerusalem)" <YAIRFR@amdocs.com> writes:

> I'd like this transformation on all viewers.  This is why
> mm-file-name-rewrite-functions looked like a natural candidate in the
> first place.

I've just added `mm-path-name-rewrite-functions'.  It's the new
variable to control this.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: rewrite functions
  2001-08-19 17:52             ` Lars Magne Ingebrigtsen
@ 2001-08-23 10:55               ` Yair Friedman (Jerusalem)
  0 siblings, 0 replies; 9+ messages in thread
From: Yair Friedman (Jerusalem) @ 2001-08-23 10:55 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> I've just added `mm-path-name-rewrite-functions'.  It's the new
> variable to control this.

Thanks a lot!



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-08-23 10:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-15  7:54 rewrite functions Yair Friedman (Jerusalem)
2001-08-17 17:24 ` Lars Magne Ingebrigtsen
2001-08-19  9:09   ` Yair Friedman (Jerusalem)
2001-08-19 15:48     ` Lars Magne Ingebrigtsen
2001-08-19 17:18       ` Yair Friedman (Jerusalem)
2001-08-19 16:24         ` Lars Magne Ingebrigtsen
2001-08-19 17:39           ` Yair Friedman (Jerusalem)
2001-08-19 17:52             ` Lars Magne Ingebrigtsen
2001-08-23 10:55               ` Yair Friedman (Jerusalem)

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).