Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2009-07-22 Thread Colin Watson
clone 363250 -1
reassign -1 general
retitle -1 PAGER as a pipeline
tags 363250 fixed-upstream
thanks

On Sun, Apr 23, 2006 at 09:52:34PM +0200, Loïc Minier wrote:
  Yes, indeed, the root of the problem is the change of support for
  pipelines.  However, I'm not sure that pipelines worked in the use case
  of passing a file as a parameter to $PAGER in the past.
 
  Currently, each program (for example man) has its way of calling
  $PAGER, perhaps as $PAGER file name or piping to sh -c $PAGER,
  or perhaps piping directly to $PAGER.
 
  Of course, if we say $PAGER can be a pipeline, and a pager can be used
  both as $PAGER file name and as the end of a pipeline, then
  defining $PAGER to be a pipeline must work in both cases, but I'm not
  sure it is a regression to not support pipelines in the use case of a
  file name as argument.
 
  In other words:
 
 $PAGER is a $PAGER is a
 program pipeline
  
  call $PAGER as works   ???
  $PAGER file name
  
  call $PAGER as
  cat data | $PAGERworks   works

That last entry is not correct. See below.

  I do agree that the two use cases that you listed in a previous message
  exist, I'm not sure they were both supported in the case where $PAGER
  is a pipeline, but we can work on fixing that at least in
  sensible-pager by using systematically: cat $@ | $PAGER

Sorry I took so long to deal with this bug report against man-db. I must
confess that the length of the thread intimidated me a bit!

For the meantime, I note that putting pipes in $PAGER doesn't work even
with sensible-pager, since variable expansion doesn't work that way in
shell:

  $ cat f
  foo
  bar
  $ PAGER='cat | grep bar' sensible-pager f
  cat: |: No such file or directory
  cat: grep: No such file or directory
  cat: bar: No such file or directory
  foo
  bar
  $ PAGER='cat | grep bar' f sensible-pager
  cat: |: No such file or directory
  cat: grep: No such file or directory
  cat: bar: No such file or directory

To be precise, expansion happens after shell input is parsed into
commands. See:

  
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_01

I therefore don't think it makes sense to do the not inconsiderable
amount of work required to support pipes-in-$PAGER in man-db when even
sensible-pager can't cope wth it. (The reason it used to work was that
man-db used to be very sloppy about all sorts of things and just passed
stuff to system(); over the last few years I taught it how to handle
pipelined command execution itself, which fixed a wide variety of
interesting bugs. As a result, though, pipes in $PAGER and other things
that man-db interprets stopped being supported.)

For the meantime, I've simply documented the constraints on PAGER and
friends in man(1), and advised the use of a script in such cases:

Tue Jul 21 15:17:49 BST 2009  Colin Watson  cjwat...@debian.org

* man/man1/man.man1 (Controlling formatted output, ENVIRONMENT):
  Explicitly state that -P/$PAGER/$MANPAGER identifies a single
  command with no pipes (Debian bug #363250).

If we want to extend PAGER in general, then I'm willing to revisit this.

Cheers,

-- 
Colin Watson   [cjwat...@debian.org]


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Processed: Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2009-07-22 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 clone 363250 -1
Bug#363250: please clarify in the man manpage how $PAGER is invoked
Bug 363250 cloned as bug 538022.

 reassign -1 general
Bug#538022: please clarify in the man manpage how $PAGER is invoked
Bug reassigned from package `man-db' to `general'.

 retitle -1 PAGER as a pipeline
Bug#538022: please clarify in the man manpage how $PAGER is invoked
Changed Bug title to `PAGER as a pipeline' from `please clarify in the man 
manpage how $PAGER is invoked'.

 tags 363250 fixed-upstream
Bug#363250: please clarify in the man manpage how $PAGER is invoked
There were no tags set.
Tags added: fixed-upstream

 thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-24 Thread Loïc Minier
On Sun, Apr 23, 2006, Manoj Srivastava wrote:
 Historically, if my memory serves me correctly, one used PAGER
  to specify the program, and the default arguments. PAGER essentially
  worked as an shell alias:
 PAGER= less -cim
  And then you could either pipe thigs to ti, or call it on a file.  I
  am not sure if I recall a-pipeline-as-pager ever working, even way
  back in the mid 80's.

 The proposal adds support for it, and indirectly addresses the
 regression mentionned in the bug report which started this discussion.

-- 
Loïc Minier [EMAIL PROTECTED]
You can gtk_main_run, but you can't gtk_widget_hide. --danw, 19-jul-04


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-23 Thread Manoj Srivastava
On 22 Apr 2006, Loïc Minier outgrape:

 On Sat, Apr 22, 2006, Manoj Srivastava wrote:
 There are two use cases that any pager directive must address:
 1) The program is going to generate output which must be piped to
 a pager
 2) The program want to send a file to the user.

 I agree that these use cases need to be supported.

 But perhaps the policy for Debian should be for programs to ignore
 PAGER and just use sensible pager, where all the logic for dealing
 with pager goes in. I still don't see how sensible pager can handle
 the pipeline vs the non-pipeline case, though.

 Yes, I believe the policy should be changed in this way, and as I
 proposed.

Hmm.  This could be a potentially disruptive change -- since a
 lot of programs may need to be changed in non-trivial ways.

 Look at the code of sensible-pager, it will call $PAGER if
 sensible-pager is called without any argument, and $PAGER
 filename if it's called as sensible-pager filename.  This
 seems good enough for me; if people set $PAGER to a pipeline, they
 might suffer from problems for the second case, but we can work on
 that.

Err, so we can't make this policy (allowing $PAGER to be a
 pipeline) until we have a solution for this, given that we have
 agreed that the two use cases for $PAGER must be  feasible.


 Barring that, policy would have to be that programs can' t user
 PAGER to work with use case 2, and must be guilty of an useless
 use of cat to pipe data to STDIN for PAGER.

 Yes, if you mean that permitting pipelines forbids programs to call
 $PAGER $file, I agree with you.  There are multiple ways to solve
 this, but I think that whatever way is chosen should be implemented
 in sensible-pager, and we can even change our mind later, and fix
 only sensible-pager.  The contract of sensible-pager with respect to
 Debian programs should be to offer two modes of operation, the pipe
 of data on stdin mode, and the pass a file on the command line mode
 (matching your use cases 1 and 2).

 PAGER has the benefit of being long standardized, and if we do
 not use PAGER, we are breaking user expectations.
 What is the benefit of creating a PAGER clone?

 sensible-pager is not a PAGER clone, it permits us to enhance the
 handling of $PAGER in a single place instead of changing every
 program in Debian that wants to send something to $PAGER.

The point is that lots of programs already respect $PAGER,
 with varying semantics (most support $PAGER being less or more or
 something, but not all support arbitary pipelines.


 B/ user configuration of the pager When defined, $PAGER is a sh
 pipeline which reads its data from stdin.
 How do programs present a text file to the user using a PAGER,
 then? cat file.txt | $PAGER?

 That's a question for sensible-pager to solve, but one way is to use
 cat $@ | $PAGER indeed.

Umm. If we are talking about making policy, we can't just make
 policy and say things are a problem for some package or the other to
 solve.

 In other words, ignore $PAGER, use sensible-pager all over,
 and let that handle it?

 Yes.

 Not, unless these questions are answered, and we actually have
 a working implementation.

 Well the current implementation works, except for pipelines.  :)

Since allowing pipelines seems to be the motivating factor
 here, we do need to solve that, I think.

manoj
-- 
I am here by the will of the people and I won't leave until I get my
raincoat back.- a slogan of the anarchists in Richard Kadrey's
Metrophage
Manoj Srivastava   [EMAIL PROTECTED]  http://www.debian.org/%7Esrivasta/
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-23 Thread Loïc Minier
On Sun, Apr 23, 2006, Manoj Srivastava wrote:
 Since allowing pipelines seems to be the motivating factor
  here, we do need to solve that, I think.

 Yes, indeed, the root of the problem is the change of support for
 pipelines.  However, I'm not sure that pipelines worked in the use case
 of passing a file as a parameter to $PAGER in the past.

 Currently, each program (for example man) has its way of calling
 $PAGER, perhaps as $PAGER file name or piping to sh -c $PAGER,
 or perhaps piping directly to $PAGER.

 Of course, if we say $PAGER can be a pipeline, and a pager can be used
 both as $PAGER file name and as the end of a pipeline, then
 defining $PAGER to be a pipeline must work in both cases, but I'm not
 sure it is a regression to not support pipelines in the use case of a
 file name as argument.

 In other words:

$PAGER is a $PAGER is a
program pipeline
 
 call $PAGER as works   ???
 $PAGER file name
 
 call $PAGER as
 cat data | $PAGERworks   works

 I do agree that the two use cases that you listed in a previous message
 exist, I'm not sure they were both supported in the case where $PAGER
 is a pipeline, but we can work on fixing that at least in
 sensible-pager by using systematically: cat $@ | $PAGER

   Bye,

-- 
Loïc Minier [EMAIL PROTECTED]
You can gtk_main_run, but you can't gtk_widget_hide. --danw, 19-jul-04


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-23 Thread Miles Bader
Manoj Srivastava [EMAIL PROTECTED] writes:
 I read it. I still think that my answer suffices: Put your
  pipeline in a script, and set that to PAGER.

Your answer doesn't suffice, because it's not what people expect --
PAGER has historically (for a _long_ time) supported arguments being
specified (and I guess in practice it was usually used an argument to
popen), so that's what users have come to expect, and what other
distros/OSes support in the vast majority of cases.

Changing it now would be very unfriendly to users, and morever there
seems to be little or no benefit to doing so (really, what exactly would
you gain?).

-Miles
-- 
80% of success is just showing up.  --Woody Allen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-23 Thread Manoj Srivastava
On 23 Apr 2006, Loïc Minier verbalised:

 On Sun, Apr 23, 2006, Manoj Srivastava wrote:
 Since allowing pipelines seems to be the motivating factor
 here, we do need to solve that, I think.

 Yes, indeed, the root of the problem is the change of support for
 pipelines.  However, I'm not sure that pipelines worked in the use
 case of passing a file as a parameter to $PAGER in the past.

 Currently, each program (for example man) has its way of calling
 $PAGER, perhaps as $PAGER file name or piping to sh -c
 $PAGER, or perhaps piping directly to $PAGER.

 Of course, if we say $PAGER can be a pipeline, and a pager can be
 used both as $PAGER file name and as the end of a pipeline, then
 defining $PAGER to be a pipeline must work in both cases, but I'm
 not sure it is a regression to not support pipelines in the use case
 of a file name as argument.

 In other words:

 $PAGER is a $PAGER is a
 program pipeline
 
 call $PAGER as works   ???
 $PAGER file name
 
 call $PAGER as
 cat data | $PAGERworks   works

 I do agree that the two use cases that you listed in a previous
 message exist, I'm not sure they were both supported in the case
 where $PAGER is a pipeline, but we can work on fixing that at least
 in sensible-pager by using systematically: cat $@ | $PAGER

