-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write the readme.txt files #366
Conversation
I will try a run on all the packages tomorrow and see if there are any problems that crop up. If not we'll merge it 👍 |
Another example of @dgutov kicking ass! |
:) |
@dgutov could you try building I can circumvent this problem by forcibly setting The problematic line is line 453 in the |
Indeed, I see the problem. If I change |
@dgutov would it be better to set
|
That is what I did to fix the problem. |
@purcell ping. any consequence to using |
Another error I mis-captured last time,
|
The common and the "literal" versions of the function plainly return different strings, so only one of them should be "correct" one. When
when |
checkout the |
Looks like it's a problem with the file, sort of: https://raw.github.com/emacsmirror/w3m/master/README By the way, this shows another small problem: this is not the correct README file for the package. Shimbun doesn't have one, and we're just taking the one for |
Other than the |
I get an error about |
SO, the problem with |
but the other problem is properly searching for the "README" file. We dealt something similar before where we wanted to find the common root for all files being copied, our solution didn't end up using this approach though. |
I see. The second problem is what I was referring to. I think we can leave this alone for now, though, until someone specifically asks why their README is not showing. |
What about the |
Sorry, you'll need to elaborate. When do you see the errror?
|
|
Yes, sorry. In this case On another note, I seem to have broken this pull request with |
Hrm. What does Also do not worry too much about rebuilding a merge request. At this point I will probably modify your original request into a super commit that resolves the whole thing. |
When |
@purcell Would like your input on how we should handle detection of README files. Right now packages don't specify a README file and I don't think that's the right approach. My idea is to search the directories of all files being included in the package, if those directories contain a README then we include the README from the shallowest path. |
I think the idea is fine, but we should look at the existing recipes. Here's some examples. These will benefit from this: These will definitely not: These two are weird: To sum up, I think adding a |
I agree that My approach would be this, though: if there's a README in a directory no shallower than the shallowest entry in I wouldn't personally bother with Just my 2c. |
I'd rather complicate the code with a better README search algorithm than require more out of recipes. I think Here are the rules I propose. From highest to lowest priority.
I think this should handle all the cases you specified above as far as I can tell. Donald |
Yeah, exactly; I don't care about the few cases where a reasonable set of rules can't find a README or commentary. And I might even skip your "nearest parent directory" rule. Emacs is a self-documenting editor, after all, so libraries should have documentation in the source code commentary. |
How can a -pkg file can contain commentary? Regarding 3., I'd like to point out that without it,
But anyway, supporting just 1. and 2. and adding some additional logic later on seems fine to me. |
@dgutov Agreed, no point looking in a I reckon we should just roll out 1 first to test the waters, and then follow up with 2 and perhaps 3 when and if they seem helpful. |
Ok let me take a stab at this and see what I come up with. I'd like to try to simplify the original push a bit. Donald On Nov 8, 2012, at 13:55, Steve Purcell notifications@github.com wrote:
|
EIN author here. I hope melpa supports README in parent (and/or repository root) directory. As EIN has many lisp files, putting files in top directory does not work well. Also, emacs lisp file is not a good format for document and emacs-lisp-mode is not a good mode for writing documents. That's why I prefer writing README, rather than commentary in the top level file. I agree that Emacs is a self-documenting editor, but I believe that does not imply user must open the source file to see the document. I think it is rather about docstring and info manual. See also: tkf/emacs-ipython-notebook#6 |
@tkf We're not saying that the full documentation should be in a commentary section inside your main .el file -- just that there should be text there which explains the basic purpose of the package. People won't use this mechanism to access full documentation for packages; they just use it to decide whether or not to install a particular package. |
BTW, how do you find the main file? If package is composed of |
@tkf The main file is the |
Also note that many good old "traditional" emacs lisp projects has README at the top + lisp directory style, such as in org-mode, gnus, ess and reftex. It also reflects the repository organization of Emacs itself. I think it worth supporting this style. (tkf/emacs-ipython-notebook#6). |
@purcell that's a simple answer! thanks |
The more I think about it, the more I believe we should just ignore README files. We're over-thinking all this. The sole purpose of this change will be to make a paragraph of text appear when someone presses "?" in the package list. |
One of the goals I had is to at least recognize the packages already submitted and working in GNU ELPA and Marmalade. And they both read the plain In Marmalade docs, this is actually the recommended way. |
@milkypostman @purcell Would you like to chip in here? http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00670.html |
I tested it with a few packages, seems to work, but please don't take my word for it.