all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Janitorial issues: Man-getpage-in-background
@ 2003-03-05 10:54 Kai Großjohann
  2003-03-06 19:29 ` Richard Stallman
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Kai Großjohann @ 2003-03-05 10:54 UTC (permalink / raw)


The function Man-getpage-in-background uses two different ways to set
environment variables:

(a) (let ((process-environment (copy-sequence process-environment)))
      (setenv "FOO" "bar")
      ...)

(b) (let ((process-environment (cons "FOO=bar" process-environment)))
      ...)

It looks really strange to see them both in the same function...

Okay to unify?  (I'd choose (a) unless there are objections.)
-- 
A preposition is not a good thing to end a sentence with.

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

* Re: Janitorial issues: Man-getpage-in-background
  2003-03-05 10:54 Janitorial issues: Man-getpage-in-background Kai Großjohann
@ 2003-03-06 19:29 ` Richard Stallman
  2003-03-06 19:57 ` Kevin Rodgers
  2003-03-10 17:40 ` Stefan Monnier
  2 siblings, 0 replies; 9+ messages in thread
From: Richard Stallman @ 2003-03-06 19:29 UTC (permalink / raw)
  Cc: emacs-devel

    (a) (let ((process-environment (copy-sequence process-environment)))
	  (setenv "FOO" "bar")
	  ...)

    (b) (let ((process-environment (cons "FOO=bar" process-environment)))
	  ...)

    It looks really strange to see them both in the same function...

    Okay to unify?  (I'd choose (a) unless there are objections.)

Ok.

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

* Re: Janitorial issues: Man-getpage-in-background
  2003-03-05 10:54 Janitorial issues: Man-getpage-in-background Kai Großjohann
  2003-03-06 19:29 ` Richard Stallman
@ 2003-03-06 19:57 ` Kevin Rodgers
  2003-03-07 17:53   ` Kai Großjohann
  2003-03-10 17:40 ` Stefan Monnier
  2 siblings, 1 reply; 9+ messages in thread
From: Kevin Rodgers @ 2003-03-06 19:57 UTC (permalink / raw)


Kai Großjohann wrote:

> The function Man-getpage-in-background uses two different ways to set
> environment variables:
> 
> (a) (let ((process-environment (copy-sequence process-environment)))
>       (setenv "FOO" "bar")
>       ...)
> 
> (b) (let ((process-environment (cons "FOO=bar" process-environment)))
>       ...)
> 
> It looks really strange to see them both in the same function...
> 
> Okay to unify?  (I'd choose (a) unless there are objections.)

Objection!  (I've always wanted to say that :-)

On the basis of unnecessary cons'ing.

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

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

* Re: Janitorial issues: Man-getpage-in-background
  2003-03-06 19:57 ` Kevin Rodgers
@ 2003-03-07 17:53   ` Kai Großjohann
  2003-03-08 23:03     ` Richard Stallman
  2003-03-11 18:25     ` Stefan Monnier
  0 siblings, 2 replies; 9+ messages in thread
From: Kai Großjohann @ 2003-03-07 17:53 UTC (permalink / raw)


Kevin Rodgers <kevin.rodgers@ihs.com> writes:

> Kai Großjohann wrote:
>
>> The function Man-getpage-in-background uses two different ways to set
>> environment variables:
>> (a) (let ((process-environment (copy-sequence process-environment)))
>>       (setenv "FOO" "bar")
>>       ...)
>> (b) (let ((process-environment (cons "FOO=bar" process-environment)))
>>       ...)
>> It looks really strange to see them both in the same function...
>> Okay to unify?  (I'd choose (a) unless there are objections.)
>
> Objection!  (I've always wanted to say that :-)
>
> On the basis of unnecessary cons'ing.

It seems you do not object to the unification, just to my choice of
(a)?

It seems that setenv does quite a bit of work in addition to consing
stuff onto process-environment.  I'm not sure it is a good idea to
skip using setenv.  Wasn't there a discussion about having setenv do
something additional to frobbing process-environment?  It was some
moons ago.  I'm not talking about the multibyte issue that was
recently mentioned.  Hmmm...
-- 
A preposition is not a good thing to end a sentence with.

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

* Re: Janitorial issues: Man-getpage-in-background
  2003-03-07 17:53   ` Kai Großjohann
@ 2003-03-08 23:03     ` Richard Stallman
  2003-03-09 13:46       ` Kai Großjohann
  2003-03-11 18:25     ` Stefan Monnier
  1 sibling, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2003-03-08 23:03 UTC (permalink / raw)
  Cc: emacs-devel

    > On the basis of unnecessary cons'ing.

I doubt the amount of consing is significant enough
*in this context* to be an important factor in the decision.

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

* Re: Janitorial issues: Man-getpage-in-background
  2003-03-08 23:03     ` Richard Stallman
@ 2003-03-09 13:46       ` Kai Großjohann
  0 siblings, 0 replies; 9+ messages in thread
From: Kai Großjohann @ 2003-03-09 13:46 UTC (permalink / raw)


Richard Stallman <rms@gnu.org> writes:

>     > On the basis of unnecessary cons'ing.
>
> I doubt the amount of consing is significant enough
> *in this context* to be an important factor in the decision.

OK.  I've now used (setenv "GROFF_NO_SGR" "1") instead of let-binding
process-environment.

This brings up a new question: GROFF_NO_SGR is only set when
call-process is used to start man, it is not set when start-process is
used.

Is this intentional?
-- 
A preposition is not a good thing to end a sentence with.

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

* Re: Janitorial issues: Man-getpage-in-background
  2003-03-05 10:54 Janitorial issues: Man-getpage-in-background Kai Großjohann
  2003-03-06 19:29 ` Richard Stallman
  2003-03-06 19:57 ` Kevin Rodgers
@ 2003-03-10 17:40 ` Stefan Monnier
  2 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2003-03-10 17:40 UTC (permalink / raw)
  Cc: emacs-devel

> The function Man-getpage-in-background uses two different ways to set
> environment variables:
> 
> (a) (let ((process-environment (copy-sequence process-environment)))
>       (setenv "FOO" "bar")
>       ...)
> 
> (b) (let ((process-environment (cons "FOO=bar" process-environment)))
>       ...)
> 
> It looks really strange to see them both in the same function...
> 
> Okay to unify?  (I'd choose (a) unless there are objections.)

I'd choose (b) to avoid unnecessary consing (via copying).


	Stefan

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

* Re: Janitorial issues: Man-getpage-in-background
  2003-03-07 17:53   ` Kai Großjohann
  2003-03-08 23:03     ` Richard Stallman
@ 2003-03-11 18:25     ` Stefan Monnier
  2003-03-12 11:57       ` Kai Großjohann
  1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2003-03-11 18:25 UTC (permalink / raw)
  Cc: emacs-devel

> It seems that setenv does quite a bit of work in addition to consing
> stuff onto process-environment.  I'm not sure it is a good idea to
> skip using setenv.  Wasn't there a discussion about having setenv do
> something additional to frobbing process-environment?  It was some
> moons ago.  I'm not talking about the multibyte issue that was
> recently mentioned.  Hmmm...

You're probably referring to the problem of C libraries that
use envvars and whose functions are called by Emacs.


	Stefan

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

* Re: Janitorial issues: Man-getpage-in-background
  2003-03-11 18:25     ` Stefan Monnier
@ 2003-03-12 11:57       ` Kai Großjohann
  0 siblings, 0 replies; 9+ messages in thread
From: Kai Großjohann @ 2003-03-12 11:57 UTC (permalink / raw)


"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:

>> It seems that setenv does quite a bit of work in addition to consing
>> stuff onto process-environment.  I'm not sure it is a good idea to
>> skip using setenv.  Wasn't there a discussion about having setenv do
>> something additional to frobbing process-environment?  It was some
>> moons ago.  I'm not talking about the multibyte issue that was
>> recently mentioned.  Hmmm...
>
> You're probably referring to the problem of C libraries that
> use envvars and whose functions are called by Emacs.

Yes, maybe the discussion was about whether the `setenv' Lisp function
should call the `setenv(2)' C function.

If Man-getpage-in-background ever needs to set $TZ, we would be in
trouble...
-- 
A preposition is not a good thing to end a sentence with.

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

end of thread, other threads:[~2003-03-12 11:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-05 10:54 Janitorial issues: Man-getpage-in-background Kai Großjohann
2003-03-06 19:29 ` Richard Stallman
2003-03-06 19:57 ` Kevin Rodgers
2003-03-07 17:53   ` Kai Großjohann
2003-03-08 23:03     ` Richard Stallman
2003-03-09 13:46       ` Kai Großjohann
2003-03-11 18:25     ` Stefan Monnier
2003-03-12 11:57       ` Kai Großjohann
2003-03-10 17:40 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.