Historically, if my memory serves me correctly, one used PAGER
 to specify the program, and the default arguments. PAGER essentially
 worked as an shell alias:
PAGER= less -cim
 And then you could either pipe thigs to ti, or call it on a file.  I
 am not sure if I recall a-pipeline-as-pager ever working, even way
 back in the mid 80's.

manoj
-- 
It is sweet to let the mind unbend on occasion. Quintus Horatius
Flaccus (Horace)
Manoj Srivastava   [EMAIL PROTECTED]  http://www.debian.org/%7Esrivasta/
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-23 Thread Manoj Srivastava
On 23 Apr 2006, Miles Bader spake thusly:

 Manoj Srivastava [EMAIL PROTECTED] writes:
 I read it. I still think that my answer suffices: Put your
 pipeline in a script, and set that to PAGER.

 Your answer doesn't suffice, because it's not what people expect
 -- PAGER has historically (for a _long_ time) supported arguments
 being specified

Nothing in what I said preclues specifying arguments.
__ echo $PAGER
less -ciM

None of this applies to pipelines, which must either have a
 file name, or - for stdin.  Arguments are a different beastie for
 general pipelines.

 (and I guess in practice it was usually used an argument to popen),
 so that's what users have come to expect, and what other
 distros/OSes support in the vast majority of cases.

Irrelevant to the current discussion.

 Changing it now would be very unfriendly to users, and morever there
 seems to be little or no benefit to doing so (really, what exactly
 would you gain?).

Please go back, and re-read what I have said:

_ cat somefile.txt | less -ciM
_ less -ciM  somefile.txt

Both work, but:

_ cat somefile.txt | fileterA | filterB - 
   may work,
_ fileterA | filterB -  somefile.txt
   does not.

manoj
-- 
Hedonist for hire... no job too easy!
Manoj Srivastava   [EMAIL PROTECTED]  http://www.debian.org/%7Esrivasta/
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-22 Thread Manoj Srivastava
On 21 Apr 2006, Loïc Minier spake thusly:

 Hi,

 On Fri, Apr 21, 2006, Manoj Srivastava wrote:
 Here is my solution for using vim + script as a pager; similar
 mechanisms can be used to use plain vim as PAGER as well.

 Nice, I suggest filing a new bug against vim to propose this as a
 contrib script, or to ship it as vim-pager wrapper.

 #363250 is more about documenting the semantics of $PAGER (whether
 it can uses sh syntax, or whether it's a command with parameters
 separated with spaces), to be documented in man man, and/or policy.


Err, we should define how it behaves, not what is inside
 it. As long as one can pipe things to $PAGER or use $PAGER on a file,
 what it contains should not matter.

The safe bet would be for $PAGER to be a script or executable
 which can handle reading from file or STDIN, like proper UNIX
 programs.

To make life easier for people writing programs which deal
 with $PAGER, and  are using the POSIX exce* set of calls, one may
 constrain $PAGER to path [arg [arg ..]], with no pipes or other
 shell meta-characters.

manoj
-- 
'Tis not too late to seek a newer world. Alfred, Lord Tennyson
Manoj Srivastava   [EMAIL PROTECTED]  http://www.debian.org/%7Esrivasta/
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-22 Thread Loïc Minier
On Sat, Apr 22, 2006, Manoj Srivastava wrote:
  #363250 is more about documenting the semantics of $PAGER (whether
  it can uses sh syntax, or whether it's a command with parameters
  separated with spaces), to be documented in man man, and/or policy.
 Err, we should define how it behaves, not what is inside
  it. As long as one can pipe things to $PAGER or use $PAGER on a file,
  what it contains should not matter.

 Please read again the original report, the submitter wanted to have a
 pipe of commands in $PAGER, he said this worked in the past, and works
 on other distros.  He did not want to simply be able to use $PAGER on a
 file or to pipe stuff to $PAGER, he wanted $PAGER to be parsed as a
 pipeline, as in sh syntax.

 The safe bet would be for $PAGER to be a script or executable
  which can handle reading from file or STDIN, like proper UNIX
  programs.

 This is an independent problem  First, we already have one layer of sh
 scripting with the sensible-pager program, and it would be a good
 enough place to handle the cases you mention, would people and programs
 use sensible-pager as the default pager.  Second, this doesn't define
 what should happen when someone redefines $PAGER: what if one user
 wants $PAGER to be a pipeline?

 To make life easier for people writing programs which deal
  with $PAGER, and  are using the POSIX exce* set of calls, one may
  constrain $PAGER to path [arg [arg ..]], with no pipes or other
  shell meta-characters.

 Yes, I think this is safe, but I'd go even further and propose the
 following:
 A/ handling of pager in programs
 1/ programs should default to sensible-pager
 2/ programs should offer a way to override the default pager in some
way, for example via an environment variable called program_PAGER,
or a configuration setting -- it might even be better for them to
avoid handling $PAGER, see 1/

 B/ user configuration of the pager
 When defined, $PAGER is a sh pipeline which reads its data from stdin.


 This is with the intent of moving any logic for deciding of the best
 pager to run out of each individual program requiring a pager, exactly
 as in the sensible-browser case, which can consider $BROWSER, $DISPLAY,
 x-www-browser, and www-browser to find a sensible browser.

 Manoj, how would this fit in policy?

-- 
Loïc Minier [EMAIL PROTECTED]
You can gtk_main_run, but you can't gtk_widget_hide. --danw, 19-jul-04


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-22 Thread Manoj Srivastava
On 22 Apr 2006, Loïc Minier spake thusly:

 On Sat, Apr 22, 2006, Manoj Srivastava wrote:
 363250 is more about documenting the semantics of $PAGER (whether
 it can uses sh syntax, or whether it's a command with parameters
 separated with spaces), to be documented in man man, and/or
 policy.
 Err, we should define how it behaves, not what is inside it. As
 long as one can pipe things to $PAGER or use $PAGER on a file, what
 it contains should not matter.

 Please read again the original report, the submitter wanted to have
 a pipe of commands in $PAGER, he said this worked in the past, and
 works on other distros.  He did not want to simply be able to use
 $PAGER on a file or to pipe stuff to $PAGER, he wanted $PAGER to be
 parsed as a pipeline, as in sh syntax.

I read it. I still think that my answer suffices: Put your
 pipeline in a script, and set that to PAGER.  If I have a file that I
 want the users to see, as opposed to output I create, how can I
 figure out how to use the example in the initial bug report?


There are two use cases that any pager directive must address:

1) The program is going to generate output which must be piped to
   a pager
2) The program want to send a file to the user.


 The safe bet would be for $PAGER to be a script or executable
 which can handle reading from file or STDIN, like proper UNIX
 programs.

 This is an independent problem First, we already have one layer of
 sh scripting with the sensible-pager program, and it would be a good
 enough place to handle the cases you mention, would people and
 programs use sensible-pager as the default pager.  Second, this
 doesn't define what should happen when someone redefines $PAGER:
 what if one user wants $PAGER to be a pipeline?

If the PAGER semantics are defined to state that whatever you
 change it to must work in the two use cases, then programs that use
 PAGER directly would not have an issue.

But perhaps the policy for Debian should be for programs to
 ignore PAGER and just use sensible pager, where all the logic for
 dealing with pager goes in. I still don't see how sensible pager can
 handle the pipeline vs the non-pipeline case, though.

Barring that, policy would have to be that programs can' t
 user PAGER to work with use case 2, and must be guilty of an useless
 use of cat to pipe data to STDIN for PAGER.

Neither one of these is a happy prospect.

 To make life easier for people writing programs which deal
 with $PAGER, and  are using the POSIX exce* set of calls, one may
 constrain $PAGER to path [arg [arg ..]], with no pipes or other
 shell meta-characters.

 Yes, I think this is safe, but I'd go even further and propose the
 following:
 A/ handling of pager in programs
 1/ programs should default to sensible-pager
 2/ programs should offer a way to override the default pager in some
 way, for example via an environment variable called program_PAGER,
 or a configuration setting -- it might even be better for them to
 avoid handling $PAGER, see 1/

PAGER has the benefit of being long standardized, and if we do
 not use PAGER, we are breaking user expectations.

What is the benefit of creating a PAGER clone?

 B/ user configuration of the pager When defined, $PAGER is a sh
 pipeline which reads its data from stdin.

How do programs present a text file to the user using a PAGER,
 then? cat file.txt | $PAGER?

 This is with the intent of moving any logic for deciding of the best
 pager to run out of each individual program requiring a pager,
 exactly as in the sensible-browser case, which can consider
 $BROWSER, $DISPLAY, x-www-browser, and www-browser to find a
 sensible browser.

In other words, ignore $PAGER, use sensible-pager all over,
 and let that handle it?

 Manoj, how would this fit in policy?

Not, unless these questions are answered, and we actually have
 a working implementation.

manoj
-- 
Liberty don't work as good in practice as it does in speeches. The
Best of Will Rogers
Manoj Srivastava   [EMAIL PROTECTED]  http://www.debian.org/%7Esrivasta/
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-22 Thread Loïc Minier
Hi,

On Sat, Apr 22, 2006, Manoj Srivastava wrote:
  Please read again the original report, the submitter wanted to have
  a pipe of commands in $PAGER, he said this worked in the past, and
  works on other distros.  He did not want to simply be able to use
  $PAGER on a file or to pipe stuff to $PAGER, he wanted $PAGER to be
  parsed as a pipeline, as in sh syntax.
 I read it. I still think that my answer suffices: Put your
  pipeline in a script, and set that to PAGER.  If I have a file that I
  want the users to see, as opposed to output I create, how can I
  figure out how to use the example in the initial bug report?

 The point is that it used to work with a pipeline, as explained by the
 submitter, in the past and now it doesn't work, I later replied that it
 was never said that the content of $PAGER was following sh syntax.

 You propose a (valid) workaround, I propose to fix the policy, and to
 even actually support sh syntax (as this is trivial to do from
 sensible-pager).

 There are two use cases that any pager directive must address:
 1) The program is going to generate output which must be piped to
