phillord / lentic

Create views of the same content in two Emacs buffers
183 stars 12 forks source link

About the first line of elisp file. #25

Closed tumashu closed 9 years ago

tumashu commented 9 years ago

Many el file have fist line, like this:

;;; chinese-pyim.el --- Chinese pinyin input method

At this moment, it will be convert to:

# # chinese-pyim.el --- Chinese pinyin input method

What about convert it to:

#+TITLE:  chinese-pyim.el --- Chinese pinyin input method

I think this is more useful.

phillord commented 9 years ago

It's a possibility and I did think about this. The problem with this is that the first line of the lisp file is not necessarily a good title -- for example, for many of my files it includes a "lexical-binding" statement. In the end, I decided that commenting was better because it leaves the option in the hand of the author, although I am aware that it forces duplication. For my usage (where I include generated files), for instance a #+TITLE would be wrong.In general, I think that the duplication is minor especially as header lines tend not to change too often.

As a secondary advantage, it makes the function which translates point locations easier, because ";;;" and "# #" are the same width.

tumashu commented 9 years ago

May be we can use a custom key , for example: "#+ELhead:"

phillord commented 9 years ago

It's possible, yes, although, as I say would require rewriting the synchronisation function.

What would it give me? I don't know enough about org-mode to understand?

phillord commented 9 years ago

I think I am going to close this -- rewriting the synchronisation function for this would be quite hard, and it standard the current solution is workable.