Re: Making AUCTeX ELPA releases from the master branch
Stefan Monnier writes: Hi Stefan, > FWIW, the `elpa-admin.el` code needs to do something similar and it > asks Git a bit more directly (i.e. with the generating the diff): > >(elpaa--call > (current-buffer) > "git" "log" "-n1" "--oneline" "--no-patch" > "--pretty=format:%H" > (when (elpaa--spec-get pkg-spec :merge) > ;; Finding "the" revision when there's a merge involved is > ;; fundamentally unreliable. > ;; Ideally we should probably signal an error when the > commit > ;; we found is not on all paths from FROM to avoid making an > ;; arbitrary choice. > ;; For `:merge'd packages, the commit that flipped > `Version:' > ;; is usually not what we want, since that one was on the > ;; upstream branch, without our own changes. > ;; We use `--first-parent' for this reason, so it prefers > ;; the corresponding merge commit (which is not ideal either > ;; but is arguably the best we can do in that case). > "--first-parent") > "-L" (concat "/^;;* *\\(Package-\\)\\?Version:/,+1:" > (file-name-nondirectory > (elpaa--main-file pkg-spec))) > > The "%H" above makes it output the commit hash where `Version:` was > changed, so you can replace that with an appropriate % thingy to get > the date instead. Why would I need the date of the last release? I set AUCTEXDATE to the committer date of HEAD, not to the date of the last release. When the Version is changed, then that's the correct release date, too. Otherwise, the current HEAD's date and time are appended to the last released version to indicate that this is a development version. > But another option is to disregard the problem: Perfect, exactly my style. YOLO! :-) > presumably you trust AUCTeX's code, Don't know. It's mostly Keite and Arash recently... :-P > so you don't need to run that make recipe within a sandbox to confine > its misdeeds, and the above error will not appear on `elpa.gnu.org`. > So, instead of (or in addition to, if you prefer) the above (debug t) > thingy, put: > > (sandbox nil) > > so the commands are run without Bubblewrap. Great, works. The build and also the package after package-install-file with the built auctex.tar. 👍 Oh, no, one thing doesn't: the fine manuals. I've changed it so that they stay in doc/ and there's also the dir file referencing the auctex and preview-latex manual. Do they need to be top-level for elpa (in which case I'd just add an elpa make target doing the move) or can I somehow make that work? Thanks, Tassilo
main b582fc13: Add tex-site.el and doc/dir to .gitignore
branch: main commit b582fc13c6831193eab9b6838b7ceee2d2bb227e Author: Tassilo Horn Commit: Tassilo Horn Add tex-site.el and doc/dir to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ac530538..f68e38a5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,13 +17,14 @@ auto-loads.el autom4te.* config.* configure -#tex-site.el +tex-site.el tex-site.el.out # Files generated while building the auto-generated files included in elpa. doc/preview-dtxdoc.texi doc/version.texi auto.el +doc/dir etc/auctex-logo.pdf etc/auto latex/prauctex.cfg
main 68bf1153: Delete top-level dir file
branch: main commit 68bf115399403f41556f375e0a5c1c15ae78a787 Author: Tassilo Horn Commit: Tassilo Horn Delete top-level dir file --- dir | 25 - 1 file changed, 25 deletions(-) diff --git a/dir b/dir deleted file mode 100644 index 0b85f603.. --- a/dir +++ /dev/null @@ -1,25 +0,0 @@ -This is the file .../info/dir, which contains the -topmost node of the Info hierarchy, called (dir)Top. -The first time you invoke Info you start off looking at this node. - -File: dir, Node: Top This is the top of the INFO tree - - This (the Directory node) gives a menu of major topics. - Typing "q" exits, "?" lists all Info commands, "d" returns here, - "h" gives a primer for first-timers, - "mEmacs" visits the Emacs manual, etc. - - In Emacs, you can click mouse button 2 on a menu item or cross reference - to select it. - -* Menu: - -Emacs -* AUCTeX: (auctex). A sophisticated TeX environment for Emacs. -* preview-latex: (preview-latex). -Preview LaTeX fragments in Emacs - -TeX -* AUCTeX: (auctex). A sophisticated TeX environment for Emacs. -* preview-latex: (preview-latex). -Preview LaTeX fragments in Emacs
Re: tex-continuous.el: latexmk, auctex, flymake
> Great, I just tested it, I will clone your repository by the way why to > you call it https://github.com/ultronozm/tex-continuous.el ?? Couldn't > you drop the .el? > > The .el sometimes causes problems when opening the directory in dired > mode I use the extview package, which opens certain files in dired with > external programs. I suspect I was imitating someone else's naming scheme - sorry to hear it's causing problems. I guess you can specify an alternative destination name while cloning. I'm using elpaca, which seems to automatically drop the .el while cloning. > I find the these functions very useful especially the > czm-tex-edit-fractionify-region > (I wrote something more primitive but stopped using it, since your > solution is clearly superior) > > Could some of these function be included in auctex? > What do others think? I'm very glad to hear that you're finding them useful. Of course I'd be happy to see them used or included anywhere, but my personal feeling is that they're a bit specialized, personal, non-canonical, subject to taste, etc.
Re: tex-continuous.el: latexmk, auctex, flymake
>>> "PN" == Paul Nelson writes: > The attached version (also updated at the github link) seems to work > for me with a custom build directory specified by TeX-output-dir. Let > me know if you run into any issues. Great, I just tested it, I will clone your repository by the way why to you call it https://github.com/ultronozm/tex-continuous.el ?? Couldn't you drop the .el? The .el sometimes causes problems when opening the directory in dired mode I use the extview package, which opens certain files in dired with external programs. > I might also start using this "build directory" approach -- thanks for the > tip! Thanks for your code. BTW, you also the author of czm-tex-edit. I find the these functions very useful especially the czm-tex-edit-fractionify-region (I wrote something more primitive but stopped using it, since your solution is clearly superior) Could some of these function be included in auctex? What do others think? Regards Uwe -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. smime.p7s Description: S/MIME cryptographic signature
Re: tex-continuous.el: latexmk, auctex, flymake
The attached version (also updated at the github link) seems to work for me with a custom build directory specified by TeX-output-dir. Let me know if you run into any issues. I might also start using this "build directory" approach -- thanks for the tip! tex-continuous.el Description: Binary data
Re: tex-continuous.el: latexmk, auctex, flymake
>>> "UB" == Uwe Brauer writes: >>> "PN" == Paul Nelson writes: >>> But more than a year ago Al Haji-Ali provided a functionality which >>> allows to configure a build directory in which all files dwell that are >>> generated by a LaTeX compilation. So TeX-view looks then there and not >>> in the main directory if that functionality is enabled. >>> >>> >>> So the question is: can your code be adapted? >>> >> I see. Yes, I strongly suspect it can be adapted. Could you point me >> towards the functionality in question? I just want to confirm that if I set locally %%% TeX-output-dir: nil Then your code works as expected -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. smime.p7s Description: S/MIME cryptographic signature
Re: tex-continuous.el: latexmk, auctex, flymake
> Thanks for you quick reply. It seems that the code was added already 3 > years ago. I recall a series of patches and test in which I > participated (and I forgot some details). > According to the documentation, finally the behavior is controlled by > setting the variable TeX-output-dir I forgot to add, the relevant commits are 094c29862190290832e60872c2ab1442a27bdba5 And some commits before maybe -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. smime.p7s Description: S/MIME cryptographic signature
Re: tex-continuous.el: latexmk, auctex, flymake
>>> "PN" == Paul Nelson writes: >> But more than a year ago Al Haji-Ali provided a functionality which >> allows to configure a build directory in which all files dwell that are >> generated by a LaTeX compilation. So TeX-view looks then there and not >> in the main directory if that functionality is enabled. >> >> >> So the question is: can your code be adapted? >> > I see. Yes, I strongly suspect it can be adapted. Could you point me > towards the functionality in question? Thanks for you quick reply. It seems that the code was added already 3 years ago. I recall a series of patches and test in which I participated (and I forgot some details). According to the documentation, finally the behavior is controlled by setting the variable TeX-output-dir --8<---cut here---start->8--- TeX-output-dir is a variable defined in ‘tex.el’. Its value is "build" Original value was nil The path of the directory where output files should be placed. A relative path is interpreted as being relative to the master file in ‘TeX-master’. The path cannot contain a directory that starts with ’.’. If this variable is nil, the output directory is assumed to be the same as the directory of ‘TeX-master’. Automatically becomes buffer-local when set. This variable is safe as a file local variable if its value satisfies the predicate ‘string-or-null-p’. You can customize this variable. --8<---cut here---end--->8--- The point that variable could also be some other name or an absolute path. [back] > (My code contains the defcustom tex-continuous-command that controls > the latexmk command. The other thing it needs to know is where to > find the log file. This is currently done by calling > (TeX-command-master "log"), which could in turn be made customizable, > and I suspect would then support the functionality that you mention.) All files including the log file are placed in the build directory. I like this TeX-output-dir property a lot since it keeps my directories tidy > Thanks for the feedback! Thanks for your quick reply and the code of course! Uwe > Paul -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. smime.p7s Description: S/MIME cryptographic signature
Re: tex-continuous.el: latexmk, auctex, flymake
> But more than a year ago Al Haji-Ali provided a functionality which > allows to configure a build directory in which all files dwell that are > generated by a LaTeX compilation. So TeX-view looks then there and not > in the main directory if that functionality is enabled. > > > So the question is: can your code be adapted? > I see. Yes, I strongly suspect it can be adapted. Could you point me towards the functionality in question? (My code contains the defcustom tex-continuous-command that controls the latexmk command. The other thing it needs to know is where to find the log file. This is currently done by calling (TeX-command-master "log"), which could in turn be made customizable, and I suspect would then support the functionality that you mention.) Thanks for the feedback! Paul
Re: tex-continuous.el: latexmk, auctex, flymake
>>> "PN" == Paul Nelson writes: > The process output is contained in a buffer name *pvc-your-file-name*. > Could you share what that says? It says it compiles and I think I know what the problem is. Have a look at the directory in question , | | -rw-r--r-- 1 oub oub 9,9K abr 20 17:20 table-english.fdb_latexmk | drwxrwxr-x 4 oub oub 4,0K abr 20 17:20 . | -rw-r--r-- 1 oub oub 12K abr 20 17:20 table-english.log | -rw-r--r-- 1 oub oub 117K abr 20 17:20 table-english.pdf | -rw-r--r-- 1 oub oub 13K abr 20 17:20 table-english.synctex.gz | -rw-r--r-- 1 oub oub 15K abr 20 17:20 table-english.fls | -rw-r--r-- 1 oub oub 32 abr 20 17:20 table-english.aux | -rw-r--r-- 1 oub oub 3,5K abr 20 17:20 table-english.tex | drwxrwxr-x 2 oub oub 4,0K abr 20 17:19 build | ` the LaTeX file in question is table-english.tex So the pdf is generated in the directory the source tex file sits. That is the normal behavior But more than a year ago Al Haji-Ali provided a functionality which allows to configure a build directory in which all files dwell that are generated by a LaTeX compilation. So TeX-view looks then there and not in the main directory if that functionality is enabled. So the question is: can your code be adapted? Regards Uwe -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. smime.p7s Description: S/MIME cryptographic signature
Re: tex-continuous.el: latexmk, auctex, flymake
The process output is contained in a buffer name *pvc-your-file-name*. Could you share what that says?
Re: tex-continuous.el: latexmk, auctex, flymake
>>> "PN" == Paul Nelson writes: > I thought I'd share a package I'm hoping to eventually submit to ELPA. > It may be topical in view of the recent discussion here concerning > latexmk. I would appreciate any advice or suggestions, particularly > on ways that I could better leverage existing functionality from > AUCTeX. > For some people, the key feature of latexmk is that it can compile a > document continuously, e.g., with the command: > latexmk -pvc -shell-escape -pdf -view=none -e '$pdflatex=q/pdflatex %O > -synctex=1 -interaction=nonstopmode %S/' my-cool-tex-file.tex > For many years, my workflow was to edit a tex document with AUCTeX > while compiling in the background in a shell with latexmk, except when > I wanted to use AUCTeX's error handling, in which case I would > temporarily close latexmk and use TeX-command-master. How ridiculous. > This package streamlines that workflow by providing a minor mode that > runs latexmk continuously, parses the error log using AUCTeX, and > reports the errors via flymake. Hm, sounds interesting, I have not used latexmk for years, so may be I am asking something stupid, but here is what I did 1. Downloaded, compiled and loaded your file 2. Opened a latex file, 3. Run tex-continuous-toggle 4. Run TeX-view (either okular or evince) 5. Added some text and save the file. 6. But the corresponding pdf file was not actualized. I am sure I miss here something, but what? Thanks Uwe -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. smime.p7s Description: S/MIME cryptographic signature
Re: Making AUCTeX ELPA releases from the master branch
> Alright, I've had some time to do some fiddling. In the auctex > repository, there's some new main branch (based on externals/auctex) > where I've changed how AUCTEXVERSION and AUCTEXDATE are determined. > Instead of looking at specially formatted lines in ChangeLog, it just > looks at the git diffs to check when there was a "+;; Version: ..." > change in auctex.el. It seems to work fine when I run "make -f > GNUMakefile". FWIW, the `elpa-admin.el` code needs to do something similar and it asks Git a bit more directly (i.e. with the generating the diff): (elpaa--call (current-buffer) "git" "log" "-n1" "--oneline" "--no-patch" "--pretty=format:%H" (when (elpaa--spec-get pkg-spec :merge) ;; Finding "the" revision when there's a merge involved is ;; fundamentally unreliable. ;; Ideally we should probably signal an error when the commit ;; we found is not on all paths from FROM to avoid making an ;; arbitrary choice. ;; For `:merge'd packages, the commit that flipped `Version:' ;; is usually not what we want, since that one was on the ;; upstream branch, without our own changes. ;; We use `--first-parent' for this reason, so it prefers ;; the corresponding merge commit (which is not ideal either ;; but is arguably the best we can do in that case). "--first-parent") "-L" (concat "/^;;* *\\(Package-\\)\\?Version:/,+1:" (file-name-nondirectory (elpaa--main-file pkg-spec))) The "%H" above makes it output the commit hash where `Version:` was changed, so you can replace that with an appropriate % thingy to get the date instead. > Now I'd like to test building auctex.tar using your recipe. I've > checked out that new main branch into ../elpa/packages/auctex/ (or > actually auctex is a symlink to my auctex clone). With the current > elpa-packages recipe > >(auctex :url "https://git.savannah.gnu.org/git/auctex.git"; >:news "NEWS.org") > > an auctex.tar is built successfully but apparently that didn't run the > GNUMakefile, for example, tex-site.el isn't included because it's not > generated from tex-site.el.in. Indeed, by default we don't run any make or any such thing, we just tar up the files. > So I've tried to add :make "all" or even :shell-command "make -g > GNUMakefile" to the auctex recipe Sounds good. > but then I get this error: > > --8<---cut here---start->8--- > ❯ make auctex.tar > emacs --batch -Q -l admin/elpa-admin.el \ > -f elpaa-batch-pkg-spec-make-dependencies .pkg-descs.mk > emacs --batch -l /home/horn/tmp/elpa/admin/elpa-admin.el\ > -f elpaa-batch-make-one-tarball auctex.tar > Building tarball auctex.tar... > Build error for auctex.tar: (error "Error-indicating exit code in > elpaa--call-sandboxed: > bwrap: Can't bind mount /oldroot/home/horn/Repos/el/auctex on > /newroot/home/horn/tmp/elpa/packages/auctex/: Unable to mount source on > destination: No such file or directory > ") > Build of package auctex.tar FAILED!! > --8<---cut here---end--->8--- > > What does that error try to tell me? Good question. I haven't seen this error yet, so I don't know. Maybe the problem is in the "actually auctex is a symlink to my auctex clone". If you want to try and debug this, then edit the `elpa-config` file to put (debug t) in the config, so that you'll get a much more verbose output showing for example exactly the `bwrap` command executed, which you can then reproduce "by hand". But another option is to disregard the problem: presumably you trust AUCTeX's code, so you don't need to run that make recipe within a sandbox to confine its misdeeds, and the above error will not appear on `elpa.gnu.org`. So, instead of (or in addition to, if you prefer) the above (debug t) thingy, put: (sandbox nil) so the commands are run without Bubblewrap. Stefan
tex-continuous.el: latexmk, auctex, flymake
I thought I'd share a package I'm hoping to eventually submit to ELPA. It may be topical in view of the recent discussion here concerning latexmk. I would appreciate any advice or suggestions, particularly on ways that I could better leverage existing functionality from AUCTeX. For some people, the key feature of latexmk is that it can compile a document continuously, e.g., with the command: latexmk -pvc -shell-escape -pdf -view=none -e '$pdflatex=q/pdflatex %O -synctex=1 -interaction=nonstopmode %S/' my-cool-tex-file.tex For many years, my workflow was to edit a tex document with AUCTeX while compiling in the background in a shell with latexmk, except when I wanted to use AUCTeX's error handling, in which case I would temporarily close latexmk and use TeX-command-master. How ridiculous. This package streamlines that workflow by providing a minor mode that runs latexmk continuously, parses the error log using AUCTeX, and reports the errors via flymake. Something similar could be achieved with after-save-hook and TeX-command-run-all, but the latter approach has some disadvantages: it calls View to open the PDF, which I never figured out how to disable, and doesn't mesh well with AUCTeX's error handling, which also seems to be the case for the preliminary latexmk support recently added to master. See attached, or https://github.com/ultronozm/tex-continuous.el. Thanks, best, Paul tex-continuous.el Description: Binary data
Re: After Tassilos merge: main or master
Uwe Brauer writes: > I most likely did not get the point. I just saw the mail concerning > Tassilos «mega» commit, which created a new branch called main. It's just 2 small changes to GNUMakefile. However, it's based on the externals/auctex branch of elpa which we didn't have in our repository before. So quite some bit history has been imported. > So where will the main development take place either on > > 1. The new main branch? > > 2. Or the old master branch? Right now, it's still on master. It might change to main at some point. But then you can expect some announcement mail. Bye, Tassilo
Re: Making AUCTeX ELPA releases from the master branch
Stefan Monnier writes: Hi Stefan, > Well, not for `make auctex.tar` where it's built from whatever is HEAD > in `packages/auctex`. But in `elpa.gnu.git` HEAD is indeed pointing > to `externals/`. Alright, I've had some time to do some fiddling. In the auctex repository, there's some new main branch (based on externals/auctex) where I've changed how AUCTEXVERSION and AUCTEXDATE are determined. Instead of looking at specially formatted lines in ChangeLog, it just looks at the git diffs to check when there was a "+;; Version: ..." change in auctex.el. It seems to work fine when I run "make -f GNUMakefile". Now I'd like to test building auctex.tar using your recipe. I've checked out that new main branch into ../elpa/packages/auctex/ (or actually auctex is a symlink to my auctex clone). With the current elpa-packages recipe (auctex :url "https://git.savannah.gnu.org/git/auctex.git"; :news "NEWS.org") an auctex.tar is built successfully but apparently that didn't run the GNUMakefile, for example, tex-site.el isn't included because it's not generated from tex-site.el.in. So I've tried to add :make "all" or even :shell-command "make -g GNUMakefile" to the auctex recipe but then I get this error: --8<---cut here---start->8--- ❯ make auctex.tar emacs --batch -Q -l admin/elpa-admin.el \ -f elpaa-batch-pkg-spec-make-dependencies .pkg-descs.mk emacs --batch -l /home/horn/tmp/elpa/admin/elpa-admin.el\ -f elpaa-batch-make-one-tarball auctex.tar Building tarball auctex.tar... Build error for auctex.tar: (error "Error-indicating exit code in elpaa--call-sandboxed: bwrap: Can't bind mount /oldroot/home/horn/Repos/el/auctex on /newroot/home/horn/tmp/elpa/packages/auctex/: Unable to mount source on destination: No such file or directory ") Build of package auctex.tar FAILED!! --8<---cut here---end--->8--- What does that error try to tell me? Thanks, Tassilo
After Tassilos merge: main or master
Hi I most likely did not get the point. I just saw the mail concerning Tassilos «mega» commit, which created a new branch called main. So where will the main development take place either on 1. The new main branch? 2. Or the old master branch? Thanks Uwe Braure -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. smime.p7s Description: S/MIME cryptographic signature