Drew Adams | 1 Oct 2007 01:35
Picon
Favicon

how to save a face in Lisp?

In Lisp, how can I save a face to the user's custom-file after it has been
changed (or to cause it to be saved when Emacs is quit)?

For a variable, it's enough to call `customize-save-variable', but I don't
know the equivalent for faces. Perhaps it would be enough to `put' the spec
as property `saved-face' for the face? Or as property `defface-spec'? I'm
not sure how this stuff works.

[Obviously, this code would only be invoked by the user, aware that s?he was
saving the changed face. I would not save settings behind the user's back.]
Amy Templeton | 1 Oct 2007 02:13
Face
Picon

Re: doc-view: Document quality and find-file

Peter Dyballa <Peter_Dyballa <at> Web.DE> wrote:
> Am 18.09.2007 um 00:15 schrieb Amy Templeton:

> > However, reduced sizes just seem to make it worse, oddly, whereas larger
> > ones make it easier to read. I don't presume to have an explanation.

> Can you send me such a representative scan?

I thought I'd replied to this, but it looks like I forgot to. Upon further
examination, it turns out you were right--the characters do become nicer at
smaller sizes, but I personally do still find larger ones easier to read
because in these particular cases the text is small to begin with.

Thanks again,
Amy

--

-- 
November, n.:
        The eleventh twelfth of a weariness.
                -- Ambrose Bierce, "The Devil's Dictionary"
Amy Templeton | 1 Oct 2007 02:16
Face
Picon

Re: Muse mode faces

Michael Olson <mwolson <at> gnu.org> wrote:
> Amy Templeton <amy.g.templeton <at> gmail.com> writes:
> > I've tried to customize the faces in muse-mode (I use planner with
> > muse). However, every time I start a new emacs instance (usually after
> > having turned my computer off), the original faces have returned
> > (specifically, I want to change the headers so that they won't be
> > unusually tall or in a different font, or bold, but will be different
> > colors). This is especially odd since all of my (require 'such-and-such)
> > commands are loaded *before* my customize file, and also because the
> > color-theme I use isn't supposed to change those (just in case, I set
> > them to what I prefer in the color theme, but the same problem still
> > occurs). Any ideas on what's going on here? I've checked my .emacs for
> > any code that would change these faces back, to no avail...

> Set muse-colors-autogen-headings to nil.

That worked. Thanks a lot!

Amy

--

-- 
One-Shot Case Study, n.:
        The scientific equivalent of the four-leaf clover, from which it is
        concluded all clovers possess four leaves and are sometimes green.
Martin Rubey | 1 Oct 2007 08:43
Picon
Favicon

comint and point

Dear all,

I'm still having a bad time with sending stuff to a proces, parsing the output
and deleting stuff and its output in comint mode.  The thing that worries me
most: I have no idea what's going out and how things are intended to work.

The bigger picture is as follows: I'm writting a specialised mode derived from
comint for a computer algebra system called axiom.  It does things like color
the output and make it read only, and enable tab-completion for file names if
the user is currently entering a system command, etc...

For the latter feature, I need to track the directory I'm in.  So here's the
plan: 

I can assume that we are just after an axiom prompt.

* delete the prompt

* send the axiom command ")sys pwd" to the axiom process, which will spit out
  the directory name.

* move a line backwards and to the end of this line

* cd to the directory, which is given by the text in the current line

* delete the line

The following code works roughly, as long as I'm using emacs 21 on X.  It
doesn't seem to work with emacs -nw.

(Continue reading)

Seweryn Kokot | 1 Oct 2007 09:56
Picon

elisp, replace-regexp and re-search-forward

Hello,

I try to write a function that operate on a region and which inserts a newline
between each line, for example.
   from:
aaa
bbb
ccc
   to:
aaa

bbb

ccc
-------

My first attempt is the following function which does the job
(defun my-test (beg end)
  (interactive "r")
  (replace-regexp "\n" "\n\n" nil beg end))

however in Emacs help for replace-regexp I see that it is not good to use
replace-regexp function. Instead it is recommended to use re-search-forward and
replace-match. So I try with such a function, but it does not work.

(defun my-test-two (beg end)
  (interactive "r")
    (while (re-search-forward "\n" end t)
      (replace-match "\n\n" nil nil)))

(Continue reading)

Bourgneuf Francois | 1 Oct 2007 11:08
Picon

RE: elisp, replace-regexp and re-search-forward

 You don't need to use a regexp.
(query-replace "\n" "\n\n") will do the job
Bour9

> -----Message d'origine-----
> De : 
> help-gnu-emacs-bounces+francois.bourgneuf=groupe-mma.fr <at> gnu.or
> g 
> [mailto:help-gnu-emacs-bounces+francois.bourgneuf=groupe-mma.f
> r <at> gnu.org] De la part de Seweryn Kokot
> Envoyé : lundi 1 octobre 2007 09:57
> À : help-gnu-emacs <at> gnu.org
> Objet : elisp, replace-regexp and re-search-forward
> 
> Hello,
> 
> I try to write a function that operate on a region and which 
> inserts a newline
> between each line, for example.
>    from:
> aaa
> bbb
> ccc
>    to:
> aaa
> 
> bbb
> 
> ccc
> -------
(Continue reading)

Dmitri Minaev | 1 Oct 2007 11:27
Picon

Re: which of the many .el's is best for (simple?) html, etc?

On 29 Sep 2007 01:14:55 -0400, David Combs <dkcombs <at> panix.com> wrote:
> Here's the page in emacswiki that lists the various
> emacs-packages that pertain to creating web-pages.
>
> Which are your favorites?  (Why?)
>
> Which are capable and yet easy to learn?

I use html-helper-mode. Other modes may be better, but I got used to
this one :). It is simple and has an extensive list of keyboard
accelerators.

--

-- 
With best regards,
Dmitri Minaev

Russian history blog: http://minaev.blogspot.com
Eli Zaretskii | 1 Oct 2007 11:30
Picon

Re: void functions network-interface-xxx??

> From: Peter Tury <tury.peter <at> gmail.com>
> Date: Sun, 30 Sep 2007 18:52:55 GMT
> 
> I use official prebuilt GNU Emacs on Windows XP. I get an error
> "void-function" both for `network-interface-list' and for
> `network-interface-info'. Is this a bug? (They are unknown for
> `describe-function', but documented in (elisp)Misc Network...)

This is a documentation bug: these functions are available only on
some systems, which support special ioctl commands that are the basis
for the implementation of these functions (notably, GNU/Linux).
Windows doesn't support that functionality, so the functions are not
available.

I will update the ELisp manual accordingly (and try to look for a
possible alternative implementation on Windows).

Thanks for pointing this out (but in the future, please post this to
bug-gnu-emacs or emacs-devel, not here).
Eli Zaretskii | 1 Oct 2007 11:36
Picon

Re: processes' filter functions and buffers -- data chunks

> From: Peter Tury <tury.peter <at> gmail.com>
> Date: Sun, 30 Sep 2007 21:02:02 GMT
> 
> I read in (elisp)Filter Functions that "[A process'] output to the
> [filter] 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."
> 
> What determines how and why this splitting happens? Is this an Emacs
> feature? Or depends only on the process (e.g. the program what Emacs
> connects to)? Or is this OS-dependent?

I think this is system-specific buffering of the pipe/pty used by
Emacs to communicate with subordinate processes.

> However, output is OK (=always showed up completely) in "Command/DOS
> windows"

AFAIK, that's because output to the console is normally line-buffered
or unbuffered, while pipes are usually fully buffered.

> I found this "unpredictable" splitting quite annoying and I don't know
> if I have chance to avoid this behaviour by modifying the peer program
> or I absolutely have to live with this feature?

If you can modify the subordinate program so that it uses less
aggressive buffering on its stdout/stderr, you _may_ see some
improvement (but not with certainty, since some of the buffering is in
the filesystem, not in the application).  But I think this solution is
impractical, since most programs cannot be practically changed in such
(Continue reading)

Peter Tury | 1 Oct 2007 12:51
Picon

Re: void functions network-interface-xxx??

Eli Zaretskii <eliz <at> gnu.org> writes:

> Thanks for pointing this out (but in the future, please post this to
> bug-gnu-emacs or emacs-devel, not here).

Yes, I planned to report this at the bug-group, if you answer so, but
thought it is better not to report there while I am unsure... In the
future I'll ask there such things directly.

Thanks!
P

Gmane