a pager
 2) The program want to send a file to the user.

 I agree that these use cases need to be supported.

 If the PAGER semantics are defined to state that whatever you
  change it to must work in the two use cases, then programs that use
  PAGER directly would not have an issue.

 But, if I follow you, this would prevent pipelines.

 But perhaps the policy for Debian should be for programs to
  ignore PAGER and just use sensible pager, where all the logic for
  dealing with pager goes in. I still don't see how sensible pager can
  handle the pipeline vs the non-pipeline case, though.

 Yes, I believe the policy should be changed in this way, and as I
 proposed.

 Look at the code of sensible-pager, it will call $PAGER if
 sensible-pager is called without any argument, and $PAGER filename
 if it's called as sensible-pager filename.  This seems good enough
 for me; if people set $PAGER to a pipeline, they might suffer from
 problems for the second case, but we can work on that.

 Barring that, policy would have to be that programs can' t
  user PAGER to work with use case 2, and must be guilty of an useless
  use of cat to pipe data to STDIN for PAGER.

 Yes, if you mean that permitting pipelines forbids programs to call
 $PAGER $file, I agree with you.  There are multiple ways to solve
 this, but I think that whatever way is chosen should be implemented in
 sensible-pager, and we can even change our mind later, and fix only
 sensible-pager.  The contract of sensible-pager with respect to Debian
 programs should be to offer two modes of operation, the pipe of data on
 stdin mode, and the pass a file on the command line mode (matching your
 use cases 1 and 2).

 PAGER has the benefit of being long standardized, and if we do
  not use PAGER, we are breaking user expectations.
 What is the benefit of creating a PAGER clone?

 sensible-pager is not a PAGER clone, it permits us to enhance the
 handling of $PAGER in a single place instead of changing every program
 in Debian that wants to send something to $PAGER.

 Have a look at the sensible-browser code, and at #351901 to convince
 you that there are useful things that can be done in such a nice place
 as sensible-pager.  Eg, we might send data to yelp if running under
 GNOME.

  B/ user configuration of the pager When defined, $PAGER is a sh
  pipeline which reads its data from stdin.
 How do programs present a text file to the user using a PAGER,
  then? cat file.txt | $PAGER?

 That's a question for sensible-pager to solve, but one way is to use
 cat $@ | $PAGER indeed.

  This is with the intent of moving any logic for deciding of the best
  pager to run out of each individual program requiring a pager,
  exactly as in the sensible-browser case, which can consider
  $BROWSER, $DISPLAY, x-www-browser, and www-browser to find a
  sensible browser.
 In other words, ignore $PAGER, use sensible-pager all over,
  and let that handle it?

 Yes.

 Not, unless these questions are answered, and we actually have
  a working implementation.

 Well the current implementation works, except for pipelines.  :)

   Bye,
-- 
Loïc Minier [EMAIL PROTECTED]
You can gtk_main_run, but you can't gtk_widget_hide. --danw, 19-jul-04


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-21 Thread Manoj Srivastava
Hi,

Here is my solution for using vim + script as a pager; similar
 mechanisms can be used to use plain vim as PAGER as well.

,
| #!/bin/bash
| # Shell script to start Vim with less.vim.
| # Read stdin if no arguments were given.
| 
| #VRUNTIME=/usr/share/vim/vim64/
| VRUNTIME=$HOME/etc/vim/
| if test $# = 0; then
|   vim -c so $VRUNTIME/macros/less.vim -
| else
|   vim -c so $VRUNTIME/macros/less.vim $@
| fi
`

I take no credit for the vim script or the idea, but it seems
 to work pretty well. Note how the vim invocation changes based on
 whether the PAGER is being used as a filter or not.

manoj
-- 
When in doubt, use brute force. Ken Thompson
Manoj Srivastava   [EMAIL PROTECTED]  http://www.debian.org/%7Esrivasta/
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-21 Thread Loïc Minier
Hi,

On Fri, Apr 21, 2006, Manoj Srivastava wrote:
 Here is my solution for using vim + script as a pager; similar
  mechanisms can be used to use plain vim as PAGER as well.

 Nice, I suggest filing a new bug against vim to propose this as a
 contrib script, or to ship it as vim-pager wrapper.

 #363250 is more about documenting the semantics of $PAGER (whether it
 can uses sh syntax, or whether it's a command with parameters separated
 with spaces), to be documented in man man, and/or policy.

 There's also another bug discussed in #363250 which is about nview's
 view not working correctly, but I didn't look into that.

   Bye,

-- 
Loïc Minier [EMAIL PROTECTED]
You can gtk_main_run, but you can't gtk_widget_hide. --danw, 19-jul-04


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-21 Thread James Vega
On Fri, Apr 21, 2006 at 08:36:10AM -0500, Manoj Srivastava wrote:
 Hi,
 
 Here is my solution for using vim + script as a pager; similar
  mechanisms can be used to use plain vim as PAGER as well.
 
[snip script]

There is already a less.sh that does this, which is in the same
directory (/usr/share/vim/vimcurrent/macros) as less.vim.

James
-- 
GPG Key: 1024D/61326D40 2003-09-02 James Vega [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-20 Thread Steve Langasek
On Thu, Apr 20, 2006 at 12:05:16AM -0500, Manoj Srivastava wrote:
  I expect to be able to pipe stuff to $PAGER, or invoke $PAGER
  on a text file, like so:

  % cat~/.bash_profile | $PAGER
  % $PAGER ~/.bash_profile

  That seems to be an awfully user-specific expectation, given that
  you can't assume that PAGER is set *at all* by default.

 Err, if the PAGER is empty, default it to more.  What does
  that have to do with the price of tea in china?

$ echo $PAGER

$ $PAGER tea\ in\ china
bash: ./tea in china: Permission denied
$

If $PAGER isn't set, then you can't very well use it as you describe, can
you?

'Course, you can use the sensible-pager command this way.  And
sensible-pager does expect that $PAGER, if set, can take file names as
appended arguments.  So I guess your use cases do model the defacto policy
for use of $PAGER.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


signature.asc
Description: Digital signature


Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-20 Thread Manoj Srivastava
On 20 Apr 2006, Steve Langasek spake thusly:

 On Thu, Apr 20, 2006 at 12:05:16AM -0500, Manoj Srivastava wrote:
 I expect to be able to pipe stuff to $PAGER, or invoke $PAGER
 on a text file, like so:

 % cat~/.bash_profile | $PAGER
 % $PAGER ~/.bash_profile

 That seems to be an awfully user-specific expectation, given that
 you can't assume that PAGER is set *at all* by default.

 Err, if the PAGER is empty, default it to more.  What does
 that have to do with the price of tea in china?

 $ echo $PAGER

 $ $PAGER tea\ in\ china
 bash: ./tea in china: Permission denied
 $

 If $PAGER isn't set, then you can't very well use it as you
 describe, can you?

 'Course, you can use the sensible-pager command this way.  And
 sensible-pager does expect that $PAGER, if set, can take file names
 as appended arguments.  So I guess your use cases do model the
 defacto policy for use of $PAGER.

The discussion here is about what the expectation are for the
 contents of #PAGER, if it  exists, not how to correctly use
 $PAGER. You are throwing red herrings and derailing the discussion,
 please stop it. Specifically, the issue started as how to use vim as
 PAGER, and lead to what the semantics of the PAGER were.  What to do
 when PAGER does not exist are orthogonal.

My statements attempt to provide an expectation of the use
 cases a PAGER variable setting ought to be able to implement.  It is
 relevant to deciding how to set $PAGER, your mail adds nothing to the
 topic. 

If you truly want to discuss how to actually use $PAGER
 correctly, start your own topic, and don't hijack this thread.

manoj

-- 
I like your SNOOPY POSTER!!
Manoj Srivastava   [EMAIL PROTECTED]  http://www.debian.org/%7Esrivasta/
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-19 Thread Miles Bader
Henning Makholm [EMAIL PROTECTED] writes:
 Policy does not really specify how to handle $PAGER and its friends,
 but I have always assumed that it was OK for a package to do things
 like (error checking omitted for clarity):
...
 In that case, PAGER has to be set to just the name of a program, with
 no parameters or metacharacters embedded.

I don't think this agrees very well with historical practice though --
I've had PAGER set to something like less -s for _decades_, and never
had any problems, on more unix variants than I care to think about...

If a program doesn't allow this, I think it's buggy.

If debian specifies PAGER more exactly, the specification should _at
least_ allow for space-separated options and require PATH searching.

-Miles
-- 
Do not taunt Happy Fun Ball.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-19 Thread Loïc Minier
On Wed, Apr 19, 2006, Henning Makholm wrote:
 Policy does not really specify how to handle $PAGER and its friends

 Feel free to clone against policy, I agree that it would be cleaner to
 define how it should be called in policy (but it would still be nice to
 have man man document how $PAGER is invoked too, or link to policy).

-- 
Loïc Minier [EMAIL PROTECTED]
You can gtk_main_run, but you can't gtk_widget_hide. --danw, 19-jul-04


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-19 Thread Manoj Srivastava
On 18 Apr 2006, Loïc Minier uttered the following:

 reassign 363250 man retitle 363250 Please clarify how $PAGER is
 invoked in the man manpage stop

 Hi,

 On Tue, Apr 18, 2006, Rohan Dhruva wrote:
 export PAGER=col -b | view -c 'set ft=man nomod nolist
 titlestring=MANPAGE' -

 This $PAGER definition makes the assumption that it's passed to sh
 -c (you use pipes and quotes).  The man manpage doesn't say that
 $PAGER is passed to sh -c, it says it will use $PAGER as the program
 to display the manual page.

 I suggest you use: export PAGER=sh -c \col -b | view -c 'set
 ft=man nomod nolist titlestring=MANPAGE' -\

 which explicitely calls sh -c to handle pipes and quotes in the
 expected way.

I expect to be able to pipe stuff to $PAGER, or invoke $PAGER
 on a text file, like so:

 % cat~/.bash_profile | $PAGER
 % $PAGER ~/.bash_profile

manoj
-- 
Be regular and orderly in your life, so that you may be violent and
original in your work.  -- Flaubert
Manoj Srivastava   [EMAIL PROTECTED]  http://www.debian.org/%7Esrivasta/
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-19 Thread Steve Langasek
On Wed, Apr 19, 2006 at 09:12:04AM -0500, Manoj Srivastava wrote:
  which explicitely calls sh -c to handle pipes and quotes in the
  expected way.

 I expect to be able to pipe stuff to $PAGER, or invoke $PAGER
  on a text file, like so:

  % cat~/.bash_profile | $PAGER
  % $PAGER ~/.bash_profile

That seems to be an awfully user-specific expectation, given that you can't
assume that PAGER is set *at all* by default.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


signature.asc
Description: Digital signature


Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-19 Thread Manoj Srivastava
On 19 Apr 2006, Steve Langasek uttered the following:

 On Wed, Apr 19, 2006 at 09:12:04AM -0500, Manoj Srivastava wrote:
 which explicitely calls sh -c to handle pipes and quotes in the
 expected way.

 I expect to be able to pipe stuff to $PAGER, or invoke $PAGER
 on a text file, like so:

 % cat~/.bash_profile | $PAGER
 % $PAGER ~/.bash_profile

 That seems to be an awfully user-specific expectation, given that
 you can't assume that PAGER is set *at all* by default.

Err, if the PAGER is empty, default it to more.  What does
 that have to do with the price of tea in china?

If I, as a user, set PAGER such that it meets the above
 expectations, I expect other programs to work with my setting. I do
 not expect other programs on my system to have more stringent
 requirements than the ones given above.

Having PAGER set to a value that can have stuff piped to it,
 to can be invoked on files, seems a reasonable requirement.

manoj
-- 
Long life is in store for you.
Manoj Srivastava   [EMAIL PROTECTED]  http://www.debian.org/%7Esrivasta/
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-18 Thread Jon Dowland
At 1145360089 past the epoch, Rohan Dhruva wrote:
 # Set vim as the man pager
 export PAGER=col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' 
 -

 In those systems, it displays the man page properly in vim with full
 color. However, on using the same line on sid, the error given is 
snip

I have a similar problem with setting $EDITOR to something like 
vim -gf: some programs pass this through to the shell, others look for
a binary named 'vim -gf' in $PATH.

Which is the correct behaviour and where is that defined, if at all?


-- 
Jon Dowland
http://alcopop.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-18 Thread Loïc Minier
reassign 363250 man
retitle 363250 Please clarify how $PAGER is invoked in the man manpage
stop

Hi,

On Tue, Apr 18, 2006, Rohan Dhruva wrote:
 export PAGER=col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' 
 -

 This $PAGER definition makes the assumption that it's passed to sh -c
 (you use pipes and quotes).  The man manpage doesn't say that $PAGER is
 passed to sh -c, it says it will use $PAGER as the program to display
 the manual page.

 I suggest you use:
export PAGER=sh -c \col -b | view -c 'set ft=man nomod nolist 
titlestring=MANPAGE' -\

 which explicitely calls sh -c to handle pipes and quotes in the
 expected way.

 You may also use your own /usr/local/bin/pager with:
#!/bin/sh

col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -
 and with PAGER=/usr/local/bin/pager.

 I am reassigning to man for the man manpage to be clarified with
 respect to the way $PAGER is called.

   Bye,
-- 
Loïc Minier [EMAIL PROTECTED]
You can gtk_main_run, but you can't gtk_widget_hide. --danw, 19-jul-04


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Processed: Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-18 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

 reassign 363250 man
Bug#363250: general: Custom PAGER gives error on sid, but works on sarge
Warning: Unknown package 'man'
Bug reassigned from package `general' to `man'.

 retitle 363250 Please clarify how $PAGER is invoked in the man manpage
