Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-29 Thread Ikumi Keita
Hi Alex,

> Alex Branham  writes:
> Thanks for the report and reproducible example! I can reproduce it here
> on Emacs 26.0.91 too. I think this bug was introduced recently when we
> switched away from cl functions to cl-lib functions. It comes from the
> cl-return line in TeX-dwim-master. Though since return is just an alias
> for cl-return, perhaps the bug has been there longer? Either way, I
> think the attached patch should fix the issue, it at least seems to on
> my end. Can you test it out?

Thank you for your quick response.  The patch fixes the problem on my
side, too.  I commited it in the git repository.  Thanks!

Best,
Ikumi Keita

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-29 Thread Alex Branham

On Thu 29 Mar 2018 at 06:01, Ikumi Keita  wrote:

> Hi Alex and Arash,
>
> [How to confirm]
> 0. eval (setq-default TeX-master nil).
> 1. Save the following dummy file in, say, /tmp.
>  sub.tex --
>
> %%% Local Variables:
> %%% mode: latex
> %%% TeX-master: "main"
> %%% End:
> ---
> 2. Open the file with AUCTeX.
> 3. C-x C-f abc.tex RET
> 4. Then emacs says
> TeX-dwim-master: No catch for tag: --cl-block-nil--, "main"
>
> I'm still using emacs 25.3, not emacs 26.  So it might be the issue of
> the version of cl-lib, not of AUCTeX itself.  Anyway, the output of
> TeX-submit-bug-report in the sub.tex buffer is shown below.

Hi Ikumi -

Thanks for the report and reproducible example! I can reproduce it here
on Emacs 26.0.91 too. I think this bug was introduced recently when we
switched away from cl functions to cl-lib functions. It comes from the
cl-return line in TeX-dwim-master. Though since return is just an alias
for cl-return, perhaps the bug has been there longer? Either way, I
think the attached patch should fix the issue, it at least seems to on
my end. Can you test it out?

Alex

>From fa322d82537763f63ee0e21c479c40b89acbc20a Mon Sep 17 00:00:00 2001
From: Alex Branham 
Date: Thu, 29 Mar 2018 07:08:05 -0500
Subject: [PATCH] Fix TeX-dwim-master

* tex.el(TeX-dwim-master): cl-return is much easier to work with if
  we're already using cl- functions, so convert 'dolist' to 'cl-loop.'
---
 tex.el | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tex.el b/tex.el
