oddity with TeX-style-private ?

2020-10-18 Thread Uwe Brauer



Hi 

I have set 
 '(TeX-style-private
 '("/home/oub/ALLES/emacs/site-lisp/auctex-private-style"))
in my custom init file.

I just wanted to add a style for venndiagrams but I wanted to do some
testing.  Usually I reinstall auctex in that context but this time I
thought to put the file in my TeX-style-private directory 

So 

1. I wrote the file, byte compiled it even and

2. put in that directory,

3. Restarted emacs

4. Opened a file with had  \usepackage{venndiagram}

But the style file was not loaded! 

What do I miss?

Regards 

Uwe Brauer 




Re: oddity with TeX-style-private ?

2020-10-23 Thread Tassilo Horn
Uwe Brauer  writes:

Hi Uwe,

> I have set 
>  '(TeX-style-private
>  '("/home/oub/ALLES/emacs/site-lisp/auctex-private-style"))
> in my custom init file.
>
> I just wanted to add a style for venndiagrams but I wanted to do some
> testing.  Usually I reinstall auctex in that context but this time I
> thought to put the file in my TeX-style-private directory
>
> So 
>
> 1. I wrote the file, byte compiled it even and
> 2. put in that directory,
> 3. Restarted emacs
> 4. Opened a file with had  \usepackage{venndiagram}

In general, that's the right procedure (byte-compilation is not needed).

> But the style file was not loaded! 
>
> What do I miss?

Does `C-h v TeX-style-private' look like above setting (maybe you
defined it otherwise later in your ~/.emacs)?  Maybe something's wrong
with the style itself?

Bye,
Tassilo




Re: oddity with TeX-style-private ?

2020-10-23 Thread Uwe Brauer
>>> "TH" == Tassilo Horn  writes:

   > Uwe Brauer  writes:
   > Hi Uwe,

   >> I have set 
   >> '(TeX-style-private
   >> '("/home/oub/ALLES/emacs/site-lisp/auctex-private-style"))
   >> in my custom init file.
   >> 
   >> I just wanted to add a style for venndiagrams but I wanted to do some
   >> testing.  Usually I reinstall auctex in that context but this time I
   >> thought to put the file in my TeX-style-private directory
   >> 
   >> So 
   >> 
   >> 1. I wrote the file, byte compiled it even and
   >> 2. put in that directory,
   >> 3. Restarted emacs
   >> 4. Opened a file with had  \usepackage{venndiagram}

   > In general, that's the right procedure (byte-compilation is not needed).

   >> But the style file was not loaded! 
   >> 
   >> What do I miss?

   > Does `C-h v TeX-style-private' look like above setting (maybe you
   > defined it otherwise later in your ~/.emacs)?  

No, I run grep over all by elisp files, the only setting is in
custom-init

C-h v TeX-style-private returns 
,
| TeX-style-private is a variable defined in ‘tex.el’.
| Its value is
| ("/home/oub/ALLES/emacs/site-lisp/auctex-private-style")
| Original value was 
| ("/home/oub/.emacs.d/auctex/style")
`


   > Maybe something's wrong with the style itself?

I don't think so. Here is what I did to test it.

1. I pulled the latest master.

2. I create a branch called venndiagram,

3. I added the style file and modified Makefile.in

4. I run make clean, distclean and

5. ./configure --with-emacs=/opt/emacs28/bin/emacs
   --prefix=/home/oub/ALLES/
   --with-lispdir=/home/oub/emacs/site-lisp/packages/au ctex-git 
--without-texmf-dir

6. Make, make install

7. I restarted emacs and

8. Voila auctex support venndiagrams.

So I am puzzled, how can I debug this? It is a bit cumbersome to follow
the procedure I just outlined.

Regards

Uwe 


smime.p7s
Description: S/MIME cryptographic signature


Re: oddity with TeX-style-private ?

2020-10-23 Thread Tassilo Horn
Uwe Brauer  writes:

> No, I run grep over all by elisp files, the only setting is in
> custom-init
>
> C-h v TeX-style-private returns 
> ,
> | TeX-style-private is a variable defined in ‘tex.el’.
> | Its value is
> | ("/home/oub/ALLES/emacs/site-lisp/auctex-private-style")
> | Original value was 
> | ("/home/oub/.emacs.d/auctex/style")
> `

Do you have a customization of `TeX-style-path'?  That's normally built
from `TeX-style-private' and the other variables (see the docstring) but
you can also customize it and then it overrides the others.