Bug#363250: general: Custom PAGER gives error on sid, but works on sarge
Warning: Unknown package 'man'
Changed Bug title.

 stop
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-18 Thread Loïc Minier
reassign 363250 man-db
retitle 363250 please clarify in the man manpage how $PAGER is invoked
stop

Hi,

On Tue, Apr 18, 2006, Rohan Dhruva wrote:
 I suggest you use:
 export PAGER=sh -c \col -b | view -c 'set ft=man nomod nolist
 titlestring=MANPAGE' -\
 That didnt work.

 It works here, under zsh as well as under bash.  Check with a new user.
 Are you using aliases?

 man: command exited with status 256: /usr/bin/zsoelim /tmp/zmanqn0tzd | /usr/
 bin/tbl | /usr/bin/nroff -mandoc -rLL=89n -rLT=89n -Tutf8 | sh -c col -b | 
 view
 -c 'set ft=man nomod nolist titlestring=MANPAGE' -

 I don't see anything similar being called on my system.

 I suggest you run something like:
strace -o foo.strace -f -e execve -e signal= -q -v -s 200 man vim
 and attach the resulting foo.strace (warning: contains sensitive
 information).

 Also, please mention the version of man you are using (dpkg -l man-db),
 and your environment (env  foo.env, warning: contains sensitive
 information).

   Bye,

-- 
Loïc Minier [EMAIL PROTECTED]
You can gtk_main_run, but you can't gtk_widget_hide. --danw, 19-jul-04


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-18 Thread Rohan Dhruva
On 4/18/06, Loïc Minier [EMAIL PROTECTED] wrote:
reassign 363250 manretitle 363250 Please clarify how $PAGER is invoked in the man manpagestopHi,On Tue, Apr 18, 2006, Rohan Dhruva wrote: export PAGER=col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -
 This $PAGER definition makes the assumption that it's passed to sh -c (you use pipes and quotes).The man manpage doesn't say that $PAGER is passed to sh -c, it says it will use $PAGER as the program to display
 the manual page. I suggest you use:export PAGER=sh -c \col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -\That didnt work. [EMAIL PROTECTED]
 ~]$ export PAGER=sh -c \col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -\[EMAIL PROTECTED] ~]$ echo $PAGERsh -c col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -
[EMAIL PROTECTED] ~]$ man vimReformatting vim(1), please wait...view: -s option is only applicable to ex.man: command exited with status 256: /usr/bin/zsoelim /tmp/zmanqn0tzd | /usr/bin/tbl | /usr/bin/nroff -mandoc -rLL=89n -rLT=89n -Tutf8 | sh -c col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -
[EMAIL PROTECTED] ~]$ which explicitely calls sh -c to handle pipes and quotes in the
 expected way. You may also use your own /usr/local/bin/pager with:#!/bin/shcol -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' - and with PAGER=/usr/local/bin/pager.
 I am reassigning to man for the man manpage to be clarified with respect to the way $PAGER is called.Which did not work either. [EMAIL PROTECTED] ~]$ cat /usr/local/bin/vipager#!/bin/sh
col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -[EMAIL PROTECTED] ~]$ export PAGER=/usr/local/bin/vipager[EMAIL PROTECTED] ~]$ echo $PAGER/usr/local/bin/vipager[EMAIL PROTECTED] ~]$ man manReformatting man(1), please wait...
view: -s option is only applicable to ex.man: command exited with status 256: /usr/bin/zsoelim /tmp/zmansyaLax | /usr/bin/tbl | /usr/bin/nroff -mandoc -rLL=89n -rLT=89n -Tutf8 | /usr/local/bin/vipager[EMAIL PROTECTED]
 ~]$Thanks for the help, please keep the ideas coming :)Rohan.-- Rohan DhruvaProud GNU/Linux user.Windows: Where do you want to go today?Linux: Where do you want to go tomorrow?