index d9a0b934..7622219b 100644
--- a/tex.el
+++ b/tex.el
@@ -2395,11 +2395,12 @@ this variable to \"\"."
 (defun TeX-dwim-master ()
   "Find a likely `TeX-master'."
   (let ((dir default-directory))
-(dolist (buf (buffer-list))
-  (when (with-current-buffer buf
-	  (and (equal dir default-directory)
-		   (stringp TeX-master)))
-	(cl-return (with-current-buffer buf TeX-master))
+(cl-loop for buf in (buffer-list)
+ until
+ (when (with-current-buffer buf
+	 (and (equal dir default-directory)
+		  (stringp TeX-master)))
+   (cl-return (with-current-buffer buf TeX-master))
 
 (defun TeX-master-file-ask ()
   "Ask for master file, set `TeX-master' and add local variables."
-- 
2.16.3

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-29 Thread Ikumi Keita
Hi Alex and Arash,

> Arash Esbati  writes:
> Alex Branham  writes:
>> Sorry for missing that the first time. I went through and rechecked for
>> any pesky cl functions and found one. Patch attached that removes it.

> Patch installed.  Thanks.

It seems that this code doesn't work actually and raises error, at least
on my environment.

[How to confirm]
0. eval (setq-default TeX-master nil).
1. Save the following dummy file in, say, /tmp.
 sub.tex --

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% End:
---
2. Open the file with AUCTeX.
3. C-x C-f abc.tex RET
4. Then emacs says
TeX-dwim-master: No catch for tag: --cl-block-nil--, "main"

I'm still using emacs 25.3, not emacs 26.  So it might be the issue of
the version of cl-lib, not of AUCTeX itself.  Anyway, the output of
TeX-submit-bug-report in the sub.tex buffer is shown below.

Regards,
Ikumi Keita

Emacs  : GNU Emacs 25.3.1 (x86_64-unknown-freebsd11.1, GTK+ Version 3.22.15)
 of 2017-09-13
Package: 12.1

current state:
==
(setq
 AUCTeX-date "2017-12-10"
 window-system 'x
 LaTeX-version "2e"
 TeX-style-path '("/usr/local/var/auctex"
  "/usr/local/share/emacs/site-lisp/auctex/style"
  "/home/keita/.emacs.d/auctex/auto"
  "/home/keita/.emacs.d/auctex/style" "auto" "style")
 TeX-auto-save nil
 TeX-parse-self nil
 TeX-master "main"
 TeX-command-list '(("TeX"
 "%(PDF)%(tex) %(file-line-error) %(extraopts) 
%`%S%(PDFout)%(mode)%' %t"
 TeX-run-TeX nil
 (plain-tex-mode ams-tex-mode texinfo-mode) :help
 "Run plain TeX")
("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil
 (latex-mode doctex-mode) :help "Run LaTeX")
("Makeinfo" "makeinfo %(extraopts) %t" TeX-run-compile nil
 (texinfo-mode) :help "Run Makeinfo with Info output")
("Makeinfo HTML" "makeinfo %(extraopts) --html %t"
 TeX-run-compile nil (texinfo-mode) :help
 "Run Makeinfo with HTML output")
("AmSTeX" "amstex %(PDFout) %(extraopts) %`%S%(mode)%' %t"
 TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX")
("ConTeXt"
 "%(cntxcom) --once --texutil %(extraopts) %(execopts)%t"
 TeX-run-TeX nil (context-mode) :help "Run ConTeXt once")
("ConTeXt Full" "%(cntxcom) %(extraopts) %(execopts)%t"
 TeX-run-TeX nil (context-mode) :help
 "Run ConTeXt until completion")
("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help
 "Run BibTeX")
("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber")
("View" "%V" TeX-run-discard-or-function t t :help
 "Run Viewer")
("Print" "%p" TeX-run-command t t :help "Print the file")
("Queue" "%q" TeX-run-background nil t :help
 "View the printer queue" :visible TeX-queue-command)
("File" "%(o?)dvips %d -o %f " TeX-run-dvips t t :help
 "Generate PostScript file")
("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil t :help
 "Convert DVI file to PostScript")
("Dvipdfmx" "dvipdfmx %d" TeX-run-dvipdfmx nil t :help
 "Convert DVI file to PDF with dvipdfmx")
("Ps2pdf" "ps2pdf %f" TeX-run-ps2pdf nil t :help
 "Convert PostScript file to PDF")
("Glossaries" "makeglossaries %s" TeX-run-command nil t
 :help "Run makeglossaries to create glossary file")
("Index" "makeindex %s" TeX-run-index nil t :help
 "Run makeindex to create index file")
("upMendex" "upmendex %s" TeX-run-index t t :help
 "Run upmendex to create index file")
("Xindy" "texindy %s" TeX-run-command nil t :help
 "Run xindy to create index file")
("Check" "lacheck %s" TeX-run-compile nil (latex-mode)
 :help "Check LaTeX file for correctness")
("ChkTeX" "chktex -v6 %s" TeX-run-compile nil (latex-mode)
 :help "Check LaTeX file for common mistakes")
("Spell" "(TeX-ispell-document \"\")" TeX-run-function nil
 t :help "Spell-check the document")
("Clean" "TeX-clean" TeX-run-function nil t :help
 "Delete generated intermediate files")
("Clean All" "(TeX-clean t)" TeX-run-function nil t :help
 "Delete generated intermediate and output files")
("Other

Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-16 Thread Arash Esbati
Alex Branham  writes:

> Sorry for missing that the first time. I went through and rechecked for
> any pesky cl functions and found one. Patch attached that removes it.

Patch installed.  Thanks.

Best, Arash

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-13 Thread Alex Branham

On Mon 12 Mar 2018 at 15:20, Arash Esbati  wrote:

> Following up myself, I think I found the problem.  I installed this
> patch which replaces `case' macro from `cl' with `cl-case' from
> `cl-lib'.
>
> Can you please update your repo, compile the files and try it again?

Thanks, that seems to have done it, though like I said it's an on-again,
off-again problem. I'll let you know if it pops up again though.

Sorry for missing that the first time. I went through and rechecked for
any pesky cl functions and found one. Patch attached that removes it.

Thanks,
Alex

>From f402fdac4af17512e02defa87273e6a041e89b05 Mon Sep 17 00:00:00 2001
From: Alex Branham 
Date: Tue, 13 Mar 2018 08:23:14 -0500
Subject: [PATCH] * tex.el: prefer 'cl-return' over 'return'

---
 tex.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tex.el b/tex.el
index b7891a14..d9a0b934 100644
--- a/tex.el
+++ b/tex.el
@@ -2399,7 +2399,7 @@ this variable to \"\"."
   (when (with-current-buffer buf
 	  (and (equal dir default-directory)
 		   (stringp TeX-master)))
-	(return (with-current-buffer buf TeX-master))
+	(cl-return (with-current-buffer buf TeX-master))
 
 (defun TeX-master-file-ask ()
   "Ask for master file, set `TeX-master' and add local variables."
-- 
2.16.2

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-12 Thread Arash Esbati
Arash Esbati  writes:

> Alex Branham  writes:
>
>> It seems that didn't quite help. I'm still getting a lot of errors that look 
>> like this:
>>
>> Error during redisplay: (jit-lock-function 2855) signaled 
>> (wrong-type-argument integer-or-marker-p nil)
>> Error during redisplay: (jit-lock-function 10261) signaled (void-function 
>> :super)
>
> Can you please restart Emacs, eval this in scratch
>
> (setq font-latex-fontify-script nil)
>
> and open your .tex file again?

Following up myself, I think I found the problem.  I installed this
patch which replaces `case' macro from `cl' with `cl-case' from
`cl-lib'.

Can you please update your repo, compile the files and try it again?

--8<---cut here---start->8---
diff --git a/font-latex.el b/font-latex.el
index 1df751a..b3ab6f7 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -2023,7 +2023,7 @@ END marks boundaries for searching for quotation ends."
 (defun font-latex--get-script-props (pos script-type)
   (let* ((old-raise (or (plist-get (get-text-property pos 'display) 'raise) 
0.0))
 (new-level (1+ (or (get-text-property pos 'script-level) 0)))
-(disp-props (copy-sequence (case script-type
+(disp-props (copy-sequence (cl-case script-type
  (:super (cdr font-latex-script-display))
  (:sub   (car 
font-latex-script-display)
 (new-disp-props (let ((raise (plist-get disp-props 'raise))
@@ -2041,7 +2041,7 @@ END marks boundaries for searching for quotation ends."
   (* nl nl 
0.012018514285714385)
 disp-props
 `(face ,(if (<= new-level font-latex-fontify-script-max-level)
-   (case script-type
+   (cl-case script-type
  (:super 'font-latex-superscript-face)
  (:sub   'font-latex-subscript-face))
  nil)
--8<---cut here---end--->8---

Best, Arash

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-11 Thread Arash Esbati
Alex Branham  writes:

> It seems that didn't quite help. I'm still getting a lot of errors that look 
> like this:
>
> Error during redisplay: (jit-lock-function 2855) signaled 
> (wrong-type-argument integer-or-marker-p nil)
> Error during redisplay: (jit-lock-function 10261) signaled (void-function 
> :super)

Can you please restart Emacs, eval this in scratch

(setq font-latex-fontify-script nil)

and open your .tex file again?

Best, Arash

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-11 Thread Arash Esbati
Colin Baxter  writes:

>> Arash Esbati  writes:
>
> > I do basically the same thing, but issue a `make extraclean'
> > before `./autogen.sh'.  Do you want to give it a roll?
>
> Would `make distclean' have the same effect?

>From the rules in the Makefile, I suspect that it would suffice as well.

Best, Arash

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-08 Thread Vladimir Lomov
Hello,
** Alex Branham [2018-03-07 11:26:27 -0600]:

> Hi all -
> 
> I'm running into some font-lock issues that I didn't have before
> switching over to building auctex from the git repo. I'm wondering how
> I'm supposed to build and activate auctex. I clone auctex to
> ~/.emacs.d/lib/auctex and then do the following:
> 
> ./autogen.sh
> ./configure --prefix=$HOME
> make
> 
> Then when I open up a tex file, it works but I run into weird font-lock
> issues. The latest is that occasionally everything after an equation
> environment gets font-latex-math-face.
> 
> Am I missing something obvious here?

I would do the following:
1. clone 'bare' git repo like
  $ git clone --mirror URL $HOME/repo/auctex
2. cd to "build" directory:
  $ cd $HOME/build/
3. clone source to this dir:
  $ git clone file:///$HOME/repo/auctex auctex
4. build the package:
  $ cd auctex
  $ ./autogen.sh
  $ ./configure --prefix=$HOME
  $ make
5. install the package:
  $ make install
6. [optionally] delete the build dir;
7. start fresh Emacs session and check that auctex files under $HOME are
   first in 'load-path'
8. if not, change the '.emacs' file;
9. test the installation by a tex file.

Pro: the 6. item will guarantee that the will be no leftover from
previous build and the build is "clear".

Con: you will have to "manually" update the repo: git fetch --all -p
(may be it is not minimal command, I use that).

Then you can narrow down the source of your trouble and ask more
concrete question.

> Thanks,
> Alex

---
WBR, Vladimir Lomov

-- 
Osborn's Law:
Variables won't; constants aren't.

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-08 Thread Alex Branham

On Thu 08 Mar 2018 at 00:01, Colin Baxter  wrote:

>> Arash Esbati  writes:
>
> > Alex Branham  writes:
> >> I'm running into some font-lock issues that I didn't have before
> >> switching over to building auctex from the git repo. I'm
> >> wondering how I'm supposed to build and activate auctex. I clone
> >> auctex to ~/.emacs.d/lib/auctex and then do the following:
> >> 
> >> ./autogen.sh ./configure --prefix=$HOME make
>
> > Hi Alex,
>
> > I do basically the same thing, but issue a `make extraclean'
> > before `./autogen.sh'.  Do you want to give it a roll?

It seems that didn't quite help. I'm still getting a lot of errors that look 
like this:

Error during redisplay: (jit-lock-function 2855) signaled (wrong-type-argument 
integer-or-marker-p nil)
Error during redisplay: (jit-lock-function 5614) signaled (wrong-type-argument 
integer-or-marker-p nil)
Error during redisplay: (jit-lock-function 6114) signaled (wrong-type-argument 
integer-or-marker-p nil)
Error during redisplay: (jit-lock-function 6614) signaled (wrong-type-argument 
integer-or-marker-p nil)
Error during redisplay: (jit-lock-function 7114) signaled (wrong-type-argument 
integer-or-marker-p nil)
Error during redisplay: (jit-lock-function 8656) signaled (wrong-type-argument 
integer-or-marker-p nil)
Error during redisplay: (jit-lock-function 9761) signaled (wrong-type-argument 
integer-or-marker-p nil)
Error during redisplay: (jit-lock-function 10261) signaled (void-function 
:super)
Error during redisplay: (jit-lock-function 10761) signaled (void-function 
:super)
Error during redisplay: (jit-lock-function 11851) signaled (wrong-type-argument 
integer-or-marker-p nil)
Error during redisplay: (jit-lock-function 13445) signaled (wrong-type-argument 
integer-or-marker-p nil)
Error during redisplay: (jit-lock-function 13945) signaled (wrong-type-argument 
integer-or-marker-p nil)
Error during redisplay: (jit-lock-function 14445) signaled (wrong-type-argument 
integer-or-marker-p nil)
Error during redisplay: (jit-lock-function 14945) signaled (wrong-type-argument 
integer-or-marker-p nil)
Error during redisplay: (jit-lock-function 15142) signaled (wrong-type-argument 
integer-or-marker-p nil) 

I've also tried from a clean checkout with the same result.

Alex

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-07 Thread Colin Baxter
> Arash Esbati  writes:

> Alex Branham  writes:
>> I'm running into some font-lock issues that I didn't have before
>> switching over to building auctex from the git repo. I'm
>> wondering how I'm supposed to build and activate auctex. I clone
>> auctex to ~/.emacs.d/lib/auctex and then do the following:
>> 
>> ./autogen.sh ./configure --prefix=$HOME make

> Hi Alex,

> I do basically the same thing, but issue a `make extraclean'
> before `./autogen.sh'.  Do you want to give it a roll?

Would `make distclean' have the same effect?

Best wishes

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-07 Thread Alex Branham

On Wed 07 Mar 2018 at 14:19, Arash Esbati  wrote:

>> ./autogen.sh
>> ./configure --prefix=$HOME
>> make
>
> Hi Alex,
>
> I do basically the same thing, but issue a `make extraclean' before
> `./autogen.sh'.  Do you want to give it a roll?

Thanks for the reply. This seems to have solved the issue, at least for
now. It's been an on-again, off-again issue though, so I'll try this out
for a while and see if I have any other issues.

If this is the recommended workflow, perhaps it merits a note in README.git?

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-07 Thread Arash Esbati
Alex Branham  writes:

> I'm running into some font-lock issues that I didn't have before
> switching over to building auctex from the git repo. I'm wondering how
> I'm supposed to build and activate auctex. I clone auctex to
> ~/.emacs.d/lib/auctex and then do the following:
>
> ./autogen.sh
> ./configure --prefix=$HOME
> make

Hi Alex,

I do basically the same thing, but issue a `make extraclean' before
`./autogen.sh'.  Do you want to give it a roll?

Best, Arash

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-07 Thread Alex Branham

On Wed 07 Mar 2018 at 11:26, Alex Branham  wrote:

> Hi all -
>
> I'm running into some font-lock issues that I didn't have before
> switching over to building auctex from the git repo. I'm wondering how
> I'm supposed to build and activate auctex. I clone auctex to
> ~/.emacs.d/lib/auctex and then do the following:
>
> ./autogen.sh
> ./configure --prefix=$HOME
> make
>
> Then when I open up a tex file, it works but I run into weird font-lock
> issues. The latest is that occasionally everything after an equation
> environment gets font-latex-math-face.
>
> Am I missing something obvious here?

Actually, it looks like I'm running into some error. I'm not familiar
with how font-locking/displaying works, does this mean anything to you?

Error during redisplay: (jit-lock-function 8656) signaled (wrong-type-argument 
integer-or-marker-p nil)
Error during redisplay: (jit-lock-function 9761) signaled (wrong-type-argument 
integer-or-marker-p nil)

>
> Thanks,
> Alex

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-devel] What is the proper way to install auctex as a user?

2018-03-07 Thread Alex Branham
Hi all -

I'm running into some font-lock issues that I didn't have before
switching over to building auctex from the git repo. I'm wondering how
I'm supposed to build and activate auctex. I clone auctex to
~/.emacs.d/lib/auctex and then do the following:

./autogen.sh
./configure --prefix=$HOME
make

Then when I open up a tex file, it works but I run into weird font-lock
issues. The latest is that occasionally everything after an equation
environment gets font-latex-math-face.

Am I missing something obvious here?

Thanks,
Alex

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel