From: Stefan Monnier Date: Fri, 4 May 2012 18:23:31 +0000 (-0400) Subject: Add notes-mode. X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/19031dd1c3c4bf04bfe9f705650d20523ff6d323 Add notes-mode. --- diff --git a/packages/notes-mode/COPYING b/packages/notes-mode/COPYING new file mode 100644 index 000000000..86cf81acb --- /dev/null +++ b/packages/notes-mode/COPYING @@ -0,0 +1,341 @@ + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. + diff --git a/packages/notes-mode/HTML/notes-mode.html b/packages/notes-mode/HTML/notes-mode.html new file mode 100644 index 000000000..737a88ed7 --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode.html @@ -0,0 +1,2364 @@ + + + + +Notes-mode + + + + + + + + + + + + + + + + + + + + +
[Top][Contents][Index][ ? ]
+

Notes-mode

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1. Introduction

+ +

What is notes-mode and why should you (perhaps) use it? +

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.1 What is it?

+ +

Notes-mode is an indexing system for on-line note-taking. +Notes-mode is composed of two parts, the visible part, +a major-mode for emacs to aid note-taking; +and the invisible part, +scripts which periodically index your notes for you. +

+

Note that notes-mode provides tools to index your notes, +not to search them. +(Other existing tools such as ‘grep’, ‘agrep’, and ‘glimpse’ +already allow file search.) +

+

A digression about indexing vs. searching: +Indexing in this sense means +organize them according to categories you give, +while searching looks through all text for arbitrary strings. +Drawing on the World Wide Web for examples, +Yahoo (‘http://www.yahoo.com/’) is an index, +while Alta Vista (‘http://www.altavista.digital.com/’) +is a search-engine. +In (potentially) more familiar terms, +the yellow pages +(1) +are an index, +while directory information (411 in the USA) +is sort of a search-engine. +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.2 Why keep notes at all?

+ +

So why should you use notes-mode? +Well, first, consider why you should (perhaps) +keep your notes on line. +First, +I assume that you take notes as part of your work or school. +If you don’t, +you can stop reading now and go back to watching TV. +

+

If you keep notes, ask yourself why you keep them. +Reasons vary for different people, but some include: +

+
    +
  • +To remember what is said or done. + +
  • +To focus on what is important about what is said. + +
  • +To provide proof of having done something +at a particular time or date. + +
  • +I know there were other reasons here, +but they slipped my mind. +
+ + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.3 Why keep notes on-line?

+ +

OK, I’ve talked you into keeping notes. +Why do it on-line? +Again, there are different reasons for different people. +If you don’t want to consider keeping your notes on-line, +you’re welcome to go back to your (clay tablets) +paper notes. +

+

However, if you do much of your work on-line, +or if you have portable computer, +then you might want to consider keeping your notes on-line. +

+
    +
  • +It’s faster to type than write, +and possibly more legible at high speed. + +
  • +Often information is already on-line. +For example, in software development, bug reports, +measurement results, and everything else that’s useful +is on-line. + +
  • +You can take down more detail than you otherwise would +(especially if the data is already on-line). +Taking more copious notes can be helpful when you go back +to figure out why that strange thing was happening. + +
  • +On-line notes are easy to search. +Full-text search with +grep, agrep, and glimpse are all much faster +and are often more accurate than paging through paper notes +looking for a particular keyword. + +
  • +On-line notes are easy to index. +(At least with notes-mode!) +In addition to full-text search, +it’s helpful to organize notes by category. +If you keep a table-of-contents of your paper notes, +you are either extremely fastidious +or a librarian (Nadia?). + +
  • +You can keep all of your notes with you at all times +(if you have a portable computer). +Even at a page a day, +paper notes quickly become bulky and awkward to carry around. +On-line notes fit on your computer’s hard disk, +an extraordinarily compact medium +by comparison. + +
  • +Your notes can be automatically backed up. +Paper notes can become damaged with time, +and as a graduate student +one of my fears was fire in Boelter Hall +consuming all my research experiments +and and therefore hopes of a degree. +Electronic notes are extremely easy to duplicate +and can be automatically backed up with the rest of your computer. +(You do back up your computer, don’t you?) + +
+ +

While these advantages are undoubtedly clear to any +right-thinking computer user, +it should be said that there are a few disadvantages +for on-line note-taking. +

+
    +
  • +If you don’t have a computer with you most of the time, +it’s difficult take notes on-line (because you’re off-line, of course). +(2) + +
  • +Computers require power. +If your portable computer runs out of juice, +you’re on your own. +Corollary: watch your power, or bring paper. +Better corollary: watch your power, and bring paper. + +
  • +Social limitations. +It’s not always socially acceptable to take notes-on-line. +For example, +at a party, +few people would use a computer +to take down the phone number of a person +to whom they’re attracted +(at least, if they wanted the attraction to be mutual). +(3) +Sometimes other people find the sound of typing distracting. + +
  • +Health issues. +Repetitive stress injuries do occur +writing (slower) by hand is at least +an alternate motion than typing. + +
  • +Legal limitations. +If you want to use your electronic notes +to justify a patent or invention, +you may be breaking legal ground. +Being on the legal cutting-edge is rarely an easy thing +for the person involved.(4) + +
+ + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.4 Why use notes-mode?

+ +

OK, I’ve sold you on note-taking and even on on-line note-taking. +What about notes-mode? +Naturally, +it slices, dices, and makes julienne fries. +But wait, there’s more: +

+
    +
  • +It automates indexing your notes, +linking notes with the same subject together. + +
  • +It supports embedded links, +allowing you to manually link together different topics +and external files. + +
  • +It includes a number of convenience-features in emacs. +Subjects can be completed based on existing subjects. +The usual emacs customization mechanisms are available. + +
  • +Notes containing sensitive information can be encrypted. + +
  • +Notes-mode seems better than the other, currently available alternatives. +
+ +

What are the alternatives? I’m glad you asked. +(5) +

+
    +
  • +HTML. +HTML has better formatting capabilities than notes-mode, +and it has excellent linking capabilities. +Unfortunately, +HTML’s tags are fairly intrusive + (each is at least four characters long and most come with a pair), + tags can get confused with normal text, + errors in HTML can be bad (obscuring data), + and there’s no automatic indexing feature + (at least with plain HTML). +Besides, + all data should be kept as close to the ASCII from whence it came, + as God Intended (hi, Steve). + +
  • +Word Processors. +Word processors are strong in the formatting department, + but most don’t really have linking capabilities, + and have poor or restricted indexing. + +
+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.5 Y2K Statement

+ +

Notes mode uses dates extensively, + both two-digit years and seconds-since-1970. +However, notes-mode has been coded to function correctly through + the year 2038. +

+

To avoid problems with the year 2000, notes-mode assumes + that any two-digit years before “70” are 20xx, not 19xx. +Notes-mode should therefore work correctly in both the year 1999 and 2000. +

+

(Notes-mode 1.17 released February 1999 fixes a lingering Y2K problem.) +

+

Because notes-mode uses seconds-since-1970 for some date calculations + it will fail beyond the year 2038 on computers with 32-bit integers. +

+

If I’m still using notes-mode then on a 32-bit machine I’ll see what I can do. +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.6 Related work

+ +

What would a document be without related work? +

+

Notes-mode is not related in any way to Lotus Notes. +

+

I am told (by David Weisman) + that it’s something like the now defunct Lotus Agenda. +

+

Ashvin Goel, one of the contributors to notes-mode, + has gone off and done a from-scratch reimplementation + called records-mode. +It’s very similar to notes mode, + and emphasizes on-the-fly updates to entry links + but lacks a manual. +You may want to check it out at + ‘http://www.cse.ogi.edu/~ashvin/software.html’. +

+

Hyperbole (by Bob Weiner) offers better linking facilities +than notes-mode, but it has a bunch of stuff notes-mode doesn’t need +and it’s missing notes-specific indexing provided by notes-mode. +For people already using Hyperbole + it would be interesting to replace notes-mode’s linking + with Hyperbole’s. +Contributions in this area are welcome, provided they make Hyperbole + optional. +

+
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.7 Staying on top

+ +

The most recent distribution of notes-mode + is always available via + ‘http://www.isi.edu/~johnh/SOFTWARE/NOTES_MODE/’. +

+

After you’ve installed notes mode you’re encouraged to subscribe +to the mailing lists. +To subscribe, go to the web page +Send the message "subscribe" to +‘http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-announce’ or +‘http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-talk’. +

+

The announce list will contain only release announcements +and so is guaranteed to be very low bandwidth. +

+ + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

2. Basics

+ +

All you need to use notes-mode + in a chapter. +(Except for installation, See section Installation.) +

+ + + + + + + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

2.1 Getting started

+ + + +

To get started with notes-mode, + read the introduction this chapter, + then either: +

+
    +
  • +Start emacs, do + M-x load-library RET notes-mode RET +This approach will set up notes-mode with the default parameters. + +
  • +OR, from the shell, + run the program ‘notesinit’. +This approach will ask you some questions about how you want to configure + notes mode. + +
+ +

Either way these should set up everything notes-mode needs. +This program will modify your environment (as described in this section), + or it will give you the exact commands you should run yourself. +

+

After you’ve done one of these, + start up emacs and note-away. +I usually begin a + day of note-taking by running the command + M-x notes-index-todays-link + to jump directly to today’s note. +You may even wish to bind this to something, + perhaps with + (define-key global-map "\C-cn" 'notes-index-todays-link) + in your ‘.emacs’. +

+

If you want to browse your existing notes, + you might instead want to edit the + ‘~/NOTES/index’. +(What is a notes file and the index? Hurry up and finish + reading this chapter.) +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

2.2 A notes file

+ + + +

The notes file is the focus of most of the activity in notes-mode, + it’s where you take your notes. +Notes files are mostly free-form text + broken up into entries. +Here’s an example: +

+ + +
 
8-Jun-95 Thursday
+-----------------
+
+* Today
+-------
+prev: <none>
+next: <file:///~/NOTES/199506/950609#* Today>
+
+next week - release notes-mode
+
+
+* Environment/notes
+-------------------
+
+I explained notes mode to Ashvin and Geoff.
+...
+
+ +

Each entry has a subject-block, (maybe) some links, and then (maybe) some text. +

+

The subject-block must begin with an asterisk-space (* ) + at the beginning of a line, followed by the subject itself. +Subjects must be underlined with a row of dashes + (if they’re not exact, that’s OK; + notes-mode will fix them periodically). +For convenience, + notes-mode will automatically add the underlines when you + hit <RTN> (notes-electric-return), + and <TAB> on a partially completed subject will + invoke completion based on indexed subjects (notes-complete-subject). + + + +

+

Following the subject may be links. +(In the example, the “Today” entry has links, + the “Environment/notes” entry doesn’t.) +These links will be automatically updated by notes-mode + when your notes are re-indexed; + just leave a blank line when writing the note. + +

+

Links are made with pseudo-URLs, + sort of like those in the World Wide Web. +Any of these URLs can be followed in notes-mode files + by clicking S-mouse-2 on the pseudo-URL + (notes-w3-follow-link-mouse). + + + +

+

Finally comes the text. +Go wild, but just don’t include text that looks like a subject. +You can embed pseudo-URLs to link notes together manually. +

+

The more anal of you may have noticed + that the lines before the first subject + are not part of any entry. +These lines are + front matter. +They’re not usually used for much, + but they can be a good place to label the file. + + +

+

There are a number of useful conventions + that can be adopted to organize your notes. +The most common is the “Today” entry. +If you keep an entry with the same subject + at the beginning of each file, + you link all of your notes together. +Notes-mode will help you out with some of these convetions + by automatically creating or copying some fields for you; + see see section Useful conventions for details. +

+

Finally, notes-mode can also work with outline-minor-mode + (thanks to Tim Carroll for pointing this out). +Outline-mode supports hiding and revealing text and other helpful + features beyond the scope of this document. +See Outline Mode: (emacs)Outline Mode section ‘Outline Mode’ in The Emacs Editor, for details. +

+
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

2.3 The notes index

+ + + +

The notes index lists all subjects you’ve kept notes about, + and each date of each note. +Impress your friends, + show your advisor why you’re worth the big peanuts, + you’ll soon have the biggest index of all. +

+

The index has one line per subject, listing the subject + and each day a note was made about that subject. +For example: +

+
 
Bicycle: 950314, 950316
+Bicycle/maintenance/books: 951028
+Bridge/hands: 951113, 951114, 951116, 951117
+Bridge/UCLA: 960222, 960409
+
+ +

Clicking on any of the dates with mouse-2 + will take you to that note + (notes-index-mouse-follow-link). +(You can also move the point over the date and hit <RTN> + if you’re musaphobic [notes-index-follow-link].) + + +

+

The notes index is automatically updated by the program ‘mkall’. +Typically ‘mkall’ is run nightly by ‘cron’. +On most modern versions of Unix, you can add this command to cron by + running ‘crontab -e’ and adding the line: +

+
 
0 4 * * * /usr/local/lib/notes-mode/mkall
+
+ + + + +

(Assuming that your notes programs are installed + in /usr/local/lib/notes-mode, the default location.) +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

2.4 The notes directories

+ + + + +

The final thing needed to tie basic notes-mode together his how +the pieces fit together. +Since my graduate work is in file systems, +you can bet that directories are involved. +

+

Notes-mode keeps its files in a two-level hierarchy: +

+
 
~/NOTES
+~/NOTES/index
+~/NOTES/rawindex
+~/NOTES/199603
+~/NOTES/199603/960329
+~/NOTES/199603/960330
+~/NOTES/199604
+~/NOTES/199604/960401
+
+ +

The top level, ‘~/NOTES’, is the notes directory. +It keeps all notes in one place. +(The name of this directory is configurable, See section Notes-mode configuration.) +

+

Inside the notes directory are two files and a number of directories. +The files are ‘index’, + the index of all entries (see section The notes index), + and ‘rawindex’, + used internally. + +

+

The notes directory also contains a number of subdirectories, + sometimes called intermediate directories. +These directories group the actual notes files into manageable chunks, + keeping any directory from getting too large. +Intermediate directories are named + by the four-digit year and the two-digit month + of the entries they contain. +(The format of intermediate directories + is configurable, See section Notes-mode configuration.) + +

+

Finally, + each intermediate directory are the notes files themselves, + named according to the two-digit year, month, and day-of-month. + +

+

For the most part, + notes-mode will automatically maintain this organization of files, + once you create the top-level directory. +Notes-mode will also automatically insure + that all files in the notes directory are unreadable by + anyone other than their owner. +Notes are personal things. +(This behavior is not currently configurable, + but it probably should be.) + +

+ + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3. Advanced Features

+ +

Notes-mode, the minutiae, and some other good stuff. +

+ + + + + + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.1 Notes files

+ + + + + + + + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.1.1 Getting around

+ +

Moving between notes entries and around the hierarchy is fairly common, + so there are some accelerators. +

+
+
C-c C-i
+

Jump to the index entry for the current entry’s subject +(notes-goto-index-entry). + +

+
+
C-c C-n
+
C-c C-p
+

Move to the next or prior note with the same subject +(notes-follow-next-link and notes-follow-prev-link). +These functions follow the links in the note, + if they’re defined. +If not, + they look through the index file. +This approach usually works, + but will fail if there are multiple new entries created + with the given subject + between when the index is recomputed. + + +

+
+
C-c<RTN>
+

Follow the link under the point +(notes-w3-follow-link), + a keyboard equivalent of <S-mouse-2>. + +

+
+
M-C-a
+
M-C-e
+

Jump to the beginning or end of the current note entry +(notes-beginning-of-defun and notes-end-of-defun). + + +

+
+
C-c C-k
+

Copies the pseudo-URL for the current note into the kill-ring +(current-url-as-kill). +To link two entries, go to the target, + grab its URL with C-c C-k, + go to where you want to make the link, + and yank the URL with C-y. + +

+
+
+ + +

Notes mode supports imenu, + if you have it bound to something + (I use (global-set-key [down-mouse-3] 'imenu)). + +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.1.2 Subject summary

+ +

It’s often helpful to look at all + entries for a given subject +C-c C-s + collects all entries with the subject of the current + entry in a new buffer + (notes-summarize-subject). + + +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.1.3 Encryption

+ + + + +

Notes occasionally contain private material. +While Unix has strong services for file protection + (compared to other, say, more wide-selling operating systems), + in many systems root passwords are shared, + while other systems are vulnerable to physical compromise. +In such systems, + properly used encryption is the best approach to security. +

+

Notes-mode encryption is based + Phill Zimmerman’s PGP (Pretty Good Privacy) +(see ‘http://www.mantis.co.uk/pgp/pgp.html’) + and either + with Rick Campbell’s + emacs interface, PAM (PGP Augmented Messaging) +(from ‘ftp://h.gp.cs.cmu.edu/usr/rfb/pam/’) + (note that as of January 1997, PAM is no longer at this ftp site + and appears to not be publicly available), + or LoPresti and Choi’s mailcrypt +(from ‘http://cag-www.lcs.mit.edu/mailcrypt/’). + + + + + +

+
+
C-c C-e
+

Encrypt the current note +(notes-encrypt-note). +By default this function encrypts the whole entry. +With a prefix argument, + only the part from the point to the end of the entry is encrypted. + +

+
+
C-c C-d
+

Decrypt the current note +(notes-decrypt-note). +

+
+ + +

By default notes-mode determines your public key by looking + up your user-full-name in your PGP keyring. +You can override this default by setting + notes-encryption-key-id + to the desired key-id. + +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.1.4 Useful conventions

+ + + + + +

There are a number of conventions which can make notes-mode + easier to use. +These conventions are a matter of personal taste, + of course. +Do what works for you. +

+

First, + I find it helpful to keep the date of each notes-file at the top + of the file. +This makes the file self-identifying + if the filename is lost. +

+

Second, + I find it useful to have the first entry of each file + have the same subject (perhaps “Today”). +This entry then links all notes together, + making it easy to go to yesterday and tomorrow. +I keep a to-do list on this entry, + bringing the list forward each day. + +

+

A third useful convention is to keep an + entry with the name based on the day of the week + in each file. +Analogous to “Today”, this entry links together + weeks. +

+

Notes-mode supports these conventions. +When you make a new notes-file in emacs, + notes-mode searches for the preceding file. +If it follows any of these conventions, + the new file is initialized appropriately. +Currently + the approach to do this process + (in the program ‘mknew’) + is fairly sensitive, + so it may not work in all cases. +In particular, + the date convention works only on + for English-language dates. +(If you use notes-mode with a non-English language, + let me know and I’ll work with you to fix this limitation.) +

+

If you find other helpful conventions, + please let me know. +Modifications to ‘mknew’ to implement + new conventions are also invited. +

+

If you don’t want to use these conventions, + or if you want to use different ones, + set the emacs variable notes-mode-initialization-program + to nil or the name of your initialization program. + +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.2 Notes indices

+ + +

Only two features of notes index mode haven’t yet been described. +First, + you can open any notes-file based on date + with notes-index-link, + normally bound to <o>. + +

+

Second, + you can get a subject-summary + with <C-c C-s> + (see section Subject summary). +The subject defaults to that of the current index line. + +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.3 Notes-mode configuration

+ + + + +

Several aspects of notes mode are particularly visible + to the user. +Because I’m not a fascist, + a user can change most of these. +

+

Preferences are specified in ‘~/.notesrc’. +This file lists things to change: +

+
 
# lines beginning with a hash are comments
+dir: ~/NOTES
+int_form: %Y%m
+
+ +

Currently, two things can be changed: +

+
+
dir
+

Specifies the root of the notes directory hierarchy + (see section The notes directories). +

+
+
int_form
+

Specifies the form of the intermediate directory. +A limited subset of strftime(3) + formatting is allowed. +

+
+ +

The subset of strftime(3) supported in int_form is: +

+
%Y
+

The four-digit year. +

+
+
%y
+

The two-digit year. +

+
+
%m
+

A two-digit numeric month. +

+
+
%d
+

A two-digit day. +

+
+ +

In addition to ‘.notesrc’, + there are a number of emacs-specific variables. +These variables are documented in the file + ‘notes-variables.el’. +

+ + + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

4. History

+ +

More about notes-mode than you wanted to know, +and some thanks. +

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

4.1 Notes-mode history

+ +

Briefly, + I started keeping notes on-line shortly after I got a portable computer + in January, 1994. +After a month-and-a-half of notes, I realized that + one does not live by grep alone, + so I started adding indexing facilities. +

+

In June of 1995 + some other Ficus-project members started + keeping and indexing on-line notes + using other home-grown systems. +After some discussion, + we generalized my notes-mode work and + they started using it. +

+

Over the next 18 months notes-mode grew. +Finally, in April, 1996 I wrote documentation, + guaranteeing that innovation on notes-mode will now cease + or the documentation will become out of date. +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

4.2 Credits

+ +

I (John Heidemann, <johnh@isi.edu>) + started, documented, and currently maintain notes-mode. +I take ultimate responsibility for the code, + especially for the ugly parts that I won’t let others change. +

+

Ashvin Goel + <ashvin@ficus.cs.ucla.edu> + has been a very enthusiastic notes-mode user and contributor. +He is responsible for at least + the ideas behind notes-summarize-subject +and the ideas and initial implementations of + some of the original generalization and modularity improvements, + notes-follow-next-link and notes-follow-prev-link, + notes-goto-index-entry, + programmed subject completion, + and + context-sensitive mouse-2 handling. +In addition, + he is an invaluable second opinion about + what and how things should be done + (even if I don’t always agree with him). +

+

Geoff Kuenning + <geoff@ficus.cs.ucla.edu> + has been another enthusiastic notes-mode user and victim. +He is responsible for + finding several bugs, + motivation for mouse-less operation, + comments about the documentation, + the day-of-week convention, + and an initial implementation and the idea of + multiple entries with the same subjects in a single notes-file. +

+

Ramesh Govindan <govindan@isi.edu> did the xemacs port. +

+

Since it’s release on Usenet in April 1996 several + other folks have contributed. +Thanks to + David Weisman <weisman@app1.osf.org>, + Martin L. Smith <martin@ner.com>, + Jason Bastek <jason@aai.com>, + Ulrich Herbst <Ulrich.Herbst@t-systems.com>. +See the next section (See section Changes.) for details of their exploits. +

+

Thanks to Larry Ayers <layers@marktwain.net> + for popularizing notes-mode with reviews in + the Linux Gazette + (at <http://www.linuxgazette.com/issue22/notes-mode.html> and + <http://www.linuxgazette.com/issue35/ayers.html>). +

+
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

4.3 Changes

+ +

For the bored: +

+

First semi-public release. 12-Jul-95: version 0.1 + Shared a version with Ashvin and Geoff. +

+

Changed 6-Dec-95: version 0.3 + Ashvin’s changes for note traversal added (C-c C-p and C-c C-n now +move to the prev/next note in note-mode). + URL parsing changed so that "localhost" is optional. +

+

Changed 19-Dec-95: version 0.4 + More robust prev/next code added, both to handle going back and +forward in the middle of chains through the index file, and to handle +back/forward in a single file. + URL parsing changed so that notes-goto-index-entry correctly handles +lookups on notes names such as "252A". +

+

Changed 20-Dec-95: version 0.5. + Fixed a missing variable in notes-url.el. + Added a work-around to a bug in emacs-19.30’s define-derived-mode. +

+

Changed 24-Dec-95: version 0.6. + Prev/next code re-re-written to be more robust. +

+

Changed 26-Dec-96: version 0.7. + Bug fix release. +

+

Changed 23-Jan-96: version 0.8. + Initialization code added to set up a new note. +New variable: notes-bin-dir. +

+

I’m skipping version 0.9 because I erroneously release version 0.1 +as version 0.9 (only on the web, not on Usenet). +

+

I’m bumping from version "0" to version "1" since the code is has been +in production use for more than a year by several people. Minor +numbers are the same. +

+

Changed 26-Mar-96: version 1.10. + Setup code completely re-written. + Several incompatible changes have been made: + - the lisp and Perl code must be installed via make install, +not by copying. + - some data is specified in a .notesrc file; copy and modify sample.notesrc. + - several internal elisp changes. + - catsubject added (bound to C-cC-s): collect all notes about the +current subject. + - new notes-files are initialized with fields based on the prior +day’s notes; see mknew for details. + - daily_work is gone; mkall is rewritten to use .notesrc. +

+

Changed 29-Apr-96: version 1.11. + Real documentation. + Mknew caching added. +

+

Changed 9-Aug-96: version 1.12. + Added notesinit to do all setup for new users. +

+

Changed 24-Aug-96: version 1.13. + Minor documentation fixes. +

+

Changed 20-Dec-97: version 1.14. +Autoconf support. +

+

Fontification of the index buffer is now pre-computed in perl +other than done when the file is needed (in elisp with slow regular +expressions). 2000-line index files are now 1-2 seconds rather than +15-30 on a 100MHz Pentium. If necessary (the +pre-computed version isn’t up-to-date) we fall back on the slower +code. +

+

Related work improved (suggestion by David Weisman <weisman@app1.osf.org>). +

+

Documentation improvement (problem found by Martin L. Smith +<martin@ner.com>). +

+

Installation improved (code by Jason Bastek <jason@aai.com>). +

+

Bug in notes-index mode with subjects containing colons fixed (johnh). +

+

Encryption now supports mailcrypt.el. +

+

Support for emacs 20 (a small font-lock change). +

+

Changed 5-Jan-98: version 1.15. +Bug in decryption for non-PAM users fixed + (suggestion by Kevin Davidson <tkld@quadstone.com>). +

+

Y2K statement added + (suggestion by Kevin Davidson <tkld@quadstone.com>). +

+

Pointer to mailcrypt added (as a supported encryption package). +Problem pointed out by K. Ueda <kueda@jupiter.qse.tohoku.ac.jp>. +

+

Changed 4-Nov-98: version 1.16. +Bug in kill-ring handling of notes-old-underline-line + fixed by Tim Potter <timp@jna.com.au>. +Bug in whitespace handling after PGP encryption fixed by Tim Potter. +Bugs in handling of entries with hash signs in their name fixed + (found by Tim Potter). +Fontification of index buffer further improved + (mapcar is your friend). +Xemacs support added based on code contributed by Ramesh Govindan. +

+

Changed 28-Feb-99: version 1.17: +Improvement: notes-electric-return now fixes up the prev/next links + of new entries (only). Code contributed by + Takashi Nishimoto. +

+

Bug fix: reversed options -batch and -q in configure.in to placate + XEmacs 20.0; changed notesinit to not downcase the pathname + (bugs found by Thierry Bezecourt). +

+

Clarification: Autofilling of new notes more clear in the manual (hopefully, + suggested by Solofo Ramangalahy). +

+

Bug fix: a y2k bug in was found and fixed in mkindex. Sigh. +

+

New: Two mailing lists for notes-mode have been created: +‘notes-mode-announce@heidemann.la.ca.us’ and +‘notes-mode-talk@heidemann.la.ca.us’. +Send the line “subscribe notes-mode-announce” +(or “subscribe notes-mode-talk”) +to ‘majordomo@heidemann.la.ca.us’ +to join them. +[These instructions are now superceeded; to subscribe, go to +‘http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-talk’ +and +‘http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-announce’.] +

+

Changed 6-Oct-99: version 1.18: +Bug fix: handling of electric-prevnext is better when there are + existing prev/next links. +

+

Clarification: I added some pointers in the code to the installation + instructions. (Apparently people can’t RTF README.) +

+

Extension: mailcrypt-3.5.x suported including pgp, pgp5 and gpg. +

+

Changed (date 23-Dec-00): version 1.19: +Bug fix (cosmetic): suppress comments in encrypted nodes. +

+

Install fixes from Kannan Varadhan: elisp directories changed on install. +

+

Added C-j as a synonym for RET in notes-mode to parallel C++ or perl mode. +(Suggested by Fred Jaggi ‘jaggi@rsn.hp.com’.) +

+

Outline-minor-mode support added and documented. +(Suggested by Tim Carroll ‘tim@boomboom.com’.) +

+

Bug/typo fixes in gpg support +(Contributed by William A. Perkins ‘wa_perkins@pnl.gov’, +with separate patches from Knut Anders Hatlen ‘kahatlen@online.no’.) +

+

Installation improvements suggested by Christophe Troestler +‘Ch.Troestler@linkline.be’: +use install-info to update the info dir, +warn users of –prefix that lisp files go elsewhere. +

+

Changed (date 1-Feb-01): version 1.20: +Bug fix: missing file notes-first.el added to the distribution. +(Bug found by Michael Totschnig ‘michaelt@supernet.ca’.) +

+

Changed ( 5-Dec-01): version 1.21: +(backed-out—didn’t work with spaced URLs) +URL lookup now uses thing-at-point. +

+

Fix to make notes-mode work with emacs-21.1 +(Fix from Klaus Zeitler ‘kzeitler@lucent.com’.) +

+

Changed ( 3-Jan-02): version 1.22: +Several bugs in ‘notesinit’ for stricter Perl implementations +(bug found by Paul Craven" ‘pcraven@yorku.ca’, +and Kasper van Wijk ‘kasper@acoustics.mines.edu’) +and to make it run cleanly more often. +

+

Notes-first now autoinitializes notes mode from emacs. +(As instisted by rms, unfortunately about two years later than requested.) +

+ +

Changed (20-Feb-05): version 1.23: +Outline mode is now forcebly turned on to avoid interactions +with user’s text-mode hooks +(bug and fix from Nils Ackermann ‘nils@nieback.de’). +

+

Install bug involving ordering of scripts and byte-compilation +fixed (bug and fix from Mark Allman ‘mallman@grc.nasa.gov’). +

+

Fix obscure bug in configure, reported by Klaus Zeitler ‘kzeitler@lucent.com’. +

+

Fix for notes-summarize-subject when no subject is specified (bug and fix +from Geoff Kuenning). +

+

Changed (14-Jan-06): version 1.24: +

+

install-info bug documented with the Debian install-info +(bug reported by Aaron Falk ‘falk@isi.edu’). +

+

Automatic date completion in new days is now done in the current +locale, so it should now work for non-English languages. Bug reported +by Torsten Bronger ‘bronger@physik.rwth-aachen.de’. +

+

Fixed a bug in mkindexcache, triggered by subjects with percent signs +in them. Bug reported by Philip Austin ‘paustin@eos.ubc.ca’. +

+

We’re a bit more robust about subjects, I hope. Warnings should +appear about embedded number signs, and leading spaces should be +filtered. Bug reported by Philip Austin ‘paustin@eos.ubc.ca’. +

+

Notes-mode now dervies from indented-text-mode rather than +paragraph-indent-text mode. Unfortunatley this is not customizable +because of limitations of define-derived-mode. Change suggested by +Aaron Falk ‘falk@isi.edu’. +

+

Provide better hints about how to get started after installation or +running notes-mode in emacs for the first time. +

+

In notes init, the default path for dir was the full path, not the tilde +version of the path. Now it defaults to using tidle for home +directory. Bug reported by Mark Allman ‘allman@icir.org’. +

+

Changed (26-May-06): version 1.25: +

+

fixed a bug in the release tar.gz file that had a additional copies +copy nested. +

+

Changed (30-Jun-08): version 1.26: +

+

Force unicode I/O in ‘mkindexcache’ to fix highlighting mis-alignment +when using emacs-21 with unicode subject lines. +

+

Changed mkprevnext and mkrawindex to optionally take the list of notes files +to index from stdin rather than from the command line. Yes, I finally +have 4093 notes files, overflowing the Unix command line buffer. +

+

Changes notes-mode.el to put path in quotes, allowing spaces to appear in home directory names (bug fix from Ulrich Herbst). +

+

Added a suggested features section. +

+

Changed ( 8-Aug-08): version 1.27: +

+

Change I/O in ‘mkindexcache’ to use locale (the sadly correct thing) +rather than forcing utf-8 (the Righteous Path). +Bug report from Geoff Kuenning, a man with an older Unix environment than I. +

+

Changed (20-Jun-10): version 1.28: +

+

Changed a regular expression in ‘notes-index-mode.el’ that was +causing emacs-v23 (a pre-release version) +to regular expression infinite recursion. +

+

Changed (2012-04-04): version 1.29 +

+

(2011-08-23) Changed run-hooks to run-mode-hooks. +Bug report from Geoff Kuenning. +

+

Changed some handling of PGP encryption to account for +some apparent API changes. +

+

(2012-04-04) Fixed encyrption to handle encrypting empty notes at the end +of buffers without going into an infinite loop. +Clearly wrong code, but you have to ask this guy for why he tried: +Bug report from Geoff Kuenning. +

+ + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

4.4 Suggested features

+ +

Features suggested by users but not yet implemented: +

+

21-Feb-08: (from Xavier Maillard): should support “disconnected” notes that +are indexed but not date-based. +

+

21-Feb-08: (from John Heidemann): should switch all notes files to have an extension (maybe ‘.notes’). +

+
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

5. Installation

+ +

To install notes-mode, +

+
    +
  1. +Unpack and extract the distribution +(gunzip notes-mode-xxx.tar.gz; tar xvf notes-mode-xxx.tar; cd notes-mode-xxx). + +
  2. +Run configure (./configure). + +
  3. +Type “make install”. +
+ +

(To control what’s installed where, use –prefix=/where, or +–with-lisp-dir=/where, –datadir=/where (for scripts), +and –infodir=/where.) +

+

For each user: +

    +
  1. +Run notesinit +
+ +

If you have problems with paths being incorrect, please be aware that +you cannot run notes directly out of where you untar it. The +installation process customizes the programs for where things are on +your system. +Make sure you move out of the directory where you untarred it +before running it. +

+ +

The most recent distribution of notes-mode + is always available via + ‘http://www.isi.edu/~johnh/SOFTWARE/NOTES_MODE/’. +

+ + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

Keystroke index

+ +

This index lists notes-mode keystrokes. +

+
Jump to:   C +   +M +   +O +   +R +   +S +   +T +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry Section

C
C-c C-d3.1.3 Encryption
C-c C-e3.1.3 Encryption
C-c C-i3.1.1 Getting around
C-c C-k3.1.1 Getting around
C-c C-n3.1.1 Getting around
C-c C-p3.1.1 Getting around
C-c C-s3.1.2 Subject summary
C-c C-s3.2 Notes indices
C-c<RTN>3.1.1 Getting around

M
M-C-a3.1.1 Getting around
M-C-e3.1.1 Getting around
mouse-22.3 The notes index

O
o3.2 Notes indices

R
RTN2.2 A notes file
RTN2.3 The notes index

S
S-mouse-22.2 A notes file

T
TAB2.2 A notes file

+
Jump to:   C +   +M +   +O +   +R +   +S +   +T +   +
+ + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

Concept index

+ +

This index lists notes-mode concepts. +

+
Jump to:   . +   +
+C +   +D +   +E +   +F +   +I +   +K +   +M +   +N +   +P +   +R +   +S +   +T +   +U +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry Section

.
.notesrc3.3 Notes-mode configuration

C
configuration3.3 Notes-mode configuration
conventions3.1.4 Useful conventions
Crontab2.3 The notes index

D
Decryption3.1.3 Encryption
Directory hierarchy2.4 The notes directories

E
Encryption3.1.3 Encryption

F
Font matter2.2 A notes file

I
imenu3.1.1 Getting around
Intermediate directories2.4 The notes directories

K
key-id3.1.3 Encryption

M
mailcrypt3.1.3 Encryption
mkall2.3 The notes index
mknew3.1.4 Useful conventions

N
Notes directories2.4 The notes directories
Notes entries2.2 A notes file
Notes file permissions2.4 The notes directories
Notes files2.2 A notes file
Notes files2.4 The notes directories
Notes files, font matter2.2 A notes file
Notes index2.3 The notes index
Notes links2.2 A notes file
Notes subjects2.2 A notes file
notes-mode-initialization-program3.1.4 Useful conventions
notesinit2.1 Getting started

P
PAM3.1.3 Encryption
PGP3.1.3 Encryption
PGP Augmented Messaging3.1.3 Encryption
Pretty good privacy3.1.3 Encryption
Pseudo-URLs2.2 A notes file

R
re-indexing2.3 The notes index
Root directory2.4 The notes directories

S
setup2.1 Getting started
Subject summary3.1.2 Subject summary

T
Today3.1.4 Useful conventions

U
URLs2.2 A notes file

+
Jump to:   . +   +
+C +   +D +   +E +   +F +   +I +   +K +   +M +   +N +   +P +   +R +   +S +   +T +   +U +   +
+ + + + +
+ + + + + + +
[Top][Contents][Index][ ? ]
+

Footnotes

+

(1)

+

Trademarked, in Great Britain, Sunone tells me. +

(2)

+

I consider myself pretty anal about this subject, +often typing notes in from paper after-the-fact, +and I certainly don’t manage to back-enter +my notes all time time. +

(3)

+ +

On the other hand, some folks at MIT are working +on this problem from both the hardware and the social side of +things (‘http://wearables.www.media.mit.edu/projects/wearables/’) +(Perhaps they have wild parties with computers, too.) +

(4)

+

My hat is off to Rosa Parks +and the many other normal people who triggered landmark cases. +

(5)

+

If you think I’m missing an alternative, please let me know. +


+ + + + + + +
[Top][Contents][Index][ ? ]
+

Table of Contents

+ +
+ + + + + + +
[Top][Contents][Index][ ? ]
+

About This Document

+

+ This document was generated by John Heidemann on April 4, 2012 using texi2html 1.82. +

+

+ The buttons in the navigation panels have the following meaning: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Button Name Go to From 1.2.3 go to
[ < ] BackPrevious section in reading order1.2.2
[ > ] ForwardNext section in reading order1.2.4
[ << ] FastBackBeginning of this chapter or previous chapter1
[ Up ] UpUp section1.2
[ >> ] FastForwardNext chapter2
[Top] TopCover (top) of document  
[Contents] ContentsTable of contents  
[Index] IndexIndex  
[ ? ] AboutAbout (help)  
+ +

+ where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure: +

+ +
    +
  • 1. Section One +
      +
    • 1.1 Subsection One-One +
        +
      • ...
      • +
      +
    • +
    • 1.2 Subsection One-Two +
        +
      • 1.2.1 Subsubsection One-Two-One
      • +
      • 1.2.2 Subsubsection One-Two-Two
      • +
      • 1.2.3 Subsubsection One-Two-Three     + <== Current Position
      • +
      • 1.2.4 Subsubsection One-Two-Four
      • +
      +
    • +
    • 1.3 Subsection One-Three +
        +
      • ...
      • +
      +
    • +
    • 1.4 Subsection One-Four
    • +
    +
  • +
+ +
+

+ + This document was generated by John Heidemann on April 4, 2012 using texi2html 1.82. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode/notes-mode.html b/packages/notes-mode/HTML/notes-mode/notes-mode.html new file mode 100644 index 000000000..09b626b02 --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode/notes-mode.html @@ -0,0 +1,152 @@ + + + + + +Notes-mode: Top + + + + + + + + + + + + + + + + + + + + +
[Top][Contents][Index][ ? ]
+

Notes-mode +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
[Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on August, 8 2008 using texi2html 1.78. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode/notes-mode_1.html b/packages/notes-mode/HTML/notes-mode/notes-mode_1.html new file mode 100644 index 000000000..dc5a59a9f --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode/notes-mode_1.html @@ -0,0 +1,533 @@ + + + + + +Notes-mode: 1. Introduction + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

1. Introduction

+ +

What is notes-mode and why should you (perhaps) use it? +

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

1.1 What is it?

+ +

Notes-mode is an indexing system for on-line note-taking. +Notes-mode is composed of two parts, the visible part, +a major-mode for emacs to aid note-taking; +and the invisible part, +scripts which periodically index your notes for you. +

+

Note that notes-mode provides tools to index your notes, +not to search them. +(Other existing tools such as ‘grep’, ‘agrep’, and ‘glimpse’ +already allow file search.) +

+

A digression about indexing vs. searching: +Indexing in this sense means +organize them according to categories you give, +while searching looks through all text for arbitrary strings. +Drawing on the World Wide Web for examples, +Yahoo (‘http://www.yahoo.com/’) is an index, +while Alta Vista (‘http://www.altavista.digital.com/’) +is a search-engine. +In (potentially) more familiar terms, +the yellow pages +(1) +are an index, +while directory information (411 in the USA) +is sort of a search-engine. +

+ +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

1.2 Why keep notes at all?

+ +

So why should you use notes-mode? +Well, first, consider why you should (perhaps) +keep your notes on line. +First, +I assume that you take notes as part of your work or school. +If you don't, +you can stop reading now and go back to watching TV. +

+

If you keep notes, ask yourself why you keep them. +Reasons vary for different people, but some include: +

+
    +
  • +To remember what is said or done. + +
  • +To focus on what is important about what is said. + +
  • +To provide proof of having done something +at a particular time or date. + +
  • +I know there were other reasons here, +but they slipped my mind. +
+ + +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

1.3 Why keep notes on-line?

+ +

OK, I've talked you into keeping notes. +Why do it on-line? +Again, there are different reasons for different people. +If you don't want to consider keeping your notes on-line, +you're welcome to go back to your (clay tablets) +paper notes. +

+

However, if you do much of your work on-line, +or if you have portable computer, +then you might want to consider keeping your notes on-line. +

+
    +
  • +It's faster to type than write, +and possibly more legible at high speed. + +
  • +Often information is already on-line. +For example, in software development, bug reports, +measurement results, and everything else that's useful +is on-line. + +
  • +You can take down more detail than you otherwise would +(especially if the data is already on-line). +Taking more copious notes can be helpful when you go back +to figure out why that strange thing was happening. + +
  • +On-line notes are easy to search. +Full-text search with +grep, agrep, and glimpse are all much faster +and are often more accurate than paging through paper notes +looking for a particular keyword. + +
  • +On-line notes are easy to index. +(At least with notes-mode!) +In addition to full-text search, +it's helpful to organize notes by category. +If you keep a table-of-contents of your paper notes, +you are either extremely fastidious +or a librarian (Nadia?). + +
  • +You can keep all of your notes with you at all times +(if you have a portable computer). +Even at a page a day, +paper notes quickly become bulky and awkward to carry around. +On-line notes fit on your computer's hard disk, +an extraordinarily compact medium +by comparison. + +
  • +Your notes can be automatically backed up. +Paper notes can become damaged with time, +and as a graduate student +one of my fears was fire in Boelter Hall +consuming all my research experiments +and and therefore hopes of a degree. +Electronic notes are extremely easy to duplicate +and can be automatically backed up with the rest of your computer. +(You do back up your computer, don't you?) + +
+ +

While these advantages are undoubtedly clear to any +right-thinking computer user, +it should be said that there are a few disadvantages +for on-line note-taking. +

+
    +
  • +If you don't have a computer with you most of the time, +it's difficult take notes on-line (because you're off-line, of course). +(2) + +
  • +Computers require power. +If your portable computer runs out of juice, +you're on your own. +Corollary: watch your power, or bring paper. +Better corollary: watch your power, and bring paper. + +
  • +Social limitations. +It's not always socially acceptable to take notes-on-line. +For example, +at a party, +few people would use a computer +to take down the phone number of a person +to whom they're attracted +(at least, if they wanted the attraction to be mutual). +(3) +Sometimes other people find the sound of typing distracting. + +
  • +Health issues. +Repetitive stress injuries do occur +writing (slower) by hand is at least +an alternate motion than typing. + +
  • +Legal limitations. +If you want to use your electronic notes +to justify a patent or invention, +you may be breaking legal ground. +Being on the legal cutting-edge is rarely an easy thing +for the person involved.(4) + +
+ + +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

1.4 Why use notes-mode?

+ +

OK, I've sold you on note-taking and even on on-line note-taking. +What about notes-mode? +Naturally, +it slices, dices, and makes julienne fries. +But wait, there's more: +

+
    +
  • +It automates indexing your notes, +linking notes with the same subject together. + +
  • +It supports embedded links, +allowing you to manually link together different topics +and external files. + +
  • +It includes a number of convenience-features in emacs. +Subjects can be completed based on existing subjects. +The usual emacs customization mechanisms are available. + +
  • +Notes containing sensitive information can be encrypted. + +
  • +Notes-mode seems better than the other, currently available alternatives. +
+ +

What are the alternatives? I'm glad you asked. +(5) +

+
    +
  • +HTML. +HTML has better formatting capabilities than notes-mode, +and it has excellent linking capabilities. +Unfortunately, +HTML's tags are fairly intrusive + (each is at least four characters long and most come with a pair), + tags can get confused with normal text, + errors in HTML can be bad (obscuring data), + and there's no automatic indexing feature + (at least with plain HTML). +Besides, + all data should be kept as close to the ASCII from whence it came, + as God Intended (hi, Steve). + +
  • +Word Processors. +Word processors are strong in the formatting department, + but most don't really have linking capabilities, + and have poor or restricted indexing. + +
+ +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

1.5 Y2K Statement

+ +

Notes mode uses dates extensively, + both two-digit years and seconds-since-1970. +However, notes-mode has been coded to function correctly through + the year 2038. +

+

To avoid problems with the year 2000, notes-mode assumes + that any two-digit years before “70” are 20xx, not 19xx. +Notes-mode should therefore work correctly in both the year 1999 and 2000. +

+

(Notes-mode 1.17 released February 1999 fixes a lingering Y2K problem.) +

+

Because notes-mode uses seconds-since-1970 for some date calculations + it will fail beyond the year 2038 on computers with 32-bit integers. +

+

If I'm still using notes-mode then on a 32-bit machine I'll see what I can do. +

+ +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

1.6 Related work

+ +

What would a document be without related work? +

+

Notes-mode is not related in any way to Lotus Notes. +

+

I am told (by David Weisman) + that it's something like the now defunct Lotus Agenda. +

+

Ashvin Goel, one of the contributors to notes-mode, + has gone off and done a from-scratch reimplementation + called records-mode. +It's very similar to notes mode, + and emphasizes on-the-fly updates to entry links + but lacks a manual. +You may want to check it out at + ‘http://www.cse.ogi.edu/~ashvin/software.html’. +

+

Hyperbole (by Bob Weiner) offers better linking facilities +than notes-mode, but it has a bunch of stuff notes-mode doesn't need +and it's missing notes-specific indexing provided by notes-mode. +For people already using Hyperbole + it would be interesting to replace notes-mode's linking + with Hyperbole's. +Contributions in this area are welcome, provided they make Hyperbole + optional. +

+
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

1.7 Staying on top

+ +

The most recent distribution of notes-mode + is always available via + ‘http://www.isi.edu/~johnh/SOFTWARE/NOTES_MODE/’. +

+

After you've installed notes mode you're encouraged to subscribe +to the mailing lists. +To subscribe, go to the web page +Send the message "subscribe" to +‘http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-announce’ or +‘http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-talk’. +

+

The announce list will contain only release announcements +and so is guaranteed to be very low bandwidth. +

+ + +
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on August, 8 2008 using texi2html 1.78. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode/notes-mode_2.html b/packages/notes-mode/HTML/notes-mode/notes-mode_2.html new file mode 100644 index 000000000..61a3bf997 --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode/notes-mode_2.html @@ -0,0 +1,413 @@ + + + + + +Notes-mode: 2. Basics + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

2. Basics

+ +

All you need to use notes-mode + in a chapter. +(Except for installation, See section Installation.) +

+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

2.1 Getting started

+ +

To get started with notes-mode, + read the introduction this chapter, + then either: +

+
    +
  • +Start emacs, do + M-x load-library RET notes-mode RET +This approach will set up notes-mode with the default parameters. + +
  • +OR, from the shell, + run the program ‘notesinit’. +This approach will ask you some questions about how you want to configure + notes mode. + +
+ +

Either way these should set up everything notes-mode needs. +This program will modify your environment (as described in this section), + or it will give you the exact commands you should run yourself. +

+

After you've done one of these, + start up emacs and note-away. +I usually begin a + day of note-taking by running the command + M-x notes-index-todays-link + to jump directly to today's note. +You may even wish to bind this to something, + perhaps with + (define-key global-map "\C-cn" 'notes-index-todays-link) + in your ‘.emacs’. +

+

If you want to browse your existing notes, + you might instead want to edit the + ‘~/NOTES/index’. +(What is a notes file and the index? Hurry up and finish + reading this chapter.) +

+ +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

2.2 A notes file

+ + +

The notes file is the focus of most of the activity in notes-mode, + it's where you take your notes. +Notes files are mostly free-form text + broken up into entries. +Here's an example: +

+ + +
 
8-Jun-95 Thursday
+-----------------
+
+* Today
+-------
+prev: <none>
+next: <file:///~/NOTES/199506/950609#* Today>
+
+next week - release notes-mode
+
+
+* Environment/notes
+-------------------
+
+I explained notes mode to Ashvin and Geoff.
+...
+
+ +

Each entry has a subject-block, (maybe) some links, and then (maybe) some text. +

+

The subject-block must begin with an asterisk-space (* ) + at the beginning of a line, followed by the subject itself. +Subjects must be underlined with a row of dashes + (if they're not exact, that's OK; + notes-mode will fix them periodically). +For convenience, + notes-mode will automatically add the underlines when you + hit <RTN> (notes-electric-return), + and <TAB> on a partially completed subject will + invoke completion based on indexed subjects (notes-complete-subject). + + + +

+

Following the subject may be links. +(In the example, the “Today” entry has links, + the “Environment/notes” entry doesn't.) +These links will be automatically updated by notes-mode + when your notes are re-indexed; + just leave a blank line when writing the note. + +

+

Links are made with pseudo-URLs, + sort of like those in the World Wide Web. +Any of these URLs can be followed in notes-mode files + by clicking S-mouse-2 on the pseudo-URL + (notes-w3-follow-link-mouse). + + + +

+

Finally comes the text. +Go wild, but just don't include text that looks like a subject. +You can embed pseudo-URLs to link notes together manually. +

+

The more anal of you may have noticed + that the lines before the first subject + are not part of any entry. +These lines are + front matter. +They're not usually used for much, + but they can be a good place to label the file. + + +

+

There are a number of useful conventions + that can be adopted to organize your notes. +The most common is the “Today” entry. +If you keep an entry with the same subject + at the beginning of each file, + you link all of your notes together. +Notes-mode will help you out with some of these convetions + by automatically creating or copying some fields for you; + see see section Useful conventions for details. +

+

Finally, notes-mode can also work with outline-minor-mode + (thanks to Tim Carroll for pointing this out). +Outline-mode supports hiding and revealing text and other helpful + features beyond the scope of this document. +See Outline Mode: (emacs)Outline Mode section `Outline Mode' in The Emacs Editor, for details. +

+
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

2.3 The notes index

+ + +

The notes index lists all subjects you've kept notes about, + and each date of each note. +Impress your friends, + show your advisor why you're worth the big peanuts, + you'll soon have the biggest index of all. +

+

The index has one line per subject, listing the subject + and each day a note was made about that subject. +For example: +

+
 
Bicycle: 950314, 950316
+Bicycle/maintenance/books: 951028
+Bridge/hands: 951113, 951114, 951116, 951117
+Bridge/UCLA: 960222, 960409
+
+ +

Clicking on any of the dates with mouse-2 + will take you to that note + (notes-index-mouse-follow-link). +(You can also move the point over the date and hit <RTN> + if you're musaphobic [notes-index-follow-link].) + + +

+

The notes index is automatically updated by the program ‘mkall’. +Typically ‘mkall’ is run nightly by ‘cron’. +On most modern versions of Unix, you can add this command to cron by + running ‘crontab -e’ and adding the line: +

+
 
0 4 * * * /usr/local/lib/notes-mode/mkall
+
+ + + + +

(Assuming that your notes programs are installed + in /usr/local/lib/notes-mode, the default location.) +

+ +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

2.4 The notes directories

+ + +

The final thing needed to tie basic notes-mode together his how +the pieces fit together. +Since my graduate work is in file systems, +you can bet that directories are involved. +

+

Notes-mode keeps its files in a two-level hierarchy: +

+
 
~/NOTES
+~/NOTES/index
+~/NOTES/rawindex
+~/NOTES/199603
+~/NOTES/199603/960329
+~/NOTES/199603/960330
+~/NOTES/199604
+~/NOTES/199604/960401
+
+ +

The top level, ‘~/NOTES’, is the notes directory. +It keeps all notes in one place. +(The name of this directory is configurable, See section Notes-mode configuration.) +

+

Inside the notes directory are two files and a number of directories. +The files are ‘index’, + the index of all entries (see section The notes index), + and ‘rawindex’, + used internally. + +

+

The notes directory also contains a number of subdirectories, + sometimes called intermediate directories. +These directories group the actual notes files into manageable chunks, + keeping any directory from getting too large. +Intermediate directories are named + by the four-digit year and the two-digit month + of the entries they contain. +(The format of intermediate directories + is configurable, See section Notes-mode configuration.) + +

+

Finally, + each intermediate directory are the notes files themselves, + named according to the two-digit year, month, and day-of-month. + +

+

For the most part, + notes-mode will automatically maintain this organization of files, + once you create the top-level directory. +Notes-mode will also automatically insure + that all files in the notes directory are unreadable by + anyone other than their owner. +Notes are personal things. +(This behavior is not currently configurable, + but it probably should be.) + +

+ + +
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on August, 8 2008 using texi2html 1.78. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode/notes-mode_3.html b/packages/notes-mode/HTML/notes-mode/notes-mode_3.html new file mode 100644 index 000000000..fef21b8b5 --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode/notes-mode_3.html @@ -0,0 +1,505 @@ + + + + + +Notes-mode: 3. Advanced Features + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

3. Advanced Features

+ +

Notes-mode, the minutiae, and some other good stuff. +

+ + + + + + +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

3.1 Notes files

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

3.1.1 Getting around

+ +

Moving between notes entries and around the hierarchy is fairly common, + so there are some accelerators. +

+
+
C-c C-i
+

Jump to the index entry for the current entry's subject +(notes-goto-index-entry). + +

+
+
C-c C-n
+
C-c C-p
+

Move to the next or prior note with the same subject +(notes-follow-next-link and notes-follow-prev-link). +These functions follow the links in the note, + if they're defined. +If not, + they look through the index file. +This approach usually works, + but will fail if there are multiple new entries created + with the given subject + between when the index is recomputed. + + +

+
+
C-c<RTN>
+

Follow the link under the point +(notes-w3-follow-link), + a keyboard equivalent of <S-mouse-2>. + +

+
+
M-C-a
+
M-C-e
+

Jump to the beginning or end of the current note entry +(notes-beginning-of-defun and notes-end-of-defun). + + +

+
+
C-c C-k
+

Copies the pseudo-URL for the current note into the kill-ring +(current-url-as-kill). +To link two entries, go to the target, + grab its URL with C-c C-k, + go to where you want to make the link, + and yank the URL with C-y. + +

+
+
+ + +

Notes mode supports imenu, + if you have it bound to something + (I use (global-set-key [down-mouse-3] 'imenu)). + +

+ +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

3.1.2 Subject summary

+ +

It's often helpful to look at all + entries for a given subject +C-c C-s + collects all entries with the subject of the current + entry in a new buffer + (notes-summarize-subject). + + +

+ +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

3.1.3 Encryption

+ + +

Notes occasionally contain private material. +While Unix has strong services for file protection + (compared to other, say, more wide-selling operating systems), + in many systems root passwords are shared, + while other systems are vulnerable to physical compromise. +In such systems, + properly used encryption is the best approach to security. +

+

Notes-mode encryption is based + Phill Zimmerman's PGP (Pretty Good Privacy) +(see ‘http://www.mantis.co.uk/pgp/pgp.html’) + and either + with Rick Campbell's + emacs interface, PAM (PGP Augmented Messaging) +(from ‘ftp://h.gp.cs.cmu.edu/usr/rfb/pam/’) + (note that as of January 1997, PAM is no longer at this ftp site + and appears to not be publicly available), + or LoPresti and Choi's mailcrypt +(from ‘http://cag-www.lcs.mit.edu/mailcrypt/’). + + + + + +

+
+
C-c C-e
+

Encrypt the current note +(notes-encrypt-note). +By default this function encrypts the whole entry. +With a prefix argument, + only the part from the point to the end of the entry is encrypted. + +

+
+
C-c C-d
+

Decrypt the current note +(notes-decrypt-note). +

+
+ + +

By default notes-mode determines your public key by looking + up your user-full-name in your PGP keyring. +You can override this default by setting + notes-encryption-key-id + to the desired key-id. + +

+ +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

3.1.4 Useful conventions

+ + + +

There are a number of conventions which can make notes-mode + easier to use. +These conventions are a matter of personal taste, + of course. +Do what works for you. +

+

First, + I find it helpful to keep the date of each notes-file at the top + of the file. +This makes the file self-identifying + if the filename is lost. +

+

Second, + I find it useful to have the first entry of each file + have the same subject (perhaps “Today”). +This entry then links all notes together, + making it easy to go to yesterday and tomorrow. +I keep a to-do list on this entry, + bringing the list forward each day. + +

+

A third useful convention is to keep an + entry with the name based on the day of the week + in each file. +Analogous to “Today”, this entry links together + weeks. +

+

Notes-mode supports these conventions. +When you make a new notes-file in emacs, + notes-mode searches for the preceding file. +If it follows any of these conventions, + the new file is initialized appropriately. +Currently + the approach to do this process + (in the program ‘mknew’) + is fairly sensitive, + so it may not work in all cases. +In particular, + the date convention works only on + for English-language dates. +(If you use notes-mode with a non-English language, + let me know and I'll work with you to fix this limitation.) +

+

If you find other helpful conventions, + please let me know. +Modifications to ‘mknew’ to implement + new conventions are also invited. +

+

If you don't want to use these conventions, + or if you want to use different ones, + set the emacs variable notes-mode-initialization-program + to nil or the name of your initialization program. + +

+ +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

3.2 Notes indices

+ + +

Only two features of notes index mode haven't yet been described. +First, + you can open any notes-file based on date + with notes-index-link, + normally bound to <o>. + +

+

Second, + you can get a subject-summary + with <C-c C-s> + (see section Subject summary). +The subject defaults to that of the current index line. + +

+ +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

3.3 Notes-mode configuration

+ + +

Several aspects of notes mode are particularly visible + to the user. +Because I'm not a fascist, + a user can change most of these. +

+

Preferences are specified in ‘~/.notesrc’. +This file lists things to change: +

+
 
# lines beginning with a hash are comments
+dir: ~/NOTES
+int_form: %Y%m
+
+ +

Currently, two things can be changed: +

+
+
dir
+

Specifies the root of the notes directory hierarchy + (see section The notes directories). +

+
+
int_form
+

Specifies the form of the intermediate directory. +A limited subset of strftime(3) + formatting is allowed. +

+
+ +

The subset of strftime(3) supported in int_form is: +

+
%Y
+

The four-digit year. +

+
+
%y
+

The two-digit year. +

+
+
%m
+

A two-digit numeric month. +

+
+
%d
+

A two-digit day. +

+
+ +

In addition to ‘.notesrc’, + there are a number of emacs-specific variables. +These variables are documented in the file + ‘notes-variables.el’. +

+ + + +
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on August, 8 2008 using texi2html 1.78. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode/notes-mode_4.html b/packages/notes-mode/HTML/notes-mode/notes-mode_4.html new file mode 100644 index 000000000..65b36866c --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode/notes-mode_4.html @@ -0,0 +1,511 @@ + + + + + +Notes-mode: 4. History + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

4. History

+ +

More about notes-mode than you wanted to know, +and some thanks. +

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

4.1 Notes-mode history

+ +

Briefly, + I started keeping notes on-line shortly after I got a portable computer + in January, 1994. +After a month-and-a-half of notes, I realized that + one does not live by grep alone, + so I started adding indexing facilities. +

+

In June of 1995 + some other Ficus-project members started + keeping and indexing on-line notes + using other home-grown systems. +After some discussion, + we generalized my notes-mode work and + they started using it. +

+

Over the next 18 months notes-mode grew. +Finally, in April, 1996 I wrote documentation, + guaranteeing that innovation on notes-mode will now cease + or the documentation will become out of date. +

+ +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

4.2 Credits

+ +

I (John Heidemann, <johnh@isi.edu>) + started, documented, and currently maintain notes-mode. +I take ultimate responsibility for the code, + especially for the ugly parts that I won't let others change. +

+

Ashvin Goel + <ashvin@ficus.cs.ucla.edu> + has been a very enthusiastic notes-mode user and contributor. +He is responsible for at least + the ideas behind notes-summarize-subject +and the ideas and initial implementations of + some of the original generalization and modularity improvements, + notes-follow-next-link and notes-follow-prev-link, + notes-goto-index-entry, + programmed subject completion, + and + context-sensitive mouse-2 handling. +In addition, + he is an invaluable second opinion about + what and how things should be done + (even if I don't always agree with him). +

+

Geoff Kuenning + <geoff@ficus.cs.ucla.edu> + has been another enthusiastic notes-mode user and victim. +He is responsible for + finding several bugs, + motivation for mouse-less operation, + comments about the documentation, + the day-of-week convention, + and an initial implementation and the idea of + multiple entries with the same subjects in a single notes-file. +

+

Ramesh Govindan <govindan@isi.edu> did the xemacs port. +

+

Since it's release on Usenet in April 1996 several + other folks have contributed. +Thanks to + David Weisman <weisman@app1.osf.org>, + Martin L. Smith <martin@ner.com>, + Jason Bastek <jason@aai.com>, + Ulrich Herbst <Ulrich.Herbst@t-systems.com>. +See the next section (See section Changes.) for details of their exploits. +

+

Thanks to Larry Ayers <layers@marktwain.net> + for popularizing notes-mode with reviews in + the Linux Gazette + (at <http://www.linuxgazette.com/issue22/notes-mode.html> and + <http://www.linuxgazette.com/issue35/ayers.html>). +

+
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

4.3 Changes

+ +

For the bored: +

+

First semi-public release. 12-Jul-95: version 0.1 + Shared a version with Ashvin and Geoff. +

+

Changed 6-Dec-95: version 0.3 + Ashvin's changes for note traversal added (C-c C-p and C-c C-n now +move to the prev/next note in note-mode). + URL parsing changed so that "localhost" is optional. +

+

Changed 19-Dec-95: version 0.4 + More robust prev/next code added, both to handle going back and +forward in the middle of chains through the index file, and to handle +back/forward in a single file. + URL parsing changed so that notes-goto-index-entry correctly handles +lookups on notes names such as "252A". +

+

Changed 20-Dec-95: version 0.5. + Fixed a missing variable in notes-url.el. + Added a work-around to a bug in emacs-19.30's define-derived-mode. +

+

Changed 24-Dec-95: version 0.6. + Prev/next code re-re-written to be more robust. +

+

Changed 26-Dec-96: version 0.7. + Bug fix release. +

+

Changed 23-Jan-96: version 0.8. + Initialization code added to set up a new note. +New variable: notes-bin-dir. +

+

I'm skipping version 0.9 because I erroneously release version 0.1 +as version 0.9 (only on the web, not on Usenet). +

+

I'm bumping from version "0" to version "1" since the code is has been +in production use for more than a year by several people. Minor +numbers are the same. +

+

Changed 26-Mar-96: version 1.10. + Setup code completely re-written. + Several incompatible changes have been made: + - the lisp and Perl code must be installed via make install, +not by copying. + - some data is specified in a .notesrc file; copy and modify sample.notesrc. + - several internal elisp changes. + - catsubject added (bound to C-cC-s): collect all notes about the +current subject. + - new notes-files are initialized with fields based on the prior +day's notes; see mknew for details. + - daily_work is gone; mkall is rewritten to use .notesrc. +

+

Changed 29-Apr-96: version 1.11. + Real documentation. + Mknew caching added. +

+

Changed 9-Aug-96: version 1.12. + Added notesinit to do all setup for new users. +

+

Changed 24-Aug-96: version 1.13. + Minor documentation fixes. +

+

Changed 20-Dec-97: version 1.14. +Autoconf support. +

+

Fontification of the index buffer is now pre-computed in perl +other than done when the file is needed (in elisp with slow regular +expressions). 2000-line index files are now 1-2 seconds rather than +15-30 on a 100MHz Pentium. If necessary (the +pre-computed version isn't up-to-date) we fall back on the slower +code. +

+

Related work improved (suggestion by David Weisman <weisman@app1.osf.org>). +

+

Documentation improvement (problem found by Martin L. Smith +<martin@ner.com>). +

+

Installation improved (code by Jason Bastek <jason@aai.com>). +

+

Bug in notes-index mode with subjects containing colons fixed (johnh). +

+

Encryption now supports mailcrypt.el. +

+

Support for emacs 20 (a small font-lock change). +

+

Changed 5-Jan-98: version 1.15. +Bug in decryption for non-PAM users fixed + (suggestion by Kevin Davidson <tkld@quadstone.com>). +

+

Y2K statement added + (suggestion by Kevin Davidson <tkld@quadstone.com>). +

+

Pointer to mailcrypt added (as a supported encryption package). +Problem pointed out by K. Ueda <kueda@jupiter.qse.tohoku.ac.jp>. +

+

Changed 4-Nov-98: version 1.16. +Bug in kill-ring handling of notes-old-underline-line + fixed by Tim Potter <timp@jna.com.au>. +Bug in whitespace handling after PGP encryption fixed by Tim Potter. +Bugs in handling of entries with hash signs in their name fixed + (found by Tim Potter). +Fontification of index buffer further improved + (mapcar is your friend). +Xemacs support added based on code contributed by Ramesh Govindan. +

+

Changed 28-Feb-99: version 1.17: +Improvement: notes-electric-return now fixes up the prev/next links + of new entries (only). Code contributed by + Takashi Nishimoto. +

+

Bug fix: reversed options -batch and -q in configure.in to placate + XEmacs 20.0; changed notesinit to not downcase the pathname + (bugs found by Thierry Bezecourt). +

+

Clarification: Autofilling of new notes more clear in the manual (hopefully, + suggested by Solofo Ramangalahy). +

+

Bug fix: a y2k bug in was found and fixed in mkindex. Sigh. +

+

New: Two mailing lists for notes-mode have been created: +‘notes-mode-announce@heidemann.la.ca.us’ and +‘notes-mode-talk@heidemann.la.ca.us’. +Send the line “subscribe notes-mode-announce” +(or “subscribe notes-mode-talk”) +to ‘majordomo@heidemann.la.ca.us’ +to join them. +[These instructions are now superceeded; to subscribe, go to +‘http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-talk’ +and +‘http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-announce’.] +

+

Changed 6-Oct-99: version 1.18: +Bug fix: handling of electric-prevnext is better when there are + existing prev/next links. +

+

Clarification: I added some pointers in the code to the installation + instructions. (Apparently people can't RTF README.) +

+

Extension: mailcrypt-3.5.x suported including pgp, pgp5 and gpg. +

+

Changed (date 23-Dec-00): version 1.19: +Bug fix (cosmetic): suppress comments in encrypted nodes. +

+

Install fixes from Kannan Varadhan: elisp directories changed on install. +

+

Added C-j as a synonym for RET in notes-mode to parallel C++ or perl mode. +(Suggested by Fred Jaggi ‘jaggi@rsn.hp.com’.) +

+

Outline-minor-mode support added and documented. +(Suggested by Tim Carroll ‘tim@boomboom.com’.) +

+

Bug/typo fixes in gpg support +(Contributed by William A. Perkins ‘wa_perkins@pnl.gov’, +with separate patches from Knut Anders Hatlen ‘kahatlen@online.no’.) +

+

Installation improvements suggested by Christophe Troestler +‘Ch.Troestler@linkline.be’: +use install-info to update the info dir, +warn users of –prefix that lisp files go elsewhere. +

+

Changed (date 1-Feb-01): version 1.20: +Bug fix: missing file notes-first.el added to the distribution. +(Bug found by Michael Totschnig ‘michaelt@supernet.ca’.) +

+

Changed ( 5-Dec-01): version 1.21: +(backed-out—didn't work with spaced URLs) +URL lookup now uses thing-at-point. +

+

Fix to make notes-mode work with emacs-21.1 +(Fix from Klaus Zeitler ‘kzeitler@lucent.com’.) +

+

Changed ( 3-Jan-02): version 1.22: +Several bugs in ‘notesinit’ for stricter Perl implementations +(bug found by Paul Craven" ‘pcraven@yorku.ca’, +and Kasper van Wijk ‘kasper@acoustics.mines.edu’) +and to make it run cleanly more often. +

+

Notes-first now autoinitializes notes mode from emacs. +(As instisted by rms, unfortunately about two years later than requested.) +

+ +

Changed (20-Feb-05): version 1.23: +Outline mode is now forcebly turned on to avoid interactions +with user's text-mode hooks +(bug and fix from Nils Ackermann ‘nils@nieback.de’). +

+

Install bug involving ordering of scripts and byte-compilation +fixed (bug and fix from Mark Allman ‘mallman@grc.nasa.gov’). +

+

Fix obscure bug in configure, reported by Klaus Zeitler ‘kzeitler@lucent.com’. +

+

Fix for notes-summarize-subject when no subject is specified (bug and fix +from Geoff Kuenning). +

+

Changed (14-Jan-06): version 1.24: +

+

install-info bug documented with the Debian install-info +(bug reported by Aaron Falk ‘falk@isi.edu’). +

+

Automatic date completion in new days is now done in the current +locale, so it should now work for non-English languages. Bug reported +by Torsten Bronger ‘bronger@physik.rwth-aachen.de’. +

+

Fixed a bug in mkindexcache, triggered by subjects with percent signs +in them. Bug reported by Philip Austin ‘paustin@eos.ubc.ca’. +

+

We're a bit more robust about subjects, I hope. Warnings should +appear about embedded number signs, and leading spaces should be +filtered. Bug reported by Philip Austin ‘paustin@eos.ubc.ca’. +

+

Notes-mode now dervies from indented-text-mode rather than +paragraph-indent-text mode. Unfortunatley this is not customizable +because of limitations of define-derived-mode. Change suggested by +Aaron Falk ‘falk@isi.edu’. +

+

Provide better hints about how to get started after installation or +running notes-mode in emacs for the first time. +

+

In notes init, the default path for dir was the full path, not the tilde +version of the path. Now it defaults to using tidle for home +directory. Bug reported by Mark Allman ‘allman@icir.org’. +

+

Changed (26-May-06): version 1.25: +

+

fixed a bug in the release tar.gz file that had a additional copies +copy nested. +

+

Changed (30-Jun-08): version 1.26: +

+

Force unicode I/O in ‘mkindexcache’ to fix highlighting mis-alignment +when using emacs-21 with unicode subject lines. +

+

Changed mkprevnext and mkrawindex to optionally take the list of notes files +to index from stdin rather than from the command line. Yes, I finally +have 4093 notes files, overflowing the Unix command line buffer. +

+

Changes notes-mode.el to put path in quotes, allowing spaces to appear in home directory names (bug fix from Ulrich Herbst). +

+

Added a suggested features section. +

+

Changed ( 8-Aug-08): version 1.27: +

+

Change I/O in ‘mkindexcache’ to use locale (the sadly correct thing) +rather than forcing utf-8 (the Righteous Path). +Bug report from Geoff Kuenning, a man with an older Unix environment than I. +

+ +
+ + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

4.4 Suggested features

+ +

Features suggested by users but not yet implemented: +

+

21-Feb-08: (from Xavier Maillard): should support “disconnected” notes that +are indexed but not date-based. +

+

21-Feb-08: (from John Heidemann): should switch all notes files to have an extension (maybe ‘.notes’). +

+ +
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on August, 8 2008 using texi2html 1.78. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode/notes-mode_5.html b/packages/notes-mode/HTML/notes-mode/notes-mode_5.html new file mode 100644 index 000000000..7bb3c6be5 --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode/notes-mode_5.html @@ -0,0 +1,124 @@ + + + + + +Notes-mode: 5. Installation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

5. Installation

+ +

To install notes-mode, +

+
    +
  1. +Unpack and extract the distribution +(gunzip notes-mode-xxx.tar.gz; tar xvf notes-mode-xxx.tar; cd notes-mode-xxx). + +
  2. +Run configure (./configure). + +
  3. +Type “make install”. +
+ +

(To control what's installed where, use –prefix=/where, or +–with-lisp-dir=/where, –datadir=/where (for scripts), +and –infodir=/where.) +

+

For each user: +

    +
  1. +Run notesinit +
+ +

If you have problems with paths being incorrect, please be aware that +you cannot run notes directly out of where you untar it. The +installation process customizes the programs for where things are on +your system. +Make sure you move out of the directory where you untarred it +before running it. +

+ +

The most recent distribution of notes-mode + is always available via + ‘http://www.isi.edu/~johnh/SOFTWARE/NOTES_MODE/’. +

+ + +
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on August, 8 2008 using texi2html 1.78. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode/notes-mode_6.html b/packages/notes-mode/HTML/notes-mode/notes-mode_6.html new file mode 100644 index 000000000..34ee2aaca --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode/notes-mode_6.html @@ -0,0 +1,149 @@ + + + + + +Notes-mode: Keystroke index + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

Keystroke index

+ +

This index lists notes-mode keystrokes. +

+
Jump to:   C +   +M +   +O +   +R +   +S +   +T +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry Section

C
C-c C-d3.1.3 Encryption
C-c C-e3.1.3 Encryption
C-c C-i3.1.1 Getting around
C-c C-k3.1.1 Getting around
C-c C-n3.1.1 Getting around
C-c C-p3.1.1 Getting around
C-c C-s3.1.2 Subject summary
C-c C-s3.2 Notes indices
C-c<RTN>3.1.1 Getting around

M
M-C-a3.1.1 Getting around
M-C-e3.1.1 Getting around
mouse-22.3 The notes index

O
o3.2 Notes indices

R
RTN2.2 A notes file
RTN2.3 The notes index

S
S-mouse-22.2 A notes file

T
TAB2.2 A notes file

+
Jump to:   C +   +M +   +O +   +R +   +S +   +T +   +
+ + +
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on August, 8 2008 using texi2html 1.78. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode/notes-mode_7.html b/packages/notes-mode/HTML/notes-mode/notes-mode_7.html new file mode 100644 index 000000000..eb20b120d --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode/notes-mode_7.html @@ -0,0 +1,220 @@ + + + + + +Notes-mode: Concept index + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

Concept index

+ +

This index lists notes-mode concepts. +

+
Jump to:   . +   +
+C +   +D +   +E +   +F +   +I +   +K +   +M +   +N +   +P +   +R +   +S +   +T +   +U +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry Section

.
.notesrc3.3 Notes-mode configuration

C
configuration3.3 Notes-mode configuration
conventions3.1.4 Useful conventions
Crontab2.3 The notes index

D
Decryption3.1.3 Encryption
Directory hierarchy2.4 The notes directories

E
Encryption3.1.3 Encryption

F
Font matter2.2 A notes file

I
imenu3.1.1 Getting around
Intermediate directories2.4 The notes directories

K
key-id3.1.3 Encryption

M
mailcrypt3.1.3 Encryption
mkall2.3 The notes index
mknew3.1.4 Useful conventions

N
Notes directories2.4 The notes directories
Notes entries2.2 A notes file
Notes file permissions2.4 The notes directories
Notes files2.2 A notes file
Notes files2.4 The notes directories
Notes files, font matter2.2 A notes file
Notes index2.3 The notes index
Notes links2.2 A notes file
Notes subjects2.2 A notes file
notes-mode-initialization-program3.1.4 Useful conventions
notesinit2.1 Getting started

P
PAM3.1.3 Encryption
PGP3.1.3 Encryption
PGP Augmented Messaging3.1.3 Encryption
Pretty good privacy3.1.3 Encryption
Pseudo-URLs2.2 A notes file

R
re-indexing2.3 The notes index
Root directory2.4 The notes directories

S
setup2.1 Getting started
Subject summary3.1.2 Subject summary

T
Today3.1.4 Useful conventions

U
URLs2.2 A notes file

+
Jump to:   . +   +
+C +   +D +   +E +   +F +   +I +   +K +   +M +   +N +   +P +   +R +   +S +   +T +   +U +   +
+ + + + +
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on August, 8 2008 using texi2html 1.78. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode/notes-mode_abt.html b/packages/notes-mode/HTML/notes-mode/notes-mode_abt.html new file mode 100644 index 000000000..c44cb63cc --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode/notes-mode_abt.html @@ -0,0 +1,167 @@ + + + + + +Notes-mode: About This Document + + + + + + + + + + + + + + + + + + + + +
[Top][Contents][Index][ ? ]
+

About This Document

+

+ This document was generated by John Heidemann on August, 8 2008 using texi2html 1.78. +

+

+ The buttons in the navigation panels have the following meaning: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Button Name Go to From 1.2.3 go to
[ < ] BackPrevious section in reading order1.2.2
[ > ] ForwardNext section in reading order1.2.4
[ << ] FastBackBeginning of this chapter or previous chapter1
[ Up ] UpUp section1.2
[ >> ] FastForwardNext chapter2
[Top] TopCover (top) of document  
[Contents] ContentsTable of contents  
[Index] IndexIndex  
[ ? ] AboutAbout (help)  
+ +

+ where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure: +

+ +
    +
  • 1. Section One +
      +
    • 1.1 Subsection One-One +
        +
      • ...
      • +
      +
    • +
    • 1.2 Subsection One-Two +
        +
      • 1.2.1 Subsubsection One-Two-One
      • +
      • 1.2.2 Subsubsection One-Two-Two
      • +
      • 1.2.3 Subsubsection One-Two-Three     + <== Current Position
      • +
      • 1.2.4 Subsubsection One-Two-Four
      • +
      +
    • +
    • 1.3 Subsection One-Three +
        +
      • ...
      • +
      +
    • +
    • 1.4 Subsection One-Four
    • +
    +
  • +
+ +
+ + + + + +
[Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on August, 8 2008 using texi2html 1.78. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode/notes-mode_fot.html b/packages/notes-mode/HTML/notes-mode/notes-mode_fot.html new file mode 100644 index 000000000..ab85b1c30 --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode/notes-mode_fot.html @@ -0,0 +1,85 @@ + + + + + +Notes-mode: Footnotes + + + + + + + + + + + + + + + + + + + + +
[Top][Contents][Index][ ? ]
+

Footnotes

+

(1)

+

Trademarked, in Great Britain, Sunone tells me. +

(2)

+

I consider myself pretty anal about this subject, +often typing notes in from paper after-the-fact, +and I certainly don't manage to back-enter +my notes all time time. +

(3)

+ +

On the other hand, some folks at MIT are working +on this problem from both the hardware and the social side of +things (‘http://wearables.www.media.mit.edu/projects/wearables/’) +(Perhaps they have wild parties with computers, too.) +

(4)

+

My hat is off to Rosa Parks +and the many other normal people who triggered landmark cases. +

(5)

+

If you think I'm missing an alternative, please let me know. +


+ + + + + +
[Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on August, 8 2008 using texi2html 1.78. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode/notes-mode_toc.html b/packages/notes-mode/HTML/notes-mode/notes-mode_toc.html new file mode 100644 index 000000000..4b4cfc9f9 --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode/notes-mode_toc.html @@ -0,0 +1,111 @@ + + + + + +Notes-mode: Table of Contents + + + + + + + + + + + + + + + + + + + + +
[Top][Contents][Index][ ? ]
+

Table of Contents

+ +
+ + + + + +
[Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on August, 8 2008 using texi2html 1.78. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode_1.html b/packages/notes-mode/HTML/notes-mode_1.html new file mode 100644 index 000000000..45f7ec286 --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode_1.html @@ -0,0 +1,533 @@ + + + + +Notes-mode: 1. Introduction + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1. Introduction

+ +

What is notes-mode and why should you (perhaps) use it? +

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.1 What is it?

+ +

Notes-mode is an indexing system for on-line note-taking. +Notes-mode is composed of two parts, the visible part, +a major-mode for emacs to aid note-taking; +and the invisible part, +scripts which periodically index your notes for you. +

+

Note that notes-mode provides tools to index your notes, +not to search them. +(Other existing tools such as ‘grep’, ‘agrep’, and ‘glimpse’ +already allow file search.) +

+

A digression about indexing vs. searching: +Indexing in this sense means +organize them according to categories you give, +while searching looks through all text for arbitrary strings. +Drawing on the World Wide Web for examples, +Yahoo (‘http://www.yahoo.com/’) is an index, +while Alta Vista (‘http://www.altavista.digital.com/’) +is a search-engine. +In (potentially) more familiar terms, +the yellow pages +(1) +are an index, +while directory information (411 in the USA) +is sort of a search-engine. +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.2 Why keep notes at all?

+ +

So why should you use notes-mode? +Well, first, consider why you should (perhaps) +keep your notes on line. +First, +I assume that you take notes as part of your work or school. +If you don’t, +you can stop reading now and go back to watching TV. +

+

If you keep notes, ask yourself why you keep them. +Reasons vary for different people, but some include: +

+
    +
  • +To remember what is said or done. + +
  • +To focus on what is important about what is said. + +
  • +To provide proof of having done something +at a particular time or date. + +
  • +I know there were other reasons here, +but they slipped my mind. +
+ + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.3 Why keep notes on-line?

+ +

OK, I’ve talked you into keeping notes. +Why do it on-line? +Again, there are different reasons for different people. +If you don’t want to consider keeping your notes on-line, +you’re welcome to go back to your (clay tablets) +paper notes. +

+

However, if you do much of your work on-line, +or if you have portable computer, +then you might want to consider keeping your notes on-line. +

+
    +
  • +It’s faster to type than write, +and possibly more legible at high speed. + +
  • +Often information is already on-line. +For example, in software development, bug reports, +measurement results, and everything else that’s useful +is on-line. + +
  • +You can take down more detail than you otherwise would +(especially if the data is already on-line). +Taking more copious notes can be helpful when you go back +to figure out why that strange thing was happening. + +
  • +On-line notes are easy to search. +Full-text search with +grep, agrep, and glimpse are all much faster +and are often more accurate than paging through paper notes +looking for a particular keyword. + +
  • +On-line notes are easy to index. +(At least with notes-mode!) +In addition to full-text search, +it’s helpful to organize notes by category. +If you keep a table-of-contents of your paper notes, +you are either extremely fastidious +or a librarian (Nadia?). + +
  • +You can keep all of your notes with you at all times +(if you have a portable computer). +Even at a page a day, +paper notes quickly become bulky and awkward to carry around. +On-line notes fit on your computer’s hard disk, +an extraordinarily compact medium +by comparison. + +
  • +Your notes can be automatically backed up. +Paper notes can become damaged with time, +and as a graduate student +one of my fears was fire in Boelter Hall +consuming all my research experiments +and and therefore hopes of a degree. +Electronic notes are extremely easy to duplicate +and can be automatically backed up with the rest of your computer. +(You do back up your computer, don’t you?) + +
+ +

While these advantages are undoubtedly clear to any +right-thinking computer user, +it should be said that there are a few disadvantages +for on-line note-taking. +

+
    +
  • +If you don’t have a computer with you most of the time, +it’s difficult take notes on-line (because you’re off-line, of course). +(2) + +
  • +Computers require power. +If your portable computer runs out of juice, +you’re on your own. +Corollary: watch your power, or bring paper. +Better corollary: watch your power, and bring paper. + +
  • +Social limitations. +It’s not always socially acceptable to take notes-on-line. +For example, +at a party, +few people would use a computer +to take down the phone number of a person +to whom they’re attracted +(at least, if they wanted the attraction to be mutual). +(3) +Sometimes other people find the sound of typing distracting. + +
  • +Health issues. +Repetitive stress injuries do occur +writing (slower) by hand is at least +an alternate motion than typing. + +
  • +Legal limitations. +If you want to use your electronic notes +to justify a patent or invention, +you may be breaking legal ground. +Being on the legal cutting-edge is rarely an easy thing +for the person involved.(4) + +
+ + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.4 Why use notes-mode?

+ +

OK, I’ve sold you on note-taking and even on on-line note-taking. +What about notes-mode? +Naturally, +it slices, dices, and makes julienne fries. +But wait, there’s more: +

+
    +
  • +It automates indexing your notes, +linking notes with the same subject together. + +
  • +It supports embedded links, +allowing you to manually link together different topics +and external files. + +
  • +It includes a number of convenience-features in emacs. +Subjects can be completed based on existing subjects. +The usual emacs customization mechanisms are available. + +
  • +Notes containing sensitive information can be encrypted. + +
  • +Notes-mode seems better than the other, currently available alternatives. +
+ +

What are the alternatives? I’m glad you asked. +(5) +

+
    +
  • +HTML. +HTML has better formatting capabilities than notes-mode, +and it has excellent linking capabilities. +Unfortunately, +HTML’s tags are fairly intrusive + (each is at least four characters long and most come with a pair), + tags can get confused with normal text, + errors in HTML can be bad (obscuring data), + and there’s no automatic indexing feature + (at least with plain HTML). +Besides, + all data should be kept as close to the ASCII from whence it came, + as God Intended (hi, Steve). + +
  • +Word Processors. +Word processors are strong in the formatting department, + but most don’t really have linking capabilities, + and have poor or restricted indexing. + +
+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.5 Y2K Statement

+ +

Notes mode uses dates extensively, + both two-digit years and seconds-since-1970. +However, notes-mode has been coded to function correctly through + the year 2038. +

+

To avoid problems with the year 2000, notes-mode assumes + that any two-digit years before “70” are 20xx, not 19xx. +Notes-mode should therefore work correctly in both the year 1999 and 2000. +

+

(Notes-mode 1.17 released February 1999 fixes a lingering Y2K problem.) +

+

Because notes-mode uses seconds-since-1970 for some date calculations + it will fail beyond the year 2038 on computers with 32-bit integers. +

+

If I’m still using notes-mode then on a 32-bit machine I’ll see what I can do. +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.6 Related work

+ +

What would a document be without related work? +

+

Notes-mode is not related in any way to Lotus Notes. +

+

I am told (by David Weisman) + that it’s something like the now defunct Lotus Agenda. +

+

Ashvin Goel, one of the contributors to notes-mode, + has gone off and done a from-scratch reimplementation + called records-mode. +It’s very similar to notes mode, + and emphasizes on-the-fly updates to entry links + but lacks a manual. +You may want to check it out at + ‘http://www.cse.ogi.edu/~ashvin/software.html’. +

+

Hyperbole (by Bob Weiner) offers better linking facilities +than notes-mode, but it has a bunch of stuff notes-mode doesn’t need +and it’s missing notes-specific indexing provided by notes-mode. +For people already using Hyperbole + it would be interesting to replace notes-mode’s linking + with Hyperbole’s. +Contributions in this area are welcome, provided they make Hyperbole + optional. +

+
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

1.7 Staying on top

+ +

The most recent distribution of notes-mode + is always available via + ‘http://www.isi.edu/~johnh/SOFTWARE/NOTES_MODE/’. +

+

After you’ve installed notes mode you’re encouraged to subscribe +to the mailing lists. +To subscribe, go to the web page +Send the message "subscribe" to +‘http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-announce’ or +‘http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-talk’. +

+

The announce list will contain only release announcements +and so is guaranteed to be very low bandwidth. +

+ + +
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on April 4, 2012 using texi2html 1.82. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode_2.html b/packages/notes-mode/HTML/notes-mode_2.html new file mode 100644 index 000000000..0f5af2d23 --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode_2.html @@ -0,0 +1,419 @@ + + + + +Notes-mode: 2. Basics + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

2. Basics

+ +

All you need to use notes-mode + in a chapter. +(Except for installation, See section Installation.) +

+ + + + + + + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

2.1 Getting started

+ + + +

To get started with notes-mode, + read the introduction this chapter, + then either: +

+
    +
  • +Start emacs, do + M-x load-library RET notes-mode RET +This approach will set up notes-mode with the default parameters. + +
  • +OR, from the shell, + run the program ‘notesinit’. +This approach will ask you some questions about how you want to configure + notes mode. + +
+ +

Either way these should set up everything notes-mode needs. +This program will modify your environment (as described in this section), + or it will give you the exact commands you should run yourself. +

+

After you’ve done one of these, + start up emacs and note-away. +I usually begin a + day of note-taking by running the command + M-x notes-index-todays-link + to jump directly to today’s note. +You may even wish to bind this to something, + perhaps with + (define-key global-map "\C-cn" 'notes-index-todays-link) + in your ‘.emacs’. +

+

If you want to browse your existing notes, + you might instead want to edit the + ‘~/NOTES/index’. +(What is a notes file and the index? Hurry up and finish + reading this chapter.) +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

2.2 A notes file

+ + + +

The notes file is the focus of most of the activity in notes-mode, + it’s where you take your notes. +Notes files are mostly free-form text + broken up into entries. +Here’s an example: +

+ + +
 
8-Jun-95 Thursday
+-----------------
+
+* Today
+-------
+prev: <none>
+next: <file:///~/NOTES/199506/950609#* Today>
+
+next week - release notes-mode
+
+
+* Environment/notes
+-------------------
+
+I explained notes mode to Ashvin and Geoff.
+...
+
+ +

Each entry has a subject-block, (maybe) some links, and then (maybe) some text. +

+

The subject-block must begin with an asterisk-space (* ) + at the beginning of a line, followed by the subject itself. +Subjects must be underlined with a row of dashes + (if they’re not exact, that’s OK; + notes-mode will fix them periodically). +For convenience, + notes-mode will automatically add the underlines when you + hit <RTN> (notes-electric-return), + and <TAB> on a partially completed subject will + invoke completion based on indexed subjects (notes-complete-subject). + + + +

+

Following the subject may be links. +(In the example, the “Today” entry has links, + the “Environment/notes” entry doesn’t.) +These links will be automatically updated by notes-mode + when your notes are re-indexed; + just leave a blank line when writing the note. + +

+

Links are made with pseudo-URLs, + sort of like those in the World Wide Web. +Any of these URLs can be followed in notes-mode files + by clicking S-mouse-2 on the pseudo-URL + (notes-w3-follow-link-mouse). + + + +

+

Finally comes the text. +Go wild, but just don’t include text that looks like a subject. +You can embed pseudo-URLs to link notes together manually. +

+

The more anal of you may have noticed + that the lines before the first subject + are not part of any entry. +These lines are + front matter. +They’re not usually used for much, + but they can be a good place to label the file. + + +

+

There are a number of useful conventions + that can be adopted to organize your notes. +The most common is the “Today” entry. +If you keep an entry with the same subject + at the beginning of each file, + you link all of your notes together. +Notes-mode will help you out with some of these convetions + by automatically creating or copying some fields for you; + see see section Useful conventions for details. +

+

Finally, notes-mode can also work with outline-minor-mode + (thanks to Tim Carroll for pointing this out). +Outline-mode supports hiding and revealing text and other helpful + features beyond the scope of this document. +See Outline Mode: (emacs)Outline Mode section ‘Outline Mode’ in The Emacs Editor, for details. +

+
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

2.3 The notes index

+ + + +

The notes index lists all subjects you’ve kept notes about, + and each date of each note. +Impress your friends, + show your advisor why you’re worth the big peanuts, + you’ll soon have the biggest index of all. +

+

The index has one line per subject, listing the subject + and each day a note was made about that subject. +For example: +

+
 
Bicycle: 950314, 950316
+Bicycle/maintenance/books: 951028
+Bridge/hands: 951113, 951114, 951116, 951117
+Bridge/UCLA: 960222, 960409
+
+ +

Clicking on any of the dates with mouse-2 + will take you to that note + (notes-index-mouse-follow-link). +(You can also move the point over the date and hit <RTN> + if you’re musaphobic [notes-index-follow-link].) + + +

+

The notes index is automatically updated by the program ‘mkall’. +Typically ‘mkall’ is run nightly by ‘cron’. +On most modern versions of Unix, you can add this command to cron by + running ‘crontab -e’ and adding the line: +

+
 
0 4 * * * /usr/local/lib/notes-mode/mkall
+
+ + + + +

(Assuming that your notes programs are installed + in /usr/local/lib/notes-mode, the default location.) +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

2.4 The notes directories

+ + + + +

The final thing needed to tie basic notes-mode together his how +the pieces fit together. +Since my graduate work is in file systems, +you can bet that directories are involved. +

+

Notes-mode keeps its files in a two-level hierarchy: +

+
 
~/NOTES
+~/NOTES/index
+~/NOTES/rawindex
+~/NOTES/199603
+~/NOTES/199603/960329
+~/NOTES/199603/960330
+~/NOTES/199604
+~/NOTES/199604/960401
+
+ +

The top level, ‘~/NOTES’, is the notes directory. +It keeps all notes in one place. +(The name of this directory is configurable, See section Notes-mode configuration.) +

+

Inside the notes directory are two files and a number of directories. +The files are ‘index’, + the index of all entries (see section The notes index), + and ‘rawindex’, + used internally. + +

+

The notes directory also contains a number of subdirectories, + sometimes called intermediate directories. +These directories group the actual notes files into manageable chunks, + keeping any directory from getting too large. +Intermediate directories are named + by the four-digit year and the two-digit month + of the entries they contain. +(The format of intermediate directories + is configurable, See section Notes-mode configuration.) + +

+

Finally, + each intermediate directory are the notes files themselves, + named according to the two-digit year, month, and day-of-month. + +

+

For the most part, + notes-mode will automatically maintain this organization of files, + once you create the top-level directory. +Notes-mode will also automatically insure + that all files in the notes directory are unreadable by + anyone other than their owner. +Notes are personal things. +(This behavior is not currently configurable, + but it probably should be.) + +

+ + +
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on April 4, 2012 using texi2html 1.82. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode_3.html b/packages/notes-mode/HTML/notes-mode_3.html new file mode 100644 index 000000000..cdfd7e6bd --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode_3.html @@ -0,0 +1,511 @@ + + + + +Notes-mode: 3. Advanced Features + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3. Advanced Features

+ +

Notes-mode, the minutiae, and some other good stuff. +

+ + + + + + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.1 Notes files

+ + + + + + + + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.1.1 Getting around

+ +

Moving between notes entries and around the hierarchy is fairly common, + so there are some accelerators. +

+
+
C-c C-i
+

Jump to the index entry for the current entry’s subject +(notes-goto-index-entry). + +

+
+
C-c C-n
+
C-c C-p
+

Move to the next or prior note with the same subject +(notes-follow-next-link and notes-follow-prev-link). +These functions follow the links in the note, + if they’re defined. +If not, + they look through the index file. +This approach usually works, + but will fail if there are multiple new entries created + with the given subject + between when the index is recomputed. + + +

+
+
C-c<RTN>
+

Follow the link under the point +(notes-w3-follow-link), + a keyboard equivalent of <S-mouse-2>. + +

+
+
M-C-a
+
M-C-e
+

Jump to the beginning or end of the current note entry +(notes-beginning-of-defun and notes-end-of-defun). + + +

+
+
C-c C-k
+

Copies the pseudo-URL for the current note into the kill-ring +(current-url-as-kill). +To link two entries, go to the target, + grab its URL with C-c C-k, + go to where you want to make the link, + and yank the URL with C-y. + +

+
+
+ + +

Notes mode supports imenu, + if you have it bound to something + (I use (global-set-key [down-mouse-3] 'imenu)). + +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.1.2 Subject summary

+ +

It’s often helpful to look at all + entries for a given subject +C-c C-s + collects all entries with the subject of the current + entry in a new buffer + (notes-summarize-subject). + + +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.1.3 Encryption

+ + + + +

Notes occasionally contain private material. +While Unix has strong services for file protection + (compared to other, say, more wide-selling operating systems), + in many systems root passwords are shared, + while other systems are vulnerable to physical compromise. +In such systems, + properly used encryption is the best approach to security. +

+

Notes-mode encryption is based + Phill Zimmerman’s PGP (Pretty Good Privacy) +(see ‘http://www.mantis.co.uk/pgp/pgp.html’) + and either + with Rick Campbell’s + emacs interface, PAM (PGP Augmented Messaging) +(from ‘ftp://h.gp.cs.cmu.edu/usr/rfb/pam/’) + (note that as of January 1997, PAM is no longer at this ftp site + and appears to not be publicly available), + or LoPresti and Choi’s mailcrypt +(from ‘http://cag-www.lcs.mit.edu/mailcrypt/’). + + + + + +

+
+
C-c C-e
+

Encrypt the current note +(notes-encrypt-note). +By default this function encrypts the whole entry. +With a prefix argument, + only the part from the point to the end of the entry is encrypted. + +

+
+
C-c C-d
+

Decrypt the current note +(notes-decrypt-note). +

+
+ + +

By default notes-mode determines your public key by looking + up your user-full-name in your PGP keyring. +You can override this default by setting + notes-encryption-key-id + to the desired key-id. + +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.1.4 Useful conventions

+ + + + + +

There are a number of conventions which can make notes-mode + easier to use. +These conventions are a matter of personal taste, + of course. +Do what works for you. +

+

First, + I find it helpful to keep the date of each notes-file at the top + of the file. +This makes the file self-identifying + if the filename is lost. +

+

Second, + I find it useful to have the first entry of each file + have the same subject (perhaps “Today”). +This entry then links all notes together, + making it easy to go to yesterday and tomorrow. +I keep a to-do list on this entry, + bringing the list forward each day. + +

+

A third useful convention is to keep an + entry with the name based on the day of the week + in each file. +Analogous to “Today”, this entry links together + weeks. +

+

Notes-mode supports these conventions. +When you make a new notes-file in emacs, + notes-mode searches for the preceding file. +If it follows any of these conventions, + the new file is initialized appropriately. +Currently + the approach to do this process + (in the program ‘mknew’) + is fairly sensitive, + so it may not work in all cases. +In particular, + the date convention works only on + for English-language dates. +(If you use notes-mode with a non-English language, + let me know and I’ll work with you to fix this limitation.) +

+

If you find other helpful conventions, + please let me know. +Modifications to ‘mknew’ to implement + new conventions are also invited. +

+

If you don’t want to use these conventions, + or if you want to use different ones, + set the emacs variable notes-mode-initialization-program + to nil or the name of your initialization program. + +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.2 Notes indices

+ + +

Only two features of notes index mode haven’t yet been described. +First, + you can open any notes-file based on date + with notes-index-link, + normally bound to <o>. + +

+

Second, + you can get a subject-summary + with <C-c C-s> + (see section Subject summary). +The subject defaults to that of the current index line. + +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

3.3 Notes-mode configuration

+ + + + +

Several aspects of notes mode are particularly visible + to the user. +Because I’m not a fascist, + a user can change most of these. +

+

Preferences are specified in ‘~/.notesrc’. +This file lists things to change: +

+
 
# lines beginning with a hash are comments
+dir: ~/NOTES
+int_form: %Y%m
+
+ +

Currently, two things can be changed: +

+
+
dir
+

Specifies the root of the notes directory hierarchy + (see section The notes directories). +

+
+
int_form
+

Specifies the form of the intermediate directory. +A limited subset of strftime(3) + formatting is allowed. +

+
+ +

The subset of strftime(3) supported in int_form is: +

+
%Y
+

The four-digit year. +

+
+
%y
+

The two-digit year. +

+
+
%m
+

A two-digit numeric month. +

+
+
%d
+

A two-digit day. +

+
+ +

In addition to ‘.notesrc’, + there are a number of emacs-specific variables. +These variables are documented in the file + ‘notes-variables.el’. +

+ + + +
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on April 4, 2012 using texi2html 1.82. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode_4.html b/packages/notes-mode/HTML/notes-mode_4.html new file mode 100644 index 000000000..eb785a3a5 --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode_4.html @@ -0,0 +1,530 @@ + + + + +Notes-mode: 4. History + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

4. History

+ +

More about notes-mode than you wanted to know, +and some thanks. +

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

4.1 Notes-mode history

+ +

Briefly, + I started keeping notes on-line shortly after I got a portable computer + in January, 1994. +After a month-and-a-half of notes, I realized that + one does not live by grep alone, + so I started adding indexing facilities. +

+

In June of 1995 + some other Ficus-project members started + keeping and indexing on-line notes + using other home-grown systems. +After some discussion, + we generalized my notes-mode work and + they started using it. +

+

Over the next 18 months notes-mode grew. +Finally, in April, 1996 I wrote documentation, + guaranteeing that innovation on notes-mode will now cease + or the documentation will become out of date. +

+ +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

4.2 Credits

+ +

I (John Heidemann, <johnh@isi.edu>) + started, documented, and currently maintain notes-mode. +I take ultimate responsibility for the code, + especially for the ugly parts that I won’t let others change. +

+

Ashvin Goel + <ashvin@ficus.cs.ucla.edu> + has been a very enthusiastic notes-mode user and contributor. +He is responsible for at least + the ideas behind notes-summarize-subject +and the ideas and initial implementations of + some of the original generalization and modularity improvements, + notes-follow-next-link and notes-follow-prev-link, + notes-goto-index-entry, + programmed subject completion, + and + context-sensitive mouse-2 handling. +In addition, + he is an invaluable second opinion about + what and how things should be done + (even if I don’t always agree with him). +

+

Geoff Kuenning + <geoff@ficus.cs.ucla.edu> + has been another enthusiastic notes-mode user and victim. +He is responsible for + finding several bugs, + motivation for mouse-less operation, + comments about the documentation, + the day-of-week convention, + and an initial implementation and the idea of + multiple entries with the same subjects in a single notes-file. +

+

Ramesh Govindan <govindan@isi.edu> did the xemacs port. +

+

Since it’s release on Usenet in April 1996 several + other folks have contributed. +Thanks to + David Weisman <weisman@app1.osf.org>, + Martin L. Smith <martin@ner.com>, + Jason Bastek <jason@aai.com>, + Ulrich Herbst <Ulrich.Herbst@t-systems.com>. +See the next section (See section Changes.) for details of their exploits. +

+

Thanks to Larry Ayers <layers@marktwain.net> + for popularizing notes-mode with reviews in + the Linux Gazette + (at <http://www.linuxgazette.com/issue22/notes-mode.html> and + <http://www.linuxgazette.com/issue35/ayers.html>). +

+
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

4.3 Changes

+ +

For the bored: +

+

First semi-public release. 12-Jul-95: version 0.1 + Shared a version with Ashvin and Geoff. +

+

Changed 6-Dec-95: version 0.3 + Ashvin’s changes for note traversal added (C-c C-p and C-c C-n now +move to the prev/next note in note-mode). + URL parsing changed so that "localhost" is optional. +

+

Changed 19-Dec-95: version 0.4 + More robust prev/next code added, both to handle going back and +forward in the middle of chains through the index file, and to handle +back/forward in a single file. + URL parsing changed so that notes-goto-index-entry correctly handles +lookups on notes names such as "252A". +

+

Changed 20-Dec-95: version 0.5. + Fixed a missing variable in notes-url.el. + Added a work-around to a bug in emacs-19.30’s define-derived-mode. +

+

Changed 24-Dec-95: version 0.6. + Prev/next code re-re-written to be more robust. +

+

Changed 26-Dec-96: version 0.7. + Bug fix release. +

+

Changed 23-Jan-96: version 0.8. + Initialization code added to set up a new note. +New variable: notes-bin-dir. +

+

I’m skipping version 0.9 because I erroneously release version 0.1 +as version 0.9 (only on the web, not on Usenet). +

+

I’m bumping from version "0" to version "1" since the code is has been +in production use for more than a year by several people. Minor +numbers are the same. +

+

Changed 26-Mar-96: version 1.10. + Setup code completely re-written. + Several incompatible changes have been made: + - the lisp and Perl code must be installed via make install, +not by copying. + - some data is specified in a .notesrc file; copy and modify sample.notesrc. + - several internal elisp changes. + - catsubject added (bound to C-cC-s): collect all notes about the +current subject. + - new notes-files are initialized with fields based on the prior +day’s notes; see mknew for details. + - daily_work is gone; mkall is rewritten to use .notesrc. +

+

Changed 29-Apr-96: version 1.11. + Real documentation. + Mknew caching added. +

+

Changed 9-Aug-96: version 1.12. + Added notesinit to do all setup for new users. +

+

Changed 24-Aug-96: version 1.13. + Minor documentation fixes. +

+

Changed 20-Dec-97: version 1.14. +Autoconf support. +

+

Fontification of the index buffer is now pre-computed in perl +other than done when the file is needed (in elisp with slow regular +expressions). 2000-line index files are now 1-2 seconds rather than +15-30 on a 100MHz Pentium. If necessary (the +pre-computed version isn’t up-to-date) we fall back on the slower +code. +

+

Related work improved (suggestion by David Weisman <weisman@app1.osf.org>). +

+

Documentation improvement (problem found by Martin L. Smith +<martin@ner.com>). +

+

Installation improved (code by Jason Bastek <jason@aai.com>). +

+

Bug in notes-index mode with subjects containing colons fixed (johnh). +

+

Encryption now supports mailcrypt.el. +

+

Support for emacs 20 (a small font-lock change). +

+

Changed 5-Jan-98: version 1.15. +Bug in decryption for non-PAM users fixed + (suggestion by Kevin Davidson <tkld@quadstone.com>). +

+

Y2K statement added + (suggestion by Kevin Davidson <tkld@quadstone.com>). +

+

Pointer to mailcrypt added (as a supported encryption package). +Problem pointed out by K. Ueda <kueda@jupiter.qse.tohoku.ac.jp>. +

+

Changed 4-Nov-98: version 1.16. +Bug in kill-ring handling of notes-old-underline-line + fixed by Tim Potter <timp@jna.com.au>. +Bug in whitespace handling after PGP encryption fixed by Tim Potter. +Bugs in handling of entries with hash signs in their name fixed + (found by Tim Potter). +Fontification of index buffer further improved + (mapcar is your friend). +Xemacs support added based on code contributed by Ramesh Govindan. +

+

Changed 28-Feb-99: version 1.17: +Improvement: notes-electric-return now fixes up the prev/next links + of new entries (only). Code contributed by + Takashi Nishimoto. +

+

Bug fix: reversed options -batch and -q in configure.in to placate + XEmacs 20.0; changed notesinit to not downcase the pathname + (bugs found by Thierry Bezecourt). +

+

Clarification: Autofilling of new notes more clear in the manual (hopefully, + suggested by Solofo Ramangalahy). +

+

Bug fix: a y2k bug in was found and fixed in mkindex. Sigh. +

+

New: Two mailing lists for notes-mode have been created: +‘notes-mode-announce@heidemann.la.ca.us’ and +‘notes-mode-talk@heidemann.la.ca.us’. +Send the line “subscribe notes-mode-announce” +(or “subscribe notes-mode-talk”) +to ‘majordomo@heidemann.la.ca.us’ +to join them. +[These instructions are now superceeded; to subscribe, go to +‘http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-talk’ +and +‘http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-announce’.] +

+

Changed 6-Oct-99: version 1.18: +Bug fix: handling of electric-prevnext is better when there are + existing prev/next links. +

+

Clarification: I added some pointers in the code to the installation + instructions. (Apparently people can’t RTF README.) +

+

Extension: mailcrypt-3.5.x suported including pgp, pgp5 and gpg. +

+

Changed (date 23-Dec-00): version 1.19: +Bug fix (cosmetic): suppress comments in encrypted nodes. +

+

Install fixes from Kannan Varadhan: elisp directories changed on install. +

+

Added C-j as a synonym for RET in notes-mode to parallel C++ or perl mode. +(Suggested by Fred Jaggi ‘jaggi@rsn.hp.com’.) +

+

Outline-minor-mode support added and documented. +(Suggested by Tim Carroll ‘tim@boomboom.com’.) +

+

Bug/typo fixes in gpg support +(Contributed by William A. Perkins ‘wa_perkins@pnl.gov’, +with separate patches from Knut Anders Hatlen ‘kahatlen@online.no’.) +

+

Installation improvements suggested by Christophe Troestler +‘Ch.Troestler@linkline.be’: +use install-info to update the info dir, +warn users of –prefix that lisp files go elsewhere. +

+

Changed (date 1-Feb-01): version 1.20: +Bug fix: missing file notes-first.el added to the distribution. +(Bug found by Michael Totschnig ‘michaelt@supernet.ca’.) +

+

Changed ( 5-Dec-01): version 1.21: +(backed-out—didn’t work with spaced URLs) +URL lookup now uses thing-at-point. +

+

Fix to make notes-mode work with emacs-21.1 +(Fix from Klaus Zeitler ‘kzeitler@lucent.com’.) +

+

Changed ( 3-Jan-02): version 1.22: +Several bugs in ‘notesinit’ for stricter Perl implementations +(bug found by Paul Craven" ‘pcraven@yorku.ca’, +and Kasper van Wijk ‘kasper@acoustics.mines.edu’) +and to make it run cleanly more often. +

+

Notes-first now autoinitializes notes mode from emacs. +(As instisted by rms, unfortunately about two years later than requested.) +

+ +

Changed (20-Feb-05): version 1.23: +Outline mode is now forcebly turned on to avoid interactions +with user’s text-mode hooks +(bug and fix from Nils Ackermann ‘nils@nieback.de’). +

+

Install bug involving ordering of scripts and byte-compilation +fixed (bug and fix from Mark Allman ‘mallman@grc.nasa.gov’). +

+

Fix obscure bug in configure, reported by Klaus Zeitler ‘kzeitler@lucent.com’. +

+

Fix for notes-summarize-subject when no subject is specified (bug and fix +from Geoff Kuenning). +

+

Changed (14-Jan-06): version 1.24: +

+

install-info bug documented with the Debian install-info +(bug reported by Aaron Falk ‘falk@isi.edu’). +

+

Automatic date completion in new days is now done in the current +locale, so it should now work for non-English languages. Bug reported +by Torsten Bronger ‘bronger@physik.rwth-aachen.de’. +

+

Fixed a bug in mkindexcache, triggered by subjects with percent signs +in them. Bug reported by Philip Austin ‘paustin@eos.ubc.ca’. +

+

We’re a bit more robust about subjects, I hope. Warnings should +appear about embedded number signs, and leading spaces should be +filtered. Bug reported by Philip Austin ‘paustin@eos.ubc.ca’. +

+

Notes-mode now dervies from indented-text-mode rather than +paragraph-indent-text mode. Unfortunatley this is not customizable +because of limitations of define-derived-mode. Change suggested by +Aaron Falk ‘falk@isi.edu’. +

+

Provide better hints about how to get started after installation or +running notes-mode in emacs for the first time. +

+

In notes init, the default path for dir was the full path, not the tilde +version of the path. Now it defaults to using tidle for home +directory. Bug reported by Mark Allman ‘allman@icir.org’. +

+

Changed (26-May-06): version 1.25: +

+

fixed a bug in the release tar.gz file that had a additional copies +copy nested. +

+

Changed (30-Jun-08): version 1.26: +

+

Force unicode I/O in ‘mkindexcache’ to fix highlighting mis-alignment +when using emacs-21 with unicode subject lines. +

+

Changed mkprevnext and mkrawindex to optionally take the list of notes files +to index from stdin rather than from the command line. Yes, I finally +have 4093 notes files, overflowing the Unix command line buffer. +

+

Changes notes-mode.el to put path in quotes, allowing spaces to appear in home directory names (bug fix from Ulrich Herbst). +

+

Added a suggested features section. +

+

Changed ( 8-Aug-08): version 1.27: +

+

Change I/O in ‘mkindexcache’ to use locale (the sadly correct thing) +rather than forcing utf-8 (the Righteous Path). +Bug report from Geoff Kuenning, a man with an older Unix environment than I. +

+

Changed (20-Jun-10): version 1.28: +

+

Changed a regular expression in ‘notes-index-mode.el’ that was +causing emacs-v23 (a pre-release version) +to regular expression infinite recursion. +

+

Changed (2012-04-04): version 1.29 +

+

(2011-08-23) Changed run-hooks to run-mode-hooks. +Bug report from Geoff Kuenning. +

+

Changed some handling of PGP encryption to account for +some apparent API changes. +

+

(2012-04-04) Fixed encyrption to handle encrypting empty notes at the end +of buffers without going into an infinite loop. +Clearly wrong code, but you have to ask this guy for why he tried: +Bug report from Geoff Kuenning. +

+ + +
+ + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

4.4 Suggested features

+ +

Features suggested by users but not yet implemented: +

+

21-Feb-08: (from Xavier Maillard): should support “disconnected” notes that +are indexed but not date-based. +

+

21-Feb-08: (from John Heidemann): should switch all notes files to have an extension (maybe ‘.notes’). +

+
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on April 4, 2012 using texi2html 1.82. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode_5.html b/packages/notes-mode/HTML/notes-mode_5.html new file mode 100644 index 000000000..7e2839950 --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode_5.html @@ -0,0 +1,124 @@ + + + + +Notes-mode: 5. Installation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

5. Installation

+ +

To install notes-mode, +

+
    +
  1. +Unpack and extract the distribution +(gunzip notes-mode-xxx.tar.gz; tar xvf notes-mode-xxx.tar; cd notes-mode-xxx). + +
  2. +Run configure (./configure). + +
  3. +Type “make install”. +
+ +

(To control what’s installed where, use –prefix=/where, or +–with-lisp-dir=/where, –datadir=/where (for scripts), +and –infodir=/where.) +

+

For each user: +

    +
  1. +Run notesinit +
+ +

If you have problems with paths being incorrect, please be aware that +you cannot run notes directly out of where you untar it. The +installation process customizes the programs for where things are on +your system. +Make sure you move out of the directory where you untarred it +before running it. +

+ +

The most recent distribution of notes-mode + is always available via + ‘http://www.isi.edu/~johnh/SOFTWARE/NOTES_MODE/’. +

+ + +
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on April 4, 2012 using texi2html 1.82. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode_6.html b/packages/notes-mode/HTML/notes-mode_6.html new file mode 100644 index 000000000..9cbb6d9ca --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode_6.html @@ -0,0 +1,149 @@ + + + + +Notes-mode: Keystroke index + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

Keystroke index

+ +

This index lists notes-mode keystrokes. +

+
Jump to:   C +   +M +   +O +   +R +   +S +   +T +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry Section

C
C-c C-d3.1.3 Encryption
C-c C-e3.1.3 Encryption
C-c C-i3.1.1 Getting around
C-c C-k3.1.1 Getting around
C-c C-n3.1.1 Getting around
C-c C-p3.1.1 Getting around
C-c C-s3.1.2 Subject summary
C-c C-s3.2 Notes indices
C-c<RTN>3.1.1 Getting around

M
M-C-a3.1.1 Getting around
M-C-e3.1.1 Getting around
mouse-22.3 The notes index

O
o3.2 Notes indices

R
RTN2.2 A notes file
RTN2.3 The notes index

S
S-mouse-22.2 A notes file

T
TAB2.2 A notes file

+
Jump to:   C +   +M +   +O +   +R +   +S +   +T +   +
+ + +
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on April 4, 2012 using texi2html 1.82. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode_7.html b/packages/notes-mode/HTML/notes-mode_7.html new file mode 100644 index 000000000..3ad23bdf9 --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode_7.html @@ -0,0 +1,220 @@ + + + + +Notes-mode: Concept index + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+ +

Concept index

+ +

This index lists notes-mode concepts. +

+
Jump to:   . +   +
+C +   +D +   +E +   +F +   +I +   +K +   +M +   +N +   +P +   +R +   +S +   +T +   +U +   +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index Entry Section

.
.notesrc3.3 Notes-mode configuration

C
configuration3.3 Notes-mode configuration
conventions3.1.4 Useful conventions
Crontab2.3 The notes index

D
Decryption3.1.3 Encryption
Directory hierarchy2.4 The notes directories

E
Encryption3.1.3 Encryption

F
Font matter2.2 A notes file

I
imenu3.1.1 Getting around
Intermediate directories2.4 The notes directories

K
key-id3.1.3 Encryption

M
mailcrypt3.1.3 Encryption
mkall2.3 The notes index
mknew3.1.4 Useful conventions

N
Notes directories2.4 The notes directories
Notes entries2.2 A notes file
Notes file permissions2.4 The notes directories
Notes files2.2 A notes file
Notes files2.4 The notes directories
Notes files, font matter2.2 A notes file
Notes index2.3 The notes index
Notes links2.2 A notes file
Notes subjects2.2 A notes file
notes-mode-initialization-program3.1.4 Useful conventions
notesinit2.1 Getting started

P
PAM3.1.3 Encryption
PGP3.1.3 Encryption
PGP Augmented Messaging3.1.3 Encryption
Pretty good privacy3.1.3 Encryption
Pseudo-URLs2.2 A notes file

R
re-indexing2.3 The notes index
Root directory2.4 The notes directories

S
setup2.1 Getting started
Subject summary3.1.2 Subject summary

T
Today3.1.4 Useful conventions

U
URLs2.2 A notes file

+
Jump to:   . +   +
+C +   +D +   +E +   +F +   +I +   +K +   +M +   +N +   +P +   +R +   +S +   +T +   +U +   +
+ + + + +
+ + + + + + + + + + + + +
[ << ][ >> ]           [Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on April 4, 2012 using texi2html 1.82. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode_abt.html b/packages/notes-mode/HTML/notes-mode_abt.html new file mode 100644 index 000000000..067172938 --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode_abt.html @@ -0,0 +1,167 @@ + + + + +Notes-mode: About This Document + + + + + + + + + + + + + + + + + + + + +
[Top][Contents][Index][ ? ]
+

About This Document

+

+ This document was generated by John Heidemann on April 4, 2012 using texi2html 1.82. +

+

+ The buttons in the navigation panels have the following meaning: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Button Name Go to From 1.2.3 go to
[ < ] BackPrevious section in reading order1.2.2
[ > ] ForwardNext section in reading order1.2.4
[ << ] FastBackBeginning of this chapter or previous chapter1
[ Up ] UpUp section1.2
[ >> ] FastForwardNext chapter2
[Top] TopCover (top) of document  
[Contents] ContentsTable of contents  
[Index] IndexIndex  
[ ? ] AboutAbout (help)  
+ +

+ where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure: +

+ +
    +
  • 1. Section One +
      +
    • 1.1 Subsection One-One +
        +
      • ...
      • +
      +
    • +
    • 1.2 Subsection One-Two +
        +
      • 1.2.1 Subsubsection One-Two-One
      • +
      • 1.2.2 Subsubsection One-Two-Two
      • +
      • 1.2.3 Subsubsection One-Two-Three     + <== Current Position
      • +
      • 1.2.4 Subsubsection One-Two-Four
      • +
      +
    • +
    • 1.3 Subsection One-Three +
        +
      • ...
      • +
      +
    • +
    • 1.4 Subsection One-Four
    • +
    +
  • +
+ +
+ + + + + +
[Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on April 4, 2012 using texi2html 1.82. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode_fot.html b/packages/notes-mode/HTML/notes-mode_fot.html new file mode 100644 index 000000000..088f9d64a --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode_fot.html @@ -0,0 +1,85 @@ + + + + +Notes-mode: Footnotes + + + + + + + + + + + + + + + + + + + + +
[Top][Contents][Index][ ? ]
+

Footnotes

+

(1)

+

Trademarked, in Great Britain, Sunone tells me. +

(2)

+

I consider myself pretty anal about this subject, +often typing notes in from paper after-the-fact, +and I certainly don’t manage to back-enter +my notes all time time. +

(3)

+ +

On the other hand, some folks at MIT are working +on this problem from both the hardware and the social side of +things (‘http://wearables.www.media.mit.edu/projects/wearables/’) +(Perhaps they have wild parties with computers, too.) +

(4)

+

My hat is off to Rosa Parks +and the many other normal people who triggered landmark cases. +

(5)

+

If you think I’m missing an alternative, please let me know. +


+ + + + + +
[Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on April 4, 2012 using texi2html 1.82. + +
+ +

+ + diff --git a/packages/notes-mode/HTML/notes-mode_toc.html b/packages/notes-mode/HTML/notes-mode_toc.html new file mode 100644 index 000000000..f03a834bd --- /dev/null +++ b/packages/notes-mode/HTML/notes-mode_toc.html @@ -0,0 +1,111 @@ + + + + +Notes-mode: Table of Contents + + + + + + + + + + + + + + + + + + + + +
[Top][Contents][Index][ ? ]
+

Table of Contents

+ +
+ + + + + +
[Top][Contents][Index][ ? ]
+

+ + This document was generated by John Heidemann on April 4, 2012 using texi2html 1.82. + +
+ +

+ + diff --git a/packages/notes-mode/Makefile.in b/packages/notes-mode/Makefile.in new file mode 100644 index 000000000..cc2c06006 --- /dev/null +++ b/packages/notes-mode/Makefile.in @@ -0,0 +1,205 @@ + +# +# Makefile.in +# (if you're reading Makefile, it's autogenerated from Makefile.in) +# $Id: Makefile.in,v 1.31 2006/01/14 23:26:41 johnh Exp $ +# + +###################################################################### +# +# user configurable parameters +# + +prefix=@prefix@ +# LIB_DIR should be a private place for notes-mode stuff. +LIB_DIR=@datadir@/notes-mode +# EL_DIR should be where your site-specific emacs .el{,c}'s go. +EL_DIR=@lisp_dir@ +# INFO_DIR is for emacs info files. +INFO_DIR=@infodir@ +INSTALL_INFO=@install_info@ +INSTALL_INFO_SECTION=@install_info_section@ + +# must be perl 5.000 or better. +PERL=@perlbin@ +# must be 19 or greater +EMACS=@emacsbin@ + +MKDIR_P=@mkdir_p@ + +# +# end of user configurable parameters +# +###################################################################### + + +INSTALLABLE_OTHERS = \ + README \ + sample.notesrc \ + release + +OTHERS = \ + COPYING \ + Makefile.in \ + configure \ + configure.in \ + install-sh \ + strftime.c \ + notes-mode.texi \ + notes-mode.info \ + notes-mode.ps.gz + +#SRCS = \ +# strftime.c + +#BINS = \ +# strftime + +SCRIPTS = \ + mkall mkindex mkprevnext mkrawindex mkindexcache \ + mkconfig mknew catsubject notesinit setcrontab \ + Notes.pm NotesIndex.pm NotesVars.pm + +ELS = \ + notes-variables.el \ + notes-mode.el notes-index-mode.el \ + notes-url.el notes-aux.el \ + notes-bootstrap.el \ + notes-emacs.el notes-xemacs.el \ + notes-first.el + +ITMP = /tmp/notes-mode + +MY_PERL=/usr/bin/perl +MY_LIB_DIR=/home/johnh/NOTES/BIN +MY_EL_DIR=/home/johnh/LIB/EMACS + +###################################################################### +# +# Compliation stuff. +# + +# all: strftime +# all: strftime + +# strftime: strftime.c + +all: + @echo "nothing required for make; just run \"make install\"" + + +###################################################################### +# +# Installation stuff. +# + +# install_bins: $(BINS) + +install_els: + $(MKDIR_P) $(EL_DIR) + $(MKDIR_P) $(LIB_DIR) + echo '(setq load-path (cons "$(EL_DIR)" load-path))' >.notes-recompile.el + echo '(cd "$(EL_DIR)")' >>.notes-recompile.el + for i in $(ELS); \ + do \ + sed -e 's@$(MY_LIB_DIR)@$(LIB_DIR)@' \ + -e 's@$(MY_EL_DIR)@$(EL_DIR)@' \ + -e 's@$(MY_LIB_DIR)@$(LIB_DIR)@' < $$i >$(EL_DIR)/$$i; \ + echo '(byte-compile-file "'$$i'")' >>.notes-recompile.el; \ + done + @echo Warnings in the elisp compilation can be ignored. + $(EMACS) -q -batch -l .notes-recompile.el + +install_scripts: + for i in $(SCRIPTS); \ + do \ + sed -e 's@$(MY_PERL)@$(PERL)@' \ + -e 's@$(MY_EL_DIR)@$(EL_DIR)@' \ + -e 's@$(MY_LIB_DIR)@$(LIB_DIR)@' < $$i >$(LIB_DIR)/$$i; \ + chmod +x $(LIB_DIR)/$$i; \ + done + +install_others: + cp $(INSTALLABLE_OTHERS) $(LIB_DIR) + +install_info: + $(MKDIR_P) $(INFO_DIR) + cp notes-mode.info $(INFO_DIR)/notes-mode + if test x$(INSTALL_INFO) = xno; \ + then \ + echo 'You must manually add notes mode to your info "dir" file.'; \ + else \ + $(INSTALL_INFO) $(INSTALL_INFO_SECTION) --info-file=notes-mode.info --dir-file=$(INFO_DIR)/dir; \ + fi + + +install_whatnext: + @echo "Once notes-mode is installed, start it by running emacs," + @echo "and then do M-x load-library RET notes-mode RET." + @echo "Or run info notes-mode to read the manual." + + +install: install_els install_scripts install_others install_info install_whatnext + @echo Notes-mode is installed. + + +###################################################################### +# +# Documentation stuff. +# + +notes-mode.info: notes-mode.texi + makeinfo notes-mode.texi + +notes-mode.dvi: notes-mode.texi + texi2dvi notes-mode.texi + +notes-mode.ps.gz: notes-mode.dvi notes-mode.texi + dvips -f notes-mode.dvi |gzip >notes-mode.ps.gz + +html: + test -d HTML || mkdir HTML + ( cd HTML; texi2html -split_chapter ../notes-mode.texi ) + ( cd HTML; texi2html -monolithic ../notes-mode.texi ) + +texi: notes-mode.info notes-mode.dvi notes-mode.ps.gz html + +# Install_www is only for me. +WWW_DIR=$$HOME/LIB/WWW/SOFTWARE/NOTES_MODE +install_www: texi + cp HTML/*.html $(WWW_DIR) + cp notes-mode.ps.gz $(WWW_DIR) + cp notes-mode-`cat release`.tar.gz $(WWW_DIR) + +###################################################################### +# +# Release stuff. +# + +tar.gz: texi + $(MKDIR_P) $(ITMP)-`cat release` + cp $(INSTALLABLE_OTHERS) $(OTHERS) $(ITMP)-`cat release` + mkdir $(ITMP)-`cat release`/HTML + cp -R HTML/. $(ITMP)-`cat release`/HTML + cp $(SCRIPTS) $(ITMP)-`cat release` +# cp $(SRCS) $(ITMP)-`cat release` + for i in $(ELS); do cp $$i $(ITMP)-`cat release`; done +# cp -r SAMPLE $(ITMP)-`cat release` +# echo "dir: $(ITMP)-`cat release`/SAMPLE" >$(ITMP)/notesrc +# ( NOTESRC=$(ITMP)-`cat release`/notesrc; export NOTESRC; $(ITMP)-`cat release`/mkall ) + ( cd /tmp; tar cvf - ./notes-mode-* ) | gzip >notes-mode-`cat release`.tar.gz + rm -rf $(ITMP)-`cat release`/HTML + rm -f $(ITMP)-`cat release`/* + rmdir $(ITMP)-`cat release` + +tar.gz.uu: tar.gz + uuencode notes-mode-`cat release`.tar.gz notes-mode-`cat release`.tar.gz.uu + +RELEASE_DIR=$$HOME/WORKING/JOHNH_WWW/SOFTWARE/NOTES_MODE + +copy_release: + cp notes-mode-`cat release`.tar.gz $(RELEASE_DIR) + mv notes-mode-`cat release`.tar.gz RELEASES + cp HTML/notes-mode/* $(RELEASE_DIR) + cp HTML/notes-mode.html $(RELEASE_DIR) + diff --git a/packages/notes-mode/Notes.pm b/packages/notes-mode/Notes.pm new file mode 100644 index 000000000..f2e3d07b5 --- /dev/null +++ b/packages/notes-mode/Notes.pm @@ -0,0 +1,116 @@ +#!/usr/bin/perl + +# +# Notes.pm +# $Id: Notes.pm,v 1.9 2010/06/20 18:31:22 johnh Exp $ +# +# Copyright (C) 1996-2006 by John Heidemann. +# Comments to . +# +# This file is under the Gnu Public License, version 2. +# For details see the COPYING which accompanies this distribution. +# + +# +# A Perl module implement a notes class. +# + +require 5.000; +package Notes; +use Carp; +use strict; + +#---------------------------------------------------------------------- + +# my($Notes::revsion) = '$Id: Notes.pm,v 1.9 2010/06/20 18:31:22 johnh Exp $'; #' font-lock hack +# my($Notes::VERSION) = 1.00; + +# public method +# optional argument: pathname to read +sub new { + my ($class, $file) = @_; + my $self = bless {}; + if (defined($file)) { + $self->read_from_file($file); + } else { + $self->init(); + }; + return $self; +} + + +# public method +sub read_from_file { + my ($self, $filename) = @_; + + $self->init(); + + open(FILE, "<$filename") || croak "Cannot open $filename"; + my(@lines) = ; + close FILE; + my($i); + my($start, $Subject) = (0, undef); + my(%entries); + + for ($i = 0; $i < $#lines; $i++) { + if ($lines[$i] =~ /^\* / && + $lines[$i+1] =~ /^-+\r?$/) { + $self->push_entry($Subject, join("", @lines[$start .. $i-1])); + $start = $i; + ($Subject) = ($lines[$i] =~ /^\*\s+(.*)\r?$/); + }; + }; + $i = $#lines + 1; + $self->push_entry($Subject, join("", @lines[$start .. $i-1])); + return 1; +} + +# public_method +sub subjects { + my($self) = @_; + return $self->{'subjects'}; +} + +# public method +sub by_subject { + my($self, $Subject) = @_; + my($subject) = lc($Subject); + return wantarray ? () : undef + if (!defined($self->{'entryis_by_subject'}{$subject})); + my(@ret) = (); + foreach (@{$self->{'entryis_by_subject'}{$subject}}) { + push (@ret, $self->{'entries'}[$_]); + }; + return @ret; +} + +# public method +sub prelude { + my($self) = @_; + return $self->{'pre'}; +} + + +# private method +sub push_entry { + my($self, $Subject, $entry) = @_; + if (!defined($Subject)) { + $self->{'pre'} = $entry; + return; + }; + my($subject) = lc($Subject); + push (@{ $self->{'subjects'} }, $Subject); + push (@{ $self->{'entries'} }, $entry); + push (@{ $self->{'entryis_by_subject'}{$subject} }, $#{$self->{'entries'}}); +} + + +# private method +sub init { + my($self) = @_; +# These inits break things. Go figure. +# @{ $self->{'subjects'} } = @{$self->{'entries'}} = (); +# %{ $self->{'entryis_by_subject'} } = (); + $self->{'pre'} = ''; +} + diff --git a/packages/notes-mode/NotesIndex.pm b/packages/notes-mode/NotesIndex.pm new file mode 100644 index 000000000..aead72c01 --- /dev/null +++ b/packages/notes-mode/NotesIndex.pm @@ -0,0 +1,100 @@ +#!/usr/bin/perl + +# +# NotesIndex.pm +# $Id: NotesIndex.pm,v 1.3 2003/05/23 16:26:19 johnh Exp $ +# +# Copyright (C) 1996 by John Heidemann. +# Comments to . +# +# This file is under the Gnu Public License, version 2. +# For details see the COPYING which accompanies this distribution. +# + +# +# A Perl module implement a notes-index class. +# + +package NotesIndex; +use Carp; +use strict; + +require 5.000; +$Notes::revsion = '$Id: NotesIndex.pm,v 1.3 2003/05/23 16:26:19 johnh Exp $'; +$Notes::VERSION = 1.00; + +=head1 NAME + +NotesIndex - a simple class for notes-index files + +=head1 Public Methods + +new, read_from_file, subjects, by_subject, prelude + +=cut +#' # font-lock hack + +#---------------------------------------------------------------------- + + +# public method +sub new { + my ($class, $file) = @_; + my $self = bless {}; + if (!defined($file)) { + $self->init(); + } else { + $self->read_from_file($file); + }; + return $self; +} + + +# public method +sub read_from_file { + my ($self, $filename) = @_; + + $self->init(); + + open(FILE, "<$filename") || croak "Cannot open $filename"; + + while () { + chomp; + $self->push_link($_); + }; + + close FILE; + return 1; +} + +# public_method +sub subjects { + my($self) = @_; + return keys %{$self->{'links_by_subject'}}; +} + +# public method +sub by_subject { + my($self, $subject) = @_; + $subject = lc($subject); + my($resref) = $self->{'links_by_subject'}{$subject}; + return wantarray ? () : undef + if (!defined($resref)); + return wantarray ? @$resref : 1; +} + + +# private method +sub push_link { + my($self, $link) = @_; + my($subject) = ($link =~ m/\d{2}\#\* (.*)$/); + $subject = lc($subject); + push (@{ $self->{'links_by_subject'}{$subject} }, $link); +} + + +# private method +sub init { + my($self) = @_; +} + diff --git a/packages/notes-mode/NotesVars.pm b/packages/notes-mode/NotesVars.pm new file mode 100644 index 000000000..12d491c56 --- /dev/null +++ b/packages/notes-mode/NotesVars.pm @@ -0,0 +1,122 @@ +#!/usr/bin/perl -w + +# +# NotesVars.pm +# $Id: NotesVars.pm,v 1.8 2003/05/23 16:26:22 johnh Exp $ +# +# Copyright (C) 1996 by John Heidemann. +# Comments to . +# +# This file is under the Gnu Public License, version 2. +# For details see the COPYING which accompanies this distribution. +# + +require 5.000; + +# +# basic initialization +# +BEGIN { + no strict 'vars'; # avoid %::notes + $notes{'home'} = ((getpwuid($<))[7]); + my(@config) = `/home/johnh/NOTES/BIN/mkconfig perl`; + die "$0: mkconfig failed\n" if ($#config == -1); + eval join("", @config); + unshift(@INC, $notes{'bin_dir'}); +} + +package NotesVars; +require Exporter; + +@ISA = Exporter; +#my(%notes); +@EXPORT = qw(pathname_to_Ymd Ymd_to_epoch + pathname_to_epoch epoch_to_pathname + url_to_pathname + strftime_epoch + ); +use Time::Local; +use POSIX qw(strftime); +use strict; + + +## +## Strftime +## +## Because "use POSIX" is so slow, I wrote a standalone strftime program. +## I'm not distributing it because mknew caching seems to solve this problem. +## +# +#my($strftime_inited) = 0; +#sub init_strftime { +# my($x); +# # We currently don't support an external strftime. +# if (-x "$::notes{'bin_dir'}/strftime" ) { +# # run the program +# $x = q< +# sub strftime_backend { +# my($output) = `> .$::notes{'bin_dir'} . +# q; +# } else { +# # use POSIX +# # This option is about 10 times slower to load. +# # Unfortunately eval'ing this code causes perl5.002 +# # to crash on exit. +# $x = q< +# use POSIX; +# sub strftime_backend { +# return POSIX::strftime($_[0],localtime($_[1])) ; +# } +# >; +# }; +# eval $x; +# $strftime_inited = 1; +#} +# +#sub strftime_epoch { +# &init_strftime() unless ($strftime_inited); +# return &strftime_backend(@_); +#} + +sub strftime_epoch { + return POSIX::strftime($_[0], localtime($_[1])); +} + +sub pathname_to_Ymd { + my($pathname) = @_; + # NEEDSWORK: not general (assumes file_form is %y%m%d) + my($Y, $m, $d) = ($pathname =~ /(..)(..)(..)$/); + $Y += 1900 if ($Y >= 90 && $Y < 100); + $Y += 2000 if ($Y < 90 && $Y < 100); + return ($Y, $m, $d); +} + +sub Ymd_to_epoch { + my($y, $m, $d) = @_; + $y -= 1900 if ($y > 1000); # convert possible $Y to $y + return timelocal(0, 0, 12, $d, ($m-1), $y); +} + +sub pathname_to_epoch { + my($pathname) = @_; + my($Y, $m, $d) = &pathname_to_Ymd($pathname); + return &Ymd_to_epoch($Y, $m, $d); +} + +sub epoch_to_pathname { + my($epoch) = @_; + return strftime_epoch("$::notes{dir}/$::notes{int_form}/$::notes{file_form}", $epoch); +} + +sub url_to_pathname { + my($url) = @_; + $url =~ s@^file:///@@; + my($home) = $::notes{home}; + $url =~ s@^\~@${home}@; + $url =~ s@\#\* .*$@@; + return $url; +} diff --git a/packages/notes-mode/README b/packages/notes-mode/README new file mode 100644 index 000000000..f4b4dd36a --- /dev/null +++ b/packages/notes-mode/README @@ -0,0 +1,100 @@ + +Notes-mode +---------- +by John Heidemann, + +For documentation, see + notes-mode.info + notes-mode.ps.gz + HTML/notes-mode.html +or + + +WHAT'S NEW IN NOTES-MODE? +------------------------- + +Changed ( 8-Aug-08): version 1.27: + +Change I/O in @file{mkindexcache} to use locale (the sadly correct thing) +rather than forcing utf-8 (the Righteous Path). +Bug report from Geoff Kuenning, a man with an older Unix environment than I. + + +WHAT IS NOTES-MODE? +------------------- + +(From the info documentation) + +Notes-mode is an indexing system for on-line note-taking. +Notes-mode is composed of two parts, the visible part, a major-mode for +emacs to aid note-taking; and the invisible part, scripts which +periodically index your notes for you. + +For more sales, including + Why keep notes? + Why keep notes on-line? + Why keep notes with notes-mode? +see + + +REQUIREMENTS +------------ + +Notes-mode requires emacs or xemacs version 19 or 20 (or possibly +later) and Perl-5. For information: + + emacs http://www.gnu.org/software/emacs/emacs.html + xemacs http://www.xemacs.org + perl http://www.perl.com + + +INSTALLATION +------------ + +First, get notes mode from . + +To install the basic package: + 1. ./configure + 2. make install + +(To control what's installed where, use --prefix=/where, or +--with-lisp-dir=/where, --datadir=/where (for scripts), +and --infodir=/where.) + +For each user: + 1. Run notesinit + (from where it's installed, /usr/local/bin/notesinit + by default) + +If you have problems with paths being incorrect, please be aware that +you CANNOT run notes directly out of where you untar it. The +installation process customizes the programs for where things are on +your system. Make sure you move out of the directory where you +untarred it before running it. + +After you've installed notes mode you're encouraged to subscribe +to the mailing lists: +Send the message "subscribe" to + notes-mode-announce-request@heidemann.la.ca.us and + notes-mode-talk-request@heidemann.la.ca.us. +(Or use majordomo@heidemann.la.ca.us.) + + +COPYRIGHT +--------- + +Notes-mode is Copyright (C) 1994-2002 by John Heidemann, +. Notes-mode comes with ABSOLUTELY NO WARRANTY. This +is free software, and you are welcome to redistribute it under certain +conditions. See the file ``COPYING'' for details about both of these +conditions. + + +CHANGE HISTORY +-------------- + +README: +$Id: README,v 1.21 2008/08/08 20:33:36 johnh Exp $ + +See the changes entry in the texinfo documentation. + diff --git a/packages/notes-mode/catsubject b/packages/notes-mode/catsubject new file mode 100755 index 000000000..30e4213bd --- /dev/null +++ b/packages/notes-mode/catsubject @@ -0,0 +1,112 @@ +#!/usr/bin/perl -w + +# +# catsubject +# $Id: catsubject,v 1.7 2003/05/23 16:26:24 johnh Exp $ +# +# Copyright (C) 1996 by John Heidemann. +# Comments to . +# +# This file is under the Gnu Public License, version 2. +# For details see the COPYING which accompanies this distribution. +# + + +sub usage { + print STDOUT <= 0 && $ARGV[0] eq '-?'); +my(%opts); +&GetOptions(\%opts, qw(m)); +&usage if ($#ARGV < 0); + +#BEGIN { +# $home_dir = ((getpwuid($<))[7]); +# @config = `$home_dir/.notesrc perl`; +# die "$0: missing .notesrc\n" if ($#config == -1); +# eval join("", @config); +# unshift(@INC, $notes{'bin_dir'}); +#} + +use POSIX; +BEGIN { unshift(@INC, "/home/johnh/NOTES/BIN"); }; +use NotesVars; +use Notes; +use NotesIndex; +use strict; + + + +# NEEDSWORK: replace with real argument parsing +my($Subject) = @ARGV; +my($subject) = lc($Subject); +my($match_subject) = ($opts{'m'}); + +my($subject_description) = ($match_subject ? "match on " : "") . $Subject; + + +# +# Say what we're doing. +# +print "\n* What\n------\n\nOutput of:\n\t$0 " . $subject_description . "\n" . + "as of " . localtime(time) . "\n\n\n"; + +my($notes_index) = new NotesIndex($::notes{dir} . "/rawindex"); + + +# +# Match? +# +my(@subjects); +if ($match_subject) { + my($subjects) = (); + my($code) = '$s =~ m{' . $subject . '}'; + my($s); + foreach $s ($notes_index->subjects()) { + if (eval $code) { + push(@subjects, $s); + }; + }; + print "Subjects:\n", join("\n", @subjects), "\n\n"; +} else { + @subjects = ($subject); +}; + +# +# Do it. +# +my($url); +my($s); +foreach $s (@subjects) { + foreach $url ($notes_index->by_subject($s)) { + my($notes) = new Notes(url_to_pathname($url)); + my($entry); + foreach $entry ($notes->by_subject($s)) { + my($this) = "this: <$url>"; + my(@lines) = split(/\n/, $entry); + if ($lines[2] =~ /^prev: /) { + print join("\n", @lines[0..2], $this, @lines[3..$#lines], "\n\n"); + } else { + print join("\n", @lines[0..1], $this, @lines[2..$#lines], "\n\n"); + }; + }; + }; +}; + +exit 0; diff --git a/packages/notes-mode/configure b/packages/notes-mode/configure new file mode 100755 index 000000000..7c707ad4c --- /dev/null +++ b/packages/notes-mode/configure @@ -0,0 +1,3025 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61. +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="mkindexcache" +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +package +emacsbin +perlbin +mkdir_p +lisp_dir +install_info +install_info_section +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) +--with-lisp-dir=path specify a path for where to install .el files + +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +package=notes-mode + +for ac_prog in emacs gemacs xemacs +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_emacsbin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$emacsbin"; then + ac_cv_prog_emacsbin="$emacsbin" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_emacsbin="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +emacsbin=$ac_cv_prog_emacsbin +if test -n "$emacsbin"; then + { echo "$as_me:$LINENO: result: $emacsbin" >&5 +echo "${ECHO_T}$emacsbin" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$emacsbin" && break +done + + +for ac_prog in perl perl5 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_perlbin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $perlbin in + [\\/]* | ?:[\\/]*) + ac_cv_path_perlbin="$perlbin" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_perlbin="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +perlbin=$ac_cv_path_perlbin +if test -n "$perlbin"; then + { echo "$as_me:$LINENO: result: $perlbin" >&5 +echo "${ECHO_T}$perlbin" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$perlbin" && break +done +test -n "$perlbin" || perlbin="no" + +perl_vers=`$perlbin -e 'print $]'` +case $perl_vers in +1234.*) perlbin=no;; +esac +if test "$perlbin" = no; then + { { echo "$as_me:$LINENO: error: $package requires perl 5.0 or later." >&5 +echo "$as_me: error: $package requires perl 5.0 or later." >&2;} + { (exit 1); exit 1; }; } +fi + +{ echo "$as_me:$LINENO: checking mkdir -p" >&5 +echo $ECHO_N "checking mkdir -p... $ECHO_C" >&6; } +if mkdir -p /tmp/mkdir.$$ +then + mkdir_p="mkdir -p " + rmdir /tmp/mkdir.$$ + { echo "$as_me:$LINENO: result: $mkdir_p" >&5 +echo "${ECHO_T}$mkdir_p" >&6; } +elif test -x ./install-sh +then + mkdir_p="./install-sh -d " + { echo "$as_me:$LINENO: result: $mkdir_p" >&5 +echo "${ECHO_T}$mkdir_p" >&6; } +else + { echo "$as_me:$LINENO: result: none found" >&5 +echo "${ECHO_T}none found" >&6; } + { echo "$as_me:$LINENO: WARNING: Couldn't find mkdir -p. You may have to manually mkdir some directories." >&5 +echo "$as_me: WARNING: Couldn't find mkdir -p. You may have to manually mkdir some directories." >&2;} + mkdir_p="mkdir " +fi + + + +prefix_specified=true +if test "x$prefix" = xNONE -o "x$prefix" = xnone +then + # hack for install purposes + prefix=/usr/local + prefix_specified=false +fi + +{ echo "$as_me:$LINENO: checking lisp installation directory" >&5 +echo $ECHO_N "checking lisp installation directory... $ECHO_C" >&6; } + +# Check whether --with-lisp-dir was given. +if test "${with_lisp_dir+set}" = set; then + withval=$with_lisp_dir; lisp_dir=$withval +else + lisp_dir="" +fi + +if test x$lisp_dir = x +then + lisp_dir=`$emacsbin -batch -q -l notes-bootstrap.el -f notes-load-path | grep site-lisp | sed '2,$d'` +fi +if test "x$lisp_dir" = x +then + { echo "$as_me:$LINENO: result: no site-lisp" >&5 +echo "${ECHO_T}no site-lisp" >&6; } + echo " ERROR: could not find site-lisp directory in load-path." + echo " Specify destination for lisp file with --with-lisp-dir=/your/path" + exit 1 +fi +{ echo "$as_me:$LINENO: result: $lisp_dir" >&5 +echo "${ECHO_T}$lisp_dir" >&6; } +if $prefix_specified +then + if test "x$withval" = x + then + echo " WARNING: you gave a prefix of $prefix, but emacs wants lisp" + echo " code in $lisp_dir and so that's where it will be installed." + echo " (Currently --prefix doesn't change where lisp code goes.)" + echo " If you want to force it under your prefix," + echo " then specify the configure option --with-lisp-dir=$prefix/whatever" + fi +fi +if test -w "$lisp_dir" -o ! -d "$lisp_dir" +then + : +else + echo " WARNING: You do not have write permissions to $lisp_dir." + echo " (Where the lisp code will be installed.)" + echo " Please do make install with more privileges (as root?)," + echo " fix permissions on the directory," + echo " or specify a writable destination with --with-lisp-dir=/your/path." +fi + + +{ echo "$as_me:$LINENO: checking script install directory" >&5 +echo $ECHO_N "checking script install directory... $ECHO_C" >&6; } + +{ echo "$as_me:$LINENO: result: $datadir/$package" >&5 +echo "${ECHO_T}$datadir/$package" >&6; } +tdatadir=`eval "echo $datadir"` +if test -w "$tdatadir" -o ! -d "$tdatadir" +then + : +else + echo " WARNING: You do not have write permissions to $datadir ($tdatadir)." + echo " (The program scripts will be installed in $datadir/$package.)" + echo " Please do make install with more priviledges (as root?)," + echo " fix permissions on the directory," + echo " or specify a writable destination with --datadir=/your/path." +fi +{ echo "$as_me:$LINENO: checking info install directory" >&5 +echo $ECHO_N "checking info install directory... $ECHO_C" >&6; } + +{ echo "$as_me:$LINENO: result: $infodir" >&5 +echo "${ECHO_T}$infodir" >&6; } +tinfodir=`eval "echo $infodir"` +if test -w "$tinfodir" -o ! -d "$tinfodir" +then + : +else + echo " WARNING: You do not have write permissions to $infodir ($tinfodir)." + echo " (Where the info documentation will be put.)" + echo " Please do make install with more priviledges (as root?)," + echo " fix permissions on the directory," + echo " or specify a writable destination with --infodir=/your/path." +fi +# Extract the first word of "install-info", so it can be a program name with args. +set dummy install-info; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_install_info+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $install_info in + [\\/]* | ?:[\\/]*) + ac_cv_path_install_info="$install_info" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/sbin:/usr/sbin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_install_info="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_install_info" && ac_cv_path_install_info="no" + ;; +esac +fi +install_info=$ac_cv_path_install_info +if test -n "$install_info"; then + { echo "$as_me:$LINENO: result: $install_info" >&5 +echo "${ECHO_T}$install_info" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +install_info_section='--section=Emacs' +if test x"$install_info" = xno +then + echo " WARNING: Could not find install-info." + echo " you will need to add notes-info.info to" + echo " master file ($infodir/dir) manually." +else + { echo "$as_me:$LINENO: checking debian install-info" >&5 +echo $ECHO_N "checking debian install-info... $ECHO_C" >&6; } + if $install_info --version 2>&1 |grep 'Ian Jackson' >/dev/null + then + install_info=no + echo " WARNING: You appear to have the Debian install info." + echo " Their install-info 1.10.21 has an incompatible usage of --section." + echo " Please get them to fix this problem." + echo " For now, I will install without specifying a section" + install_info_section='' + else + : + fi +fi + + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +package!$package$ac_delim +emacsbin!$emacsbin$ac_delim +perlbin!$perlbin$ac_delim +mkdir_p!$mkdir_p$ac_delim +lisp_dir!$lisp_dir$ac_delim +install_info!$install_info$ac_delim +install_info_section!$install_info_section$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 49; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + + + + esac + +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + diff --git a/packages/notes-mode/configure.in b/packages/notes-mode/configure.in new file mode 100644 index 000000000..a86b93846 --- /dev/null +++ b/packages/notes-mode/configure.in @@ -0,0 +1,157 @@ + +dnl +dnl notes-mode configure.in +dnl Copyright (C) 1997-1998 by John Heidemann +dnl + +dnl Process this file with autoconf to produce a configure script. +AC_INIT(mkindexcache) + +AC_SUBST(package) +package=notes-mode + +dnl +dnl Find emacs +dnl +AC_CHECK_PROGS(emacsbin, emacs gemacs xemacs) + +dnl +dnl Find perl*. +dnl +AC_PATH_PROGS(perlbin, perl perl5, no) +perl_vers=`$perlbin -e 'print $]'` +case $perl_vers in +[1234].*) perlbin=no;; +esac +if test "$perlbin" = no; then + AC_MSG_ERROR($package requires perl 5.0 or later.) +fi + +dnl +dnl mkdir -p +dnl +AC_MSG_CHECKING([mkdir -p]) +if mkdir -p /tmp/mkdir.$$ +then + mkdir_p="mkdir -p " + rmdir /tmp/mkdir.$$ + AC_MSG_RESULT($mkdir_p) +elif test -x ./install-sh +then + mkdir_p="./install-sh -d " + AC_MSG_RESULT($mkdir_p) +else + AC_MSG_RESULT([none found]) + AC_MSG_WARN([ Couldn't find mkdir -p. You may have to manually mkdir some directories.]) + mkdir_p="mkdir " +fi +AC_SUBST(mkdir_p) + +dnl +dnl Generic things +dnl +AC_SUBST(prefix) +prefix_specified=true +if test "x$prefix" = xNONE -o "x$prefix" = xnone +then + # hack for install purposes + prefix=/usr/local + prefix_specified=false +fi + +dnl +dnl Find lisp install +dnl +AC_MSG_CHECKING(lisp installation directory) +AC_ARG_WITH(lisp-dir, --with-lisp-dir=path specify a path for where to install .el files,lisp_dir=$withval,lisp_dir="") +if test x$lisp_dir = x +then + lisp_dir=`$emacsbin -batch -q -l notes-bootstrap.el -f notes-load-path | grep site-lisp | sed '2,$d'` +fi +if test "x$lisp_dir" = x +then + AC_MSG_RESULT(no site-lisp) + echo " ERROR: could not find site-lisp directory in load-path." + echo " Specify destination for lisp file with --with-lisp-dir=/your/path" + exit 1 +fi +AC_MSG_RESULT($lisp_dir) +if $prefix_specified +then + if test "x$withval" = x + then + echo " WARNING: you gave a prefix of $prefix, but emacs wants lisp" + echo " code in $lisp_dir and so that's where it will be installed." + echo " (Currently --prefix doesn't change where lisp code goes.)" + echo " If you want to force it under your prefix," + echo " then specify the configure option --with-lisp-dir=$prefix/whatever" + fi +fi +if test -w "$lisp_dir" -o ! -d "$lisp_dir" +then + : +else + echo " WARNING: You do not have write permissions to $lisp_dir." + echo " (Where the lisp code will be installed.)" + echo " Please do make install with more privileges (as root?)," + echo " fix permissions on the directory," + echo " or specify a writable destination with --with-lisp-dir=/your/path." +fi +AC_SUBST(lisp_dir) + +AC_MSG_CHECKING(script install directory) +AC_SUBST(datadir) +AC_MSG_RESULT($datadir/$package) +tdatadir=`eval "echo $datadir"` +if test -w "$tdatadir" -o ! -d "$tdatadir" +then + : +else + echo " WARNING: You do not have write permissions to $datadir ($tdatadir)." + echo " (The program scripts will be installed in $datadir/$package.)" + echo " Please do make install with more priviledges (as root?)," + echo " fix permissions on the directory," + echo " or specify a writable destination with --datadir=/your/path." +fi +AC_MSG_CHECKING(info install directory) +AC_SUBST(infodir) +AC_MSG_RESULT($infodir) +tinfodir=`eval "echo $infodir"` +if test -w "$tinfodir" -o ! -d "$tinfodir" +then + : +else + echo " WARNING: You do not have write permissions to $infodir ($tinfodir)." + echo " (Where the info documentation will be put.)" + echo " Please do make install with more priviledges (as root?)," + echo " fix permissions on the directory," + echo " or specify a writable destination with --infodir=/your/path." +fi +dnl install-info +AC_PATH_PROG(install_info, install-info, no, $PATH:/sbin:/usr/sbin) +install_info_section='--section=Emacs' +if test x"$install_info" = xno +then + echo " WARNING: Could not find install-info." + echo " you will need to add notes-info.info to" + echo " master file ($infodir/dir) manually." +else + dnl detect debian install-info + AC_MSG_CHECKING(debian install-info) + if $install_info --version 2>&1 |grep 'Ian Jackson' >/dev/null + then + install_info=no + echo " WARNING: You appear to have the Debian install info." + echo " Their install-info 1.10.21 has an incompatible usage of --section." + echo " Please get them to fix this problem." + echo " For now, I will install without specifying a section" + install_info_section='' + else + : + fi +fi +AC_SUBST(install_info_section) + +AC_PROG_INSTALL + +AC_OUTPUT(Makefile) diff --git a/packages/notes-mode/install-sh b/packages/notes-mode/install-sh new file mode 100755 index 000000000..89fc9b098 --- /dev/null +++ b/packages/notes-mode/install-sh @@ -0,0 +1,238 @@ +#! /bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. +# + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +tranformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/packages/notes-mode/mkall b/packages/notes-mode/mkall new file mode 100755 index 000000000..d22a56c4b --- /dev/null +++ b/packages/notes-mode/mkall @@ -0,0 +1,216 @@ +#!/usr/bin/perl -w +# If the above path is incorrect for your system, +# FOLLOW THE INSTALLATION INSTRUCTIONS in README. + +# +# mkall +# $Id: mkall,v 1.18 2007/02/23 05:14:59 johnh Exp $ +# +# Copyright (C) 1996 by John Heidemann. +# Comments to . +# +# This file is under the Gnu Public License, version 2. +# For details see the COPYING which accompanies this distribution. +# + +sub usage { + print STDOUT <= 0 && $ARGV[0] eq '-?')); + +my($perl) = &find_perl_binary; + +# xxx: currently rawindex generates @subjects that index uses. +# Should remove this dependency. +my(@subjects) = (); + +&make_rawindex; +&make_index; +&make_index_cache; +&make_prevnext; +&make_mknew_cache; +&fix_perms; + +exit 0; + + +sub find_perl_binary { + my($perl) = $^X; + return $perl if (-x $perl); + $perl = $Config{'installbin'} . "/perl"; + return $perl if (-x $perl); + # If we can't find perl, then we assume the user's set the #! lines correctly. + return ''; +} + + +sub run_over_all_notes { + my($cmd, $user_cmd_name) = @_; + open(CMD, "| $cmd") || die ("$0: cannot run $user_cmd_name.\n"); + foreach (glob "$::notes{'int_glob'}/$::notes{'file_glob'}") { + print CMD "$_\n"; + }; + close CMD; + if ($? >> 8) { + die "$0: $user_cmd_name failed."; + }; +} + + +# +# rawindex +# +# +# The main thing that happens here is we find and sort the notes entries. +# We do the sorting in perl because the system sort is less portable +# (wrt stability, for example). +# +sub make_rawindex { + chdir ($::notes{'dir'}) || die "$0: cannot cd to $::notes{'dir'}.\n"; + # if (-f "rawindex") { + # rename('rawindex', 'rawindex~') || die "$0: cannot rename rawindex.\n"; + # }; + # my($sed_arg) = '"s@' . $::notes{home} . '@/~@"'; + # system(< rawindex + # END + # if ($? >> 8) { + # rename('rawindex', 'rawindex.bad'); + # rename('rawindex~', 'rawindex'); + # die "$0: rawindex pipeline failed."; + # }; + # + # xxx: eventually this will overflow the buffer and we'll need to + # do something like xargs. However, in 10 years of use this hasn't happened + # for me yet. + run_over_all_notes("$perl $::notes{'bin_dir'}/mkrawindex -X >prerawindex", "mkrawindex"); +# open (IF, "$perl $::notes{'bin_dir'}/mkrawindex $::notes{'dir'}/$::notes{'int_glob'}/$::notes{'file_glob'} |") || die "$0: cannot run mkrawindex\n"; +# binmode IF; + open(IF, "rawindex+") || die "$0: cannot write to rawindex+\n"; + binmode OF; + my($internal_marker) = chr(1); + foreach () { + chomp; + s@$::notes{'home'}@/~@; + my($left, $right) = /^([^#]+)\#(.*)$/; + push(@subjects, "${right}${internal_marker}${left}"); + }; + close IF; + @subjects = sort { uc($a) cmp uc($b) } @subjects; + foreach (0..$#subjects) { + my($left, $right) = ($subjects[$_] =~ /^(.+)${internal_marker}(.*)$/); + $subjects[$_] = "$right#$left"; + print OF "$subjects[$_]\n"; + }; + close OF; + if (-f 'rawindex') { + rename('rawindex', 'rawindex~') || die "$0: rename rawindex{,~} failed.\n"; + }; + rename('rawindex+', 'rawindex') || die "$0: rename rawindex{+,} failed.\n"; +} + +# +# index +# +sub make_index { + if (-f 'index') { + rename('index', 'index~') || die "$0: rename index{,~} failed.\n"; + }; + open (OF, "| $perl $::notes{'bin_dir'}/mkindex > index") || die "$0: cannot run mkindex.\n"; + binmode OF; + my($last); + foreach (@subjects) { + if (!defined($last) || $last ne uc($_)) { + print OF "$_\n"; + $last = uc($_); + }; + }; + close OF; + if ($? >> 8) { + rename('index', 'index.bad') || warn "$0: recovery rename index{,.bad} failed.\n"; + rename('index~', 'index') || warn "$0: recovery rename index{~,} failed.\n"; + die "$0: index pipeline failed."; + }; +} + +# +# index_cache.el +# +# Yes, the code should probably be compiled, +# but compilation time doesn't seem to be the problem. +# +sub make_index_cache { + if (-f 'index_cache.el') { + rename('index_cache.el', 'index_cache.el~') || die "$0: rename index_cache.el{,~} failed.\n"; + }; + system(< index_cache.el +END + # emacs -batch --eval '(byte-compile-file "index_cache.el")' 2>&1 | grep -v 'free variable' + if ($? >> 8) { + rename('index_cache.el', 'index_cache.el.bad') || warn "$0: reanme index_cache.el{,.bad} failed.\n"; + rename('index_cache.el~', 'index_cache.el') || warn "$0: rename index_cache.el{~,} failed.\n"; + unlink('index_cache.elc') if (-f 'index_cache.elc'); + die "$0: index pipeline failed."; + }; + # + # Bug found by Klaus Zeitler : + # if we generate index_cache.el in less than a second, + # it won't be considered up-to-date. + # + if (-M 'index' == -M 'index_cache.el') { + # We're too fast---stall and update the file + sleep(1); # stall + system('touch index_cache.el'); # "update" + }; +} + + +# +# prevnext +# +sub make_prevnext { + run_over_all_notes("$perl $::notes{'bin_dir'}/mkprevnext -X ./rawindex", "mkprevnext"); +} + +# +# mknew cache +# +sub make_mknew_cache { + my($todays_file) = &epoch_to_pathname(time); + system(<./mknew.cache +END +} + +# +# fix permissions +# +sub fix_perms { + my($perm); + foreach (glob("*"), glob("*/*")) { + my($mode) = (stat($_))[2]; + if ($mode & 0077) { + chmod (($mode & 0700), $_) || warn "$0: could not chmod $_.\n"; + }; + }; +} + + diff --git a/packages/notes-mode/mkconfig b/packages/notes-mode/mkconfig new file mode 100755 index 000000000..84e66cc03 --- /dev/null +++ b/packages/notes-mode/mkconfig @@ -0,0 +1,118 @@ +#!/usr/bin/perl -w + +# +# mkconfig +# $Id: mkconfig,v 1.10 2003/05/23 16:26:30 johnh Exp $ +# +# Copyright (C) 1996 by John Heidemann. +# Comments to . +# +# This file is under the Gnu Public License, version 2. +# For details see the COPYING which accompanies this distribution. +# + +sub usage { + print STDOUT < ['path', '~/NOTES'], + 'bin_dir' => ['path', '/home/johnh/NOTES/BIN'], + 'lisp_dir' => ['path', '/home/johnh/LIB/EMACS'], + 'int_form' => ['form', '%Y%m'], + 'file_form' => ['form', '%y%m%d'], + ); + +my($key, $value, %notes); +while (($key, $value) = each %defaults) { + $notes{$key} = $value->[1]; +} + +# +# open the file +# +my($notesrc) = "$home_dir/.notesrc"; +$notesrc = $ENV{'NOTESRC'} if (defined($ENV{'NOTESRC'})); + +if (open (CONFIG, "<$notesrc")) { + while () { + next if (/^\s*#/); + next if (/^\s*$/); + next if (/^\s*exec/); + ($key, $value) = /^\s*([^:]+):\s*(.*)$/; + $notes{$key} = $value; + die("$0: file_form cannot be changed from %y%m%d.\n") + if ($key eq 'file_form' && $value ne '%y%m%d'); + }; + close CONFIG; +}; + +# +# generate extra forms +# +my(%old_notes) = %notes; +while (($key, $value) = each %old_notes) { + next if ($key eq ''); + + # fix forms + if ($defaults{$key}->[0] eq 'form') { + my($oldkey, $oldvalue) = ($key, $value); + $key =~ s/_form/_glob/; + $value =~ s/%Y/[12][90][0-9][0-9]/g; + $value =~ s/%(y|m|d)/[0-9][0-9]/g; + $notes{$key} = $value; + + my($key, $value) = ($oldkey, $oldvalue); + $key =~ s/_form/_regexp/; + $value =~ s/%Y/[12][90]([0-9][0-9])/g; + $value =~ s/%(y|m|d)/([0-9][0-9])/g; + $notes{$key} = $value; + }; +}; +$notes{'url_prefix'} = "file:///$notes{'dir'}/"; + +# +# output +# +#if ($type eq 'perl') { +#} else { +#}; +my($comment) = ($type eq 'perl' ? '# ' : '; '); +print "$comment automatically generated by $0\n"; +while (($key, $value) = each %notes) { + next if ($key eq ''); + + # normalize stuff + if (defined($defaults{$key}) && $defaults{$key}->[0] eq 'path') { + # not absolute or ~, then it's in notes_dir. + $value = "$notes{'dir'}/$value" if ($value !~ m@^[~/]@); + # fix ~ + $value =~ s@^~/@$home_dir/@; + }; + + if ($type eq 'perl') { + print "\$notes{'$key'} = '$value';\n"; + } else { + $key =~ s/_/-/g; + $value =~ s/([()])/\\\\$1/g if ($key =~ /-regexp$/); + print "(defvar notes-$key \"$value\")\n"; + }; +}; + +exit 0; + diff --git a/packages/notes-mode/mkindex b/packages/notes-mode/mkindex new file mode 100755 index 000000000..2ec8ae5b9 --- /dev/null +++ b/packages/notes-mode/mkindex @@ -0,0 +1,41 @@ +#!/usr/bin/perl -w + +# +# mkindex +# $Id: mkindex,v 1.9 2003/05/23 16:26:33 johnh Exp $ +# +# Copyright (C) 1994-1996 by John Heidemann. +# Comments to . +# +# This file is under the Gnu Public License. +# + +sub usage { + print STDERR <index + +Converts a raw index from a notes database into an index +suitable for notes-index-mode in emacs. +END + exit 1; +} + +require 5.000; + +while (<>) { + chomp; + ($date, $subject) = m@/(\d{6})#\* (.*)$@; + warn("could not find date in rawindex line ``$_''.\n"), next if (!defined($date)); + warn("could not find subject in rawindex line ``$_''.\n"), next if (!defined($subject)); + $lcsubject = lc($subject); + $subject{$lcsubject} = $subject; + $list{$lcsubject} = "" if (!defined($list{$lcsubject})); # for -w + $list{$lcsubject} .= "$date, "; +}; + +print "# -*- mode: notes-index -*-\n"; +foreach (sort keys %list) { + # Trim the trailing ", ". + $list{$_} =~ s/, $//; + print "$subject{$_}: $list{$_}\n"; +}; diff --git a/packages/notes-mode/mkindexcache b/packages/notes-mode/mkindexcache new file mode 100755 index 000000000..7f58689d2 --- /dev/null +++ b/packages/notes-mode/mkindexcache @@ -0,0 +1,82 @@ +#!/usr/bin/perl -w + +# +# mkindexcache +# $Id: mkindexcache,v 1.12 2008/08/08 17:41:14 johnh Exp $ +# +# Copyright (C) 1994-2006 by John Heidemann. +# Comments to . +# +# This file is under the Gnu Public License. +# + +sub usage { + print STDERR <index.el + +Converts a processed index into elisp code to intern +the symbols and font-lock the buffer. +END + exit 1; +} + +require 5.006; # for IO handling of :locale + +# Force unicode for input and output. +# Without this requirement, unicode on the input results in incorrect +# (byte-level, not character-level) values of $seek, +# and since emacs' put-text-property is char-level, +# it gets off. +use open ':locale'; # Now let $ENV{LANG} and $ENV{LC_CTYPE} determine input encoding; previously we forced utf8, but not all are pure. + +my(@subjects) = (); +my(@sstart, @send) = (); +my($seek) = 1; + +while (<>) { + if (m@^(.*): \d@) { + push(@subjects, $1); + push(@sstart, $seek); + push(@send, $seek + length($1)); + }; + $seek += length($_); +# my $l1 = length($_); +# my $l2; +# do { use bytes; $l2 = length($_); }; +# print "; $l1 $l2\n"; +}; + +sub round_to_power_of_8 { + my($n) = @_; + return 8 ** (length(sprintf("%o", $n))); +} + +print ";; auto-generated by mkindexcache\n"; +print "(defun notes-index-parse-buffer-cached ()\n"; +my($asize) = round_to_power_of_8($#subjects) - 1; +print " (setq notes-subject-table (make-vector $asize 0))\n"; + +# output intern'ing code +print " (mapcar (function (lambda (a) (intern a notes-subject-table))) '(\n"; +foreach (@subjects) { + my($qsubject) = $_; + $qsubject =~ s/(["\\])/\\$1/g; #" + print "\t\"$qsubject\"\n"; +}; +print " ))\n"; + +# output font-lock code +print " (if notes-use-font-lock\n" . + " (progn\n" . + " (remove-text-properties (point-min) (point-max) '(face nil))\n" . + " (mapcar (function (lambda (a)\n" . + " (put-text-property (car a) (cdr a) 'face notes-bold-face)))\n" . + " '(\n"; +for (0..$#subjects) { + print "\t\t($sstart[$_] . $send[$_])\n"; +}; +print " )))))\n"; + +exit 0; + + diff --git a/packages/notes-mode/mknew b/packages/notes-mode/mknew new file mode 100755 index 000000000..6a32996de --- /dev/null +++ b/packages/notes-mode/mknew @@ -0,0 +1,254 @@ +#!/usr/bin/perl -w + +# +# mknew +# $Id: mknew,v 1.19 2006/01/14 18:28:41 johnh Exp $ +# +# Copyright (C) 1996 by John Heidemann. +# Comments to . +# +# This file is under the Gnu Public License, version 2. +# For details see the COPYING which accompanies this distribution. +# + + +sub usage { + print STDOUT <= 0 && $ARGV[0] eq '-?')); + +require 5.000; +use File::Basename; +BEGIN { unshift (@INC, "/home/johnh/NOTES/BIN"); }; +use NotesVars; +use Notes; +use POSIX qw(strftime); +use strict; + + +# xxx: dumb arg parsing +my($cache) = 0; +if ($ARGV[0] eq '-c') { + $cache = 1; + shift; +}; +&usage if ($#ARGV != 0); +my($date) = @ARGV; +my($date_epoch) = pathname_to_epoch($date); +my($name, $path) = fileparse($date); + + +# +# Constants. +# +my(@days, @months, @short_days, @short_months, $all_days_regexp_switch, $all_months_regexp_switch); +&generate_constants; + +sub generate_constants { + # this stuff is based on the suggestion in perllocale(1) + # The junk at the end is an list that is struct tm; + # things are hardcoded to year 106 == 2006 since Jan 1 is nicely on a Sunday. + foreach (0..6) { + push(@days, strftime("%A", 1,0,0,$_+1,0, 106,$_)); + push(@short_days, strftime("%a", 1,0,0,$_+1,0, 106,$_)); + }; + foreach (0..11) { + push(@months, strftime("%B", 1,0,0,1,$_, 106)); + push(@short_months, strftime("%b", 1,0,0,1,$_, 106)); + }; + $all_days_regexp_switch = join("|", @days, @short_days); + $all_months_regexp_switch = join("|", @months, @short_months); +}; + +my($prev) = &figure_prev($name, $path); + +if ($cache) { + print "mknew.cache 830494922\n$prev\n$date\n"; +}; +my($prev_notes) = new Notes($prev); +&mknew($prev_notes); + + +exit 0; + + +sub figure_prev { + my($name, $path) = @_; + + # Given ${name,path}form, back-compute noon of the current date. + my($epoch) = &pathname_to_epoch("$path/$name"); + + my($tries); + # search back up to a year + for ($tries = 0; $tries < 365; $tries++) { + my($newpathname) = &epoch_to_pathname($epoch); + # print "$newpathname\n"; + return $newpathname if (-f $newpathname); + $epoch -= 24 * 60 * 60; + }; + exit 0; + # die("$0: could not find prior note.\n"); +} + +sub sanitize_note { + my($note, $title) = @_; + $note =~ s/\nprev: <.*>\nnext: <.*>\n/\n/m; + $note =~ s/\* .*\n-+\n//m if ($title); + return $note; +} + +sub infer_day_form { + my($sample) = @_; + return '' if ($sample eq ''); + return '%a' if (length($sample) == 3); + return '%A'; +} + +sub infer_month_form { + my($sample) = @_; + return '' if ($sample eq ''); + return '%b' if (length($sample) == 3); + return '%B'; +} + +sub infer_year_form { + my($sample) = @_; + return '' if ($sample eq ''); + return '%y' if (length($sample) == 2); + return '%Y'; +} + +sub mknew { + my($prev_notes) = @_; + my($pre) = $prev_notes->prelude(); + my(@F); + + # + # Case 1: dates at the beginning + # This convetion in the format ``30-Apr-96 Tuesday'' is in use by johnh, + # and in the format ``30 Apr 1996'' by geoff. + # + # Case 1a: DayName? DayNum Month Year DayName? + @F = ($pre =~ /[\s\n]? + ($all_days_regexp_switch)?(\W+)? + (\d+)(\W+) + ($all_months_regexp_switch)(\W+) + (\d+) + (\W+)?($all_days_regexp_switch)?[\n] + [ ]?(\-+)? + (\n+)/xm); + if ($#F != -1) { + # date heading + # Sigh. Back-infer date format. + foreach (0..$#F) { + $F[$_] = '' if (!defined($F[$_])); + }; + my($form); + $form = &infer_day_form($F[0]) . $F[1] . + "%d" . $F[3] . + &infer_month_form($F[4]) . $F[5] . + &infer_year_form($F[6]) . + $F[7] . &infer_day_form($F[8]); + # This next (bogus) line works around + # a bug in redhat 5.0's perl-5.004-2. + my($x) = sprintf("%x", 10); +# print STDERR "mknew: 1a1b\n"; + my($new_date) = strftime_epoch($form, $date_epoch); + # Hack to fix leading zeros. + # strftime should support something like %!0d. + if ($form =~ /^%d/m && $new_date =~ /^0\d/m) { + $new_date =~ s/^0//m; + }; + print "\n$new_date\n"; + print "" . ("-" x length($new_date)) + if ($F[9] =~ /\-/); + print $F[10]; + }; + # Sigh, reverse month and DayNum + # Case 1b: DayName? Month DayNum Year DayName? + @F = ($pre =~ /[\s\n]? + ($all_days_regexp_switch)?(\W+)? + ($all_months_regexp_switch)(\W+) + (\d+)(\W+) + (\d+) + (\W+)?($all_days_regexp_switch)?[\n] + [ ]?(\-+)? + (\n+)/xm); + if ($#F != -1) { + # date heading + # Sigh. Back-infer date format. + foreach (0..$#F) { + $F[$_] = '' if (!defined($F[$_])); + }; + my($form); + $form = &infer_day_form($F[0]) . $F[1] . + &infer_month_form($F[2]) . $F[3] . + "%d" . $F[5] . + &infer_year_form($F[6]) . + $F[7] . &infer_day_form($F[8]); + my($new_date) = strftime_epoch($form, $date_epoch); + print "\n$new_date\n"; + print "" . ("-" x length($new_date)) . "\n\n" + if ($F[9] =~ /\-/); + print $F[10]; + }; + + # + # Case 2: the "today" entry. + # This convention is in use by johnh. + # + my(@todays) = $prev_notes->by_subject('Today'); + if ($#todays >= 0) { + die ("Too many today entries.\n") + if ($#todays != 0); + print sanitize_note($todays[0], 0); + }; + + # + # Case 3: a day-of-the-week entry. + # This convention is in use by geoff. + # + my($i); + foreach $i (@days) { + my(@entries) = $prev_notes->by_subject($i); + if ($#entries != -1) { + # Generate a raw entry; don't bother to move forward contents. + my($t) = "* " . strftime_epoch("%A", $date_epoch); + print "\n" . + $t . + "\n" . + ("-" x length($t)) . + "\n" . + sanitize_note($entries[0], 1); + }; + }; +} + + diff --git a/packages/notes-mode/mkprevnext b/packages/notes-mode/mkprevnext new file mode 100755 index 000000000..029757073 --- /dev/null +++ b/packages/notes-mode/mkprevnext @@ -0,0 +1,275 @@ +#!/usr/bin/perl -w + +# +# mkprevnext +# $Id: mkprevnext,v 1.22 2007/02/23 05:15:17 johnh Exp $ +# +# Copyright (C) 1994-1996 by John Heidemann. +# Comments to . +# +# This file is under the Gnu Public License. +# + +sub usage { + print STDOUT <) { + chomp; + &reindex_file($_); + } +}; + +exit 0; + +# +# Read the index file. +# Build links of in $index{"$file#$subject","$prevnext"}. +# Assumes that the index is sorted. +# +sub read_index { + local($indexfile) = @_; + local ($file, $subject); + local (@old_sort_order, @sort_order); + local($filesubject, $prevfilesubject) = ('', ''); + + if (-z $indexfile) { + warn("$0: aborted. $indexfile is zero length.\n"); + exit 0; + }; + open(INDEX,"<$indexfile") || die("Cannot open $indexfile"); + binmode INDEX; + ($prevurl, $prevfile, $prevsubject) = ("", "", ""); + @sort_order = ("") x 3; + while () { + chop if (/\n$/); + $url = $_; + ($filehead, $file, $subject) = /^(.*)\/([^#]*)\#(.*)$/; + # Sigh, have to fold things to upper case since sort only + # does that, not to lower case. + $filehead = uc($filehead); + $file = uc($file); + $subject = uc($subject); + $filesubject = "$file#$subject"; + + # verification + die ("Bad index entry: $_") if (!defined($file) || !defined($subject)); + @old_sort_order = @sort_order; + @sort_order = ($subject, $filehead, $file); + foreach $i (0..$#sort_order) { + last if ($sort_order[$i] gt $old_sort_order[$i]); + die ("Index is not in sorted order (entries $i).\n\t$sort_order[$i]\n\t$old_sort_order[$i]\n") + if ($sort_order[$i] lt $old_sort_order[$i]) + }; + + # Skip repeated entries. + if ($filesubject eq $prevfilesubject) { + $count_i{$filesubject}++; + next; + }; + + # Record the links. + $url_i{$filesubject} = $url; + if ($prevsubject eq $subject) { + $link_i{$filesubject,'prev'} = $prevfilesubject; + $link_i{$prevfilesubject,'next'} = $filesubject; + } else { + $link_i{$filesubject,'prev'} = 'none'; + $link_i{$prevfilesubject,'next'} = 'none'; + }; + # Count entries per-file. + $count_i{$filesubject} = 1; + ($prevurl, $prevfile, $prevsubject, $prevfilesubject) = + ($url, $file, $subject, $filesubject); + }; + # Close the last pointer and hacks for null pointers. + $link_i{$prevfilesubject,'next'} = 'none'; + $url_i{'none'} = 'none'; + $count_i{'none'} = 1; + close (INDEX); +} + + +# +# Go through a particular file +# and update its prev/next pointers. +# +sub reindex_file { + local ($fullfile) = @_; + local (@data, $change, $mode, $subject); + local ($mode_lookheader, $mode_expectdash, $mode_expectprev, $mode_expectnext) = (0..99); + local(@olddata); + local (@data, $data, $error); + local ($subject_length, $found_expected_label); + local (%subject_count) = (); + + local($file) = ($fullfile); + $file =~ s@.*/([^/]+)@$1@; # basename + + open(FILE,"<$fullfile") || die("Cannot open $file"); + @olddata = ; + close(FILE); + # $file = uc($file); + $change = 0; + $mode = $mode_lookheader; + # + # Scan through the file, looking for headers. + # There is some context senstivity using $mode. + # + foreach (@olddata) { + if ($mode == $mode_lookheader) { + if (!/^(\* .*)$/) { + # skip simple data + push (@data, $_); + next; + } else { + # header + $subject = uc($1); + $filesubject = "$file#$subject"; + push (@data, $_); + $subject_length = length($_) - 1; + $subject_count{$subject}++; + $mode = $mode_expectdash; + next; + }; + } elsif ($mode == $mode_expectdash) { + if (/^\-+$/) { + # Check and fix dash length. + if (length($_)-1 != $subject_length) { + $_ = ("-" x $subject_length) . "\n"; + $change++; + }; + push (@data, $_); + $mode = $mode_expectprev; + next; + } else { + # warn("warning: subject <$subject> missing dashes in $file.\n") if (!/^\*/); + push (@data, $_); + $mode = $mode_lookheader; + next; + }; + } elsif ($mode == $mode_expectprev) { + $found_expected_label = (/^prev: \<(.*)\>$/) ? 1 : 0; + push (@data, &new_link('prev', $file, $subject, $subject_count{$subject})); + $change++ if (!$found_expected_label || + ($found_expected_label && $data[$#data] ne $_)); + $mode = $mode_expectnext; + if ($found_expected_label) { next; } else { redo; }; + } elsif ($mode == $mode_expectnext) { + $found_expected_label = (/^next: \<(.*)\>$/) ? 1 : 0; + push (@data, &new_link('next', $file, $subject, $subject_count{$subject})); + $change++ if (!$found_expected_label || + ($found_expected_label && $data[$#data] ne $_)); + $mode = $mode_lookheader; + if ($found_expected_label) { next; } else { redo; }; + } else { + die ("bad mode: $mode"); + }; + die("end of loop reached unexpectedly."); + }; + close (FILE); + + return if (!$change); + + warn("Updating file $file.\n") if ($verbose); + warn(" writing backup file ${fullfile}~.\n") if ($verbose); + open(BFILE, ">$fullfile~") || die("Cannot write backup file $fullfile~.\n"); + $data = join("", @olddata); + $error = syswrite(BFILE, $data, length($data)); + die("Backup file failed.\n") unless ($error = length($data)); + + open (FILE, ">$fullfile") || goto abort; + $data = join("", @data); + $error = syswrite(FILE, $data, length($data)); + goto abort unless ($error == length($data)); + close (FILE) || goto abort; + return; + +abort: + close (FILE); # ignore error + warn ("Aborting changes to file $file.\n"); + rename("$fullfile~", "$fullfile") || + die("Could not back-out changes to $file. Old data saved in $file~."); + return; +} + + +sub new_link { + local ($direction, $file, $subject, $srcposition) = @_; + local($filesubject) = "$file#$subject"; + local($other_count); + + # First handle ignorance. + return &format_url($direction,'none') + if (!defined($link_i{$filesubject,$direction})); + + # See if we're in the same file. + if (($direction eq 'prev' && $srcposition > 1) || + ($direction eq 'next' && $srcposition < $count_i{$filesubject})) { + + return &format_url($direction, $url_i{$filesubject}, + $srcposition + $direction_delta{$direction}); + + } else { + # In a different file. Does the other file have multple entries? + $other_count = $count_i{ $link_i{$filesubject,$direction} }; + if ($other_count != 1) { + + return &format_url($direction, + $url_i{ $link_i{$filesubject,$direction} }, + ( $direction eq 'prev' ? $other_count : 1)); + + } else { + # Different file with only one entry. + return &format_url($direction, + $url_i{ $link_i{$filesubject,$direction} } ); + }; + }; +} + +sub format_url { + local($direction, $url, $count) = @_; + $url =~ s/\#\*/#$count*/ if (defined($count)); + return "$direction: <$url>\n"; +} + +## substutite for "uc", if you want to back-port to perl4. +# sub tolower { +# local ($s) = @_; +# $s =~ tr/a-z/A-Z/; +# return $s; +# } diff --git a/packages/notes-mode/mkrawindex b/packages/notes-mode/mkrawindex new file mode 100755 index 000000000..b1777fba4 --- /dev/null +++ b/packages/notes-mode/mkrawindex @@ -0,0 +1,92 @@ +#!/usr/bin/perl -w + +# +# mkrawindex -- index notes files +# $Id: mkrawindex,v 1.17 2007/02/24 01:25:08 johnh Exp $ +# +# Copyright (C) 1994-2006 by John Heidemann. +# Comments to . +# +# This file is under the Gnu Public License, version 2. +# For details see the COPYING which accompanies this distribution. +# + +sub usage { + print STDOUT <index + +require 5.000; +BEGIN { unshift(@INC, "/home/johnh/NOTES/BIN"); }; +use Notes; +use NotesVars; + +my($files_from_stdin) = undef; +if ($ARGV[0] eq '-X') { + $files_from_stdin = 1; + shift @ARGV; +} + +&usage if ($#ARGV == 0 && $ARGV[0] eq '-?'); + +my($opthost) = ""; +# could be localhost to have urls be file://localhost/foo instead of +# file:///foo. + +# +# +# +foreach (@ARGV) { + &add_file_to_index($_); +} +if ($files_from_stdin) { + while () { + chomp; + &add_file_to_index($_); + }; +}; + +exit 0; + + +sub add_file_to_index { + my($fn) = @_; + + # "cannonicalize" the filename + my($cannon_fn) = $fn; + if ($cannon_fn !~ m@^/@) { + $cannon_fn = $::notes{dir} . "/" . $cannon_fn; + $cannon_fn =~ s@^$::notes{home}@/~@; + }; + + my($n) = new Notes($fn); + my($subs_ref) = $n->subjects(); + if (!defined($subs_ref)) { + warn "$0: no subjects for file $fn.\n"; + return; + }; + foreach (@$subs_ref) { + warn("$0: subject $_ in $fn has leading spaces.\n") + if (/^\s$/); + warn("$0: subject $_ in $fn has trailing spaces.\n") + if (/\s$/); + warn("$0: subject $_ in $fn has an embedded number sign---this will cause problems with prev/next entries.\n") + if (/\#/); + print "file://$opthost$cannon_fn#* $_\n"; + }; +} diff --git a/packages/notes-mode/notes-aux.el b/packages/notes-mode/notes-aux.el new file mode 100644 index 000000000..8b5e62eaf --- /dev/null +++ b/packages/notes-mode/notes-aux.el @@ -0,0 +1,117 @@ + +;;; +;;; notes-aux.el +;;; auxiliary functions for notes-mode and friends +;;; $Id: notes-aux.el,v 1.10 2000/03/24 21:36:33 johnh Exp $ +;;; +;;; Copyright (C) 1994,1995,1998 by John Heidemann +;;; Comments to . +;;; +;;; This file is under the Gnu Public License, version 2. +;;; + + +;;; +;;; generic-{beginning,end}-of-defun +;;; I use in tex-mode and notes-mode +;;; + +;;;###autoload +(defun generic-beginning-of-defun (regexp) + "* Go to the beginning of defun identified by REGEXP." + (re-search-backward regexp 0 'to-limit) +) + +;;;###autoload +(defun generic-end-of-defun (regexp) + "* Go to the end of defun identified by REGEXP." + (let + ((restore-point (point))) + (if (looking-at regexp) + (goto-char (match-end 0))) + ;; find next section and leave cursor at section beginning + (if (re-search-forward regexp (point-max) 'to-limit) + (re-search-backward regexp 0 t) + ;(goto-char restore-point) + )) +) + + +;;;###autoload +(defun match-substring (string count &optional default empty-default) + "Given STRING, return the COUNT-th element from the last match. +Returns DEFAULT if there is no such match, +or if the match is empty and EMPTY-DEFAULT is non-nil." + (if (and (match-beginning count) + (or (not empty-default) + (> (match-end count) (match-beginning count)))) + (substring string (match-beginning count) (match-end count)) + default)) + + +;;; +;;; get-{beginning,end}-of-line +;;; Simple functions for a simple world. +;;; + +;;;###autoload +(defun get-beginning-of-line () + "Return the boln as a position." + (save-excursion + (beginning-of-line) + (point))) + +;;;###autoload +(defun get-end-of-line () + "Return the boln as a position." + (save-excursion + (end-of-line) + (point))) + + +;;;###autoload +;(defun notes-format-date (&optional calendar-date) +; "Format the calendar-date-style DATE up to be a notes-format date. +;If no DATE is specified, use today's date." +; (require 'calendar) +; (let* ((date (if calendar-date +; calendar-date +; (calendar-current-date))) +; (month (car date)) +; (day (nth 1 date)) +; (year (nth 2 date))) +; (format "%02d%02d%02d" (- year 1900) month day))) +(defun notes-format-date (&optional time) + "Format the TIME up to be a notes-format date. +If no TIME is specified, use today's date." + (require 'notes-variables) + (if (null time) + (setq time (current-time))) + (format-time-string notes-file-form time)) + +(defun notes-file-to-epoch (file) + "* Convert a notes FILE to an epoch time." + (string-match notes-file-regexp file) + (let + ((y (string-to-int (substring file (match-beginning 1) (match-end 1)))) + (m (string-to-int (substring file (match-beginning 2) (match-end 2)))) + (d (string-to-int (substring file (match-beginning 3) (match-end 3))))) + (if (< y 1900) + (setq y (+ y 1900))) + (if (< y 1970) + (setq y (+ y 100))) + (encode-time 0 0 12 d m y))) + +(defun notes-file-to-url (file &optional tag) + "* Convert a notes FILE to a URL with an optional TAG." + (let + ((epoch (notes-file-to-epoch file))) + (concat + notes-url-prefix + (format-time-string notes-int-form epoch) + "/" + (format-time-string notes-file-form epoch) + (if tag "#* " "") + tag))) + +(provide 'notes-aux) diff --git a/packages/notes-mode/notes-bootstrap.el b/packages/notes-mode/notes-bootstrap.el new file mode 100644 index 000000000..7b009b32b --- /dev/null +++ b/packages/notes-mode/notes-bootstrap.el @@ -0,0 +1,23 @@ + +;;; +;;; notes-bootstrap.el +;;; $Id: notes-bootstrap.el,v 1.2 2000/06/03 17:23:29 johnh Exp $ +;;; +;;; Copyright (C) 1997 by John Heidemann +;;; Comments to . +;;; +;;; This file is under the Gnu Public License. +;;; + +(defun notes-load-path () + "I couldn't get emacs -e '(princ load-path)' to work." + (interactive) + (mapcar + (function + (lambda (a) + (princ a) + (princ "\n") + )) + load-path) +) + diff --git a/packages/notes-mode/notes-emacs.el b/packages/notes-mode/notes-emacs.el new file mode 100644 index 000000000..5c1214bdb --- /dev/null +++ b/packages/notes-mode/notes-emacs.el @@ -0,0 +1,54 @@ + +;;; +;;; notes-emacs.el +;;; $Id: notes-emacs.el,v 1.3 2007/11/06 02:41:21 johnh Exp $ +;;; +;;; Copyright (C) 1998 by John Heidemann +;;; Comments to . +;;; +;;; This file is under the Gnu Public License. +;;; + +;; +;; (FSF) emacs-specific parts of notes-mode. +;; + +(defun notes-platform-bind-mouse (map generic-key fn) + "Map emacs symbols (a no-op)." + (define-key map (vconcat (list generic-key)) fn)) + + +(defun notes-platform-font-lock (new-font-lock-keywords) + "Notes platform-specific font-lock mode." + (require 'font-lock) + (if (>= emacs-major-version 20) + (progn + ;; emacs-20 + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults + (list + new-font-lock-keywords + t + nil + nil + 'beginning-of-line))) + ;; emacs-19 + (make-local-variable 'font-lock-no-comments) + (setq font-lock-no-comments t) + (make-local-variable 'font-lock-keywords) + (setq font-lock-keywords new-font-lock-keywords) + (font-lock-mode 1))) + + +(defun notes-platform-init () + "Init platform-specific stuff for notes-mode." + (if notes-platform-inited + t + (setq notes-platform-inited t) + (if (eq notes-bold-face 'notes-bold-face) + (copy-face 'bold notes-bold-face)))) + +(provide 'notes-emacs) + + + diff --git a/packages/notes-mode/notes-first.el b/packages/notes-mode/notes-first.el new file mode 100644 index 000000000..975c1e9a7 --- /dev/null +++ b/packages/notes-mode/notes-first.el @@ -0,0 +1,39 @@ + +;;; +;;; notes-first.el +;;; $Id: notes-first.el,v 1.5 2006/01/14 23:11:08 johnh Exp $ +;;; +;;; Copyright (C) 2000-2006 by John Heidemann +;;; Comments to . +;;; +;;; This file is under the Gnu Public License, version 2. +;;; + +;; This whole perl5 thing is because rms insists +;; that the USER specify where perl is, not that configure +;; do that at emacs build time. Grumble. +(defvar notes-first-perl5-binary "perl" + "Location of the perl binary to invoke notesinit. (Must be perl v5.)") + +;;; +(defun notes-first-use-init () + "Set up notes mode for the first time for a new user." + ;; note that we CAN'T assume the contents of notes-variables is loaded. + (if (y-or-n-p "Setup notes-mode with defaults ") + (notes-first-run-notes-init) + (error (concat "Please run " notes-utility-dir "/notesinit by hand in a shell to customize defaults.")))) + +;; xxx: eventually we might do something more sophisticated here +;; (like asking the user questions directly). +(defun notes-first-run-notes-init () + "Run notesinit with defaults" + (let* + ((notes-init-cmd (concat notes-utility-dir "/notesinit"))) + (message (concat "Running \"" notes-first-perl5-binary notes-init-cmd "\" to set up notes-mode.")) + (call-process notes-first-perl5-binary nil nil nil notes-init-cmd "-D")) + ;; ok, things are setup, but we want to lead the user to what to do next + ;; => start up on today's note + (message "Notes are now set up. Run M-x notes-index-todays-link to start.")) + +(provide 'notes-first) + diff --git a/packages/notes-mode/notes-index-mode.el b/packages/notes-mode/notes-index-mode.el new file mode 100644 index 000000000..915d87303 --- /dev/null +++ b/packages/notes-mode/notes-index-mode.el @@ -0,0 +1,265 @@ + +;;; +;;; notes-index-mode.el +;;; $Id: notes-index-mode.el,v 1.32 2009/02/04 18:18:45 johnh Exp $ +;;; +;;; Copyright (C) 1994-1998 by John Heidemann +;;; Comments to . +;;; +;;; This file is under the Gnu Public License. +;;; + +(require 'notes-variables) +(require 'notes-aux) + + +(defvar notes-index-mode-map nil) +(if notes-index-mode-map + nil + (setq notes-index-mode-map (make-sparse-keymap)) + ;; There were bindings to make mouse-1 do pointer following, + ;; but I removed it because all the rest of emacs uses mouse-2. + ;; If you want them, add them with notes-index-mode-hook. + (notes-platform-bind-mouse notes-index-mode-map 'mouse-2 'notes-index-mouse-follow-link) + (notes-platform-bind-mouse notes-index-mode-map 'S-mouse-2 'notes-index-mouse-follow-link-other-window) + (define-key notes-index-mode-map "\r" 'notes-index-follow-link) + (define-key notes-index-mode-map "o" 'notes-index-link) + ) + + +(defvar notes-index-lazy-message-old-time 0) + +(defun notes-index-lazy-percent-message (text fraction whole) + "Put up a message occasionally. +Displays TEXT (a format string), with FRACTION of WHOLE +shown as a percentage. (Read the code to see what this +cryptic statement means.)" + (if (= notes-index-lazy-message-old-time + (setq notes-index-lazy-message-old-time (+ 1 (nth 1 (current-time))))) + nil + (message text (/ (* fraction 100) whole)))) + +(defun notes-index-parse-buffer () + "Parse a notes-index buffer, fontifying and building subject completion. + +If fontification is enabled, subjects will be emboldened +and dates will be mouse-highlighted. + +In any event a subject completion table will be built. + +This routine works by calling either \[notes-index-parse-buffer-uncached] +or \[notes-index-parse-buffer-cached] (if possible)." + (interactive) + (let + ((old-buffer-read-only buffer-read-only)) + (setq buffer-read-only nil) + (if (and (file-exists-p (concat notes-dir "/index_cache.el")) + (file-newer-than-file-p (concat notes-dir "/index_cache.el") + (concat notes-dir "/index"))) + (progn + (load (concat notes-dir "/index_cache")) + (notes-index-parse-buffer-cached)) + ;; cache miss + (message "notes-index-parse-buffer: cache is not present or is not up-to-date") + (notes-index-parse-buffer-uncached)) + ;; clean some things up + (message "") + (setq buffer-read-only old-buffer-read-only) + (set-buffer-modified-p nil))) + +(defun notes-index-parse-buffer-uncached () + "Parse a notes-index buffer, fontifying and building subject completion. + +If fontification is enabled, subjects will be emboldened +and dates will be mouse-highlighted. + +In any event a subject completion table will be built. + +Tenses passive will be." + (interactive) + (save-excursion + (let ((start (point-min)) + end subject) + ;; prepare the way + (if notes-use-font-lock + (set-text-properties (point-min) (point-max) nil)) + ;; There used to be problem that we used a fixed obarray length, + ;; creating a lot of hash collisions. Now we dynamically compute it + ;; by rounding up the number of lines to the next power of 8. + (if (and notes-mode-complete-subjects (not notes-subject-table)) + (setq notes-subject-table (make-vector + (- (expt + 8 + (length + (format + "%o" + (count-lines + (point-min) + (point-max))))) + 1) + 0))) + ;; do it + (goto-char start) + (while (< start (point-max)) + ;; find the end-of-line + (end-of-line) + (setq end (point)) + (goto-char start) + + ;; find the subject + (while (not (eq (following-char) ?\ )) + (skip-chars-forward "^:" end) + (forward-char)) + (backward-char) + (if notes-subject-table + (intern (buffer-substring start (point)) notes-subject-table)) + (notes-index-lazy-percent-message "Notes-index'ing (%d%%)..." start (point-max)) + + (if notes-use-font-lock + (progn + ;; highlight the title + (put-text-property start (point) 'face notes-bold-face) + (if notes-index-fontify-dates + (progn + ;; now highlight each date + (skip-chars-forward "^0-9" end) + (while (looking-at "[0-9]") + (setq start (point)) + (skip-chars-forward "0-9") + (put-text-property start (point) 'mouse-face 'highlight) + (skip-chars-forward "^0-9" end)))))) + ;; set up for next line + (forward-line 1) + (setq start (point)))))) + + +(defun notes-index-date-search (start end iter-proc done-proc done-arg) + "Iterate over a notes-index entry bounded by START to END. +Iteration is done by (ITER-PROC END), which leaves match 0 +set to what we're looking for. +A match terminates iteration if (DONE-PROC match DONE-ARG) is non-nil. +Returns the buffer position of a successful hit, or nil." + (goto-char start) + (let (stop) + (while (and (not stop) + (funcall iter-proc end)) + (if (funcall done-proc + (buffer-substring (match-beginning 0) (match-end 0)) + done-arg) + (setq stop (goto-char (match-beginning 0))))) + stop)) + + +(defun notes-index-goto-date (date &optional direction) + "Goto the DATE in the current line of the index file, modified by DIRECTION. +If DIRECTION is 'this, go there. +If DIRECTION is 'next or 'prev, go to the corresponding entry. +If the entry doesn't exist, then go to the nearest entry according +to DIRECTION (and the next one if DIRECTION is 'this)." + (cond + ((eq direction 'prev) + (notes-index-date-search + (get-end-of-line) (get-beginning-of-line) + (function (lambda (end) (re-search-backward notes-file-regexp end t))) + (function (lambda (trial target) (string-lessp trial target))) + date)) + ((eq direction 'next) + (notes-index-date-search + (get-beginning-of-line) (get-end-of-line) + (function (lambda (end) (re-search-forward notes-file-regexp end t))) + (function (lambda (trial target) (string-lessp target trial))) + date)) + (t + (notes-index-date-search + (get-beginning-of-line) (get-end-of-line) + (function (lambda (end) (re-search-forward notes-file-regexp end t))) + (function (lambda (trial target) (string-equal trial target))) + date)))) + +(defun notes-index-link (link &optional tag where) + "* Follow a notes-index LINK. +Optionally takes a subject TAG and +WHERE ('otherwindow or nil) to open the new file." + (interactive "sNotes-index link: ") + (notes-w3-url (notes-file-to-url link tag) where t)) + +;;;###autoload +(defun notes-index-todays-link () + "* Open the notes file for today." + (interactive) + (notes-index-link (format-time-string notes-file-form (current-time)))) + +(defun notes-index-follow-link (pt &optional where) + "Follow a link at PT in notes-index-mode. +The link is taken from the location PT, +and the new information is shown WHERE (either 'otherwindow or not)." + (interactive "d") + (save-excursion + (let (start date tag) + ;; determine the date + (skip-chars-backward "0-9") + (setq start (point)) + (if (not (re-search-forward notes-file-regexp (+ (point) 6) t)) + (error "Not on notes-index-mode link.")) + (setq date (buffer-substring (match-beginning 0) (match-end 0))) + ;; pick out the tag + (beginning-of-line) + (if (not (re-search-forward "^\\([^:]*\\):" start t)) + (error "Not on notes-index-mode link line.")) + (setq tag (buffer-substring (match-beginning 1) (match-end 1))) + ;; make and process the url + (notes-index-link date tag where)))) + +(defun notes-index-mouse-follow-link (e) + "Handle a mouse click in notes-index-mode." + (interactive "e") + (mouse-set-point e) + (notes-index-follow-link (point) nil)) + +(defun notes-index-mouse-follow-link-other-window (e) + "Handle a mouse click in notes-index-mode (other-window)." + (interactive "e") + (mouse-set-point e) + (notes-index-follow-link (point) 'otherwindow)) + +(defun notes-index-extract-subject () + "Extract the notes-index subject for the current line." + (save-excursion + (beginning-of-line) + (if (re-search-forward "^\\(.*\\): " (get-end-of-line) t) + (buffer-substring (match-beginning 1) (match-end 1)) + nil))) + +;;;###autoload +(defun notes-index-mode () + "Notes-index-mode with mouse support. + +You may wish to change notes-bold-face and notes-use-font-lock. + +There should be no need to add notes-index-mode to auto-mode-alist +since the index generation functions add code to the index file +which invokes notes-index-mode. + +Key bindings are: +\\{notes-index-mode-map}" + (interactive) + + (notes-platform-init) + + (setq buffer-read-only nil) + (notes-index-parse-buffer) + (setq major-mode 'notes-index-mode + mode-name "Notes-index") + (use-local-map notes-index-mode-map) + (define-key notes-index-mode-map "\C-c\C-s" 'notes-summarize-subject) + + (if notes-use-font-lock + (notes-platform-font-lock notes-index-font-lock-keywords)) + + (run-mode-hooks 'notes-index-mode-hooks) + ;; No editing is allowed. + (setq buffer-read-only t) +) + +(put 'notes-index-mode 'mode-class 'special) +(provide 'notes-index-mode) diff --git a/packages/notes-mode/notes-mode.el b/packages/notes-mode/notes-mode.el new file mode 100644 index 000000000..e8ad73591 --- /dev/null +++ b/packages/notes-mode/notes-mode.el @@ -0,0 +1,728 @@ + +;;; +;;; notes-mode.el +;;; $Id: notes-mode.el,v 1.71 2009/08/20 20:00:02 johnh Exp $ +;;; +;;; Copyright (C) 1994-2007 by John Heidemann +;;; Comments to . +;;; +;;; This file is under the Gnu Public License. +;;; + +(require 'notes-variables) +(require 'notes-aux) + +(defvar notes-mode-hooks nil + "Hooks to run when entering notes-mode.") +(defvar notes-load-mode-hooks nil + "Hooks to run when entering notes-mode is loaded.") + +(defconst notes-beginning-of-defun-regexp "^\\* .*\n\\-" + "Regexp matching the beginning of notes section.") + +(defvar notes-default-tab-binding nil + "Saved tab binding for notes-complete-subject.") +(defvar notes-default-return-binding nil + "Saved return binding for notes-electric-return.") + + +(defun notes-beginning-of-defun () + "Go to the beginning of a notes ``section''." + (interactive) + (let + ((old-point (point))) + (beginning-of-line) + ;; handle starting on a title + (if (and (looking-at notes-beginning-of-defun-regexp) + (/= (point) old-point)) + nil + (goto-char old-point) + (if (looking-at "^-") ;; handle starting on the underline under a title + (forward-char 1)) + (generic-beginning-of-defun notes-beginning-of-defun-regexp)))) + +(defun notes-end-of-defun () + "Go to the end of a notes ``section''." + (interactive) + (generic-end-of-defun notes-beginning-of-defun-regexp)) + +(defun notes-follow-link (which) + "Go to the WHICH link for this topic. +WHICH is either \"next\" or \"prev\". +If there are no links for the current note, +we go to the last note based upon the index file." + (let + (beginning-of-note + end-of-note + (start-buffer (current-buffer)) + ;; We have to handle links in the same buffer, + ;; so the following code figure out where we go + ;; and returns it out of the save-excursion. + ;; If we end up in another buffer, we let the save-excursion + ;; leave the original buffer unchanged. If we end up in + ;; the same buffer, we need to go wherever we end up. + ;; Can anyone suggest a better way? + (end-buffer-and-point + (save-excursion + (notes-end-of-defun) + (setq end-of-note (point)) + (notes-beginning-of-defun) + (setq beginning-of-note (point)) + (if (and (= beginning-of-note 1) (not (looking-at notes-beginning-of-defun-regexp))) + (progn + ;; When "above" the first note, search to end of first + ;; real note (otherwise end-of-note is just the start + ;; of the first real note and there are no links). + (notes-end-of-defun) + (notes-end-of-defun) + (setq end-of-note (point)) + (goto-char beginning-of-note))) + (if (re-search-forward (concat "^" + (if (eq which 'next) "next" "prev") + ":[ ]+<") end-of-note t) + (progn ; link exists, just take it + (beginning-of-line) + (notes-w3-follow-link (point)) + (cons (current-buffer) (point))) + ;; No link; go through the index file. + (if (notes-goto-index-entry which) + (let ((index-buffer (current-buffer))) + (notes-index-follow-link (point)) + (bury-buffer index-buffer)) + (error "No known notes in that direction.") + (bury-buffer (current-buffer))) + (cons (current-buffer) (point)))))) + ;; Check for going to the same buffer (and the save-excursion + ;; undoing our work). + (if (eq start-buffer (car end-buffer-and-point)) + (goto-char (cdr end-buffer-and-point))))) + + +(defun notes-follow-next-link () + "Go to the next link for this topic." + (interactive) + (notes-follow-link 'next)) + +(defun notes-follow-prev-link () + "Go to the previous link for this topic." + (interactive) + (notes-follow-link 'prev)) + +(defvar notes-complete-subject-abbrevs-alist + '(("SP2010" "USC/Classes/CS551/SP2010") + ("FA2011" "USC/Classes/CS551/FA2011")) + "notes-complete-subject-abbrevs-alist provides simple substitution of subjects. +If subject completion is requested, then subject that matches +the left-side of an alist value is replaced by the right-side value.") + +(defun notes-complete-subject-abbrevs (key) + "Handle abbreviations on notes SUBJECTS. +Currently this is just a hack." + (let ((value (assoc key notes-complete-subject-abbrevs-alist))) + (if value + (car (cdr value)) + key))) + + +(defun notes-complete-subject () + "Complete the notes subject under point." + (interactive) + (let + ((subject (save-excursion + (beginning-of-line) + (notes-extract-subject t))) + old-completion-ignore-case + full-subject) + (if (not (and notes-mode-complete-subjects subject)) + (call-interactively notes-default-tab-binding) + ;; Complete the title. + (if (null notes-subject-table) + (save-excursion + (find-file-noselect (concat notes-dir "/index")))) + ;; Do completion. + ;; Run completer if it's loaded, + ;; otherwise do our own thing. + (setq completion-ignore-case t) + (cond + ((fboundp 'completer-complete-goto) + (completer-complete-goto "^ \t\n\"" " " notes-subject-table nil)) + ;; NEEDSWORK: should try other completers, too. + (t ;; Do our own completion. + (setq full-subject (try-completion subject notes-subject-table) + subject (completing-read "Subject: " + notes-subject-table nil nil + (if (stringp full-subject) + full-subject + subject))) + (delete-region (get-beginning-of-line) (get-end-of-line)) + (insert "* " (notes-complete-subject-abbrevs subject)))) + (setq completion-ignore-case old-completion-ignore-case)))) + +(defun notes-fix-prevnext-this-entry () + "* Fix up the prev link for the current entry, +if necessary. Currently this code only handles brand new entries." + ;; Contributed from Takashi Nishimoto . + ;; Thanks! + (interactive) + (let ((subject (notes-extract-subject nil t)) + (this-url (notes-current-url)) + last-url) + (save-excursion + (set-buffer (find-file-noselect (concat notes-dir "/index"))) + (goto-char (point-min)) + (if (re-search-forward + (concat "^" (regexp-quote subject) ":.* \\([0-9]+\\)$") + (point-max) t) + (save-window-excursion + (cond ((and (notes-w3-url + (notes-file-to-url (match-string 1) subject)) + (re-search-forward "^next: " nil t) + (looking-at "")) + (let + (pre-modified (buffer-modified-p)) + (delete-char 6) + (insert this-url) + (setq last-url (notes-current-url)) + (if (and (null pre-modified) + (>= notes-electric-prevnext 2)) + (save-buffer)))))))) + (if last-url + (progn + (notes-beginning-of-defun) + (forward-line 2) + (if (not (looking-at "prev: ")) + (insert "prev: " last-url "\n" "next: \n\n") + (forward-line 3)))))) + +(defun notes-electric-return (arg) + "* Return, underlining if we're on a subject." + (interactive "*P") + (if (let ((cur-point (point))) + (save-excursion + (beginning-of-line) + (and (not (eq cur-point (point))) ;; normal return if at b-o-ln + (notes-extract-subject t)))) + (progn (notes-underline-line) + (if notes-electric-prevnext + (notes-fix-prevnext-this-entry))) + (call-interactively notes-default-return-binding))) + +(defun notes-current-url () + "* Returns the notes-URL of the current entry around the current point." + (let ((subject (notes-extract-subject nil t)) + (date (file-name-nondirectory buffer-file-name))) + (concat ""))) + +(defun notes-current-url-as-kill () + "* Put the notes-URL of the current entry into the kill ring." + (interactive) + (kill-new (notes-current-url))) + +(defun notes-goto-index-entry (&optional direction) + "* Jump to the index entry corresponding to our current note entry. +If we're not in an entry, we leave you in the index file. +If the current date doesn't exist, error in DIRECTION. +Returns nil if on errors (no index; no date in DIRECTION), +otherwise the point of the hit." + (interactive) + (let ((start-buffer (current-buffer)) + (subject (notes-extract-subject)) ; get subject if on it + (date (if (null (buffer-file-name)) nil + (file-name-nondirectory (buffer-file-name))))) + ;; Try and get the subject, either forward... + (if (not subject) + (save-excursion + (notes-beginning-of-defun) + (setq subject (notes-extract-subject)))) + ;; ...or backwards. + (if (not subject) + (save-excursion + (notes-end-of-defun) + (setq subject (notes-extract-subject)))) + ;; Form and jump to the url for the index-entry. + (if (and (notes-w3-url (concat notes-url-prefix + "index" + (if subject (concat "#" subject) "")) + nil t) + ;; Go to the current date, if any. + (notes-index-goto-date date direction)) + t + nil))) + +(defun notes-extract-subject (&optional relaxed search) + "Extract the subject under the point in the current buffer. +If RELAXED, then accept non-underlined subjects. +If SEARCH we'll search back in the buffer for the nearest +subject title. + +Returns nil if we're not on as subject." + (save-match-data + (cond + ;; directly on a note + ((or (looking-at notes-beginning-of-defun-regexp) + (and relaxed + (looking-at "^\\* "))) + (save-excursion + (let + ((start (+ (point) 2)) + (end (progn (end-of-line) (point)))) + (buffer-substring start end)))) + (search + (save-excursion + (notes-beginning-of-defun) + (notes-extract-subject relaxed nil))) + (t + nil)))) + + +;;;###autoload +(defun notes-underline-line () + "* Create a row of dashes as long as this line, or adjust the current underline." + (interactive) + ;; check to see if it's already underlined + (if (save-excursion + (forward-line 1) + (looking-at "^[ \t]*--*$")) + (notes-old-underline-line) + (progn + (notes-new-underline-line) + (insert "\n\n")))) + +(defun notes-new-underline-line () + "Underline a line with a row of dashes. Moves the point after the dashes. +\\[notes-new-underline-line] reproduces leading spaces." + (interactive) + (let* + ((bol (progn (beginning-of-line) + (point))) + (bospaces (progn (skip-chars-forward " \t") + (point))) + (nospaces (- bospaces bol)) + (eol (progn (end-of-line) + (untabify bol (point)) + (point)))) + (insert "\n" (buffer-substring bol bospaces)) + (insert-char ?- (- eol bospaces)))) + +(defun notes-old-underline-line () + "Replace the following line with a row of dashes. Leave the point unchanged." + (save-excursion + (save-excursion + (forward-line 1) + (delete-region (get-beginning-of-line) (1+ (get-end-of-line)))) + (notes-new-underline-line))) + +(defun notes-mode-initialize-note-from-cache () + "Build a new note from the cache. Returns valid cache contents or nil." + (save-excursion + (let* + ((new-buffer (current-buffer)) + (cache-file (concat notes-dir "/mknew.cache")) + (buf (find-file cache-file)) + magic-line + prev-file + this-file + cache-contents + m + (result + (if (and buf + (>= (count-lines (point-min) (point-max)) 3)) + (progn + ;; If you know a more elegant way to extact the first + ;; three lines of a file, please let me know. + (goto-char (point-min)) + (setq m (point)) + (forward-line 1) + (setq magic-line (buffer-substring m (- (point) 1))) + (setq m (point)) + (forward-line 1) + (setq prev-file (buffer-substring m (- (point) 1))) + (setq m (point)) + (forward-line 1) + (setq this-file (buffer-substring m (- (point) 1))) + (setq cache-contents (buffer-substring (point) (point-max))) + (bury-buffer buf) + ;; is cache valid? + (if + (and + (string-equal magic-line "mknew.cache 830494922") + (file-newer-than-file-p cache-file prev-file) + (string-equal (file-name-nondirectory this-file) + (file-name-nondirectory (buffer-file-name + new-buffer)))) + cache-contents + nil)) + nil))) + ;; Kill the buffer to avoid "buf changed, reload?" warnings. + (if buf + (kill-buffer buf)) + result))) + +(defun notes-mode-initialize-note () + "Fill in an empty new note. +Create any directories as necessary. +Use the mknew cache if possible." + (interactive) + (let + ((dir (directory-file-name (file-name-directory (buffer-file-name))))) + (if (file-exists-p dir) + t + (make-directory dir t) + (message "New intermediate directory created."))) + (if notes-mode-initialization-program + (let + ((cache-contents (notes-mode-initialize-note-from-cache))) + (if cache-contents + (insert cache-contents) + (shell-command-on-region + (point-min) + (point-max) + (concat notes-bin-dir "/" notes-mode-initialization-program " '" + (buffer-file-name) "'") 't))))) + + +;;; +;;; encryption +;;; requires "PEM - PGP Enhanced Messaging for GNU Emacs" +;;; from Roy Frederick Busdiecker, III (Rick) +;;; or mailcrypt 3.4.x or >=3.5.x +;;; + +(defvar notes-encryption-library + 'mailcrypt +; (cond +; ((fboundp 'mc-encrypt-region) 'mailcrypt) +; ((fboundp 'npgp:encrypt-region) 'npgp) +; (t nil)) + "what pgp library to use") + +(defvar notes-encryption-sub-library + 'gpg + "what variant of mailcrypt to use ('pgp 'pgp50 'gpg).") + +(defvar notes-encryption-npgp-userid nil + "PGP key for the current user.") + +(defvar notes-encryption-npgp-key-id nil + "Keyid of PGP key for the current user. +Useful if your \\[user-full-name] doesn't match a unique key. +Should have a leading 0x.") + +(defun notes-encryption-npgp-userid () + "Return notes-encryption-userid, initializing it if necessary." + (require 'pam) + (if (and notes-encryption-userid + npgp:*pass-phrases*) + notes-encryption-userid + (setq notes-encryption-userid + (list + (if notes-encryption-key-id + (npgp:get-key-by-key-id notes-encryption-key-id) + (pam:read-name-key (user-full-name))))))) + +(defun notes-encryption-mailcrypt-keyid () + "Do the right thing." + (require 'mailcrypt) + (cond + ((eq notes-encryption-sub-library 'pgp) + (cdr (mc-pgp-lookup-key mc-pgp-user-id))) + ((eq notes-encryption-sub-library 'pgp50) + (cdr (mc-pgp50-lookup-key mc-pgp50-user-id))) + ((eq notes-encryption-sub-library 'gpg) + (cdr (mc-gpg-lookup-key mc-gpg-user-id))) + (t (error "notes-encryption-decrypt-region: no pgp sub-library.")))) + +(defun notes-encryption-load-mailcrypt () + (require 'mailcrypt) + ;; ick ick ick this code needs to be cleaned up + (cond + ((null (eq notes-encryption-library 'mailcrypt)) + t) + ((eq notes-encryption-sub-library 'pgp) + (load-library "mc-pgp")) + ((eq notes-encryption-sub-library 'pgp50) + (load-library "mc-pgp5")) + ((eq notes-encryption-sub-library 'gpg) + (load-library "mc-gpg")) + (t (error "notes-encryption-load-mailcrypt: no pgp sub-library.")))) + +(defun notes-encryption-decrypt-region (start end) + (cond + ((eq notes-encryption-library 'npgp) + (require 'pam) + (require 'npgp) + (npgp:decrypt-region start end)) + ((eq notes-encryption-library 'mailcrypt) + (notes-encryption-load-mailcrypt) + (cond + ((eq notes-encryption-sub-library 'pgp) + (mc-pgp-decrypt-region start end)) + ((eq notes-encryption-sub-library 'pgp50) + (mc-pgp50-decrypt-region start end)) + ((eq notes-encryption-sub-library 'gpg) + (mc-gpg-decrypt-region start end)) + (t (error "notes-encryption-decrypt-region: no pgp sub-library.")))) + (t (error "notes-encryption-decrypt-region: no pgp library.")))) + +(defun notes-encryption-encrypt-region (start end) + (cond + ((eq notes-encryption-library 'npgp) + (npgp:encrypt-region (notes-encryption-npgp-userid) start end)) + ((eq notes-encryption-library 'mailcrypt) + (notes-encryption-load-mailcrypt) + (let ((old-sign mc-pgp-always-sign) + old-comment recipients) + (setq mc-pgp-always-sign 'never + recipients (list (notes-encryption-mailcrypt-keyid))) + (cond + ((eq notes-encryption-sub-library 'pgp) + (setq old-comment mc-pgp-comment + mc-pgp-comment "") + (mc-pgp-encrypt-region recipients start end + (notes-encryption-mailcrypt-keyid) nil) + (setq mc-pgp-comment old-comment)) + ((eq notes-encryption-sub-library 'pgp50) + (setq old-comment mc-pgp50-comment + mc-pgp50-comment "") + (mc-pgp50-encrypt-region recipients start end + (notes-encryption-mailcrypt-keyid) nil) + (setq mc-pgp50-comment old-comment)) + ((eq notes-encryption-sub-library 'gpg) + (setq old-comment mc-gpg-comment + mc-gpg-comment "") + (mc-gpg-encrypt-region recipients start end + (notes-encryption-mailcrypt-keyid) nil) + (setq mc-gpg-comment old-comment)) + (t (error "notes-encryption-decrypt-region: no gpg sub-library."))) + (setq mc-pgp-always-sign old-sign))) + (t (error "notes-encryption-decrypt-region: no pgp library.")))) + +(defun notes-encrypt-note (prefix) + "Encrypt the current note for the current user. With PREFIX, start from point." + (interactive "P") + (save-excursion + (let (start end) + ;; Unless a prefix arg, start at beginning-of-note. + (if prefix + nil + (if (not (looking-at notes-beginning-of-defun-regexp)) + (notes-beginning-of-defun)) + ;; skip over the header + (while (and (or (looking-at notes-beginning-of-defun-regexp) + (looking-at "^-+$") + (looking-at "^\\(prev\\|next\\): ") + (looking-at "^[ \t]*$")) + (< (point) (point-max))) + (forward-line 1))) + (setq start (point)) + ;; sanity check + (if (re-search-forward "^-----BEGIN PGP MESSAGE" + (progn + (save-excursion + (notes-end-of-defun) + (point))) t) + (error "Note is already encrypted.")) + ;; find the end + (notes-end-of-defun) + (while (or (looking-at notes-beginning-of-defun-regexp) + (looking-at "^[ \t]*$")) + (forward-line -1)) + (forward-line 1) + (setq end (point)) + (notes-encryption-encrypt-region start end)))) + +(defun notes-decrypt-note () + "Decrypt the current note for the current user." + (interactive) + (save-excursion + (if (not (looking-at notes-beginning-of-defun-regexp)) + (notes-beginning-of-defun)) + (if (null (re-search-forward "^-----BEGIN PGP" + (progn + (save-excursion + (notes-end-of-defun) + (point))) t)) + (error "Note is not encrypted.")) + (beginning-of-line) + (let ((start (point))) + (if (null (re-search-forward "^-----END PGP" + (progn + (save-excursion + (notes-end-of-defun) + (point))) t)) + (error "Could not find end of encrypted note.")) + (forward-line) + (beginning-of-line) + (notes-encryption-decrypt-region start (point))))) + + +;;; +;;; notes or notes-index? +;;; +(defun notes-summarize-subject (regexp-subject &optional subject) + "* Collect all of a subject." + (interactive "P") + (require 'notes-index-mode) + (if (null subject) + (cond + ((eq major-mode 'notes-mode) + (setq subject (notes-extract-subject nil t))) + ((eq major-mode 'notes-index-mode) + (setq subject (notes-index-extract-subject))))) + (if (null subject) + (error "notes-summarize-subject: no subject specified or inferable.")) + (let + ((buf (get-buffer-create (concat "*notes on " subject "*")))) + (pop-to-buffer buf) + (erase-buffer) + (apply 'call-process (concat notes-bin-dir "/catsubject") nil buf t + (if regexp-subject + (list "-m" subject) + (list subject))) + (notes-mode))) + + +;;; +;;; notes-rename-subject +;;; +(defun notes-rename-subject () + "* Rename the current subject. +Assumes working next/prev linkage between the entries." + (interactive) + (let ((subject (notes-extract-subject))) + (condition-case nil + (progn + (end-of-line) + (beginning-of-defun) + (if (not (looking-at "* ")) + (error "confused")) + (forward-char 2) + (error "not yet done") + ) + (error nil)))) + + +;;; +;;; notes-mode +;;; + +;; +;; This use of define-derived-mode is a crock---maybe +;; it's better to eval it? +;; suggestions are welcome. ---johnh, 26-Oct-98 +;; +(if (fboundp 'indented-text-mode) + (define-derived-mode notes-mode indented-text-mode "Notes" + "See notes-mode-internal for documentation." + (notes-mode-internal)) + (define-derived-mode notes-mode text-mode "Notes" + "See notes-mode-internal for documentation." + (notes-mode-internal))) + + +(defun notes-mode-internal () + "Enable notes-mode for a buffer. + +Inside a notes buffer one can click on URLs and follow them to +other notes files. + +Notes are fontified if notes-use-font-lock is set. +See the file notes-variables.el for all customization options. +To change options, (require 'notes-variables) in your .emacs +and then change things. + +Subjects in notes mode are lines beginning with an asterisk +and underlined with dashes. Subjects can be completed +with \\[notes-complete-subject] and are automatically underlined. + +You may wish to add this code to your .emacs file: + (setq auto-mode-alist + (cons (cons \"/9[0-9][0-9][0-9][0-9][0-9].?$\" 'notes-mode) + auto-mode-alist)) + (define-key global-map \"\C-cn\" 'notes-index-todays-link) +to automatically enter notes mode. + +I have two suggestions for how to organize your notes files. +First, I collect my notes into a separate file per day. (If you have +fewer notes, you may find once-per-week or month more suitable.) +Second, at the beginning of each file I have a subject \"* Today\". +Since every file has this subject, I can use its prev and next links +to easily move around the collection of files. + +The key-bindings of this mode are: +\\{notes-mode-map}" + (interactive) ;; just so documentation can come up + + (notes-platform-init) + + ;; bug workaround: + ;; Emacs-19.30's define-derived-mode sets up a bogus syntax-table. + ;; (Evidence for the error is ``Wrong type argument: consp, nil'' + ;; when typing in the buffer.) + ;; + ;; bug work-around 2: + ;; Klaus Zeitler + ;; reports that the next line dies in emacs-21.1 with the error: + ;; "Attempt to make a chartable be its own parent". + ;; Work-around: more hackery. + (if (and (< emacs-major-version 21) + (or (>= emacs-major-version 20) (>= emacs-minor-version 30))) + (set-syntax-table (setq notes-mode-syntax-table text-mode-syntax-table))) + + ;; now set up the mode + (auto-fill-mode 1) + + ;; random key-bindings + (define-key notes-mode-map "\M-\C-a" 'notes-beginning-of-defun) + (define-key notes-mode-map "\M-\C-e" 'notes-end-of-defun) + (define-key notes-mode-map "\C-c\C-d" 'notes-decrypt-note) + (define-key notes-mode-map "\C-c\C-e" 'notes-encrypt-note) + (define-key notes-mode-map "\C-c\r" 'notes-w3-follow-link) + (define-key notes-mode-map "\C-c\C-p" 'notes-follow-prev-link) + (define-key notes-mode-map "\C-c\C-n" 'notes-follow-next-link) + (define-key notes-mode-map "\C-c\C-i" 'notes-goto-index-entry) + (define-key notes-mode-map "\C-c\C-k" 'notes-current-url-as-kill) + (define-key notes-mode-map "\C-c\C-s" 'notes-summarize-subject) + (define-key notes-mode-map "\C-c-" 'notes-underline-line) + (if (null notes-default-tab-binding) + (setq notes-default-tab-binding (key-binding "\t"))) + (define-key notes-mode-map "\t" 'notes-complete-subject) + (if (null notes-default-return-binding) + (setq notes-default-return-binding (key-binding "\r"))) + (define-key notes-mode-map "\r" 'notes-electric-return) + (define-key notes-mode-map "\n" 'notes-electric-return) ; a more common synonym + (notes-platform-bind-mouse notes-mode-map 'S-mouse-2 'notes-w3-follow-link-mouse) + + ;; imenu stuff + (make-variable-buffer-local 'imenu-prev-index-position-function) + (make-variable-buffer-local 'imenu-extract-index-name-function) + (setq imenu-prev-index-position-function 'notes-beginning-of-defun) + (setq imenu-extract-index-name-function 'notes-extract-subject) + + (if notes-use-font-lock + (notes-platform-font-lock notes-font-lock-keywords)) + + ;; finally, try to fill in an empty note + (if (eq (point-min) (point-max)) + (notes-mode-initialize-note)) + + ;; Enable outline-minor-mode (forcebly, in case someone already + ;; has it in their text-mode hook). Bug found by + ;; Nils Ackermann . + (if notes-use-outline-mode + (outline-minor-mode 1)) + + (delay-mode-hooks + (run-mode-hooks 'notes-mode-hooks))) + + + + +;;; + +(run-hooks 'notes-mode-load-hooks) +(provide 'notes-mode) + diff --git a/packages/notes-mode/notes-mode.info b/packages/notes-mode/notes-mode.info new file mode 100644 index 000000000..db238809d --- /dev/null +++ b/packages/notes-mode/notes-mode.info @@ -0,0 +1,1256 @@ +This is notes-mode.info, produced by makeinfo version 4.13 from notes-mode.texi. + +START-INFO-DIR-ENTRY +* Notes-mode: (notes-mode). Organizing on-line note-taking. +END-INFO-DIR-ENTRY + + Notes-mode: Organizing on-line note-taking. + + This file documents notes-mode, a package for organizing on-line +note-taking. + + Copyright (C) 1994-1996 by John Heidemann + + Permission is granted to make and distribute verbatim copies of this +manual provided the copyright notice and this permission notice are +preserved on all copies. + + Permission is granted to copy and distribute modified versions of +this manual under the conditions for verbatim copying, provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + + Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be stated in a +translation approved by John Heidemann. + + +File: notes-mode.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) + + This file documents notes-mode, a package for organizing on-line +note-taking. This is edition $Revision: 1.40 $, for notes-mode version +1.16, last updated $Date: 2010/06/20 18:30:34 $. + +* Menu: + +* Introduction:: +* Basics:: +* Advanced Features:: +* History:: +* Installation:: +* Keystroke index:: +* Concept index:: + + --- The Detailed Node Listing --- + +Introduction + +* What is it?:: +* Why keep notes at all?:: +* Why keep notes on-line?:: +* Why use notes-mode?:: +* Y2K Statement:: +* Related work:: +* Staying on top:: + +Basics + +* Getting started:: +* A notes file:: +* The notes index:: +* The notes directories:: + +Advanced Features + +* Notes files:: +* Notes indices:: +* Notes-mode configuration:: + +Notes files + +* Getting around:: +* Subject summary:: +* Encryption:: +* Useful conventions:: + +History + +* Notes-mode history:: +* Credits:: +* Changes:: + + +File: notes-mode.info, Node: Introduction, Next: Basics, Prev: Top, Up: Top + +1 Introduction +************** + +What is notes-mode and why should you (perhaps) use it? + +* Menu: + +* What is it?:: +* Why keep notes at all?:: +* Why keep notes on-line?:: +* Why use notes-mode?:: +* Y2K Statement:: +* Related work:: +* Staying on top:: + + +File: notes-mode.info, Node: What is it?, Next: Why keep notes at all?, Prev: Introduction, Up: Introduction + +1.1 What is it? +=============== + +Notes-mode is an indexing system for on-line note-taking. Notes-mode +is composed of two parts, the visible part, a major-mode for emacs to +aid note-taking; and the invisible part, scripts which periodically +index your notes for you. + + Note that notes-mode provides tools to "index" your notes, not to +"search" them. (Other existing tools such as `grep', `agrep', and +`glimpse' already allow file search.) + + A digression about indexing vs. searching: Indexing in this sense +means organize them according to categories you give, while searching +looks through all text for arbitrary strings. Drawing on the World +Wide Web for examples, Yahoo (`http://www.yahoo.com/') is an index, +while Alta Vista (`http://www.altavista.digital.com/') is a +search-engine. In (potentially) more familiar terms, the yellow pages +(1) are an index, while directory information (411 in the USA) is sort +of a search-engine. + + ---------- Footnotes ---------- + + (1) Trademarked, in Great Britain, Sunone tells me. + + +File: notes-mode.info, Node: Why keep notes at all?, Next: Why keep notes on-line?, Prev: What is it?, Up: Introduction + +1.2 Why keep notes at all? +========================== + +So why should you use notes-mode? Well, first, consider why you should +(perhaps) keep your notes on line. First, I assume that you take notes +as part of your work or school. If you don't, you can stop reading now +and go back to watching TV. + + If you keep notes, ask yourself why you keep them. Reasons vary for +different people, but some include: + + * To remember what is said or done. + + * To focus on what is important about what is said. + + * To provide proof of having done something at a particular time or + date. + + * I know there were other reasons here, but they slipped my mind. + + +File: notes-mode.info, Node: Why keep notes on-line?, Next: Why use notes-mode?, Prev: Why keep notes at all?, Up: Introduction + +1.3 Why keep notes on-line? +=========================== + +OK, I've talked you into keeping notes. Why do it on-line? Again, +there are different reasons for different people. If you don't want to +consider keeping your notes on-line, you're welcome to go back to your +(clay tablets) paper notes. + + However, if you do much of your work on-line, or if you have +portable computer, then you might want to consider keeping your notes +on-line. + + * It's faster to type than write, and possibly more legible at high + speed. + + * Often information is already on-line. For example, in software + development, bug reports, measurement results, and everything else + that's useful is on-line. + + * You can take down more detail than you otherwise would (especially + if the data is already on-line). Taking more copious notes can be + helpful when you go back to figure out why that strange thing was + happening. + + * On-line notes are easy to search. Full-text search with grep, + agrep, and glimpse are all much faster and are often more accurate + than paging through paper notes looking for a particular keyword. + + * On-line notes are easy to index. (At least with notes-mode!) In + addition to full-text search, it's helpful to organize notes by + category. If you keep a table-of-contents of your paper notes, + you are either extremely fastidious or a librarian (Nadia?). + + * You can keep all of your notes with you at all times (if you have + a portable computer). Even at a page a day, paper notes quickly + become bulky and awkward to carry around. On-line notes fit on + your computer's hard disk, an extraordinarily compact medium by + comparison. + + * Your notes can be automatically backed up. Paper notes can become + damaged with time, and as a graduate student one of my fears was + fire in Boelter Hall consuming all my research experiments and and + therefore hopes of a degree. Electronic notes are extremely easy + to duplicate and can be automatically backed up with the rest of + your computer. (You _do_ back up your computer, don't you?) + + + While these advantages are undoubtedly clear to any right-thinking +computer user, it should be said that there are a few disadvantages for +on-line note-taking. + + * If you don't have a computer with you most of the time, it's + difficult take notes on-line (because you're off-line, of course). + (1) + + * Computers require power. If your portable computer runs out of + juice, you're on your own. Corollary: watch your power, or bring + paper. Better corollary: watch your power, _and_ bring paper. + + * Social limitations. It's not always socially acceptable to take + notes-on-line. For example, at a party, few people would use a + computer to take down the phone number of a person to whom they're + attracted (at least, if they wanted the attraction to be mutual). + (2) Sometimes other people find the sound of typing distracting. + + * Health issues. Repetitive stress injuries do occur writing + (slower) by hand is at least an alternate motion than typing. + + * Legal limitations. If you want to use your electronic notes to + justify a patent or invention, you may be breaking legal ground. + Being on the legal cutting-edge is rarely an easy thing for the + person involved.(3) + + + ---------- Footnotes ---------- + + (1) I consider myself pretty anal about this subject, often typing +notes in from paper after-the-fact, and _I_ certainly don't manage to +back-enter my notes all time time. + + (2) On the other hand, some folks at MIT are working on this problem +from both the hardware and the social side of things +(`http://wearables.www.media.mit.edu/projects/wearables/') (Perhaps +they have wild parties with computers, too.) + + (3) My hat is off to Rosa Parks and the many other normal people who +triggered landmark cases. + + +File: notes-mode.info, Node: Why use notes-mode?, Next: Y2K Statement, Prev: Why keep notes on-line?, Up: Introduction + +1.4 Why use notes-mode? +======================= + +OK, I've sold you on note-taking and even on on-line note-taking. What +about notes-mode? Naturally, it slices, dices, and makes julienne +fries. But wait, there's more: + + * It automates indexing your notes, linking notes with the same + subject together. + + * It supports embedded links, allowing you to manually link together + different topics and external files. + + * It includes a number of convenience-features in emacs. Subjects + can be completed based on existing subjects. The usual emacs + customization mechanisms are available. + + * Notes containing sensitive information can be encrypted. + + * Notes-mode seems better than the other, currently available + alternatives. + + What are the alternatives? I'm glad you asked. (1) + + * *HTML*. HTML has better formatting capabilities than notes-mode, + and it has excellent linking capabilities. Unfortunately, HTML's + tags are fairly intrusive (each is at least four characters long + and most come with a pair), tags can get confused with normal + text, errors in HTML can be bad (obscuring data), and there's no + automatic indexing feature (at least with plain HTML). Besides, + all data should be kept as close to the ASCII from whence it came, + as God Intended (hi, Steve). + + * *Word Processors*. Word processors are strong in the formatting + department, but most don't really have linking capabilities, and + have poor or restricted indexing. + + + ---------- Footnotes ---------- + + (1) If you think I'm missing an alternative, please let me know. + + +File: notes-mode.info, Node: Y2K Statement, Next: Related work, Prev: Why use notes-mode?, Up: Introduction + +1.5 Y2K Statement +================= + +Notes mode uses dates extensively, both two-digit years and +seconds-since-1970. However, notes-mode has been coded to function +correctly through the year 2038. + + To avoid problems with the year 2000, notes-mode assumes that any +two-digit years before "70" are 20xx, not 19xx. Notes-mode should +therefore work correctly in both the year 1999 and 2000. + + (Notes-mode 1.17 released February 1999 fixes a lingering Y2K +problem.) + + Because notes-mode uses seconds-since-1970 for some date calculations +it will fail beyond the year 2038 on computers with 32-bit integers. + + If I'm still using notes-mode then on a 32-bit machine I'll see what +I can do. + + +File: notes-mode.info, Node: Related work, Next: Staying on top, Prev: Y2K Statement, Up: Introduction + +1.6 Related work +================ + +What would a document be without related work? + + Notes-mode is not related in any way to Lotus Notes. + + I am told (by David Weisman) that it's something like the now +defunct Lotus Agenda. + + Ashvin Goel, one of the contributors to notes-mode, has gone off +and done a from-scratch reimplementation called records-mode. It's +very similar to notes mode, and emphasizes on-the-fly updates to entry +links but lacks a manual. You may want to check it out at +`http://www.cse.ogi.edu/~ashvin/software.html'. + + Hyperbole (by Bob Weiner) offers better linking facilities than +notes-mode, but it has a bunch of stuff notes-mode doesn't need and +it's missing notes-specific indexing provided by notes-mode. For +people already using Hyperbole it would be interesting to replace +notes-mode's linking with Hyperbole's. Contributions in this area are +welcome, provided they make Hyperbole optional. + + +File: notes-mode.info, Node: Staying on top, Prev: Related work, Up: Introduction + +1.7 Staying on top +================== + +The most recent distribution of notes-mode is always available via +`http://www.isi.edu/~johnh/SOFTWARE/NOTES_MODE/'. + + After you've installed notes mode you're encouraged to subscribe to +the mailing lists. To subscribe, go to the web page Send the message +"subscribe" to +`http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-announce' or +`http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-talk'. + + The announce list will contain only release announcements and so is +guaranteed to be very low bandwidth. + + +File: notes-mode.info, Node: Basics, Next: Advanced Features, Prev: Introduction, Up: Top + +2 Basics +******** + +All you need to use notes-mode in a chapter. (Except for +installation, *Note Installation::.) + +* Menu: + +* Getting started:: +* A notes file:: +* The notes index:: +* The notes directories:: + + +File: notes-mode.info, Node: Getting started, Next: A notes file, Prev: Basics, Up: Basics + +2.1 Getting started +=================== + +To get started with notes-mode, read the introduction this chapter, +then either: + + * Start emacs, do `M-x' `load-library' `RET' `notes-mode' `RET' + This approach will set up notes-mode with the default parameters. + + * OR, from the shell, run the program `notesinit'. This approach + will ask you some questions about how you want to configure notes + mode. + + + Either way these should set up everything notes-mode needs. This +program will modify your environment (as described in this section), +or it will give you the exact commands you should run yourself. + + After you've done one of these, start up emacs and note-away. I +usually begin a day of note-taking by running the command `M-x' +`notes-index-todays-link' to jump directly to today's note. You may +even wish to bind this to something, perhaps with `(define-key +global-map "\C-cn" 'notes-index-todays-link)' in your `.emacs'. + + If you want to browse your existing notes, you might instead want +to edit the `~/NOTES/index'. (What is a notes file and the index? +Hurry up and finish reading this chapter.) + + +File: notes-mode.info, Node: A notes file, Next: The notes index, Prev: Getting started, Up: Basics + +2.2 A notes file +================ + +The notes file is the focus of most of the activity in notes-mode, +it's where you take your notes. Notes files are mostly free-form text +broken up into "entries". Here's an example: + + 8-Jun-95 Thursday + ----------------- + + * Today + ------- + prev: + next: + + next week - release notes-mode + + + * Environment/notes + ------------------- + + I explained notes mode to Ashvin and Geoff. + ... + + Each entry has a subject-block, (maybe) some links, and then (maybe) +some text. + + The subject-block must begin with an asterisk-space (`* ') at the +beginning of a line, followed by the subject itself. Subjects must be +underlined with a row of dashes (if they're not exact, that's OK; +notes-mode will fix them periodically). For convenience, notes-mode +will automatically add the underlines when you hit `' +(`notes-electric-return'), and `' on a partially completed +subject will invoke completion based on indexed subjects +(`notes-complete-subject'). + + Following the subject may be links. (In the example, the "Today" +entry has links, the "Environment/notes" entry doesn't.) These links +will be automatically updated by notes-mode when your notes are +re-indexed; just leave a blank line when writing the note. + + Links are made with pseudo-URLs, sort of like those in the World +Wide Web. Any of these URLs can be followed in notes-mode files by +clicking `S-mouse-2' on the pseudo-URL (`notes-w3-follow-link-mouse'). + + Finally comes the text. Go wild, but just don't include text that +looks like a subject. You can embed pseudo-URLs to link notes together +manually. + + The more anal of you may have noticed that the lines before the +first subject are not part of any entry. These lines are "front +matter". They're not usually used for much, but they can be a good +place to label the file. + + There are a number of useful conventions that can be adopted to +organize your notes. The most common is the "Today" entry. If you +keep an entry with the same subject at the beginning of each file, +you link all of your notes together. Notes-mode will help you out with +some of these convetions by automatically creating or copying some +fields for you; see *note Useful conventions:: for details. + + Finally, notes-mode can also work with outline-minor-mode (thanks +to Tim Carroll for pointing this out). Outline-mode supports hiding +and revealing text and other helpful features beyond the scope of this +document. *Note Outline Mode: (emacs)Outline Mode, for details. + + +File: notes-mode.info, Node: The notes index, Next: The notes directories, Prev: A notes file, Up: Basics + +2.3 The notes index +=================== + +The notes index lists all subjects you've kept notes about, and each +date of each note. Impress your friends, show your advisor why you're +worth the _big_ peanuts, you'll soon have the biggest index of all. + + The index has one line per subject, listing the subject and each +day a note was made about that subject. For example: + + Bicycle: 950314, 950316 + Bicycle/maintenance/books: 951028 + Bridge/hands: 951113, 951114, 951116, 951117 + Bridge/UCLA: 960222, 960409 + + Clicking on any of the dates with `mouse-2' will take you to that +note (`notes-index-mouse-follow-link'). (You can also move the point +over the date and hit `' if you're musaphobic +[`notes-index-follow-link'].) + + The notes index is automatically updated by the program `mkall'. +Typically `mkall' is run nightly by `cron'. On most modern versions of +Unix, you can add this command to cron by running `crontab -e' and +adding the line: + + 0 4 * * * /usr/local/lib/notes-mode/mkall + + (Assuming that your notes programs are installed in +/usr/local/lib/notes-mode, the default location.) + + +File: notes-mode.info, Node: The notes directories, Prev: The notes index, Up: Basics + +2.4 The notes directories +========================= + +The final thing needed to tie basic notes-mode together his how the +pieces fit together. Since my graduate work is in file systems, you +can bet that directories are involved. + + Notes-mode keeps its files in a two-level hierarchy: + + ~/NOTES + ~/NOTES/index + ~/NOTES/rawindex + ~/NOTES/199603 + ~/NOTES/199603/960329 + ~/NOTES/199603/960330 + ~/NOTES/199604 + ~/NOTES/199604/960401 + + The top level, `~/NOTES', is the notes directory. It keeps all +notes in one place. (The name of this directory is configurable, *Note +Notes-mode configuration::.) + + Inside the notes directory are two files and a number of directories. +The files are `index', the index of all entries (*note The notes +index::), and `rawindex', used internally. + + The notes directory also contains a number of subdirectories, +sometimes called "intermediate directories". These directories group +the actual notes files into manageable chunks, keeping any directory +from getting too large. Intermediate directories are named by the +four-digit year and the two-digit month of the entries they contain. +(The format of intermediate directories is configurable, *Note +Notes-mode configuration::.) + + Finally, each intermediate directory are the notes files themselves, +named according to the two-digit year, month, and day-of-month. + + For the most part, notes-mode will automatically maintain this +organization of files, once you create the top-level directory. +Notes-mode will also automatically insure that all files in the notes +directory are unreadable by anyone other than their owner. Notes are +personal things. (This behavior is not currently configurable, but it +probably should be.) + + +File: notes-mode.info, Node: Advanced Features, Next: History, Prev: Basics, Up: Top + +3 Advanced Features +******************* + +Notes-mode, the minutiae, and some other good stuff. + +* Menu: + +* Notes files:: +* Notes indices:: +* Notes-mode configuration:: + + +File: notes-mode.info, Node: Notes files, Next: Notes indices, Prev: Advanced Features, Up: Advanced Features + +3.1 Notes files +=============== + +* Menu: + +* Getting around:: +* Subject summary:: +* Encryption:: +* Useful conventions:: + + +File: notes-mode.info, Node: Getting around, Next: Subject summary, Prev: Notes files, Up: Notes files + +3.1.1 Getting around +-------------------- + +Moving between notes entries and around the hierarchy is fairly common, +so there are some accelerators. + +`C-c C-i' + Jump to the index entry for the current entry's subject + (`notes-goto-index-entry'). + +`C-c C-n' + +`C-c C-p' + Move to the next or prior note with the same subject + (`notes-follow-next-link' and `notes-follow-prev-link'). These + functions follow the links in the note, if they're defined. If + not, they look through the index file. This approach usually + works, but will fail if there are multiple new entries created + with the given subject between when the index is recomputed. + +`C-c' + Follow the link under the point (`notes-w3-follow-link'), a + keyboard equivalent of . + +`M-C-a' + +`M-C-e' + Jump to the beginning or end of the current note entry + (`notes-beginning-of-defun' and `notes-end-of-defun'). + +`C-c C-k' + Copies the pseudo-URL for the current note into the kill-ring + (`current-url-as-kill'). To link two entries, go to the target, + grab its URL with `C-c C-k', go to where you want to make the + link, and yank the URL with `C-y'. + + + Notes mode supports imenu, if you have it bound to something (I +use `(global-set-key [down-mouse-3] 'imenu)'). + + +File: notes-mode.info, Node: Subject summary, Next: Encryption, Prev: Getting around, Up: Notes files + +3.1.2 Subject summary +--------------------- + +It's often helpful to look at all entries for a given subject `C-c C-s' +collects all entries with the subject of the current entry in a new +buffer (`notes-summarize-subject'). + + +File: notes-mode.info, Node: Encryption, Next: Useful conventions, Prev: Subject summary, Up: Notes files + +3.1.3 Encryption +---------------- + +Notes occasionally contain private material. While Unix has strong +services for file protection (compared to other, say, more +wide-selling operating systems), in many systems root passwords are +shared, while other systems are vulnerable to physical compromise. In +such systems, properly used encryption is the best approach to +security. + + Notes-mode encryption is based Phill Zimmerman's PGP (Pretty Good +Privacy) (see `http://www.mantis.co.uk/pgp/pgp.html') and either with +Rick Campbell's emacs interface, PAM (PGP Augmented Messaging) (from +`ftp://h.gp.cs.cmu.edu/usr/rfb/pam/') (note that as of January 1997, +PAM is no longer at this ftp site and appears to not be publicly +available), or LoPresti and Choi's mailcrypt (from +`http://cag-www.lcs.mit.edu/mailcrypt/'). + +`C-c C-e' + Encrypt the current note (`notes-encrypt-note'). By default this + function encrypts the whole entry. With a prefix argument, only + the part from the point to the end of the entry is encrypted. + +`C-c C-d' + Decrypt the current note (`notes-decrypt-note'). + + By default notes-mode determines your public key by looking up your +`user-full-name' in your PGP keyring. You can override this default by +setting `notes-encryption-key-id' to the desired key-id. + + +File: notes-mode.info, Node: Useful conventions, Prev: Encryption, Up: Notes files + +3.1.4 Useful conventions +------------------------ + +There are a number of conventions which can make notes-mode easier to +use. These conventions are a matter of personal taste, of course. Do +what works for you. + + First, I find it helpful to keep the date of each notes-file at the +top of the file. This makes the file self-identifying if the +filename is lost. + + Second, I find it useful to have the first entry of each file have +the same subject (perhaps "Today"). This entry then links all notes +together, making it easy to go to yesterday and tomorrow. I keep a +to-do list on this entry, bringing the list forward each day. + + A third useful convention is to keep an entry with the name based +on the day of the week in each file. Analogous to "Today", this entry +links together weeks. + + Notes-mode supports these conventions. When you make a new +notes-file in emacs, notes-mode searches for the preceding file. If +it follows any of these conventions, the new file is initialized +appropriately. Currently the approach to do this process (in the +program `mknew') is fairly sensitive, so it may not work in all cases. +In particular, the date convention works only on for English-language +dates. (If you use notes-mode with a non-English language, let me +know and I'll work with you to fix this limitation.) + + If you find other helpful conventions, please let me know. +Modifications to `mknew' to implement new conventions are also invited. + + If you don't want to use these conventions, or if you want to use +different ones, set the emacs variable +notes-mode-initialization-program to nil or the name of your +initialization program. + + +File: notes-mode.info, Node: Notes indices, Next: Notes-mode configuration, Prev: Notes files, Up: Advanced Features + +3.2 Notes indices +================= + +Only two features of notes index mode haven't yet been described. +First, you can open any notes-file based on date with +`notes-index-link', normally bound to . + + Second, you can get a subject-summary with (*note +Subject summary::). The subject defaults to that of the current index +line. + + +File: notes-mode.info, Node: Notes-mode configuration, Prev: Notes indices, Up: Advanced Features + +3.3 Notes-mode configuration +============================ + +Several aspects of notes mode are particularly visible to the user. +Because I'm not a fascist, a user can change most of these. + + Preferences are specified in `~/.notesrc'. This file lists things +to change: + + # lines beginning with a hash are comments + dir: ~/NOTES + int_form: %Y%m + + Currently, two things can be changed: + +`dir' + Specifies the root of the notes directory hierarchy (*note The + notes directories::). + +`int_form' + Specifies the form of the intermediate directory. A limited + subset of `strftime(3)' formatting is allowed. + + The subset of `strftime(3)' supported in `int_form' is: +`%Y' + The four-digit year. + +`%y' + The two-digit year. + +`%m' + A two-digit numeric month. + +`%d' + A two-digit day. + + In addition to `.notesrc', there are a number of emacs-specific +variables. These variables are documented in the file +`notes-variables.el'. + + +File: notes-mode.info, Node: History, Next: Installation, Prev: Advanced Features, Up: Top + +4 History +********* + +More about notes-mode than you wanted to know, and some thanks. + +* Menu: + +* Notes-mode history:: +* Credits:: +* Changes:: +* Suggested features:: + + +File: notes-mode.info, Node: Notes-mode history, Next: Credits, Prev: History, Up: History + +4.1 Notes-mode history +====================== + +Briefly, I started keeping notes on-line shortly after I got a +portable computer in January, 1994. After a month-and-a-half of +notes, I realized that one does not live by grep alone, so I started +adding indexing facilities. + + In June of 1995 some other Ficus-project members started keeping +and indexing on-line notes using other home-grown systems. After some +discussion, we generalized my notes-mode work and they started using +it. + + Over the next 18 months notes-mode grew. Finally, in April, 1996 I +wrote documentation, guaranteeing that innovation on notes-mode will +now cease or the documentation will become out of date. + + +File: notes-mode.info, Node: Credits, Next: Changes, Prev: Notes-mode history, Up: History + +4.2 Credits +=========== + +I (John Heidemann, ) started, documented, and currently +maintain notes-mode. I take ultimate responsibility for the code, +especially for the ugly parts that I won't let others change. + + Ashvin Goel has been a very +enthusiastic notes-mode user and contributor. He is responsible for at +least the ideas behind `notes-summarize-subject' and the ideas and +initial implementations of some of the original generalization and +modularity improvements, `notes-follow-next-link' and +`notes-follow-prev-link', `notes-goto-index-entry', programmed +subject completion, and context-sensitive mouse-2 handling. In +addition, he is an invaluable second opinion about what and how +things should be done (even if I don't always agree with him). + + Geoff Kuenning has been another +enthusiastic notes-mode user and victim. He is responsible for +finding several bugs, motivation for mouse-less operation, comments +about the documentation, the day-of-week convention, and an initial +implementation and the idea of multiple entries with the same subjects +in a single notes-file. + + Ramesh Govindan did the xemacs port. + + Since it's release on Usenet in April 1996 several other folks have +contributed. Thanks to David Weisman , Martin +L. Smith , Jason Bastek , Ulrich +Herbst . See the next section (*Note +Changes::.) for details of their exploits. + + Thanks to Larry Ayers for popularizing +notes-mode with reviews in the Linux Gazette (at + and +). + + +File: notes-mode.info, Node: Changes, Next: Suggested features, Prev: Credits, Up: History + +4.3 Changes +=========== + +For the bored: + + First semi-public release. 12-Jul-95: version 0.1 Shared a version +with Ashvin and Geoff. + + Changed 6-Dec-95: version 0.3 Ashvin's changes for note traversal +added (C-c C-p and C-c C-n now move to the prev/next note in note-mode). +URL parsing changed so that "localhost" is optional. + + Changed 19-Dec-95: version 0.4 More robust prev/next code added, +both to handle going back and forward in the middle of chains through +the index file, and to handle back/forward in a single file. URL +parsing changed so that notes-goto-index-entry correctly handles +lookups on notes names such as "252A". + + Changed 20-Dec-95: version 0.5. Fixed a missing variable in +notes-url.el. Added a work-around to a bug in emacs-19.30's +define-derived-mode. + + Changed 24-Dec-95: version 0.6. Prev/next code re-re-written to be +more robust. + + Changed 26-Dec-96: version 0.7. Bug fix release. + + Changed 23-Jan-96: version 0.8. Initialization code added to set +up a new note. New variable: notes-bin-dir. + + I'm skipping version 0.9 because I erroneously release version 0.1 +as version 0.9 (only on the web, not on Usenet). + + I'm bumping from version "0" to version "1" since the code is has +been in production use for more than a year by several people. Minor +numbers are the same. + + Changed 26-Mar-96: version 1.10. Setup code completely re-written. +Several incompatible changes have been made: - the lisp and Perl code +must be installed via make install, not by copying. - some data is +specified in a .notesrc file; copy and modify sample.notesrc. - +several internal elisp changes. - catsubject added (bound to C-cC-s): +collect all notes about the current subject. - new notes-files are +initialized with fields based on the prior day's notes; see mknew for +details. - daily_work is gone; mkall is rewritten to use .notesrc. + + Changed 29-Apr-96: version 1.11. Real documentation. Mknew +caching added. + + Changed 9-Aug-96: version 1.12. Added notesinit to do all setup +for new users. + + Changed 24-Aug-96: version 1.13. Minor documentation fixes. + + Changed 20-Dec-97: version 1.14. Autoconf support. + + Fontification of the index buffer is now pre-computed in perl other +than done when the file is needed (in elisp with slow regular +expressions). 2000-line index files are now 1-2 seconds rather than +15-30 on a 100MHz Pentium. If necessary (the pre-computed version +isn't up-to-date) we fall back on the slower code. + + Related work improved (suggestion by David Weisman +). + + Documentation improvement (problem found by Martin L. Smith +). + + Installation improved (code by Jason Bastek ). + + Bug in notes-index mode with subjects containing colons fixed +(johnh). + + Encryption now supports mailcrypt.el. + + Support for emacs 20 (a small font-lock change). + + Changed 5-Jan-98: version 1.15. Bug in decryption for non-PAM +users fixed (suggestion by Kevin Davidson ). + + Y2K statement added (suggestion by Kevin Davidson +). + + Pointer to mailcrypt added (as a supported encryption package). +Problem pointed out by K. Ueda . + + Changed 4-Nov-98: version 1.16. Bug in kill-ring handling of +notes-old-underline-line fixed by Tim Potter . Bug +in whitespace handling after PGP encryption fixed by Tim Potter. Bugs +in handling of entries with hash signs in their name fixed (found by +Tim Potter). Fontification of index buffer further improved (mapcar +is your friend). Xemacs support added based on code contributed by +Ramesh Govindan. + + Changed 28-Feb-99: version 1.17: Improvement: notes-electric-return +now fixes up the prev/next links of new entries (only). Code +contributed by Takashi Nishimoto. + + Bug fix: reversed options -batch and -q in configure.in to placate +XEmacs 20.0; changed notesinit to not downcase the pathname (bugs +found by Thierry Bezecourt). + + Clarification: Autofilling of new notes more clear in the manual +(hopefully, suggested by Solofo Ramangalahy). + + Bug fix: a y2k bug in was found and fixed in mkindex. Sigh. + + New: Two mailing lists for notes-mode have been created: +`notes-mode-announce@heidemann.la.ca.us' and +`notes-mode-talk@heidemann.la.ca.us'. Send the line "subscribe +notes-mode-announce" (or "subscribe notes-mode-talk") to +`majordomo@heidemann.la.ca.us' to join them. [_These instructions are +now superceeded; to subscribe, go to +`http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-talk' and +`http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-announce'._] + + Changed 6-Oct-99: version 1.18: Bug fix: handling of +electric-prevnext is better when there are existing prev/next links. + + Clarification: I added some pointers in the code to the installation +instructions. (Apparently people can't RTF README.) + + Extension: mailcrypt-3.5.x suported including pgp, pgp5 and gpg. + + Changed (date 23-Dec-00): version 1.19: Bug fix (cosmetic): suppress +comments in encrypted nodes. + + Install fixes from Kannan Varadhan: elisp directories changed on +install. + + Added C-j as a synonym for RET in notes-mode to parallel C++ or perl +mode. (Suggested by Fred Jaggi `jaggi@rsn.hp.com'.) + + Outline-minor-mode support added and documented. (Suggested by Tim +Carroll `tim@boomboom.com'.) + + Bug/typo fixes in gpg support (Contributed by William A. Perkins +`wa_perkins@pnl.gov', with separate patches from Knut Anders Hatlen +`kahatlen@online.no'.) + + Installation improvements suggested by Christophe Troestler +`Ch.Troestler@linkline.be': use install-info to update the info dir, +warn users of -prefix that lisp files go elsewhere. + + Changed (date 1-Feb-01): version 1.20: Bug fix: missing file +notes-first.el added to the distribution. (Bug found by Michael +Totschnig `michaelt@supernet.ca'.) + + Changed ( 5-Dec-01): version 1.21: (backed-out--didn't work with +spaced URLs) URL lookup now uses thing-at-point. + + Fix to make notes-mode work with emacs-21.1 (Fix from Klaus Zeitler +`kzeitler@lucent.com'.) + + Changed ( 3-Jan-02): version 1.22: Several bugs in `notesinit' for +stricter Perl implementations (bug found by Paul Craven" +`pcraven@yorku.ca', and Kasper van Wijk `kasper@acoustics.mines.edu') +and to make it run cleanly more often. + + Notes-first now autoinitializes notes mode from emacs. (As +instisted by rms, unfortunately about two years later than requested.) + + Changed (20-Feb-05): version 1.23: Outline mode is now forcebly +turned on to avoid interactions with user's text-mode hooks (bug and +fix from Nils Ackermann `nils@nieback.de'). + + Install bug involving ordering of scripts and byte-compilation fixed +(bug and fix from Mark Allman `mallman@grc.nasa.gov'). + + Fix obscure bug in configure, reported by Klaus Zeitler +`kzeitler@lucent.com'. + + Fix for notes-summarize-subject when no subject is specified (bug +and fix from Geoff Kuenning). + + Changed (14-Jan-06): version 1.24: + + install-info bug documented with the Debian install-info (bug +reported by Aaron Falk `falk@isi.edu'). + + Automatic date completion in new days is now done in the current +locale, so it should now work for non-English languages. Bug reported +by Torsten Bronger `bronger@physik.rwth-aachen.de'. + + Fixed a bug in mkindexcache, triggered by subjects with percent signs +in them. Bug reported by Philip Austin `paustin@eos.ubc.ca'. + + We're a bit more robust about subjects, I hope. Warnings should +appear about embedded number signs, and leading spaces should be +filtered. Bug reported by Philip Austin `paustin@eos.ubc.ca'. + + Notes-mode now dervies from indented-text-mode rather than +paragraph-indent-text mode. Unfortunatley this is not customizable +because of limitations of define-derived-mode. Change suggested by +Aaron Falk `falk@isi.edu'. + + Provide better hints about how to get started after installation or +running notes-mode in emacs for the first time. + + In notes init, the default path for dir was the full path, not the +tilde version of the path. Now it defaults to using tidle for home +directory. Bug reported by Mark Allman `allman@icir.org'. + + Changed (26-May-06): version 1.25: + + fixed a bug in the release tar.gz file that had a additional copies +copy nested. + + Changed (30-Jun-08): version 1.26: + + Force unicode I/O in `mkindexcache' to fix highlighting mis-alignment +when using emacs-21 with unicode subject lines. + + Changed mkprevnext and mkrawindex to optionally take the list of +notes files to index from stdin rather than from the command line. +Yes, I finally have 4093 notes files, overflowing the Unix command line +buffer. + + Changes notes-mode.el to put path in quotes, allowing spaces to +appear in home directory names (bug fix from Ulrich Herbst). + + Added a suggested features section. + + Changed ( 8-Aug-08): version 1.27: + + Change I/O in `mkindexcache' to use locale (the sadly correct thing) +rather than forcing utf-8 (the Righteous Path). Bug report from Geoff +Kuenning, a man with an older Unix environment than I. + + Changed (20-Jun-10): version 1.28: + + Changed a regular expression in `notes-index-mode.el' that was +causing emacs-v23 (a pre-release version) to regular expression +infinite recursion. + + Changed (2012-04-04): version 1.29 + + (2011-08-23) Changed `run-hooks' to `run-mode-hooks'. Bug report +from Geoff Kuenning. + + Changed some handling of PGP encryption to account for some apparent +API changes. + + (2012-04-04) Fixed encyrption to handle encrypting empty notes at +the end of buffers without going into an infinite loop. Clearly wrong +code, but you have to ask this guy for why he tried: Bug report from +Geoff Kuenning. + + +File: notes-mode.info, Node: Suggested features, Prev: Changes, Up: History + +4.4 Suggested features +====================== + +Features suggested by users but not yet implemented: + + 21-Feb-08: (from Xavier Maillard): should support "disconnected" +notes that are indexed but not date-based. + + 21-Feb-08: (from John Heidemann): should switch all notes files to +have an extension (maybe `.notes'). + + +File: notes-mode.info, Node: Installation, Next: Keystroke index, Prev: History, Up: Top + +5 Installation +************** + +To install notes-mode, + + 1. Unpack and extract the distribution (gunzip notes-mode-xxx.tar.gz; + tar xvf notes-mode-xxx.tar; cd notes-mode-xxx). + + 2. Run configure (./configure). + + 3. Type "make install". + + (To control what's installed where, use -prefix=/where, or +-with-lisp-dir=/where, -datadir=/where (for scripts), and +-infodir=/where.) + + For each user: + 1. Run notesinit + + If you have problems with paths being incorrect, please be aware that +you _cannot_ run notes directly out of where you untar it. The +installation process customizes the programs for where things are on +your system. Make sure you move out of the directory where you +untarred it before running it. + + The most recent distribution of notes-mode is always available via +`http://www.isi.edu/~johnh/SOFTWARE/NOTES_MODE/'. + + +File: notes-mode.info, Node: Keystroke index, Next: Concept index, Prev: Installation, Up: Top + +Keystroke index +*************** + +This index lists notes-mode keystrokes. + +[index] +* Menu: + +* C-c C-d: Encryption. (line 28) +* C-c C-e: Encryption. (line 24) +* C-c C-i: Getting around. (line 11) +* C-c C-k: Getting around. (line 37) +* C-c C-n: Getting around. (line 21) +* C-c C-p: Getting around. (line 21) +* C-c C-s <1>: Notes indices. (line 12) +* C-c C-s: Subject summary. (line 8) +* C-c: Getting around. (line 25) +* M-C-a: Getting around. (line 31) +* M-C-e: Getting around. (line 31) +* mouse-2: The notes index. (line 21) +* o: Notes indices. (line 8) +* RTN <1>: The notes index. (line 21) +* RTN: A notes file. (line 37) +* S-mouse-2: A notes file. (line 46) +* TAB: A notes file. (line 37) + + +File: notes-mode.info, Node: Concept index, Prev: Keystroke index, Up: Top + +Concept index +************* + +This index lists notes-mode concepts. + +[index] +* Menu: + +* .notesrc: Notes-mode configuration. + (line 6) +* configuration: Notes-mode configuration. + (line 6) +* conventions: Useful conventions. (line 6) +* Crontab: The notes index. (line 29) +* Decryption: Encryption. (line 6) +* Directory hierarchy: The notes directories. + (line 6) +* Encryption: Encryption. (line 6) +* Font matter: A notes file. (line 55) +* imenu: Getting around. (line 41) +* Intermediate directories: The notes directories. + (line 35) +* key-id: Encryption. (line 31) +* mailcrypt: Encryption. (line 19) +* mkall: The notes index. (line 29) +* mknew: Useful conventions. (line 6) +* Notes directories: The notes directories. + (line 6) +* Notes entries: A notes file. (line 10) +* Notes file permissions: The notes directories. + (line 45) +* Notes files <1>: The notes directories. + (line 38) +* Notes files: A notes file. (line 6) +* Notes files, font matter: A notes file. (line 55) +* Notes index: The notes index. (line 6) +* Notes links: A notes file. (line 42) +* Notes subjects: A notes file. (line 37) +* notes-mode-initialization-program: Useful conventions. (line 38) +* notesinit: Getting started. (line 6) +* PAM: Encryption. (line 19) +* PGP: Encryption. (line 19) +* PGP Augmented Messaging: Encryption. (line 19) +* Pretty good privacy: Encryption. (line 19) +* Pseudo-URLs: A notes file. (line 46) +* re-indexing: The notes index. (line 29) +* Root directory: The notes directories. + (line 27) +* setup: Getting started. (line 6) +* Subject summary: Subject summary. (line 8) +* Today: Useful conventions. (line 17) +* URLs: A notes file. (line 46) + + + +Tag Table: +Node: Top1028 +Node: Introduction1953 +Node: What is it?2283 +Ref: What is it?-Footnote-13376 +Node: Why keep notes at all?3432 +Node: Why keep notes on-line?4217 +Ref: Why keep notes on-line?-Footnote-17770 +Ref: Why keep notes on-line?-Footnote-27946 +Ref: Why keep notes on-line?-Footnote-38185 +Node: Why use notes-mode?8284 +Ref: Why use notes-mode?-Footnote-19975 +Node: Y2K Statement10044 +Node: Related work10857 +Node: Staying on top11905 +Node: Basics12555 +Node: Getting started12861 +Node: A notes file14100 +Node: The notes index16843 +Node: The notes directories18095 +Node: Advanced Features19955 +Node: Notes files20215 +Node: Getting around20452 +Node: Subject summary21882 +Node: Encryption22218 +Node: Useful conventions23651 +Node: Notes indices25422 +Node: Notes-mode configuration25898 +Node: History26971 +Node: Notes-mode history27235 +Node: Credits28027 +Node: Changes29908 +Node: Suggested features39761 +Node: Installation40163 +Node: Keystroke index41103 +Node: Concept index42542 + +End Tag Table diff --git a/packages/notes-mode/notes-mode.ps.gz b/packages/notes-mode/notes-mode.ps.gz new file mode 100644 index 000000000..c28e8a8b1 Binary files /dev/null and b/packages/notes-mode/notes-mode.ps.gz differ diff --git a/packages/notes-mode/notes-mode.texi b/packages/notes-mode/notes-mode.texi new file mode 100644 index 000000000..454ecceb1 --- /dev/null +++ b/packages/notes-mode/notes-mode.texi @@ -0,0 +1,1603 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename notes-mode.info +@settitle Notes-mode +@c For double-sided printing, uncomment: +@c @setchapternewpage odd +@c %**end of header + +@set EDITION $Revision: 1.40 $ +@c XXX: the next line should track the release file. +@set VERSION 1.16 +@set UPDATED $Date: 2010/06/20 18:30:34 $ + +@iftex +@finalout +@end iftex + +@ifinfo +@format +START-INFO-DIR-ENTRY +* Notes-mode: (notes-mode). Organizing on-line note-taking. +END-INFO-DIR-ENTRY +@end format + +Notes-mode: Organizing on-line note-taking. + +This file documents notes-mode, a package +for organizing on-line note-taking. + +Copyright (C) 1994-1996 by John Heidemann + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +@ignore +Permission is granted to process this file through TeX and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual). + +@end ignore +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the entire +resulting derived work is distributed under the terms of a permission +notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions, +except that this permission notice may be stated in a translation approved +by John Heidemann. +@end ifinfo + +@titlepage +@title Notes-mode +@subtitle Organizing on-line note-taking +@subtitle Edition @value{EDITION}, for notes-mode version @value{VERSION} +@subtitle @value{UPDATED} +@author by John Heidemann + +@page +@vskip 0pt plus 1filll +Copyright @copyright{} 1994-1996 by John Heidemann + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the entire +resulting derived work is distributed under the terms of a permission +notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions, +except that this permission notice may be stated in a translation approved +by John Heidemann. +@end titlepage + +@node Top, Introduction, (dir), (dir) +@comment node-name, next, previous, up + +@ifinfo +This file documents notes-mode, a package +for organizing on-line note-taking. +This is edition @value{EDITION}, for notes-mode version @value{VERSION}, + last updated @value{UPDATED}. + +@end ifinfo + +@c +@c Outline as of 16-Apr-96: +@c +@c introduction +@c - what is notes mode +@c - why keep notes on-line +@c - easier to type than write +@c - information already on-line (program errors, measurement data, etc.) +@c - easy to search (grep, glimpse) +@c - easy to index (notes-mode) +@c - why use notes-mode +@c - automates indexing +@c - supports links +@c - emacs helpers (subject completion, elisp customization) +@c - alternatives: +@c HTML (+formatting, +links, -tags are intrusive, -errors are bad, -index by hand) +@c word processor (+formatting, -links, -indexing) +@c - related work +@c - notes-mode is not related to Lotus Notes +@c basics +@c - notes-file +@c (text mode) +@c - front-matter +@c - entries +@c - subject +@c - links +@c like urls, but not quite +@c mouse-2 follows a link (and also pastes) +@c - text +@c can contain other, embedded links +@c - notes-index +@c - subjects +@c mouse-2 follows links +@c - re-indexing +@c - file layout +@c - root ~/NOTES, changing +@c - intermediate directories @cY@cm +@c - notes-files @cy@cm@cd +@c intermediate features +@c - notes-files +@c - conventions +@c today +@c Monday +@c date in front-matter +@c hierarchical subjects +@c - C-c C-s subject summary +@c - C-c C-k current-url-as-kill +@c - getting around +@c - C-c C-i notes-goto-index-entry +@c - C-c C-n notes-follow-next-link, C-c C-p notes-follow-prev-link +@c - C-c C-f notes-w3-follow-link +@c - M-C-a notes-beginning-of-defun, M-C-e notes-end-of-defun +@c - C-c C-e, C-c C-s encryption +@c - notes-index +@c - RET notes-index-follow-link +@c - o notes-index-link +@c - C-c C-s summarize subject +@c advanced features: +@c - .notesrc +@c history +@c - genesis: minimal functionality: subject collection +@c - Leviticus: indexing, urls +@c - exodus: share with others +@c - Deuteronomy: features are added +@c + + + +@c The master menu, created with texinfo-master-menu, goes here. + +@menu +* Introduction:: +* Basics:: +* Advanced Features:: +* History:: +* Installation:: +* Keystroke index:: +* Concept index:: + +@detailmenu + --- The Detailed Node Listing --- + +Introduction + +* What is it?:: +* Why keep notes at all?:: +* Why keep notes on-line?:: +* Why use notes-mode?:: +* Y2K Statement:: +* Related work:: +* Staying on top:: + +Basics + +* Getting started:: +* A notes file:: +* The notes index:: +* The notes directories:: + +Advanced Features + +* Notes files:: +* Notes indices:: +* Notes-mode configuration:: + +Notes files + +* Getting around:: +* Subject summary:: +* Encryption:: +* Useful conventions:: + +History + +* Notes-mode history:: +* Credits:: +* Changes:: + +@end detailmenu +@end menu + +@c ---------------------------------------------------------------------- + +@node Introduction, Basics, Top, Top +@chapter Introduction + +What is notes-mode and why should you (perhaps) use it? + +@menu +* What is it?:: +* Why keep notes at all?:: +* Why keep notes on-line?:: +* Why use notes-mode?:: +* Y2K Statement:: +* Related work:: +* Staying on top:: +@end menu + +@node What is it?, Why keep notes at all?, Introduction, Introduction +@comment node-name, next, previous, up +@section What is it? + +Notes-mode is an indexing system for on-line note-taking. +Notes-mode is composed of two parts, the visible part, +a major-mode for emacs to aid note-taking; +and the invisible part, +scripts which periodically index your notes for you. + +Note that notes-mode provides tools to @dfn{index} your notes, +not to @dfn{search} them. +(Other existing tools such as @file{grep}, @file{agrep}, and @file{glimpse} +already allow file search.) + +A digression about indexing vs. searching: +Indexing in this sense means +organize them according to categories you give, +while searching looks through all text for arbitrary strings. +Drawing on the World Wide Web for examples, +Yahoo (@file{http://www.yahoo.com/}) is an index, +while Alta Vista (@file{http://www.altavista.digital.com/}) +is a search-engine. +In (potentially) more familiar terms, +the yellow pages +@footnote{Trademarked, in Great Britain, Sunone tells me.} +are an index, +while directory information (411 in the USA) +is sort of a search-engine. + + +@node Why keep notes at all?, Why keep notes on-line?, What is it?, Introduction +@comment node-name, next, previous, up +@section Why keep notes at all? + +So why should you use notes-mode? +Well, first, consider why you should (perhaps) +keep your notes on line. +First, +I assume that you take notes as part of your work or school. +If you don't, +you can stop reading now and go back to watching TV. + +If you keep notes, ask yourself why you keep them. +Reasons vary for different people, but some include: + +@itemize @bullet + +@item +To remember what is said or done. + +@item +To focus on what is important about what is said. + +@item +To provide proof of having done something +at a particular time or date. + +@item +I know there were other reasons here, +but they slipped my mind. +@end itemize + + +@node Why keep notes on-line?, Why use notes-mode?, Why keep notes at all?, Introduction +@comment node-name, next, previous, up +@section Why keep notes on-line? + +OK, I've talked you into keeping notes. +Why do it on-line? +Again, there are different reasons for different people. +If you don't want to consider keeping your notes on-line, +you're welcome to go back to your (clay tablets) +paper notes. + +However, if you do much of your work on-line, +or if you have portable computer, +then you might want to consider keeping your notes on-line. + +@itemize @bullet + +@item +It's faster to type than write, +and possibly more legible at high speed. + +@item +Often information is already on-line. +For example, in software development, bug reports, +measurement results, and everything else that's useful +is on-line. + +@item +You can take down more detail than you otherwise would +(especially if the data is already on-line). +Taking more copious notes can be helpful when you go back +to figure out why that strange thing was happening. + +@item +On-line notes are easy to search. +Full-text search with +grep, agrep, and glimpse are all much faster +and are often more accurate than paging through paper notes +looking for a particular keyword. + +@item +On-line notes are easy to index. +(At least with notes-mode!) +In addition to full-text search, +it's helpful to organize notes by category. +If you keep a table-of-contents of your paper notes, +you are either extremely fastidious +or a librarian (Nadia?). + +@item +You can keep all of your notes with you at all times +(if you have a portable computer). +Even at a page a day, +paper notes quickly become bulky and awkward to carry around. +On-line notes fit on your computer's hard disk, +an extraordinarily compact medium +by comparison. + +@item +Your notes can be automatically backed up. +Paper notes can become damaged with time, +and as a graduate student +one of my fears was fire in Boelter Hall +consuming all my research experiments +and and therefore hopes of a degree. +Electronic notes are extremely easy to duplicate +and can be automatically backed up with the rest of your computer. +(You @emph{do} back up your computer, don't you?) + +@end itemize + +While these advantages are undoubtedly clear to any +right-thinking computer user, +it should be said that there are a few disadvantages +for on-line note-taking. + +@itemize @bullet + +@item +If you don't have a computer with you most of the time, +it's difficult take notes on-line (because you're off-line, of course). +@footnote{I consider myself pretty anal about this subject, +often typing notes in from paper after-the-fact, +and @emph{I} certainly don't manage to back-enter +my notes all time time.} + +@item +Computers require power. +If your portable computer runs out of juice, +you're on your own. +Corollary: watch your power, or bring paper. +Better corollary: watch your power, @emph{and} bring paper. + +@item +Social limitations. +It's not always socially acceptable to take notes-on-line. +For example, +at a party, +few people would use a computer +to take down the phone number of a person +to whom they're attracted +(at least, if they wanted the attraction to be mutual). +@footnote{ +On the other hand, some folks at MIT are working +on this problem from both the hardware and the social side of +things (@file{http://wearables.www.media.mit.edu/projects/wearables/}) +(Perhaps they have wild parties with computers, too.) +} +Sometimes other people find the sound of typing distracting. + +@item +Health issues. +Repetitive stress injuries do occur +writing (slower) by hand is at least +an alternate motion than typing. + +@item +Legal limitations. +If you want to use your electronic notes +to justify a patent or invention, +you may be breaking legal ground. +Being on the legal cutting-edge is rarely an easy thing +for the person involved.@footnote{My hat is off to Rosa Parks +and the many other normal people who triggered landmark cases.} + +@end itemize + + +@node Why use notes-mode?, Y2K Statement, Why keep notes on-line?, Introduction +@comment node-name, next, previous, up +@section Why use notes-mode? + +OK, I've sold you on note-taking and even on on-line note-taking. +What about notes-mode? +Naturally, +it slices, dices, and makes julienne fries. +But wait, there's more: + +@itemize @bullet + +@item +It automates indexing your notes, +linking notes with the same subject together. + +@item +It supports embedded links, +allowing you to manually link together different topics +and external files. + +@item +It includes a number of convenience-features in emacs. +Subjects can be completed based on existing subjects. +The usual emacs customization mechanisms are available. + +@item +Notes containing sensitive information can be encrypted. + +@item +Notes-mode seems better than the other, currently available alternatives. +@end itemize + +What are the alternatives? I'm glad you asked. +@footnote{If you think I'm missing an alternative, please let me know.} + +@itemize @bullet + +@item +@strong{HTML}. +HTML has better formatting capabilities than notes-mode, +and it has excellent linking capabilities. +Unfortunately, +HTML's tags are fairly intrusive + (each is at least four characters long and most come with a pair), + tags can get confused with normal text, + errors in HTML can be bad (obscuring data), + and there's no automatic indexing feature + (at least with plain HTML). +Besides, + all data should be kept as close to the ASCII from whence it came, + as God Intended (hi, Steve). + +@item +@strong{Word Processors}. +Word processors are strong in the formatting department, + but most don't really have linking capabilities, + and have poor or restricted indexing. + +@end itemize + +@node Y2K Statement, Related work, Why use notes-mode?, Introduction +@comment node-name, next, previous, up +@section Y2K Statement + +Notes mode uses dates extensively, + both two-digit years and seconds-since-1970. +However, notes-mode has been coded to function correctly through + the year 2038. + +To avoid problems with the year 2000, notes-mode assumes + that any two-digit years before ``70'' are 20xx, not 19xx. +Notes-mode should therefore work correctly in both the year 1999 and 2000. + +(Notes-mode 1.17 released February 1999 fixes a lingering Y2K problem.) + +Because notes-mode uses seconds-since-1970 for some date calculations + it will fail beyond the year 2038 on computers with 32-bit integers. + +If I'm still using notes-mode then on a 32-bit machine I'll see what I can do. + + +@node Related work, Staying on top, Y2K Statement, Introduction +@comment node-name, next, previous, up +@section Related work + +What would a document be without related work? + +Notes-mode is not related in any way to Lotus Notes. + +I am told (by David Weisman) + that it's something like the now defunct Lotus Agenda. + +Ashvin Goel, one of the contributors to notes-mode, + has gone off and done a from-scratch reimplementation + called records-mode. +It's very similar to notes mode, + and emphasizes on-the-fly updates to entry links + but lacks a manual. +You may want to check it out at + @file{http://www.cse.ogi.edu/~ashvin/software.html}. + +Hyperbole (by Bob Weiner) offers better linking facilities +than notes-mode, but it has a bunch of stuff notes-mode doesn't need +and it's missing notes-specific indexing provided by notes-mode. +For people already using Hyperbole + it would be interesting to replace notes-mode's linking + with Hyperbole's. +Contributions in this area are welcome, provided they make Hyperbole + optional. + +@node Staying on top, , Related work, Introduction +@comment node-name, next, previous, up +@section Staying on top + +The most recent distribution of notes-mode + is always available via + @file{http://www.isi.edu/~johnh/SOFTWARE/NOTES_MODE/}. + +After you've installed notes mode you're encouraged to subscribe +to the mailing lists. +To subscribe, go to the web page +Send the message "subscribe" to +@file{http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-announce} or +@file{http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-talk}. + +The announce list will contain only release announcements +and so is guaranteed to be very low bandwidth. + + +@c ---------------------------------------------------------------------- + +@node Basics, Advanced Features, Introduction, Top +@comment node-name, next, previous, up +@chapter Basics + +All you need to use notes-mode + in a chapter. +(Except for installation, @xref{Installation}.) + +@menu +* Getting started:: +* A notes file:: +* The notes index:: +* The notes directories:: +@end menu + +@node Getting started, A notes file, Basics, Basics +@comment node-name, next, previous, up +@section Getting started +@cindex notesinit +@cindex setup + +To get started with notes-mode, + read the introduction this chapter, + then either: + +@itemize @bullet + +@item +Start emacs, do + @kbd{M-x} @code{load-library} @kbd{RET} @code{notes-mode} @kbd{RET} +This approach will set up notes-mode with the default parameters. + +@item +OR, from the shell, + run the program @file{notesinit}. +This approach will ask you some questions about how you want to configure + notes mode. + +@end itemize + +Either way these should set up everything notes-mode needs. +This program will modify your environment (as described in this section), + or it will give you the exact commands you should run yourself. + +After you've done one of these, + start up emacs and note-away. +I usually begin a + day of note-taking by running the command + @kbd{M-x} @code{notes-index-todays-link} + to jump directly to today's note. +You may even wish to bind this to something, + perhaps with + @code{(define-key global-map "\C-cn" 'notes-index-todays-link)} + in your @file{.emacs}. + +If you want to browse your existing notes, + you might instead want to edit the + @file{~/NOTES/index}. +(What is a notes file and the index? Hurry up and finish + reading this chapter.) + + +@node A notes file, The notes index, Getting started, Basics +@comment node-name, next, previous, up +@section A notes file +@c - notes-file +@c (text mode) +@c - front-matter +@c - entries +@c - subject +@c - links +@c like urls, but not quite +@c mouse-2 follows a link (and also pastes) +@c - text +@c can contain other, embedded links + +@cindex Notes files + +The notes file is the focus of most of the activity in notes-mode, + it's where you take your notes. +Notes files are mostly free-form text + broken up into @dfn{entries}. +Here's an example: + +@cindex Notes entries + +@example +8-Jun-95 Thursday +----------------- + +* Today +------- +prev: +next: + +next week - release notes-mode + + +* Environment/notes +------------------- + +I explained notes mode to Ashvin and Geoff. +... +@end example + +Each entry has a subject-block, (maybe) some links, and then (maybe) some text. + +The subject-block must begin with an asterisk-space (@kbd{* }) + at the beginning of a line, followed by the subject itself. +Subjects must be underlined with a row of dashes + (if they're not exact, that's OK; + notes-mode will fix them periodically). +For convenience, + notes-mode will automatically add the underlines when you + hit @kbd{@key{RTN}} (@code{notes-electric-return}), + and @kbd{@key{TAB}} on a partially completed subject will + invoke completion based on indexed subjects (@code{notes-complete-subject}). +@cindex Notes subjects +@kindex RTN +@kindex TAB + +Following the subject may be links. +(In the example, the ``Today'' entry has links, + the ``Environment/notes'' entry doesn't.) +These links will be automatically updated by notes-mode + when your notes are re-indexed; + just leave a blank line when writing the note. +@cindex Notes links + +Links are made with pseudo-URLs, + sort of like those in the World Wide Web. +Any of these URLs can be followed in notes-mode files + by clicking @kbd{S-mouse-2} on the pseudo-URL + (@code{notes-w3-follow-link-mouse}). +@cindex Pseudo-URLs +@cindex URLs +@kindex S-mouse-2 + +Finally comes the text. +Go wild, but just don't include text that looks like a subject. +You can embed pseudo-URLs to link notes together manually. + +The more anal of you may have noticed + that the lines before the first subject + are not part of any entry. +These lines are + @dfn{front matter}. +They're not usually used for much, + but they can be a good place to label the file. +@cindex Notes files, font matter +@cindex Font matter + +There are a number of useful conventions + that can be adopted to organize your notes. +The most common is the ``Today'' entry. +If you keep an entry with the same subject + at the beginning of each file, + you link all of your notes together. +Notes-mode will help you out with some of these convetions + by automatically creating or copying some fields for you; + see @pxref{Useful conventions} for details. + +Finally, notes-mode can also work with outline-minor-mode + (thanks to Tim Carroll for pointing this out). +Outline-mode supports hiding and revealing text and other helpful + features beyond the scope of this document. +@xref{Outline Mode, Outline Mode, , emacs, The Emacs Editor}, for details. + +@node The notes index, The notes directories, A notes file, Basics +@comment node-name, next, previous, up +@section The notes index +@c - notes-index +@c - subjects +@c mouse-2 follows links +@c - re-indexing + +@cindex Notes index + +The notes index lists all subjects you've kept notes about, + and each date of each note. +Impress your friends, + show your advisor why you're worth the @emph{big} peanuts, + you'll soon have the biggest index of all. + +The index has one line per subject, listing the subject + and each day a note was made about that subject. +For example: + +@example +Bicycle: 950314, 950316 +Bicycle/maintenance/books: 951028 +Bridge/hands: 951113, 951114, 951116, 951117 +Bridge/UCLA: 960222, 960409 +@end example + +Clicking on any of the dates with @kbd{mouse-2} + will take you to that note + (@code{notes-index-mouse-follow-link}). +(You can also move the point over the date and hit @kbd{@key{RTN}} + if you're musaphobic [@code{notes-index-follow-link}].) +@kindex mouse-2 +@kindex RTN + +The notes index is automatically updated by the program @file{mkall}. +Typically @file{mkall} is run nightly by @file{cron}. +On most modern versions of Unix, you can add this command to cron by + running @file{crontab -e} and adding the line: + +@example +0 4 * * * /usr/local/lib/notes-mode/mkall +@end example +@cindex Crontab +@cindex mkall +@cindex re-indexing + +(Assuming that your notes programs are installed + in /usr/local/lib/notes-mode, the default location.) + + +@node The notes directories, , The notes index, Basics +@comment node-name, next, previous, up +@section The notes directories + +@cindex Notes directories +@cindex Directory hierarchy + +The final thing needed to tie basic notes-mode together his how +the pieces fit together. +Since my graduate work is in file systems, +you can bet that directories are involved. + +Notes-mode keeps its files in a two-level hierarchy: + +@example +~/NOTES +~/NOTES/index +~/NOTES/rawindex +~/NOTES/199603 +~/NOTES/199603/960329 +~/NOTES/199603/960330 +~/NOTES/199604 +~/NOTES/199604/960401 +@end example + +The top level, @file{~/NOTES}, is the notes directory. +It keeps all notes in one place. +(The name of this directory is configurable, @xref{Notes-mode configuration}.) + +Inside the notes directory are two files and a number of directories. +The files are @file{index}, + the index of all entries (@pxref{The notes index}), + and @file{rawindex}, + used internally. +@cindex Root directory + +The notes directory also contains a number of subdirectories, + sometimes called @dfn{intermediate directories}. +These directories group the actual notes files into manageable chunks, + keeping any directory from getting too large. +Intermediate directories are named + by the four-digit year and the two-digit month + of the entries they contain. +(The format of intermediate directories + is configurable, @xref{Notes-mode configuration}.) +@cindex Intermediate directories + +Finally, + each intermediate directory are the notes files themselves, + named according to the two-digit year, month, and day-of-month. +@cindex Notes files + +For the most part, + notes-mode will automatically maintain this organization of files, + once you create the top-level directory. +Notes-mode will also automatically insure + that all files in the notes directory are unreadable by + anyone other than their owner. +Notes are personal things. +(This behavior is not currently configurable, + but it probably should be.) +@cindex Notes file permissions + + +@c ---------------------------------------------------------------------- + +@node Advanced Features, History, Basics, Top +@comment node-name, next, previous, up +@chapter Advanced Features + +Notes-mode, the minutiae, and some other good stuff. + +@menu +* Notes files:: +* Notes indices:: +* Notes-mode configuration:: +@end menu + +@node Notes files, Notes indices, Advanced Features, Advanced Features +@comment node-name, next, previous, up +@section Notes files + +@menu +* Getting around:: +* Subject summary:: +* Encryption:: +* Useful conventions:: +@end menu + +@node Getting around, Subject summary, Notes files, Notes files +@comment node-name, next, previous, up +@subsection Getting around + +Moving between notes entries and around the hierarchy is fairly common, + so there are some accelerators. + +@table @kbd +@item C-c C-i +Jump to the index entry for the current entry's subject +(@code{notes-goto-index-entry}). +@kindex C-c C-i + +@item C-c C-n +@item C-c C-p +Move to the next or prior note with the same subject +(@code{notes-follow-next-link} and @code{notes-follow-prev-link}). +These functions follow the links in the note, + if they're defined. +If not, + they look through the index file. +This approach usually works, + but will fail if there are multiple new entries created + with the given subject + between when the index is recomputed. +@kindex C-c C-n +@kindex C-c C-p + +@item C-c@key{RTN} +Follow the link under the point +(@code{notes-w3-follow-link}), + a keyboard equivalent of @key{S-mouse-2}. +@kindex C-c@key{RTN} + +@item M-C-a +@item M-C-e +Jump to the beginning or end of the current note entry +(@code{notes-beginning-of-defun} and @code{notes-end-of-defun}). +@kindex M-C-a +@kindex M-C-e + +@item C-c C-k +Copies the pseudo-URL for the current note into the kill-ring +(@code{current-url-as-kill}). +To link two entries, go to the target, + grab its URL with @kbd{C-c C-k}, + go to where you want to make the link, + and yank the URL with @kbd{C-y}. +@kindex C-c C-k + +@end table + +Notes mode supports imenu, + if you have it bound to something + (I use @code{(global-set-key [down-mouse-3] 'imenu)}). +@cindex imenu + + +@node Subject summary, Encryption, Getting around, Notes files +@comment node-name, next, previous, up +@subsection Subject summary + +It's often helpful to look at all + entries for a given subject +@kbd{C-c C-s} + collects all entries with the subject of the current + entry in a new buffer + (@code{notes-summarize-subject}). +@kindex C-c C-s +@cindex Subject summary + + +@node Encryption, Useful conventions, Subject summary, Notes files +@comment node-name, next, previous, up +@subsection Encryption + +@cindex Encryption +@cindex Decryption + +@c - C-c C-e, C-c C-d encryption +Notes occasionally contain private material. +While Unix has strong services for file protection + (compared to other, say, more wide-selling operating systems), + in many systems root passwords are shared, + while other systems are vulnerable to physical compromise. +In such systems, + properly used encryption is the best approach to security. + +Notes-mode encryption is based + Phill Zimmerman's PGP (Pretty Good Privacy) +(see @file{http://www.mantis.co.uk/pgp/pgp.html}) + and either + with Rick Campbell's + emacs interface, PAM (PGP Augmented Messaging) +(from @file{ftp://h.gp.cs.cmu.edu/usr/rfb/pam/}) + (note that as of January 1997, PAM is no longer at this ftp site + and appears to not be publicly available), + or LoPresti and Choi's mailcrypt +(from @file{http://cag-www.lcs.mit.edu/mailcrypt/}). +@cindex PGP +@cindex Pretty good privacy +@cindex PAM +@cindex PGP Augmented Messaging +@cindex mailcrypt + +@table @kbd +@item C-c C-e +Encrypt the current note +(@code{notes-encrypt-note}). +By default this function encrypts the whole entry. +With a prefix argument, + only the part from the point to the end of the entry is encrypted. +@kindex C-c C-e + +@item C-c C-d +Decrypt the current note +(@code{notes-decrypt-note}). +@end table +@kindex C-c C-d + +By default notes-mode determines your public key by looking + up your @code{user-full-name} in your PGP keyring. +You can override this default by setting + @code{notes-encryption-key-id} + to the desired key-id. +@cindex key-id + + +@node Useful conventions, , Encryption, Notes files +@comment node-name, next, previous, up +@subsection Useful conventions + +@c - conventions +@c date, 12-Jan-96 Friday +@c Today +@c Monday +@c hierarchical subjects + +@cindex conventions +@cindex mknew + +There are a number of conventions which can make notes-mode + easier to use. +These conventions are a matter of personal taste, + of course. +Do what works for you. + +First, + I find it helpful to keep the date of each notes-file at the top + of the file. +This makes the file self-identifying + if the filename is lost. + +Second, + I find it useful to have the first entry of each file + have the same subject (perhaps ``Today''). +This entry then links all notes together, + making it easy to go to yesterday and tomorrow. +I keep a to-do list on this entry, + bringing the list forward each day. +@cindex Today + +A third useful convention is to keep an + entry with the name based on the day of the week + in each file. +Analogous to ``Today'', this entry links together + weeks. + +Notes-mode supports these conventions. +When you make a new notes-file in emacs, + notes-mode searches for the preceding file. +If it follows any of these conventions, + the new file is initialized appropriately. +Currently + the approach to do this process + (in the program @file{mknew}) + is fairly sensitive, + so it may not work in all cases. +In particular, + the date convention works only on + for English-language dates. +(If you use notes-mode with a non-English language, + let me know and I'll work with you to fix this limitation.) + +If you find other helpful conventions, + please let me know. +Modifications to @file{mknew} to implement + new conventions are also invited. + +If you don't want to use these conventions, + or if you want to use different ones, + set the emacs variable notes-mode-initialization-program + to nil or the name of your initialization program. +@cindex notes-mode-initialization-program + + +@node Notes indices, Notes-mode configuration, Notes files, Advanced Features +@comment node-name, next, previous, up +@section Notes indices + +@c - notes-index +@c - RET notes-index-follow-link +@c - o notes-index-link +@c - C-c C-s summarize subject + +Only two features of notes index mode haven't yet been described. +First, + you can open any notes-file based on date + with @code{notes-index-link}, + normally bound to @key{o}. +@kindex o + +Second, + you can get a subject-summary + with @key{C-c C-s} + (@pxref{Subject summary}). +The subject defaults to that of the current index line. +@kindex C-c C-s + + +@node Notes-mode configuration, , Notes indices, Advanced Features +@comment node-name, next, previous, up +@section Notes-mode configuration + +@cindex configuration +@cindex .notesrc + +Several aspects of notes mode are particularly visible + to the user. +Because I'm not a fascist, + a user can change most of these. + +Preferences are specified in @file{~/.notesrc}. +This file lists things to change: + +@example +# lines beginning with a hash are comments +dir: ~/NOTES +int_form: %Y%m +@end example + +Currently, two things can be changed: + +@table @code +@item dir +Specifies the root of the notes directory hierarchy + (@pxref{The notes directories}). + +@item int_form +Specifies the form of the intermediate directory. +A limited subset of @code{strftime(3)} + formatting is allowed. +@end table + +The subset of @code{strftime(3)} supported in @code{int_form} is: +@table @code +@item %Y +The four-digit year. + +@item %y +The two-digit year. + +@item %m +A two-digit numeric month. + +@item %d +A two-digit day. +@end table + +In addition to @file{.notesrc}, + there are a number of emacs-specific variables. +These variables are documented in the file + @file{notes-variables.el}. + + + +@c ---------------------------------------------------------------------- + +@node History, Installation, Advanced Features, Top +@comment node-name, next, previous, up +@chapter History + +More about notes-mode than you wanted to know, +and some thanks. + +@menu +* Notes-mode history:: +* Credits:: +* Changes:: +* Suggested features:: +@end menu + +@c history +@c - genesis: minimal functionality: subject collection +@c - Leviticus: indexing, urls +@c - exodus: share with others +@c - Deuteronomy: features are added + + +@node Notes-mode history, Credits, History, History +@comment node-name, next, previous, up +@section Notes-mode history + +Briefly, + I started keeping notes on-line shortly after I got a portable computer + in January, 1994. +After a month-and-a-half of notes, I realized that + one does not live by grep alone, + so I started adding indexing facilities. + +In June of 1995 + some other Ficus-project members started + keeping and indexing on-line notes + using other home-grown systems. +After some discussion, + we generalized my notes-mode work and + they started using it. + +Over the next 18 months notes-mode grew. +Finally, in April, 1996 I wrote documentation, + guaranteeing that innovation on notes-mode will now cease + or the documentation will become out of date. + + +@node Credits, Changes, Notes-mode history, History +@comment node-name, next, previous, up +@section Credits + +I (John Heidemann, ) + started, documented, and currently maintain notes-mode. +I take ultimate responsibility for the code, + especially for the ugly parts that I won't let others change. + +Ashvin Goel + + has been a very enthusiastic notes-mode user and contributor. +He is responsible for at least + the ideas behind @code{notes-summarize-subject} +and the ideas and initial implementations of + some of the original generalization and modularity improvements, + @code{notes-follow-next-link} and @code{notes-follow-prev-link}, + @code{notes-goto-index-entry}, + programmed subject completion, + and + context-sensitive mouse-2 handling. +In addition, + he is an invaluable second opinion about + what and how things should be done + (even if I don't always agree with him). + +Geoff Kuenning + + has been another enthusiastic notes-mode user and victim. +He is responsible for + finding several bugs, + motivation for mouse-less operation, + comments about the documentation, + the day-of-week convention, + and an initial implementation and the idea of + multiple entries with the same subjects in a single notes-file. + +Ramesh Govindan did the xemacs port. + +Since it's release on Usenet in April 1996 several + other folks have contributed. +Thanks to + David Weisman , + Martin L. Smith , + Jason Bastek , + Ulrich Herbst . +See the next section (@xref{Changes}.) for details of their exploits. + +Thanks to Larry Ayers + for popularizing notes-mode with reviews in + the Linux Gazette + (at and + ). + +@node Changes, Suggested features, Credits, History +@comment node-name, next, previous, up +@section Changes + +For the bored: + +First semi-public release. 12-Jul-95: version 0.1 + Shared a version with Ashvin and Geoff. + +Changed 6-Dec-95: version 0.3 + Ashvin's changes for note traversal added (C-c C-p and C-c C-n now +move to the prev/next note in note-mode). + URL parsing changed so that "localhost" is optional. + +Changed 19-Dec-95: version 0.4 + More robust prev/next code added, both to handle going back and +forward in the middle of chains through the index file, and to handle +back/forward in a single file. + URL parsing changed so that notes-goto-index-entry correctly handles +lookups on notes names such as "252A". + +Changed 20-Dec-95: version 0.5. + Fixed a missing variable in notes-url.el. + Added a work-around to a bug in emacs-19.30's define-derived-mode. + +Changed 24-Dec-95: version 0.6. + Prev/next code re-re-written to be more robust. + +Changed 26-Dec-96: version 0.7. + Bug fix release. + +Changed 23-Jan-96: version 0.8. + Initialization code added to set up a new note. +New variable: notes-bin-dir. + + I'm skipping version 0.9 because I erroneously release version 0.1 +as version 0.9 (only on the web, not on Usenet). + + I'm bumping from version "0" to version "1" since the code is has been +in production use for more than a year by several people. Minor +numbers are the same. + +Changed 26-Mar-96: version 1.10. + Setup code completely re-written. + Several incompatible changes have been made: + - the lisp and Perl code must be installed via make install, +not by copying. + - some data is specified in a .notesrc file; copy and modify sample.notesrc. + - several internal elisp changes. + - catsubject added (bound to C-cC-s): collect all notes about the +current subject. + - new notes-files are initialized with fields based on the prior +day's notes; see mknew for details. + - daily_work is gone; mkall is rewritten to use .notesrc. + +Changed 29-Apr-96: version 1.11. + Real documentation. + Mknew caching added. + +Changed 9-Aug-96: version 1.12. + Added notesinit to do all setup for new users. + +Changed 24-Aug-96: version 1.13. + Minor documentation fixes. + +Changed 20-Dec-97: version 1.14. +Autoconf support. + +Fontification of the index buffer is now pre-computed in perl +other than done when the file is needed (in elisp with slow regular +expressions). 2000-line index files are now 1-2 seconds rather than +15-30 on a 100MHz Pentium. If necessary (the +pre-computed version isn't up-to-date) we fall back on the slower +code. + +Related work improved (suggestion by David Weisman ). + +Documentation improvement (problem found by Martin L. Smith +). + +Installation improved (code by Jason Bastek ). + +Bug in notes-index mode with subjects containing colons fixed (johnh). + +Encryption now supports mailcrypt.el. + +Support for emacs 20 (a small font-lock change). + +Changed 5-Jan-98: version 1.15. +Bug in decryption for non-PAM users fixed + (suggestion by Kevin Davidson ). + +Y2K statement added + (suggestion by Kevin Davidson ). + +Pointer to mailcrypt added (as a supported encryption package). +Problem pointed out by K. Ueda . + +Changed 4-Nov-98: version 1.16. +Bug in kill-ring handling of notes-old-underline-line + fixed by Tim Potter . +Bug in whitespace handling after PGP encryption fixed by Tim Potter. +Bugs in handling of entries with hash signs in their name fixed + (found by Tim Potter). +Fontification of index buffer further improved + (mapcar is your friend). +Xemacs support added based on code contributed by Ramesh Govindan. + +Changed 28-Feb-99: version 1.17: +Improvement: notes-electric-return now fixes up the prev/next links + of new entries (only). Code contributed by + Takashi Nishimoto. + +Bug fix: reversed options -batch and -q in configure.in to placate + XEmacs 20.0; changed notesinit to not downcase the pathname + (bugs found by Thierry Bezecourt). + +Clarification: Autofilling of new notes more clear in the manual (hopefully, + suggested by Solofo Ramangalahy). + +Bug fix: a y2k bug in was found and fixed in mkindex. Sigh. + +New: Two mailing lists for notes-mode have been created: +@file{notes-mode-announce@@heidemann.la.ca.us} and +@file{notes-mode-talk@@heidemann.la.ca.us}. +Send the line ``subscribe notes-mode-announce'' +(or ``subscribe notes-mode-talk'') +to @file{majordomo@@heidemann.la.ca.us} +to join them. +[@emph{These instructions are now superceeded; to subscribe, go to +@file{http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-talk} +and +@file{http://www.heidemann.la.ca.us/mailman/listinfo/notes-mode-announce}.}] + +Changed 6-Oct-99: version 1.18: +Bug fix: handling of electric-prevnext is better when there are + existing prev/next links. + +Clarification: I added some pointers in the code to the installation + instructions. (Apparently people can't RTF README.) + +Extension: mailcrypt-3.5.x suported including pgp, pgp5 and gpg. + +Changed (date 23-Dec-00): version 1.19: +Bug fix (cosmetic): suppress comments in encrypted nodes. + +Install fixes from Kannan Varadhan: elisp directories changed on install. + +Added C-j as a synonym for RET in notes-mode to parallel C++ or perl mode. +(Suggested by Fred Jaggi @file{jaggi@@rsn.hp.com}.) + +Outline-minor-mode support added and documented. +(Suggested by Tim Carroll @file{tim@@boomboom.com}.) + +Bug/typo fixes in gpg support +(Contributed by William A. Perkins @file{wa_perkins@@pnl.gov}, +with separate patches from Knut Anders Hatlen @file{kahatlen@@online.no}.) + +Installation improvements suggested by Christophe Troestler +@file{Ch.Troestler@@linkline.be}: +use install-info to update the info dir, +warn users of --prefix that lisp files go elsewhere. + +Changed (date 1-Feb-01): version 1.20: +Bug fix: missing file notes-first.el added to the distribution. +(Bug found by Michael Totschnig @file{michaelt@@supernet.ca}.) + +Changed ( 5-Dec-01): version 1.21: +(backed-out---didn't work with spaced URLs) +URL lookup now uses thing-at-point. + +Fix to make notes-mode work with emacs-21.1 +(Fix from Klaus Zeitler @file{kzeitler@@lucent.com}.) + +Changed ( 3-Jan-02): version 1.22: +Several bugs in @file{notesinit} for stricter Perl implementations +(bug found by Paul Craven" @file{pcraven@@yorku.ca}, +and Kasper van Wijk @file{kasper@@acoustics.mines.edu}) +and to make it run cleanly more often. + +Notes-first now autoinitializes notes mode from emacs. +(As instisted by rms, unfortunately about two years later than requested.) + + +Changed (20-Feb-05): version 1.23: +Outline mode is now forcebly turned on to avoid interactions +with user's text-mode hooks +(bug and fix from Nils Ackermann @file{nils@@nieback.de}). + +Install bug involving ordering of scripts and byte-compilation +fixed (bug and fix from Mark Allman @file{mallman@@grc.nasa.gov}). + +Fix obscure bug in configure, reported by Klaus Zeitler @file{kzeitler@@lucent.com}. + +Fix for notes-summarize-subject when no subject is specified (bug and fix +from Geoff Kuenning). + +Changed (14-Jan-06): version 1.24: + +install-info bug documented with the Debian install-info +(bug reported by Aaron Falk @file{falk@@isi.edu}). + +Automatic date completion in new days is now done in the current +locale, so it should now work for non-English languages. Bug reported +by Torsten Bronger @file{bronger@@physik.rwth-aachen.de}. + +Fixed a bug in mkindexcache, triggered by subjects with percent signs +in them. Bug reported by Philip Austin @file{paustin@@eos.ubc.ca}. + +We're a bit more robust about subjects, I hope. Warnings should +appear about embedded number signs, and leading spaces should be +filtered. Bug reported by Philip Austin @file{paustin@@eos.ubc.ca}. + +Notes-mode now dervies from indented-text-mode rather than +paragraph-indent-text mode. Unfortunatley this is not customizable +because of limitations of define-derived-mode. Change suggested by +Aaron Falk @file{falk@@isi.edu}. + +Provide better hints about how to get started after installation or +running notes-mode in emacs for the first time. + +In notes init, the default path for dir was the full path, not the tilde +version of the path. Now it defaults to using tidle for home +directory. Bug reported by Mark Allman @file{allman@@icir.org}. + +Changed (26-May-06): version 1.25: + +fixed a bug in the release tar.gz file that had a additional copies +copy nested. + +Changed (30-Jun-08): version 1.26: + +Force unicode I/O in @file{mkindexcache} to fix highlighting mis-alignment +when using emacs-21 with unicode subject lines. + +Changed mkprevnext and mkrawindex to optionally take the list of notes files +to index from stdin rather than from the command line. Yes, I finally +have 4093 notes files, overflowing the Unix command line buffer. + +Changes notes-mode.el to put path in quotes, allowing spaces to appear in home directory names (bug fix from Ulrich Herbst). + +Added a suggested features section. + +Changed ( 8-Aug-08): version 1.27: + +Change I/O in @file{mkindexcache} to use locale (the sadly correct thing) +rather than forcing utf-8 (the Righteous Path). +Bug report from Geoff Kuenning, a man with an older Unix environment than I. + +Changed (20-Jun-10): version 1.28: + +Changed a regular expression in @file{notes-index-mode.el} that was +causing emacs-v23 (a pre-release version) +to regular expression infinite recursion. + +Changed (2012-04-04): version 1.29 + +(2011-08-23) Changed @code{run-hooks} to @code{run-mode-hooks}. +Bug report from Geoff Kuenning. + +Changed some handling of PGP encryption to account for +some apparent API changes. + +(2012-04-04) Fixed encyrption to handle encrypting empty notes at the end +of buffers without going into an infinite loop. +Clearly wrong code, but you have to ask this guy for why he tried: +Bug report from Geoff Kuenning. + + +@c ---------------------------------------------------------------------- + +@node Suggested features, , Changes, History +@comment node-name, next, previous, up +@section Suggested features + +Features suggested by users but not yet implemented: + +21-Feb-08: (from Xavier Maillard): should support ``disconnected'' notes that +are indexed but not date-based. + +21-Feb-08: (from John Heidemann): should switch all notes files to have an extension (maybe @file{.notes}). +@c ---------------------------------------------------------------------- + +@node Installation, Keystroke index, History, Top +@comment node-name, next, previous, up +@chapter Installation + +To install notes-mode, + +@enumerate +@item +Unpack and extract the distribution +(gunzip notes-mode-xxx.tar.gz; tar xvf notes-mode-xxx.tar; cd notes-mode-xxx). + +@item +Run configure (./configure). + +@item +Type ``make install''. +@end enumerate + +(To control what's installed where, use --prefix=/where, or +--with-lisp-dir=/where, --datadir=/where (for scripts), +and --infodir=/where.) + +For each user: +@enumerate +@item +Run notesinit +@end enumerate + +If you have problems with paths being incorrect, please be aware that +you @emph{cannot} run notes directly out of where you untar it. The +installation process customizes the programs for where things are on +your system. +Make sure you move out of the directory where you untarred it +before running it. + + +The most recent distribution of notes-mode + is always available via + @file{http://www.isi.edu/~johnh/SOFTWARE/NOTES_MODE/}. + + +@c ---------------------------------------------------------------------- + +@node Keystroke index, Concept index, Installation, Top +@comment node-name, next, previous, up +@unnumbered Keystroke index + +This index lists notes-mode keystrokes. + +@printindex ky + + +@node Concept index, , Keystroke index, Top +@comment node-name, next, previous, up +@unnumbered Concept index + +This index lists notes-mode concepts. + +@printindex cp + + + + +@contents +@bye + +@c Geoff, make ispell support texinfo mode! +@c +@c LocalWords: texinfo setfilename settitle iftex finalout ifinfo DIR vskip +@c LocalWords: titlepage pt filll dir urls prev defun dfn Yahoo yahoo com Jun +@c LocalWords: alta Trademarked Sunone Grep agrep Nadia emph HTML's notesrc +@c LocalWords: altavista julienne kbd RTN pxref musaphobic mkall cron crontab +@c LocalWords: usr lib rawindex xref cC url imenu Phill PGP Campbell's ftp gp +@c LocalWords: cmu rfb pam keyring mknew Apr int strftime cindex kindex grep +@c LocalWords: isi ashvin geoff printindex ky cp wearables mit mantis co uk +@c LocalWords: pgp html setchapternewpage XXX elisp cY cy cd RET Weisman cn +@c LocalWords: reimplementation mode's Hyperbole's notesinit weisman app osf +@c LocalWords: org ner Bastek jason aai Jul Ashvin's localhost catsubject Aug +@c LocalWords: Autoconf Fontification perl mailcrypt LoPresti Choi's cag lcs +@c LocalWords: Ramesh govindan xemacs tkld quadstone Ueda kueda jupiter qse +@c LocalWords: tohoku ac jp Nov timp jna au mapcar gunzip xxx gz xvf xxx xxx +@c LocalWords: datadir infodir untar diff --git a/packages/notes-mode/notes-url.el b/packages/notes-mode/notes-url.el new file mode 100644 index 000000000..104b81aeb --- /dev/null +++ b/packages/notes-mode/notes-url.el @@ -0,0 +1,199 @@ + +;;; +;;; notes-url.el +;;; simplified url management routines for notes-mode +;;; $Id: notes-url.el,v 1.29 2005/02/20 22:53:44 johnh Exp $ +;;; +;;; Copyright (C) 1994-1998 by John Heidemann +;;; Comments to . +;;; +;;; This file is under the Gnu Public License. +;;; +;;; This code was originallly cribbed from w3.el +;;; by William M. Perry , +;;; but has since been completely rewritten. +;;; +;;; Why don't I just call his code? Because to use +;;; w3-follow-link I need to pull in at least 150k of w3.el +;;; and 150k of url.el, all just to open a file on the local +;;; computer. Instead I've hacked his code down to the 3k +;;; needed for opening local files. +;;; + +(require 'notes-variables) +(require 'notes-aux) + +(defvar notes-last-url nil + "Last URL interpreted. +This record is useful for debugging.") + +;;;###autoload +(defun notes-w3-url (url &optional where best-effort) + "Open a notes-url. Handle simple URLs here, or call notes-w3-alternate-url. +Takes the URL as an argument. Optionally you specify +WHERE the information should appear (either 'otherwindow or not, +defaults to not). +BEST-EFFORT causes notes-w3-url allows the tag portion of the URL to not +match. If there's no tag match, it looks for the nearest matching prefix. + +URLs optionally can begin with an URL: tag, which will be ignored. + +notes-w3-url handles only (or ) URLs. +Other URLs it hands off to the routine in notes-w3-alternate-url +for processing. If you use w3-mode, then + (setq notes-w3-alternate-url 'w3-follow-link) +will have w3 handle tough URLs." + (if (string-match "^[Uu][Rr][Ll]:" url) + (setq url (substring url 4))) + (if (not (string-match "^file://\\(localhost\\)?/\\(.*\\)$" url)) + (if (string-match "none" url) + (error "Notes-mode can't follow URL .") + (funcall notes-w3-alternate-url url where)) ;; now, with where! (emacs-20.4) + (let ((filetag (match-substring url 2)) + fname tag count count-string) + ;; pick out the tag, if any + (if (string-match "^\\([^#]*\\)#\\([0-9]*\\)\\(.*\\)$" filetag) + (setq fname (match-substring filetag 1) + count-string (match-substring filetag 2 nil t) + count (if count-string (string-to-int count-string) 1) + tag (match-substring filetag 3)) + (setq fname filetag + count 1 + tag nil)) + ;; Hack---url's refering to notes-index files have different tags. + ;; Otherwise notes-goto-index-entry fails on subjects like "* 252A". + (if (and count-string tag (string-match "/index$" fname)) + (setq tag (concat count-string tag) + count-string "1" + count 1)) + (if (not (string-match "^~" fname)) ; non-~ fnames start at fs root + (setq fname (concat "/" fname))) + ;; open the file + (cond + ((equal where 'otherwindow) (find-file-other-window fname)) + (t (find-file (expand-file-name fname)))) + ;; handle the tag + (if tag + (notes-w3-url-tag tag best-effort) + t)))) + +(defun notes-w3-url-tag-backup (tag) + "Strip the last ``part'' off of TAG." + (let ((result) + (separators " /\t.:") + (buf (get-buffer-create " *notes-w3-url-tag-backup"))) + (save-excursion + (set-buffer buf) + (erase-buffer) + (insert tag) + (goto-char (point-max)) + (skip-chars-backward (concat "^" separators)) + (skip-chars-backward separators) + (delete-region (point) (point-max)) + (setq result (buffer-string))) + (kill-buffer buf) + result)) + +(defun notes-w3-url-tag (tag best-effort) + "Find the TAG in the current buffer according to MODE. +BEST-EFFORT is either t (do prefix matching), +nil find the tag exactly, +or 'searching (used internally)." + (cond + ((not tag) nil) + ((and (string= tag "") (eq best-effort 'searching)) nil) + (t + (goto-char (point-min)) + (if (re-search-forward + (concat "^" (regexp-quote tag) + (if (not (eq best-effort 'searching)) + (if (eq major-mode 'notes-index-mode) + ": " + "$"))) + (point-max) t count) + t ;; hit + (if (not best-effort) + (error "Cannot find tag ``%s'' in %s." tag fname)) + (notes-w3-url-tag (notes-w3-url-tag-backup tag) 'searching))))) + + +(defun notes-w3-pass-through-alternate-url (url &optional where) + "Pass a click event through to the old binding for notes-w3-url. +Try this combination: + (add-hook 'notes-mode-load-hooks + (function (lambda () + (define-key notes-mode-map [mouse-2] + 'notes-w3-follow-link-mouse) + (setq notes-w3-alternate-url + 'notes-w3-my-alternate-url))))" + (let ((event last-input-event)) + (funcall (lookup-key + (current-global-map) + (vector (car event))) + event nil))) + +;;;###autoload +(defun notes-w3-follow-link (pt &optional where) + "* Follow the URL at the point. +Takes a PT to look at and a WHERE to open the URL ('otherwindow or nil). +This code works hard to recognize URLs based on context information. +URLs can be quoted by whitespace, beginning and end of lines, +or the official < and >. + +As a special case we also recognize (and skip) the text \"prev:\" +and \"next:\" before the URL. Notes-mode uses these fields to link +entries." + (interactive "d") + (let* + ((whitespace-regexp "[ \t\n]") + (quote-regexp whitespace-regexp) + start end direction) + (save-excursion + ;; If we're on the URL header, skip over it so the next search works. + (if (looking-at "[ quoted URL which presumably + ;; follows. (This hack is to support a guy who doesn't use + ;; the mouse and so looks up urls at the beginning of the line.) + (if (looking-at "\\(prev\\|next\\):") + (skip-chars-forward "^<" (get-end-of-line))) + ;; Check for a quoting character. + (cond + ((equal (char-after (point)) ?<) + (progn + (setq quote-regexp ">") + (forward-char 1))) + ((equal (char-after (point)) ?\") + (progn + (setq quote-regexp "\"") + (forward-char 1)))) + ;; Remember start of url. + (setq start (point)) + ;; Search for end of url. + (if (re-search-forward quote-regexp (get-end-of-line) 1) + (forward-char -1)) + (setq end (point)) + ;; Interpret it (outside the save-excursion so we can go + ;; to places in the same buffer). + (setq notes-last-url (buffer-substring start end))) + (notes-w3-url notes-last-url where))) + +;;;###autoload +(defun notes-w3-follow-link-mouse (e) + "* Follow the URL where the mouse is." + (interactive "e") + (mouse-set-point e) + (notes-w3-follow-link (point) + (if notes-w3-follow-link-mouse-other-window + 'otherwindow + nil))) + + + + diff --git a/packages/notes-mode/notes-variables.el b/packages/notes-mode/notes-variables.el new file mode 100644 index 000000000..0f83ac215 --- /dev/null +++ b/packages/notes-mode/notes-variables.el @@ -0,0 +1,213 @@ + +;;; +;;; notes-variables.el +;;; $Id: notes-variables.el,v 1.30 2007/11/06 02:45:55 johnh Exp $ +;;; +;;; Copyright (C) 1994-2000 by John Heidemann +;;; Comments to . +;;; +;;; This file is under the Gnu Public License, version 2. +;;; + +;; +;; This file lists all parameters you might wish to change in +;; notes{-index,}-mode. The best way to handle this in your +;; .emacs file is to do +;; (require 'notes-variables) +;; (setq your-variable-to-change 'your-new value) +;; + +;; xxx: if part of emacs, this should be probably be set to exec-directory (?) +(defvar notes-utility-dir "/home/johnh/NOTES/BIN" + "Location of notes utility programs") + +;; +;; Notice: several notes parameters are defined in your +;; ~/.notesrc file. These are not specified here. +;; See mkconfig for details. +;; We fetch them here. +;; +;; To make this fast, we cache the configuration in a .notesrc.el +;; file. We only have to invoke mkconfig when that file is out-of-date. +;; This optimization is very important because notes-variables is +;; required every time emacs is started. +;; +(save-excursion + (if (null (file-exists-p (concat notes-utility-dir "/mkconfig"))) + (progn + ;; + ;; A common user error is that people don't + ;; follow the installation instructions. + ;; Part of installation is chaning my local paths (with + ;; johnh in them) to whatever you use on your system. + ;; If the following error is triggered, it's probably + ;; because the user didn't RTFM (or even TF README) + ;; and just tried to run notes-mode in place. + ;; DON'T DO THAT! Follow the installation instructions. + ;; + (error "notes-mode is incorrectly installed. Consult the INSTALL section of README."))) + (let* + ((source-file (expand-file-name "~/.notesrc")) + (cache-file (expand-file-name "~/.notesrc.el")) + (cache-buf (set-buffer (find-file-noselect cache-file)))) + (if (and + (not (file-exists-p source-file)) + (not noninteractive)) + (progn + (require 'notes-first) + (notes-first-use-init))) + (if (and ; requirements for a valid cache-file + (file-exists-p cache-file) + (if (file-exists-p source-file) + (file-newer-than-file-p cache-file source-file) + t) + (file-newer-than-file-p cache-file (concat notes-utility-dir "/mkconfig"))) + t ; cache is up-to-date + ;; otherwise, refresh the cache + (erase-buffer) + (call-process (concat notes-utility-dir "/mkconfig") nil t nil "elisp") + (save-buffer cache-buf) + (set-file-modes cache-file 420)) ; protect it => mode 0644 + (eval-current-buffer) + (kill-buffer cache-buf))) + + +(setq auto-mode-alist + (cons (cons + (concat notes-int-glob "/" notes-file-glob ".?$") + 'notes-mode) + auto-mode-alist)) + +;;; xxx: most of these should use defcustom or something similar, I presume. +(defvar notes-w3-alternate-url 'browse-url + "* A function to call when notes-w3-url cannot handle a complex URL. +It now goes through the emacs browse-url package, +but you could also set it manually (say, to w3-fetch).") + +(defvar notes-use-font-lock t + "* Enable notes fontification.") + +(defvar notes-use-outline-mode t + "* Enable outline-minor-mode in all notes buffers?") + +(defvar notes-index-fontify-dates nil + "* Fontify dates in notes-index-mode. +Turning this off for large notes-index's can improve performance.") + +(defvar notes-bold-face 'notes-bold-face + "* Face to use for notes-index-mode and notes-mode subjects. +The default face is copied from 'bold.") + +(defvar notes-font-lock-keywords + '(("^\\* .*$" . notes-bold-face) + ("^\\-+$" . notes-bold-face) + ;; ("^[0-9]+\\-[A-Za-z]+\\-[0-9]+ [A-Za-z]+$" . font-lock-bold-face) + ;; NEEDSWORK: should also highlight URLs, maybe? + ) + "* Font-lock keywords for notes mode.") + +(defvar notes-index-font-lock-keywords + '(("^[^:]*:" . notes-bold-face) + ("\\<[0-9]*\\>" . mouse-face) + ) + "* Font-lock keywords for notes-index mode.") + +(defvar notes-mode-complete-subjects t + "* Enable subject completion in notes mode?") + +(defvar notes-w3-follow-link-mouse-other-window t + "* Should notes-w3-follow-link-mouse open another window?") + +(defvar notes-subject-table nil + "List of notes-subjects needed for subject completion. +Reloaded by loading the notes-index file.") + +(defvar notes-mode-initialization-program "mknew" + "Program to run to initialize a new notes file. Must be in notes-bin-dir. +If nil, no initialization is done.") + +(defvar notes-encryption-key-id nil + "Keyid of PGP key for the current user. +Useful if your \\[user-full-name] doesn't match a unique key. +Should have a leading 0x.") + +(defvar notes-electric-prevnext 2 + "Amount of electricity in prevnext for notes-mode. +nil: don't auto-update anything. +1: update prevnext, but don't autosave the old buffer +2: update prevnext and autosave the old buffer.") + +(defvar notes-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version) + "*In XEmacs or Lucid Emacs?.") + +;;; +;;; prep the load path using the notes-lisp-dir +;;; code stolen from the auctex styles files (specifically tex-site.el) +;;; -- Kannan +;;; Wed Apr 7 09:40:27 EDT 1999 +;;; +(if (boundp 'notes-lisp-dir) + (or (assoc notes-lisp-dir (mapcar 'list load-path)) ;No `member' yet. + (assoc (substring notes-lisp-dir 0 -1) ;Without trailing slash. + (mapcar 'list load-path)) + (setq load-path (cons notes-lisp-dir load-path)))) + +(if notes-running-xemacs + (require 'notes-xemacs) + (require 'notes-emacs)) + +(defvar notes-platform-inited nil + "Have we inited our platform (xemacs/emacs)?") + +;;; +;;; autoloads +;;; + + +;;;### (autoloads (notes-index-mode) "notes-index-mode" "notes-index-mode.el" (12248 45843)) +;;; Generated autoloads from notes-index-mode.el + +(autoload (quote notes-index-mode) "notes-index-mode" "\ +Notes-index-mode with mouse support. + +You may wish to change notes-bold-face and notes-use-font-lock. + +Key bindings are: +\\{notes-index-mode-map}" t nil) + +;;;###autoload +(autoload (quote notes-index-todays-link) "notes-index-mode" "\ +* Open the notes file for today." t nil) + +;;;*** + +;;;### (autoloads (notes-w3-follow-link-mouse notes-w3-follow-link notes-w3-file) "notes-url" "notes-url.el" (12248 46828)) +;;; Generated autoloads from notes-url.el + +(autoload (quote notes-w3-url) "notes-url" "\ +Find a link to an ftp site - simple transformation to ange-ftp format. +Takes the URL as an argument. Optionally you specify +WHERE the information should appear (either 'otherwindow or not)." nil nil) + +(autoload (quote notes-w3-follow-link) "notes-url" "\ +* Follow the URL at the point. +NEEDSWORK: should handle (by ignoring) an optional \"URL:\" tag." t nil) + +(autoload (quote notes-w3-follow-link-mouse) "notes-url" "\ +* Follow the URL where the mouse is." t nil) + +;;;*** + + +;;;### (autoloads (notes-underline-line notes-end-of-defun notes-beginning-of-defun) "notes-mode" "notes-mode.el" (12250 9363)) +;;; Generated autoloads from notes-mode.el + +(autoload (quote notes-underline-line) "notes-mode" "\ +*Create a row of dashes as long as this line, or adjust the current underline." t nil) + +;;;*** + +(autoload 'notes-mode "notes-mode" "autoloaded notes-mode" t nil) + +(run-hooks 'notes-variables-load-hooks) +(provide 'notes-variables) diff --git a/packages/notes-mode/notes-xemacs.el b/packages/notes-mode/notes-xemacs.el new file mode 100644 index 000000000..2d0cd53c5 --- /dev/null +++ b/packages/notes-mode/notes-xemacs.el @@ -0,0 +1,44 @@ + +;;; +;;; notes-xemacs.el +;;; $Id: notes-xemacs.el,v 1.2 1998/11/04 18:40:27 johnh Exp $ +;;; +;;; Copyright (C) 1998 by John Heidemann +;;; Comments to . +;;; +;;; This file is under the Gnu Public License. +;;; + +;; +;; Xemacs-specific parts of notes-mode. +;; + +(defun notes-platform-bind-mouse (map generic-key fn) + "Map from (FSF) emacs symbols to xemacs for notes-mode. (Sigh.)" + (let + ((xemacs-key + (cond + ((eq generic-key 'mouse-2) [(button2)]) + ((eq generic-key 'S-mouse-2) [(shift button2)])))) + (define-key map xemacs-key fn))) + + +(defun notes-platform-font-lock () + "Notes platform-specific font-lock mode." + (require 'font-lock) + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults '(notes-font-lock-keywords nil))) + + +(defun notes-platform-init () + "Init platform-specific stuff for notes-mode." + (if notes-platform-inited + t + (setq notes-platform-inited t) + (make-face notes-bold-face) + (if (not (face-differs-from-default-p notes-bold-face)) + (copy-face 'bold notes-bold-face)) + + )) + +(provide 'notes-xemacs) diff --git a/packages/notes-mode/notesinit b/packages/notes-mode/notesinit new file mode 100755 index 000000000..521abc803 --- /dev/null +++ b/packages/notes-mode/notesinit @@ -0,0 +1,205 @@ +#!/usr/bin/perl -w + +# +# notesinit +# Copyright (C) 1996-2002 by John Heidemann +# $Id: notesinit,v 1.12 2006/01/14 22:52:56 johnh Exp $ +# + +sub usage { + print STDERR <= 0 && $ARGV[0] eq '-?'); +my($use_defaults) = defined($opts{'D'}); + +my($PERL) = $^X; # location of perl executable + + +use POSIX; +BEGIN { unshift(@INC, "/home/johnh/NOTES/BIN"); }; +use NotesVars; +use strict; + + +sub query { + my($lc) = 1; + if ($_[0] eq '-nolc') { + $lc = undef; + shift @_; + }; + my($expl, $query, $valid_regexp, $default) = @_; + return $default if ($use_defaults); + print $expl; + my($a); + for (;;) { + print $query; + $a = <>; + chomp $a; + $a = lc($a) if ($lc); + return $default if ($a eq ''); + return $a if ($a =~ /$valid_regexp/); + print "I didn't understand your answer `$a'.\n"; + }; +} + +my($expl); +$expl = <. Everything you will +be asked here is discussed in greater detail in the documentation. + +END + +my($home_dir) = ((getpwuid($<))[7]); +my($def_choices, $def) = ('(Y/n)', 'y'); +if (-f "$home_dir/.notesrc") { + die "$0: will not override existing .notesrc with -D option.\n" + if ($use_defaults); + ($def_choices, $def) = ('(y/N)', 'n'); + print "WARNING: you already appear to have notes configured.\n\n" +}; + +my($a) = query($expl, "Do you want to set up notes mode now $def_choices? ", '(y|n)', $def); +if ($a ne 'y') { + print "\nnotesinit exited.\n\n"; + exit 1; +}; + +$expl = <$home_dir/.notesrc <$today_pathname <>$tmpfile; +echo '$crontab_entry' >>$tmpfile; +" . $::notes{bin_dir} . "/setcrontab $tmpfile +rm -f $tmpfile"); + +$expl = "\n### 5. add code to your .emacs file to load notes-mode\n"; +commands($expl, "grep notes-variables $home_dir/.emacs >/dev/null || echo \"(require 'notes-variables)\" >>$home_dir/.emacs"); + +print "\n### changes end here\n" if (!$use_defaults); + +print "\nYou have elected to have the changes DESCRIBED but not made.\n" . + "To make the changes yourself, run the commands between\n" . + "\"changes begin here\" and \"changes end here\".\n" + if ($go eq 'd'); + +exit 0; diff --git a/packages/notes-mode/release b/packages/notes-mode/release new file mode 100644 index 000000000..9de53f193 --- /dev/null +++ b/packages/notes-mode/release @@ -0,0 +1 @@ +1.29 diff --git a/packages/notes-mode/sample.notesrc b/packages/notes-mode/sample.notesrc new file mode 100755 index 000000000..68556b9b2 --- /dev/null +++ b/packages/notes-mode/sample.notesrc @@ -0,0 +1,16 @@ + +dir: ~/NOTES +# the root of the document tree + +int_form: %Y%m +# strftime(3) format for intermediate directories +# Only a subset of strftime is supported: +# %Y four-digit year +# %y two digit year w/leading zeros +# %m two digit numeric month w/leading zeros +# %d two digit day w/leading zeros + +# XXX: Currently, file_form cannot be changed. +# file_form: %y%m%d +# strftime(3) format for notes files directories + diff --git a/packages/notes-mode/setcrontab b/packages/notes-mode/setcrontab new file mode 100755 index 000000000..0ab336660 --- /dev/null +++ b/packages/notes-mode/setcrontab @@ -0,0 +1,42 @@ +#!/bin/sh + +# +# setcrontab +# Copyright (C) 1996 by John Heidemann +# $Id: setcrontab,v 1.2 2002/01/03 04:35:18 johnh Exp $ +# + +usage () { + cat <$FE <\$1 +exit 0 +END + +chmod 0700 $FE +EDITOR=$FE +VISUAL=$FE +export EDITOR VISUAL + +crontab -e + +rm -f $FE $NCT +exit 0 + diff --git a/packages/notes-mode/strftime.c b/packages/notes-mode/strftime.c new file mode 100644 index 000000000..e093dc3ce --- /dev/null +++ b/packages/notes-mode/strftime.c @@ -0,0 +1,41 @@ + +/* + * strftime.c + * $Id: strftime.c,v 1.4 1999/01/28 19:26:29 johnh Exp $ + * + * Copyright (C) 1996 by John Heidemann. + * Comments to . + * + * This file is under the Gnu Public License, version 2. + * For details see the COPYING which accompanies this distribution. + * + */ + +#include + +void +usage() +{ + printf ("usage: strftime format epoch_time\n"); + printf ("\tThis program exists because Perl's POSIX loads in 880ms\n"); + printf ("\twhile this program can run in ~20ms,\n"); + printf ("\tand because some NT users find Perl's POSIX lacks strftime.\n"); + exit (1); +} + +main(argc, argv) + int argc; + char **argv; +{ +#define SLEN 1024 + char s[SLEN]; + struct tm *tm; + time_t time; + + if (argc != 3) + usage(); + time = atol(argv[2]); /* sigh. Hope int==time_t */ + tm = localtime(&time); + strftime(s, SLEN, argv[1], tm); + printf ("%s\n", s); +}