James Clark | 1 Nov 2003 02:02

fontification-functions called for wrong buffer

I have a mode that adds a function to fontification functions. It works
in 21.3 but not with the current CVS version.  The problem is that in
the CVS version of emacs, when a buffer X has a function Y in its
fontification-functions variable (which is supposed to be automatically
buffer-local), Y gets called not just when the current buffer is X but
also when the current buffer is a minibuffer or an echo window.  I can
easily work around this, but it seems like a bug to me.

If you eval the following, then do M-x my-fontify-start, and then M-x
my-fontify-end, you will see the problem. With 21.3, my-fontifier will
have been called for just one buffer; with the CVS version of emacs, it
will have been called for more than one. 

(defvar my-fontified-buffers nil)

(defun my-fontifier (start)
  (or (memq (current-buffer) my-fontified-buffers)
      (setq my-fontified-buffers
	    (cons (current-buffer) my-fontified-buffers))))

(defun my-fontify-start ()
  (interactive)
  (setq my-fontified-buffers nil)
  (add-hook 'fontification-functions 'my-fontifier))

(defun my-fontify-end ()
  (interactive)
  (remove-hook 'fontification-functions 'my-fontifier)
  (message "Fontified buffers: %s" my-fontified-buffers))

(Continue reading)

Eli Zaretskii | 1 Nov 2003 16:36
Picon

[mew-int 01584] Re: windows 1252

> Date: Fri, 31 Oct 2003 21:39:16 +0900 (JST)
> From: Kazu Yamamoto (=?iso-2022-jp?B?GyRCOzNLXE9CSScbKEI=?=) <kazu <at> iijlab.net>
> 
> Mew saves a buffer in Summary mode to a file as a cache. For this
> file, 'ctext is used.