If not, what's the value of `TeX-style-path' with your custom setting of
`TeX-style-private'?  There might be the possibility that the former is
initialized before customize sets the value of the other.

Bye,
Tassilo


signature.asc
Description: PGP signature


Re: oddity with TeX-style-private ?

2020-10-23 Thread Uwe Brauer
>>> "TH" == Tassilo Horn  writes:

> Uwe Brauer  writes:
>> No, I run grep over all by elisp files, the only setting is in
>> custom-init
>> 
>> C-h v TeX-style-private returns 
>> ,
>> | TeX-style-private is a variable defined in ‘tex.el’.
>> | Its value is
>> | ("/home/oub/ALLES/emacs/site-lisp/auctex-private-style")
>> | Original value was 
>> | ("/home/oub/.emacs.d/auctex/style")
>> `

> Do you have a customization of `TeX-style-path'?  That's normally built
> from `TeX-style-private' and the other variables (see the docstring) but
> you can also customize it and then it overrides the others.

Ah, I do, here is an extract of my custom-init.el

 '(TeX-style-global
   "/home/oub/emacs/site-lisp/packages/auctex-git/auctex/style")
 '(TeX-style-path
   '("/home/oub/emacs/site-lisp/packages/auctex-git/auctex/style" "auto" 
"style"))
 '(TeX-style-private '("/home/oub/ALLES/emacs/site-lisp/auctex-private-style"))

Not sure why I did this. So what is the best practise?

1. Setting TeX-style-global and TeX-style-private and leave
   TeX-style-path out?

2. Set only TeX-style-private. I do, however, compile auctex from
   master and therefore have 

(setq load-path (cons (expand-file-name 
"~/emacs/site-lisp/packages/auctex-git")  load-path))
(setq load-path (cons (expand-file-name 
"~/emacs/site-lisp/packages/auctex-git/auctex")  load-path))


In my init file.

Any advice is strongly appreciated.

Thanks and regards

Uwe 


smime.p7s
Description: S/MIME cryptographic signature


Re: oddity with TeX-style-private ?

2020-10-23 Thread Tassilo Horn
Uwe Brauer  writes:

>> Do you have a customization of `TeX-style-path'?  That's normally
>> built from `TeX-style-private' and the other variables (see the
>> docstring) but you can also customize it and then it overrides the
>> others.
>
> Ah, I do, here is an extract of my custom-init.el
>
>  '(TeX-style-global
>"/home/oub/emacs/site-lisp/packages/auctex-git/auctex/style")
>  '(TeX-style-path
>'("/home/oub/emacs/site-lisp/packages/auctex-git/auctex/style" "auto" 
> "style"))
>  '(TeX-style-private 
> '("/home/oub/ALLES/emacs/site-lisp/auctex-private-style"))
>
> Not sure why I did this. So what is the best practise?

Since I have no clue what your directory structure is, I have no clue.
But customizing both TeX-style-{global,private} *and* TeX-style-path is
strange given that the latter's default value is built from the former.

> 1. Setting TeX-style-global and TeX-style-private and leave
>TeX-style-path out?

Why setting any of them?  Why is ~/.emacs.d/auctex/style not fine for
private styles?  If I had some, I'd probably keep them in
~/Repos/my-auctex-styles/ and simply use a symlink
~/.emacs.d/auctex/style -> ~/Repos/my-auctex-styles/.

> 2. Set only TeX-style-private. I do, however, compile auctex from
>master and therefore have 
>
> (setq load-path (cons (expand-file-name 
> "~/emacs/site-lisp/packages/auctex-git")  load-path))
> (setq load-path (cons (expand-file-name 
> "~/emacs/site-lisp/packages/auctex-git/auctex")  load-path))

I also use the auctex master (or some other branch) checked out to
~/Repos/el/auctex/.  I just do

  ./autogen.sh && ./configure --with-lispdir=. && make

