all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Per-File Auto fill mode?
@ 2003-04-25 22:46 Linards Ticmanis
  2003-04-26  9:27 ` Oliver Scholz
  2003-04-26 14:31 ` Kai Großjohann
  0 siblings, 2 replies; 14+ messages in thread
From: Linards Ticmanis @ 2003-04-25 22:46 UTC (permalink / raw)


Hi Group,

When I type Greek text (polytonic) for LaTeX into emacs, I use the
following first line to prevent the dumb autoformatting of quote marks
that are used as accent marks for Greek and thus must be retained as
typed in.

% -*- Coding: iso-8859-7; mode: fundamental; -*- %

While I'm at it can I turn on auto-fill in this line too? What do I
have to write? (I don't want it for all files or even all
"fundamental" files though.)

Another thing, in polytonic Greek the first line of a paragraph will
often start with a ">" marking a "soft breathing" mark on the vowel.
However emacs insists that I meant this as a "quoted text" mark and
starts all the other lines in that paragrapg with ">" too
automatically, and I have to delete it all the time which is annoying.
Leaving out the first breathing and then having to remember it at the
end of the paragraph is annoying too. Is there some way to get emacs
to be *really* dumb and insert exactly those characters into the file
that I'm actually typing in, without making (its idea of) educated
guesses?

thanks,

-- 
Linards Ticmanis

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Per-File Auto fill mode?
  2003-04-25 22:46 Per-File Auto fill mode? Linards Ticmanis
@ 2003-04-26  9:27 ` Oliver Scholz
  2003-04-26 14:30   ` Linards Ticmanis
                     ` (2 more replies)
  2003-04-26 14:31 ` Kai Großjohann
  1 sibling, 3 replies; 14+ messages in thread
From: Oliver Scholz @ 2003-04-26  9:27 UTC (permalink / raw)


ticmanis@coli.uni-sb.de (Linards Ticmanis) writes:

> Hi Group,
>
> When I type Greek text (polytonic) for LaTeX into emacs, I use the
> following first line to prevent the dumb autoformatting of quote marks
> that are used as accent marks for Greek and thus must be retained as
> typed in.
>
> % -*- Coding: iso-8859-7; mode: fundamental; -*- %
>
> While I'm at it can I turn on auto-fill in this line too? What do I
> have to write? (I don't want it for all files or even all
> "fundamental" files though.)

Yes, specify `auto-fill' *after* the major mode:

% -*- mode: fundamental; mode: auto-fill -*-

> Another thing, in polytonic Greek the first line of a paragraph will
> often start with a ">" marking a "soft breathing" mark on the vowel.
> However emacs insists that I meant this as a "quoted text" mark and
> starts all the other lines in that paragrapg with ">" too
> automatically, and I have to delete it all the time which is annoying.
> Leaving out the first breathing and then having to remember it at the
> end of the paragraph is annoying too. Is there some way to get emacs
> to be *really* dumb and insert exactly those characters into the file
> that I'm actually typing in, without making (its idea of) educated
> guesses?

FWIW, I use AUCTeX for writing classical Greek in LaTeX and I don't
have such problems. You can always insert a literal quotation mark by
typing `C-q "'. Or, if that is not satisfying, you get probably more
convenient results if you turn off the autoformatting of quotation
marks in latex-mode instead of using fundamental-mode;
fundamental-mode is a bit ... erm ... fundamental.

    Oliver
-- 
7 Floréal an 211 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Per-File Auto fill mode?
  2003-04-26  9:27 ` Oliver Scholz
@ 2003-04-26 14:30   ` Linards Ticmanis
  2003-04-27 13:58   ` gebser
       [not found]   ` <mailman.5251.1051451759.21513.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 14+ messages in thread
From: Linards Ticmanis @ 2003-04-26 14:30 UTC (permalink / raw)


Oliver Scholz <alkibiades@gmx.de> wrote in message news:<87k7dhhaml.

> Yes, specify `auto-fill' *after* the major mode:
> 
> % -*- mode: fundamental; mode: auto-fill -*-

Dankeschoen. Works like a charm.

> FWIW, I use AUCTeX for writing classical Greek in LaTeX and I don't
> have such problems. You can always insert a literal quotation mark by
> typing `C-q "'. Or, if that is not satisfying, you get probably more
> convenient results if you turn off the autoformatting of quotation
> marks in latex-mode instead of using fundamental-mode;

Yeah that sure is a better idea. Had to get rid of the other junk in
my .emacs though since it wouldn't ever get to the custom variables
section. Good riddance - I think the stuff was still from the 1995
"DLD" Linux distribution, remains of which keep hauting my system....

Nochmals danke,
-- 
Linards Ticmanis

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Per-File Auto fill mode?
  2003-04-25 22:46 Per-File Auto fill mode? Linards Ticmanis
  2003-04-26  9:27 ` Oliver Scholz
@ 2003-04-26 14:31 ` Kai Großjohann
  2003-04-27  8:23   ` Karl Eichwalder
  1 sibling, 1 reply; 14+ messages in thread
From: Kai Großjohann @ 2003-04-26 14:31 UTC (permalink / raw)


ticmanis@coli.uni-sb.de (Linards Ticmanis) writes:

> When I type Greek text (polytonic) for LaTeX into emacs, I use the
> following first line to prevent the dumb autoformatting of quote marks
> that are used as accent marks for Greek and thus must be retained as
> typed in.

If you use AUCTeX: I'm sure that can be told to leave quotes alone.
For example, when I put \usepackage{ngerman} into the preamble, I get
no special meaning of " at all -- it's self-inserting.

So it's possible to tell AUCTeX to do whatever it now does for the
german and ngerman packages, and then Bob's your uncle.

How about that?
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Per-File Auto fill mode?
  2003-04-26 14:31 ` Kai Großjohann
@ 2003-04-27  8:23   ` Karl Eichwalder
  2003-04-27 12:02     ` Kai Großjohann
  2003-04-27 13:01     ` Oliver Scholz
  0 siblings, 2 replies; 14+ messages in thread
From: Karl Eichwalder @ 2003-04-27  8:23 UTC (permalink / raw)


kai.grossjohann@gmx.net (Kai Großjohann) writes:

> If you use AUCTeX: I'm sure that can be told to leave quotes alone.
> For example, when I put \usepackage{ngerman} into the preamble, I get
> no special meaning of " at all -- it's self-inserting.

This might work but in the long run Emacs should offer proper language
environemnts, environments like "UTF-8" or "latin-15" are sure not
enough for most languages.  Example:

In German, Emacs must learn to accept »as properly quoted«;
unfortunately, Emacs insists »...« does not match and wants me to turn
it into «...».  Also matching these German „Anführungszeichen“ is a
no-op.

-- 
                                                         |      ,__o
http://www.gnu.franken.de/ke/                            |    _-\_<,
ke@suse.de (work) / keichwa@gmx.net (home)               |   (*)/'(*)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Per-File Auto fill mode?
  2003-04-27  8:23   ` Karl Eichwalder
@ 2003-04-27 12:02     ` Kai Großjohann
  2003-04-27 13:08       ` Karl Eichwalder
  2003-04-27 13:01     ` Oliver Scholz
  1 sibling, 1 reply; 14+ messages in thread
From: Kai Großjohann @ 2003-04-27 12:02 UTC (permalink / raw)


Karl Eichwalder <keichwa@gmx.net> writes:

> kai.grossjohann@gmx.net (Kai Großjohann) writes:
>
>> If you use AUCTeX: I'm sure that can be told to leave quotes alone.
>> For example, when I put \usepackage{ngerman} into the preamble, I get
>> no special meaning of " at all -- it's self-inserting.
>
> This might work but in the long run Emacs should offer proper language
> environemnts, environments like "UTF-8" or "latin-15" are sure not
> enough for most languages.  Example:

??

> In German, Emacs must learn to accept »as properly quoted«;
> unfortunately, Emacs insists »...« does not match and wants me to turn
> it into «...».  Also matching these German „Anführungszeichen“ is a
> no-op.

Well, AUCTeX arranges for recognizing "`..."' as strings, so why
should »...« or „...“ be impossible?

Just do it.  And then, submit it to the AUCTeX maintainers.
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Per-File Auto fill mode?
  2003-04-27  8:23   ` Karl Eichwalder
  2003-04-27 12:02     ` Kai Großjohann
@ 2003-04-27 13:01     ` Oliver Scholz
  1 sibling, 0 replies; 14+ messages in thread
From: Oliver Scholz @ 2003-04-27 13:01 UTC (permalink / raw)


Karl Eichwalder <keichwa@gmx.net> writes:
[...]
> This might work but in the long run Emacs should offer proper language
> environemnts, environments like "UTF-8" or "latin-15" are sure not
> enough for most languages.  Example:

I'd prefer to have a simple buffer-local variable like
`buffer-language', together with a text property of the same name that
is meant to override the value of the variable if it is non-nil.

Packages that want to provide some sort of localization could then
query the variable or the text property.

Language environments like “German” would set the default for the
variable then, while language environments that specify a coding
system only, like “Latin-1”, won't.

> In German, Emacs must learn to accept »as properly quoted«;
> unfortunately, Emacs insists »...« does not match and wants me to turn
> it into «...».  Also matching these German „Anführungszeichen“ is a
> no-op.
[...]

The same is also true for English “quotation marks”. :-)

    Oliver
-- 
8 Floréal an 211 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Per-File Auto fill mode?
  2003-04-27 12:02     ` Kai Großjohann
@ 2003-04-27 13:08       ` Karl Eichwalder
  2003-04-27 14:02         ` Kai Großjohann
  0 siblings, 1 reply; 14+ messages in thread
From: Karl Eichwalder @ 2003-04-27 13:08 UTC (permalink / raw)


kai.grossjohann@gmx.net (Kai Großjohann) writes:

> Well, AUCTeX arranges for recognizing "`..."' as strings, so why
> should »...« or „...“ be impossible?

At the moment, I'm not that much interested in AUC TeX ;)

> Just do it.  And then, submit it to the AUCTeX maintainers.

I once tried to add »...« to po-mode and failed half way; I don't know
how to do it properly:

