all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#62278: 28.2; Outline in DocTeX mode
@ 2023-03-19 17:36 Jan Braun
  2023-03-21  7:43 ` Arash Esbati
  0 siblings, 1 reply; 18+ messages in thread
From: Jan Braun @ 2023-03-19 17:36 UTC (permalink / raw)
  To: 62278



In GNU Emacs 28.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
of 2022-09-12 built on builder10-14.lan
Windowing system distributor 'Apple', version 10.3.2022
System Description:  macOS 11.6.5

Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'

Configured features:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS
TOOLKIT_SCROLL_BARS ZLIB

Important settings:
  value of $LANG: de_DE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: DocTeX

Minor modes in effect:
  outline-minor-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x
cl-extra shortdoc seq byte-opt gv bytecomp byte-compile cconv help-fns
radix-tree help-mode noutline outline vc-git diff-mode easy-mmode
vc-dispatcher cl-loaddefs cl-lib tex-mode compile text-property-search
shell pcomplete comint ansi-color ring latexenc iso-transl tooltip eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads kqueue
cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 78100 5534)
(symbols 48 8402 1)
(strings 32 25935 1283)
(string-bytes 1 862544)
(vectors 16 16272)
(vector-slots 8 217529 12132)
(floats 8 74 51)
(intervals 56 1280 0)
(buffers 992 13))

When I start it as 'emacs -Q <file>.dtx‘ it opens the requested file in
DocTeX mode. 

Next I load 'outline-minor-mode‘.  If I than run the command
'outline-hide-body‘ I’d expect to be presented with the various
\section, \subsection, … commands.  But this does not happen. 

Instead the first meta comment, the documentclass command and the
document environment are displayed, see the text below.  Any other
sectioning command is hidden.

Thanks in advance.

   Jan
   
% \CheckSum{<CHECKSUM>}
% \iffalse meta-comment
%
% VHW -- Classes to write an article for the VHW Journal or to create the journal itself.
%
% Copyright (c) 2023 by Jan Braun
%
%  This program is free software: you can redistribute it and/or modify
%  it under the terms of the GNU General Public License as published by
%  the Free Software Foundation, either version 3 of the License, or
%  (at your option) any later version.
%
%  This program is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%  GNU General Public License for more details.
%
%  You should have received a copy of the GNU General Public License
%  along with this program.  If not, see <http://www.gnu.org/licenses/>.  
%
% 
% \fi
% 
% \iffalse
%<*driver>
\documentclass[11pt, english, ngerman, draft]{l3doc}…
\begin{document}…
\end{document}…



-- 
Jan Braun (er/ihm)
Jan.Braun@klein-gallien.org


=== ypchsh /usr/local/bin/emacs === go FORTH now … ===






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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-19 17:36 bug#62278: 28.2; Outline in DocTeX mode Jan Braun
@ 2023-03-21  7:43 ` Arash Esbati
  2023-03-21  8:45   ` Jan Braun
  0 siblings, 1 reply; 18+ messages in thread
From: Arash Esbati @ 2023-03-21  7:43 UTC (permalink / raw)
  To: Jan Braun; +Cc: 62278

Jan Braun <Jan.Braun@klein-gallien.org> writes:

> When I start it as 'emacs -Q <file>.dtx‘ it opens the requested file in
> DocTeX mode. 
>
> Next I load 'outline-minor-mode‘.  If I than run the command
> 'outline-hide-body‘ I’d expect to be presented with the various
> \section, \subsection, … commands.  But this does not happen. 
>
> Instead the first meta comment, the documentclass command and the
> document environment are displayed, see the text below.  Any other
> sectioning command is hidden.

I'd say this is by design: `latex-outline-regexp' defined in tex-mode.el
doesn't cater for headings which start with '%', but in doctex mode,
almost all of them do so.  So you have to tell doctex about it with this
piece of code (which I haven't tested) in your init file:

(add-hook 'doctex-mode-hook
          (lambda ()
            (setq-local latex-outline-regexp
                        (concat "[% \t]*" "\\\\"
                                (regexp-opt
                                 (append latex-metasection-list
		                         (mapcar #'car latex-section-alist))
                                 t))))
          (setq-local outline-regexp latex-outline-regexp))

Best, Arash





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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-21  7:43 ` Arash Esbati
@ 2023-03-21  8:45   ` Jan Braun
  2023-03-21 11:09     ` Arash Esbati
  0 siblings, 1 reply; 18+ messages in thread
From: Jan Braun @ 2023-03-21  8:45 UTC (permalink / raw)
  To: Arash Esbati; +Cc: 62278

Dear Arash,

thank you for your help.


> Am 21.03.2023 um 08:43 schrieb Arash Esbati <arash@gnu.org>:
> 
> I'd say this is by design: `latex-outline-regexp' defined in tex-mode.el
> doesn't cater for headings which start with '%', but in doctex mode,
> almost all of them do so.

I agree.

Same applies to the \label comamnds, which won’t be found, when 
inserting \ref commands.

> So you have to tell doctex about it with this
> piece of code (which I haven't tested) in your init file:

It looks promising, but did not fully do the trick. :-(

Emacs complains

Debugger entered--Lisp error: (void-variable latex-outline-regexp)
(set (make-local-variable 'outline-regexp) latex-outline-regexp)
(add-hook 'doctex-mode-hook #'(lambda nil (set (make-local-variable 'latex-outline-regexp) (concat "[% \11]*" "\\\\" (regexp-opt (append latex-metasection-list (mapcar ... latex-section-alist)) t)))) (set (make-local-variable 'outline-regexp) latex-outline-regexp))
eval-buffer(#<buffer  *load*> nil "/Users/tmjb/.emacs" nil t)  ; Reading at buffer position 30847
load-with-code-conversion("/Users/tmjb/.emacs" "/Users/tmjb/.emacs" t t)
load("~/.emacs" noerror nomessage)
startup--load-user-init-file(#f(compiled-function () #<bytecode -0x148e3df754d535f>) #f(compiled-function () #<bytecode -0x1f3c686ddc0d6275>) t)
command-line()
normal-top-level()

Do you have any further advice for me?

Sincerely

 Jan

-- 
Jan Braun (er/ihm)
Jan.Braun@klein-gallien.org


=== ypchsh /usr/local/bin/emacs === go FORTH now … ===






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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-21  8:45   ` Jan Braun
@ 2023-03-21 11:09     ` Arash Esbati
       [not found]       ` <5EC720A1-129F-439E-AE98-C7D9E7E8C94C@klein-gallien.org>
  0 siblings, 1 reply; 18+ messages in thread
From: Arash Esbati @ 2023-03-21 11:09 UTC (permalink / raw)
  To: Jan Braun; +Cc: 62278

Jan Braun <Jan.Braun@klein-gallien.org> writes:

>> Am 21.03.2023 um 08:43 schrieb Arash Esbati <arash@gnu.org>:
>> 
> Same applies to the \label comamnds, which won’t be found, when 
> inserting \ref commands.

How do you insert \ref's?  I'm not sure if the stock doctex-mode
provides completion support for \ref-\label insertion.

> It looks promising, but did not fully do the trick. :-(
>
> Emacs complains
> [...]

Do you byte compile your init file?  Maybe wrapping the whole thing
inside

(with-eval-after-load "tex-mode"
  (...))

helps.

Best, Arash





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

* bug#62278: 28.2; Outline in DocTeX mode
       [not found]       ` <5EC720A1-129F-439E-AE98-C7D9E7E8C94C@klein-gallien.org>
@ 2023-03-25  7:08         ` Jan Braun
  2023-03-25 15:51           ` Arash Esbati
  0 siblings, 1 reply; 18+ messages in thread
From: Jan Braun @ 2023-03-25  7:08 UTC (permalink / raw)
  To: Arash Esbati; +Cc: 62278

Hello again,

Regarding my previous assumption:

> But even with this code added: we may have to dig deeper 
> into the problem?  Look, my actual (fith) DTX files looks
> somewhat similiar to this:
> 
> % \iffalse meta-comment
> % Real comment about the file and its purpose
> % ...
> % \fi
> %\iffalse
> %<driver>
> \documentclass[…]{…}
> \usepackage{…} % and other usual LaTeX preamble stuff
> \EnableCrossrefs
> \CodelineIndex
> \RecordChanges
> \setcounter{IndexColumns}{2}
> 
> \begin{document}
>  \DocInput{key-label.dtx}
> \end{document}
> %<driver>
> %/fi
> %
> % \changes{…} % lots of "TeXDoc preamble“ stuff
> % …
> %
> % \title{…}
> % \author{…}
> % \date{…}
> % \maketitle
> % … Rest of the LaTeX/DocTeX document body
> 
> Although I haven’t dived into the Outline code, maybe 
> Emacs sees \end{document} and stops folding there?  

I addd some DocTeX code into the document environment, like this:

% \iffalse meta-comment
% Real comment about the file and its purpose
% ...
% \fi
%\iffalse
%<driver>
\documentclass[…]{…}
\usepackage{…} % and other usual LaTeX preamble stuff
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\setcounter{IndexColumns}{2}

\begin{document}
 \DocInput{key-label.dtx}
% \sectio{…}
% \subsection{…}
\end{document}
%<driver>
%/fi

and it didn’t fold :-(

Sorry.

   Jan






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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-25  7:08         ` Jan Braun
@ 2023-03-25 15:51           ` Arash Esbati
  2023-03-25 18:00             ` Jan Braun
  0 siblings, 1 reply; 18+ messages in thread
From: Arash Esbati @ 2023-03-25 15:51 UTC (permalink / raw)
  To: Jan Braun; +Cc: 62278

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

Jan Braun <Jan.Braun@klein-gallien.org> writes:

>> But even with this code added: we may have to dig deeper 
>> into the problem?

I think I had a typo in the code I suggested, it should read:

(with-eval-after-load "tex-mode"
  (add-hook 'doctex-mode-hook
            (lambda ()
              (setq-local latex-outline-regexp
                          (concat "[% \t]*" "\\\\"
                                  (regexp-opt
                                   (append latex-metasection-list
                                           (mapcar #'car latex-section-alist))
                                   t)))
	      (setq-local outline-regexp latex-outline-regexp))))

Now take a small example like this:

%\iffalse
%<*driver>
\documentclass{ltxdox}
\usepackage{microtype} % and other usual LaTeX preamble stuff
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\setcounter{IndexColumns}{2}
\begin{document}
\DocInput{jb-test.dtx}
\end{document}
%</driver>
%\fi
%
% \section{Introduction}
% This is some introduction.
%
% \section{User macros}
% This is some text.
% And this is some text
%
% \section{Implementation}
%
%    \begin{macrocode}
%<*package>
%    \end{macrocode}
%
%    \begin{macrocode}
\def\foo#1{%
  $#1$%
}
%    \end{macrocode}
%
%    \begin{macrocode}
%</package>
%    \end{macrocode}
%
%\endinput
% Local Variables:
% mode: doctex
% End:

When I start Emacs with 'emacs -Q', open the file above, do
'M-x outline-minor-mode RET' followed by 'C-c @ C-t', this is what I
see:

[-- Attachment #2: outline.png --]
[-- Type: image/png, Size: 5767 bytes --]

[-- Attachment #3: Type: text/plain, Size: 47 bytes --]


Or do you expect something else?

Best, Arash

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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-25 15:51           ` Arash Esbati
@ 2023-03-25 18:00             ` Jan Braun
  2023-03-25 21:35               ` Arash Esbati
  0 siblings, 1 reply; 18+ messages in thread
From: Jan Braun @ 2023-03-25 18:00 UTC (permalink / raw)
  To: Arash Esbati; +Cc: 62278

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

Dear Arash,

thank you for ongoing, constant support! 

> Am 25.03.2023 um 16:51 schrieb Arash Esbati <arash@gnu.org>:
> 
> Jan Braun <Jan.Braun@klein-gallien.org> writes:
> 
>>> But even with this code added: we may have to dig deeper 
>>> into the problem?
> 
> I think I had a typo in the code I suggested, it should read:

Thanks, I corrected it, …

> Now take a small example like this:

OK.

> When I start Emacs with 'emacs -Q', open the file above, do
> 'M-x outline-minor-mode RET' followed by 'C-c @ C-t', this is what I
> see:
> <outline.png>
> Or do you expect something else?

No, no, this is exactly, what I would like to see and work on.  

Unfortunately, I get this result:


What a pitty! :-(

Bye

   Jan

[-- Attachment #2.1: Type: text/html, Size: 2051 bytes --]

[-- Attachment #2.2: doctex-outline.png --]
[-- Type: image/png, Size: 36237 bytes --]

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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-25 18:00             ` Jan Braun
@ 2023-03-25 21:35               ` Arash Esbati
  2023-03-26  7:55                 ` Jan Braun
  0 siblings, 1 reply; 18+ messages in thread
From: Arash Esbati @ 2023-03-25 21:35 UTC (permalink / raw)
  To: Jan Braun; +Cc: 62278

Jan Braun <Jan.Braun@klein-gallien.org> writes:

>  When I start Emacs with 'emacs -Q', open the file above, do
>  'M-x outline-minor-mode RET' followed by 'C-c @ C-t', this is what I
>  see:
>  <outline.png>
>  Or do you expect something else?
>
> No, no, this is exactly, what I would like to see and work on.  
>
> Unfortunately, I get this result:

I see that I missed to say that the exact steps were:

  • Start Emacs with 'emacs -Q'
  • Paste this code into scratch buffer and eval it (it is the same code
    as in my last message)

     (with-eval-after-load "tex-mode"
       (add-hook 'doctex-mode-hook
                 (lambda ()
                   (setq-local latex-outline-regexp
                               (concat "[% \t]*" "\\\\"
                                       (regexp-opt
                                        (append latex-metasection-list
                                                (mapcar #'car latex-section-alist))
                                        t)))
                   (setq-local outline-regexp latex-outline-regexp))))

  • Open the .dtx file in my other message
  • Do 'M-x outline-minor-mode RET'
  • Do 'C-c @ C-t'

This is with Emacs30 (997a8dbc48).  If this doesn't work for you, I'm
out of ideas.

Best, Arash





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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-25 21:35               ` Arash Esbati
@ 2023-03-26  7:55                 ` Jan Braun
  2023-03-27  7:50                   ` Arash Esbati
  0 siblings, 1 reply; 18+ messages in thread
From: Jan Braun @ 2023-03-26  7:55 UTC (permalink / raw)
  To: Arash Esbati; +Cc: 62278

Good morning Arash,


> Am 25.03.2023 um 22:35 schrieb Arash Esbati <arash@gnu.org>:

> I see that I missed to say that the exact steps were:

Done that and: eh voila: It worked on your example DTX file, as 
well as on my DTX files, I am actually working on.

Do you have any suggestions, how to make that code work 
automagically on Emacsens startup?

Bye

   Jan





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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-26  7:55                 ` Jan Braun
@ 2023-03-27  7:50                   ` Arash Esbati
  2023-03-27  9:58                     ` Jan Braun
  0 siblings, 1 reply; 18+ messages in thread
From: Arash Esbati @ 2023-03-27  7:50 UTC (permalink / raw)
  To: Jan Braun; +Cc: 62278

Jan Braun <Jan.Braun@klein-gallien.org> writes:

> Done that and: eh voila: It worked on your example DTX file, as 
> well as on my DTX files, I am actually working on.

Thanks for the confirmation.

> Do you have any suggestions, how to make that code work 
> automagically on Emacsens startup?

Add that lisp snippet to your init file and you should be fine.

Best, Arash





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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-27  7:50                   ` Arash Esbati
@ 2023-03-27  9:58                     ` Jan Braun
  2023-03-27 10:14                       ` Arash Esbati
  0 siblings, 1 reply; 18+ messages in thread
From: Jan Braun @ 2023-03-27  9:58 UTC (permalink / raw)
  To: Arash Esbati; +Cc: 62278

Hi Arash,

> Am 27.03.2023 um 09:50 schrieb Arash Esbati <arash@gnu.org>:
> 
> Jan Braun <Jan.Braun@klein-gallien.org> writes:
> 
>> Done that and: eh voila: It worked on your example DTX file, as 
>> well as on my DTX files, I am actually working on.
> 
> Thanks for the confirmation.

You are more than welcome.

>> Do you have any suggestions, how to make that code work 
>> automagically on Emacsens startup?
> 
> Add that lisp snippet to your init file and you should be fine.

As you might remember: that was the starting point.  As I wrote 
in my message from 2023-03-12, 09:45

>> Emacs complains
>> 
>> Debugger entered--Lisp error: (void-variable latex-outline-regexp)
>> (set (make-local-variable 'outline-regexp) latex-outline-regexp)
>> (add-hook 'doctex-mode-hook #'(lambda nil (set (make-local-variable 'latex-outline-regexp) (concat "[% \11]*" "\\\\" (regexp-opt (append latex-metasection-list (mapcar ... latex-section-alist)) t)))) (set (make-local-variable 'outline-regexp) latex-outline-regexp))
>> eval-buffer(#<buffer  *load*> nil "/Users/tmjb/.emacs" nil t)  ; Reading at buffer position 30847
>> load-with-code-conversion("/Users/tmjb/.emacs" "/Users/tmjb/.emacs" t t)
>> load("~/.emacs" noerror nomessage)
>> startup--load-user-init-file(#f(compiled-function () #<bytecode -0x148e3df754d535f>) #f(compiled-function () #<bytecode -0x1f3c686ddc0d6275>) t)
>> command-line()
>> normal-top-level()

Your fix only works in a plain Emacsen, being started without 
any kind of init file. :-(

So, in principle, your fix works, but not, if I place it in my 
init file.

Bye

 Jan

-- 
Jan Braun (er/ihm)
Jan.Braun@klein-gallien.org


=== ypchsh /usr/local/bin/emacs === go FORTH now … ===






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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-27  9:58                     ` Jan Braun
@ 2023-03-27 10:14                       ` Arash Esbati
  2023-03-27 13:34                         ` Jan Braun
  0 siblings, 1 reply; 18+ messages in thread
From: Arash Esbati @ 2023-03-27 10:14 UTC (permalink / raw)
  To: Jan Braun; +Cc: 62278

Jan Braun <Jan.Braun@klein-gallien.org> writes:

> Your fix only works in a plain Emacsen, being started without 
> any kind of init file. :-(
>
> So, in principle, your fix works, but not, if I place it in my 
> init file.

You mean putting this in your init file still throws an error?

  (with-eval-after-load "tex-mode"
    (add-hook 'doctex-mode-hook
              (lambda ()
                (setq-local latex-outline-regexp
                            (concat "[% \t]*" "\\\\"
                                    (regexp-opt
                                     (append latex-metasection-list
                                             (mapcar #'car latex-section-alist))
                                     t)))
                (setq-local outline-regexp latex-outline-regexp))))

Best, Arash





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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-27 10:14                       ` Arash Esbati
@ 2023-03-27 13:34                         ` Jan Braun
  2023-03-27 17:48                           ` Arash Esbati
  0 siblings, 1 reply; 18+ messages in thread
From: Jan Braun @ 2023-03-27 13:34 UTC (permalink / raw)
  To: Arash Esbati; +Cc: 62278

Dear Arash,

thank you very much for your ongoing support. :+1:

> Am 27.03.2023 um 12:14 schrieb Arash Esbati <arash@gnu.org>:
> 
> Jan Braun <Jan.Braun@klein-gallien.org> writes:
> 
>> Your fix only works in a plain Emacsen, being started without 
>> any kind of init file. :-(
>> 
>> So, in principle, your fix works, but not, if I place it in my 
>> init file.
> 
> You mean putting this in your init file still throws an error?

No, it does not throw an error, but it is not folding properly.

 1) Starting emacs -Q, 
 2) inserting the fix into *scratch* buffer,
 3) M-X eval-last-sexp ==> gives no error.
 4) Loading an DocTeX file, 
 5) M-x outline-minor-mode  ==> gives no error
 6) C-c @ C-t ==> presents all sectioning commands in the buffer

Very well.

But including it into my ~/.emacs file and 
  1) Starting emacs 
  2) Loading DocTeX file
  3) Choosing Hide-Body from the Oultine Menu or
     Typing C-c @ C-t on the keyboard

will only show \documentclass, \begin and \end{document} and 
nothing in between :-(

I am still running GNU Emacs 28.2 (build 1, 
x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 
(Build 18G95)) of 2022-09-12

Any hints?

Sincerely

   Jan

-- 
Jan Braun (er/ihm)
Jan.Braun@klein-gallien.org


=== ypchsh /usr/local/bin/emacs === go FORTH now … ===






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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-27 13:34                         ` Jan Braun
@ 2023-03-27 17:48                           ` Arash Esbati
  2023-03-28  6:01                             ` Jan Braun
  0 siblings, 1 reply; 18+ messages in thread
From: Arash Esbati @ 2023-03-27 17:48 UTC (permalink / raw)
  To: Jan Braun; +Cc: 62278

Jan Braun <Jan.Braun@klein-gallien.org> writes:

> But including it into my ~/.emacs file and 
>   1) Starting emacs 
>   2) Loading DocTeX file
>   3) Choosing Hide-Body from the Oultine Menu or
>      Typing C-c @ C-t on the keyboard
>
> will only show \documentclass, \begin and \end{document} and 
> nothing in between :-(

If the code works with 'emacs -Q' and not when in your init file, then
you have to bisect your init file.  My only guess is to check if you're
using AUCTeX instead of the built-in mode when you load your init file.

Best, Arash





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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-27 17:48                           ` Arash Esbati
@ 2023-03-28  6:01                             ` Jan Braun
  2023-03-28  7:42                               ` Arash Esbati
  0 siblings, 1 reply; 18+ messages in thread
From: Jan Braun @ 2023-03-28  6:01 UTC (permalink / raw)
  To: Arash Esbati; +Cc: 62278

Good Morning Arash,


> Am 27.03.2023 um 19:48 schrieb Arash Esbati <arash@gnu.org>:

> If the code works with 'emacs -Q' and not when in your init file, then
> you have to bisect your init file.

I am sorry, but I only have a vague idea of what you mean with 
bisecting my input file.

I have tried to move your code up, so that it is the first 
code in my ~/.emacs file.  This didn’t change a thing.  Same
results as before.

(Same, if I make it the last code of my init file.)

> My only guess is to check if you’re using AUCTeX instead of the
> built-in mode when you load your init file.

What do you mean with „using AUCTeX instead of the built-in 
mode“?

What kind of check should I perform?

This are the essential lines of ~/.emacs:

;;; 
;;; AUCTeX (sometimes also called AUC-TeX) was developed at the
;;; Aalborg university in denmark.  It is a mighty mode to work with
;;; nearly any kind of TeX and LaTeX files.
(load "auctex.el" nil t t)
(require 'auctex-latexmk)
(auctex-latexmk-setup)

Therefore I guess, I am using AUCTeX?

Bye

  Jan

-- 
Jan Braun (er/ihm)
Jan.Braun@klein-gallien.org


=== ypchsh /usr/local/bin/emacs === go FORTH now … ===






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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-28  6:01                             ` Jan Braun
@ 2023-03-28  7:42                               ` Arash Esbati
  2023-03-28  8:21                                 ` Jan Braun
  0 siblings, 1 reply; 18+ messages in thread
From: Arash Esbati @ 2023-03-28  7:42 UTC (permalink / raw)
  To: Jan Braun; +Cc: 62278

Jan Braun <Jan.Braun@klein-gallien.org> writes:

> What do you mean with „using AUCTeX instead of the built-in 
> mode“?

I mean that there are at least 2 major modes for editing LaTeX/docTeX
files.  One of them is the one built in Emacs provided by this file:

  http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/textmodes/tex-mode.el

Another one is AUCTeX which you have to install yourself (since you're
on a mac, I assume you've installed yourself and pre-installed by a
distro).

> What kind of check should I perform?

I think the easiest way is to check the mode you're using with 'C-h m'.
If I open a .dtx file and hit 'C-h m', I see this because I'm using
AUCTeX:

  The major mode is docTeX/P mode defined in tex-mode.el:

  This function has :override advice: ‘TeX-doctex-mode’.

  This is an :override advice, which means that ‘doctex-mode’ isn’t
  run at all, and the documentation below may be irrelevant.
  [...]

When I start Emacs with the '-Q' switch, the same file reports:

  The major mode is DocTeX mode defined in tex-mode.el:

  Major mode to edit DocTeX files.

Because AUCTeX is not initialized and hence the built-in mode kicks in.

> This are the essential lines of ~/.emacs:
>
> ;;; 
> ;;; AUCTeX (sometimes also called AUC-TeX) was developed at the
> ;;; Aalborg university in denmark.  It is a mighty mode to work with
> ;;; nearly any kind of TeX and LaTeX files.
> (load "auctex.el" nil t t)
> (require 'auctex-latexmk)
> (auctex-latexmk-setup)
>
> Therefore I guess, I am using AUCTeX?

Yes, you are.  And if you have installed AUCTeX from ELPA (i.e. with M-x
list-packages), then you better drop the (load "auctex.el" nil t t)
line.

AUCTeX is a complete different beast w.r.t to outline-mode, so the code
I suggested cannot work when you use AUCTeX to edit a .dtx file.  I
suggest you close this report and open an AUCTeX feature request by
sending a message to bug-auctex@gnu.org.

Best, Arash





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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-28  7:42                               ` Arash Esbati
@ 2023-03-28  8:21                                 ` Jan Braun
  2023-03-28  8:33                                   ` Arash Esbati
  0 siblings, 1 reply; 18+ messages in thread
From: Jan Braun @ 2023-03-28  8:21 UTC (permalink / raw)
  To: Arash Esbati; +Cc: 62278

Hi Arash,


> Am 28.03.2023 um 09:42 schrieb Arash Esbati <arash@gnu.org>:
> 
> Jan Braun <Jan.Braun@klein-gallien.org> writes:

[…]

>> What kind of check should I perform?
> 
> I think the easiest way is to check the mode you're using with 'C-h m'.

I see nearly the same as you do:

docTeX/FP mode defined in ‘tex-mode.el’:
Major mode to edit DocTeX files.

This function has :override advice: ‘TeX-doctex-mode’.

> When I start Emacs with the '-Q' switch, the same file reports:
> […]
> Because AUCTeX is not initialized and hence the built-in mode kicks in.

Same here.

> […] I suggest you close this report

OK.  Thank you very much for your support.

I’ll send a bug report to AUCTeX and this bug could be closed.

I still learned some lessons here. :-)

Bye

  Jan





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

* bug#62278: 28.2; Outline in DocTeX mode
  2023-03-28  8:21                                 ` Jan Braun
@ 2023-03-28  8:33                                   ` Arash Esbati
  0 siblings, 0 replies; 18+ messages in thread
From: Arash Esbati @ 2023-03-28  8:33 UTC (permalink / raw)
  To: Jan Braun; +Cc: 62278

tags 62278 notabug
close 62278
quit

Jan Braun <Jan.Braun@klein-gallien.org> writes:

> I’ll send a bug report to AUCTeX and this bug could be closed.

Done.

> I still learned some lessons here. :-)

👍

Best, Arash





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

end of thread, other threads:[~2023-03-28  8:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-19 17:36 bug#62278: 28.2; Outline in DocTeX mode Jan Braun
2023-03-21  7:43 ` Arash Esbati
2023-03-21  8:45   ` Jan Braun
2023-03-21 11:09     ` Arash Esbati
     [not found]       ` <5EC720A1-129F-439E-AE98-C7D9E7E8C94C@klein-gallien.org>
2023-03-25  7:08         ` Jan Braun
2023-03-25 15:51           ` Arash Esbati
2023-03-25 18:00             ` Jan Braun
2023-03-25 21:35               ` Arash Esbati
2023-03-26  7:55                 ` Jan Braun
2023-03-27  7:50                   ` Arash Esbati
2023-03-27  9:58                     ` Jan Braun
2023-03-27 10:14                       ` Arash Esbati
2023-03-27 13:34                         ` Jan Braun
2023-03-27 17:48                           ` Arash Esbati
2023-03-28  6:01                             ` Jan Braun
2023-03-28  7:42                               ` Arash Esbati
2023-03-28  8:21                                 ` Jan Braun
2023-03-28  8:33                                   ` Arash Esbati

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.