* bug#31148: 26.1; require w32 errors
@ 2018-04-13 14:50 Alex Branham
2018-04-13 15:13 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Alex Branham @ 2018-04-13 14:50 UTC (permalink / raw)
To: 31148
Hi -
If you try
(require 'w32-fns)
or
(require 'w32-fns nil t)
It produces an error void-function set-message-beep. This is reproducible for me from emacs -q.
Debugger entered--Lisp error: (void-function set-message-beep)
set-message-beep(nil)
byte-code("\300\301\302\303#\210\304\301\302\305#\210\306\307\310\"\210\311\303!\207" [defalias set-w32-system-coding-system w32-set-system-coding-system nil make-obsolete "26.1" defvaralias w32-system-coding-system locale-coding-system set-message-beep] 4)
#<subr require>(w32-fns nil t)
ad-Advice-require(#<subr require> w32-fns nil t)
apply(ad-Advice-require #<subr require> (w32-fns nil t))
require(w32-fns nil t)
eval((require 'w32-fns nil t) nil)
eval-expression((require 'w32-fns nil t) nil nil 127)
funcall-interactively(eval-expression (require 'w32-fns nil t) nil nil 127)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2018-04-10 built on earth
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
--with-sound=alsa --with-modules --without-gconf --without-gsettings
--with-mailutils --with-xml2 --with-x-toolkit=lucid --with-xft
--with-xaw3d --with-imagemagick 'CFLAGS=-march=x86-64 -mtune=generic
-O2 -pipe -fstack-protector-strong -fno-plt'
CPPFLAGS=-D_FORTIFY_SOURCE=2
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS NOTIFY ACL
GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11
MODULES THREADS LIBSYSTEMD LCMS2
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#31148: 26.1; require w32 errors
2018-04-13 14:50 bug#31148: 26.1; require w32 errors Alex Branham
@ 2018-04-13 15:13 ` Eli Zaretskii
2018-04-13 15:15 ` Alex Branham
2018-04-13 19:04 ` bug#31148: Close Alex Branham
2018-04-14 4:22 ` bug#31148: 26.1; require w32 errors Noam Postavsky
2 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2018-04-13 15:13 UTC (permalink / raw)
To: Alex Branham; +Cc: 31148
> From: Alex Branham <alex.branham@gmail.com>
> Date: Fri, 13 Apr 2018 09:50:47 -0500
>
> If you try
>
> (require 'w32-fns)
>
> or
>
> (require 'w32-fns nil t)
>
> It produces an error void-function set-message-beep. This is reproducible for me from emacs -q.
Don't do that, then, unless you are in a w32 Emacs.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#31148: 26.1; require w32 errors
2018-04-13 15:13 ` Eli Zaretskii
@ 2018-04-13 15:15 ` Alex Branham
2018-04-13 17:22 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: Alex Branham @ 2018-04-13 15:15 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 31148
On Fri 13 Apr 2018 at 10:13, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Alex Branham <alex.branham@gmail.com>
>> Date: Fri, 13 Apr 2018 09:50:47 -0500
>>
>> If you try
>>
>> (require 'w32-fns)
>>
>> or
>>
>> (require 'w32-fns nil t)
>>
>> It produces an error void-function set-message-beep. This is reproducible for me from emacs -q.
>
> Don't do that, then, unless you are in a w32 Emacs.
What's the recommended way for packages to rely on these functions then?
It seems annoying to wrap every call to w32-functions in
(if (fboundp ...) (w32-...))
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#31148: 26.1; require w32 errors
2018-04-13 15:15 ` Alex Branham
@ 2018-04-13 17:22 ` Eli Zaretskii
2018-04-13 17:45 ` Alex Branham
0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2018-04-13 17:22 UTC (permalink / raw)
To: Alex Branham; +Cc: 31148
> From: Alex Branham <alex.branham@gmail.com>
> Cc: 31148@debbugs.gnu.org
> Date: Fri, 13 Apr 2018 10:15:59 -0500
>
> >> (require 'w32-fns nil t)
> >>
> >> It produces an error void-function set-message-beep. This is reproducible for me from emacs -q.
> >
> > Don't do that, then, unless you are in a w32 Emacs.
>
> What's the recommended way for packages to rely on these functions then?
> It seems annoying to wrap every call to w32-functions in
> (if (fboundp ...) (w32-...))
I don't understand the question. w32-fns.el is preloaded on
MS-Windows, so packages that rely on some function from there can
simply call them.
IOW, why would you want to 'require' w32-fns?
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#31148: 26.1; require w32 errors
2018-04-13 17:22 ` Eli Zaretskii
@ 2018-04-13 17:45 ` Alex Branham
2018-04-13 17:54 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: Alex Branham @ 2018-04-13 17:45 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 31148
On Fri 13 Apr 2018 at 12:22, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Alex Branham <alex.branham@gmail.com>
>> Cc: 31148@debbugs.gnu.org
>> Date: Fri, 13 Apr 2018 10:15:59 -0500
>>
>> >> (require 'w32-fns nil t)
>> >>
>> >> It produces an error void-function set-message-beep. This is reproducible for me from emacs -q.
>> >
>> > Don't do that, then, unless you are in a w32 Emacs.
>>
>> What's the recommended way for packages to rely on these functions then?
>> It seems annoying to wrap every call to w32-functions in
>> (if (fboundp ...) (w32-...))
>
> I don't understand the question. w32-fns.el is preloaded on
> MS-Windows, so packages that rely on some function from there can
> simply call them.
>
> IOW, why would you want to 'require' w32-fns?
I'm going through and editing some older ESS code, and they make checks
like this:
(if (not (w32-shell-dos-semantics))
(add-hook 'comint-output-filter-functions 'ess-bugs-exit-notify-sh))
Which causes errors on non-windows machines unless you wrap the call to
w32-shell-dos-semantics in (and (fboundp ...)), which looks weird to me:
(if (not (and
(fboundp 'w32-shell-dos-semantics)
(w32-shell-dos-semantics)))
(add-hook 'comint-output-filter-functions 'ess-bugs-exit-notify-sh))
They also have code like:
(if (ess-microsoft-p)
(w32-short-file-name ...))
which causes byte compiler warnings about w32 being undefined. I guess
the best/only way to get rid of these is to (declare-function ... ),
right?
Thanks,
Alex
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#31148: 26.1; require w32 errors
2018-04-13 17:45 ` Alex Branham
@ 2018-04-13 17:54 ` Eli Zaretskii
2018-04-13 17:58 ` Alex Branham
0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2018-04-13 17:54 UTC (permalink / raw)
To: Alex Branham; +Cc: 31148
> From: Alex Branham <alex.branham@gmail.com>
> Cc: 31148@debbugs.gnu.org
> Date: Fri, 13 Apr 2018 12:45:37 -0500
>
> (if (not (w32-shell-dos-semantics))
> (add-hook 'comint-output-filter-functions 'ess-bugs-exit-notify-sh))
>
> Which causes errors on non-windows machines unless you wrap the call to
> w32-shell-dos-semantics in (and (fboundp ...)), which looks weird to me:
>
> (if (not (and
> (fboundp 'w32-shell-dos-semantics)
> (w32-shell-dos-semantics)))
> (add-hook 'comint-output-filter-functions 'ess-bugs-exit-notify-sh))
>
> They also have code like:
>
> (if (ess-microsoft-p)
> (w32-short-file-name ...))
>
> which causes byte compiler warnings about w32 being undefined. I guess
> the best/only way to get rid of these is to (declare-function ... ),
> right?
Yes, declare-function should solve at least some of those.
As for the rest, I suggest to define a variable/function (seems like
ess-microsoft-p is already doing that) to tell you whether you are on
MS-Windows, e.g., by looking at system-type, and then condition all
the calls to w32-specific functions on that variable/function.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#31148: 26.1; require w32 errors
2018-04-13 17:54 ` Eli Zaretskii
@ 2018-04-13 17:58 ` Alex Branham
2018-04-13 18:58 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: Alex Branham @ 2018-04-13 17:58 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 31148
On Fri 13 Apr 2018 at 12:54, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Alex Branham <alex.branham@gmail.com>
>> Cc: 31148@debbugs.gnu.org
>> Date: Fri, 13 Apr 2018 12:45:37 -0500
>>
>> (if (not (w32-shell-dos-semantics))
>> (add-hook 'comint-output-filter-functions 'ess-bugs-exit-notify-sh))
>>
>> Which causes errors on non-windows machines unless you wrap the call to
>> w32-shell-dos-semantics in (and (fboundp ...)), which looks weird to me:
>>
>> (if (not (and
>> (fboundp 'w32-shell-dos-semantics)
>> (w32-shell-dos-semantics)))
>> (add-hook 'comint-output-filter-functions 'ess-bugs-exit-notify-sh))
>>
>> They also have code like:
>>
>> (if (ess-microsoft-p)
>> (w32-short-file-name ...))
>>
>> which causes byte compiler warnings about w32 being undefined. I guess
>> the best/only way to get rid of these is to (declare-function ... ),
>> right?
>
> Yes, declare-function should solve at least some of those.
>
> As for the rest, I suggest to define a variable/function (seems like
> ess-microsoft-p is already doing that) to tell you whether you are on
> MS-Windows, e.g., by looking at system-type, and then condition all
> the calls to w32-specific functions on that variable/function.
Thanks, will do. I guess this bug report can be closed (can I do that myself?)
Thanks again,
Alex
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#31148: 26.1; require w32 errors
2018-04-13 17:58 ` Alex Branham
@ 2018-04-13 18:58 ` Eli Zaretskii
0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2018-04-13 18:58 UTC (permalink / raw)
To: Alex Branham; +Cc: 31148
> From: Alex Branham <alex.branham@gmail.com>
> Cc: 31148@debbugs.gnu.org
> Date: Fri, 13 Apr 2018 12:58:46 -0500
>
> I guess this bug report can be closed (can I do that myself?)
Yes, you can: send email to 31148-done@debbugs.gnu.org.
Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#31148: Close
2018-04-13 14:50 bug#31148: 26.1; require w32 errors Alex Branham
2018-04-13 15:13 ` Eli Zaretskii
@ 2018-04-13 19:04 ` Alex Branham
2018-04-14 4:22 ` bug#31148: 26.1; require w32 errors Noam Postavsky
2 siblings, 0 replies; 10+ messages in thread
From: Alex Branham @ 2018-04-13 19:04 UTC (permalink / raw)
To: 31148-done
Close bug report
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#31148: 26.1; require w32 errors
2018-04-13 14:50 bug#31148: 26.1; require w32 errors Alex Branham
2018-04-13 15:13 ` Eli Zaretskii
2018-04-13 19:04 ` bug#31148: Close Alex Branham
@ 2018-04-14 4:22 ` Noam Postavsky
2 siblings, 0 replies; 10+ messages in thread
From: Noam Postavsky @ 2018-04-14 4:22 UTC (permalink / raw)
To: Alex Branham; +Cc: 31148
merge 31148 6997
quit
Alex Branham <alex.branham@gmail.com> writes:
> Hi -
>
> If you try
>
> (require 'w32-fns)
>
> or
>
> (require 'w32-fns nil t)
>
> It produces an error void-function set-message-beep. This is reproducible for me from emacs -q.
This is fixed on master (except you need to use (load "w32-fns") because
w32-fns.el doesn't (provide 'w32-fns)).
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-04-14 4:22 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-13 14:50 bug#31148: 26.1; require w32 errors Alex Branham
2018-04-13 15:13 ` Eli Zaretskii
2018-04-13 15:15 ` Alex Branham
2018-04-13 17:22 ` Eli Zaretskii
2018-04-13 17:45 ` Alex Branham
2018-04-13 17:54 ` Eli Zaretskii
2018-04-13 17:58 ` Alex Branham
2018-04-13 18:58 ` Eli Zaretskii
2018-04-13 19:04 ` bug#31148: Close Alex Branham
2018-04-14 4:22 ` bug#31148: 26.1; require w32 errors Noam Postavsky
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).