ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Emacs
       [not found] <3.0.5.32.20030726161830.00b22cf0@mail.northcoast.com>
@ 2003-07-27  8:12 ` Guy Worthington
  2003-07-28  7:33 ` Emacs Mari Voipio
  2003-07-28 16:57 ` Emacs Alexander Klink
  2 siblings, 0 replies; 11+ messages in thread
From: Guy Worthington @ 2003-07-27  8:12 UTC (permalink / raw)
  Cc: auc-tex

David Arnold wrote:

> What can people tell me about setting up Emacs to work with Context?

> I'd like to gather all information I can.

Hello David,

I run fptex using Emacs 21.3 as an editor on a win2k box.

The customizations I describe below, have been hoarded from various
sources over some period (which of course has generated spaghetti
code).  Regularly, I promise myself, that I'll clean the code up, but
unfortunately my emacs has now become so electric, and the code so
opaque, that for me, it would be a major effort.

The ASCII figure below, shows how I've grouped my customizations into
different files.  I'd like to say that each file customizes a specific
behaviour in emacs, but I can't; the split up is not that logical.

                          default.el
                              |
     --------------------------
     |                        |
mmm-site.el          text-mode-site.el
                              |
                       context-site.el




Starting from the top:



default.el contains the look and feel.  My preferences being to:

  1) keep the Emacs display fairly small (80 character wide, and 
     30 lines deep);

  2) have syntax highlighting wound up to the maximum

The only external lisp code, in default.el is for parenthesis
highlighting.  The package is called mic-paren.el.


;; default.el -------------------------------------------------------

;; set a default font for W3
(setq w32-enable-italics t) ; This must be done before font settings!
;Set the default color, font and frame size for the initial frame.
(setq default-frame-alist
      '(;(menu-bar-lines)
	(vertical-scroll-bars)
	(top . 30) (left . 30)
	(width . 80) (height . 30)
	(cursor-color . "Red")
	(cursor-type . bar)
	(foreground-color . "black")
	(background-color . "IVORY")
	(font . "-*-Courier New-normal-r-*-*-11-82-96-96-c-*-iso8859-1")))

(set-face-background 'modeline "navy")
(set-face-foreground 'modeline "gold")

(set-face-font 'italic "-*-Courier New-normal-i-*-*-11-82-96-96-c-*-iso8859-1")
(set-face-font 'bold "-*-Courier New-bold-r-*-*-11-82-96-96-c-*-iso8859-1")
(set-face-font 'bold-italic "-*-Courier New-bold-i-*-*-11-82-96-96-c-*-iso8859-1")

;; display ISO-Latin-1 characters with accents
;; required for gnus summary display
(standard-display-european t)
;; switch to ISO-Latin-1 (emacs > 20.3)
(set-language-environment "Latin-1")

;; Set the default coding system to be foo-unix, instead of the foo-dos
(setq default-buffer-file-coding-system 'latin-1-unix)

;; allow multiple major modes
(require 'mmm-site)

;; completion-ignored-extensions
(setq completion-ignored-extensions
      (append completion-ignored-extensions
	      (list ".ilg" ".ind" ".pdf" ".tui" ".tuo" ".ted" ".tmp"
		    ".orig" ".ps" ".mp" ".mpo" "mpd"
		    ".1" ".2" ".3" ".4" ".5" ".6" ".7" ".8" ".9")))

;; fontification font-lock.el
;; Must be defined before font lock is loaded.
(setq font-lock-maximum-decoration t)
(global-font-lock-mode t)

;; lazy-lock-mode on by default
(setq font-lock-support-mode 'lazy-lock-mode
      lazy-lock-defer-on-scrolling t)

;; mic-paren.el display highlighting on parenthesis
;; http://www.docs.uu.se/~mic/emacs.html
(require 'mic-paren)
(paren-activate)

;; text mode
(require 'text-mode-site)

;; end of default.el-----------------------------------------------------



mmm-site

Because ConTeXt has now become so intertwined with metapost, I now run
two major modes within a single buffer.  I've embedded the metapost
inside the ConTeXt, using the external mode, MMM Mode.  This package
also doesn't come with Emacs.

;; mmm-site.el --------------------------------------------------
;; load just enough of mmm mode so that it turns itself on
(require 'mmm-auto)

(setq mmm-global-mode 'maybe)

;; for context/metapost
(mmm-add-group 'context-metapost
	       '((context-MPgraphic
		  :submode metapost-mode
		  :face mmm-code-submode-face
		  :front "\\\\startuseMPgraphic"
		  :back "\\\\stopuseMPgraphic")
		 (context-MPcode
		  :submode metapost-mode
		  :face mmm-code-submode-face
		  :front "\\\\startMPcode"
		  :back "\\\\stopMPcode")
		 ))

(add-to-list 'mmm-mode-ext-classes-alist '(nil "\\.ctx\\'" context-metapost))

(provide 'mmm-site)
;; ----------------------------------------------------------------------



text-mode-site.el

text-mode-site provide a couple of electric features, that are common
to all text files (XML files, emails, etc.).  I'm a very slow typist,
and word expansion speeds up my typing. (After my space-bar, I think 
ctrl-<TAB> is my most used key.)

Bracket completion is also very useful.

;;; text-mode-site.el ---------------------------------------------------

;;;;;;;;;;;;;;;;;;;;;Ralf Stubner (from comp.text.tex newsgroup)
(require 'tempo)
(setq transient-mark-mode t)
; `tempo-define-template' returns an interactive function, which is
; then bound to the appropriate key. The `r' simply stands for
; `region'. There are many more possibilities here.
(defun my-text-mode-hook ()
     (local-set-key
      "{" (tempo-define-template "TeX-schweif" '("{" r "}")))
     (local-set-key
      "(" (tempo-define-template "TeX-rundekl" '("(" r ")")))
     (local-set-key
      "[" (tempo-define-template "TeX-eckigek" '("[" r "]")))
;;      (local-set-key
;;       "^" (tempo-define-template "TeX-exponen" '("^{" r "}")))
;;      (local-set-key
;;        "_" (tempo-define-template "TeX-subscri" '("_{" r "}")))
;;      (local-set-key
;;       "$" (tempo-define-template "TeX-dollarm" '("$" r "$")))
     (local-set-key
      "<" (tempo-define-template "XML-tag" '("<" r ">")))
     (turn-on-filladapt-mode)
     (ispell-minor-mode 1)
     (abbrev-mode 1))
(add-hook 'text-mode-hook 'my-text-mode-hook)
;;;;;;;;;;;;;;;;;;;;;

;; Klaus Berndl
;; we want to complete and expand as much as possible in all buffers.
;; order of try-functions is significant!
;; includes the whole dabbrev-stuff!
(require 'hippie-exp)
(setq hippie-expand-try-functions-list
      '(;; try-complete-tempo-tag
        try-expand-dabbrev
        try-expand-dabbrev-all-buffers
        try-expand-dabbrev-from-kill
        try-complete-file-name-partially
        try-complete-file-name
        ;;        try-expand-list
        try-complete-lisp-symbol-partially
        try-complete-lisp-symbol
        try-expand-whole-kill))
;; the expand-function. Called with a positive prefix <P> it jumpes direct
;; to the <P>-th try-function.
(defun my-hippie-expand (arg)
  (interactive "P")
  ;; hippie-expand does not have a customization-feature (like
  ;; dabbrev-expand) to search case-sensitive for completions.
  ;; So we must set 'case-fold-search' temp. to nil!
  (let ((old-case-fold-search case-fold-search))
    (setq case-fold-search nil)
    (hippie-expand arg)
    (setq case-fold-search old-case-fold-search)
    )
  )
;; all expansion is done by 'my-hippie-expand bound to C-TAB!
(global-set-key (quote [C-tab]) (quote my-hippie-expand))
;;

(require 'context-site)

(provide 'text-mode-site)

;; end of text-mode-site -------------------------------------------




context-site.el 

The other major mode is ConTeXt, it requires the external package, 
context.el, which is available from the third-party packages on 
Hans Hagen's pragma-ade web site.


;; context-site.el -----------------------------------------------------

(require 'context)

(setq auto-mode-alist (cons '("\\.ctx$" . tex-mode) auto-mode-alist))

(provide 'context-site)

;; end of context-site.el----------------------------------------------


As you can see it is very spartan.  Indeed the file isn't really
needed since I call conTeXt files by using Local variables hooks in my
ConTeXt source code.  That is, I append, the following tags to the end
of every ConTeXt file:

%%% Local Variables:
%%% mode:context
%%% indent-tabs-mode:nil 
%%% End:



Invoking ConTeXt:

I don't use Emacs to invoke ConTeXt.  I invoke it from a separate
command shell, using the fptex executable texexec, and a view the
resultant pdf file using the fptex executable pdfopen, and afterwards
close it using pdfclose.

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

* Re: Emacs
       [not found] <3.0.5.32.20030726161830.00b22cf0@mail.northcoast.com>
  2003-07-27  8:12 ` Emacs Guy Worthington
@ 2003-07-28  7:33 ` Mari Voipio
  2003-07-28 15:52   ` Emacs David Arnold
  2003-07-28 16:57 ` Emacs Alexander Klink
  2 siblings, 1 reply; 11+ messages in thread
From: Mari Voipio @ 2003-07-28  7:33 UTC (permalink / raw)


On Sat, 26 Jul 2003, David Arnold wrote:
> What can people tell me about setting up Emacs to work with Context?

I use TeXLive7 + NTEmacs + Berend Boer's context.el (ConTeXt mode) and my
OS is Windows (NT/2000/XP depending on the computer I happen to be using).
I tried using WinEdt as the editor, but as I was already familiar with
Emacs I found that using NtEmacs was a lot easier (less mousework, too)
and I now do all my ConTeXt work with this setup.

NTEmacs comes on the TeXLive CD so installing it is very easy, this can be
done in connection with the TeXLive installation or right after it. I've
never had problems with the Emacs part of the installation. :-)

After installing TeXLive and NTEmacs I go to Berend's homepage and get the
context.el (http://www.berenddeboer.net/emacs/index.html), create a .emacs
settings file and add the required lines in there (or, nowadays, I just
copy my old .emacs from another computer); the README tells you what to
do. Or, if you think it will be helpful, I can give you a copy of mine or
the relevant lines of mine.

There's another helpful Emacs mode that I've downloaded (and made work) on
one of the computers I use, but I haven't really gotten used to it yet;
should be real handy, though: etexshow, Patrick Gundlach's browser for
ConTeXt commands. That you can get at <http://levana.de/emacs/>.

I have no idea how to make things work in unix or linux, but the Windows
part is not too bad if one has an idea of Emacs otherwise.


Hope this helps,
		Mari

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

* Re: Emacs
  2003-07-28  7:33 ` Emacs Mari Voipio
@ 2003-07-28 15:52   ` David Arnold
  0 siblings, 0 replies; 11+ messages in thread
From: David Arnold @ 2003-07-28 15:52 UTC (permalink / raw)


Mari,

Thanks. I have all of this working.

At 10:33 AM 7/28/03 +0300, you wrote:
>On Sat, 26 Jul 2003, David Arnold wrote:
>> What can people tell me about setting up Emacs to work with Context?
>
>I use TeXLive7 + NTEmacs + Berend Boer's context.el (ConTeXt mode) and my
>OS is Windows (NT/2000/XP depending on the computer I happen to be using).
>I tried using WinEdt as the editor, but as I was already familiar with
>Emacs I found that using NtEmacs was a lot easier (less mousework, too)
>and I now do all my ConTeXt work with this setup.
>
>NTEmacs comes on the TeXLive CD so installing it is very easy, this can be
>done in connection with the TeXLive installation or right after it. I've
>never had problems with the Emacs part of the installation. :-)
>
>After installing TeXLive and NTEmacs I go to Berend's homepage and get the
>context.el (http://www.berenddeboer.net/emacs/index.html), create a .emacs
>settings file and add the required lines in there (or, nowadays, I just
>copy my old .emacs from another computer); the README tells you what to
>do. Or, if you think it will be helpful, I can give you a copy of mine or
>the relevant lines of mine.
>
>There's another helpful Emacs mode that I've downloaded (and made work) on
>one of the computers I use, but I haven't really gotten used to it yet;
>should be real handy, though: etexshow, Patrick Gundlach's browser for
>ConTeXt commands. That you can get at <http://levana.de/emacs/>.
>
>I have no idea how to make things work in unix or linux, but the Windows
>part is not too bad if one has an idea of Emacs otherwise.
>
>
>Hope this helps,
>		Mari
>_______________________________________________
>ntg-context mailing list
>ntg-context@ntg.nl
>http://www.ntg.nl/mailman/listinfo/ntg-context
>
>

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

* Re: Emacs
       [not found] <3.0.5.32.20030726161830.00b22cf0@mail.northcoast.com>
  2003-07-27  8:12 ` Emacs Guy Worthington
  2003-07-28  7:33 ` Emacs Mari Voipio
@ 2003-07-28 16:57 ` Alexander Klink
  2003-07-28 17:20   ` Emacs Patrick Gundlach
  2 siblings, 1 reply; 11+ messages in thread
From: Alexander Klink @ 2003-07-28 16:57 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 379 bytes --]

Hi,

On Sat, Jul 26, 2003 at 04:18:30PM -0700, David Arnold wrote:
> What can people tell me about setting up Emacs to work with Context?
I use the AUCTeX from CVS, which can do ConTeXt by now (and has
the keybindings I'm used to). Unluckily, it always says "Problems
after n pages", even though it compiles ok...
Anyways, except for that, it works for me...

Greetings,
		Alex


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: Emacs
  2003-07-28 16:57 ` Emacs Alexander Klink
@ 2003-07-28 17:20   ` Patrick Gundlach
  0 siblings, 0 replies; 11+ messages in thread
From: Patrick Gundlach @ 2003-07-28 17:20 UTC (permalink / raw)


Alexander Klink <alech@alech.de> writes:

Hello Alexander,

>> What can people tell me about setting up Emacs to work with Context?
> I use the AUCTeX from CVS, which can do ConTeXt by now (and has
> the keybindings I'm used to). Unluckily, it always says "Problems
> after n pages", even though it compiles ok...
> Anyways, except for that, it works for me...

Could you send me off list an example file and an explanation how
exactly you get the error? It works fine for me. Please make sure you
use the latest cvs version (did not work on it for some time,
though). I'll be happy to fix it.

Patrick

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

* Re: emacs
  2009-02-05 15:19             ` emacs luigi scarso
@ 2009-02-05 19:15               ` Peter Münster
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Münster @ 2009-02-05 19:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 5 Feb 2009, luigi scarso wrote:

> Here some code that you can attach to your .emacs file (just a copy from
> auctex with minor modifications):
> 
> Peter, can you put it into wiki ?

Of course, just as everybody else can do it ;)

But this is only a quick workaround. It would be nicer, if a clean solution
could be integrated into auctex.

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: emacs
  2009-02-05 15:06           ` emacs Peter Münster
@ 2009-02-05 15:19             ` luigi scarso
  2009-02-05 19:15               ` emacs Peter Münster
  0 siblings, 1 reply; 11+ messages in thread
From: luigi scarso @ 2009-02-05 15:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 974 bytes --]

On Thu, Feb 5, 2009 at 4:06 PM, Peter Münster <pmlists@free.fr> wrote:

> On Fri, 24 Oct 2008, Marcin Borkowski wrote:
>
> > > > * Unlike when editing LaTeX files, it does not insert an \item when
> > > >   doing C-c C-e itemize.  I use itemizations a lot and this is a bit
> > > >   annoying, especially that I got used to its behaior when doing
> LaTeX.
> > > >   Also, having C-c C-j asking about the (optional) label all the time
> is
> > > >   also tiring, I would prefer to be asked for it only with C-u C-c
> C-j.
> > >
> > > This is also annoying to me. I'll try to solve this, should no be too
> > > complicated I think (only problem I have, is no spare time, just like
> > > you...).
> >
> > That would be great, also from the point of view of learning elisp...
>
> Hello,
>
> Here some code that you can attach to your .emacs file (just a copy from
> auctex with minor modifications):
>
Peter, can you put it into wiki ?


-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 1396 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: emacs
  2008-10-23 22:46         ` emacs Marcin Borkowski
@ 2009-02-05 15:06           ` Peter Münster
  2009-02-05 15:19             ` emacs luigi scarso
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Münster @ 2009-02-05 15:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 24 Oct 2008, Marcin Borkowski wrote:

> > > * Unlike when editing LaTeX files, it does not insert an \item when
> > >   doing C-c C-e itemize.  I use itemizations a lot and this is a bit
> > >   annoying, especially that I got used to its behaior when doing LaTeX.
> > >   Also, having C-c C-j asking about the (optional) label all the time is
> > >   also tiring, I would prefer to be asked for it only with C-u C-c C-j.
> > 
> > This is also annoying to me. I'll try to solve this, should no be too
> > complicated I think (only problem I have, is no spare time, just like
> > you...).
> 
> That would be great, also from the point of view of learning elisp...

Hello,

Here some code that you can attach to your .emacs file (just a copy from
auctex with minor modifications):

(require 'context-en)

(defun ConTeXt-en-mode-initialization ()
  "ConTeXt english interface specific initialization."
  (mapcar 'ConTeXt-add-environments (reverse ConTeXt-environment-list-en))
  (TeX-add-symbols
   '("but" ConTeXt-arg-define-ref (TeX-arg-literal " "))
   '("item" (TeX-arg-literal " "))
   '("items" [ConTeXt-arg-setup] (TeX-arg-string "Comma separated list"))
   '("its" ConTeXt-arg-define-ref (TeX-arg-literal " "))
   '("nop" (TeX-arg-literal " "))
   '("ran" TeX-arg-string (TeX-arg-literal " "))
   '("sub" ConTeXt-arg-define-ref (TeX-arg-literal " "))
   '("sym" (TeX-arg-string "Symbol") (TeX-arg-literal " "))))

(defun ConTeXt-insert-environment (environment &optional extra)
  "Insert ENVIRONMENT, with optional argument EXTRA."
  (if (and (TeX-active-mark)
	   (not (eq (mark) (point))))
      (save-excursion
	(if (< (mark) (point))
	    (exchange-point-and-mark))
	(insert TeX-esc (ConTeXt-environment-start-name) environment)
	(newline)
	(forward-line -1)
	(indent-according-to-mode)
	(if extra (insert extra))
	(goto-char (mark))
	(or (TeX-looking-at-backward "^[ \t]*")
	    (newline))
	(insert TeX-esc (ConTeXt-environment-stop-name) environment)
	(newline)
	(forward-line -1)
	(indent-according-to-mode)
	;;(goto-char (point))
	)
    (or (TeX-looking-at-backward "^[ \t]*")
	(newline))
    (insert TeX-esc (ConTeXt-environment-start-name) environment)
    (indent-according-to-mode)
    (if extra (insert extra))
    (end-of-line)
    (newline-and-indent)
	(if (string-equal environment "itemize")
		(ConTeXt-insert-item))
    (newline)
    (insert TeX-esc (ConTeXt-environment-stop-name) environment)
    (or (looking-at "[ \t]*$")
	(save-excursion (newline-and-indent)))
    (indent-according-to-mode)
    (end-of-line 0)))

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: emacs
  2008-10-23 21:08       ` emacs Peter Münster
@ 2008-10-23 22:46         ` Marcin Borkowski
  2009-02-05 15:06           ` emacs Peter Münster
  0 siblings, 1 reply; 11+ messages in thread
From: Marcin Borkowski @ 2008-10-23 22:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dnia Thu, Oct 23, 2008 at 11:08:20PM +0200, Peter Münster napisa&#322;(a):
> On Wed, Oct 22 2008, Marcin Borkowski wrote:
> 
> > > What are the problems with emacs?
> > 
> > Here is the (unordered) list of what I remember at the moment.
> > 
> > * It almost never knows when to launch "View"; it almost always offers
> >   me to "ConTeXt" the file.
> 
> Hello Marcin,
> 
> Right, this is a bug. I could make a bug report for that issue.
> I haven't done this before, because I don't really need this feature:
> - I open a ConTeXt file
> - then I begin with the View command to open an xpdf window
> - then I only need ConTeXt commands, that refresh automatically the xpdf
>   window (C-c C-c return)

The same I do, but if I work on a few files simultaneously, or just want
to jump into a new file (to check something or so) the current behavior
is a bit inconvenient.

> 
> Customization code for TeX-command-list:
> ("ConTeXt" "context --once --nonstopmode %t; xpdfcheck \"%s\" &&
>  xpdf -remote \"%s\" -reload" TeX-run-TeX nil (context-mode) :help
>  "Run ConTeXt once") ("ConTeXt Full" "context --nonstopmode %t;
>  xpdfcheck \"%s\" && xpdf -remote \"%s\" -reload" TeX-run-TeX nil
>  (context-mode) :help "Run ConTeXt until completion")
> 
> This is xpdfcheck.c :
> 
> #include <stdio.h>
> #include <X11/Xlib.h>
> int main(int argc, char *argv[])
> {
> 	Display *display;
> 	Atom remoteAtom;
> 	char remoteName[256];
> 	if(argc != 2){
> 		fprintf(stderr, "Usage: %s <remote-name>\n", argv[0]);
> 		return 1;
> 	}
> 	snprintf(remoteName, sizeof(remoteName), "xpdf_%s", argv[1]);
> 	if(!(display = XOpenDisplay(NULL)))
> 		return 1;
> 	remoteAtom = XInternAtom(display, remoteName, False);
> 	return !XGetSelectionOwner(display, remoteAtom);
> }

Wow, thanks!  I'll try it (but not today;))!

> > * (This is probably related to the previous one.)  When finished
> >   compilation, it says "ConTeXt: problems after {1} page." or something
> >   like this.
> 
> Indeed, this should be mentioned in the bug report.
> 
> 
> > * When finding files, it offers me to find not only the .tex file, but
> >   also all the .tui, .tuo stuff etc. by default, which is rather
> >   inconvenient.
> 
> (setq completion-ignored-extensions
>   (append completion-ignored-extensions '(".tui" ".tuo")))

Thanks!  I'll have it added together with .aux;).

Edit: it was there already.  Emacs, I'm scared of you.

> > * It has no idea about most of ConTeXt commands, e.g., it tries to
> >   insert {} after ConTeXt commands put by C-c C-m.
> 
> Don't know about this one, I just type the command (often with the help of
> "dabbrev-expand").

Well, in case of LaTeX-mode, it's very useful, since it knows about the
usage of many standard commands and asks for the arguments.

> > * Unlike when editing LaTeX files, it does not insert an \item when
> >   doing C-c C-e itemize.  I use itemizations a lot and this is a bit
> >   annoying, especially that I got used to its behaior when doing LaTeX.
> >   Also, having C-c C-j asking about the (optional) label all the time is
> >   also tiring, I would prefer to be asked for it only with C-u C-c C-j.
> 
> This is also annoying to me. I'll try to solve this, should no be too
> complicated I think (only problem I have, is no spare time, just like
> you...).

That would be great, also from the point of view of learning elisp...

> > * By default, being in dvi or pdf mode doesn't matter: you always end up
> >   with a pdf file.  This is fine when you have a fast computer, but on
> >   low-end, older ones (like mine;)) xdvi is *a lot* faster than xpdf.
> 
> Start xpdf just once, then use only "xpdf -reload". Besides, there are more
> and more issues with dvi, since it's no more supported by ConTeXt (clipping
> of figures, protrusion with TTF and perhaps a lot more). So I consider dvi
> as obsolete.

I know, but I edit mostly rather simple files (no figures, no non-type1
fonts, no rotation etc...) and then uses xdvi a lot (when using LaTeX).

> Cheers, Peter
> 
> -- 
> http://pmrb.free.fr/contact/

Thanks, greets!

PS. I visited your homepage.  Loved the M$ jokes; the essay on viruses
on linux was also *very* interesting.

-- 
Marcin Borkowski (http://mbork.pl)
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: emacs
  2008-10-22  6:18     ` Marcin Borkowski
  2008-10-22 10:50       ` emacs Gour
@ 2008-10-23 21:08       ` Peter Münster
  2008-10-23 22:46         ` emacs Marcin Borkowski
  1 sibling, 1 reply; 11+ messages in thread
From: Peter Münster @ 2008-10-23 21:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Oct 22 2008, Marcin Borkowski wrote:

> > What are the problems with emacs?
> 
> Here is the (unordered) list of what I remember at the moment.
> 
> * It almost never knows when to launch "View"; it almost always offers
>   me to "ConTeXt" the file.

Hello Marcin,

Right, this is a bug. I could make a bug report for that issue.
I haven't done this before, because I don't really need this feature:
- I open a ConTeXt file
- then I begin with the View command to open an xpdf window
- then I only need ConTeXt commands, that refresh automatically the xpdf
  window (C-c C-c return)

Customization code for TeX-command-list:
("ConTeXt" "context --once --nonstopmode %t; xpdfcheck \"%s\" &&
 xpdf -remote \"%s\" -reload" TeX-run-TeX nil (context-mode) :help
 "Run ConTeXt once") ("ConTeXt Full" "context --nonstopmode %t;
 xpdfcheck \"%s\" && xpdf -remote \"%s\" -reload" TeX-run-TeX nil
 (context-mode) :help "Run ConTeXt until completion")

This is xpdfcheck.c :

#include <stdio.h>
#include <X11/Xlib.h>
int main(int argc, char *argv[])
{
	Display *display;
	Atom remoteAtom;
	char remoteName[256];
	if(argc != 2){
		fprintf(stderr, "Usage: %s <remote-name>\n", argv[0]);
		return 1;
	}
	snprintf(remoteName, sizeof(remoteName), "xpdf_%s", argv[1]);
	if(!(display = XOpenDisplay(NULL)))
		return 1;
	remoteAtom = XInternAtom(display, remoteName, False);
	return !XGetSelectionOwner(display, remoteAtom);
}


> * (This is probably related to the previous one.)  When finished
>   compilation, it says "ConTeXt: problems after {1} page." or something
>   like this.

Indeed, this should be mentioned in the bug report.


> * When finding files, it offers me to find not only the .tex file, but
>   also all the .tui, .tuo stuff etc. by default, which is rather
>   inconvenient.

(setq completion-ignored-extensions
  (append completion-ignored-extensions '(".tui" ".tuo")))


> * It has no idea about most of ConTeXt commands, e.g., it tries to
>   insert {} after ConTeXt commands put by C-c C-m.

Don't know about this one, I just type the command (often with the help of
"dabbrev-expand").


> * Unlike when editing LaTeX files, it does not insert an \item when
>   doing C-c C-e itemize.  I use itemizations a lot and this is a bit
>   annoying, especially that I got used to its behaior when doing LaTeX.
>   Also, having C-c C-j asking about the (optional) label all the time is
>   also tiring, I would prefer to be asked for it only with C-u C-c C-j.

This is also annoying to me. I'll try to solve this, should no be too
complicated I think (only problem I have, is no spare time, just like
you...).


> * By default, being in dvi or pdf mode doesn't matter: you always end up
>   with a pdf file.  This is fine when you have a fast computer, but on
>   low-end, older ones (like mine;)) xdvi is *a lot* faster than xpdf.

Start xpdf just once, then use only "xpdf -reload". Besides, there are more
and more issues with dvi, since it's no more supported by ConTeXt (clipping
of figures, protrusion with TTF and perhaps a lot more). So I consider dvi
as obsolete.

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: emacs
  2008-10-22  6:18     ` Marcin Borkowski
@ 2008-10-22 10:50       ` Gour
  2008-10-23 21:08       ` emacs Peter Münster
  1 sibling, 0 replies; 11+ messages in thread
From: Gour @ 2008-10-22 10:50 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 799 bytes --]

>>>>> "Marcin" == Marcin Borkowski <mbork@atos.wmid.amu.edu.pl> writes:

Marcin> I know that these are not *serious* problems; but the UX is poor
Marcin> with them...  

I agree :-/

Marcin> I plan to learn emacs lisp a bit in my spare time (though I
Marcin> almost forgot what "spare time" means;P), but I certainly won't
Marcin> do any serious hacking there.

Same here...when I learn about 'spare time', I'll join you ;)

For now, I'm simply writing in *.rst (restructured text) hoping that
Pandoc will get full* parser for it so that one will be able to convert
to ConTeXt :-)


* atm there is only partial support for rst markup.


Sincerely,
Gour


-- 

Gour  | Zagreb, Croatia  | GPG key: C6E7162D
----------------------------------------------------------------

[-- Attachment #1.2: Type: application/pgp-signature, Size: 196 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2009-02-05 19:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3.0.5.32.20030726161830.00b22cf0@mail.northcoast.com>
2003-07-27  8:12 ` Emacs Guy Worthington
2003-07-28  7:33 ` Emacs Mari Voipio
2003-07-28 15:52   ` Emacs David Arnold
2003-07-28 16:57 ` Emacs Alexander Klink
2003-07-28 17:20   ` Emacs Patrick Gundlach
2008-10-21 17:56 PhD Thesis in ConTeXt Piotr
2008-10-21 22:46 ` Marcin Borkowski
2008-10-22  5:31   ` emacs (was: Re: PhD Thesis in ConTeXt) Peter Münster
2008-10-22  6:18     ` Marcin Borkowski
2008-10-22 10:50       ` emacs Gour
2008-10-23 21:08       ` emacs Peter Münster
2008-10-23 22:46         ` emacs Marcin Borkowski
2009-02-05 15:06           ` emacs Peter Münster
2009-02-05 15:19             ` emacs luigi scarso
2009-02-05 19:15               ` emacs Peter Münster

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 NNTP newsgroup(s).