diff options
| author | Stefan Monnier | 2023-03-27 17:16:58 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2023-03-27 17:16:58 -0400 |
| commit | 616b22b5b95ce442ee343a18bfbf9ef18d8bb04f (patch) | |
| tree | 5fd048b91fc3b4f65e47c6a838306af01942abdd | |
| parent | cd62dc0dd2d371f45e6e0b4f031b7deb674edf39 (diff) | |
| parent | 8f42db010d15efa21fb9007e61daedbe1e2dfa53 (diff) | |
| download | emacs-616b22b5b95ce442ee343a18bfbf9ef18d8bb04f.tar.gz emacs-616b22b5b95ce442ee343a18bfbf9ef18d8bb04f.zip | |
Merge from origin/emacs-29
8f42db010d1 Improve indenting "case" in Python
c4d490490dc ; * test/src/fns-tests.el: Fix last change
875e77a66a6 * test/infra/Dockerfile.emba (emacs-native-comp): Add zli...
64a2b0d36fe Fix failure of fns-tests-collate-strings on Cygwin
90fc6b987ad * lisp/savehist.el (savehist-save): Preserve shared struc...
08fbc133756 Adapt Tramp manual
accb3871668 Fix system time sampling on MS-Windows
33d436eefa1 Fix treesit_ensure_parsed (bug#62333)
d93a439846f * lisp/help-fns.el (find-lisp-object-file-name): Fix bug#...
be8147c53f9 Improve "Bugs" in the Emacs manual
| -rw-r--r-- | doc/emacs/trouble.texi | 652 | ||||
| -rw-r--r-- | doc/misc/tramp.texi | 30 | ||||
| -rw-r--r-- | lisp/help-fns.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 9 | ||||
| -rw-r--r-- | lisp/savehist.el | 5 | ||||
| -rw-r--r-- | src/timefns.c | 9 | ||||
| -rw-r--r-- | src/treesit.c | 10 | ||||
| -rw-r--r-- | test/infra/Dockerfile.emba | 2 | ||||
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 38 | ||||
| -rw-r--r-- | test/src/fns-tests.el | 2 |
10 files changed, 442 insertions, 317 deletions
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index e168514fcb9..ded9d02cf54 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi | |||
| @@ -496,8 +496,43 @@ Customization}. | |||
| 496 | If you think you have found a bug in Emacs, please report it. We | 496 | If you think you have found a bug in Emacs, please report it. We |
| 497 | cannot promise to fix it, or always to agree that it is a bug, but we | 497 | cannot promise to fix it, or always to agree that it is a bug, but we |
| 498 | certainly want to hear about it. The same applies for new features | 498 | certainly want to hear about it. The same applies for new features |
| 499 | you would like to see added. The following sections will help you to | 499 | you would like to see added. This section will help you to determine |
| 500 | construct an effective bug report. | 500 | whether you found a bug, and if so, construct an effective bug report. |
| 501 | |||
| 502 | The general procedure when you find something that could be a bug is | ||
| 503 | as follows: | ||
| 504 | |||
| 505 | @itemize @bullet | ||
| 506 | @item | ||
| 507 | See if what you found is a known problem or a bug that was already | ||
| 508 | reported and/or fixed. @xref{Known Problems}, where you will find how | ||
| 509 | to look for known problems and bugs. | ||
| 510 | |||
| 511 | @item | ||
| 512 | If you are unsure whether the behavior you see is a bug, see @ref{Bug | ||
| 513 | Criteria}, which tells what we consider as clear bugs in Emacs. | ||
| 514 | |||
| 515 | @item | ||
| 516 | Once you decide you found a bug, see @ref{Understanding Bug | ||
| 517 | Reporting}, which helps you in describing what you see in the most | ||
| 518 | efficient manner, making our job of reproducing the issue and | ||
| 519 | investigating it easier. | ||
| 520 | |||
| 521 | @item | ||
| 522 | Next, see @ref{Checklist, Checklist for Bug Reports}, where we | ||
| 523 | describe in detail how to submit a bug report and what information to | ||
| 524 | include in it. In a nutshell, you submit a bug report via electronic | ||
| 525 | mail using the Emacs command @code{report-emacs-bug}, which assists | ||
| 526 | you in doing so. Submitting a bug report starts the process of | ||
| 527 | investigating and fixing the bug, where you will receive copies of | ||
| 528 | email messages discussing the bug, in which we might ask you to | ||
| 529 | provide more information, test possible fixes, etc. | ||
| 530 | |||
| 531 | @item | ||
| 532 | Finally, if you want to propose specific changes to Emacs, whether to | ||
| 533 | fix a bug, add a new feature, or improve our documentation, please see | ||
| 534 | @ref{Sending Patches}, for details about submitting such changes. | ||
| 535 | @end itemize | ||
| 501 | 536 | ||
| 502 | @menu | 537 | @menu |
| 503 | * Known Problems:: How to read about known problems and bugs. | 538 | * Known Problems:: How to read about known problems and bugs. |
| @@ -509,9 +544,10 @@ construct an effective bug report. | |||
| 509 | 544 | ||
| 510 | @node Known Problems | 545 | @node Known Problems |
| 511 | @subsection Reading Existing Bug Reports and Known Problems | 546 | @subsection Reading Existing Bug Reports and Known Problems |
| 547 | @cindex known bugs and problems | ||
| 512 | 548 | ||
| 513 | Before reporting a bug, if at all possible please check to see if it | 549 | Before reporting a bug, if at all possible, please check to see if |
| 514 | is already known about. Indeed, it may already have been fixed in a | 550 | we already know about it. Indeed, it may already have been fixed in a |
| 515 | later release of Emacs, or in the development version. Here is a list | 551 | later release of Emacs, or in the development version. Here is a list |
| 516 | of the main places you can read about known issues: | 552 | of the main places you can read about known issues: |
| 517 | 553 | ||
| @@ -519,20 +555,26 @@ of the main places you can read about known issues: | |||
| 519 | @item | 555 | @item |
| 520 | The @file{etc/PROBLEMS} file; type @kbd{C-h C-p} to read it. This | 556 | The @file{etc/PROBLEMS} file; type @kbd{C-h C-p} to read it. This |
| 521 | file contains a list of particularly well-known issues that have been | 557 | file contains a list of particularly well-known issues that have been |
| 522 | encountered in compiling, installing and running Emacs. Often, there | 558 | encountered in compiling, installing and running Emacs, with special |
| 523 | are suggestions for workarounds and solutions. | 559 | emphasis on issues caused by other software that cannot be easily |
| 560 | solved in Emacs. Often, you will find there suggestions for | ||
| 561 | workarounds and solutions. | ||
| 524 | 562 | ||
| 525 | @cindex bug tracker | 563 | @cindex bug tracker |
| 564 | @cindex issue tracker | ||
| 565 | @cindex search known bugs | ||
| 526 | @item | 566 | @item |
| 527 | The GNU Bug Tracker at @url{https://debbugs.gnu.org}. Emacs bugs are | 567 | The GNU Bug Tracker at @url{https://debbugs.gnu.org}. Emacs bugs and |
| 528 | filed in the tracker under the @samp{emacs} package. The tracker | 568 | issues are filed in the tracker under the @samp{emacs} package. The |
| 529 | records information about the status of each bug, the initial bug | 569 | tracker records information about the status of each bug, the initial |
| 530 | report, and the follow-up messages by the bug reporter and Emacs | 570 | bug report, and the follow-up messages by the bug reporter and Emacs |
| 531 | developers. You can search for bugs by subject, severity, and other | 571 | developers who participate in discussing and fixing the bug. You can |
| 532 | criteria. | 572 | search for bugs by subject, severity, and other criteria. For more |
| 573 | complex search criteria, use | ||
| 574 | @url{https://debbugs.gnu.org/cgi/search.cgi}. | ||
| 533 | 575 | ||
| 534 | @cindex debbugs package | 576 | @cindex debbugs package |
| 535 | Instead of browsing the bug tracker as a webpage, you can browse it | 577 | Instead of browsing the bug tracker as a web page, you can browse it |
| 536 | from Emacs using the @code{debbugs} package, which can be downloaded | 578 | from Emacs using the @code{debbugs} package, which can be downloaded |
| 537 | via the Package Menu (@pxref{Packages}). This package provides the | 579 | via the Package Menu (@pxref{Packages}). This package provides the |
| 538 | command @kbd{M-x debbugs-gnu} to list bugs, and @kbd{M-x | 580 | command @kbd{M-x debbugs-gnu} to list bugs, and @kbd{M-x |
| @@ -558,14 +600,14 @@ used, and is mainly of historical interest. At one time, it was used | |||
| 558 | for bug reports in development (i.e., not yet released) versions of | 600 | for bug reports in development (i.e., not yet released) versions of |
| 559 | Emacs. You can read the archives for 2003 to mid 2007 at | 601 | Emacs. You can read the archives for 2003 to mid 2007 at |
| 560 | @url{https://lists.gnu.org/r/emacs-pretest-bug/}. Nowadays, | 602 | @url{https://lists.gnu.org/r/emacs-pretest-bug/}. Nowadays, |
| 561 | it is an alias for @samp{bug-gnu-emacs}. | 603 | email messages sent to this list are redirected to |
| 604 | @samp{bug-gnu-emacs}. | ||
| 562 | 605 | ||
| 563 | @item | 606 | @item |
| 564 | The @samp{emacs-devel} mailing list. Sometimes people report bugs to | 607 | The @samp{emacs-devel} mailing list. Sometimes people report bugs to |
| 565 | this mailing list. This is not the main purpose of the list, however, | 608 | this mailing list. This is not the main purpose of the list, however, |
| 566 | and it is much better to send bug reports to the bug list. You should | 609 | and it is much better to send bug reports to the bug list. You should |
| 567 | not feel obliged to read this list before reporting a bug. | 610 | not feel obliged to read this list before reporting a bug. |
| 568 | |||
| 569 | @end itemize | 611 | @end itemize |
| 570 | 612 | ||
| 571 | 613 | ||
| @@ -628,20 +670,21 @@ to begin by reporting them to the package developers. | |||
| 628 | 670 | ||
| 629 | @node Understanding Bug Reporting | 671 | @node Understanding Bug Reporting |
| 630 | @subsection Understanding Bug Reporting | 672 | @subsection Understanding Bug Reporting |
| 631 | @cindex bug reporting | 673 | @cindex bug reporting, principles |
| 632 | @cindex report an Emacs bug, how to | 674 | @cindex report an Emacs bug, how to |
| 633 | 675 | ||
| 634 | When you decide that there is a bug, it is important to report it | 676 | When you decide that there is a bug, it is important to report it, |
| 635 | and to report it in a way which is useful. What is most useful is an | 677 | and to report it in a way which is useful. What is most useful is an |
| 636 | exact description of what commands you type, starting with the shell | 678 | exact description of what commands you type, starting with the shell |
| 637 | command to run Emacs, until the problem happens. | 679 | command to run Emacs, until the problem happens, and the effects |
| 680 | produced by typing those commands. | ||
| 638 | 681 | ||
| 639 | The most important principle in reporting a bug is to report | 682 | The most important principle in reporting a bug is to report |
| 640 | @emph{facts}. Hypotheses and verbal descriptions are no substitute | 683 | @emph{facts}. Hypotheses and verbal descriptions are no substitute |
| 641 | for the detailed raw data. Reporting the facts is straightforward, | 684 | for the detailed raw data. Reporting the facts is straightforward, |
| 642 | but many people strain to posit explanations and report them instead | 685 | but many people strain to posit explanations and report them instead |
| 643 | of the facts. If the explanations are based on guesses about how | 686 | of the facts. If the explanations are based on guesses about how |
| 644 | Emacs is implemented, they will be useless; meanwhile, lacking the | 687 | Emacs is implemented, they night not be useful; meanwhile, lacking the |
| 645 | facts, we will have no real information about the bug. If you want to | 688 | facts, we will have no real information about the bug. If you want to |
| 646 | actually @emph{debug} the problem, and report explanations that are | 689 | actually @emph{debug} the problem, and report explanations that are |
| 647 | more than guesses, that is useful---but please include the raw facts | 690 | more than guesses, that is useful---but please include the raw facts |
| @@ -661,19 +704,23 @@ problem. There is no way we could guess that we should try visiting a | |||
| 661 | file with a @samp{z} in its name. | 704 | file with a @samp{z} in its name. |
| 662 | 705 | ||
| 663 | You should not even say ``visit a file'' instead of @kbd{C-x C-f}. | 706 | You should not even say ``visit a file'' instead of @kbd{C-x C-f}. |
| 664 | Similarly, rather than saying ``if I have three characters on the | 707 | That's because a file can be visited in more than one way, and there's |
| 665 | line'', say ``after I type @kbd{@key{RET} A B C @key{RET} C-p}'', if | 708 | no certainty that all of them reproduce the problem. Similarly, |
| 666 | that is the way you entered the text. | 709 | rather than saying ``if I have three characters on the line'', say |
| 710 | ``after I type @kbd{@key{RET} A B C @key{RET} C-p}'', if that is the | ||
| 711 | way you entered the text---that is, tell us about the text which in | ||
| 712 | your case produced the problem. | ||
| 667 | 713 | ||
| 668 | If possible, try quickly to reproduce the bug by invoking Emacs with | 714 | If possible, try quickly to reproduce the bug by invoking Emacs with |
| 669 | @command{emacs -Q} (so that Emacs starts with no initial | 715 | @command{emacs -Q} (so that Emacs starts with no initial |
| 670 | customizations; @pxref{Initial Options}), and repeating the steps that | 716 | customizations; @pxref{Initial Options}), and repeating the steps that |
| 671 | you took to trigger the bug. If you can reproduce the bug this way, | 717 | you took to trigger the bug. If you can reproduce the bug this way, |
| 672 | that rules out bugs in your personal customizations. Then your bug | 718 | that rules out bugs in your personal customizations and makes the bug |
| 673 | report should begin by stating that you started Emacs with | 719 | much easier to reproduce. Then your bug report should begin by |
| 674 | @command{emacs -Q}, followed by the exact sequence of steps for | 720 | stating that you started Emacs with @command{emacs -Q}, followed by |
| 675 | reproducing the bug. If possible, inform us of the exact contents of | 721 | the exact sequence of steps for reproducing the bug. If possible, |
| 676 | any file that is needed to reproduce the bug. | 722 | inform us of the exact contents of any file that is needed to |
| 723 | reproduce the bug. | ||
| 677 | 724 | ||
| 678 | Some bugs are not reproducible from @command{emacs -Q}; some are not | 725 | Some bugs are not reproducible from @command{emacs -Q}; some are not |
| 679 | easily reproducible at all. In that case, you should report what you | 726 | easily reproducible at all. In that case, you should report what you |
| @@ -687,6 +734,7 @@ separate bug report for each. | |||
| 687 | @subsection Checklist for Bug Reports | 734 | @subsection Checklist for Bug Reports |
| 688 | @cindex checklist before reporting a bug | 735 | @cindex checklist before reporting a bug |
| 689 | @cindex bug reporting, checklist | 736 | @cindex bug reporting, checklist |
| 737 | @cindex report bugs in Emacs | ||
| 690 | 738 | ||
| 691 | Before reporting a bug, first try to see if the problem has already | 739 | Before reporting a bug, first try to see if the problem has already |
| 692 | been reported (@pxref{Known Problems}). | 740 | been reported (@pxref{Known Problems}). |
| @@ -706,7 +754,7 @@ information; you should still read and follow the guidelines below, so | |||
| 706 | you can enter the other crucial information by hand before you send | 754 | you can enter the other crucial information by hand before you send |
| 707 | the message. You may feel that some of the information inserted by | 755 | the message. You may feel that some of the information inserted by |
| 708 | @kbd{M-x report-emacs-bug} is not relevant, but unless you are | 756 | @kbd{M-x report-emacs-bug} is not relevant, but unless you are |
| 709 | absolutely sure it is best to leave it, so that the developers can | 757 | absolutely sure, it is best to leave it, so that the developers can |
| 710 | decide for themselves. | 758 | decide for themselves. |
| 711 | 759 | ||
| 712 | When you have finished writing your report, type @kbd{C-c C-c} and it | 760 | When you have finished writing your report, type @kbd{C-c C-c} and it |
| @@ -721,24 +769,26 @@ If you cannot send mail from inside Emacs, you can copy the | |||
| 721 | text of your report to your normal mail client (if your system | 769 | text of your report to your normal mail client (if your system |
| 722 | supports it, you can type @kbd{C-c M-i} to have Emacs do this for you) | 770 | supports it, you can type @kbd{C-c M-i} to have Emacs do this for you) |
| 723 | and send it to that address. Or you can simply send an email to that | 771 | and send it to that address. Or you can simply send an email to that |
| 724 | address describing the problem. | 772 | address describing the problem, including the necessary information |
| 773 | mentioned below. | ||
| 725 | 774 | ||
| 726 | If you want to submit code to Emacs (to fix a problem or implement a | 775 | If you want to submit code to Emacs (to fix a problem or implement a |
| 727 | new feature), the easiest way to do this is to send a patch to the | 776 | new feature), the easiest way to do this is to send a patch to the |
| 728 | Emacs issue tracker. This is done with the @kbd{M-x | 777 | Emacs issue tracker. Use the @kbd{M-x submit-emacs-patch} command for |
| 729 | submit-emacs-patch} command, and works much the same as when reporting | 778 | that, which works much the same as when reporting bugs; @pxref{Sending |
| 730 | bugs. | 779 | Patches}. |
| 731 | 780 | ||
| 732 | In any case, your report will be sent to the @samp{bug-gnu-emacs} | 781 | In any case, your report will be sent to the @samp{bug-gnu-emacs} |
| 733 | mailing list, and stored in the GNU Bug Tracker at | 782 | mailing list, and stored in the GNU Bug Tracker at |
| 734 | @url{https://debbugs.gnu.org}. Please include a valid reply email | 783 | @url{https://debbugs.gnu.org}. Please include a valid reply email |
| 735 | address, in case we need to ask you for more information about your | 784 | address, in case we need to ask you for more information about your |
| 736 | report. Submissions are moderated, so there may be a delay before | 785 | report. Submissions are moderated, so there may be a delay before |
| 737 | your report appears. | 786 | your report actually appears on the tracker. |
| 738 | 787 | ||
| 739 | You do not need to know how the GNU Bug Tracker works in order to | 788 | You do not need to know how the GNU Bug Tracker works in order to |
| 740 | report a bug, but if you want to, you can read the tracker's online | 789 | report a bug, but if you want to, you can read the tracker's |
| 741 | documentation to see the various features you can use. | 790 | @uref{https://debbugs.gnu.org/Advanced.html, online documentation} to |
| 791 | see the various features you can use. | ||
| 742 | 792 | ||
| 743 | All mail sent to the @samp{bug-gnu-emacs} mailing list is also | 793 | All mail sent to the @samp{bug-gnu-emacs} mailing list is also |
| 744 | gatewayed to the @samp{gnu.emacs.bug} newsgroup. The reverse is also | 794 | gatewayed to the @samp{gnu.emacs.bug} newsgroup. The reverse is also |
| @@ -749,55 +799,43 @@ tracker. | |||
| 749 | 799 | ||
| 750 | If your data is more than 500,000 bytes, please don't include it | 800 | If your data is more than 500,000 bytes, please don't include it |
| 751 | directly in the bug report; instead, offer to send it on request, or | 801 | directly in the bug report; instead, offer to send it on request, or |
| 752 | make it available online and say where. | 802 | make it available online and say where. Large attachments are best |
| 803 | sent compressed. | ||
| 753 | 804 | ||
| 754 | The GNU Bug Tracker will assign a bug number to your report; please | 805 | The GNU Bug Tracker will assign a bug number to your report; please |
| 755 | use it in the following discussions. | 806 | use it in the following discussions, keeping the bug address in the |
| 807 | list of recipients, so that the bug discussion is recorded by the | ||
| 808 | tracker. The bug address will look like | ||
| 809 | @samp{@var{nnnnn}@@debbugs.gnu.org}, where @var{nnnnn} is the bug | ||
| 810 | number. | ||
| 756 | 811 | ||
| 757 | To enable maintainers to investigate a bug, your report | 812 | To enable maintainers to investigate a bug, your report |
| 758 | should include all these things: | 813 | should include all these things: |
| 759 | 814 | ||
| 760 | @itemize @bullet | 815 | @itemize @bullet |
| 761 | @item | 816 | @item |
| 762 | The version number of Emacs. Without this, we won't know whether there is any | 817 | A description of what behavior you observe that you believe is |
| 763 | point in looking for the bug in the current version of GNU Emacs. | 818 | incorrect. For example, ``The Emacs process gets a fatal signal'', or, |
| 764 | 819 | ``The resulting text is as follows, which I think is wrong.'' | |
| 765 | @findex emacs-version | ||
| 766 | @kbd{M-x report-emacs-bug} includes this information automatically, | ||
| 767 | but if you are not using that command for your report you can get the | ||
| 768 | version number by typing @kbd{M-x emacs-version @key{RET}}. If that | ||
| 769 | command does not work, you probably have something other than GNU | ||
| 770 | Emacs, so you will have to report the bug somewhere else. | ||
| 771 | |||
| 772 | @item | ||
| 773 | The type of machine you are using, and the operating system name and | ||
| 774 | version number (again, automatically included by @w{@kbd{M-x | ||
| 775 | report-emacs-bug}}). @w{@kbd{M-x emacs-version @key{RET}}} provides | ||
| 776 | this information too. Copy its output from the @file{*Messages*} | ||
| 777 | buffer, so that you get it all and get it accurately, or use | ||
| 778 | @w{@kbd{C-u M-x emacs-version @key{RET}}} to insert the version | ||
| 779 | information into the current buffer. | ||
| 780 | |||
| 781 | @item | ||
| 782 | The operands given to the @code{configure} command when Emacs was | ||
| 783 | installed (automatically included by @kbd{M-x report-emacs-bug}). | ||
| 784 | |||
| 785 | @item | ||
| 786 | A complete list of any modifications you have made to the Emacs source. | ||
| 787 | (We may not have time to investigate the bug unless it happens in an | ||
| 788 | unmodified Emacs. But if you've made modifications and you don't tell | ||
| 789 | us, you are sending us on a wild goose chase.) | ||
| 790 | 820 | ||
| 791 | Be precise about these changes. A description in English is not | 821 | Of course, if the bug is that Emacs gets a fatal signal, then one can't |
| 792 | enough---send a unified context diff for them. | 822 | miss it. But if the bug is incorrect text, the maintainer might fail to |
| 823 | notice what is wrong. Why leave it to chance? | ||
| 793 | 824 | ||
| 794 | Adding files of your own, or porting to another machine, is a | 825 | Even if the problem you experience is a fatal signal, you should still |
| 795 | modification of the source. | 826 | say so explicitly. Suppose something strange is going on, such as, your |
| 827 | copy of the source is out of sync, or you have encountered a bug in the | ||
| 828 | C library on your system. (This has happened!) Your copy might crash | ||
| 829 | and the copy here might not. If you @emph{said} to expect a crash, then | ||
| 830 | when Emacs here fails to crash, we would know that the bug was not | ||
| 831 | happening. If you don't say to expect a crash, then we would not know | ||
| 832 | whether the bug was happening---we would not be able to draw any | ||
| 833 | conclusion from our observations. | ||
| 796 | 834 | ||
| 797 | @item | 835 | Usually, description of the behavior and of the way to reproduce the |
| 798 | Details of any other deviations from the standard procedure for installing | 836 | problem needs to specify one or more of the following aspects: |
| 799 | GNU Emacs. | ||
| 800 | 837 | ||
| 838 | @itemize @minus | ||
| 801 | @item | 839 | @item |
| 802 | The complete text of any files needed to reproduce the bug. | 840 | The complete text of any files needed to reproduce the bug. |
| 803 | 841 | ||
| @@ -825,6 +863,47 @@ information (such as passwords) may end up recorded in the dribble | |||
| 825 | file. | 863 | file. |
| 826 | 864 | ||
| 827 | @item | 865 | @item |
| 866 | If the bug is that the Emacs Manual or the Emacs Lisp Reference Manual | ||
| 867 | fails to describe the actual behavior of Emacs, or that the text is | ||
| 868 | confusing, copy in the text from the manual which you think is | ||
| 869 | at fault. If the section is small, just the section name is enough. | ||
| 870 | |||
| 871 | @item | ||
| 872 | If the manifestation of the bug is an Emacs error message, it is | ||
| 873 | important to report the precise text of the error message, and a | ||
| 874 | backtrace showing how the Lisp program in Emacs arrived at the error. | ||
| 875 | |||
| 876 | To get the error message text accurately, copy it from the | ||
| 877 | @file{*Messages*} buffer into the bug report. Copy all of it, not just | ||
| 878 | part. | ||
| 879 | |||
| 880 | @item | ||
| 881 | Check whether any programs you have loaded into the Lisp world, | ||
| 882 | including your initialization file, set any variables that may affect | ||
| 883 | the functioning of Emacs. Also, see whether the problem happens in a | ||
| 884 | freshly started Emacs without loading your initialization file (start | ||
| 885 | Emacs with the @code{-Q} switch to prevent loading the init files). | ||
| 886 | If the problem does @emph{not} occur then, you must report the precise | ||
| 887 | contents of any programs that you must load into the Lisp world in | ||
| 888 | order to cause the problem to occur. | ||
| 889 | |||
| 890 | @item | ||
| 891 | If the problem does depend on an init file or other Lisp programs that | ||
| 892 | are not part of the standard Emacs system, then you should make sure it | ||
| 893 | is not a bug in those programs by complaining to their maintainers | ||
| 894 | first. After they verify that they are using Emacs in a way that is | ||
| 895 | supposed to work, they should report the bug. | ||
| 896 | |||
| 897 | @item | ||
| 898 | If you wish to mention something in the GNU Emacs source, show the line | ||
| 899 | of code with a few lines of context. Don't just give a line number. | ||
| 900 | |||
| 901 | The line numbers in the development sources don't match those in your | ||
| 902 | sources. It would take extra work for the maintainers to determine what | ||
| 903 | code is in your version at a given line number, and we could not be | ||
| 904 | certain. | ||
| 905 | |||
| 906 | @item | ||
| 828 | @findex open-termscript | 907 | @findex open-termscript |
| 829 | @cindex termscript file | 908 | @cindex termscript file |
| 830 | @vindex TERM@r{, environment variable, and display bugs} | 909 | @vindex TERM@r{, environment variable, and display bugs} |
| @@ -834,27 +913,70 @@ entry for the terminal from @file{/etc/termcap} (since that file is | |||
| 834 | not identical on all machines), and the output that Emacs actually | 913 | not identical on all machines), and the output that Emacs actually |
| 835 | sent to the terminal. | 914 | sent to the terminal. |
| 836 | 915 | ||
| 837 | The way to collect the terminal output is to execute the Lisp expression | 916 | The way to collect the terminal output is to invoke the command |
| 917 | @kbd{M-x open-termscript} just after starting Emacs; it will prompt | ||
| 918 | you for the name of the file where to record all terminal output until | ||
| 919 | the Emacs process is killed. If the problem happens when Emacs starts | ||
| 920 | up, put the Lisp expression | ||
| 838 | 921 | ||
| 839 | @example | 922 | @example |
| 840 | (open-termscript "~/termscript") | 923 | (open-termscript "~/termscript") |
| 841 | @end example | 924 | @end example |
| 842 | 925 | ||
| 843 | @noindent | 926 | @noindent |
| 844 | using @kbd{M-:} or from the @file{*scratch*} buffer just after | 927 | into your Emacs initialization file so that the termscript file will |
| 845 | starting Emacs. From then on, Emacs copies all terminal output to the | 928 | be open when Emacs displays the screen for the first time. |
| 846 | specified termscript file as well, until the Emacs process is killed. | ||
| 847 | If the problem happens when Emacs starts up, put this expression into | ||
| 848 | your Emacs initialization file so that the termscript file will be | ||
| 849 | open when Emacs displays the screen for the first time. | ||
| 850 | 929 | ||
| 851 | Be warned: it is often difficult, and sometimes impossible, to fix a | 930 | Be warned: it is often difficult, and sometimes impossible, to fix a |
| 852 | terminal-dependent bug without access to a terminal of the type that | 931 | terminal-dependent bug without access to a terminal of the type that |
| 853 | stimulates the bug. | 932 | stimulates the bug. |
| 933 | @end itemize | ||
| 934 | |||
| 935 | @item | ||
| 936 | The version number of Emacs. Without this, we won't know whether there is any | ||
| 937 | point in looking for the bug in the current version of GNU Emacs. | ||
| 938 | |||
| 939 | @findex emacs-version | ||
| 940 | @kbd{M-x report-emacs-bug} includes this information automatically, | ||
| 941 | but if you are not using that command for your report you can get the | ||
| 942 | version number by typing @kbd{M-x emacs-version @key{RET}}. If that | ||
| 943 | command does not work, you probably have something other than GNU | ||
| 944 | Emacs, so you will have to report the bug somewhere else. | ||
| 945 | |||
| 946 | @item | ||
| 947 | The type of machine you are using, and the operating system name and | ||
| 948 | version number (again, automatically included by @w{@kbd{M-x | ||
| 949 | report-emacs-bug}}). @w{@kbd{M-x emacs-version @key{RET}}} provides | ||
| 950 | this information too. Copy its output from the @file{*Messages*} | ||
| 951 | buffer, so that you get it all and get it accurately, or use | ||
| 952 | @w{@kbd{C-u M-x emacs-version @key{RET}}} to insert the version | ||
| 953 | information into the current buffer. | ||
| 954 | |||
| 955 | @item | ||
| 956 | The command-line arguments given to the @code{configure} command when | ||
| 957 | Emacs was built (automatically included by @kbd{M-x | ||
| 958 | report-emacs-bug}). | ||
| 959 | |||
| 960 | @item | ||
| 961 | A complete list of any modifications you have made to the Emacs source. | ||
| 962 | (We may not have time to investigate the bug unless it happens in an | ||
| 963 | unmodified Emacs. But if you've made modifications and you don't tell | ||
| 964 | us, you are sending us on a wild goose chase.) | ||
| 965 | |||
| 966 | Be precise about these changes. A description in English is not | ||
| 967 | enough---send a unified context diff for them. | ||
| 968 | |||
| 969 | Adding files of your own, or porting to another machine, is a | ||
| 970 | modification of the source. | ||
| 971 | |||
| 972 | @item | ||
| 973 | Details of any other deviations from the standard procedure for installing | ||
| 974 | GNU Emacs. | ||
| 854 | 975 | ||
| 855 | @item | 976 | @item |
| 856 | If non-@acronym{ASCII} text or internationalization is relevant, the locale that | 977 | If non-@acronym{ASCII} text or internationalization is relevant, the locale that |
| 857 | was current when you started Emacs. On GNU/Linux and Unix systems, or | 978 | was current when you started Emacs. This is automatically included by @kbd{M-x |
| 979 | report-emacs-bug}; alternatively, on GNU/Linux and Unix systems, or | ||
| 858 | if you use a POSIX-style shell such as Bash, you can use this shell | 980 | if you use a POSIX-style shell such as Bash, you can use this shell |
| 859 | command to view the relevant values: | 981 | command to view the relevant values: |
| 860 | 982 | ||
| @@ -863,64 +985,102 @@ echo LC_ALL=$LC_ALL LC_COLLATE=$LC_COLLATE LC_CTYPE=$LC_CTYPE \ | |||
| 863 | LC_MESSAGES=$LC_MESSAGES LC_TIME=$LC_TIME LANG=$LANG | 985 | LC_MESSAGES=$LC_MESSAGES LC_TIME=$LC_TIME LANG=$LANG |
| 864 | @end smallexample | 986 | @end smallexample |
| 865 | 987 | ||
| 866 | Alternatively, use the @command{locale} command, if your system has it, | 988 | You can also use the @command{locale} command, if your system has it, |
| 867 | to display your locale settings. | 989 | to display your locale settings. |
| 990 | @end itemize | ||
| 868 | 991 | ||
| 869 | You can use the @kbd{M-!} command to execute these commands from | 992 | Here are some things that are not necessary in a bug report: |
| 870 | Emacs, and then copy the output from the @file{*Messages*} buffer into | ||
| 871 | the bug report. Alternatively, @kbd{M-x getenv @key{RET} LC_ALL | ||
| 872 | @key{RET}} will display the value of @code{LC_ALL} in the echo area, and | ||
| 873 | you can copy its output from the @file{*Messages*} buffer. | ||
| 874 | 993 | ||
| 994 | @itemize @bullet | ||
| 875 | @item | 995 | @item |
| 876 | A description of what behavior you observe that you believe is | 996 | A description of the envelope of the bug---this is not necessary for a |
| 877 | incorrect. For example, ``The Emacs process gets a fatal signal'', or, | 997 | reproducible bug. |
| 878 | ``The resulting text is as follows, which I think is wrong.'' | ||
| 879 | 998 | ||
| 880 | Of course, if the bug is that Emacs gets a fatal signal, then one can't | 999 | Often people who encounter a bug spend a lot of time investigating |
| 881 | miss it. But if the bug is incorrect text, the maintainer might fail to | 1000 | which changes to the input file will make the bug go away and which |
| 882 | notice what is wrong. Why leave it to chance? | 1001 | changes will not affect it. |
| 883 | 1002 | ||
| 884 | Even if the problem you experience is a fatal signal, you should still | 1003 | This is often time-consuming and not very useful, because the way we |
| 885 | say so explicitly. Suppose something strange is going on, such as, your | 1004 | will find the bug is by running a single example under the debugger |
| 886 | copy of the source is out of sync, or you have encountered a bug in the | 1005 | with breakpoints, not by pure deduction from a series of examples. |
| 887 | C library on your system. (This has happened!) Your copy might crash | 1006 | You might as well save time by not searching for additional examples. |
| 888 | and the copy here might not. If you @emph{said} to expect a crash, then | 1007 | It is better to send the bug report right away, go back to editing, |
| 889 | when Emacs here fails to crash, we would know that the bug was not | 1008 | and find another bug to report. |
| 890 | happening. If you don't say to expect a crash, then we would not know | 1009 | |
| 891 | whether the bug was happening---we would not be able to draw any | 1010 | Of course, if you can find a simpler example to report @emph{instead} of |
| 892 | conclusion from our observations. | 1011 | the original one, that is a convenience. Errors in the output will be |
| 1012 | easier to spot, running under the debugger will take less time, etc. | ||
| 1013 | |||
| 1014 | However, simplification is not vital; if you can't do this or don't have | ||
| 1015 | time to try, please report the bug with your original test case. | ||
| 893 | 1016 | ||
| 894 | @item | 1017 | @item |
| 895 | If the bug is that the Emacs Manual or the Emacs Lisp Reference Manual | 1018 | A core dump file. |
| 896 | fails to describe the actual behavior of Emacs, or that the text is | 1019 | |
| 897 | confusing, copy in the text from the manual which you think is | 1020 | Debugging the core dump might be useful, but it can only be done on |
| 898 | at fault. If the section is small, just the section name is enough. | 1021 | your machine, with your Emacs executable. Therefore, sending the core |
| 1022 | dump file to the Emacs maintainers won't be useful. Above all, don't | ||
| 1023 | include the core file in an email bug report! Such a large message | ||
| 1024 | can be extremely inconvenient. | ||
| 899 | 1025 | ||
| 900 | @item | 1026 | @item |
| 901 | If the manifestation of the bug is an Emacs error message, it is | 1027 | A system-call trace of Emacs execution. |
| 902 | important to report the precise text of the error message, and a | ||
| 903 | backtrace showing how the Lisp program in Emacs arrived at the error. | ||
| 904 | 1028 | ||
| 905 | To get the error message text accurately, copy it from the | 1029 | System-call traces are very useful for certain special kinds of |
| 906 | @file{*Messages*} buffer into the bug report. Copy all of it, not just | 1030 | debugging, but in most cases they give little useful information. It is |
| 907 | part. | 1031 | therefore strange that many people seem to think that @emph{the} way to |
| 1032 | report information about a crash is to send a system-call trace. Perhaps | ||
| 1033 | this is a habit formed from experience debugging programs that don't | ||
| 1034 | have source code or debugging symbols. | ||
| 1035 | |||
| 1036 | In most programs, a backtrace is normally far, far more informative than | ||
| 1037 | a system-call trace. Even in Emacs, a simple backtrace is generally | ||
| 1038 | more informative, though to give full information you should supplement | ||
| 1039 | the backtrace by displaying variable values and printing them as Lisp | ||
| 1040 | objects with @code{pr} (see above). | ||
| 1041 | |||
| 1042 | @item | ||
| 1043 | A patch for the bug. | ||
| 1044 | |||
| 1045 | A patch for the bug is useful if it is a good one. But don't omit the | ||
| 1046 | other information that a bug report needs, such as the test case, on | ||
| 1047 | the assumption that a patch is sufficient. We might see problems with | ||
| 1048 | your patch and decide to fix the problem another way, or we might not | ||
| 1049 | understand it at all. And if we can't understand what bug you are | ||
| 1050 | trying to fix, or why your patch should be an improvement, we mustn't | ||
| 1051 | install it. @xref{Sending Patches}, for guidelines on how to make it | ||
| 1052 | easy for us to understand and install your patches. | ||
| 1053 | |||
| 1054 | @item | ||
| 1055 | A guess about what the bug is or what it depends on. | ||
| 1056 | |||
| 1057 | Such guesses are usually wrong. Even experts can't guess right about | ||
| 1058 | such things without first using the debugger to find the facts. | ||
| 1059 | @end itemize | ||
| 1060 | |||
| 1061 | If you are willing to debug Emacs and provide additional information | ||
| 1062 | about the bug, here is some useful advice: | ||
| 908 | 1063 | ||
| 909 | @findex toggle-debug-on-error | 1064 | @findex toggle-debug-on-error |
| 910 | @pindex Edebug | 1065 | @pindex Edebug |
| 911 | To make a backtrace for the error, use @kbd{M-x toggle-debug-on-error} | 1066 | @itemize |
| 912 | before the error happens (that is to say, you must give that command | 1067 | @item |
| 913 | and then make the bug happen). This causes the error to start the Lisp | 1068 | If the bug manifests itself as an error message, try providing a Lisp |
| 914 | debugger, which shows you a backtrace. Copy the text of the | 1069 | backtrace for the error. To make a backtrace for the error, use |
| 915 | debugger's backtrace into the bug report. @xref{Edebug,, Edebug, | 1070 | @kbd{M-x toggle-debug-on-error} before the error happens (that is to |
| 916 | elisp, the Emacs Lisp Reference Manual}, for information on debugging | 1071 | say, you must give that command and then make the bug happen). This |
| 917 | Emacs Lisp programs with the Edebug package. | 1072 | causes the error to start the Lisp debugger, which shows you a |
| 1073 | backtrace. Copy the text of the debugger's backtrace into the bug | ||
| 1074 | report. @xref{Edebug,, Edebug, elisp, the Emacs Lisp Reference | ||
| 1075 | Manual}, for information on debugging Emacs Lisp programs with the | ||
| 1076 | Edebug package. | ||
| 918 | 1077 | ||
| 919 | This use of the debugger is possible only if you know how to make the | 1078 | This use of the debugger is possible only if you know how to make the |
| 920 | bug happen again. If you can't make it happen again, at least copy | 1079 | bug happen again. If you can't make it happen again, at least copy |
| 921 | the whole error message. | 1080 | the whole error message. |
| 922 | 1081 | ||
| 923 | @vindex debug-on-quit | 1082 | @vindex debug-on-quit |
| 1083 | @item | ||
| 924 | If Emacs appears to be stuck in an infinite loop or in a very long | 1084 | If Emacs appears to be stuck in an infinite loop or in a very long |
| 925 | operation, typing @kbd{C-g} with the variable @code{debug-on-quit} | 1085 | operation, typing @kbd{C-g} with the variable @code{debug-on-quit} |
| 926 | non-@code{nil} will start the Lisp debugger and show a backtrace. | 1086 | non-@code{nil} will start the Lisp debugger and show a backtrace. |
| @@ -934,32 +1094,6 @@ specified by @code{debug-on-event} (default SIGUSR2) from outside | |||
| 934 | Emacs to cause it to enter the debugger. | 1094 | Emacs to cause it to enter the debugger. |
| 935 | 1095 | ||
| 936 | @item | 1096 | @item |
| 937 | Check whether any programs you have loaded into the Lisp world, | ||
| 938 | including your initialization file, set any variables that may affect | ||
| 939 | the functioning of Emacs. Also, see whether the problem happens in a | ||
| 940 | freshly started Emacs without loading your initialization file (start | ||
| 941 | Emacs with the @code{-Q} switch to prevent loading the init files). | ||
| 942 | If the problem does @emph{not} occur then, you must report the precise | ||
| 943 | contents of any programs that you must load into the Lisp world in | ||
| 944 | order to cause the problem to occur. | ||
| 945 | |||
| 946 | @item | ||
| 947 | If the problem does depend on an init file or other Lisp programs that | ||
| 948 | are not part of the standard Emacs system, then you should make sure it | ||
| 949 | is not a bug in those programs by complaining to their maintainers | ||
| 950 | first. After they verify that they are using Emacs in a way that is | ||
| 951 | supposed to work, they should report the bug. | ||
| 952 | |||
| 953 | @item | ||
| 954 | If you wish to mention something in the GNU Emacs source, show the line | ||
| 955 | of code with a few lines of context. Don't just give a line number. | ||
| 956 | |||
| 957 | The line numbers in the development sources don't match those in your | ||
| 958 | sources. It would take extra work for the maintainers to determine what | ||
| 959 | code is in your version at a given line number, and we could not be | ||
| 960 | certain. | ||
| 961 | |||
| 962 | @item | ||
| 963 | Additional information from a C debugger such as GDB might enable | 1097 | Additional information from a C debugger such as GDB might enable |
| 964 | someone to find a problem on a machine which he does not have available. | 1098 | someone to find a problem on a machine which he does not have available. |
| 965 | If you don't know how to use GDB, please read the GDB manual---it is not | 1099 | If you don't know how to use GDB, please read the GDB manual---it is not |
| @@ -967,9 +1101,10 @@ very long, and using GDB is easy. You can find the GDB distribution, | |||
| 967 | including the GDB manual in online form, in most of the same places you | 1101 | including the GDB manual in online form, in most of the same places you |
| 968 | can find the Emacs distribution. To run Emacs under GDB, you should | 1102 | can find the Emacs distribution. To run Emacs under GDB, you should |
| 969 | switch to the @file{src} subdirectory in which Emacs was compiled, then | 1103 | switch to the @file{src} subdirectory in which Emacs was compiled, then |
| 970 | do @samp{gdb emacs}. It is important for the directory @file{src} to be | 1104 | type @kbd{gdb ./emacs}. It is important for the directory @file{src} to be |
| 971 | current so that GDB will read the @file{.gdbinit} file in this | 1105 | current so that GDB will read the @file{.gdbinit} file in this |
| 972 | directory. | 1106 | directory. (You can also tell GDB to read that file from inside GDB, |
| 1107 | by typing @kbd{source ./.gdbinit}.) | ||
| 973 | 1108 | ||
| 974 | However, you need to think when you collect the additional information | 1109 | However, you need to think when you collect the additional information |
| 975 | if you want it to show what causes the bug. | 1110 | if you want it to show what causes the bug. |
| @@ -1000,8 +1135,8 @@ are debugging a running process (not with a core dump). | |||
| 1000 | To make Lisp errors stop Emacs and return to GDB, put a breakpoint at | 1135 | To make Lisp errors stop Emacs and return to GDB, put a breakpoint at |
| 1001 | @code{Fsignal}. | 1136 | @code{Fsignal}. |
| 1002 | 1137 | ||
| 1003 | For a short listing of Lisp functions running, type the GDB | 1138 | For a backtrace of Lisp functions running, type the GDB command |
| 1004 | command @code{xbacktrace}. | 1139 | @code{xbacktrace}. |
| 1005 | 1140 | ||
| 1006 | The file @file{.gdbinit} defines several other commands that are useful | 1141 | The file @file{.gdbinit} defines several other commands that are useful |
| 1007 | for examining the data types and contents of Lisp objects. Their names | 1142 | for examining the data types and contents of Lisp objects. Their names |
| @@ -1021,79 +1156,6 @@ To find the file @file{etc/DEBUG} in your Emacs installation, use the | |||
| 1021 | directory name stored in the variable @code{data-directory}. | 1156 | directory name stored in the variable @code{data-directory}. |
| 1022 | @end itemize | 1157 | @end itemize |
| 1023 | 1158 | ||
| 1024 | Here are some things that are not necessary in a bug report: | ||
| 1025 | |||
| 1026 | @itemize @bullet | ||
| 1027 | @item | ||
| 1028 | A description of the envelope of the bug---this is not necessary for a | ||
| 1029 | reproducible bug. | ||
| 1030 | |||
| 1031 | Often people who encounter a bug spend a lot of time investigating | ||
| 1032 | which changes to the input file will make the bug go away and which | ||
| 1033 | changes will not affect it. | ||
| 1034 | |||
| 1035 | This is often time-consuming and not very useful, because the way we | ||
| 1036 | will find the bug is by running a single example under the debugger | ||
| 1037 | with breakpoints, not by pure deduction from a series of examples. | ||
| 1038 | You might as well save time by not searching for additional examples. | ||
| 1039 | It is better to send the bug report right away, go back to editing, | ||
| 1040 | and find another bug to report. | ||
| 1041 | |||
| 1042 | Of course, if you can find a simpler example to report @emph{instead} of | ||
| 1043 | the original one, that is a convenience. Errors in the output will be | ||
| 1044 | easier to spot, running under the debugger will take less time, etc. | ||
| 1045 | |||
| 1046 | However, simplification is not vital; if you can't do this or don't have | ||
| 1047 | time to try, please report the bug with your original test case. | ||
| 1048 | |||
| 1049 | @item | ||
| 1050 | A core dump file. | ||
| 1051 | |||
| 1052 | Debugging the core dump might be useful, but it can only be done on | ||
| 1053 | your machine, with your Emacs executable. Therefore, sending the core | ||
| 1054 | dump file to the Emacs maintainers won't be useful. Above all, don't | ||
| 1055 | include the core file in an email bug report! Such a large message | ||
| 1056 | can be extremely inconvenient. | ||
| 1057 | |||
| 1058 | @item | ||
| 1059 | A system-call trace of Emacs execution. | ||
| 1060 | |||
| 1061 | System-call traces are very useful for certain special kinds of | ||
| 1062 | debugging, but in most cases they give little useful information. It is | ||
| 1063 | therefore strange that many people seem to think that @emph{the} way to | ||
| 1064 | report information about a crash is to send a system-call trace. Perhaps | ||
| 1065 | this is a habit formed from experience debugging programs that don't | ||
| 1066 | have source code or debugging symbols. | ||
| 1067 | |||
| 1068 | In most programs, a backtrace is normally far, far more informative than | ||
| 1069 | a system-call trace. Even in Emacs, a simple backtrace is generally | ||
| 1070 | more informative, though to give full information you should supplement | ||
| 1071 | the backtrace by displaying variable values and printing them as Lisp | ||
| 1072 | objects with @code{pr} (see above). | ||
| 1073 | |||
| 1074 | @item | ||
| 1075 | A patch for the bug. | ||
| 1076 | |||
| 1077 | A patch for the bug is useful if it is a good one. But don't omit the | ||
| 1078 | other information that a bug report needs, such as the test case, on the | ||
| 1079 | assumption that a patch is sufficient. We might see problems with your | ||
| 1080 | patch and decide to fix the problem another way, or we might not | ||
| 1081 | understand it at all. And if we can't understand what bug you are | ||
| 1082 | trying to fix, or why your patch should be an improvement, we mustn't | ||
| 1083 | install it. | ||
| 1084 | |||
| 1085 | @ifnottex | ||
| 1086 | @xref{Sending Patches}, for guidelines on how to make it easy for us to | ||
| 1087 | understand and install your patches. | ||
| 1088 | @end ifnottex | ||
| 1089 | |||
| 1090 | @item | ||
| 1091 | A guess about what the bug is or what it depends on. | ||
| 1092 | |||
| 1093 | Such guesses are usually wrong. Even experts can't guess right about | ||
| 1094 | such things without first using the debugger to find the facts. | ||
| 1095 | @end itemize | ||
| 1096 | |||
| 1097 | @node Sending Patches | 1159 | @node Sending Patches |
| 1098 | @subsection Sending Patches for GNU Emacs | 1160 | @subsection Sending Patches for GNU Emacs |
| 1099 | 1161 | ||
| @@ -1108,26 +1170,29 @@ work in the best of circumstances, and we can't keep up unless you do | |||
| 1108 | your best to help. | 1170 | your best to help. |
| 1109 | 1171 | ||
| 1110 | Every patch must have several pieces of information before we | 1172 | Every patch must have several pieces of information before we |
| 1111 | can properly evaluate it. | 1173 | can properly evaluate it. They are described below. |
| 1112 | 1174 | ||
| 1113 | When you have all these pieces, bundle them up in a mail message and | 1175 | When you have all these pieces, use the @kbd{M-x submit-emacs-patch} |
| 1114 | send it to the developers. Sending it to | 1176 | command to send the patch. The command will prompt you for the |
| 1115 | @email{bug-gnu-emacs@@gnu.org} (which is the bug/feature list) is | 1177 | Subject of the patch and a patch file. It will then create and |
| 1116 | recommended, because that list is coupled to a tracking system that | 1178 | display a Message mode buffer with the patch file as an attachment, |
| 1117 | makes it easier to locate patches. If your patch is not complete and | 1179 | display the buffer, and let you explain more about the patch and add |
| 1118 | you think it needs more discussion, you might want to send it to | 1180 | any other information as requested below. When you are done, type |
| 1119 | @email{emacs-devel@@gnu.org} instead. If you revise your patch, | 1181 | @kbd{C-c C-c} to send the patch via email to the developers. It will |
| 1120 | send it as a followup to the initial topic. | 1182 | be sent to the GNU Bug Tracker at @url{https://debbugs.gnu.org}. The |
| 1121 | 1183 | tracker will assign a number to your submission, just like it does | |
| 1122 | We prefer to get the patches as plain text, either inline (be careful | 1184 | with bug reports. The developers will usually respond, perhaps asking |
| 1123 | your mail client does not change line breaks) or as MIME attachments. | 1185 | you for more details or any additional information, so be sure to |
| 1186 | include a valid reply email address. | ||
| 1187 | |||
| 1188 | Here's what we ask you to provide as part of your patch submissions: | ||
| 1124 | 1189 | ||
| 1125 | @itemize @bullet | 1190 | @itemize @bullet |
| 1126 | @item | 1191 | @item |
| 1127 | Include an explanation with your changes of what problem they fix or what | 1192 | An explanation of what problem you are fixing or what improvement will |
| 1128 | improvement they bring about. | 1193 | the patches bring about: |
| 1129 | 1194 | ||
| 1130 | @itemize | 1195 | @itemize @minus |
| 1131 | @item | 1196 | @item |
| 1132 | For a fix for an existing bug, it is | 1197 | For a fix for an existing bug, it is |
| 1133 | best to reply to the relevant discussion on the @samp{bug-gnu-emacs} | 1198 | best to reply to the relevant discussion on the @samp{bug-gnu-emacs} |
| @@ -1140,26 +1205,28 @@ implementation. | |||
| 1140 | 1205 | ||
| 1141 | @item | 1206 | @item |
| 1142 | For a new bug, include a proper bug report for the problem you think | 1207 | For a new bug, include a proper bug report for the problem you think |
| 1143 | you have fixed. We need to convince ourselves that the change is | 1208 | you have fixed; @pxref{Checklist, Checklist for Bug Reports}. We need |
| 1144 | right before installing it. Even if it is correct, we might have | 1209 | to convince ourselves that the change is right before installing it. |
| 1145 | trouble understanding it if we don't have a way to reproduce the | 1210 | Even if it is correct, we might have trouble understanding it if we |
| 1146 | problem. | 1211 | don't have a way to reproduce the problem it tries to fix. |
| 1147 | @end itemize | 1212 | @end itemize |
| 1148 | 1213 | ||
| 1149 | @item | 1214 | @item |
| 1150 | Include all the comments that are appropriate to help people reading the | 1215 | Include in your code changes all the comments that are appropriate to |
| 1151 | source in the future understand why this change was needed. | 1216 | help people reading the source in the future understand why this |
| 1217 | change was needed. | ||
| 1152 | 1218 | ||
| 1153 | @item | 1219 | @item |
| 1154 | Don't mix together changes made for different reasons. | 1220 | Don't mix together changes made for different reasons. |
| 1155 | Send them @emph{individually}. | 1221 | Send them @emph{individually}. |
| 1156 | 1222 | ||
| 1157 | If you make two changes for separate reasons, then we might not want to | 1223 | If you make two changes for separate reasons, then we might not want |
| 1158 | install them both. We might want to install just one. If you send them | 1224 | to install them both. We might want to install just one, or install |
| 1159 | all jumbled together in a single set of diffs, we have to do extra work | 1225 | each one in a different versions of Emacs. If you send them all |
| 1160 | to disentangle them---to figure out which parts of the change serve | 1226 | jumbled together in a single set of diffs, we have to do extra work to |
| 1161 | which purpose. If we don't have time for this, we might have to ignore | 1227 | disentangle them---to figure out which parts of the change serve which |
| 1162 | your changes entirely. | 1228 | purpose. If we don't have time for this, we might have to postpone |
| 1229 | inclusion of your patches for a long time. | ||
| 1163 | 1230 | ||
| 1164 | If you send each change as soon as you have written it, with its own | 1231 | If you send each change as soon as you have written it, with its own |
| 1165 | explanation, then two changes never get tangled up, and we can consider | 1232 | explanation, then two changes never get tangled up, and we can consider |
| @@ -1176,52 +1243,46 @@ right away. That gives us the option of installing it immediately if it | |||
| 1176 | is important. | 1243 | is important. |
| 1177 | 1244 | ||
| 1178 | @item | 1245 | @item |
| 1179 | The patch itself. | 1246 | The patch itself. This can be produced in one of the following ways: |
| 1180 | |||
| 1181 | Use @samp{diff -u} to make your diffs. Diffs without context are hard | ||
| 1182 | to install reliably. More than that, they are hard to study; we must | ||
| 1183 | always study a patch to decide whether we want to install it. Context | ||
| 1184 | format is better than contextless diffs, but we prefer the unified | ||
| 1185 | format. | ||
| 1186 | |||
| 1187 | If you have GNU diff, use @samp{diff -u -F'^[_a-zA-Z0-9$]\+ *('} when | ||
| 1188 | making diffs of C code. This shows the name of the function that each | ||
| 1189 | change occurs in. | ||
| 1190 | 1247 | ||
| 1248 | @itemize @minus | ||
| 1249 | @item | ||
| 1191 | If you are using the Emacs repository, make sure your copy is | 1250 | If you are using the Emacs repository, make sure your copy is |
| 1192 | up-to-date (e.g., with @code{git pull}). You can commit your changes | 1251 | up-to-date (e.g., with @code{git pull}). You can commit your changes |
| 1193 | to a private branch and generate a patch from the master version by | 1252 | to a private branch and generate a patch from the master version by |
| 1194 | using @code{git format-patch master}. Or you can leave your changes | 1253 | using @code{git format-patch master}. (This is the preferred method, |
| 1195 | uncommitted and use @code{git diff}. | 1254 | as it makes our job of applying the patch easier.) Or you can leave |
| 1255 | your changes uncommitted and use @code{git diff}, as described below. | ||
| 1196 | 1256 | ||
| 1197 | @item | 1257 | @item |
| 1198 | Avoid any ambiguity as to which is the old version and which is the new. | 1258 | Use @kbd{diff -u} to make your diffs. If you have GNU diff, use |
| 1199 | Please make the old version the first argument to diff, and the new | 1259 | @w{@kbd{diff -u -F'^[_a-zA-Z0-9$]\+ *('}} when making diffs of C code. |
| 1200 | version the second argument. And please give one version or the other a | 1260 | This shows the name of the function that each change occurs in. |
| 1201 | name that indicates whether it is the old version or your new changed | 1261 | |
| 1202 | one. | 1262 | When producing the diffs, avoid any ambiguity as to which is the old |
| 1263 | version and which is the new. Please make the old version the first | ||
| 1264 | argument to diff, and the new version the second argument. And please | ||
| 1265 | give one version or the other a name that indicates whether it is the | ||
| 1266 | old version or your new changed one. | ||
| 1267 | @end itemize | ||
| 1203 | 1268 | ||
| 1204 | @item | 1269 | @item |
| 1205 | Write the commit log entries for your changes. This is both to save us | 1270 | Write the commit log entries for your changes. This is both to save us |
| 1206 | the extra work of writing them, and to help explain your changes so we | 1271 | the extra work of writing them, and to help explain your changes so we |
| 1207 | can understand them. | 1272 | can understand them. |
| 1208 | 1273 | ||
| 1209 | The purpose of the commit log is to show people where to find what was | 1274 | The purpose of the commit log is to explain the rationale of the |
| 1210 | changed. So you need to be specific about what functions you changed; | 1275 | changes, the way the modified code solves whatever problems your patch |
| 1211 | in large functions, it's often helpful to indicate where within the | 1276 | is trying to fix, and also show people where to find what was changed. |
| 1212 | function the change was. | 1277 | So you need to be specific about what functions you changed and why. |
| 1213 | 1278 | For the details about our style and requirements for good commit log | |
| 1214 | On the other hand, once you have shown people where to find the change, | 1279 | messages, please see the ``Commit messages'' section of the file |
| 1215 | you need not explain its purpose in the change log. Thus, if you add a | 1280 | @file{CONTRIBUTE} in the Emacs source tree. |
| 1216 | new function, all you need to say about it is that it is new. If you | 1281 | |
| 1217 | feel that the purpose needs explaining, it probably does---but put the | 1282 | Please also look at the commit log entries of recent commits to see |
| 1218 | explanation in comments in the code. It will be more useful there. | 1283 | what sorts of information to put in, and to learn the style that we |
| 1219 | 1284 | use. Note that, unlike some other projects, we do require commit logs | |
| 1220 | Please look at the commit log entries of recent commits to see what | 1285 | for documentation, i.e., Texinfo files. @xref{Change Log}, |
| 1221 | sorts of information to put in, and to learn the style that we use. | ||
| 1222 | Note that, unlike some other projects, we do require commit logs for | ||
| 1223 | documentation, i.e., Texinfo files. | ||
| 1224 | @xref{Change Log}, | ||
| 1225 | @ifset WWW_GNU_ORG | 1286 | @ifset WWW_GNU_ORG |
| 1226 | see | 1287 | see |
| 1227 | @url{https://www.gnu.org/prep/standards/html_node/Change-Log-Concepts.html}, | 1288 | @url{https://www.gnu.org/prep/standards/html_node/Change-Log-Concepts.html}, |
| @@ -1232,7 +1293,7 @@ Change Log Concepts, standards, GNU Coding Standards}. | |||
| 1232 | @item | 1293 | @item |
| 1233 | When you write the fix, keep in mind that we can't install a change that | 1294 | When you write the fix, keep in mind that we can't install a change that |
| 1234 | would break other systems. Please think about what effect your change | 1295 | would break other systems. Please think about what effect your change |
| 1235 | will have if compiled on another type of system. | 1296 | will have if compiled and/or used on another type of system. |
| 1236 | 1297 | ||
| 1237 | Sometimes people send fixes that @emph{might} be an improvement in | 1298 | Sometimes people send fixes that @emph{might} be an improvement in |
| 1238 | general---but it is hard to be sure of this. It's hard to install | 1299 | general---but it is hard to be sure of this. It's hard to install |
| @@ -1240,9 +1301,10 @@ such changes because we have to study them very carefully. Of course, | |||
| 1240 | a good explanation of the reasoning by which you concluded the change | 1301 | a good explanation of the reasoning by which you concluded the change |
| 1241 | was correct can help convince us. | 1302 | was correct can help convince us. |
| 1242 | 1303 | ||
| 1243 | The safest changes are changes to the configuration files for a | 1304 | The safest changes are changes to the files or portions of files that |
| 1244 | particular machine. These are safe because they can't create new bugs | 1305 | are only used for a particular machine or a particular system. These |
| 1245 | on other machines. | 1306 | are safe because they can't create new bugs on other machines or |
| 1307 | systems. | ||
| 1246 | 1308 | ||
| 1247 | Please help us keep up with the workload by designing the patch in a | 1309 | Please help us keep up with the workload by designing the patch in a |
| 1248 | form that is clearly safe to install. | 1310 | form that is clearly safe to install. |
| @@ -1259,7 +1321,7 @@ There are many ways to contribute to Emacs: | |||
| 1259 | 1321 | ||
| 1260 | @itemize | 1322 | @itemize |
| 1261 | @item | 1323 | @item |
| 1262 | find and report bugs; @xref{Bugs}. | 1324 | find and report bugs; @pxref{Bugs}. |
| 1263 | 1325 | ||
| 1264 | @item | 1326 | @item |
| 1265 | answer questions on the Emacs user mailing list | 1327 | answer questions on the Emacs user mailing list |
| @@ -1326,15 +1388,15 @@ before you start; it might be possible to suggest ways to make your | |||
| 1326 | extension fit in better with the rest of Emacs. | 1388 | extension fit in better with the rest of Emacs. |
| 1327 | 1389 | ||
| 1328 | When implementing a feature, please follow the Emacs coding standards; | 1390 | When implementing a feature, please follow the Emacs coding standards; |
| 1329 | @xref{Coding Standards}. In addition, non-trivial contributions | 1391 | @pxref{Coding Standards}. In addition, substantial contributions |
| 1330 | require a copyright assignment to the FSF; @xref{Copyright Assignment}. | 1392 | require a copyright assignment to the FSF; @pxref{Copyright Assignment}. |
| 1331 | 1393 | ||
| 1332 | The development version of Emacs can be downloaded from the | 1394 | The development version of Emacs can be downloaded from the |
| 1333 | repository where it is actively maintained by a group of developers. | 1395 | repository where it is actively maintained by a group of developers. |
| 1334 | See the Emacs project page | 1396 | See the Emacs project page |
| 1335 | @url{https://savannah.gnu.org/projects/emacs/} for access details. | 1397 | @url{https://savannah.gnu.org/projects/emacs/} for access details. |
| 1336 | 1398 | ||
| 1337 | It is important to write your patch based on the current working | 1399 | It is important to write your patches based on the current working |
| 1338 | version. If you start from an older version, your patch may be | 1400 | version. If you start from an older version, your patch may be |
| 1339 | outdated (so that maintainers will have a hard time applying it), or | 1401 | outdated (so that maintainers will have a hard time applying it), or |
| 1340 | changes in Emacs may have made your patch unnecessary. After you have | 1402 | changes in Emacs may have made your patch unnecessary. After you have |
| @@ -1397,7 +1459,7 @@ the Emacs Lisp Reference Manual | |||
| 1397 | 1459 | ||
| 1398 | @node Coding Standards | 1460 | @node Coding Standards |
| 1399 | @subsection Coding Standards | 1461 | @subsection Coding Standards |
| 1400 | @cindex coding standards | 1462 | @cindex coding standards for Emacs submissions |
| 1401 | 1463 | ||
| 1402 | Contributed code should follow the GNU Coding Standards | 1464 | Contributed code should follow the GNU Coding Standards |
| 1403 | @url{https://www.gnu.org/prep/standards/}. This may also be available | 1465 | @url{https://www.gnu.org/prep/standards/}. This may also be available |
| @@ -1433,10 +1495,6 @@ to be included in Emacs. | |||
| 1433 | Remove all trailing whitespace in all source and text files. | 1495 | Remove all trailing whitespace in all source and text files. |
| 1434 | 1496 | ||
| 1435 | @item | 1497 | @item |
| 1436 | Emacs has no convention on whether to use tabs in source code; please | ||
| 1437 | don't change whitespace in the files you edit. | ||
| 1438 | |||
| 1439 | @item | ||
| 1440 | Use @code{?\s} instead of @code{? } in Lisp code for a space character. | 1498 | Use @code{?\s} instead of @code{? } in Lisp code for a space character. |
| 1441 | 1499 | ||
| 1442 | @end itemize | 1500 | @end itemize |
| @@ -1455,7 +1513,7 @@ packages stored in GNU ELPA, we require that the copyright be assigned | |||
| 1455 | to the FSF@. For the reasons behind this, see | 1513 | to the FSF@. For the reasons behind this, see |
| 1456 | @url{https://www.gnu.org/licenses/why-assign.html}. | 1514 | @url{https://www.gnu.org/licenses/why-assign.html}. |
| 1457 | 1515 | ||
| 1458 | Copyright assignment is a simple process. Residents of some countries | 1516 | Copyright assignment is a simple process. Residents of many countries |
| 1459 | can do it entirely electronically. We can help you get started, | 1517 | can do it entirely electronically. We can help you get started, |
| 1460 | including sending you the forms you should fill, and answer any | 1518 | including sending you the forms you should fill, and answer any |
| 1461 | questions you may have (or point you to the people with the answers), | 1519 | questions you may have (or point you to the people with the answers), |
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 5d6def75f2f..46ef5146136 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -1504,8 +1504,10 @@ access and it has the most reasonable security protocols, use | |||
| 1504 | @end example | 1504 | @end example |
| 1505 | 1505 | ||
| 1506 | If @option{ssh} is unavailable for whatever reason, look for other | 1506 | If @option{ssh} is unavailable for whatever reason, look for other |
| 1507 | obvious options. For MS Windows, try the @option{plink} method. For | 1507 | obvious options. For MS Windows, try the @option{plink} |
| 1508 | Kerberos, try @option{krlogin}. | 1508 | method@footnote{This shouldn't be needed with recent @code{OpenSSH} |
| 1509 | versions for MS Windows. Use method @option{sshx}.}. For Kerberos, | ||
| 1510 | try @option{krlogin}. | ||
| 1509 | 1511 | ||
| 1510 | For editing local files as @option{su} or @option{sudo} methods, try | 1512 | For editing local files as @option{su} or @option{sudo} methods, try |
| 1511 | the shortened syntax of @samp{root}: | 1513 | the shortened syntax of @samp{root}: |
| @@ -2866,11 +2868,19 @@ When @value{tramp} uses direct remote copying, password caches are not | |||
| 2866 | consulted. | 2868 | consulted. |
| 2867 | 2869 | ||
| 2868 | 2870 | ||
| 2869 | @subsection Issues with Cygwin ssh | 2871 | @subsection Issues with Cygwin and MS Windows ssh |
| 2870 | @cindex cygwin, issues | 2872 | @cindex cygwin, issues |
| 2873 | @cindex ms Windows, issues | ||
| 2871 | 2874 | ||
| 2872 | This section is incomplete. Please share your solutions. | 2875 | This section is incomplete. Please share your solutions. |
| 2873 | 2876 | ||
| 2877 | @cindex ms windows and @command{ssh} | ||
| 2878 | @cindex ms windows and @command{ssh-agent} | ||
| 2879 | |||
| 2880 | MS Windows' @command{ssh} does not open a remote TTY@. Use the method | ||
| 2881 | @option{sshx} or @option{scpx} instead. Furthermore, it cannot read a | ||
| 2882 | passphrase for ssh private keys. Use the MS @code{ssh-agent}. | ||
| 2883 | |||
| 2874 | @cindex method @option{sshx} with cygwin | 2884 | @cindex method @option{sshx} with cygwin |
| 2875 | @cindex @option{sshx} method with cygwin | 2885 | @cindex @option{sshx} method with cygwin |
| 2876 | 2886 | ||
| @@ -2910,13 +2920,15 @@ Windows file names to Cygwin file names. | |||
| 2910 | @cindex @env{SSH_AUTH_SOCK} and emacs on ms windows | 2920 | @cindex @env{SSH_AUTH_SOCK} and emacs on ms windows |
| 2911 | @vindex SSH_AUTH_SOCK@r{, environment variable} | 2921 | @vindex SSH_AUTH_SOCK@r{, environment variable} |
| 2912 | 2922 | ||
| 2913 | When using the @command{ssh-agent} on MS Windows for password-less | 2923 | When using the cygwin @command{ssh-agent} on MS Windows for |
| 2914 | interaction, @option{ssh} methods depend on the environment variable | 2924 | password-less interaction, @option{ssh} methods depend on the |
| 2915 | @env{SSH_AUTH_SOCK}. But this variable is not set when Emacs is | 2925 | environment variable @env{SSH_AUTH_SOCK}. But this variable is not |
| 2916 | started from a Desktop shortcut and authentication fails. | 2926 | set when Emacs is started from a Desktop shortcut and authentication |
| 2927 | fails. | ||
| 2917 | 2928 | ||
| 2918 | One workaround is to use an MS Windows based SSH Agent, such as | 2929 | One workaround is to use an MS Windows based SSH Agent, such as the |
| 2919 | @command{Pageant}. It is part of the PuTTY Suite of tools. | 2930 | native MS @command{ssh-agent} or @command{Pageant}. The latter is |
| 2931 | part of the PuTTY Suite of tools. | ||
| 2920 | 2932 | ||
| 2921 | The fallback is to start Emacs from a shell. | 2933 | The fallback is to start Emacs from a shell. |
| 2922 | 2934 | ||
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 6dbdb565b1b..a939cc0b509 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -437,7 +437,7 @@ the C sources, too." | |||
| 437 | (setq file-name | 437 | (setq file-name |
| 438 | (locate-file file-name load-path '(".el" ".elc") 'readable))) | 438 | (locate-file file-name load-path '(".el" ".elc") 'readable))) |
| 439 | ((and (stringp file-name) | 439 | ((and (stringp file-name) |
| 440 | (string-match "[.]*loaddefs.el\\'" file-name)) | 440 | (string-match "[.]*loaddefs.elc?\\'" file-name)) |
| 441 | ;; An autoloaded variable or face. Visit loaddefs.el in a buffer | 441 | ;; An autoloaded variable or face. Visit loaddefs.el in a buffer |
| 442 | ;; and try to extract the defining file. The following form is | 442 | ;; and try to extract the defining file. The following form is |
| 443 | ;; from `describe-function-1' and `describe-variable'. | 443 | ;; from `describe-function-1' and `describe-variable'. |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 2fe88323c35..bbabce80b4d 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -5854,7 +5854,14 @@ statement." | |||
| 5854 | (save-excursion | 5854 | (save-excursion |
| 5855 | (python-nav-beginning-of-statement) | 5855 | (python-nav-beginning-of-statement) |
| 5856 | (when (and (not (python-syntax-context-type)) | 5856 | (when (and (not (python-syntax-context-type)) |
| 5857 | (looking-at (python-rx dedenter))) | 5857 | (looking-at (python-rx dedenter)) |
| 5858 | ;; Exclude the first "case" in the block. | ||
| 5859 | (not (and (string= (match-string-no-properties 0) | ||
| 5860 | "case") | ||
| 5861 | (save-excursion | ||
| 5862 | (back-to-indentation) | ||
| 5863 | (python-util-forward-comment -1) | ||
| 5864 | (equal (char-before) ?:))))) | ||
| 5858 | (point)))) | 5865 | (point)))) |
| 5859 | 5866 | ||
| 5860 | (defun python-info-line-ends-backslash-p (&optional line-number) | 5867 | (defun python-info-line-ends-backslash-p (&optional line-number) |
diff --git a/lisp/savehist.el b/lisp/savehist.el index b532668f8a4..ea8968c771b 100644 --- a/lisp/savehist.el +++ b/lisp/savehist.el | |||
| @@ -232,8 +232,9 @@ If AUTO-SAVE is non-nil, compare the saved contents to the one last saved, | |||
| 232 | savehist-coding-system)) | 232 | savehist-coding-system)) |
| 233 | (run-hooks 'savehist-save-hook) | 233 | (run-hooks 'savehist-save-hook) |
| 234 | (let ((print-length nil) | 234 | (let ((print-length nil) |
| 235 | (print-level nil) | 235 | (print-level nil) |
| 236 | (print-quoted t)) | 236 | (print-quoted t) |
| 237 | (print-circle t)) | ||
| 237 | ;; Save the minibuffer histories, along with the value of | 238 | ;; Save the minibuffer histories, along with the value of |
| 238 | ;; savehist-minibuffer-history-variables itself. | 239 | ;; savehist-minibuffer-history-variables itself. |
| 239 | (when savehist-save-minibuffer-history | 240 | (when savehist-save-minibuffer-history |
diff --git a/src/timefns.c b/src/timefns.c index b3132e7bc34..87971cf4563 100644 --- a/src/timefns.c +++ b/src/timefns.c | |||
| @@ -180,6 +180,15 @@ static timezone_t const utc_tz = 0; | |||
| 180 | static struct tm * | 180 | static struct tm * |
| 181 | emacs_localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) | 181 | emacs_localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) |
| 182 | { | 182 | { |
| 183 | #ifdef WINDOWSNT | ||
| 184 | /* The Windows CRT functions are "optimized for speed", so they don't | ||
| 185 | check for timezone and DST changes if they were last called less | ||
| 186 | than 1 minute ago (see http://support.microsoft.com/kb/821231). | ||
| 187 | So all Emacs features that repeatedly call time functions (e.g., | ||
| 188 | display-time) are in real danger of missing timezone and DST | ||
| 189 | changes. Calling tzset before each localtime call fixes that. */ | ||
| 190 | tzset (); | ||
| 191 | #endif | ||
| 183 | tm = localtime_rz (tz, t, tm); | 192 | tm = localtime_rz (tz, t, tm); |
| 184 | if (!tm && errno == ENOMEM) | 193 | if (!tm && errno == ENOMEM) |
| 185 | memory_full (SIZE_MAX); | 194 | memory_full (SIZE_MAX); |
diff --git a/src/treesit.c b/src/treesit.c index 36a297ec7da..fd5fda78133 100644 --- a/src/treesit.c +++ b/src/treesit.c | |||
| @@ -1016,11 +1016,6 @@ treesit_call_after_change_functions (TSTree *old_tree, TSTree *new_tree, | |||
| 1016 | static void | 1016 | static void |
| 1017 | treesit_ensure_parsed (Lisp_Object parser) | 1017 | treesit_ensure_parsed (Lisp_Object parser) |
| 1018 | { | 1018 | { |
| 1019 | /* Make sure this comes before everything else, see comment | ||
| 1020 | (ref:notifier-inside-ensure-parsed) for more detail. */ | ||
| 1021 | if (!XTS_PARSER (parser)->need_reparse) | ||
| 1022 | return; | ||
| 1023 | |||
| 1024 | struct buffer *buffer = XBUFFER (XTS_PARSER (parser)->buffer); | 1019 | struct buffer *buffer = XBUFFER (XTS_PARSER (parser)->buffer); |
| 1025 | 1020 | ||
| 1026 | /* Before we parse, catch up with the narrowing situation. */ | 1021 | /* Before we parse, catch up with the narrowing situation. */ |
| @@ -1029,6 +1024,11 @@ treesit_ensure_parsed (Lisp_Object parser) | |||
| 1029 | because it might set the flag to true. */ | 1024 | because it might set the flag to true. */ |
| 1030 | treesit_sync_visible_region (parser); | 1025 | treesit_sync_visible_region (parser); |
| 1031 | 1026 | ||
| 1027 | /* Make sure this comes before everything else, see comment | ||
| 1028 | (ref:notifier-inside-ensure-parsed) for more detail. */ | ||
| 1029 | if (!XTS_PARSER (parser)->need_reparse) | ||
| 1030 | return; | ||
| 1031 | |||
| 1032 | TSParser *treesit_parser = XTS_PARSER (parser)->parser; | 1032 | TSParser *treesit_parser = XTS_PARSER (parser)->parser; |
| 1033 | TSTree *tree = XTS_PARSER (parser)->tree; | 1033 | TSTree *tree = XTS_PARSER (parser)->tree; |
| 1034 | TSInput input = XTS_PARSER (parser)->input; | 1034 | TSInput input = XTS_PARSER (parser)->input; |
diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba index 0fa642d983b..9377a3b5f87 100644 --- a/test/infra/Dockerfile.emba +++ b/test/infra/Dockerfile.emba | |||
| @@ -100,7 +100,7 @@ FROM emacs-base as emacs-native-comp | |||
| 100 | # The libgccjit version must correspond to the gcc version. | 100 | # The libgccjit version must correspond to the gcc version. |
| 101 | RUN apt-get update && \ | 101 | RUN apt-get update && \ |
| 102 | apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ | 102 | apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ |
| 103 | libgccjit-10-dev \ | 103 | libgccjit-10-dev zlib1g-dev \ |
| 104 | && rm -rf /var/lib/apt/lists/* | 104 | && rm -rf /var/lib/apt/lists/* |
| 105 | 105 | ||
| 106 | FROM emacs-native-comp as emacs-native-comp-speed0 | 106 | FROM emacs-native-comp as emacs-native-comp-speed0 |
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index ed4a08da6ab..50153e66da5 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -5940,6 +5940,26 @@ def func(): | |||
| 5940 | (equal (list (python-tests-look-at "if (" -1 t)) | 5940 | (equal (list (python-tests-look-at "if (" -1 t)) |
| 5941 | (python-info-dedenter-opening-block-positions))))) | 5941 | (python-info-dedenter-opening-block-positions))))) |
| 5942 | 5942 | ||
| 5943 | (ert-deftest python-info-dedenter-opening-block-positions-7 () | ||
| 5944 | "Test case blocks." | ||
| 5945 | (python-tests-with-temp-buffer | ||
| 5946 | " | ||
| 5947 | match a: | ||
| 5948 | case 1: | ||
| 5949 | match b: | ||
| 5950 | case 2: | ||
| 5951 | something() | ||
| 5952 | case 3: | ||
| 5953 | " | ||
| 5954 | (python-tests-look-at "case 1:") | ||
| 5955 | (should-not (python-info-dedenter-opening-block-positions)) | ||
| 5956 | (python-tests-look-at "case 2:") | ||
| 5957 | (should-not (python-info-dedenter-opening-block-positions)) | ||
| 5958 | (python-tests-look-at "case 3:") | ||
| 5959 | (equal (list (python-tests-look-at "case 2:" -1) | ||
| 5960 | (python-tests-look-at "case 1:" -1 t)) | ||
| 5961 | (python-info-dedenter-opening-block-positions)))) | ||
| 5962 | |||
| 5943 | (ert-deftest python-info-dedenter-opening-block-message-1 () | 5963 | (ert-deftest python-info-dedenter-opening-block-message-1 () |
| 5944 | "Test dedenters inside strings are ignored." | 5964 | "Test dedenters inside strings are ignored." |
| 5945 | (python-tests-with-temp-buffer | 5965 | (python-tests-with-temp-buffer |
| @@ -6125,6 +6145,24 @@ elif b: | |||
| 6125 | (point)) | 6145 | (point)) |
| 6126 | (python-info-dedenter-statement-p))))) | 6146 | (python-info-dedenter-statement-p))))) |
| 6127 | 6147 | ||
| 6148 | (ert-deftest python-info-dedenter-statement-p-6 () | ||
| 6149 | "Test case keyword." | ||
| 6150 | (python-tests-with-temp-buffer | ||
| 6151 | " | ||
| 6152 | match a: # Comment | ||
| 6153 | case 1: | ||
| 6154 | match b: | ||
| 6155 | case 2: | ||
| 6156 | something() | ||
| 6157 | case 3: | ||
| 6158 | " | ||
| 6159 | (python-tests-look-at "case 1:") | ||
| 6160 | (should-not (python-info-dedenter-statement-p)) | ||
| 6161 | (python-tests-look-at "case 2:") | ||
| 6162 | (should-not (python-info-dedenter-statement-p)) | ||
| 6163 | (python-tests-look-at "case 3:") | ||
| 6164 | (should (= (point) (python-info-dedenter-statement-p))))) | ||
| 6165 | |||
| 6128 | (ert-deftest python-info-line-ends-backslash-p-1 () | 6166 | (ert-deftest python-info-line-ends-backslash-p-1 () |
| 6129 | (python-tests-with-temp-buffer | 6167 | (python-tests-with-temp-buffer |
| 6130 | " | 6168 | " |
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el index 0321b92d0bc..6f79d3277a8 100644 --- a/test/src/fns-tests.el +++ b/test/src/fns-tests.el | |||
| @@ -254,7 +254,7 @@ | |||
| 254 | (should (string-collate-equalp "xyzzy" "XYZZY" nil t)) | 254 | (should (string-collate-equalp "xyzzy" "XYZZY" nil t)) |
| 255 | 255 | ||
| 256 | ;; Locale must be valid. | 256 | ;; Locale must be valid. |
| 257 | (should-error (string-collate-equalp "xyzzy" "xyzzy" "en_DE.UTF-8"))) | 257 | (should-error (string-collate-equalp "xyzzy" "xyzzy" "en_XY.UTF-8"))) |
| 258 | 258 | ||
| 259 | ;; There must be a check for valid codepoints. (Check not implemented yet) | 259 | ;; There must be a check for valid codepoints. (Check not implemented yet) |
| 260 | ; (should-error | 260 | ; (should-error |