;; From the Emacs Lisp manual (`Example Major Modes'):
(defvar latin1:de-syntax-table nil
  "Syntax table used while in latin1 (de) mode, e.g. for german texts.")

(if latin1:de-syntax-table
    ()                   ; Do not change the table if it is already set up.
  (setq latin1:de-syntax-table  (make-syntax-table))
  ;; change matching parenthesis': »...«
  (modify-syntax-entry ?\» "(\«" latin1:de-syntax-table)
  (modify-syntax-entry ?\« ")\»" latin1:de-syntax-table))

-- 
                                                         |      ,__o
http://www.gnu.franken.de/ke/                            |    _-\_<,
ke@suse.de (work) / keichwa@gmx.net (home)               |   (*)/'(*)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Per-File Auto fill mode?
  2003-04-26  9:27 ` Oliver Scholz
  2003-04-26 14:30   ` Linards Ticmanis
@ 2003-04-27 13:58   ` gebser
       [not found]   ` <mailman.5251.1051451759.21513.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 14+ messages in thread
From: gebser @ 2003-04-27 13:58 UTC (permalink / raw)



Thanks much, Oliver,

I was just wondering how to do this very thing, so you've helped twice.  
However, I want to use outline mode and turn off auto-fill.  I've got 
the first part, but not the second, i.e.,

% -*- mode: outline; auto-fill nil; -*-

does put the buffer in outline mode, but I haven't been able to turn off 
auto-fill mode.  Besides "nil", I've also tried "0" and "-1", neither of 
which turn off auto-fill.  Using in its stead "fill-column: 10000;" 
works (I don't get automatic wrapping), but I was wondering if there was 
a cleaner solution.


Thanks again,
ken


At 11:27 (UTC+0200) on Sat, 26 Apr 2003 Oliver Scholz said:

= ticmanis@coli.uni-sb.de (Linards Ticmanis) writes:
= 
= > Hi Group,
= >
= > When I type Greek text (polytonic) for LaTeX into emacs, I use the
= > following first line to prevent the dumb autoformatting of quote marks
= > that are used as accent marks for Greek and thus must be retained as
= > typed in.
= >
= > % -*- Coding: iso-8859-7; mode: fundamental; -*- %
= >
= > While I'm at it can I turn on auto-fill in this line too? What do I
= > have to write? (I don't want it for all files or even all
= > "fundamental" files though.)
= 
= Yes, specify `auto-fill' *after* the major mode:
= 
= % -*- mode: fundamental; mode: auto-fill -*-
= 
= ...
=     Oliver
= 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Per-File Auto fill mode?
  2003-04-27 13:08       ` Karl Eichwalder
@ 2003-04-27 14:02         ` Kai Großjohann
  2003-04-27 17:21           ` Karl Eichwalder
  0 siblings, 1 reply; 14+ messages in thread
From: Kai Großjohann @ 2003-04-27 14:02 UTC (permalink / raw)


Karl Eichwalder <keichwa@gmx.net> writes:

> I once tried to add »...« to po-mode and failed half way; I don't know
> how to do it properly:
>
> ;; From the Emacs Lisp manual (`Example Major Modes'):
> (defvar latin1:de-syntax-table nil
>   "Syntax table used while in latin1 (de) mode, e.g. for german texts.")
>
> (if latin1:de-syntax-table
>     ()                   ; Do not change the table if it is already set up.
>   (setq latin1:de-syntax-table  (make-syntax-table))
>   ;; change matching parenthesis': »...«
>   (modify-syntax-entry ?\» "(\«" latin1:de-syntax-table)
>   (modify-syntax-entry ?\« ")\»" latin1:de-syntax-table))

Now you have a syntax table.  But it seems there is no code to
actually use it.
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Per-File Auto fill mode?
  2003-04-27 14:02         ` Kai Großjohann
@ 2003-04-27 17:21           ` Karl Eichwalder
  2003-04-27 19:10             ` Kai Großjohann
  0 siblings, 1 reply; 14+ messages in thread
From: Karl Eichwalder @ 2003-04-27 17:21 UTC (permalink / raw)


kai.grossjohann@gmx.net (Kai Großjohann) writes:

> Now you have a syntax table.  But it seems there is no code to
> actually use it.

Ehm, yes, it was also possible the activate it using and add-hook
statement, but then it interfered with some built-in feature.

-- 
                                                         |      ,__o
http://www.gnu.franken.de/ke/                            |    _-\_<,
ke@suse.de (work) / keichwa@gmx.net (home)               |   (*)/'(*)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Per-File Auto fill mode?
  2003-04-27 17:21           ` Karl Eichwalder
@ 2003-04-27 19:10             ` Kai Großjohann
  0 siblings, 0 replies; 14+ messages in thread
From: Kai Großjohann @ 2003-04-27 19:10 UTC (permalink / raw)


Karl Eichwalder <keichwa@gmx.net> writes:

> kai.grossjohann@gmx.net (Kai Großjohann) writes:
>
>> Now you have a syntax table.  But it seems there is no code to
>> actually use it.
>
> Ehm, yes, it was also possible the activate it using and add-hook
> statement, but then it interfered with some built-in feature.

What happened?

Maybe po-mode uses its own syntax table, and what you really need to
do is to frob that?  I know nothing about po-mode.
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Per-File Auto fill mode?
       [not found]   ` <mailman.5251.1051451759.21513.help-gnu-emacs@gnu.org>
@ 2003-04-28 14:53     ` Oliver Scholz
  2003-05-01 14:01       ` gebser
  0 siblings, 1 reply; 14+ messages in thread
From: Oliver Scholz @ 2003-04-28 14:53 UTC (permalink / raw)


gebser@ameritech.net writes:

> Thanks much, Oliver,
>
> I was just wondering how to do this very thing, so you've helped twice.  
> However, I want to use outline mode and turn off auto-fill.  I've got 
> the first part, but not the second, i.e.,
>
> % -*- mode: outline; auto-fill nil; -*-

[The leading “%” is a comment-char, it is necessary only for
LaTeX-files.]

Well, the line I posted earlier actually _toggles_ auto-fill-mode, so
if your have it normally turned _off_, you can use the same line.

A better solution would be to use something like this:

-*-mode: outline; eval: (auto-fill-mode -1) -*-

But this has the disadvantage that you are queried each time you open
the file whether you want the local variables section to be evaluated.

Is there any reason why you don't have auto-fill-mode turned on by
default? For example with:

(add-hook 'text-mode-hook 'turn-on-auto-fill)

This would also work for outline-mode. Then if you don't want this
for some text-mode derivative, you can turn it off:

(add-hook 'some-special-mode-hook
	  (lambda ()
	    (auto-fill-mode -1)))


    Oliver
-- 
9 Floréal an 211 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Per-File Auto fill mode?
  2003-04-28 14:53     ` Oliver Scholz
@ 2003-05-01 14:01       ` gebser
  0 siblings, 0 replies; 14+ messages in thread
From: gebser @ 2003-05-01 14:01 UTC (permalink / raw)
  Cc: help-gnu-emacs

At 16:53 (UTC+0200) on Mon, 28 Apr 2003 Oliver Scholz said:

= gebser@ameritech.net writes:
= 
= > Thanks much, Oliver,
= >
= > I was just wondering how to do this very thing, so you've helped twice.  
= > However, I want to use outline mode and turn off auto-fill.  I've got 
= > the first part, but not the second, i.e.,
= >
= > % -*- mode: outline; auto-fill nil; -*-
= 
= [The leading “%” is a comment-char, it is necessary only for
= LaTeX-files.]

The "%" (percent) character.  Understood.  Thanks.

= 
= Well, the line I posted earlier actually _toggles_ auto-fill-mode, so
= if your have it normally turned _off_, you can use the same line.
= 
= A better solution would be to use something like this:
= 
= -*-mode: outline; eval: (auto-fill-mode -1) -*-
= 
= But this has the disadvantage that you are queried each time you open
= the file whether you want the local variables section to be evaluated.

Tried this and I see what you mean.  It's interesting, but I could see 
where it'd become tiresome before too long.


= 
= Is there any reason why you don't have auto-fill-mode turned on by
= default? For example with:

Well, I do have it turned on by default.  I was just trying to 
anticipate the possibility that I might have it turned off by default.


Thanks again,
ken

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2003-05-01 14:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-25 22:46 Per-File Auto fill mode? Linards Ticmanis
2003-04-26  9:27 ` Oliver Scholz
2003-04-26 14:30   ` Linards Ticmanis
2003-04-27 13:58   ` gebser
     [not found]   ` <mailman.5251.1051451759.21513.help-gnu-emacs@gnu.org>
2003-04-28 14:53     ` Oliver Scholz
2003-05-01 14:01       ` gebser
2003-04-26 14:31 ` Kai Großjohann
2003-04-27  8:23   ` Karl Eichwalder
2003-04-27 12:02     ` Kai Großjohann
2003-04-27 13:08       ` Karl Eichwalder
2003-04-27 14:02         ` Kai Großjohann
2003-04-27 17:21           ` Karl Eichwalder
2003-04-27 19:10             ` Kai Großjohann
2003-04-27 13:01     ` Oliver Scholz

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.