(i.e., I don't "make install") and use these auctex related
configurations in my ~/.emacs.

--8<---cut here---start->8---
(setq TeX-data-directory "~/Repos/el/auctex"
  TeX-lisp-directory TeX-data-directory)

(load "~/Repos/el/auctex/auctex.el" nil t t)
(load "~/Repos/el/auctex/preview-latex.el" nil t t)

(add-to-list 'Info-additional-directory-list "~/Repos/el/auctex/doc")
--8<---cut here---end--->8---

Then TeX-style-global is correct.  The important thing is the setting
for `TeX-data-directory' and `TeX-lisp-directory' whose normal values
are only correct when auctex is installed.

Bye,
Tassilo



signature.asc
Description: PGP signature


Re: oddity with TeX-style-private ?

2020-10-23 Thread Uwe Brauer

> Uwe Brauer  writes:

> Since I have no clue what your directory structure is, I have no clue.
> But customizing both TeX-style-{global,private} *and* TeX-style-path is
> strange given that the latter's default value is built from the former.


> Why setting any of them?  Why is ~/.emacs.d/auctex/style not fine for
> private styles?  If I had some, I'd probably keep them in
> ~/Repos/my-auctex-styles/ and simply use a symlink
> ~/.emacs.d/auctex/style -> ~/Repos/my-auctex-styles/.


I think there is something fundamentally wrong with the path setting, 
TeX-style-private.

1. First I use customize for the setting not setq or add-to-list.

2. I now recall that I tried out several settings and none of them
   worked save the one I use currently.

   a. If I don't set TeX-style-global (and restart emacs), then per default 
it is set to
  Original value was
  "/home/oub/.emacs.d/elpa/auctex-12.2.0/style"
  I could set a link, as you propose but I find links messy, and
  don't see why I just can't set it to
  "/home/oub/emacs/site-lisp/packages/auctex-git/auctex/style"
  Otherwise don't make it user configurable.
  Be it as it may, even with the default setting, of
  TeX-style-private is *ignored*

   b. If I don't set TeX-style-path, then the default is
  Its value is ("~/.emacs.d/auctex"
  "/home/oub/.emacs.d/elpa/auctex-12.2.0/style"
  "/home/oub/.emacs.d/auctex/auto"
  "/home/oub/.emacs.d/auctex/style" "auto" "style") and, again,
  TeX-style-private is *ignored*.

3. The only solution to my problem is to set
'(TeX-style-path
'("/home/oub/emacs/site-lisp/packages/auctex-git/auctex/style"
"auto" "style"
   /home/oub/ALLES/emacs/site-lisp/auctex-private-style" ))

   But then, why is TeX-style-private needed?


I'd love to find the source of the problem, if you tell me how to debug
this.

Regards

Uwe 


smime.p7s
Description: S/MIME cryptographic signature


Re: oddity with TeX-style-private ?

2020-10-23 Thread Vladimir Lomov
Hello,
** Uwe Brauer  [2020-10-24 08:32:38 +0200]:

>> Uwe Brauer  writes:

>> Since I have no clue what your directory structure is, I have no clue.
>> But customizing both TeX-style-{global,private} *and* TeX-style-path is
>> strange given that the latter's default value is built from the former.


>> Why setting any of them?  Why is ~/.emacs.d/auctex/style not fine for
>> private styles?  If I had some, I'd probably keep them in
>> ~/Repos/my-auctex-styles/ and simply use a symlink
>> ~/.emacs.d/auctex/style -> ~/Repos/my-auctex-styles/.


> I think there is something fundamentally wrong with the path setting, 
> TeX-style-private.

> 1. First I use customize for the setting not setq or add-to-list.

> 2. I now recall that I tried out several settings and none of them
>worked save the one I use currently.

>a. If I don't set TeX-style-global (and restart emacs), then per 
> default it is set to
>   Original value was
>   "/home/oub/.emacs.d/elpa/auctex-12.2.0/style"
>   I could set a link, as you propose but I find links messy, and
>   don't see why I just can't set it to
>   "/home/oub/emacs/site-lisp/packages/auctex-git/auctex/style"
>   Otherwise don't make it user configurable.
>   Be it as it may, even with the default setting, of
>   TeX-style-private is *ignored*

>b. If I don't set TeX-style-path, then the default is
>   Its value is ("~/.emacs.d/auctex"
>   "/home/oub/.emacs.d/elpa/auctex-12.2.0/style"
>   "/home/oub/.emacs.d/auctex/auto"
>   "/home/oub/.emacs.d/auctex/style" "auto" "style") and, again,
>   TeX-style-private is *ignored*.

> 3. The only solution to my problem is to set
> '(TeX-style-path
> '("/home/oub/emacs/site-lisp/packages/auctex-git/auctex/style"
> "auto" "style"
>/home/oub/ALLES/emacs/site-lisp/auctex-private-style" ))

>But then, why is TeX-style-private needed?

I only set 'TeX-auto-private' and 'TeX-style-private' and all seems to work
fine. I suspect that you "overconfigured" your Emacs and AUCTeX. Try from
bare minimal, without explicitly setting any TeX variables, then set them with
Custom interface and set only '-style-private' (and, may be, '-auto-private').

> I'd love to find the source of the problem, if you tell me how to debug
> this.

With Emacs I think (this is my experience) that the only way to "debug" is to
start from bare configuration and adding one thing after the other.

> Regards

> Uwe 

---
WBR, Vladimir Lomov

-- 
A comment on schedules:
 Ok, how long will it take?
   For each manager involved in initial meetings add one month.
   For each manager who says "data flow analysis" add another month.
   For each unique end-user type add one month.
   For each unknown software package to be employed add two months.
   For each unknown hardware device add two months.
   For each 100 miles between developer and installation add one month.
   For each type of communication channel add one month.
   If an IBM mainframe shop is involved and you are working on a non-IBM
  system add 6 months.
   If an IBM mainframe shop is involved and you are working on an IBM
  system add 9 months.
Round up to the nearest half-year.
--Brad Sherman
By the way, ALL software projects are done by iterative prototyping.
Some companies call their prototypes "releases", that's all.



Re: oddity with TeX-style-private ?

2020-10-24 Thread Tassilo Horn
Vladimir Lomov  writes:

>>   Its value is ("~/.emacs.d/auctex"
>>   "/home/oub/.emacs.d/elpa/auctex-12.2.0/style"
>>   "/home/oub/.emacs.d/auctex/auto"
>>   "/home/oub/.emacs.d/auctex/style" "auto" "style") and, again,
>>   TeX-style-private is *ignored*.
>
> I only set 'TeX-auto-private' and 'TeX-style-private' and all seems to
> work fine. I suspect that you "overconfigured" your Emacs and
> AUCTeX. 

Those paths like ~/.emacs.d/elpa/auctex-12.2.0/... strongly suggest that
Uwe has both an (outdated) auctex-12.2.0 ELPA install *and* a Git master
install.  That's asking for troubles.

>> I'd love to find the source of the problem, if you tell me how to
>> debug this.
>
> With Emacs I think (this is my experience) that the only way to
> "debug" is to start from bare configuration and adding one thing after
> the other.

Probably `M-x list-load-path-shadows RET' will show more conflicts
between the ELPA and manual install.

Uwe, IMHO, I'd rather just use the auctex ELPA package.  That has the
least amount of configuration needs (basically zero).  If that's not
what you want, then remove the ELPA auctex package (M-x package-delete
RET auctex RET) and try my "run auctex directly from the checkout
configuration without make install".

Bye,
Tassilo





Re: oddity with TeX-style-private ?

2020-10-24 Thread Colin Baxter


On a related topic, the doc string for the variable 'TeX-auto-global'
says that it "must end with a directory separator". To me, a directory
separator is the oblique symbol '/' commonly called a
back-slash. However, the default setting for this variable, given in 
'tex-site.el' is "/usr/local/var/auctex", which does not end in '/'. 

It would seem I have not understood something here - but what?

Best wishes,

Colin Baxter.



Colin Baxter
URL: http://www.Colin-Baxter.com
-
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
-
Since mathematicians have invaded the theory of relativity, I do not
understand it myself. A. Einstein




Re: oddity with TeX-style-private ?

2020-10-24 Thread Uwe Brauer
>>> "TH" == Tassilo Horn  writes:

> Vladimir Lomov  writes:
>>> Its value is ("~/.emacs.d/auctex"
>>> "/home/oub/.emacs.d/elpa/auctex-12.2.0/style"
>>> "/home/oub/.emacs.d/auctex/auto"
>>> "/home/oub/.emacs.d/auctex/style" "auto" "style") and, again,
>>> TeX-style-private is *ignored*.
>> 
>> I only set 'TeX-auto-private' and 'TeX-style-private' and all seems to
>> work fine. I suspect that you "overconfigured" your Emacs and
>> AUCTeX. 

> Those paths like ~/.emacs.d/elpa/auctex-12.2.0/... strongly suggest that
> Uwe has both an (outdated) auctex-12.2.0 ELPA install *and* a Git master
> install.  That's asking for troubles.

>>> I'd love to find the source of the problem, if you tell me how to
>>> debug this.
>> 
>> With Emacs I think (this is my experience) that the only way to
>> "debug" is to start from bare configuration and adding one thing after
>> the other.

> Probably `M-x list-load-path-shadows RET' will show more conflicts
> between the ELPA and manual install.

Ah, ok that might help

> Uwe, IMHO, I'd rather just use the auctex ELPA package.  That has the
> least amount of configuration needs (basically zero).  

The point is right now, I am using Al Haji Ali's patch for output-dir
which keeps my latex directories tidy and clutter free. This patch is
for commit 087b0300012d14cc
on top of that I also have venndiagram.el that I want to test a bit more
before sending it to the list.

> If that's not what you want, then remove the ELPA auctex package (M-x
> package-delete RET auctex RET) and try my "run auctex directly
> from the checkout configuration without make install".

That is true will remove the ELPA package and restart emacs.
I can live for the moment with configuring 
TeX-style-path

I see what happens once I uninstall the ELPA package.

Oops and here it goes, I recall now that this I tried once, and the
following trouble prevented me for doing this 
Debugger entered--Lisp error: (error "Package ‘auctex-12.2.0’ is used by 
‘texfrag’ as de...")

  signal(error ("Package ‘auctex-12.2.0’ is used by ‘texfrag’ as
  de...")) error("Package `%s' is used by `%s' as dependency, not de..."

Ah package systems...



Thanks

Uwe 


smime.p7s
Description: S/MIME cryptographic signature


Re: oddity with TeX-style-private ?

2020-10-24 Thread Uwe Brauer
>>> "CB" == Colin Baxter  writes:

> On a related topic, the doc string for the variable 'TeX-auto-global'
> says that it "must end with a directory separator". To me, a directory
> separator is the oblique symbol '/' commonly called a
> back-slash. However, the default setting for this variable, given in 
> 'tex-site.el' is "/usr/local/var/auctex", which does not end in '/'. 

Right, this also crossed my mind and I tried it out.
The '/' did not make any difference. I was also wondering.


smime.p7s
Description: S/MIME cryptographic signature


Re: oddity with TeX-style-private ?

2020-10-24 Thread Tassilo Horn
Uwe Brauer  writes:

>> If that's not what you want, then remove the ELPA auctex package (M-x
>> package-delete RET auctex RET) and try my "run auctex directly
>> from the checkout configuration without make install".
>
> That is true will remove the ELPA package and restart emacs.  I can
> live for the moment with configuring TeX-style-path
>
> I see what happens once I uninstall the ELPA package.
>
> Oops and here it goes, I recall now that this I tried once, and the
> following trouble prevented me for doing this 
> Debugger entered--Lisp error: (error "Package ‘auctex-12.2.0’ is used by 
> ‘texfrag’ as de...")

Hm, ok.  After reading the docs, I think putting this into the early
init file (‘~/.config/emacs/early-init.el’ or
‘~/.emacs.d/early-init.el’) could work:

  ;; Disable the auctex ELPA package but load all others.
  (setq package-load-list '((auctex nil) all))

Then you'd still have the ELPA package installed but it wouldn't be
loaded by `package-activate', see the docs at
  (info "(emacs) Package Installation")
and
  (info "(emacs) Early Init File").

Bye,
Tassilo


signature.asc
Description: PGP signature


Re: oddity with TeX-style-private ?

2020-10-24 Thread Tassilo Horn
Uwe Brauer  writes:

>> On a related topic, the doc string for the variable 'TeX-auto-global'
>> says that it "must end with a directory separator". To me, a
>> directory separator is the oblique symbol '/' commonly called a
>> back-slash.

/ is a slash, \ is a backslash. ;-)

>> However, the default setting for this variable, given in
>> 'tex-site.el' is "/usr/local/var/auctex", which does not end in '/'.
>
> Right, this also crossed my mind and I tried it out.
> The '/' did not make any difference. I was also wondering.

Probably a relict of ancient times where paths were build using `concat'
rather than `expand-file-name' and friends, I don't know...

Bye,
Tassilo


signature.asc
Description: PGP signature


Re: oddity with TeX-style-private ?

2020-10-24 Thread Colin Baxter
Hello Tassilo,

> Tassilo Horn  writes:

> I also use the auctex master (or some other branch) checked out to
> ~/Repos/el/auctex/.  I just do

>   ./autogen.sh && ./configure --with-lispdir=. && make

> (i.e., I don't "make install") and use these auctex related
> configurations in my ~/.emacs.

> (setq TeX-data-directory "~/Repos/el/auctex" TeX-lisp-directory
> TeX-data-directory)

I have a similar arrangement to you, using auctex from git but without
actually installing. I do not however need to set explicitly the
TeX-data-directory - the variables TeX-data-directory and
TeX-lisp-directory automatically become
"/home//path/to/git/auctex/auctex".

I do set --prefix=/home//path/to/local/var/auctex in the Tex-style-path, which might
be useful one day.

Best wishes,

Colin Baxter.

 
Colin Baxter
URL: http://www.Colin-Baxter.com
-
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
-




Re: oddity with TeX-style-private ?

2020-10-24 Thread Uwe Brauer
>>> "CB" == Colin Baxter  writes:

> Hello Tassilo,
>> Tassilo Horn  writes:

>> I also use the auctex master (or some other branch) checked out to
>> ~/Repos/el/auctex/.  I just do

>> ./autogen.sh && ./configure --with-lispdir=. && make

Ok I could try this as well.


>> (i.e., I don't "make install") and use these auctex related
>> configurations in my ~/.emacs.

>> (setq TeX-data-directory "~/Repos/el/auctex" TeX-lisp-directory
>> TeX-data-directory)

> I have a similar arrangement to you, using auctex from git but without
> actually installing. I do not however need to set explicitly the
> TeX-data-directory - the variables TeX-data-directory and
> TeX-lisp-directory automatically become
> "/home//path/to/git/auctex/auctex".

Ok but, do you also have the auctex ELPA package installed?
I have the feeling this makes the difference, and I will try out what
Tassilo recommended.

Regards

Uwe 



smime.p7s
Description: S/MIME cryptographic signature


Re: oddity with TeX-style-private ?

2020-10-24 Thread Colin Baxter
Hi Uwe,

> Uwe Brauer  writes:
> Ok but, do you also have the auctex ELPA package installed?  I
> have the feeling this makes the difference, and I will try out
> what Tassilo recommended.

No. I only use auctex from git. I had loads of trouble with stale and/or
mis-configured packages that I long ago stopped using them from ELPA and
MELPA. I now prefer instead to download the sources, usually from a git
depository, and manually install them.

Best wishes,

Colin.


Colin Baxter
URL: http://www.Colin-Baxter.com
-
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
-




Slash at the end of directory (was Re: oddity with TeX-style-private ?)

2020-10-24 Thread Ikumi Keita
> Tassilo Horn  writes:
> Uwe Brauer  writes:
> "CB" == Colin Baxter  writes:
CB> However, the default setting for this variable, given in
CB> 'tex-site.el' is "/usr/local/var/auctex", which does not end in '/'.
 
Uwe> Right, this also crossed my mind and I tried it out.
Uwe> The '/' did not make any difference. I was also wondering.

Tassilo> Probably a relict of ancient times where paths were build using
Tassilo> `concat' rather than `expand-file-name' and friends, I don't
Tassilo> know...

The commit [1] removed most of the occurences of "Must end with a
directory separator." The one discussed here must be just a remnant of
them. I think that statement can be deleted safely.

According to the words from David in [2], it seems that the removal was
done for the sake of xemacs.

By the way, I think that file-name-as-directory should be re-enabled for
TeX-macro-{global,private}, considering that we no longer support
xemacs, because it seems that TeX-strip-extension and TeX-parse-path
assume that those variables have list of strings which end with trailing
slashes.
TeX-strip-extension:
  (let* (...
 (dir (expand-file-name (or (file-name-directory strip) "./"
 ...
(member dir TeX-macro-global)
(member dir TeX-macro-private))

TeX-parse-path:
  (setq entry (file-name-as-directory
   (if (string-match "/?/?\\'" entry)
   (substring entry 0 (match-beginning 0))
 entry)))
  ...
  (member entry (append '("/" "\\") TeX-macro-global))

Regards,
Ikumi Keita

[1] 
https://git.savannah.gnu.org/cgit/auctex.git/commit/?id=4ac002797d84dcb57ee4ec10c7e120ad71bf0c69
[2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31150
"XEmacs used to do things differently (and wasn't tolerant about it as
opposed to Emacs if I remember correctly) and thus many packages used
that behavior."



Re: Slash at the end of directory (was Re: oddity with TeX-style-private ?)

2020-10-24 Thread Uwe Brauer
>>> "IK" == Ikumi Keita  writes:

>> Tassilo Horn  writes:
>> Uwe Brauer  writes:
>> "CB" == Colin Baxter  writes:
CB> However, the default setting for this variable, given in
CB> 'tex-site.el' is "/usr/local/var/auctex", which does not end in '/'.
 
Uwe> Right, this also crossed my mind and I tried it out.
Uwe> The '/' did not make any difference. I was also wondering.

Tassilo> Probably a relict of ancient times where paths were build using
Tassilo> `concat' rather than `expand-file-name' and friends, I don't
Tassilo> know...

> The commit [1] removed most of the occurences of "Must end with a
> directory separator." The one discussed here must be just a remnant of
> them. I think that statement can be deleted safely.

> According to the words from David in [2], it seems that the removal was
> done for the sake of xemacs.

Right. I recall the transition time, when I was still switching between
the two, I found it confusing that one of them was rather nitpicking
while the other was more, let us say, generous.





smime.p7s
Description: S/MIME cryptographic signature


Re: Slash at the end of directory (was Re: oddity with TeX-style-private ?)

2020-10-24 Thread Tassilo Horn
Ikumi Keita  writes:

Hi Keita,

> By the way, I think that file-name-as-directory should be re-enabled
> for TeX-macro-{global,private}, considering that we no longer support
> xemacs, because it seems that TeX-strip-extension and TeX-parse-path
> assume that those variables have list of strings which end with
> trailing slashes.

IMHO, `TeX-strip-extension' and `TeX-parse-path' should better test with
(member dir (mapcar #'file-name-as-directory TeX-style-global)) etc.  It
shouldn't be the user's job to ensure that directory names are written
with a trailing slash.

Bye,
Tassilo





Re: Slash at the end of directory (was Re: oddity with TeX-style-private ?)

2020-10-25 Thread Ikumi Keita
Hi Tassilo,

> Tassilo Horn  writes:
> IMHO, `TeX-strip-extension' and `TeX-parse-path' should better test with
> (member dir (mapcar #'file-name-as-directory TeX-style-global)) etc.  It
> shouldn't be the user's job to ensure that directory names are written
> with a trailing slash.

OK, then how about the following patch?

Regards,
Ikumi Keita

diff --git a/tex-site.el.in b/tex-site.el.in
index fd28869d..12287d51 100644
--- a/tex-site.el.in
+++ b/tex-site.el.in
@@ -75,7 +75,6 @@ TeX-auto-* (automatically generated lisp).")
 (defcustom TeX-auto-global
 @lispautodir@
   "*Directory containing automatically generated information.
-Must end with a directory separator.
 
 For storing automatic extracted information about the TeX macros
 shared by all users of a site."
diff --git a/tex.el b/tex.el
index 43cc8d11..d722587e 100644
--- a/tex.el
+++ b/tex.el
@@ -2612,6 +2612,9 @@ If REGEXP is nil, or \"\", an error will occur."
 		   (TeX-split-string
 			(if (string-match ";" value) ";" ":")
 			value)))
+	 (global (append '("/" "\\")
+			 (mapcar #'file-name-as-directory
+ TeX-macro-global)))
 	 entry
 	 answers)
 (while entries
@@ -2622,7 +2625,7 @@ If REGEXP is nil, or \"\", an error will occur."
 		   (substring entry 0 (match-beginning 0))
 		 entry)))
   (or (not (file-name-absolute-p entry))
-	  (member entry (append '("/" "\\") TeX-macro-global))
+	  (member entry global)
 	  (setq answers (cons entry answers
 answers))
 
@@ -4483,8 +4486,9 @@ If EXTENSIONS is not specified or nil, the value of
 (defun TeX-strip-extension (&optional string extensions nodir nostrip)
   "Return STRING without any trailing extension in EXTENSIONS.
 If NODIR is t, also remove directory part of STRING.
-If NODIR is `path', remove directory part of STRING if it is equal to
-the current directory, `TeX-macro-private' or `TeX-macro-global'.
+If NODIR is `path', remove directory part of STRING if it is
+equal to the current directory or is a member of
+`TeX-macro-private' or `TeX-macro-global'.
 If NOSTRIP is set, do not remove extension after all.
 STRING defaults to the name of the current buffer.
 EXTENSIONS defaults to `TeX-file-extensions'."
@@ -4502,8 +4506,8 @@ EXTENSIONS defaults to `TeX-file-extensions'."
 	 (dir (expand-file-name (or (file-name-directory strip) "./"
 (if (or (eq nodir t)
 	(string-equal dir (expand-file-name "./"))
-	(member dir TeX-macro-global)
-	(member dir TeX-macro-private))
+	(member dir (mapcar #'file-name-as-directory TeX-macro-global))
+	(member dir (mapcar #'file-name-as-directory TeX-macro-private)))
 	(file-name-nondirectory strip)
   strip)))
 


Re: Slash at the end of directory (was Re: oddity with TeX-style-private ?)

2020-10-25 Thread Tassilo Horn
> > IMHO, `TeX-strip-extension' and `TeX-parse-path' should better test with
> > (member dir (mapcar #'file-name-as-directory TeX-style-global)) etc.  It
> > shouldn't be the user's job to ensure that directory names are written
> > with a trailing slash.
> 
> OK, then how about the following patch.

LGTM, thanks!

Bye,
Tassilo



Re: Slash at the end of directory (was Re: oddity with TeX-style-private ?)

2020-10-25 Thread Tassilo Horn
Ikumi Keita  writes:

>>> > IMHO, `TeX-strip-extension' and `TeX-parse-path' should better
>>> > test with (member dir (mapcar #'file-name-as-directory
>>> > TeX-style-global)) etc.  It shouldn't be the user's job to ensure
>>> > that directory names are written with a trailing slash.
>>> 
>>> OK, then how about the following patch.
>
>> LGTM, thanks!
>
> Pushed. Oops, sorry, I overlooked that new commits had come in. A non
> fast-forward merge commit was produced on savannah. Not good...

Oh no, we're all gonna die! ;-)

Bye,
Tassilo





Re: Slash at the end of directory (was Re: oddity with TeX-style-private ?)

2020-10-25 Thread Uwe Brauer



> Pushed. Oops, sorry, I overlooked that new commits had come in. A non
> fast-forward merge commit was produced on savannah. Not good...

Actually I find non fast-forward merges much easier to understand than
fast-forward one. ;-)


smime.p7s
Description: S/MIME cryptographic signature


Re: Slash at the end of directory (was Re: oddity with TeX-style-private ?)

2020-10-25 Thread David Kastrup
Uwe Brauer  writes:

>> Pushed. Oops, sorry, I overlooked that new commits had come in. A non
>> fast-forward merge commit was produced on savannah. Not good...
>
> Actually I find non fast-forward merges much easier to understand than
> fast-forward one. ;-)

That's nonsensical since any non fast-forward commit consists of the
combination of fast-forwarding (direct) commits with a subsequent merge
commit of two branches with diverging history.  Rebased commits, in
contrast, are just what would have resulted from linear development.

It may be easier on the developer, but certainly not on the reader.

-- 
David Kastrup



Re: Slash at the end of directory (was Re: oddity with TeX-style-private ?)

2020-10-25 Thread Uwe Brauer
>>> "DK" == David Kastrup  writes:

> Uwe Brauer  writes:
>>> Pushed. Oops, sorry, I overlooked that new commits had come in. A non
>>> fast-forward merge commit was produced on savannah. Not good...
>> 
>> Actually I find non fast-forward merges much easier to understand than
>> fast-forward one. ;-)

> That's nonsensical since any non fast-forward commit consists of the
> combination of fast-forwarding (direct) commits with a subsequent merge
> commit of two branches with diverging history.  Rebased commits, in
> contrast, are just what would have resulted from linear development.

I know and that is why I don't like rebasing.

> It may be easier on the developer, but certainly not on the reader.

That might be so, but I think it is just a different philosophy. I'd
prefer to know where a commit comes from (I mean from which branch), and
that is why I find linearising (that is rebasing) confusing to say the least.

But I think it boils down to a question of personal taste. (And I admit
that if there are to many no fast forward merges from many branches that
might be confusing as well). Anyhow.



smime.p7s
Description: S/MIME cryptographic signature


Re: Slash at the end of directory (was Re: oddity with TeX-style-private ?)

2020-10-25 Thread David Kastrup
Uwe Brauer  writes:

 "DK" == David Kastrup  writes:
>
>> Uwe Brauer  writes:
 Pushed. Oops, sorry, I overlooked that new commits had come in. A non
 fast-forward merge commit was produced on savannah. Not good...
>>> 
>>> Actually I find non fast-forward merges much easier to understand than
>>> fast-forward one. ;-)
>
>> That's nonsensical since any non fast-forward commit consists of the
>> combination of fast-forwarding (direct) commits with a subsequent merge
>> commit of two branches with diverging history.  Rebased commits, in
>> contrast, are just what would have resulted from linear development.
>
> I know and that is why I don't like rebasing.
>
>> It may be easier on the developer, but certainly not on the reader.
>
> That might be so, but I think it is just a different philosophy. I'd
> prefer to know where a commit comes from (I mean from which branch), and
> that is why I find linearising (that is rebasing) confusing to say the
> least.

To me it looks like you are confusing the development of a feature with
long-running parallel branches.  For the latter, there is no point in
rebasing.  For the former, there is no point in identifying a branch
that isn't in any manner reflecting anything but an arbitrary point of
departure before development of a feature has finished.

Rebasing does not provide a historical record.  Its point is to convey a
logical sequence of changes rather than a diary.  For figuring out where
and when and why something went right or wrong, that tends to be
considerably more accessible.

> But I think it boils down to a question of personal taste. (And I
> admit that if there are to many no fast forward merges from many
> branches that might be confusing as well). Anyhow.

-- 
David Kastrup



Re: Re: Slash at the end of directory (was Re: oddity with TeX-style-private ?)

2020-10-25 Thread Ikumi Keita
> "Tassilo Horn"  writes:
>> > IMHO, `TeX-strip-extension' and `TeX-parse-path' should better test with
>> > (member dir (mapcar #'file-name-as-directory TeX-style-global)) etc.  It
>> > shouldn't be the user's job to ensure that directory names are written
>> > with a trailing slash.
>> 
>> OK, then how about the following patch.

> LGTM, thanks!

Pushed. Oops, sorry, I overlooked that new commits had come in. A non
fast-forward merge commit was produced on savannah. Not good...

Regards,
Ikumi Keita