FreeBSD: Are you guys coming or what?http://www.dhruva.be/


Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-18 Thread Rohan Dhruva
Also, IMHO, topic is a bit wrong .. this bug applies to all man pages, not only the man manpage. Regards,-- Rohan DhruvaProud GNU/Linux user.Windows: Where do you want to go today?
Linux: Where do you want to go tomorrow?FreeBSD: Are you guys coming or what?http://www.dhruva.be/


Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-18 Thread Rohan Dhruva
retitle 363250 Please clarify how $PAGER is invoked for any manpage.stopSorry for the spam, I did not know I can retitle bugs myself.-- Rohan DhruvaProud GNU/Linux user.Windows: Where do you want to go today?
Linux: Where do you want to go tomorrow?FreeBSD: Are you guys coming or what?http://www.dhruva.be/


Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-18 Thread Rohan Dhruva
On 4/18/06, Loïc Minier [EMAIL PROTECTED] wrote:
 reassign 363250 man-db
 retitle 363250 please clarify in the man manpage how $PAGER is invoked
 stop

 Hi,

 On Tue, Apr 18, 2006, Rohan Dhruva wrote:
  I suggest you use:
  export PAGER=sh -c \col -b | view -c 'set ft=man nomod nolist
  titlestring=MANPAGE' -\
  That didnt work.

  It works here, under zsh as well as under bash.  Check with a new user.
  Are you using aliases?

test is an absolutely new freshly created user.
[EMAIL PROTECTED]:~$ echo $PAGER
sh -c col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -
[EMAIL PROTECTED]:~$ man vim
Reformatting vim(1), please wait...
view: -s option is only applicable to ex.
man: command exited with status 256: /usr/bin/zsoelim /tmp/zmanujhMpV
| /usr/bin/tbl | /usr/bin/nroff -mandoc -rLL=89n -rLT=89n -Tutf8 | sh
-c col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -
[EMAIL PROTECTED]:~$

  man: command exited with status 256: /usr/bin/zsoelim /tmp/zmanqn0tzd | 
  /usr/
  bin/tbl | /usr/bin/nroff -mandoc -rLL=89n -rLT=89n -Tutf8 | sh -c col -b | 
  view
  -c 'set ft=man nomod nolist titlestring=MANPAGE' -

  I don't see anything similar being called on my system.

  I suggest you run something like:
 strace -o foo.strace -f -e execve -e signal= -q -v -s 200 man vim
  and attach the resulting foo.strace (warning: contains sensitive
  information).

Attached file -- man.strace


  Also, please mention the version of man you are using (dpkg -l man-db),
  and your environment (env  foo.env, warning: contains sensitive
  information).

[EMAIL PROTECTED] ~]$ dpkg -l man-db
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name  Version   Description
+++-=-=-==
ii  man-db2.4.3-3   The on-line manual pager

Attached file - man.env

Thanks for the help, in case any more information is needed, please
dont hesitate to ask. Also, the alias'es I use the are same as the
ones in other distros, including sarge. I am attaching my .bashrc too,
for reference.

Regards,
Rohan.
--
Rohan Dhruva
Proud GNU/Linux user.
Windows: Where do you want to go today?
Linux: Where do you want to go tomorrow?
FreeBSD: Are you guys coming or what?
http://www.dhruva.be/


bashrc
Description: Binary data


man.env
Description: Binary data


man.strace
Description: Binary data


Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-18 Thread Adeodato Simó
* Rohan Dhruva [Tue, 18 Apr 2006 22:30:29 +0530]:

 view: -s option is only applicable to ex.

  % /usr/sbin/update-alternatives --display view | grep current

-- 
Adeodato Simó dato at net.com.org.es
Debian Developer  adeodato at debian.org
 
— Quieto parao. Usted no está en condiciones de ir a ningún sitio.
  Dígame dónde está la muchacha y yo iré a por ella.
— No sé dónde está.
— Le voy a pedir que sea algo más específico.
-- Carlos Ruiz Zafón, “La sombra del viento”


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-18 Thread Loïc Minier
On Tue, Apr 18, 2006, Adeodato Simó wrote:
  view: -s option is only applicable to ex.
   % /usr/sbin/update-alternatives --display view | grep current

 (I redirected the discussion to the bug report for the second time;
 FYI, it was nview.)

-- 
Loïc Minier [EMAIL PROTECTED]
You can gtk_main_run, but you can't gtk_widget_hide. --danw, 19-jul-04


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

2006-04-18 Thread Henning Makholm
Scripsit Loïc Minier [EMAIL PROTECTED]

  I suggest you use:
 export PAGER=sh -c \col -b | view -c 'set ft=man nomod nolist 
 titlestring=MANPAGE' -\

  which explicitely calls sh -c to handle pipes and quotes in the
  expected way.

Policy does not really specify how to handle $PAGER and its friends,
but I have always assumed that it was OK for a package to do things
like (error checking omitted for clarity):

if( fork() == 0 ) {
char *pager = getenv(PAGER);
if( pager == NULL ) pager = /usr/bin/pager ;
execlp(getenv(PAGER),filename,NULL);
}
wait(NULL);

In that case, PAGER has to be set to just the name of a program, with
no parameters or metacharacters embedded.

  You may also use your own /usr/local/bin/pager with:
 #!/bin/sh

 col -b | view -c 'set ft=man nomod nolist titlestring=MANPAGE' -
  and with PAGER=/usr/local/bin/pager.

I think that is the more robust way for a user to do such things, and
the way that should be documented.

  I am reassigning to man for the man manpage to be clarified with
  respect to the way $PAGER is called.

Is this a man-specific problem? I would say it is a general problem of
policy being vague.

-- 
Henning Makholm   There were few families that didn't have at least
 one hopeful who, from Reading Day on, was the great
   hope because of the way he handled his trisyllabics.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]