Commit 4e603db3 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

merge trunk

parents b60f961f f6aa6ec6
2010-08-23 Andreas Schwab <schwab@linux-m68k.org>
* configure.in: Fix check for librsvg, imagemagick and
MagickExportImagePixels.
2010-08-18 Joakim Verona <joakim@verona.se>
* Makefile.in, configure.in: Checks for ImageMagick.
2010-08-10 Dan Nicolaescu <dann@ics.uci.edu>
* configure.in (AC_PREREQ): Require autoconf 2.65.
......
* README for the ImageMagick Emacs branch
This is the imagemagick branch of Emacs. Imagemagick can now be used
to load many new image formats, and also do useful transforms like
scaling and rotation.
This file will attempt to contain draft NEWS, Changelog and manual
entries for the new functionality.
You might need to regenerate the configure scripts:
aclocal
automake
autoheader
autoconf
./configure --with-imagemagick
* TODO image-type-header-regexps priorities the jpeg loader over the
imagemagick one. This is not wrong, but how should a user go about
prefering the imagemagick loader? The user might like zooming etc in
jpegs.
try (setq image-type-header-regexps nil) for a quick hack to prefer
imagemagick over the jpg loader.
* TODO For some reason its unbearably slow to look at a page in a large
image bundle using the :index feature. The imagemagick "display"
command is also a bit slow, but nowhere near as slow as the emacs
code. It seems imagemagick tries to unpack every page when loading
the bundle. This feature is not the primary usecase for the
imagemagick patch though.
ImageMagick 6.6.2-9 introduced a bugfix for single page djvu load.
It is now way faster to use the :index feature, but its still not
very fast.
** DONE optimize number of pages calculation for bundles as suggested by
imagemagick forum: "set the density to something low like 2 and use
MagickPingImage()"
** TODO try to cache the num pages calculation. it can take a while to
calculate the number of pages, and if you need to do it for each
page view, page-flipping becomes uselessly slow.
* TODO integrate with image-dired
* TODO integrate with docview.
* TODO integrate with image-mode
Some work has been done, M-x image-transform-fit-to-height will fit
the image to the height of the Emacs window for instance.
* TODO look for optimizations for handling images with low depth
Currently the code seems to default to 24 bit RGB which is costly for
images with lower bit depth.
* TODO complete documentation drafts below
* DONE fix inconsistencys with spelling of imagemagick in the src
* DONE report number of images in image bundle types somehow
Works like for "gif" support. Thanks to Juri Linkov.
* DONE probably add pdf to inhibited types
* DONE inhibit types is defconst should probably be defcustom
* TODO decide what to do with some uncommitted imagemagick support
functions for image size etc.
* TODO Test with more systems
Tested on Fedora 12, Fedora 14 so far, and the libmagick that ships with it.
Ubuntu 8.04 was also tested, but it seems it ships a broken
ImageMagick.
I also tried using an imagemagick compiled from their SVN, in
parallell with the one packaged by Fedora, it worked well.
* DONE Also need some way to handle render methods that only work on newer ImageMagicks
Is handled by configure now
* Some nits from Stefan Monnier
I just took a quick look at the code and I see the following nits to fix:
** DONE obviously a merge will have to come with a good ChangeLog.
** DONE also the merge will need to come with documentation. Maybe not in the
Texinfo form yet, but at least in the etc/NEWS with enough info that
describes the `scale' and other such arguments that someone can start
using them.
** DONE the README talks about naming inconsistencies, I think these should be
fixed before a first commit (should be straightforward).
** DONE the "let" in image.el should not be followed by a line break and the while
should be replaced by a dolist.
** DONE the prototype of imagemagick_load_image has some odd indentation in ([[2010.06.14]])
its args, not sure what happened.
** DONE a few lines in the C code break the 80columns limit.
** DONE please use ANSI style function declarations rather than K&R for new code. ([[2010.06.14]])
** DONE you can get rid of the prototypes by reordering the code. ([[2010.06.14]])
** DONE the docstrings in DEFUN should not be indented (they'll display ([[2010.06.14]])
weirdly otherwise in C-h f).
** DONE Some "{" are at the end of a for/if rather than on their own line. ([[2010.06.14]])
** DONE why use "*( imtypes + i)" rather than "imtypes[i]"? ([[2010.06.14]])
** DONE some "," lack a space after them. ([[2010.06.14]])
** DONE several "=" and "==" lack spaces around them. ([[2010.06.14]])
* NEWS entry
** ImageMagick support
It is now possible to use the Imagemagick library to load many new
image formats in Emacs.
To enable, use the following configure option:
--with-imagemagick
The new function (imagemagick-types) returns a list of image file
extensions that your installation of imagemagick supports.
The function (imagemagick-register-types) will enable the imagemagick
support for the extensions in imagemagick-types minus the types listed
in imagemagick-types-inhibit.
imagemagick-types-inhibit has the value '(C HTML HTM TXT PDF) by default.
This means imagemagick will be used also to load jpeg files, if you
have both jpeg and imagemagick libraries linked. Add 'JPG to
imagemagick-types-inhibit if you do not want this.
imagemagick-render-type is a new variable which can be set to choose
between screen render methods.
- 0 is a conservative metod which works with older ImageMagick
versions. It is a bit slow, but robust.
- 1 utilizes a newer ImageMagick method
Images loaded with imagemagick will support a couple of new display
specification behaviours:
- if the :width and :height keywords are specified, these values are
used for scaling the image. If only one of :width or :height is
specified, the other one will be calculated so as to preserve the
aspect ratio.If both :width and :height are specified, aspect ratio
will not be preserved.
- :rotation specifies a rotation angle in degrees.
- :index specifies which image inside an image bundle file format, such
as TIFF or DJVM, to view.
The image-metadata function can be used to retrieve the total number
of images in an image bundle. This is simmilar to how GIF files work.
* Manual entry
nothing yet, but the NEWS entry could be adapted.
......@@ -21,7 +21,7 @@
EMACS = ../../src/emacs
DSTDIR = ../../lisp/international
RUNEMACS = ${EMACS} -Q --multibyte -batch
RUNEMACS = ${EMACS} -Q -batch
all: ${DSTDIR}/charprop.el ../../src/biditype.h ../../src/bidimirror.h
......
......@@ -27,7 +27,7 @@ lisp = $(CURDIR)/../../lisp
# lisp/subdirs.el is not generated yet when the commands below run.
EMACSLOADPATH = $(lisp);$(lisp)/international;$(lisp)/emacs-lisp
# Quote EMACS so it could be a file name with embedded whitespace
RUNEMACS = "$(EMACS)" -Q --multibyte -batch
RUNEMACS = "$(EMACS)" -Q -batch
all: $(DSTDIR)/charprop.el ../../src/biditype.h ../../src/bidimirror.h
......
This diff is collapsed.
......@@ -155,6 +155,7 @@ OPTION_DEFAULT_ON([tiff],[don't compile with TIFF image support])
OPTION_DEFAULT_ON([gif],[don't compile with GIF image support])
OPTION_DEFAULT_ON([png],[don't compile with PNG image support])
OPTION_DEFAULT_ON([rsvg],[don't compile with SVG image support])
OPTION_DEFAULT_OFF([imagemagick],[compile with ImageMagick image support])
OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts])
OPTION_DEFAULT_ON([libotf],[don't use libotf for OpenType font support])
......@@ -1824,12 +1825,11 @@ if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
RSVG_REQUIRED=2.11.0
RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
PKG_CHECK_MODULES(RSVG, $RSVG_MODULE, :, :)
PKG_CHECK_MODULES(RSVG, $RSVG_MODULE, HAVE_RSVG=yes, :)
AC_SUBST(RSVG_CFLAGS)
AC_SUBST(RSVG_LIBS)
if test ".${RSVG_CFLAGS}" != "."; then
HAVE_RSVG=yes
if test $HAVE_RSVG = yes; then
AC_DEFINE(HAVE_RSVG, 1, [Define to 1 if using librsvg.])
CFLAGS="$CFLAGS $RSVG_CFLAGS"
LIBS="$RSVG_LIBS $LIBS"
......@@ -1837,6 +1837,21 @@ if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
fi
fi
HAVE_IMAGEMAGICK=no
if test "${with_imagemagick}" != "no"; then
IMAGEMAGICK_MODULE="Wand"
PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :)
AC_SUBST(IMAGEMAGICK_CFLAGS)
AC_SUBST(IMAGEMAGICK_LIBS)
if test $HAVE_IMAGEMAGICK = yes; then
AC_DEFINE(HAVE_IMAGEMAGICK, 1, [Define to 1 if using imagemagick.])
CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
LIBS="$IMAGEMAGICK_LIBS $LIBS"
AC_CHECK_FUNCS(MagickExportImagePixels)
fi
fi
HAVE_GTK=no
if test "${with_gtk3}" = "yes"; then
......@@ -3662,6 +3677,7 @@ echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
echo " Does Emacs use -lpng? ${HAVE_PNG}"
echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
echo " Does Emacs use -lgpm? ${HAVE_GPM}"
echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
......
2010-08-21 Glenn Morris <rgm@gnu.org>
* misc.texi (Amusements): Mention bubbles and animate.
2010-07-31 Eli Zaretskii <eliz@gnu.org>
* files.texi (Visiting): Add more index entries for
......
......@@ -2784,6 +2784,10 @@ bored, try an argument of 9. Sit back and watch.
If you want a little more personal involvement, try @kbd{M-x gomoku},
which plays the game Go Moku with you.
@findex bubbles
@kbd{M-x bubbles} is a game in which the object is to remove as many
bubbles as you can in the smallest number of moves.
@findex blackbox
@findex mpuz
@findex 5x5
......@@ -2832,6 +2836,11 @@ bats.
@kbd{M-x solitaire} plays a game of solitaire in which you jump pegs
across other pegs.
@findex animate-birthday-present
@cindex animate
The @code{animate} package makes text dance. For an example, try
@kbd{M-x animate-birthday-present}.
@findex studlify-region
@cindex StudlyCaps
@kbd{M-x studlify-region} studlify-cases the region, producing
......
2010-08-24 Markus Triska <triska@gmx.at>
* processes.texi (Filter Functions): Use `buffer-live-p' instead
of `buffer-name' in the main text as well as in the example
(Bug#3098).
2010-08-22 Chong Yidong <cyd@stupidchicken.com>
* nonascii.texi (Text Representations):
* loading.texi (Loading Non-ASCII):
* compile.texi (Byte Compilation): Don't mention obsolete
--unibyte command-line argument.
2010-08-22 Chong Yidong <cyd@stupidchicken.com>
* modes.texi (Defining Minor Modes): Doc fix (Bug#6880).
2010-08-22 Chong Yidong <cyd@stupidchicken.com>
* objects.texi (Bool-Vector Type): Minor definition tweak (Bug#6878).
2010-08-20 Eli Zaretskii <eliz@gnu.org>
* commands.texi (Misc Events): Add cross-references to where
POSITION of a mouse event is described in detail.
2010-08-08 Christoph <cschol2112@googlemail.com>
* control.texi (Handling Errors) <error-message-string>: Fix arg name.
......
......@@ -1616,7 +1616,8 @@ These kinds of event are generated by moving a mouse wheel. Their
usual meaning is a kind of scroll or zoom.
The element @var{position} is a list describing the position of the
event, in the same format as used in a mouse-click event.
event, in the same format as used in a mouse-click event (@pxref{Click
Events}).
@vindex mouse-wheel-up-event
@vindex mouse-wheel-down-event
......@@ -1633,9 +1634,10 @@ selected in an application outside of Emacs, and then dragged and
dropped onto an Emacs frame.
The element @var{position} is a list describing the position of the
event, in the same format as used in a mouse-click event, and
@var{files} is the list of file names that were dragged and dropped.
The usual way to handle this event is by visiting these files.
event, in the same format as used in a mouse-click event (@pxref{Click
Events}), and @var{files} is the list of file names that were dragged
and dropped. The usual way to handle this event is by visiting these
files.
This kind of event is generated, at present, only on some kinds of
systems.
......
......@@ -22,12 +22,6 @@ hardware (as true compiled code is), byte-code is completely
transportable from machine to machine without recompilation. It is not,
however, as fast as true compiled code.
Compiling a Lisp file with the Emacs byte compiler always reads the
file as multibyte text, even if Emacs was started with @samp{--unibyte},
unless the file specifies otherwise. This is so that compilation gives
results compatible with running the same file without compilation.
@xref{Loading Non-ASCII}.
In general, any version of Emacs can run byte-compiled code produced
by recent earlier versions of Emacs, but the reverse is not true.
......
......@@ -4039,6 +4039,7 @@ displayed (@pxref{Display Feature Testing}).
* GIF Images:: Special features for GIF format.
* TIFF Images:: Special features for TIFF format.
* PostScript Images:: Special features for PostScript format.
* ImageMagick Images:: Special features available through ImageMagick.
* Other Image Types:: Various other formats are supported.
* Defining Images:: Convenient ways to define an image for later use.
* Showing Images:: Convenient ways to display an image once it is defined.
......@@ -4463,6 +4464,51 @@ specifying the bounding box of the PostScript image, analogous to the
@end example
@end table
@node ImageMagick Images
@subsection ImageMagick Images
The Imagemagick library can be used to load many image formats in Emacs.
The function (imagemagick-types) returns a list of image file
extensions that your installation of imagemagick supports.
The function (imagemagick-register-types) will enable the imagemagick
support for the extensions in imagemagick-types minus the types listed
in imagemagick-types-inhibit.
imagemagick-types-inhibit has the value '(C HTML HTM TXT PDF) by
default. There can be overlap between image loaders in your Emacs
installation. If you never want to use the ImageMagick loader to use
Jpeg files, for instance, add 'JPG to imagemagick-types-inhibit. Which
loader that will be used in practice depends on the priority of the
loaders.
imagemagick-render-type is a new variable which can be set to choose
between screen render methods for the ImageMagick loader.
- 0 is a conservative metod which works with older ImageMagick
versions. It is a bit slow, but robust.
- 1 utilizes a newer ImageMagick method
Images loaded with imagemagick will support a couple of new display
specification behaviours:
- if the :width and :height keywords are specified, these values are
used for scaling the image. If only one of :width or :height is
specified, the other one will be calculated so as to preserve the
aspect ratio.If both :width and :height are specified, aspect ratio
will not be preserved.
- :rotation specifies a rotation angle in degrees.
- :index specifies which image inside an image bundle file format, such
as TIFF or DJVM, to view.
The image-metadata function can be used to retrieve the total number
of images in an image bundle. This is simmilar to how GIF files work.
@node Other Image Types
@subsection Other Image Types
@cindex PBM
......
......@@ -367,13 +367,6 @@ example) is read without decoding, the text of the program will be
unibyte text, and its string constants will be unibyte strings.
@xref{Coding Systems}.
To make the results more predictable, Emacs always performs decoding
into the multibyte representation when loading Lisp files, even if it
was started with the @samp{--unibyte} option. This means that string
constants with non-@acronym{ASCII} characters translate into multibyte
strings. The only exception is when a particular file specifies no
decoding.
The reason Emacs is designed this way is so that Lisp programs give
predictable results, regardless of how Emacs was started. In addition,
this enables programs that depend on using multibyte text to work even
......
......@@ -1411,14 +1411,20 @@ The string @var{lighter} says what to display in the mode line
when the mode is enabled; if it is @code{nil}, the mode is not displayed
in the mode line.
The optional argument @var{keymap} specifies the keymap for the minor mode.
It can be a variable name, whose value is the keymap, or it can be an alist
specifying bindings in this form:
The optional argument @var{keymap} specifies the keymap for the minor
mode. If non-@code{nil}, it should be a variable name (whose value is
a keymap), a keymap, or an alist of the form
@example
(@var{key-sequence} . @var{definition})
@end example
@noindent
where each @var{key-sequence} and @var{definition} are arguments
suitable for passing to @code{define-key} (@pxref{Changing Key
Bindings}). If @var{keymap} is a keymap or an alist, this also
defines the variable @code{@var{mode}-map}.
The above three arguments @var{init-value}, @var{lighter}, and
@var{keymap} can be (partially) omitted when @var{keyword-args} are
used. The @var{keyword-args} consist of keywords followed by
......
......@@ -102,9 +102,6 @@ it contains unibyte encoded text or binary non-text data.
You cannot set this variable directly; instead, use the function
@code{set-buffer-multibyte} to change a buffer's representation.
The @samp{--unibyte} command line option does its job by setting the
default value to @code{nil} early in startup.
@end defvar
@defun position-bytes position
......
......@@ -1189,8 +1189,8 @@ Syntax tables (@pxref{Syntax Tables}).
@node Bool-Vector Type
@subsection Bool-Vector Type
A @dfn{bool-vector} is a one-dimensional array of elements that
must be @code{t} or @code{nil}.
A @dfn{bool-vector} is a one-dimensional array whose elements must
be @code{t} or @code{nil}.
The printed representation of a bool-vector is like a string, except
that it begins with @samp{#&} followed by the length. The string
......
......@@ -1273,22 +1273,24 @@ process's buffer, mimicking the actions of Emacs when there is no
filter. Such filter functions need to use @code{set-buffer} in order to
be sure to insert in that buffer. To avoid setting the current buffer
semipermanently, these filter functions must save and restore the
current buffer. They should also update the process marker, and in some
cases update the value of point. Here is how to do these things:
current buffer. They should also check whether the buffer is still
alive, update the process marker, and in some cases update the value
of point. Here is how to do these things:
@smallexample
@group
(defun ordinary-insertion-filter (proc string)
(with-current-buffer (process-buffer proc)
(let ((moving (= (point) (process-mark proc))))
(when (buffer-live-p (process-buffer proc))
(with-current-buffer (process-buffer proc)
(let ((moving (= (point) (process-mark proc))))
@end group
@group
(save-excursion
;; @r{Insert the text, advancing the process marker.}
(goto-char (process-mark proc))
(insert string)
(set-marker (process-mark proc) (point)))
(if moving (goto-char (process-mark proc))))))
(save-excursion
;; <at> r{Insert the text, advancing the process marker.}
(goto-char (process-mark proc))
(insert string)
(set-marker (process-mark proc) (point)))
(if moving (goto-char (process-mark proc)))))))
@end group
@end smallexample
......@@ -1315,12 +1317,6 @@ expression searching or matching had to explicitly save and restore the
match data. Now Emacs does this automatically for filter functions;
they never need to do it explicitly. @xref{Match Data}.
A filter function that writes the output into the buffer of the
process should check whether the buffer is still alive. If it tries to
insert into a dead buffer, it will get an error. The expression
@code{(buffer-name (process-buffer @var{process}))} returns @code{nil}
if the buffer is dead.
The output to the function may come in chunks of any size. A program
that produces the same output twice in a row may send it as one batch of
200 characters one time, and five batches of 40 characters the next. If
......
2010-08-23 Michael Albinus <michael.albinus@gmx.de>
* dbus.texi (Alternative Buses): New chapter.
2010-08-12 Stefan Monnier <monnier@iro.umontreal.ca>
* cl.texi (Mapping over Sequences): Rename mapc => cl-mapc.
......
......@@ -53,6 +53,7 @@ another. An overview of D-Bus can be found at
* Asynchronous Methods:: Calling methods non-blocking.
* Receiving Method Calls:: Offering own methods.
* Signals:: Sending and receiving signals.
* Alternative Buses:: Alternative buses.
* Errors and Events:: Errors and events.
* Index:: Index including concepts, functions, variables.
......@@ -1579,6 +1580,56 @@ which objects the GNU/Linux @code{hal} daemon adds.
@end defun
@node Alternative Buses
@chapter Alternative buses.
@cindex bus names
@cindex UNIX domain socket
Until now, we have spoken about the system and the session buses,
which are the default buses to be connected to. However, it is
possible to connect to any bus, from which the address is known. This
is a UNIX domain socket. Everywhere, where a @var{bus} is mentioned
as argument of a function (the symbol @code{:system} or the symbol
@code{:session}), this address can be used instead. The connection to
this bus must be initialized first.
@defun dbus-init-bus bus
Establish the connection to D-Bus @var{bus}.
@var{bus} can be either the symbol @code{:system} or the symbol
@code{:session}, or it can be a string denoting the address of the
corresponding bus. For the system and session busses, this function
is called when loading @file{dbus.el}, there is no need to call it
again.
Example: You open another session bus in a terminal window on your host:
@example
# eval `dbus-launch --auto-syntax`
# echo $DBUS_SESSION_BUS_ADDRESS
@print{} unix:abstract=/tmp/dbus-JoFtAVG92w,guid=2f320a1ebe50b7ef58e
@end example
In Emacs, you can access to this bus via its address:
@lisp
(setq my-bus
"unix:abstract=/tmp/dbus-JoFtAVG92w,guid=2f320a1ebe50b7ef58e")
@result{} "unix:abstract=/tmp/dbus-JoFtAVG92w,guid=2f320a1ebe50b7ef58e"
(dbus-init-bus my-bus)
@result{} nil
(dbus-get-unique-name my-bus)
@result{} ":1.0"
@end lisp
@end defun
@node Errors and Events
@chapter Errors and events.
@cindex debugging
......
......@@ -2,6 +2,10 @@
* HELLO: Change designation sequences for Arabic text.
2010-08-23 Michael Albinus <michael.albinus@gmx.de>
* NEWS: dbus.el supports alternative buses.
2010-08-14 Eli Zaretskii <eliz@gnu.org>
* tutorials/TUTORIAL.he: Use MAQAF instead of hyphen where appropriate.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment