emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Virtually prefix headlines according to content


From: indieterminacy
Subject: Re: Virtually prefix headlines according to content
Date: Tue, 29 Jun 2021 13:26:00 +0000

Hi Rodrigo,

regarding syntax, it would be cool if you aligned the style to match Emacs' 
Hyperboles GitHub style:
=> https://github.com/rswgnu/hyperbole/blob/master/DEMO

```
** Github (Remote) References

For software developers who use Github for publishing and version control,
Github links are similar to social media links but reference specific Github
web pages.

Press the Action Key on github@rswgnu to go to RSW's gihub home page.
gh@rswgnu works too. 

References to project home pages look like this (the / is required):

  github#/hyperbole           (uses user default setting)
  github#/rswgnu/hyperbole

References to specific commits use the # hash symbol and short versions
of the git commit hash code:

  gh#rswgnu/hyperbole/5ae3550 (if include user, must include project)
  github#hyperbole/5ae3550    (project can be given with user default)
  gh#5ae3550                  (user and project defaults are used)

An Action Key press on the first commit reference above works because
user, project and commit hash code are all included.  The second and
third versions require the setup of default values, as explained in
the commentary near the top of "hib-social.el".

Similarly, the same file above explains how to link to pull requests,
issues, branches and tags.

```

FYI, Hyperbole has been making improvements with regards to utility with 
Orgmode.
It may be worth you looking into how that functionality is implemented.

Kind regards,


Jonathan McHugh

June 29, 2021 1:27 PM, "Rodrigo Morales" <moralesrodrigo1100@gmail.com> wrote:

> * The context
> 
> When taking notes in Org Mode, I usually store Github links of the
> repositories that are relevant to the topic I'm taking notes as
> headlines. For this reason, I've multiple headlines of the form within
> my notes (from my notes on Graph Theory):
> 
> #+BEGIN_SRC org
> * cytoscape/cytoscape.js: Library for visualisation and analysis
> :PROPERTIES:
> :GITHUB: cytoscape/cytoscape.js
> :END:
> 
> * simongray/clojure-graph-resources: List of Clojure resources
> :PROPERTIES:
> :GITHUB: simongray/clojure-graph-resources
> :END:
> 
> * DONE What is an undirected graph? ...
> * DONE What is a directed graph? ...
> #+END_SRC
> 
> * The question
> 
> What I would like to know is whether it is possible to format a headline
> by taking into consideration the properties it has. For example, in this
> specific scenario, I would like to make all headlines that have a
> "GITHUB" to show "GH" before the actual headline (the content would look
> like this).
> 
> #+BEGIN_SRC org
> * GH cytoscape/cytoscape.js: Library for visualisation and analysis ...
> * GH simongray/clojure-graph-resources: List of Clojure resources ...
> * TODO What is an undirected graph? ...
> * TODO What is a directed graph? ...
> #+END_SRC
> 
> The reason why I'm asking this is because thus when collapsing
> headlines, I would know that an specific headline is a Github
> repository. In general terms, to ease the readibility of my Org Mode
> file.
> 
> * Additional context
> 
> A similar behavior is provided by org-num-mode (built-in function), so I
> guess that some way to accomplish this would be to look at the
> implementation of that mode and try to understand how that is
> accomplished.
> 
> Any help is appreciated,
> Rodrigo Morales.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]