Doesn't the Summary buffer include only the Subject and From parts of
the message?  If so, then they should not normally include any
non-ASCII characters (it's contrary to the relevant RFC, IIRC).  If
they do have non-ASCII characters, one could probably qp-encode them
before writing the cache.

Andrew Choi | 2 Nov 2003 02:21
Picon
Favicon

Re: Do we need legal papers [was: patch for unexmacosx.c: supporting non-prebound dynamic library]

storm <at> cua.dk (Kim F. Storm) writes:

> Hi Andrew,
>
> I looked at the patch, and it seems to be too big (it adds 60+ new
> source lines) to install without legal papers, and I cannot see that
> Nozumu Ando has signed papers.
>
> I think you should check with RMS if we need papers for this.
>
> Kim

We did already.  RMS handled this himself.
Kim F. Storm | 2 Nov 2003 00:51
Picon

Do we need legal papers [was: patch for unexmacosx.c: supporting non-prebound dynamic library]

Andrew Choi <akochoi <at> shaw.ca> writes:

> Nozomu Ando <nand <at> mac.com> writes:
> 
> > Hello all,
> >
> > On Mac OS X, emacs of CVS HEAD cannot unexec
> > with non-prebound dynamically linked library (e.g.  libXaw.dylib).
> >
> > I have written some code for handle this situation.
> >
> > With the following patch,
> > I have built Emacs/Carbon and Emacs/X11-dylib on Mac OS X
> > successfully, and the both seem to work fine.
> >
> > I hope this helps.
> >
> > Regards,
> > Nozomu Ando
> 
> Hi Nozumu,
> 
> Thank you again for your contribution.  I have just checked your patch
> into CVS.
> 
> Andrew.

Hi Andrew,

I looked at the patch, and it seems to be too big (it adds 60+ new
(Continue reading)

James Clark | 2 Nov 2003 00:54

easy-menu-define docstring inconsistent with behavior

The docstring for easy-menu-define says:

> The first element of MENU must be a string.  It is the menu bar item name.
> It may be followed by the following keyword argument pairs
> 
>    :filter FUNCTION
> 
> FUNCTION is a function with one argument, the menu.  It returns the actual
> menu displayed.

In fact, the argument and return value for function are the remaining
menu items not the entire menu.

James
Michael Mauger | 1 Nov 2003 22:09
Picon
Picon
Favicon

Re: Prompt display in Panther build

Andrew Choi writes:
>> There are (or at least there used to be) problems with pseudo-ttys
>> (ptys) on Mac OS X, therefore ptys are disabled for some (all?)
>> operations.  I think the variable process-connection-type controls
>> this, so you could try to tweak that.
> 
> I believe the pty problem has been fixed in Panther/Darwin 7.0 (unless
> someone can tell me otherwise).
> 
> If behavior differs in terminal and GUI mode, perhaps it is useful to
> check environment variable settings passed to `psql' that are different
> in the two cases (value of process-environment).  Also you may want to
> check what arguments are used when psql is called (by stopping at
> start-process (?)) in both cases.

I did some further checking on this issue.  The prompt is suppressed in
psql if isatty(fileno(stdin)) or isatty(fileno(stdout)) return false.  If
there are in fact issues with pty support under Mac OS X that would
explain the problem.  

I also did some checking under Windows where there is no native pty
support.  Even though psql is a cygwin app, Emacs isn't, so psql doesn't
detect it's tty state properly (and never will, probably).  

I have submitted a small patch to the Postgres team for the psql
processor to support a command line option that will assume that the
processor is running on a tty even if the environment says it isn't.  If
and when this patch is accepted and released it will be possible to
customize sql-postgres-options to add this new option when psql is
invoked.
(Continue reading)

Jaba Adams | 2 Nov 2003 01:28
Picon
Favicon

emacs as back-end

Hi folks,

I'd like to use emacs as a "back-end" for various GUI /
editor experiments. I'm new to emacs, and searching on
"embedding", "scraping", "tty", etc. hasn't yielded useful
results. I'd appreciate it if you could suggest some lines
of inquiry, based on my requirements.

Here's what I want to do:

- send keyboard / mouse input to emacs
- receive sufficient output from emacs to be able to
reconstruct what the user would see if emacs had been
running interactively up to that point
- do this with no visible emacs windows
- do this on a Windows 2000 / XP machine

I don't want to waste time writing editor functionality when
something as featureful as emacs is out there, but I do want
full control over the GUI.

Thanks for any help!

- Jaba
Stephen J. Turnbull | 2 Nov 2003 07:41
Picon
Favicon

Re: [mew-int 01582] Re: windows 1252

>>>>> "Eli" == Eli Zaretskii <eliz <at> elta.co.il> writes:

    >> Date: Fri, 31 Oct 2003 21:39:16 +0900 (JST)

    >> From: Kazu Yamamoto (=?iso-2022-jp?B?GyRCOzNLXE9CSScbKEI=?=)
    >> <kazu <at> iijlab.net>

    >> Mew saves a buffer in Summary mode to a file as a cache. For
    >> this file, 'ctext is used.

    Eli> Doesn't the Summary buffer include only the Subject and From
    Eli> parts of the message?  If so, then they should not normally
    Eli> include any non-ASCII characters (it's contrary to the
    Eli> relevant RFC, IIRC).

Not really.  RFCs are about wire format; they are not relevant to
summary buffers or disk storage.  (Unless there is some reason, such
as digital signatures, that the on the wire format needs to be
preserved exactly.)

    Eli> If they do have non-ASCII characters,
    Eli> one could probably qp-encode them before writing the cache.

Why bother?

If ctext is really preferred, there is a standard mechanism, the X
Compound Text "extended segment", which Emacs should already know
about.  In fact, I'd like to encourage the mew people to use that, so
that there could actually be a non-abusive use of it for reference
(this is the same mechanism that XFree86 abuses for ISO 8859/15
(Continue reading)

Jan D. | 2 Nov 2003 20:34
Picon

Re: Two GTK related feature requests

> Btw, I think I found a bug in the GTK port of C-Mouse-1: press
> C-Mouse-1 and then select the top-level '-----' line to nail the menu
> to the desktop.  The menu is nailed down, but pressing any of the
> items doesn't do anything.

Actually popups should not be able to tear off.  Since the context
(lisp code) has changed since the popup was created, there is no good
way to find out what to do to invoke a menu item after the popup has
been teared off.  I have removed the tear off posibility for popups,
I don't know what I was thinking.

	Jan D.
Stefan Monnier | 2 Nov 2003 20:57
Picon

Re: fontification-functions called for wrong buffer

> I have a mode that adds a function to fontification functions. It works
> in 21.3 but not with the current CVS version.  The problem is that in
> the CVS version of emacs, when a buffer X has a function Y in its
> fontification-functions variable (which is supposed to be automatically
> buffer-local), Y gets called not just when the current buffer is X but
> also when the current buffer is a minibuffer or an echo window.  I can
> easily work around this, but it seems like a bug to me.

It's a recently introduced bug in add-hook compounded with sloppy coding on
your part: please pass the `local' argument to add-hook (and remove-hook
as well, of course).

        Stefan

Gmane