GNU bug report logs - #7782
24.0.50; 24.0.50: set-scroll-bar-mode missing under non-GUI environments

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Tim Cross <theophilusx@HIDDEN>; dated Tue, 4 Jan 2011 12:04:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 7782 <at> debbugs.gnu.org:


Received: (at 7782) by debbugs.gnu.org; 15 Jan 2011 23:30:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 15 18:29:59 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PeFZH-0007ca-7C
	for submit <at> debbugs.gnu.org; Sat, 15 Jan 2011 18:29:59 -0500
Received: from fencepost.gnu.org ([140.186.70.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <theophilusx@HIDDEN>) id 1PeFZE-0007cN-UB
	for 7782 <at> debbugs.gnu.org; Sat, 15 Jan 2011 18:29:57 -0500
Received: from localhost ([127.0.0.1]:35776)
	by fencepost.gnu.org with esmtp (Exim 4.69)
	(envelope-from <theophilusx@HIDDEN>) id 1PeFga-0000Fi-Iq
	for 7782 <at> debbugs.gnu.org; Sat, 15 Jan 2011 18:37:32 -0500
Resent-Message-ID: <19762.12220.298428.361256@HIDDEN>
Resent-Date: Sat, 15 Jan 2011 18:37:32 -0500
Resent-From: Glenn Morris <rgm@HIDDEN>
Resent-To: 7782 <at> debbugs.gnu.org
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	HTML_MESSAGE, RCVD_IN_DNSWL_LOW,
	T_DKIM_INVALID autolearn=ham version=3.3.1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type;
	bh=C0bqZ2bDIpFiqKiS/7/CJib1urH6W44AQ0wB5f61nI4=;
	b=OODRkfltqK+ZZrGkzmzxLpU23XluouBZ+iFSPBVM1xK0iPJ0ZQGD0u+36oJBMP97vK
	7D5beWnDSEPTSgrgT8+IOYng5NwPx8vuQTo+Te4H+8k8FVckYQr11Gv1cpNdmiV9EeQ3
	JBKUVxEStDu+xcb+jvF5XcXGyig4uVh/4xsn0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:content-type;
	b=rNiBbPwDsXZfSFZgr/9KptLpUmoSqe+sknVQ83kH/9LjQvzaJMpXd8xLaF9Ah1FbPA
	Uh/GXRKBfBZvL3GW+ReIqYaMdU+J//7PD6u2hAaYzZxaMPr+8TS71C9gp7g9bvjgVQIL
	dFwibYPi85HkI7nAH5jg+bkPrAv1X+PiWoKmM=
MIME-Version: 1.0
In-Reply-To: <frei8kcqmv.fsf@HIDDEN>
References: <87aajhgjv4.fsf@HIDDEN>
	<frei8kcqmv.fsf@HIDDEN>
Message-ID: <AANLkTim4PHkT_p4a+8sezVUrtJxXiCbMCxSdUadVnJnj@HIDDEN>
Content-Type: multipart/alternative; boundary=90e6ba18199878a68f0499eaf3fa
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Date: Sun, 16 Jan 2011 10:31:32 +1100
From: Tim Cross <theophilusx@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: bug#7782: 24.0.50; 24.0.50: set-scroll-bar-mode missing under
	non-GUI environments
X-Bogosity: no, spamicity=0.016172, v1.1.5
X-Spam-Score: -5.9 (-----)
X-Debbugs-Envelope-To: 7782
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-Date: Sat, 15 Jan 2011 18:29:59 -0500
X-Spam-Score: -5.9 (-----)

--90e6ba18199878a68f0499eaf3fa
Content-Type: text/plain; charset=ISO-8859-1

On Tue, Jan 11, 2011 at 9:58 AM, Glenn Morris <rgm@HIDDEN> wrote:

> Tim Cross wrote:
>
> > According to the documentation for scroll-bar-mode, the way to
> > set/change scroll-bar settings from within elisp code is to use the
> > set-scroll-bar-mode function. However, this function is only defined
> > when run under graphic capable environments, such as X, but not in other
> > environments such as the Linux console.
> >
> > This means that if you don't want your elisp or .emacs to raise an
> > error, you also need to wrap calls to this function inside something
> > like (when display-graphic-p ...). This is not required for other
> > display related functions that depend on an environment requiring
> > support for graphics i.e. tool-bar-mode.
>
> It's not clear to me whether you mean --without-x builds or --with-x
> builds started with -nw (or both), but in either case:
>
> In a with-x build:
> emacs -Q -nw
>
> C-h f tool-bar-mode
>  tool-bar-mode is an interactive compiled Lisp function in `tool-bar.el'.
>
> C-h f set-scroll-bar-mode
>  set-scroll-bar-mode is a compiled Lisp function in `scroll-bar.el'.
>
> (tool-bar-mode 1)             ; no error
>
> (set-scroll-bar-mode 'left)   ; no error
>
>
> In a without-x build, neither tool-bar-mode nor set-scroll-bar-mode is
> defined.
>
> Thus, I see no inconsistency here and don't understand your request.
>

OK, I just tried to re-create the error I was getting and now it isn't
occurring. I have updated emacs since logging the report, but cannot see
anything obvious in the change log that would explain the difference, so not
sure. For the record, here is what I did originally and which does not
repeat the problem now.

1. Built emacs under X with the GTK libs (emacs from bzr 24.0.50).
2. Login under the Linux console and run emacs --debug-init

Originally, I got a backtrace with a void function error for
set-scroll-bar-mode. Fixed this by putting the call inside a when block
which tested for a window-syste of X. However, noticed that this was not an
issue with tool-bar-mode. I could place a direct top-level call to
tool-bar-mode in my .emacs without needing to wrap it in a test. This was
the original inconsistency I observed. i.e. tool-bar-mode was defined but
set-scroll-bar-mode was not when running an emacs built with X under a Linux
console (not an xterm or X console).

C-h f tool-bar-mode returns docs on that function as would be expected.
C-h f set-scroll-bar-mode fails saying the function is not defined.

After removing the when block from my .emacs and just having a top level
call to set-scrolll-bar-mode and restarting emacs just now, I no longer get
the error and backtrace. C-h f returns info on both functions.

I cannot see anything in the change log which would explain why it was not
working and now is, so I guess I must have screwed up somewhere. Sorry for
the noise.

The main reason for the report was I figured we should have consistency -
either *all* graphics display related functions are always defined i.e. as
tool-bar-mode appears to be or *all* of them are defined only for
environments where they maie sense, such as X, but above all, avoid
situations where some appear to be defined and some do not.
Personally, I think they should all be defined regardless of the
environment, even if in many environments, they are just function stubs that
don't actually do anything. This avoids having to remember to put such code
inside tests and to somehow know which such functions are defined in which
environments. For the envrionments I've tested, this does not appear to be
the case for tool-bar-mode and set-scroll-bar-mode, so all appears to be
fine for at least these two cases.

thanks,

Tim

--90e6ba18199878a68f0499eaf3fa
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Tue, Jan 11, 2011 at 9:58 AM, Glenn M=
orris <span dir=3D"ltr">&lt;<a href=3D"mailto:rgm@HIDDEN">rgm@HIDDEN</a>&=
gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 =
0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Tim Cross wrote:<br>
<br>
&gt; According to the documentation for scroll-bar-mode, the way to<br>
&gt; set/change scroll-bar settings from within elisp code is to use the<br=
>
&gt; set-scroll-bar-mode function. However, this function is only defined<b=
r>
&gt; when run under graphic capable environments, such as X, but not in oth=
er<br>
&gt; environments such as the Linux console.<br>
&gt;<br>
&gt; This means that if you don&#39;t want your elisp or .emacs to raise an=
<br>
&gt; error, you also need to wrap calls to this function inside something<b=
r>
&gt; like (when display-graphic-p ...). This is not required for other<br>
&gt; display related functions that depend on an environment requiring<br>
&gt; support for graphics i.e. tool-bar-mode.<br>
<br>
It&#39;s not clear to me whether you mean --without-x builds or --with-x<br=
>
builds started with -nw (or both), but in either case:<br>
<br>
In a with-x build:<br>
emacs -Q -nw<br>
<br>
C-h f tool-bar-mode<br>
=A0tool-bar-mode is an interactive compiled Lisp function in `tool-bar.el&#=
39;.<br>
<br>
C-h f set-scroll-bar-mode<br>
=A0set-scroll-bar-mode is a compiled Lisp function in `scroll-bar.el&#39;.<=
br>
<br>
(tool-bar-mode 1) =A0 =A0 =A0 =A0 =A0 =A0 ; no error<br>
<br>
(set-scroll-bar-mode &#39;left) =A0 ; no error<br>
<br>
<br>
In a without-x build, neither tool-bar-mode nor set-scroll-bar-mode is<br>
defined.<br>
<br>
Thus, I see no inconsistency here and don&#39;t understand your request.<br=
></blockquote><div><br></div><div>OK, I just tried to re-create the error I=
 was getting and now it isn&#39;t occurring. I have updated emacs since log=
ging the report, but cannot see anything obvious in the change log that wou=
ld explain the difference, so not sure. For the record, here is what I did =
originally and which does not repeat the problem now.=A0</div>
<div><br></div><div>1. Built emacs under X with the GTK libs (emacs from bz=
r 24.0.50).</div><div>2. Login under the Linux console and run emacs --debu=
g-init</div><div><br></div><div>Originally, I got a backtrace with a void f=
unction error for set-scroll-bar-mode. Fixed this by putting the call insid=
e a when block which tested for a window-syste of X. However, noticed that =
this was not an issue with tool-bar-mode. I could place a direct top-level =
call to tool-bar-mode in my .emacs without needing to wrap it in a test. Th=
is was the original inconsistency I observed. i.e. tool-bar-mode was define=
d but set-scroll-bar-mode was not when running an emacs built with X under =
a Linux console (not an xterm or X console).=A0</div>
<div><br></div><div>C-h f tool-bar-mode returns docs on that function as wo=
uld be expected.</div><div>C-h f set-scroll-bar-mode fails saying the funct=
ion is not defined.</div><div><br></div><div>After removing the when block =
from my .emacs and just having a top level call to set-scrolll-bar-mode and=
 restarting emacs just now, I no longer get the error and backtrace. C-h f =
returns info on both functions.=A0</div>
<div><br></div><div>I cannot see anything in the change log which would exp=
lain why it was not working and now is, so I guess I must have screwed up s=
omewhere. Sorry for the noise.=A0</div><div><br></div><div>The main reason =
for the report was I figured we should have consistency - either *all* grap=
hics display related functions are always defined i.e. as tool-bar-mode app=
ears to be or *all* of them are defined only for environments where they ma=
ie sense, such as X, but above all, avoid situations where some appear to b=
e defined and some do not.=A0</div>
<div>Personally, I think they should all be defined regardless of the envir=
onment, even if in many environments, they are just function stubs that don=
&#39;t actually do anything. This avoids having to remember to put such cod=
e inside tests and to somehow know which such functions are defined in whic=
h environments. For the envrionments I&#39;ve tested, this does not appear =
to be the case for tool-bar-mode and set-scroll-bar-mode, so all appears to=
 be fine for at least these two cases.</div>
<div><br></div><div>thanks,</div><div><br></div><div>Tim</div><div><br></di=
v><div><br></div></div>

--90e6ba18199878a68f0499eaf3fa--




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#7782; Package emacs. Full text available.

Message received at 7782 <at> debbugs.gnu.org:


Received: (at 7782) by debbugs.gnu.org; 13 Jan 2011 12:13:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 13 07:13:01 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PdM33-0003yY-0f
	for submit <at> debbugs.gnu.org; Thu, 13 Jan 2011 07:13:01 -0500
Received: from fencepost.gnu.org ([140.186.70.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1PdM31-0003yN-B4
	for 7782 <at> debbugs.gnu.org; Thu, 13 Jan 2011 07:12:59 -0500
Received: from eliz by fencepost.gnu.org with local (Exim 4.69)
	(envelope-from <eliz@HIDDEN>)
	id 1PdMAF-0001Sq-TG; Thu, 13 Jan 2011 07:20:27 -0500
From: Eli Zaretskii <eliz@HIDDEN>
To: David De La Harpe Golden <david@HIDDEN>
In-reply-to: <4D2EC9B6.4090002@HIDDEN> (message from David De La
	Harpe Golden on Thu, 13 Jan 2011 09:45:26 +0000)
Subject: Re: bug#7782: 24.0.50;
	24.0.50: set-scroll-bar-mode missing under non-GUI environments
References: <87aajhgjv4.fsf@HIDDEN>	<frei8kcqmv.fsf@HIDDEN>
	<jwv4o9gjpjo.fsf-monnier+emacs@HIDDEN>
	<4D2EC9B6.4090002@HIDDEN>
Message-Id: <E1PdMAF-0001Sq-TG@HIDDEN>
Date: Thu, 13 Jan 2011 07:20:27 -0500
X-Spam-Score: -6.5 (------)
X-Debbugs-Envelope-To: 7782
Cc: theophilusx@HIDDEN, monnier@HIDDEN, 7782 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.5 (------)

> Date: Thu, 13 Jan 2011 09:45:26 +0000
> From: David De La Harpe Golden <david@HIDDEN>
> Cc: Tim Cross <theophilusx@HIDDEN>, 7782 <at> debbugs.gnu.org
> 
> On 10/01/11 23:45, Stefan Monnier wrote:
> 
> > Since (set-)scroll-bar-mode is not
> > specific to one particular kind of display (it is shared by w32, X11,
> > and ns), it should exist independently from any particular display.
> 
> Plus there's no real reason in principle we couldn't draw text-mode 
> scroll bars on text terminals too, like old msdos borland ides etc.

There's one valid reason, as usual: someone should write the code.
Volunteers are welcome (no, I don't).




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#7782; Package emacs. Full text available.

Message received at 7782 <at> debbugs.gnu.org:


Received: (at 7782) by debbugs.gnu.org; 13 Jan 2011 09:37:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 13 04:37:58 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PdJd0-0007V9-Lb
	for submit <at> debbugs.gnu.org; Thu, 13 Jan 2011 04:37:58 -0500
Received: from harpegolden.net ([65.99.215.13])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <david@HIDDEN>) id 1PdJcy-0007Uy-Ph
	for 7782 <at> debbugs.gnu.org; Thu, 13 Jan 2011 04:37:57 -0500
Received: from [87.198.55.89] (87-198-55-89.ptr.magnet.ie [87.198.55.89])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(Client CN "David De La Harpe Golden",
	Issuer "David De La Harpe Golden Personal CA rev 3" (verified OK))
	by harpegolden.net (Postfix) with ESMTPSA id 6D0AE6841D;
	Thu, 13 Jan 2011 09:45:28 +0000 (GMT)
Message-ID: <4D2EC9B6.4090002@HIDDEN>
Date: Thu, 13 Jan 2011 09:45:26 +0000
From: David De La Harpe Golden <david@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11
MIME-Version: 1.0
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#7782: 24.0.50;	24.0.50: set-scroll-bar-mode missing under
	non-GUI environments
References: <87aajhgjv4.fsf@HIDDEN>	<frei8kcqmv.fsf@HIDDEN>
	<jwv4o9gjpjo.fsf-monnier+emacs@HIDDEN>
In-Reply-To: <jwv4o9gjpjo.fsf-monnier+emacs@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 7782
Cc: Glenn Morris <rgm@HIDDEN>, Tim Cross <theophilusx@HIDDEN>,
	7782 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

On 10/01/11 23:45, Stefan Monnier wrote:

> Since (set-)scroll-bar-mode is not
> specific to one particular kind of display (it is shared by w32, X11,
> and ns), it should exist independently from any particular display.

Plus there's no real reason in principle we couldn't draw text-mode 
scroll bars on text terminals too, like old msdos borland ides etc.








Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#7782; Package emacs. Full text available.

Message received at 7782 <at> debbugs.gnu.org:


Received: (at 7782) by debbugs.gnu.org; 10 Jan 2011 23:38:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 10 18:38:09 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PcRJR-0007nZ-9J
	for submit <at> debbugs.gnu.org; Mon, 10 Jan 2011 18:38:09 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.183]
	helo=ironport2-out.pppoe.ca)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1PcRJP-0007nN-En
	for 7782 <at> debbugs.gnu.org; Mon, 10 Jan 2011 18:38:08 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvsEAAcpK01FxIbi/2dsb2JhbACkSnS7T4VMBIRnjiQ
X-IronPort-AV: E=Sophos;i="4.60,303,1291611600"; d="scan'208";a="87571032"
Received: from 69-196-134-226.dsl.teksavvy.com (HELO ceviche.home)
	([69.196.134.226])
	by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA;
	10 Jan 2011 18:45:33 -0500
Received: by ceviche.home (Postfix, from userid 20848)
	id D6FC7660DC; Mon, 10 Jan 2011 18:45:32 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: bug#7782: 24.0.50;
	24.0.50: set-scroll-bar-mode missing under non-GUI environments
Message-ID: <jwv4o9gjpjo.fsf-monnier+emacs@HIDDEN>
References: <87aajhgjv4.fsf@HIDDEN>
	<frei8kcqmv.fsf@HIDDEN>
Date: Mon, 10 Jan 2011 18:45:32 -0500
In-Reply-To: <frei8kcqmv.fsf@HIDDEN> (Glenn Morris's message of
	"Mon, 10 Jan 2011 17:58:48 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.1 (--)
X-Debbugs-Envelope-To: 7782
Cc: Tim Cross <theophilusx@HIDDEN>, 7782 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.1 (--)

> In a without-x build, neither tool-bar-mode nor set-scroll-bar-mode is
> defined.

That's the problem.  I know Emacs has many such things already, but
I think these are all bugs: I think we should adopt a convention that
functions/variables should either be specific to one particular kind of
display, or be display-independent.  Since (set-)scroll-bar-mode is not
specific to one particular kind of display (it is shared by w32, X11,
and ns), it should exist independently from any particular display.

Similarly, if a function doesn't signal an error when run in -nw, it
should generally work just as well in --without-x.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#7782; Package emacs. Full text available.

Message received at 7782 <at> debbugs.gnu.org:


Received: (at 7782) by debbugs.gnu.org; 10 Jan 2011 22:51:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 10 17:51:28 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PcQaF-0006kS-OB
	for submit <at> debbugs.gnu.org; Mon, 10 Jan 2011 17:51:28 -0500
Received: from fencepost.gnu.org ([140.186.70.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <rgm@HIDDEN>) id 1PcQaE-0006kI-IC
	for 7782 <at> debbugs.gnu.org; Mon, 10 Jan 2011 17:51:27 -0500
Received: from localhost ([127.0.0.1]:55943)
	by fencepost.gnu.org with esmtp (Exim 4.69)
	(envelope-from <rgm@HIDDEN>)
	id 1PcQhM-0005az-Tr; Mon, 10 Jan 2011 17:58:49 -0500
To: Tim Cross <theophilusx@HIDDEN>
Subject: Re: bug#7782: 24.0.50;
	24.0.50: set-scroll-bar-mode missing under non-GUI environments
References: <87aajhgjv4.fsf@HIDDEN>
From: Glenn Morris <rgm@HIDDEN>
X-Spook: PLO warfare STARLAN Exon Shell infowar UOP Saudi Arabia
X-Ran: D1%MW+!6[u9(UyRe~"p]SdIlV55:`ra*PeZj-bL[3r,2@!^d5Pm|lP0<zi;s!^}mm"ZV__
X-Hue: blue
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Mon, 10 Jan 2011 17:58:48 -0500
In-Reply-To: <87aajhgjv4.fsf@HIDDEN> (Tim Cross's message of
	"Tue\, 04 Jan 2011 19\:21\:03 +1100")
Message-ID: <frei8kcqmv.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -4.7 (----)
X-Debbugs-Envelope-To: 7782
Cc: 7782 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.7 (----)

Tim Cross wrote:

> According to the documentation for scroll-bar-mode, the way to
> set/change scroll-bar settings from within elisp code is to use the
> set-scroll-bar-mode function. However, this function is only defined
> when run under graphic capable environments, such as X, but not in other
> environments such as the Linux console. 
>
> This means that if you don't want your elisp or .emacs to raise an
> error, you also need to wrap calls to this function inside something
> like (when display-graphic-p ...). This is not required for other
> display related functions that depend on an environment requiring
> support for graphics i.e. tool-bar-mode. 

It's not clear to me whether you mean --without-x builds or --with-x
builds started with -nw (or both), but in either case:

In a with-x build:
emacs -Q -nw

C-h f tool-bar-mode
 tool-bar-mode is an interactive compiled Lisp function in `tool-bar.el'.

C-h f set-scroll-bar-mode
 set-scroll-bar-mode is a compiled Lisp function in `scroll-bar.el'.

(tool-bar-mode 1)             ; no error

(set-scroll-bar-mode 'left)   ; no error


In a without-x build, neither tool-bar-mode nor set-scroll-bar-mode is
defined.

Thus, I see no inconsistency here and don't understand your request.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#7782; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Jan 2011 12:03:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 04 07:03:29 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Pa5bs-0008A4-RQ
	for submit <at> debbugs.gnu.org; Tue, 04 Jan 2011 07:03:29 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <theophilusx@HIDDEN>) id 1Pa21s-00034W-OJ
	for submit <at> debbugs.gnu.org; Tue, 04 Jan 2011 03:14:05 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <theophilusx@HIDDEN>) id 1Pa28m-0001qi-DV
	for submit <at> debbugs.gnu.org; Tue, 04 Jan 2011 03:21:13 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RFC_ABUSE_POST,
	T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([199.232.76.165]:53715)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <theophilusx@HIDDEN>) id 1Pa28m-0001qd-B5
	for submit <at> debbugs.gnu.org; Tue, 04 Jan 2011 03:21:12 -0500
Received: from [140.186.70.92] (port=43732 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Pa28k-0006Oe-QI
	for bug-gnu-emacs@HIDDEN; Tue, 04 Jan 2011 03:21:11 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <theophilusx@HIDDEN>) id 1Pa28j-0001q3-L2
	for bug-gnu-emacs@HIDDEN; Tue, 04 Jan 2011 03:21:10 -0500
Received: from ipmail05.adl6.internode.on.net ([150.101.137.143]:1206)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <theophilusx@HIDDEN>) id 1Pa28j-0001pj-1o
	for bug-gnu-emacs@HIDDEN; Tue, 04 Jan 2011 03:21:09 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AtEGAOJkIk15LGD5/2dsb2JhbACWFwEBjhx0rUqHGy6GU4VKBIUhhWM
Received: from ppp121-44-96-249.lns20.syd6.internode.on.net (HELO
	puma.rapttech.com.au) ([121.44.96.249])
	by ipmail05.adl6.internode.on.net with ESMTP; 04 Jan 2011 18:51:05 +1030
From: Tim Cross <theophilusx@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.0.50;
	24.0.50: set-scroll-bar-mode missing under non-GUI environments
Date: Tue, 04 Jan 2011 19:21:03 +1100
Message-ID: <87aajhgjv4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Spam-Score: -4.6 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 04 Jan 2011 07:03:28 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.7 (----)


According to the documentation for scroll-bar-mode, the way to
set/change scroll-bar settings from within elisp code is to use the
set-scroll-bar-mode function. However, this function is only defined
when run under graphic capable environments, such as X, but not in other
environments such as the Linux console. 

This means that if you don't want your elisp or .emacs to raise an
error, you also need to wrap calls to this function inside something
like (when display-graphic-p ...). This is not required for other
display related functions that depend on an environment requiring
support for graphics i.e. tool-bar-mode. 

For consistency and to help reduce environment related bugs, I would
like to request a feature enhancement whereby set-scroll-bar-mode is
defined in all environmennts, even if it is just a stub / do nothing
operation in environments that do not support scroll bars. 

thanks,

Tim

In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0)
 of 2011-01-04 on puma
Windowing system distributor `The X.Org Foundation', version 11.0.10900000
configured using `configure  '--prefix=/usr/local''





Acknowledgement sent to Tim Cross <theophilusx@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#7782; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.